:root{
  color-scheme:dark;
  --bg:#08111b;
  --panel:#0d1824;
  --panel-2:#101d2a;
  --line:rgba(255,255,255,.075);
  --text:#f5f8fc;
  --muted:#8c99aa;
  --muted-2:#68778a;
  --accent:#4ad0d3;
  --accent-soft:rgba(74,208,211,.12);
  --green:#49d18c;
  --amber:#f1bf58;
  --red:#ff747d;
  --shadow:0 18px 42px rgba(0,0,0,.22);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif}
body{min-height:100vh;background:radial-gradient(circle at 80% -20%,rgba(28,87,100,.2),transparent 34%),var(--bg)}
button,input{font:inherit;color:inherit;-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
.app-shell{max-width:520px;margin:0 auto;padding:calc(18px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom))}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px;padding:0 2px}
h1{margin:0;font-size:29px;line-height:1.05;letter-spacing:-.025em;font-weight:900}
.top-status{display:flex;align-items:center;gap:8px;margin-top:7px;color:var(--muted);font-size:12px}
.status-dot{width:7px;height:7px;border-radius:50%;background:var(--amber)}
.status-dot.online{background:var(--green);box-shadow:0 0 0 4px rgba(73,209,140,.08)}
.status-dot.offline{background:var(--amber);box-shadow:0 0 0 4px rgba(241,191,88,.07)}
.status-dot.error{background:var(--red)}
.icon-btn{width:46px;height:46px;flex:0 0 46px;border-radius:15px;border:1px solid var(--line);background:rgba(255,255,255,.035);font-size:23px;box-shadow:var(--shadow)}
.icon-btn:active{transform:scale(.97)}
.icon-btn:disabled{opacity:.5}
.converter{position:relative}
.money-panel{border:1px solid var(--line);border-radius:25px;background:linear-gradient(180deg,rgba(15,28,42,.98),rgba(10,20,31,.98));box-shadow:var(--shadow);padding:19px 18px}
.input-panel{padding-bottom:18px}
.result-panel{padding-top:23px;background:linear-gradient(180deg,rgba(12,25,37,.98),rgba(9,18,28,.98))}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.panel-label{font-size:10px;font-weight:900;letter-spacing:.18em;color:var(--muted)}
.currency-pill{display:inline-flex;align-items:center;min-height:34px;padding:0 11px;border-radius:999px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.055);font-size:12px;font-weight:850;letter-spacing:.02em;white-space:nowrap}
.amount-row{display:flex;align-items:center;gap:10px;margin-top:18px;padding-bottom:9px;border-bottom:1px solid rgba(255,255,255,.08)}
.amount-symbol{flex:0 0 auto;color:#a7b2c0;font-size:30px;font-weight:800}
.amount-input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;font-size:49px;line-height:1.04;font-weight:950;letter-spacing:-.055em;font-variant-numeric:tabular-nums}
.amount-input::selection{background:rgba(74,208,211,.25)}
.quick-head{margin-top:15px;color:var(--muted-2);font-size:9px;font-weight:900;letter-spacing:.16em}
.quick-amounts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}
.quick-btn{min-width:0;min-height:43px;padding:0 8px;border-radius:13px;border:1px solid var(--line);background:rgba(255,255,255,.035);color:#c5d0dd;font-size:13px;font-weight:850}
.quick-btn:active,.quick-btn.active{background:var(--accent-soft);border-color:rgba(74,208,211,.28);color:#8ee9eb}
.swap-btn{position:relative;z-index:2;display:grid;place-items:center;width:48px;height:48px;margin:-8px auto;border-radius:50%;border:5px solid var(--bg);background:#16303b;color:#86ebed;font-size:23px;font-weight:900;box-shadow:0 10px 24px rgba(0,0,0,.3)}
.swap-btn:active{transform:scale(.96)}
.result-value{margin-top:18px;font-size:54px;line-height:1;font-weight:950;letter-spacing:-.06em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.result-caption{margin-top:9px;color:var(--muted);font-size:13px;line-height:1.35}
.rate-strip{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-top:14px;padding:15px 16px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.028)}
.rate-label{font-size:9px;font-weight:900;letter-spacing:.16em;color:var(--muted-2)}
.rate-main{margin-top:5px;font-size:17px;font-weight:850;font-variant-numeric:tabular-nums}
.rate-meta{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;color:var(--muted);font-size:11px;text-align:right}
.meta-sep{opacity:.45}
.reference-card{margin-top:14px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(180deg,rgba(13,24,36,.9),rgba(10,19,29,.9));overflow:hidden}
.reference-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:15px 16px 11px;border-bottom:1px solid rgba(255,255,255,.06)}
.reference-kicker{font-size:9px;font-weight:900;letter-spacing:.16em;color:var(--muted-2)}
.reference-title{margin-top:4px;font-size:17px;font-weight:850}
.tap-hint{color:var(--muted-2);font-size:10px}
.conversion-table{display:grid}
.table-row{display:grid;grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr);align-items:center;gap:7px;width:100%;min-height:49px;padding:0 16px;border:0;border-bottom:1px solid rgba(255,255,255,.055);background:transparent;text-align:left}
.table-row:last-child{border-bottom:0}
.table-row:active{background:rgba(74,208,211,.07)}
.table-from{font-size:13px;color:#b7c3d0;font-variant-numeric:tabular-nums}
.table-arrow{text-align:center;color:#536274;font-size:12px}
.table-to{text-align:right;font-size:14px;font-weight:850;font-variant-numeric:tabular-nums;white-space:nowrap}
.table-empty{padding:18px 16px;color:var(--muted);font-size:13px}
footer{display:flex;justify-content:center;gap:6px;flex-wrap:wrap;margin-top:15px;color:#617184;font-size:10px;text-align:center}
@media(max-width:380px){
  .app-shell{padding-left:13px;padding-right:13px}
  h1{font-size:27px}
  .amount-input{font-size:42px}
  .result-value{font-size:47px}
  .rate-strip{align-items:flex-start;flex-direction:column;gap:8px}
  .rate-meta{text-align:left}
  .table-row{padding-left:13px;padding-right:13px}
  .table-from{font-size:12px}
  .table-to{font-size:13px}
}
@media(min-width:650px){.app-shell{padding-top:30px}}
@media(prefers-reduced-motion:no-preference){
  .icon-btn,.swap-btn,.quick-btn,.table-row{transition:transform .12s ease,background .12s ease,border-color .12s ease}
}
