/* 웹 탭 — 오늘 원달러 환율 (scenes/fx.html). 틀은 ta.css, 여기서는 .s-fx 아래만.
   넓은 화면: 왼쪽 티파이브 대화 창 + 오른쪽 평소 크롬 창. 휴대폰: 대화 창을 꽉 채우고 크롬은 2막에 아래에서 올라온다. */

/* ───────── 자리 ───────── */
/* 대화 창 폭은 무대 폭에 따라 272~312px. 크롬은 그 오른쪽을 채운다. */
.s-fx .ta-desk { --tw: clamp(272px, 40cqw, 312px); }
@container tadesk (min-width: 701px) {
  .s-fx .ta-app { right: auto; width: var(--tw); }
  .s-fx .fx-cr { left: calc(var(--tw) + 30px); top: 30px; right: 16px; bottom: 30px; }
}

/* ───────── 크롬 창 ───────── */
.s-fx .fx-cr { background: #dfe3e8; z-index: 2; }
.s-fx .fx-top { flex: none; display: flex; align-items: flex-end; gap: 2px; height: 38px; padding: 0 8px; }
.s-fx .fx-top .ta-lights { align-self: center; padding: 0 8px 0 3px; }
.s-fx .fx-tab { position: relative; display: none; align-items: center; gap: 6px; min-width: 0; max-width: 158px; height: 30px; padding: 0 11px; border-radius: 9px 9px 0 0; font-size: 11.5px; color: #4b4f55; white-space: nowrap; }
.s-fx .fx-t0 { display: inline-flex; }
.s-fx .fx-cr:not(.in) .fx-t0, .s-fx .fx-cr.in .fx-t1 { background: #fff; color: var(--ta-tx); font-weight: 600; box-shadow: 0 -1px 2px rgba(0, 0, 0, .05); }
.s-fx .fx-cr.in .fx-t1 { display: inline-flex; animation: fx-tab .4s var(--ta-glide) both; }
@keyframes fx-tab { from { opacity: 0; max-width: 20px; } }
.s-fx .fx-fav { flex: none; width: 14px; height: 14px; }
.s-fx .fx-tn { display: grid; min-width: 0; }
.s-fx .fx-tn > span, .s-fx .fx-t0 .fx-tn { overflow: hidden; text-overflow: ellipsis; }
.s-fx .fx-tn0, .s-fx .fx-tn1 { grid-area: 1 / 1; transition: opacity .25s; }
.s-fx .fx-tn1 { opacity: 0; }
.s-fx .fx-cr.hit .fx-tn0 { opacity: 0; }
.s-fx .fx-cr.hit .fx-tn1 { opacity: 1; }
.s-fx .fx-load { display: none; flex: none; width: 13px; height: 13px; border-radius: 50%; border: 1.6px solid #d2d5da; border-top-color: #5f6368; animation: ta-spin .7s linear infinite; }
.s-fx .fx-cr.busy .fx-load { display: block; }
.s-fx .fx-cr.busy .fx-fav1 { display: none; }
.s-fx .fx-plus { align-self: center; display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin: 0 0 0 4px; border-radius: 50%; }
.s-fx .fx-plus svg { width: 11px; height: 11px; fill: none; stroke: #5b6066; stroke-width: 1.5; stroke-linecap: round; }

.s-fx .fx-bar { flex: none; display: flex; align-items: center; gap: 9px; padding: 6px 10px; background: #fff; }
.s-fx .fx-nav { display: flex; gap: 8px; }
.s-fx .fx-nav svg, .s-fx .fx-addr > svg { width: 14px; height: 14px; flex: none; fill: none; stroke: #5b6066; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.s-fx .fx-nav .dim { stroke: #b9bdc2; }
.s-fx .fx-addr { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; background: #f1f3f4; font-size: 12px; color: var(--ta-tx); white-space: nowrap; overflow: hidden; transition: background .2s, box-shadow .2s; }
.s-fx .fx-addr.lit { background: #fff; box-shadow: inset 0 0 0 2px var(--cobalt); }
.s-fx .fx-q { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.s-fx .fx-url { color: #5f6368; }
.s-fx .fx-ph { display: none; color: #80868b; }
.s-fx .fx-cr.in .fx-url { display: none; }
.s-fx .fx-cr.in .fx-q .say:empty + .fx-ph { display: inline; }
.s-fx .fx-q .caret { display: inline-block; width: 1.5px; height: 1.05em; margin-left: 1px; vertical-align: -0.15em; background: var(--cobalt); animation: ta-blink 1s steps(1) infinite; }
.s-fx .fx-me { flex: none; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #fff 0 26%, transparent 28%), radial-gradient(circle at 50% 95%, #fff 0 36%, transparent 38%), #e8590c; }

.s-fx .fx-note { flex: none; display: none; align-items: center; gap: 7px; padding: 4px 11px; background: #eef4ff; border-top: 1px solid #e3ebfb; border-bottom: 1px solid #e3ebfb; font-size: 11.5px; font-weight: 600; color: #35466e; white-space: nowrap; overflow: hidden; }
.s-fx .fx-note b { color: var(--cobalt); font-weight: 700; }
.s-fx .fx-note .ta-logo { flex: none; width: 15px; height: 15px; border-radius: 4px; background: #fff center / 13px no-repeat; }
.s-fx .fx-cr.in .fx-note { display: flex; }

.s-fx .fx-page { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; border-top: 1px solid #ececef; }
.s-fx .fx-cr.in .fx-page { border-top: 0; }
.s-fx .fx-mail, .s-fx .fx-ntp, .s-fx .fx-res { position: absolute; inset: 0; transition: opacity .3s, transform .5s var(--ta-glide); }

/* 받은메일함 */
.s-fx .fx-mail { padding: 12px 14px; }
.s-fx .fx-cr.in .fx-mail { opacity: 0; visibility: hidden; }
.s-fx .fx-mh { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px !important; }
.s-fx .fx-mh b { font-size: 14px; font-weight: 800; letter-spacing: -.02em; }
.s-fx .fx-mh span { font-size: 11px; color: #2f9e62; font-weight: 600; }
.s-fx .fx-mail li { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 10px; align-items: center; height: 34px; padding: 0 4px; border-bottom: 1px solid #f1f1f3; font-size: 11.5px; color: #5f6368; }
.s-fx .fx-mail li b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-fx .fx-mail li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-fx .fx-mail li time { font-size: 11px; color: #8a8f96; }
.s-fx .fx-mail li.new b, .s-fx .fx-mail li.new span { color: var(--ta-tx); font-weight: 700; }

/* 새 탭 */
.s-fx .fx-ntp { display: grid; align-content: center; justify-items: center; gap: 22px; padding: 0 20px 20px; opacity: 0; visibility: hidden; }
.s-fx .fx-cr.in:not(.hit) .fx-ntp { opacity: 1; visibility: visible; }
.s-fx .fx-ntp-s { display: flex; align-items: center; gap: 8px; width: min(100%, 300px); height: 36px; padding: 0 14px; border-radius: 999px; background: #f1f3f4; font-size: 12px; color: #80868b; }
.s-fx .fx-ntp-s svg { width: 14px; height: 14px; fill: none; stroke: #5b6066; stroke-width: 1.6; stroke-linecap: round; }
.s-fx .fx-tiles { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px 10px; }
.s-fx .fx-tiles li { display: grid; justify-items: center; gap: 6px; font-size: 11px; color: #3c4043; text-align: center; white-space: nowrap; }
.s-fx .fx-tiles i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #f1f3f4; color: var(--c); font-style: normal; font-size: 13px; font-weight: 800; }

/* 검색 결과 — 환율 */
.s-fx .fx-res { padding: 10px 14px 0; opacity: 0; visibility: hidden; transform: translateY(8px); }
.s-fx .fx-cr.hit .fx-res { opacity: 1; visibility: visible; transform: none; }
.s-fx .fx-qh { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px !important; padding-bottom: 7px; border-bottom: 1px solid #f1f1f3; white-space: nowrap; }
.s-fx .fx-qh b { font-size: 13px; font-weight: 800; }
.s-fx .fx-qh span { font-size: 11px; color: #80868b; }
.s-fx .fx-card { padding: 11px 13px 10px; border-radius: 12px; box-shadow: inset 0 0 0 1px #e3e5e8; }
.s-fx .fx-pair { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 11.5px; font-weight: 600; color: #3c4043; white-space: nowrap; }
.s-fx .fx-pair > svg { width: 11px; height: 11px; fill: none; stroke: #80868b; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.s-fx .fx-cur { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 5px; border-radius: 7px; background: #f6f7f8; }
.s-fx .fx-flag { flex: none; width: 16px; height: 11px; border-radius: 2px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .18); }
.s-fx .fx-flag.us { background: linear-gradient(#3c3b6e, #3c3b6e) 0 0 / 7px 6px no-repeat, repeating-linear-gradient(#b22234 0 1.6px, #fff 1.6px 3.2px); }
.s-fx .fx-flag.kr { background: radial-gradient(circle at 50% 50%, #cd2e3a 0 2.6px, transparent 2.8px) 0 -1.3px, radial-gradient(circle at 50% 50%, #0047a0 0 2.6px, transparent 2.8px) 0 1.3px, #fff; }
.s-fx .fx-one { margin-top: 8px !important; font-size: 11.5px; color: #5f6368; }
.s-fx .fx-rate { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 2px; width: fit-content; margin: 1px 0 0 -4px !important; padding: 0 4px; border-radius: 7px; font-size: 25px; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; transition: background .25s, box-shadow .25s; }
.s-fx .fx-num { display: inline-flex; align-items: baseline; white-space: nowrap; }
.s-fx .fx-num > span { margin-left: 3px; font-size: 14px; font-weight: 700; }
.s-fx .fx-dn { margin-left: 8px; font-style: normal; font-size: 12px; font-weight: 700; color: #1c64f2; letter-spacing: 0; }
.s-fx .fx-dn small { font-size: 11px; font-weight: 600; }
.s-fx .fx-when { width: fit-content; margin: 2px 0 0 -4px !important; padding: 1px 4px; border-radius: 6px; font-size: 11px; color: #5f6368; transition: background .25s, box-shadow .25s; }
.s-fx .fx-rate.lit, .s-fx .fx-when.lit { background: rgba(22, 89, 239, .07); box-shadow: inset 0 0 0 1.5px var(--cobalt); }
.s-fx .fx-chart { display: block; width: 100%; height: 50px; margin-top: 8px; clip-path: inset(0 100% 0 0); }
.s-fx .fx-cr.hit .fx-chart { clip-path: inset(0 0 0 0); transition: clip-path 1.1s var(--ta-inout) .15s; }
.s-fx .fx-grid { stroke: #eef0f2; stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.s-fx .fx-area { fill: rgba(28, 100, 242, .07); opacity: 0; transition: opacity .6s .5s; }
.s-fx .fx-line { fill: none; stroke: #1c64f2; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.s-fx .fx-cr.hit .fx-area { opacity: 1; }
.s-fx .fx-span { display: flex; gap: 4px; margin-top: 6px !important; }
.s-fx .fx-span span { padding: 2px 8px; border-radius: 6px; font-size: 11px; color: #5f6368; }
.s-fx .fx-span .on { background: #e8f0fe; color: #1a56db; font-weight: 700; }
.s-fx .fx-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px !important; padding-top: 8px; border-top: 1px solid #f1f1f3; }
.s-fx .fx-more li { display: grid; gap: 1px; font-size: 11px; color: #5f6368; white-space: nowrap; }
.s-fx .fx-more b { font-size: 12px; font-weight: 700; color: var(--ta-tx); font-variant-numeric: tabular-nums; }

/* 답의 확인한 곳 링크 */
.s-fx .fx-src { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px !important; padding: 5px 10px 5px 8px; border-radius: 999px; background: #edf5f3; box-shadow: inset 0 0 0 1px #cfe5df; font-size: 11.5px; font-weight: 600; color: #1d6b5c; }
.s-fx .fx-src svg { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.s-fx .fx-src .fx-out { width: 10px; height: 10px; }
.s-fx .fx-src.hit { animation: fx-flash 1.4s var(--ta-glide) both; }
@keyframes fx-flash { 40% { box-shadow: inset 0 0 0 1.5px #1d6b5c; background: #dff0eb; } }

/* ───────── 휴대폰 ───────── */
@container tadesk (max-width: 700px) {
  .s-fx .fx-cr { left: 10px; right: 10px; top: 28%; bottom: 10px; z-index: 4; border-radius: 14px; box-shadow: 0 -12px 30px -14px rgba(0, 0, 0, .3), 0 0 0 .5px rgba(0, 0, 0, .2); transform: translateY(106%); transition: transform .6s var(--ta-glide); }
  .s-fx .fx-cr.show { transform: none; }
  .s-fx .fx-top .ta-lights i { width: 9px; height: 9px; }
  .s-fx .fx-plus, .s-fx .fx-nav, .s-fx .fx-cr.in .fx-t0 { display: none; }
  .s-fx .fx-tab { max-width: none; flex: 1; font-size: 12px; }
  .s-fx .fx-addr, .s-fx .fx-note, .s-fx .fx-qh span, .s-fx .fx-when, .s-fx .fx-span span, .s-fx .fx-more li, .s-fx .fx-pair, .s-fx .fx-one, .s-fx .fx-src, .s-fx .fx-tiles li, .s-fx .fx-dn small { font-size: 12px; }
  .s-fx .fx-note { padding: 4px 10px; }
  .s-fx .fx-note span { overflow: hidden; text-overflow: ellipsis; }
  .s-fx .fx-mail li { grid-template-columns: 64px minmax(0, 1fr); font-size: 12px; }
  .s-fx .fx-mail li time { display: none; }
  .s-fx .fx-qh b { font-size: 13.5px; }
  .s-fx .fx-res { padding: 10px 12px 0; }
  .s-fx .fx-tiles { grid-template-columns: repeat(3, 72px); }
}
@media (prefers-reduced-motion: reduce) {
  .s-fx .fx-cr.in .fx-t1, .s-fx .fx-src.hit { animation: none; }
}
