.exchange-card { margin:12px 16px 0; padding:16px; color:#173238; border:1px solid #a8cfc8; border-radius:14px; background:linear-gradient(120deg,rgba(230,245,241,.97),rgba(255,250,235,.96)); box-shadow:var(--shadow); }
.exchange-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.exchange-card h2 { margin:0; font-size:16px; }
.exchange-card button,.exchange-card summary { min-height:44px; cursor:pointer; font:inherit; font-size:13px; }
.exchange-card button { padding:8px 12px; border:1px solid #83aaa5; border-radius:8px; background:#fffdf8; color:#174e4d; }
.exchange-card button:disabled { opacity:.6; cursor:wait; }
.exchange-card button:active { background:#deeeea; }
.exchange-card :focus-visible { outline:3px solid #087780; outline-offset:3px; }
.exchange-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:8px; margin:12px 0; }
.exchange-item { min-width:0; padding:12px; border:1px solid #bed8d3; border-radius:10px; background:#fffdf8; }
.exchange-item h3 { margin:0 0 7px; font-size:14px; }
.exchange-item p { margin:4px 0; font-size:13px; line-height:1.5; }
.exchange-item strong { display:block; font-size:22px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.exchange-item small { display:block; margin-top:6px; font-size:12px; color:#4a6562; }
.exchange-card .exchange-note { margin:8px 0; font-size:12px; line-height:1.6; color:#4a6562; }
.exchange-card[data-state="error"] #exchange-status { color:#8a332d; }
.exchange-card details { border-top:1px solid #bed8d3; margin-top:12px; padding-top:4px; }
.exchange-card summary { align-content:center; color:#174e4d; }
.exchange-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:8px; margin:8px 0; }
.exchange-options label { display:flex; align-items:center; gap:8px; min-height:44px; padding:4px 8px; background:#fffdf8; border:1px solid #bed8d3; border-radius:8px; font-size:13px; cursor:pointer; }
.exchange-options input { flex:none; width:18px; height:18px; accent-color:#087780; }
.exchange-actions { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.exchange-card a { color:#174e4d; text-decoration:underline; }
@media(max-width:760px){ .exchange-card { margin:12px 12px 0; padding:13px; } .exchange-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:350px){ .exchange-list { grid-template-columns:1fr; } }
.exchange-card button.exchange-item { text-align:left; padding:12px; }
.exchange-name { display:block; margin-bottom:7px; font-size:14px; font-weight:800; }
.exchange-unit { display:block; margin:4px 0; font-size:13px; }
.exchange-change { display:block; margin-top:10px; font-size:12px; line-height:1.6; }
.exchange-change[data-direction="up"] { color:#a03931; }
.exchange-change[data-direction="down"] { color:#245b99; }
.exchange-chart-hint { display:block; margin-top:8px; font-size:12px; color:#174e4d; text-decoration:underline; }
.exchange-history { width:min(740px,calc(100vw - 24px)); max-width:calc(100vw - 24px); max-height:88dvh; box-sizing:border-box; overflow:auto; padding:24px; border:1px solid #83aaa5; border-radius:16px; background:#fffdf8; color:#173238; }
.exchange-history::backdrop { background:rgba(13,37,40,.55); }
.exchange-history-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.exchange-history h2 { margin:0; font-size:20px; }
.exchange-history button,.exchange-history summary { min-height:44px; font:inherit; cursor:pointer; }
.exchange-history button { border:1px solid #83aaa5; border-radius:8px; padding:8px 12px; background:#fffdf8; color:#174e4d; }
.exchange-history button[aria-pressed="true"] { background:#174e4d; color:white; }
.exchange-history button:active { opacity:.75; }
.exchange-history :focus-visible { outline:3px solid #087780; outline-offset:3px; }
.exchange-history .exchange-note { font-size:13px; line-height:1.6; color:#4a6562; }
.exchange-periods { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; }
#exchange-history-chart { display:block; width:100%; height:auto; min-height:170px; background:#f2f7f5; border-radius:10px; cursor:crosshair; }
#exchange-history-summary { font-size:14px; line-height:1.7; }
.exchange-history label { display:block; margin-top:14px; font-size:14px; }
#exchange-history-day { width:100%; min-height:44px; margin:0; accent-color:#087780; }
#exchange-history-selected { display:block; padding:12px; margin:4px 0 16px; border-radius:8px; background:#e5f1ed; font-size:16px; font-weight:800; font-variant-numeric:tabular-nums; }
.exchange-history details { border-top:1px solid #bed8d3; padding-top:8px; }
.exchange-history summary { align-content:center; }
.exchange-table-wrap { max-height:260px; overflow:auto; }
.exchange-history table { width:100%; border-collapse:collapse; font-size:14px; }
.exchange-history caption { padding:10px; text-align:left; }
.exchange-history th,.exchange-history td { padding:10px; border-bottom:1px solid #d6e3df; text-align:right; }
.exchange-history th:first-child { text-align:left; }
.exchange-history a { color:#174e4d; }
@media(max-width:480px){.exchange-history { padding:16px; }.exchange-history h2 {font-size:18px;}.exchange-periods button {flex:1;padding:8px 6px;font-size:13px;}}
