/* 환율 웹(/app/exchange) — 앱 '환율' 탭과 같은 토큰·같은 조판.
   색·여백·모서리 값은 앱 exchange_format.dart 의 상수를 그대로 옮긴 것이다.
   숫자를 여기서 임의로 고치면 같은 서비스가 앱과 웹에서 다른 얼굴이 된다. */

:root {
    --ex-bg:        #F2F2F7;   /* 페이지 배경 — 캘린더(--cv2-bg)와 같은 값 */
    --ex-surface:   #FFFFFF;   /* 카드 면 */
    --ex-component: #F0F0F5;   /* 칩·배너 면 */
    --ex-line:      #EAECF0;   /* 구분선 */
    --ex-title:     #16161F;   /* 제목 (ink-1) */
    --ex-ink2:      #56565F;   /* 본문 (ink-2) */
    --ex-ink3:      #9A9AA3;   /* 보조 (ink-3) */
    --ex-primary:   #4338CA;
    --ex-up:        #d63838;   /* 한국 관례: 상승 빨강 */
    --ex-down:      #3260c8;   /* 하락 파랑 */
    --ex-radius:    16px;
    --ex-pad:       16px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

.ex-body {
    background: var(--ex-bg);
    color: var(--ex-title);
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.2px;
}

a { color: inherit; text-decoration: none; }

/* ── 헤더 ───────────────────────────────────────────────── */
/* 캘린더 헤더(.cv2-header)와 같은 규격 — 고정 55px, 배경은 페이지와 같은 색,
   테두리도 그림자도 없다. 두 화면을 오갈 때 머리 부분이 그대로여야 같은 서비스로 읽힌다. */
.ex-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 55px;
    overflow: hidden;
    background: var(--ex-bg);
}

.ex-header-inner {
    max-width: 820px;
    margin: 0 auto;
    height: 55px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* 헤더 왼쪽 슬롯 — 화면이 채운다(캘린더 header-left 와 같은 자리).
   목록은 지금 값의 시각, 상세는 뒤로가기와 제목이 선다. */
.ex-header-left {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex-shrink: 1;
    padding-left: 4px;
}

.ex-header-back {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin-left: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--ex-title);
}
.ex-header-back svg { width: 20px; height: 20px; }
.ex-header-back:hover { background: rgba(0,0,0,0.05); }

.ex-header-flag { flex-shrink: 0; width: 26px; height: 17px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,0.07); }

.ex-header-title {
    margin: 0;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--ex-title);
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ex-header-sub { flex-shrink: 0; font-size: 12.5px; font-weight: 500; color: var(--ex-ink3); }

/* 좁은 화면에서는 부제를 뺀다 — 캘린더 상세 헤더처럼 제목 하나만 남겨야 오른쪽 메뉴에
   밀려 제목이 '오늘의 ...' 로 잘리지 않는다. 통화명·통화쌍은 바로 아래 본문이 다시 말한다. */
@media (max-width: 600px) {
    .ex-header-sub { display: none; }
    .ex-header-inner { gap: 4px; }
    .ex-nav { gap: 4px; }
}

.ex-brand { display: flex; align-items: baseline; gap: 7px; min-width: 0; padding-left: 4px; }
.ex-brand-mark  { font-size: 13px; font-weight: 700; color: var(--ex-primary); }
.ex-brand-title { font-size: 17px; font-weight: 800; color: var(--ex-title); letter-spacing: -0.4px; }/* ── 본문 골격 ──────────────────────────────────────────── */
.ex-main { padding-top: 55px; padding-bottom: 40px; }

/* 캘린더 .cv2-layout-wrapper 와 같은 값 — 이 셋이 맞아야 카드 왼쪽 끝이 캘린더와 같은 자리에 선다. */
.ex-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    max-width: 920px;
    margin: 0 auto;
}

.ex-container {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 600px;
    padding: 12px var(--ex-pad) 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ex-sidebar {
    flex: 0 0 200px;
    width: 200px;
    position: sticky;
    top: 70px;
    padding-top: 12px;
}

/*
 * 화면 위에 뜨는 레이어(의견 시트·댓글 레이어)가 본문 기둥을 기준으로 서게 하는 값.
 *
 * 레이어는 화면 전체를 덮으므로 그냥 가운데 정렬하면 **화면**의 한가운데에 선다. 그런데
 * 오른쪽에 사이드바(200)와 사이 여백(20)이 붙어 있어 본문 기둥의 한가운데는 화면
 * 한가운데보다 정확히 그 절반(110px)만큼 왼쪽이다 — 그래서 레이어만 오른쪽으로 쏠려
 * 보인다. 레이어 상자 오른쪽에 이 값을 물리면 가운데 정렬이 기둥을 기준으로 잡힌다.
 *
 * 값을 여기 두는 이유: 이 수는 사이드바가 있는 이 화면의 사정이다. 레이어 쪽(참여 모듈)은
 * 남의 화면에서도 쓰이므로 var() 의 기본값 0 으로 아무 일도 안 하게 두고, 사이드바를
 * 세우는 폭에서만 이 화면이 값을 건넨다.
 */
@media (min-width: 701px) {
    .ex-body { --eng-layer-side: 220px; }
}
/* 사이드바 안에서는 앱 카드가 세로로 선다 — 200px 안에 아이콘·글·QR 이 한 줄로 못 선다.
   치수는 캘린더 출석체크 카드를 따른다: 34px 아이콘 칩, 제목 13/700, 곁줄 11. */
/* 아이콘과 이름은 한 줄에 — 아이콘만 따로 한 층을 먹으면 카드가 세로로 길어지고
   무엇에 대한 카드인지가 두 줄에 걸쳐 읽힌다. 설명·버튼은 그 아래 폭을 다 쓴다. */
.ex-sidebar .ex-appcta {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    column-gap: 9px;
    row-gap: 0;
    padding: 14px;
}
.ex-sidebar .ex-appcta-ic { width: 34px; height: 34px; border-radius: 10px; }
/* 제목과 설명을 각자 격자 칸에 앉히려면 감싼 상자가 자리를 비켜 줘야 한다. */
.ex-sidebar .ex-appcta-text { display: contents; }
.ex-sidebar .ex-appcta-text b { grid-column: 2; }
.ex-sidebar .ex-appcta-text span { grid-column: 1 / -1; margin-top: 9px; }
.ex-sidebar .ex-appcta-text b { font-size: 13px; }
.ex-sidebar .ex-appcta-text span { font-size: 11px; line-height: 1.5; color: var(--ex-ink3); -webkit-line-clamp: 3; }

.ex-sidebar .ex-appcta-btn { grid-column: 1 / -1; margin: 12px 0 0; width: 100%; justify-content: center; }

/* QR 은 흰 판 위에 올린다 — 카드 면과 같은 흰색에 그냥 두면 코드가 허공에 뜬 것처럼 보인다. */
.ex-sidebar .ex-appcta-qr {
    grid-column: 1 / -1;
    margin: 12px 0 0;
    align-self: stretch;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: #F7F7FB;
}
.ex-sidebar .ex-appcta-qr img {
    width: 100%;
    height: auto;
    max-width: 132px;
    padding: 6px;
    border-radius: 8px;
    background: #fff;
}
.ex-sidebar .ex-appcta-qr span { font-size: 11px; color: var(--ex-ink3); }

/* ── 카드 ───────────────────────────────────────────────── */
.ex-card {
    position: relative;
    background: var(--ex-surface);
    border-radius: var(--ex-radius);
    padding: var(--ex-pad);
    /* 배경과 카드의 명도차가 5/255뿐이라 면 색만으로는 경계가 안 선다 — 그림자로 띄운다(앱과 같은 값). */
    box-shadow: 0 0 2px rgba(0,0,0,0.02), 0 1px 4px rgba(0,0,0,0.03);
}

.ex-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.ex-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--ex-title);
    letter-spacing: -0.4px;
}.ex-page-count {
    background: var(--ex-component);
    border-radius: 12px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 700;
    color: var(--ex-title);
}
.ex-page-count span { color: var(--ex-ink3); font-weight: 600; }

/* ── 오늘의 환율 ────────────────────────────────────────── */
.ex-today-viewport { overflow: hidden; }

.ex-today-track {
    display: flex;
    transition: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.ex-today-slide {
    position: relative;
    flex: 0 0 100%;
    min-width: 100%;
    padding-right: 2px;
}

/* 태그는 제목 바로 뒤에 붙는다 — 앱 ExchangeSectionCard 의 titleTag 자리다.
   카드 머리의 기본 정렬(양 끝)로 두면 오른쪽 끝까지 밀려 제목과 떨어진다. */
.ex-today > .ex-card-head { justify-content: flex-start; gap: 7px; }
.ex-today-tags { display: flex; align-items: center; }
.ex-today-tagset { display: none; gap: 5px; }
.ex-today-tagset.is-active { display: flex; }

/* 각주 줄 — 카드 안, 본문 아래. 왼쪽 반응 수, 오른쪽 페이지 수. */
.ex-today-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.ex-today-stats { display: none; }
.ex-today-stats.is-active { display: flex; }
/* 반응이 하나도 없으면 왼쪽이 비어 페이지 수가 왼쪽으로 붙는다 — 늘 오른쪽 끝에 세운다. */
.ex-today-foot .ex-page-count { margin-left: auto; }

.ex-tag {
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    color: var(--ex-ink2);
    background: rgba(86, 86, 95, 0.08);
    white-space: nowrap;
}
.ex-tag.is-up   { color: var(--ex-up);   background: rgba(214, 56, 56, 0.08); }
.ex-tag.is-down { color: var(--ex-down); background: rgba(50, 96, 200, 0.08); }

/* 국기는 카드 오른쪽에 떠 있고 그 아래 타원 그림자가 뜬 느낌을 만든다. */
.ex-today-art { position: absolute; top: 0; right: 0; width: 60px; }
/* 흰 바탕 국기(일본·스위스 등)는 흰 카드 위에서 형체가 사라진다 — 색을 건드리지 않고
   실선 하나로 윤곽만 세운다. */
.ex-today-flag {
    display: block;
    width: 60px;
    height: 40px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.07);
}
.ex-today-shadow {
    display: block;
    width: 36px;
    height: 10px;
    margin: 7px auto 0;
    border-radius: 50%;
    background: rgba(67, 56, 202, 0.18);
    filter: blur(1.2px);
}

.ex-today-headline {
    /* 링크 안에 놓이면서 인라인이 됐다 — 블록이어야 오른쪽 여백(국기 자리)과
       최소 높이가 먹는다. 인라인일 때는 카드가 글 높이로 줄어 국기가 잘렸다. */
    display: block;
    margin: 0;
    padding-right: 80px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: -0.27px;
    color: var(--ex-title);
}.ex-pct.is-up   { color: var(--ex-up); }
.ex-pct.is-down { color: var(--ex-down); }
.ex-pct.is-flat { color: var(--ex-ink3); }

.ex-today-nav { position: absolute; inset: 0; pointer-events: none; }
.ex-today-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 1px solid var(--ex-line);
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    color: var(--ex-ink2);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 160ms ease;
}
.ex-today:hover .ex-today-arrow { opacity: 1; }
#ex-today-prev { left: -6px; }
#ex-today-next { right: -6px; }
.ex-today-arrow[disabled] { opacity: 0 !important; cursor: default; }

/* ── 주요 국가 환율 목록 ────────────────────────────────── */
.ex-row-list { display: flex; flex-direction: column; }

.ex-row {
    display: grid;
    /* 남는 폭은 추이선 칸이 받고, 선 자체는 그 안에서 폭을 못 박은 채 가운데 선다
       (아래 .ex-row-spark). 남는 폭을 통화명에 주면 선이 시세 쪽으로 붙어 버리고,
       선에 다 주면 넓은 화면에서 화면 절반을 가로지른다. */
    grid-template-columns: 34px minmax(64px, 84px) 1fr 92px;
    align-items: center;
    column-gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--ex-line);
}
.ex-row:last-child { border-bottom: 0; }

.ex-row-flag {
    width: 34px;
    height: 23px;
    overflow: hidden;
    background: #EEF2FF;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ex-row-flag img { width: 34px; height: 23px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,0.06); }

/* 국기를 못 받은 자리 — 회색 칸으로 두면 덜 불러온 국기처럼 보이므로 코드를 세운다. */
.ex-row-flag.is-fallback::after {
    content: attr(data-code);
    font-size: 10px;
    font-weight: 800;
    color: var(--ex-primary);
}

/* 지수 줄은 나라가 없다 — 국기 대신 인디고 칩. */
.ex-row-flag.is-symbol {
    background: linear-gradient(135deg, #4338CA, #6D5FE0);
    border-radius: 3px;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.2px;
}

.ex-row-name { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ex-row-name-main {
    font-size: 15px;
    font-weight: 700;
    color: var(--ex-title);
    letter-spacing: -0.2px;
    white-space: nowrap;
    /* 넘치면 말줄임이 아니라 글자를 줄인다(fit-text.js) — 잘라 내면 무슨 통화인지
       자체를 못 읽는다. overflow 는 글자를 줄여도 남는 경우의 마지막 안전장치다. */
    overflow: hidden;
}
.ex-row-name-sub { font-size: 12px; font-weight: 500; color: var(--ex-ink3); }

.ex-row-spark {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    /* 선이 남는 폭 한가운데 서게 — 폭은 못 박고 좌우 여백을 자동으로 나눈다. */
    max-width: 180px;
    margin: 0 auto;
    min-height: 55px;
}
.ex-spark { display: block; width: 100%; height: 40px; }

.ex-spark-axis {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-top: 2px;
    font-size: 9px;
    font-weight: 500;
    color: var(--ex-ink3);
    white-space: nowrap;
    min-height: 13px;
    line-height: 13px;
}

.ex-row-value { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ex-row-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--ex-title);
    letter-spacing: -0.4px;
    /* 값이 바뀌면 잠깐 배경이 깜빡인다 — 옆 추이선이 자라는 것과 같은 순간. */
    padding: 1px 5px;
    border-radius: 4px;
    transition: background-color 900ms ease;
}
.ex-row-price.is-flash-up   { background: rgba(214, 56, 56, 0.12); }
.ex-row-price.is-flash-down { background: rgba(50, 96, 200, 0.12); }

.ex-row-pct { font-size: 12px; font-weight: 700; padding-right: 5px; }
.ex-row-pct.is-up   { color: var(--ex-up); }
.ex-row-pct.is-down { color: var(--ex-down); }
.ex-row-pct.is-flat { color: var(--ex-ink2); }

.ex-rates-note { margin: 12px 0 0; font-size: 11px; color: var(--ex-ink3); }

/* ── 푸터 ───────────────────────────────────────────────────
   캘린더(.cv2-footer)와 같은 치수: 약관 12/1.6, 링크 줄 위 실선, 카피 왼쪽 여백 8. */
.ex-footer {
    max-width: 920px;
    margin: 0 auto;
    padding: 10px 16px 44px;
}
/* 사이드바가 선 화면에서는 푸터도 메인 칼럼 폭 안에 선다. */
@media (min-width: 701px) {
    .ex-footer { max-width: 820px; padding-right: 236px; }
}

.ex-disclaimer-box { padding: 12px 0; }
.ex-disclaimer-text {
    margin: 4px 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--ex-ink3);
}

.ex-footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 4px;
    border-top: 1px solid rgba(0,0,0,0.08);
}
.ex-footer-link { font-size: 12px; color: var(--ex-ink3); transition: color 0.15s; }
.ex-footer-link:hover { color: var(--ex-primary); }
.ex-footer-sep { font-size: 12px; color: rgba(0,0,0,0.08); }
.ex-footer-copy { margin: 0 0 0 8px; font-size: 12px; color: #6B6B75; }

/* ── 좁은 화면 ──────────────────────────────────────────── */
@media (max-width: 700px) {
    .ex-sidebar { display: none; }
    .ex-layout { display: block; }
    .ex-container { max-width: 600px; margin: 0 auto; }
}

@media (max-width: 400px) {
    .ex-row {
        grid-template-columns: 30px minmax(58px, 72px) 1fr 82px;
        column-gap: 8px;
    }
    .ex-row-spark { max-width: 124px; }
    .ex-row-flag, .ex-row-flag img { width: 30px; height: 20px; }
    .ex-row-name-main { font-size: 14px; }
    .ex-row-price { font-size: 15px; }
    .ex-today-headline { font-size: 17px; }
}

/* ── 헤더 아이콘 nav ────────────────────────────────────────
   캘린더 헤더(cv2-header-nav)와 같은 크기·같은 리듬. 도안이 같은데 칸만 다르면
   두 화면을 오갈 때 같은 메뉴가 다른 것으로 읽힌다. */
.ex-nav { flex-shrink: 0; display: flex; align-items: center; gap: 6px; }

.ex-nav-item {
    position: relative;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    background: transparent;
    color: #9A9AA3;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.ex-nav-item svg { width: 28px; height: 28px; }
.ex-nav-item .ex-ico-solid { display: none; }
.ex-nav-item:hover { background: #E9E9EF; }
.ex-nav-item:active:not(.active) { background: #DCDCE3; }

/* 지금 보고 있는 화면 — 선 아이콘 대신 채운 아이콘으로 바뀐다. */
.ex-nav-item.active { background: #EEF2FF; border-color: #8682e8; color: #4338CA; }
.ex-nav-item.active .ex-ico-line { display: none; }
.ex-nav-item.active .ex-ico-solid { display: block; }

.ex-nav-profile {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow: hidden;
    background: transparent;
    color: var(--ex-ink2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ex-nav-profile img { width: 100%; height: 100%; object-fit: cover; }
.ex-nav-profile svg { width: 18px; height: 18px; }

.ex-nav-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 36px;
    padding: 4px 4px 4px 8px;
    border-radius: 14px;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--ex-primary);
    white-space: nowrap;
}
.ex-nav-login svg { width: 18px; height: 18px; }

/* ── 목표가 알림 배너 ──────────────────────────────────────
   카드 자리를 통째로 대신하므로 굵은 줄이 이 섹션의 제목 노릇을 한다(앱과 같은 15px). */
.ex-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    padding: 10px 14px;
    border: 0;
    border-radius: var(--ex-radius);
    background: var(--ex-surface);
    box-shadow: 0 0 2px rgba(0,0,0,0.02), 0 1px 4px rgba(0,0,0,0.03);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.ex-banner:hover { background: #FCFCFF; }

/* 색이 든 그림 한 장 — 옅은 원에 단색 마크를 얹으면 배너가 회색 줄처럼 지나간다.
   그림 자체가 색을 갖는 배너(목표가 알림)는 받침 없이 그대로 세운다. */
.ex-banner-art {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ex-banner-art svg { width: 40px; height: 40px; }

/* 단색 아이콘을 쓰는 줄(다른 화면으로 넘기는 링크)만 옅은 받침을 깐다. */
.ex-banner--link .ex-banner-art {
    border-radius: 12px;
    background: #EEF2FF;
    color: var(--ex-primary);
}
.ex-banner--link .ex-banner-art svg { width: 21px; height: 21px; }

.ex-banner-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ex-banner-text b { font-size: 15px; font-weight: 700; color: var(--ex-title); letter-spacing: -0.3px; }
.ex-banner-text span {
    font-size: 12px;
    font-weight: 500;
    color: var(--ex-ink2);
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ex-banner-go { flex: 0 0 18px; color: var(--ex-primary); }
.ex-banner-go svg { width: 18px; height: 18px; display: block; }

/* ── 앱 설치 유도 배너 ──────────────────────────────────────
   한 줄로 읽히게: 아이콘 → 이름·한 줄 → (오른쪽 끝) 할 일.
   할 일은 늘 오른쪽 끝에 선다 — 버튼이든 QR 이든 눈이 같은 자리에서 찾는다. */
.ex-appcta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.ex-appcta-ic { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; }

.ex-appcta-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ex-appcta-text b { font-size: 14px; font-weight: 700; color: var(--ex-title); letter-spacing: -0.3px; }
.ex-appcta-text span {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--ex-ink2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ex-appcta-btn {
    flex: 0 0 auto;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 9px 12px 9px 14px;
    border: 0;
    border-radius: 10px;
    background: var(--ex-primary);
    color: #fff;
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}
.ex-appcta-btn svg { width: 14px; height: 14px; }
.ex-appcta-btn:hover { background: #3A30AE; }

.ex-appcta-qr {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.ex-appcta-qr img { width: 72px; height: 72px; border-radius: 8px; background: #fff; }
.ex-appcta-qr span { font-size: 10.5px; font-weight: 600; color: var(--ex-ink3); }

/* 통화 행이 상세로 가는 문이 되면서 — 누를 수 있다는 것만 옅게 알린다. */
a.ex-row { cursor: pointer; }
a.ex-row:hover { background: #FCFCFD; }

/* ── 통화 상세 ─────────────────────────────────────────────── */

/* 시세 줄 — 상세에서 가장 큰 숫자. 10초마다 굴러간다. */
.ex-quote { display: flex; flex-direction: column; gap: 4px; }

.ex-quote-price { display: flex; align-items: baseline; gap: 5px; }
.ex-quote-price span { font-size: 30px; font-weight: 800; color: var(--ex-title); letter-spacing: -1px; }
.ex-quote-price em { font-size: 13px; font-style: normal; font-weight: 600; color: var(--ex-ink3); }

.ex-quote-delta { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.ex-quote-delta.is-up   { color: var(--ex-up); }
.ex-quote-delta.is-down { color: var(--ex-down); }
.ex-quote-delta.is-flat { color: var(--ex-ink2); }

.ex-quote-sub { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 11.5px; color: var(--ex-ink3); }
.ex-quote-sub b { font-weight: 600; color: var(--ex-ink2); }

/* 기간 탭 — 눌린 트랙 위에 흰 칸이 서서 '지금 여기'를 말한다(앱과 같은 표현). */
.ex-tabs {
    display: flex;
    gap: 2px;
    margin: 14px 0 10px;
    padding: 4px;
    border-radius: 12px;
    background: var(--ex-component);
}
.ex-tab {
    flex: 1 1 0;
    padding: 8px 0;
    border: 0;
    border-radius: 9px;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--ex-ink2);
    cursor: pointer;
}
.ex-tab.is-active {
    background: var(--ex-surface);
    font-weight: 700;
    color: var(--ex-title);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.ex-chart-wrap { position: relative; }
#ex-chart { display: block; width: 100%; height: 260px; touch-action: pan-y; }

.ex-chart-tip {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(22,22,31,0.88);
    color: #fff;
    pointer-events: none;
    white-space: nowrap;
}
.ex-chart-tip b { font-size: 12.5px; font-weight: 700; }
.ex-chart-tip span { font-size: 10.5px; opacity: 0.75; }

.ex-chart-msg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    color: var(--ex-ink3);
    background: rgba(255,255,255,0.7);
}

/* 상세의 오늘의 환율은 넘길 것이 없다 — 한 장을 그대로 편다. */
.ex-today--detail .ex-today-headline { padding-right: 0; min-height: 0; }
.ex-today--detail .ex-today-tags { margin-bottom: 8px; }

/* 관련 지표 히트맵 — 블록 크기는 영향력, 색은 오늘 등락(앱 exchange_indicator_heatmap).
   판을 따로 깔지 않고 카드 배경이 1px 틈으로 비쳐 격자선이 된다. 모서리는 죽인다 —
   조금이라도 둥글리면 조각들이 떨어져 '지도'가 아니라 '버튼 묶음'이 된다. */
.ex-ind-grid { display: flex; flex-direction: column; gap: 1px; }
.ex-hm-row { display: flex; gap: 1px; min-height: 0; }
.ex-hm-cell { min-width: 0; }

.ex-hm-block {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 9px 10px;
    overflow: hidden;
    color: #fff;
}
.ex-hm-block.is-compact { padding: 6px 8px; }

.ex-hm-label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.3px;
    color: rgba(255,255,255,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ex-hm-block.is-compact .ex-hm-label { -webkit-line-clamp: 1; }
/* 등락률을 모르는 지표는 색도 안 칠하므로 라벨도 한 단 물린다. */
.ex-hm-block.is-nodata .ex-hm-label { color: rgba(255,255,255,0.55); }

.ex-hm-foot { display: flex; flex-direction: column; min-width: 0; }
.ex-hm-foot b {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ex-hm-foot i { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: -0.2px; color: rgba(255,255,255,0.85); }

/* 관련 이슈·영상 — 밖으로 나가는 링크라 썸네일이 앞장선다. */
.ex-feed-list { display: flex; flex-direction: column; }

.ex-feed-tabs { margin: 0 0 12px; }

.ex-feed-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--ex-line);
}
/* 이슈(뉴스)는 썸네일이 없다 — 자리를 비우지 않고 제목이 전체 폭을 쓴다(앱과 같은 규칙). */
.ex-feed-item.is-news .ex-feed-text { width: 100%; }

.ex-feed-flash {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 6px;
    border-radius: 5px;
    background: #FEE2E2;
    font-size: 10.5px;
    font-style: normal;
    font-weight: 800;
    color: #E5484D;
    vertical-align: 1px;
}
.ex-feed-item:last-child { border-bottom: 0; }
.ex-feed-item:hover .ex-feed-text b { color: var(--ex-primary); }

.ex-feed-thumb {
    position: relative;
    flex: 0 0 96px;
    width: 96px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--ex-component);
}
.ex-feed-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* 영상은 재생 삼각형을 얹어 글과 구분한다. */
.ex-feed-thumb.is-video::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 7px 0 7px 12px;
    border-color: transparent transparent transparent rgba(255,255,255,0.95);
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.45));
}

.ex-feed-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ex-feed-text b {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ex-title);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ex-feed-text span { font-size: 11.5px; color: var(--ex-ink3); }

@media (max-width: 400px) {
    
    .ex-quote-price span { font-size: 26px; }
    #ex-chart { height: 220px; }
    .ex-appcta { gap: 10px; padding: 12px 14px; }
    .ex-appcta-btn { padding: 8px 10px 8px 12px; font-size: 12px; }
}

/* display 를 가진 요소는 hidden 속성만으로 안 사라진다 — 자바스크립트가 hidden 으로
   여닫는 것들(차트 안내·툴팁·기기별 안내)에 그 규칙을 명시한다. */
.ex-chart-msg[hidden],
.ex-chart-tip[hidden],
.ex-appcta-qr[hidden],
.ex-appcta-btn[hidden] { display: none !important; }

/* ── 오늘의 환율 상세 ───────────────────────────────────────
   글이 주인공인 화면이라 카드 안쪽이 목록보다 넓고 줄 간격도 길다. */

/* 날짜 줄 — 카드 밖에 선다. 이 줄이 바꾸는 것은 아래 카드 전부라서. */
.ex-daynav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0 8px;
}
/* 양옆을 같은 폭으로 잡아야 라벨 길이('어제' vs '08.20')만큼 가운데가 밀리지 않는다. */
.ex-daynav-side { flex: 1 1 0; display: flex; min-width: 0; }
.ex-daynav-side.is-prev { justify-content: flex-start; }
.ex-daynav-side.is-next { justify-content: flex-end; }

.ex-daynav-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 7px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ex-ink2);
    white-space: nowrap;
}
.ex-daynav-link svg { width: 14px; height: 14px; }
.ex-daynav-link:hover { background: rgba(0,0,0,0.05); color: var(--ex-title); }

.ex-daynav-date {
    flex: 0 1 auto;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--ex-title);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ex-verdict { padding: 18px 16px; }
.ex-verdict-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }.ex-verdict-tags { display: flex; gap: 5px; }

.ex-verdict-headline {
    margin: 16px 0 0;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: -0.5px;
    color: var(--ex-title);
}

/* 지금 값 — 이 화면에서 가장 큰 숫자다(앱 _Verdict 와 같은 30/15).
   등락률은 그 옆에 작게 붙어, 큰 숫자를 읽고 나서 방향이 따라 읽힌다. */
.ex-verdict-quote { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 0; }
.ex-verdict-price {
    font-size: 30px;
    font-weight: 800;
    color: var(--ex-title);
    letter-spacing: -1.2px;
    line-height: 1.2;
}
.ex-verdict-quote .ex-pct { font-size: 15px; font-weight: 800; letter-spacing: -0.4px; }

.ex-verdict-body { margin-top: 14px; }
.ex-verdict-body p { margin: 0; font-size: 14.5px; line-height: 1.85; color: var(--ex-ink2); }

/* 형광펜은 서버가 그은 구절에만 — 숫자마다 칠하면 결론이 묻힌다. */
.ex-hl { font-weight: 700; color: var(--ex-title); background: linear-gradient(transparent 62%, #E7E3FF 62%); }/* 카드 안에서 성격이 다른 묶음을 가르는 작은 머리말(앱 _GroupLabel). */
.ex-group-label { margin: 0 0 10px; font-size: 12.5px; font-weight: 800; color: var(--ex-ink3); letter-spacing: -0.25px; }
.ex-rule { height: 1px; margin: 16px 0; background: var(--ex-line); }

/* 원인 한 줄 — 무슨 일이 있었나(왼쪽)와 그래서 어떻게 됐나(오른쪽)를 한 줄에 나란히.
   방향은 왼쪽 색 막대와 오른쪽 글자 색이 함께 말한다. */
.ex-causes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ex-cause { display: flex; align-items: baseline; gap: 9px; }
.ex-cause-bar { flex: 0 0 3px; width: 3px; height: 14px; border-radius: 2px; background: var(--ex-line); align-self: center; }
.ex-cause.is-up .ex-cause-bar   { background: var(--ex-up); }
.ex-cause.is-down .ex-cause-bar { background: var(--ex-down); }
.ex-cause-text { flex: 1 1 auto; font-size: 13.5px; font-weight: 700; line-height: 1.35; color: var(--ex-title); letter-spacing: -0.3px; }
.ex-cause-effect { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; letter-spacing: -0.25px; color: var(--ex-ink3); }
.ex-cause.is-up .ex-cause-effect   { color: var(--ex-up); }
.ex-cause.is-down .ex-cause-effect { color: var(--ex-down); }

/* 지표 한 줄 — 이름 · 값 · 등락률. 값과 등락률은 폭을 고정해 오른쪽으로 민다:
   자릿수가 제각각인 숫자를 흐르는 대로 두면 세로로 쌓았을 때 끝이 들쭉날쭉해진다. */
.ex-inds { display: flex; flex-direction: column; gap: 12px; }
.ex-ind-row { display: flex; align-items: baseline; gap: 8px; }
.ex-ind-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ex-ink2);
    letter-spacing: -0.3px;
}
.ex-ind-row.is-lead .ex-ind-name { font-weight: 700; color: var(--ex-title); }
.ex-ind-name em { margin-left: 6px; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ex-primary); letter-spacing: -0.2px; }
.ex-ind-val { flex: 0 0 78px; text-align: right; font-size: 13.5px; font-weight: 700; color: var(--ex-title); letter-spacing: -0.3px; }
.ex-ind-pct { flex: 0 0 60px; text-align: right; font-size: 13px; font-weight: 800; letter-spacing: -0.3px; }
.ex-ind-pct.is-up { color: var(--ex-up); }
.ex-ind-pct.is-down { color: var(--ex-down); }
.ex-ind-pct.is-flat { color: var(--ex-ink2); }

/* 카드 아래 한 줄 해석 — 서버가 오늘 값을 보고 쓴 것만 진하게. */
.ex-reading { margin: 14px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--ex-ink2); letter-spacing: -0.25px; }
.ex-reading.is-strong { color: var(--ex-title); font-weight: 600; }

/* 구간 안 자리 — 숫자가 주인공, 시각 요소는 실선과 점 하나. */
.ex-pos-ratio { margin: 4px 0 2px; font-size: 32px; font-weight: 800; color: var(--ex-title); letter-spacing: -1.4px; }
.ex-pos-scale { margin: 0 0 16px; font-size: 12px; font-weight: 600; color: var(--ex-ink3); letter-spacing: -0.25px; }

.ex-pos-now { position: relative; height: 18px; }
/* 양 끝에서도 값이 선 밖으로 나가지 않는다 — 0 이면 왼쪽 끝, 1 이면 오른쪽 끝에 붙고
   그 사이에서만 제 폭만큼 접힌다(앱 Align 과 같은 규칙). */
.ex-pos-now span {
    position: absolute;
    left: calc(var(--t, 0) * 100%);
    transform: translateX(calc(var(--t, 0) * -100%));
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: -0.3px;
    transition: left 240ms ease, transform 240ms ease;
    white-space: nowrap;
}

.ex-pos-track { position: relative; height: 10px; }
.ex-pos-track::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 2px;
    margin-top: -1px;
    border-radius: 1px;
    background: var(--ex-line);
}
.ex-pos-knob {
    position: absolute;
    top: 0;
    left: calc(var(--t, 0) * 100%);
    transform: translateX(calc(var(--t, 0) * -100%));
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ex-title);
    transition: left 240ms ease, transform 240ms ease;
}
.ex-pos-knob.is-up { background: var(--ex-up); }
.ex-pos-knob.is-down { background: var(--ex-down); }

.ex-pos-ends { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--ex-ink3); }

/* 어떤 속도로 — 기간 하나에 이름·등락률 한 줄, 그 아래 채운 만큼만 그린 띠. */
.ex-pace-line { display: block; width: 100%; height: 56px; margin-bottom: 18px; }
.ex-paces { display: flex; flex-direction: column; gap: 14px; }
.ex-pace-head { display: flex; align-items: baseline; justify-content: space-between; }
.ex-pace-head span { font-size: 12.5px; font-weight: 600; color: var(--ex-ink2); letter-spacing: -0.3px; }
.ex-pace-head b { font-size: 13.5px; font-weight: 800; letter-spacing: -0.3px; }
.ex-pace-bar { display: block; height: 5px; margin-top: 7px; border-radius: 2.5px; background: var(--ex-ink3); }
.ex-pace-bar.is-up { background: var(--ex-up); }
.ex-pace-bar.is-down { background: var(--ex-down); }

/* 다른 화면으로 넘기는 줄 — 목표가 알림 배너와 같은 몸이되 글이 두 줄까지 온다. */
.ex-banner--link .ex-banner-text b {
    font-size: 14px;
    line-height: 1.45;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 메인 오늘의 환율 카드가 상세로 가는 문이 되면서 — 링크지만 글은 그대로 읽힌다. */
a.ex-today-slide { color: inherit; display: block; }
/* 국기 + 그림자 묶음(40 + 7 + 10)이 차지하는 세로 — 머리글이 한 줄인 통화에서도
   카드가 이 아래로는 줄지 않는다. 줄면 그림자가 카드 밖으로 나가 잘린다(앱과 같은 값). */
.ex-today-slide { min-height: 57px; }

/* 제목 줄 오른쪽 '전체보기' — 앱 ExchangeMoreLink 와 같은 자리·같은 꼴. */
.ex-more {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ex-ink3);
    white-space: nowrap;
}
.ex-more svg { width: 13px; height: 13px; }
.ex-more:hover { color: var(--ex-primary); }

/* 본문 안 앱 카드 — 사이드바가 선 화면에서는 접는다(같은 권유가 둘이 되지 않게). */
@media (min-width: 701px) {
    .ex-cta-inline { display: none; }
}

/* 태그 줄 오른쪽 끝 조회수 — 카드 제목 높이에서 같이 읽힌다(앱과 같은 자리). */
.ex-verdict-tagrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ex-view-count { font-size: 11.5px; font-weight: 500; color: var(--ex-ink3); white-space: nowrap; }

/* ── 전체 환율 검색 ─────────────────────────────────────────
   29종을 다 세우는 화면이라 목록보다 검색이 먼저 선다. */
.ex-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 44px;
    border-radius: 12px;
    background: var(--ex-surface);
    box-shadow: 0 0 2px rgba(0,0,0,0.02), 0 1px 4px rgba(0,0,0,0.03);
}
.ex-search svg { width: 18px; height: 18px; color: var(--ex-ink3); flex-shrink: 0; }
.ex-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: none;
    font: inherit;
    font-size: 14px;
    color: var(--ex-title);
}
.ex-search input::placeholder { color: var(--ex-ink3); }
.ex-search input::-webkit-search-cancel-button { display: none; }
.ex-search button {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--ex-component);
    color: var(--ex-ink2);
    cursor: pointer;
}
.ex-search button svg { width: 12px; height: 12px; }

.ex-empty { margin: 24px 0; text-align: center; font-size: 13px; color: var(--ex-ink3); }

/* ── 스켈레톤 ───────────────────────────────────────────────
   반짝임은 앱과 같은 두 색을 쓴다(면 #EAECF0 → 밝은 자리 #FAFAF8, 1.3초 한 바퀴).
   모양은 실제 요소와 같은 칸·같은 높이여야 값이 들어올 때 화면이 튀지 않는다. */
.ex-sk {
    display: block;
    background: linear-gradient(90deg, #EAECF0 25%, #FAFAF8 50%, #EAECF0 75%);
    background-size: 200% 100%;
    animation: ex-shimmer 1.3s linear infinite;
    border-radius: 4px;
}
@keyframes ex-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.ex-sk-bar { width: 100%; }

/* 차트 자리 — 캔들은 전부 같은 높이(방향을 말하지 않는다). */
/* 차트 자리 위에 겹쳐 덮는다 — 아래에 쌓으면 값이 와도 스켈레톤이 한 칸 더 남는다. */
.ex-sk-chart {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 0;
    background: var(--ex-surface);
}
.ex-sk-candles {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    animation: ex-shimmer-fade 1.3s ease-in-out infinite;
}
.ex-sk-candles span {
    flex: 1 1 auto;
    position: relative;
    height: 34%;
    background: #EAECF0;
    border-radius: 1.5px;
}
/* 몸통 위아래로 뻗는 꼬리 — 실제 캔들과 같은 6px. */
.ex-sk-candles span::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -6px;
    bottom: -6px;
    width: 1.2px;
    margin-left: -0.6px;
    background: #EAECF0;
}
@keyframes ex-shimmer-fade {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}

.ex-sk-axis { display: flex; justify-content: space-between; margin-top: 10px; }
.ex-sk-axis i {
    display: block;
    width: 36px;
    height: 10px;
    border-radius: 3px;
    background: linear-gradient(90deg, #EAECF0 25%, #FAFAF8 50%, #EAECF0 75%);
    background-size: 200% 100%;
    animation: ex-shimmer 1.3s linear infinite;
}

/* 목록 한 줄의 추이선 자리 — 선이 그려지면 JS 가 걷어 낸다. */
.ex-row-spark.is-loading .ex-spark { visibility: hidden; }
.ex-row-spark.is-loading::after {
    content: '';
    display: block;
    height: 26px;
    margin-top: -33px;
    border-radius: 4px;
    background: linear-gradient(90deg, #EAECF0 25%, #FAFAF8 50%, #EAECF0 75%);
    background-size: 200% 100%;
    animation: ex-shimmer 1.3s linear infinite;
}

/* 시세를 아직 못 받은 칸 — '-' 대신 자리만 잡는다. */
.ex-sk-price { width: 68px; height: 16px; margin-left: auto; }
.ex-sk-pct { width: 42px; height: 12px; margin: 4px 0 0 auto; }

/* display 를 가진 요소는 hidden 속성만으로 안 사라진다 — .ex-row 등 grid/flex 요소 포함 */
[hidden],
.ex-row[hidden],
.ex-sk-chart[hidden],
[data-role="ind-skeleton"][hidden],
[data-role="feed-skeleton"][hidden] { display: none !important; }


/* ── 달러인덱스 상세 ────────────────────────────────────────── */
.ex-header-mark {
    flex-shrink: 0;
    padding: 3px 6px;
    border-radius: 5px;
    background: linear-gradient(135deg, #4338CA, #6D5FE0);
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.2px;
}

/* 카드 안 설명 문단 — 글이 주인공인 자리의 기본 글줄. */
.ex-body-text { margin: 0 0 14px; font-size: 13.5px; line-height: 1.75; color: var(--ex-ink2); letter-spacing: -0.25px; }

/* 구성 통화 비중 — 100% 가 아니라 가장 큰 비중에 맞춰 채운다(그래야 뒤 네 통화가 구분된다). */
.ex-weights { display: flex; flex-direction: column; gap: 9px; }
.ex-weight { display: grid; grid-template-columns: 84px 1fr 44px; align-items: center; gap: 10px; }
.ex-weight-name { font-size: 12.5px; font-weight: 600; color: var(--ex-ink2); white-space: nowrap; }
.ex-weight-bar { display: block; height: 8px; border-radius: 4px; background: var(--ex-component); overflow: hidden; }
.ex-weight-bar b { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #4338CA, #6D5FE0); }
.ex-weight-value { font-size: 12.5px; font-weight: 700; color: var(--ex-title); text-align: right; font-variant-numeric: tabular-nums; }/* 연결고리 — 점 하나와 그 사이를 잇는 선(앱 ExchangeChainSteps).
   '유가↑ → 원화 약세' 한 줄로는 왜 그런지가 빠져 외우는 수밖에 없다. 가운데 고리를
   보여줘야 납득이 된다. 마지막 칸이 결론이라 그 칸만 액센트로 선다. */
.ex-chain { list-style: none; margin: 14px 0 0; padding: 0; }
.ex-chain li {
    position: relative;
    padding: 0 0 14px 22px;
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--ex-ink2);
    letter-spacing: -0.3px;
}
.ex-chain li:last-child { padding-bottom: 0; font-weight: 700; color: var(--ex-primary); }
/* 점 — 글줄 가운데에 맞춘다. */
.ex-chain li::before {
    content: '';
    position: absolute;
    left: 4.5px;
    top: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ex-ink3);
}
.ex-chain li:last-child::before { background: var(--ex-primary); }
/* 점과 점을 잇는 선 — 마지막 칸에는 이어 갈 곳이 없다. */
.ex-chain li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 7.5px;
    top: 13px;
    bottom: 0;
    width: 1px;
    background: var(--ex-line);
}

/* 영상 줄 — 눌린 줄 아래가 펴지면서 그 자리에서 튼다(앱과 같은 규칙). */
.ex-feed-row { border-bottom: 1px solid var(--ex-line); }
.ex-feed-row:last-child { border-bottom: 0; }
.ex-feed-row .ex-feed-item { border-bottom: 0; }

/* 목록 항목이 링크에서 버튼이 됐다 — 버튼 기본 꼴을 지운다. */
button.ex-feed-item {
    width: 100%;
    border: 0;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ex-feed-player {
    margin: 0 0 14px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}
.ex-feed-player iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ── 관련 지표 전체 화면 ────────────────────────────────────── */
.ex-card-desc { margin: 4px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ex-ink3); }
.ex-lead-line { margin: 0; font-size: 13.5px; line-height: 1.5; font-weight: 600; color: var(--ex-title); letter-spacing: -0.3px; }
.ex-lead-line b { font-weight: 800; color: var(--ex-primary); }

/* 영향력 비중 — 도넛 한 장(conic-gradient)과 범례. */
.ex-donut-wrap { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.ex-donut {
    position: relative;
    flex: 0 0 140px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
}
.ex-donut-hole {
    position: absolute;
    inset: 26px;
    border-radius: 50%;
    background: var(--ex-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
    padding: 0 6px;
}
.ex-donut-hole span { font-size: 11px; font-weight: 600; color: var(--ex-ink3); line-height: 1.2; }
.ex-donut-hole b { font-size: 20px; font-weight: 800; color: var(--ex-title); letter-spacing: -0.6px; }

.ex-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.ex-legend li { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.ex-legend-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 2px; }
.ex-legend-label { flex: 1 1 auto; min-width: 0; color: var(--ex-ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-legend li b { font-weight: 700; color: var(--ex-title); font-variant-numeric: tabular-nums; }

/* 카드 끝 한 줄 — 색 면 대신 옅은 판 위에 올린다. */
.ex-note-banner {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #F7F7FB;
    font-size: 12.5px;
    line-height: 1.6;
    font-weight: 600;
    color: var(--ex-ink2);
}
.ex-note-banner b { font-weight: 800; color: var(--ex-title); }
.ex-note-banner.is-up { color: var(--ex-up); background: rgba(214,56,56,0.07); }
.ex-note-banner.is-down { color: var(--ex-down); background: rgba(50,96,200,0.07); }

/* 지표 압력 — 가운데 축을 두고 좌우로 편다. */
.ex-force-head { display: flex; align-items: center; margin: 16px 0 8px; font-size: 10.5px; font-weight: 700; letter-spacing: -0.2px; }
.ex-force-label { flex: 0 0 74px; font-size: 11.5px; font-weight: 600; color: var(--ex-ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-force-side { flex: 1 1 0; }
.ex-force-side.is-left { text-align: right; color: var(--ex-up); }
.ex-force-side.is-right { color: var(--ex-down); }
.ex-force-axis { flex: 0 0 5px; width: 1px; height: 16px; background: var(--ex-line); }

.ex-forces { display: flex; flex-direction: column; gap: 7px; }
.ex-force { display: flex; align-items: center; }
.ex-force-bar { flex: 1 1 0; display: flex; height: 14px; }
.ex-force-bar.is-left { justify-content: flex-end; }
.ex-force-bar b { display: block; height: 100%; }
.ex-force-bar.is-left b { border-radius: 4px 0 0 4px; }
.ex-force-bar.is-right b { border-radius: 0 4px 4px 0; }
.ex-force-bar b.is-up { background: var(--ex-up); }
.ex-force-bar b.is-down { background: var(--ex-down); }

/* 지표 페이저 — 한자리에 고정해 두고 옆으로 넘긴다. 이름표 줄이 곧 손잡이다. */
.ex-indtabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}
.ex-indtabs::-webkit-scrollbar { display: none; }
.ex-indtab {
    flex: 0 0 auto;
    height: 32px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    background: var(--ex-bg);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ex-ink3);
    letter-spacing: -0.3px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease;
}
/* 고른 칸은 순위 색으로 채운다 — 위 도넛의 그 조각과 같은 색이다. */
.ex-indtab.is-on { background: var(--rank); color: #fff; font-weight: 800; }

.ex-indviewport { overflow: hidden; }
.ex-indtrack { display: flex; transition: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1); align-items: flex-start; }
.ex-indslide { flex: 0 0 100%; min-width: 100%; padding-right: 2px; }

/* 머리 — 이름 위에 값을 크게. 값이 주인공이라 한 줄에 눌러 담지 않는다. */
.ex-indhead { display: flex; align-items: baseline; gap: 8px; }
.ex-indhead-name { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--ex-ink2); letter-spacing: -0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 면을 깔지 않는다 — 카드 안 주인공은 값이라, 순위에 배경까지 주면 값보다 먼저 눈에 든다. */
.ex-indhead-rank { flex: 0 0 auto; font-size: 11.5px; font-weight: 800; letter-spacing: -0.2px; }

.ex-indhead-value { display: flex; align-items: flex-end; gap: 8px; margin-top: 6px; }
.ex-indhead-value b { font-size: 26px; font-weight: 800; line-height: 1.15; color: var(--ex-title); letter-spacing: -0.8px; }
.ex-indhead-value i { font-style: normal; font-size: 14px; font-weight: 700; padding-bottom: 3px; letter-spacing: -0.3px; }

/* 추이 — 그림 옆에 최고·최저를 적어 세로축 없이도 폭을 알게 한다. */
.ex-indtrend { margin-top: 18px; }
.ex-indtrend-cap { display: flex; justify-content: flex-end; gap: 10px; font-size: 11.5px; color: var(--ex-ink3); }
.ex-indtrend-line { display: block; width: 100%; height: 52px; margin-top: 8px; }

/* 지금 어디쯤 — 눈금 없는 띠와 점 하나. */
.ex-indpos { margin-top: 14px; }
.ex-indpos-bar { position: relative; height: 6px; border-radius: 3px; background: var(--ex-component); }
.ex-indpos-bar span {
    position: absolute;
    top: 50%;
    left: calc(var(--t, 0) * 100%);
    transform: translate(calc(var(--t, 0) * -100%), -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ex-primary);
}
.ex-indpos-cap { margin: 8px 0 0; font-size: 11.5px; color: var(--ex-ink3); }

/* 원-달러와 비교 — 두 선과 범례, 그 아래 한 줄 해석. */
.ex-indcmp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.ex-indcmp-word { font-size: 11.5px; color: var(--ex-ink3); }
.ex-indcmp-line { display: block; width: 100%; height: 60px; margin: 4px 0 10px; }
.ex-indcmp-legend { display: flex; gap: 14px; margin-bottom: 10px; font-size: 11.5px; color: var(--ex-ink2); }
.ex-indcmp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ex-indcmp-legend i { width: 10px; height: 3px; border-radius: 2px; }

/* 지금 어느 쪽으로 미는가 — '오늘의 환율' 칩과 같은 규칙(환율을 밀어 올리면 원화가 밀린다). */
.ex-pushbadge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.ex-pushbadge svg { width: 13px; height: 13px; }
.ex-pushbadge.is-up { color: var(--ex-up); background: rgba(214,56,56,0.08); }
.ex-pushbadge.is-down { color: var(--ex-down); background: rgba(50,96,200,0.08); }

/* 카드 안 작은 머리말과 글줄 — 원리·오늘·비교가 함께 쓴다. */
.ex-indcard-block { margin-top: 12px; }
.ex-indcard-label {
    display: inline-block;
    margin-bottom: 6px;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--ex-component);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--ex-ink3);
}
.ex-indcard-block p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--ex-ink2); }
.ex-indcard-block p.is-strong { color: var(--ex-title); font-weight: 600; }

/* 관련 이슈·영상 더보기 — 채움 버튼 대신 회색 글자와 아래 화살표. */
.ex-feed-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    margin-top: 4px;
    padding: 10px 0;
    border: 0;
    border-radius: 8px;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--ex-ink2);
    cursor: pointer;
}
.ex-feed-more svg { width: 18px; height: 18px; color: var(--ex-ink3); }
.ex-feed-more:hover { background: rgba(0,0,0,0.03); }

@media (max-width: 400px) {
    .ex-donut-wrap { flex-direction: column; align-items: stretch; gap: 14px; }
    .ex-donut { align-self: center; }
}

/* 값 뒤의 단위 — 숫자보다 한 단 작게 붙는다(앱 fmtRateLabeled 의 '원'). */
.ex-verdict-price em { font-style: normal; font-size: 22px; font-weight: 800; letter-spacing: -0.8px; }

/* 결론과 근거를 잇는 한 줄 — 선도 면도 두지 않고 여백과 색으로만 말한다. */
.ex-why-hint {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--ex-line);
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(67, 56, 202, 0.8);
    letter-spacing: -0.3px;
}


/* 오늘 미는 힘 — 서버가 지표들 사이에서 매긴 값(0~100). 화면이 다시 재지 않는다. */
.ex-impact-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ex-impact-label { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--ex-ink2); letter-spacing: -0.2px; }
.ex-impact-bar { flex: 1 1 auto; height: 10px; border-radius: 999px; background: var(--ex-component); overflow: hidden; }
.ex-impact-bar b { display: block; height: 100%; border-radius: 999px; background: var(--ex-primary); }
.ex-impact-value { flex: 0 0 auto; font-size: 14px; font-weight: 800; color: var(--ex-primary); letter-spacing: -0.2px; }

/* 달러인덱스의 비교선은 지표 카드의 것보다 크게 — 이 카드의 주인공이라서. */
#ex-dxy-compare { height: 70px; }

/* ── 한 카드 안 두 장 (앱 ExchangeSwipeable) ─────────────────
   비중과 압력은 같은 질문의 두 얼굴이라 카드를 둘로 쪼개지 않고 넘겨 본다. */
.ex-swipe-viewport { overflow: hidden; }
.ex-swipe-track { display: flex; align-items: flex-start; transition: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.ex-swipe-page { flex: 0 0 100%; min-width: 100%; padding-right: 2px; }

.ex-dots { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 14px; }
.ex-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--ex-line);
    cursor: pointer;
    transition: width 200ms ease, background 200ms ease;
}
/* 지금 장은 길게 — 점 색만 바꾸면 몇 번째인지가 한눈에 안 잡힌다. */
.ex-dot.is-on { width: 16px; background: var(--ex-title); }

/* 방향을 모르는 지표 — 축 옆 짧은 토막. 길이로 세기를 말하지 않는다. */
.ex-force-bar b.is-none { width: 10px; background: var(--ex-line); }

/* 근거를 지표로 못 세우는 날 — 글과 함께 굳은 그날 값만 이름·값 두 칸으로 세운다.
   지표 줄(.ex-ind-row)과 달리 등락률·방향이 없어 색을 쓰지 않는다(앱 _DriverRow). */
.ex-drivers{ display:flex; flex-direction:column; gap:12px; }
.ex-driver-row{ display:flex; align-items:baseline; gap:10px; }
.ex-driver-name{ flex:1 1 auto; font-size:13.5px; font-weight:600; color:var(--ex-ink2); letter-spacing:-.3px; }
.ex-driver-val{ flex:0 0 auto; font-size:13.5px; font-weight:700; color:var(--ex-ink); letter-spacing:-.3px; }
