#mainVisual {
    min-height: 100vh;
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
}

#mainVisual .content-wrap {
    height: 100%;
    display: flex;
    gap: clamp(20px, 5vw, 50px);
    justify-content: space-between;
    align-items: center;
    position: relative;
    top: 50px;
}

#mainVisual .text * {
    word-break: keep-all;
}

#mainVisual .text .title p {
    font-weight: 700;
    font-size: 50px;
    line-height: 1.5;
}

#mainVisual .text .title p:first-child {
    font-size: 32px;
    opacity: 0.6;
}

#mainVisual .text .desc {
    margin-top: 25px;
    line-height: 1.75;
}

#mainVisual .contents {
    position: relative;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#mainVisual .contents img {
    max-width: 635px;
}

#liveSpotPrice {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 20px;
    width: 100%;
    max-width: 580px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#liveSpotPrice .price-board {
    --border-line: 1px solid #ddd;
    width: 100%;
    padding: 40px;
}

#liveSpotPrice .price-board * {
    line-height: 1;
    letter-spacing: var(--num-letter-spacing);
}

#liveSpotPrice .price-board__header,
#liveSpotPrice .price-board__row {
    display: grid;
    grid-template-columns: 90px 1fr 1fr;
    column-gap: 20px;
    align-items: center;
}

#liveSpotPrice .price-board__header {
    padding-bottom: 20px;
    border-bottom: var(--border-line);
}

#liveSpotPrice .price-board__header>p {
    font-size: var(--f22);
    font-weight: 700;
    text-align: center;
}

#liveSpotPrice .price-board__row {
    padding: 25px 15px;
    border-bottom: var(--border-line);
}

#liveSpotPrice .price-board__name {
    font-size: var(--f18);
}

#liveSpotPrice .price-board__cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

#liveSpotPrice .price-board__cell strong {
    font-size: var(--f22);
    font-weight: 700;
}

#liveSpotPrice .price-board__footer {
    padding-top: 20px;
}

/* 환율 */
#exchangeBoard {
    overflow: unset;
}

#exchangeBoard .exchange-board {
    --border-padding: 50px;
    position: relative;
    left: 50%;
    top: -50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: var(--container-width);
    padding: 30px 60px;
    border-radius: 28px;
    background: #fff;
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: center;
    column-gap: var(--border-padding);
}

#exchangeBoard .exchange-board__head {
    padding-right: var(--border-padding);
    border-right: 1px solid #ddd;
}

#exchangeBoard .exchange-board__title {
    font-size: var(--f22);
    font-weight: 700;
    line-height: 1.75;
}

#exchangeBoard .exchange-board__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: clamp(50px, 3vw, 60px);
    row-gap: 30px;
    align-items: center;
}

#exchangeBoard .exchange-board__item {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

#exchangeBoard .exchange-board__flag {
    --flag-size: 28px;
    width: var(--flag-size);
    height: var(--flag-size);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #ddd;
    border: 1px solid #ddd;
}

#exchangeBoard .exchange-board__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#exchangeBoard .exchange-board__label {
    display: flex;
    align-items: baseline;
    gap: 3px;
    line-height: 1.2;
    flex-wrap: wrap;
}

#exchangeBoard .exchange-board__label strong {
    font-size: var(--f18);
    font-weight: 700;
}

#exchangeBoard .exchange-board__label span {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-mute);
    letter-spacing: 0.2px;
}

#exchangeBoard .exchange-board__value {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
    flex-wrap: wrap;
}

#exchangeBoard .exchange-board__value strong {
    font-size: var(--f18);
    font-weight: 700;
    letter-spacing: var(--num-letter-spacing);
}

/* 실시간 시세 */
#marketSection {
    --section-bg-color: #f9f9f9;
    background-color: var(--section-bg-color);
}

#marketSection .divider {
    margin-top: 30px;
}

#marketSection .side-label {
    font-family: "Raleway", "Pretendard", sans-serif;
    position: absolute;
    top: 15%;
    left: 3.5vw;
    transform: translateY(-50%) rotate(180deg);
    display: inline-flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.28em;
    line-height: 1;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    opacity: 0;
}

#marketSection .side-label::before {
    content: "";
    display: block;
    width: 1px;
    height: 45px;
    opacity: 0.8;
    background: var(--color-text);
}

#marketSection .market-title .tab-btn__chip {
    margin-top: 35px;
}

#marketSection .contents-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(60px, 4.1666vw, 80px);
}

#marketSection .contents-wrap .market-block {
    flex: 1;
    width: 100%;
}

#marketSection .market-block .tab-nav.line-custom {
    margin-bottom: 0;
    column-gap: 20px;
    top: 1px;
}

#marketSection .market-block .tab-nav.line-custom>div {
    font-size: 18px;
    padding: 0 15px 15px;
}

#marketSection .market-block .tab-nav.line-custom .more-btn {
    position: absolute;
    right: 0;
    top: -7.5px;
}

.market-block .block-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 25px;
    width: 100%;
}

.market-block .block-title * {
    line-height: 1;
}

.trade-tab {
    display: flex;
}

.trade-tab button {
    cursor: pointer;
    flex: 1;
    height: 40px;
    border: 1px solid #e5e5e5;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: #ccc;
}

.trade-tab button.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.mini-summary-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 18px 0 25px;
    padding: 14px 6px;
    border-radius: 10px;
    background: #f1f1f1;
}

.mini-summary-board .item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0 15px;
    border-right: 1px solid #ddd;
}

.mini-summary-board .item:last-child {
    border-right: 0;
}

.mini-summary-board .item .label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-mute);
    line-height: 1.2;
}

.mini-summary-board .item .value {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: var(--num-letter-spacing);
}

#marketSection .contents-wrap.market-row {
    align-items: stretch;
}

/* 실시간 소매 시세 */
#marketSection .contents-wrap:has(.retail-price-board) {
    display: block;
}

.retail-price-board {
    display: flex;
    align-items: stretch;
    width: 100%;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    overflow: hidden;
}

.retail-price-board__info {
    flex-shrink: 0;
    width: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 35px;
    border-right: 1px solid #e5e5e5;
    background: #f9f9f9;
}

.retail-price-board__eyebrow {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-mute);
    line-height: 1.4;
}

.retail-price-board__title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    margin-top: 2px;
}

.retail-price-board__desc {
    margin-top: 16px;
    font-size: 12px;
    color: var(--color-mute);
    line-height: 1.6;
}

.retail-price-board__date {
    color: #333;
    font-weight: 600;
}

.retail-price-board__more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 22px;
    width: fit-content;
    padding: 8px 20px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: transparent;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.retail-price-board__more:hover {
    background: #f0f0f0;
}

.retail-price-board__table-wrap {
    flex: 1;
    overflow-x: auto;
    padding: 10px 0;
}

.retail-price-board__table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    table-layout: fixed;
    letter-spacing: var(--num-letter-spacing);
}

.retail-price-board__table th,
.retail-price-board__table td {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.retail-price-board__table thead th {
    padding: 14px 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-mute);
    border-bottom: 1px solid #e5e5e5;
}

.retail-price-board__table thead th:first-child {
    width: 90px;
}

.retail-price-board__table thead th:not(:first-child) {
    width: calc((100% - 90px) / 5);
}

.retail-price-board__table tbody td {
    padding: 22px 10px;
}

.retail-price-board__table tbody td strong {
    display: block;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.retail-price-board__table tbody td .price-change {
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}

#wholesaleBoard .wholesale-row[data-type="dom"] td .price-change {
    display: none;
    min-height: 17px;
}

.retail-price-board__table tbody td .price-change::before {
    width: 9px;
}

.retail-price-board__table .row-label {
    font-size: 15px;
    font-weight: 700;
    color: #555;
    text-align: left;
    padding-left: 24px;
}

.retail-price-board__table tbody tr:first-child td {
    border-bottom: 1px solid #f0f0f0;
}

.retail-price-board__table tbody td .na-text {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-mute);
}

.market-row>.market-block,
.market-row>.market-block>.content,
.market-row>.market-block .market-table-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.is-premium .market-table__body .market-table__row {
    padding: 12px 5px;
}

.is-business .market-table {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.is-business .market-table__body {
    flex: 1;
    display: flex;
}

.is-business .market-table__body .market-table__row {
    height: 100%;
}

#mainVideo,
#mainPartner {
    --container-width: 1100px;
}

#mainVideo .video-box {
    width: 70vw;
    max-width: var(--container-width);
    margin: 0 auto;
}

#mainVideo .bg-obj {
    position: absolute;
    top: 50%;
    right: 1.666vw;
    transform: translateY(-50%);
    width: 40vw;
    max-width: 765px;
    height: auto;
    aspect-ratio: 135/156;
    background-size: cover;
    background-position: center;
    opacity: 0.03;
}

#mainVideo .bg-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

#mainVideo .marquee {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}

#mainVideo .marquee span {
    text-transform: uppercase;
    will-change: transform;
    transform: translateX(0);
    white-space: nowrap;
    -webkit-animation: marquee 24s linear infinite;
    animation: marquee 24s linear infinite;
    font-size: 160px;
    font-family: "Raleway", "Pretendard", sans-serif;
    font-weight: 900;
    letter-spacing: 5px;
    color: var(--color-text);
}

@-webkit-keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

#mainPartner .bg-obj {
    position: absolute;
    top: -6vw;
    left: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 1100/673;
    background-size: cover;
    background-position: top center;
}

#mainPartner .benefit-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    margin: 0 auto;
}

#mainPartner .benefit-card .item {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    padding: 0 50px;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#mainPartner .benefit-card .icon {
    --icon-size: 36px;
    width: var(--icon-size);
    height: var(--icon-size);
}

#mainPartner .benefit-card .icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#mainPartner .benefit-card .item__eyebrow {
    display: block;
    margin: 35px 0 20px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.8px;
    color: var(--color-primary);
}

#mainPartner .benefit-card .item__text {
    font-size: var(--f22);
    font-weight: 700;
}

#mainPartner .btn-wrap {
    margin-top: 60px;
}

#mainPartner .btn-wrap .btn {
    background-color: var(--color-text);
    border-color: var(--color-text);
}

#mainPartner .btn-wrap .btn:hover {
    background-color: #000;
    border-color: #000;
}

/* custom ( 1700px ~)*/
@media all and (min-width: 1700px) {
    #marketSection .side-label {
        opacity: 1;
    }
}

/* Desktop ( 1024px ~)*/
@media all and (min-width: 1024px) {}

/* Laptop ( 1024px ~ 1440px)*/
@media all and (min-width: 1024px) and (max-width: 1440px) {
    #mainVisual .content-wrap {
        flex-direction: column;
        padding-top: calc(var(--ticker-height) + var(--header-height) + 30px);
    }

    #mainVisual .contents {
        width: 100%;
    }

    #liveSpotPrice {
        max-width: 1000px;
        right: unset;
        top: 40%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    #exchangeBoard .exchange-board__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Tablet ( 768px ~ 1023px)*/
@media all and (min-width: 768px) and (max-width: 1023px) {
    #mainVisual .content-wrap {
        flex-direction: column;
        padding-top: calc(var(--ticker-height) + var(--header-height) + 20px);
        padding-bottom: var(--divider-gap);
    }

    #mainVisual .text .title p {
        font-size: 38px;
    }

    #mainVisual .text .title p:first-child {
        font-size: 26px;
    }

    #mainVisual .text .desc {
        margin-top: 20px;
    }

    #mainVisual .contents {
        width: 100%;
    }

    #mainVisual .contents img {
        width: 70vw;
    }

    #liveSpotPrice {
        max-width: clamp(580px, 80vw, 620px);
        right: unset;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    #liveSpotPrice .price-board__header,
    #liveSpotPrice .price-board__row {
        grid-template-columns: 60px 1fr 1fr;
    }

    /* 환율 */
    #exchangeBoard .exchange-board {
        --border-padding: 25px;
        top: 0;
        transform: translate(-50%, -20%);
        padding: 30px 50px;
        display: flex;
        flex-direction: column;
        gap: var(--border-padding);
        align-items: flex-start;
    }

    #exchangeBoard .exchange-board__head {
        padding-right: 0;
        border-right: none;
        padding-bottom: var(--border-padding);
        border-bottom: 1px solid #ddd;
        width: 100%;
    }

    #exchangeBoard .exchange-board__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    #exchangeBoard .exchange-board__item {
        gap: 12px;
    }

    #exchangeBoard .exchange-board__info {
        gap: 3px;
    }

    #exchangeBoard .exchange-board__label span {
        font-size: 13px;
    }

    #exchangeBoard .exchange-board__value {
        display: flex;
        align-items: center;
        gap: 8px;
        line-height: 1.2;
        flex-wrap: wrap;
    }

    /* 실시간 시세 */
    #marketSection .contents-wrap {
        flex-direction: column;
    }

    #marketSection .contents-wrap.tit-ctt {
        flex-direction: row;
    }

    #marketSection .market-block .tab-nav.line-custom {
        column-gap: 15px;
    }

    #marketSection .market-block .tab-nav.line-custom>div {
        font-size: 16px;
    }

    .market-block .block-title {
        margin-bottom: 22px;
    }  

    .retail-price-board__info {
        width: 220px;
        padding: 30px 25px;
    }

    .retail-price-board__title {
        font-size: 19px;
    }

    .retail-price-board__table thead th {
        font-size: 13px;
    }

    .retail-price-board__table tbody td strong {
        font-size: 15px;
    }

    #mainVideo .marquee span {
        font-size: 90px;
    }

    #mainPartner .benefit-card {
        gap: 20px;
    }

    #mainPartner .benefit-card .item {
        padding: 0 40px;
    }

    #mainPartner .benefit-card .icon {
        --icon-size: 32px;
    }

    #mainPartner .benefit-card .item__eyebrow {
        margin: 30px 0 15px;
        font-size: 14px;
    }

    #mainPartner .btn-wrap {
        margin-top: 55px;
    }
}

/* Mobile ( ~ 767px)*/
@media all and (max-width: 767px) {
    #mainVisual .content-wrap {
        flex-direction: column;
        padding-top: calc(var(--ticker-height) + var(--header-height));
        padding-bottom: 110px;
        top: 35px;
        row-gap: 30px;
    }

    #mainVisual .text * {
        text-align: center;
    }

    #mainVisual .text .title p {
        font-size: 28px;
    }

    #mainVisual .text .title p:first-child {
        font-size: 16px;
    }

    #mainVisual .text .desc {
        margin-top: 20px;
    }

    #mainVisual .contents {
        width: 100%;
    }

    #mainVisual .contents img {
        width: 85vw;
    }

    #liveSpotPrice {
        right: unset;
        top: 30px;
        left: 50%;
        transform: translateX(-50%);
    }

    #liveSpotPrice .price-board {
        padding: 30px;
    }

    #liveSpotPrice .price-board__header,
    #liveSpotPrice .price-board__row {
        grid-template-columns: 50px 1fr 1fr;
        column-gap: 15px;
    }

    #liveSpotPrice .price-board__header {
        padding-bottom: 15px;
    }

    #liveSpotPrice .price-board__row {
        padding: 15px 0px;
    }

    #liveSpotPrice .price-board__name {
        font-size: 13px;
    }

    #liveSpotPrice .price-board__cell {
        gap: 6px;
    }

    #liveSpotPrice .price-board__cell strong {
        font-size: 14px;
    }

    #liveSpotPrice .price-board__footer {
        padding-top: 15px;
    }

    /* 환율 */
    #exchangeBoard .exchange-board {
        --border-padding: 18px;
        left: 50%;
        top: -50px;
        transform: translateX(-50%);
        padding: 25px 30px 40px;
        display: flex;
        flex-direction: column;
        gap: var(--border-padding);
        align-items: flex-start;
    }

    #exchangeBoard .exchange-board__head {
        padding-right: 0;
        border-right: none;
        padding-bottom: var(--border-padding);
        border-bottom: 1px solid #ddd;
        width: 100%;
    }

    #exchangeBoard .exchange-board__list {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    #exchangeBoard .exchange-board__item {
        gap: 12px;
    }

    #exchangeBoard .exchange-board__info {
        gap: 3px;
    }

    #exchangeBoard .exchange-board__label span {
        font-size: 11px;
    }

    #exchangeBoard .exchange-board__value {
        gap: 6px;
    }

    /* 실시간 시세 */
    #marketSection .divider {
        margin-top: 10px;
    }

    #marketSection .market-title .tab-btn__chip {
        margin-top: 20px;
        margin-bottom: 0;
    }

    #marketSection .contents-wrap {
        flex-direction: column;
        row-gap: 60px;
    }

    #marketSection .contents-wrap.tit-ctt {
        row-gap: 25px;
    }

    #marketSection .market-block .tab-nav.line-custom {
        column-gap: 10px;
    }

    #marketSection .market-block .tab-nav.line-custom>div {
        font-size: 14px;
        padding: 0 12px 12px;
    }

    #marketSection .market-block .tab-nav.line-custom .more-btn {
        top: -6px;
    }

    .market-block .block-title h5 {
        font-size: 18px;
    }
   
    .retail-price-board {
        flex-direction: column;
    }

    .retail-price-board__info {
        width: 100%;
        padding: 24px 20px;
        border-right: 0;
        border-bottom: 1px solid #e5e5e5;
    }

    .retail-price-board__titles {
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .retail-price-board__title {
        font-size: 18px;
    }

    .retail-price-board__desc {
        margin-top: 8px;
    }

    .retail-price-board__more {
        margin-top: 14px;
    }

    .retail-price-board__table-wrap {
        padding: 0;
        -webkit-overflow-scrolling: touch;
    }

    .retail-price-board__table {
        min-width: 520px;
    }

    .retail-price-board__table thead th {
        font-size: 12px;
        padding: 12px 8px;
    }

    .retail-price-board__table tbody td {
        padding: 16px 8px;
    }

    .retail-price-board__table tbody td strong {
        font-size: 14px;
    }

    .retail-price-board__table tbody td .price-change {
        font-size: 10px;
    }

    .retail-price-board__table .row-label {
        font-size: 13px;
        padding-left: 14px;
    }

    .trade-tab button {
        height: 36px;
        font-size: 13px;
    }

    .mini-summary-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 20px;
        padding: 20px;
    }

    .mini-summary-board .item {
        gap: 3px;
        padding: 0;
        border-right: 0;
    }

    .mini-summary-board .item .label {
        font-size: 11px;
    }

    .mini-summary-board .item .value {
        font-size: 14px;
    }   

    #mainVideo .video-box {
        width: 80vw;
    }

    #mainVideo .bg-obj {
        display: none;
    }
   
    #mainVideo .marquee span {
        font-size: 30px;
        letter-spacing: 0;
    }

    #mainPartner .bg-obj {
        top: 0;
    }

    #mainPartner .benefit-card {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 12px;
    }

    #mainPartner .benefit-card .item {
        height: 100%;
        aspect-ratio: unset;
        padding: 35px 30px;
    }

    #mainPartner .benefit-card .icon {
        --icon-size: 28px;
    }

    #mainPartner .benefit-card .item__eyebrow {
        margin: 20px 0 8px;
        font-size: 12px;
        font-weight: 600;
    }

    #mainPartner .benefit-card .item__text br{
        display: none;
    }

    #mainPartner .btn-wrap {
        margin-top: 45px;
    }
}



@keyframes flashUp {
    from { background-color: rgba(220, 38, 38, 0.1); }
    to { background-color: transparent; }
}

@keyframes flashDown {
    from { background-color: rgba(37, 99, 235, 0.1); }
    to { background-color: transparent; }
}

.flash-up { animation: flashUp 0.6s ease; }
.flash-down { animation: flashDown 0.6s ease; }

.market-chart-wrap {
    position: relative;
    min-height: 300px;
    width: 100%;
}

.market-chart-wrap canvas {
    width: 100% !important;
    max-height: 300px;
}
