  :root{
    --bg:#f2f2f5; --card:#ffffff; --text:#1c1c1e; --sub:#6b6b70;
    --op:#ff9500; --op-text:#ffffff; --key:#e4e4e8; --key-text:#1c1c1e;
    --accent:#2c2c2e; --accent-text:#ffffff;
  }
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){
      --bg:#000000; --card:#1c1c1e; --text:#ffffff; --sub:#9a9a9e;
      --op:#ff9500; --op-text:#ffffff; --key:#3a3a3c; --key-text:#ffffff;
      --accent:#a5a5aa; --accent-text:#1c1c1e;
    }
  }
  :root[data-theme="dark"]{
    --bg:#000000; --card:#1c1c1e; --text:#ffffff; --sub:#9a9a9e;
    --op:#ff9500; --op-text:#ffffff; --key:#3a3a3c; --key-text:#ffffff;
    --accent:#a5a5aa; --accent-text:#1c1c1e;
  }

  /* ===== Tema Warna (10 pilihan) — hanya mengubah warna aksen/operator ===== */
  :root[data-color="orange"]{ --op:#ff9500; --op-text:#ffffff; }
  :root[data-color="blue"]{ --op:#0a84ff; --op-text:#ffffff; }
  :root[data-color="green"]{ --op:#34c759; --op-text:#ffffff; }
  :root[data-color="red"]{ --op:#ff3b30; --op-text:#ffffff; }
  :root[data-color="purple"]{ --op:#af52de; --op-text:#ffffff; }
  :root[data-color="pink"]{ --op:#ff2d55; --op-text:#ffffff; }
  :root[data-color="yellow"]{ --op:#ffcc00; --op-text:#1c1c1e; }
  :root[data-color="cyan"]{ --op:#32ade6; --op-text:#ffffff; }
  :root[data-color="indigo"]{ --op:#5856d6; --op-text:#ffffff; }
  :root[data-color="gray"]{ --op:#636366; --op-text:#ffffff; }

  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"])[data-color="orange"]{ --op:#ff9f0a; --op-text:#3a1e00; }
    :root:not([data-theme="light"])[data-color="blue"]{ --op:#409cff; --op-text:#04203f; }
    :root:not([data-theme="light"])[data-color="green"]{ --op:#30d158; --op-text:#04300f; }
    :root:not([data-theme="light"])[data-color="red"]{ --op:#ff453a; --op-text:#3a0a06; }
    :root:not([data-theme="light"])[data-color="purple"]{ --op:#bf5af2; --op-text:#280a38; }
    :root:not([data-theme="light"])[data-color="pink"]{ --op:#ff375f; --op-text:#380a16; }
    :root:not([data-theme="light"])[data-color="yellow"]{ --op:#ffd60a; --op-text:#1c1c1e; }
    :root:not([data-theme="light"])[data-color="cyan"]{ --op:#64d2ff; --op-text:#042a3a; }
    :root:not([data-theme="light"])[data-color="indigo"]{ --op:#7d7aff; --op-text:#130f38; }
    :root:not([data-theme="light"])[data-color="gray"]{ --op:#aeaeb2; --op-text:#1c1c1e; }
  }
  :root[data-theme="dark"][data-color="orange"]{ --op:#ff9f0a; --op-text:#3a1e00; }
  :root[data-theme="dark"][data-color="blue"]{ --op:#409cff; --op-text:#04203f; }
  :root[data-theme="dark"][data-color="green"]{ --op:#30d158; --op-text:#04300f; }
  :root[data-theme="dark"][data-color="red"]{ --op:#ff453a; --op-text:#3a0a06; }
  :root[data-theme="dark"][data-color="purple"]{ --op:#bf5af2; --op-text:#280a38; }
  :root[data-theme="dark"][data-color="pink"]{ --op:#ff375f; --op-text:#380a16; }
  :root[data-theme="dark"][data-color="yellow"]{ --op:#ffd60a; --op-text:#1c1c1e; }
  :root[data-theme="dark"][data-color="cyan"]{ --op:#64d2ff; --op-text:#042a3a; }
  :root[data-theme="dark"][data-color="indigo"]{ --op:#7d7aff; --op-text:#130f38; }
  :root[data-theme="dark"][data-color="gray"]{ --op:#aeaeb2; --op-text:#1c1c1e; }
  *{box-sizing:border-box;}
  html,body{height:100%; width:100%; height:var(--app-height, 100%);}

  /* ===== Scrollbar tipis & netral (menimpa scrollbar tebal bawaan browser/OS) ===== */
  *{ scrollbar-width:thin; scrollbar-color:rgba(128,128,128,0.45) transparent; }
  *::-webkit-scrollbar{ width:6px; height:6px; }
  *::-webkit-scrollbar-track{ background:transparent; }
  *::-webkit-scrollbar-thumb{
    background:rgba(128,128,128,0.45); border-radius:99px; border:none;
  }
  *::-webkit-scrollbar-thumb:hover{ background:rgba(128,128,128,0.65); }
  body{
    margin:0; background:var(--card); color:var(--text);
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
    overflow:hidden;
    padding-top:env(safe-area-inset-top,0px);
    padding-bottom:env(safe-area-inset-bottom,0px);
  }
  .calc{
    width:100%; height:100%; background:var(--card);
    padding:14px; margin:0;
    display:flex; flex-direction:column;
  }
  .display{
    text-align:right; padding:8px 8px 0;
    flex:0 1 auto; min-height:60px; overflow:hidden;
    display:flex; flex-direction:column; justify-content:flex-end;
  }
  .disp-tools{ align-self:flex-start; margin-bottom:auto; display:flex; gap:6px; }
  .disp-tool{
    border:none; border-radius:9px; padding:4px 11px; height:24px;
    background:var(--key); color:var(--sub); font-size:11.5px; font-weight:600; cursor:pointer;
  }
  .disp-tool:active{ filter:brightness(0.85); }
  .display .prev{ color:var(--sub); font-size:clamp(13px,3vw,16px); min-height:20px; overflow-x:auto; white-space:nowrap; }
  .display .curr{ font-size:clamp(24px,6.5vw,34px); font-weight:500; white-space:nowrap; overflow-x:auto; line-height:1.1; }
  .display .preview{ color:var(--op); font-weight:700; font-size:clamp(30px,8.5vw,44px); min-height:20px; margin-top:2px; overflow-x:auto; white-space:nowrap; }
  .hist-bar{
    flex:0 0 auto; display:flex; gap:8px; margin:clamp(4px,1vh,8px) 0 0;
  }
  .hist-btn{
    flex:1; height:28px; border:none; border-radius:10px;
    background:var(--key); color:var(--sub);
    font-size:12px; font-weight:600; cursor:pointer;
    display:flex; align-items:center; justify-content:center; gap:4px;
  }
  .hist-btn:active{ filter:brightness(0.85); }
  .hist-btn:disabled{ opacity:0.35; cursor:default; }
  .keys{
    flex:1 1 auto; display:grid;
    grid-template-columns:repeat(4,1fr);
    grid-template-rows:repeat(5,1fr);
    gap:10px; margin-top:clamp(6px,1.5vh,12px); min-height:0;
  }
  button{
    border:none; border-radius:16px; padding:0; width:100%; height:100%;
    font-size:clamp(16px,4vw,24px); font-weight:500; cursor:pointer;
    background:var(--key); color:var(--key-text);
    transition:filter 0.1s;
  }
  button:active{ filter:brightness(0.85); }
  button.op{ background:var(--op); color:var(--op-text); }
  button.accent{ background:var(--accent); color:var(--accent-text); }

  .tab-bar{
    flex:0 0 auto; display:grid; grid-template-columns:repeat(3, 1fr); gap:5px; margin-bottom:6px;
    background:var(--key); border-radius:14px; padding:4px;
  }
  .tab-btn{
    min-width:0; height:30px; border:none; border-radius:9px;
    background:transparent; color:var(--sub);
    font-size:clamp(10px,2.6vw,12px); font-weight:600; cursor:pointer;
    padding:0 2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .tab-btn.active{ background:var(--op); color:var(--op-text); }

  .screen{ flex:1 1 auto; display:flex; flex-direction:column; min-height:0; }

  .conv-direction{
    flex:0 0 auto; display:flex; align-items:center; justify-content:center;
    gap:14px; padding:14px 0 6px;
  }
  .conv-currency{
    font-size:clamp(15px,4vw,19px); font-weight:700; color:var(--text);
    min-width:56px; text-align:center;
  }
  .swap-btn{
    width:42px; height:42px; border-radius:50%; border:none;
    background:var(--op); color:var(--op-text); font-size:18px; cursor:pointer;
  }
  .swap-btn:active{ filter:brightness(0.85); }

  .conv-toolbar{ flex:0 0 auto; display:flex; justify-content:flex-end; align-items:center; padding:0 4px; }
  .token-toolbar{ padding:0 4px; justify-content:space-between; }
  .token-toolbar .clear-btn{ padding:2px 4px 10px; }
  .clear-btn{
    width:auto; height:auto; border:none; background:transparent; color:var(--sub); cursor:pointer;
    font-size:14px; font-weight:600; padding:6px 4px;
  }
  .clear-btn:active{ color:var(--op); }
  .toolbar-refresh-btn{
    display:flex; align-items:center; gap:5px;
    width:auto; height:auto; border:none; background:transparent; color:var(--op); cursor:pointer;
    font-size:13px; font-weight:700; padding:6px 4px 10px; white-space:nowrap;
  }
  .toolbar-refresh-btn svg{ width:14px; height:14px; flex:0 0 auto; }
  .toolbar-refresh-btn:active{ filter:brightness(0.85); }
  .toolbar-refresh-btn:disabled{ opacity:0.5; cursor:default; }
  .toolbar-refresh-btn.spinning svg{ animation:refresh-spin 0.7s linear infinite; }
  @keyframes refresh-spin{ from{ transform:rotate(0deg); } to{ transform:rotate(360deg); } }

  .token-intro{
    flex:0 0 auto; color:var(--sub); font-size:13px; line-height:1.4;
    padding:10px 2px 0;
  }
  .token-input-wrap{
    flex:0 0 auto; display:flex; gap:8px; margin:0 0 10px;
  }
  .token-input-wrap input{
    flex:1; min-width:0; border:none; outline:none; border-radius:14px;
    background:var(--key); color:var(--text); padding:14px 16px; font-size:15px;
  }
  .saham-input-combo{ position:relative; flex:1; min-width:0; }
  .saham-input-combo input{ width:100%; }
  .saham-suggest-list{
    position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:30;
    background:var(--card); border-radius:14px; box-shadow:0 8px 24px rgba(0,0,0,0.35);
    max-height:240px; overflow-y:auto; padding:6px;
    scrollbar-width:none; -ms-overflow-style:none;
  }
  .saham-suggest-list::-webkit-scrollbar{ display:none; width:0; }
  .saham-suggest-item{
    display:flex; flex-direction:column; gap:1px; width:100%; text-align:left;
    background:transparent; border:none; border-radius:10px; padding:8px 10px; cursor:pointer;
  }
  .saham-suggest-item:active{ background:var(--key); }
  .saham-suggest-code{ font-size:14px; font-weight:700; color:var(--text); }
  .saham-suggest-name{
    font-size:11px; color:var(--sub); white-space:nowrap;
    overflow:hidden; text-overflow:ellipsis;
  }
  .token-paste-btn{
    flex:0 0 auto; width:48px; border:none; border-radius:14px;
    background:var(--key); color:var(--key-text);
    font-size:19px; cursor:pointer;
  }
  .token-paste-btn:active{ filter:brightness(0.85); }
  .token-check-btn{
    flex:0 0 auto; width:auto; height:auto; border-radius:14px;
    background:var(--op); color:var(--op-text); font-weight:600;
    padding:0 20px; font-size:15px;
  }
  .token-status{ flex:0 0 auto; color:var(--sub); font-size:13px; min-height:18px; padding:0 2px 8px; }
  .token-result{
    flex:0 0 auto; display:flex; flex-direction:column; gap:6px;
    background:var(--key); border-radius:16px; padding:16px;
  }
  .token-result-name{ font-size:18px; font-weight:700; color:var(--text); }
  .token-result-chain{ font-size:12px; color:var(--sub); margin-bottom:8px; }
  .token-btn-row{ display:flex; gap:8px; margin:-2px 0 8px; flex-wrap:wrap; }
  .token-explorer-btn, .token-honeypot-btn{
    width:auto; height:auto; align-self:flex-start;
    border:none; border-radius:10px; color:var(--op-text);
    font-size:13px; font-weight:600; padding:6px 12px; cursor:pointer;
  }
  .token-explorer-btn{ background:var(--op); }
  .token-honeypot-btn{ background:#555; }
  .token-explorer-btn:active, .token-honeypot-btn:active{ filter:brightness(0.85); }
  .token-honeypot-box{
    border-radius:12px; padding:10px 12px; margin:-2px 0 8px;
    font-size:13px; line-height:1.5; background:var(--bg);
  }
  .token-honeypot-box .hp-title{ font-weight:700; font-size:14px; margin-bottom:2px; }
  .token-honeypot-box .hp-source{ display:block; margin-top:6px; font-size:11px; color:var(--sub); opacity:0.8; }
  .token-honeypot-box.hp-safe{ border:1px solid #2e7d32; }
  .token-honeypot-box.hp-safe .hp-title{ color:#4caf50; }
  .token-honeypot-box.hp-danger{ border:1px solid #c62828; }
  .token-honeypot-box.hp-danger .hp-title{ color:#f44336; }
  .token-honeypot-box.hp-warn{ border:1px solid #f9a825; }
  .token-honeypot-box.hp-warn .hp-title{ color:#ffca28; }
  .token-honeypot-box.hp-unknown{ border:1px solid var(--sub); }
  .token-honeypot-box.hp-unknown .hp-title{ color:var(--sub); }
  .token-price-row{
    display:flex; justify-content:space-between; align-items:baseline;
    font-size:14px; color:var(--sub); padding:4px 0; border-top:1px solid var(--bg);
  }
  .token-price-row span:last-child{ color:var(--text); font-weight:700; font-size:16px; }
  .saham-price{ color:var(--text); }
  .saham-change.up{ color:#4caf50 !important; }
  .saham-change.down{ color:#f44336 !important; }
  .saham-change.flat{ color:var(--sub) !important; }

  /* ===== Tab Makro Ekonomi: suku bunga + berita ===== */
  /* Makro, Ekonomi RI, Kripto & Dunia, Radar Kripto: layar berita panjang -> digulir di dalam layarnya sendiri,
     supaya tombol gulir mengambang (panah) bisa menggulirkannya */
  #makroScreen, #indoScreen, #duniaScreen, #radarScreen{ overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; }
  .macro-section-label{
    flex:0 0 auto; font-size:12.5px; font-weight:700; color:var(--sub);
    text-transform:uppercase; letter-spacing:0.03em; margin:14px 2px 8px;
  }
  .macro-rates-grid{
    flex:0 0 auto; display:grid; grid-template-columns:repeat(2,1fr); gap:8px;
  }
  .macro-rate-card{
    display:flex; align-items:center; gap:8px;
    background:var(--key); border-radius:14px; padding:10px 12px;
  }
  .macro-rate-card .mr-flag{ font-size:20px; flex:0 0 auto; line-height:1; }
  .macro-rate-card .mr-name{
    flex:1; min-width:0; font-size:12.5px; font-weight:700; color:var(--text);
    display:flex; flex-direction:column; line-height:1.25;
  }
  .macro-rate-card .mr-name span{ font-size:10.5px; font-weight:500; color:var(--sub); }
  .macro-rate-card .mr-val{ font-size:15px; font-weight:700; color:var(--op); flex:0 0 auto; white-space:nowrap; }
  .macro-rate-card.stale .mr-val{ color:var(--sub); }
  a.macro-rate-card, a.macro-meeting-card{ text-decoration:none; color:inherit; cursor:pointer; }
  a.macro-rate-card:active, a.macro-meeting-card:active{ filter:brightness(0.88); }
  .mm-src{ font-size:10.5px; color:var(--op); font-weight:600; }
  .macro-news-list{ flex:0 0 auto; display:flex; flex-direction:column; gap:8px; padding-bottom:4px; }
  .macro-news-item{
    display:block; background:var(--key); border-radius:14px; padding:12px 14px;
    text-decoration:none; color:inherit; cursor:pointer;
  }
  .macro-news-item:active{ filter:brightness(0.9); }
  .macro-news-title{ font-size:14px; font-weight:600; color:var(--text); line-height:1.35; }
  .macro-news-meta{ font-size:11px; color:var(--sub); margin-top:5px; display:flex; gap:6px; align-items:center; }

  /* ===== Jadwal Rapat Bank Sentral ===== */
  .macro-meetings-list{ flex:0 0 auto; display:flex; flex-direction:column; gap:8px; }
  .macro-meeting-card{
    background:var(--key); border-radius:14px; padding:12px 14px;
    display:flex; flex-direction:column; gap:6px;
  }
  .macro-meeting-head{ display:flex; align-items:center; gap:8px; }
  .macro-meeting-head .mm-flag{ font-size:18px; line-height:1; flex:0 0 auto; }
  .macro-meeting-head .mm-name{ font-size:13.5px; font-weight:700; color:var(--text); flex:1; min-width:0; }
  .macro-meeting-head .mm-countdown{
    flex:0 0 auto; font-size:11px; font-weight:700; color:var(--op-text);
    background:var(--op); border-radius:20px; padding:3px 9px; white-space:nowrap;
  }
  .macro-meeting-head .mm-countdown.today{ background:#f44336; }
  .macro-meeting-date{ font-size:13px; color:var(--text); font-weight:600; }
  .macro-meeting-next{ font-size:11px; color:var(--sub); }
  .macro-meeting-est{ font-style:italic; opacity:0.85; }
  .macro-meetings-note{
    flex:0 0 auto; font-size:11px; color:var(--sub); line-height:1.5;
    padding:2px 2px 4px; opacity:0.85;
  }
  .macro-investing-btn{
    flex:0 0 auto; display:flex; align-items:center; justify-content:center; gap:8px;
    width:100%; border:none; border-radius:14px; background:var(--key);
    color:var(--text); font-size:13.5px; font-weight:700; padding:12px 14px;
    text-decoration:none; margin-top:2px; cursor:pointer;
  }
  .macro-investing-btn:active{ filter:brightness(0.9); }
  .macro-investing-btn svg{ flex:0 0 auto; width:15px; height:15px; }

  .macro-news-tabs{
    flex:0 0 auto; display:grid; grid-template-columns:repeat(3, 1fr); gap:5px;
    background:var(--key); border-radius:14px; padding:4px; margin:0 0 10px;
  }
  .macro-news-tab{
    min-width:0; height:32px; border:none; border-radius:9px;
    background:transparent; color:var(--sub);
    font-size:clamp(10.5px,2.6vw,12.5px); font-weight:700; cursor:pointer;
    padding:0 2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .macro-news-tab.active{ background:var(--op); color:var(--op-text); }
  .macro-news-source{ font-weight:700; color:var(--text); }
  .macro-news-translated{ color:var(--op); font-weight:600; cursor:help; }
  .macro-news-empty{ font-size:13px; color:var(--sub); padding:6px 2px; }

  .radar-gauge-box{
    flex:0 0 auto; background:var(--key); border-radius:16px; padding:16px;
    margin:0 0 12px; text-align:center;
  }
  .radar-gauge-value{ font-size:40px; font-weight:800; color:var(--text); line-height:1.1; }
  .radar-gauge-label{ font-size:14px; font-weight:700; margin:2px 0 12px; }
  .radar-gauge-track{
    height:10px; border-radius:6px; background:var(--bg2, rgba(255,255,255,0.08));
    overflow:hidden; margin:0 2px;
  }
  .radar-gauge-fill{ height:100%; border-radius:6px; transition:width .3s ease; }
  .radar-gauge-updated{ font-size:11px; color:var(--sub); margin-top:8px; }
  .radar-history{ display:flex; gap:6px; margin-top:12px; justify-content:center; flex-wrap:wrap; }
  .radar-history-chip{
    width:30px; height:30px; border-radius:8px; display:flex; align-items:center;
    justify-content:center; font-size:11px; font-weight:700; color:#1a1a1a;
  }
  .radar-cal-item{
    padding:10px 4px; border-bottom:1px solid rgba(128,128,128,0.15);
  }
  .radar-cal-item:last-child{ border-bottom:none; }
  a.radar-cal-item{ display:block; text-decoration:none; color:inherit; }
  a.radar-cal-item:active{ filter:brightness(0.9); }
  .radar-cal-src{ font-size:10.5px; color:var(--op); margin-top:4px; font-weight:600; }
  .radar-cal-top{ display:flex; align-items:center; gap:6px; margin-bottom:3px; flex-wrap:wrap; }
  .radar-cal-currency{
    font-size:11px; font-weight:800; color:var(--key-text); background:var(--key);
    border-radius:6px; padding:2px 6px;
  }
  .radar-cal-impact{ font-size:11px; font-weight:700; border-radius:6px; padding:2px 6px; }
  .radar-cal-impact-tinggi{ background:#e5484d; color:#fff; }
  .radar-cal-impact-sedang{ background:#f5a623; color:#1a1a1a; }
  .radar-cal-time{ font-size:11.5px; color:var(--sub); margin-left:auto; }
  .radar-cal-title{ font-size:13.5px; font-weight:600; color:var(--text); margin-bottom:3px; }
  .radar-cal-vals{ font-size:11.5px; color:var(--sub); }

  .token-save-btn{
    width:auto; height:auto; align-self:flex-start;
    border:none; border-radius:10px; color:var(--key-text);
    font-size:13px; font-weight:600; padding:6px 12px; cursor:pointer;
    background:var(--key);
  }
  .token-save-btn.saved{ background:var(--op); color:var(--op-text); }
  .token-save-btn:active{ filter:brightness(0.85); }
  .token-refresh-btn{
    width:auto; height:auto; align-self:flex-start;
    border:none; border-radius:10px; color:var(--key-text);
    font-size:13px; font-weight:600; padding:6px 12px; cursor:pointer;
    background:var(--key);
  }
  .token-refresh-btn:active{ filter:brightness(0.85); }
  .token-refresh-btn:disabled{ opacity:0.55; cursor:default; }

  .saham-watchlist-wrap{ flex:0 0 auto; margin:0 0 8px; }
  .saham-watchlist-header{ display:flex; align-items:center; padding:0 2px 4px; }
  .saham-watchlist-label{ font-size:11px; color:var(--sub); font-weight:700; letter-spacing:0.2px; }
  .saham-watchlist-list{
    display:flex; flex-direction:column; gap:8px; padding:2px;
  }
  .saham-watchlist-list::-webkit-scrollbar{ display:none; width:0; }
  .saham-watchlist-pager{
    display:flex; align-items:center; justify-content:center; flex-wrap:wrap;
    gap:6px; padding:10px 2px 2px;
  }
  .saham-pager-btn{
    border:none; border-radius:10px; background:var(--key); color:var(--key-text);
    font-size:13px; font-weight:600; cursor:pointer; padding:7px 10px;
    width:auto; height:auto; flex:0 0 auto;
    min-width:34px; text-align:center;
  }
  .saham-pager-btn:active{ filter:brightness(0.85); }
  .saham-pager-btn.active{ background:var(--op); color:var(--op-text); }
  .saham-pager-btn:disabled{ opacity:0.4; cursor:default; }
  .saham-pager-btn.nav{ padding:7px 12px; }
  .saham-card{
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    background:var(--key); color:var(--key-text); border-radius:14px;
    padding:10px 10px 10px 14px; cursor:pointer; border:none; width:100%; text-align:left;
  }
  .saham-card:active{ filter:brightness(0.92); }
  .saham-card.active{ background:var(--op); color:var(--op-text); }
  .saham-card-info{ display:flex; flex-direction:column; gap:2px; min-width:0; flex:1 1 auto; }
  .saham-card-symbol{ font-size:14px; font-weight:700; }
  .saham-card-name{
    font-size:11px; color:var(--sub); white-space:nowrap;
    overflow:hidden; text-overflow:ellipsis;
  }
  .saham-card.active .saham-card-name{ color:var(--op-text); opacity:0.85; }
  .saham-card-price{ flex:0 0 auto; text-align:right; }
  .saham-card-price .p{ font-size:14px; font-weight:700; display:block; }
  .saham-card-price .c{ font-size:11px; display:block; margin-top:1px; }
  .saham-card-price .c.up{ color:#4caf50; }
  .saham-card-price .c.down{ color:#f44336; }
  .saham-card.active .saham-card-price .c.up,
  .saham-card.active .saham-card-price .c.down{ color:var(--op-text); }
  .saham-card-del{
    flex:0 0 auto; width:24px; height:24px; border-radius:50%; border:none;
    background:rgba(128,128,128,0.28); color:inherit;
    font-size:12px; display:flex; align-items:center; justify-content:center; cursor:pointer;
  }
  .saham-card-del:active{ filter:brightness(0.8); }
  .saham-card-alert{
    flex:0 0 auto; width:24px; height:24px; border-radius:50%; border:none;
    background:rgba(128,128,128,0.28); color:inherit; opacity:0.55;
    font-size:12px; display:flex; align-items:center; justify-content:center; cursor:pointer;
  }
  .saham-card-alert:active{ filter:brightness(0.8); }
  .saham-card-alert.active{ background:var(--op); color:var(--op-text); opacity:1; }
  .saham-card.active .saham-card-alert{ background:rgba(0,0,0,0.18); }
  .saham-card.active .saham-card-alert.active{ background:rgba(0,0,0,0.35); }

  /* ===== Modal Alert Harga (tab Cek Saham) ===== */
  .alert-remove-link{
    display:block; width:100%; text-align:center; margin-top:12px;
    border:none; background:transparent; color:#f44336;
    font-size:12.5px; font-weight:600; padding:4px; cursor:pointer;
  }
  .alert-remove-link:active{ opacity:0.7; }
  .alert-hint{ font-size:11.5px; color:var(--sub); margin:0 2px 8px; min-height:15px; }
  .alert-hint.bad{ color:#f44336; }

  /* ===== Notifikasi push (di modal alert) ===== */
  .push-box{ margin-top:14px; padding-top:12px; border-top:1px solid rgba(128,128,128,0.25); font-size:12.5px; color:var(--sub); line-height:1.45; }
  .push-box .push-status{ margin-bottom:6px; }
  .push-box .push-status.on{ color:#34c759; font-weight:600; }
  .push-btn{ display:block; width:100%; padding:10px 12px; border:none; border-radius:10px; background:#ff9500; color:#fff; font-size:13.5px; font-weight:700; cursor:pointer; }
  .push-btn:active{ opacity:0.8; }
  .push-btn:disabled{ opacity:0.5; }
  .push-links{ display:flex; gap:16px; margin-top:4px; }
  .push-link{ width:auto; border:none; background:transparent; color:#0a84ff; font-size:12.5px; font-weight:600; padding:4px 0; cursor:pointer; }
  .push-link.danger{ color:#f44336; }

  /* ===== Banner alert harga terpicu ===== */
  .alert-banner-wrap{
    position:fixed; left:0; right:0; top:0; z-index:130;
    display:flex; flex-direction:column; align-items:center; gap:8px;
    padding:calc(10px + env(safe-area-inset-top,0px)) 14px 0;
    pointer-events:none;
  }
  .alert-banner{
    pointer-events:auto; width:100%; max-width:380px;
    background:var(--card); border-radius:16px; padding:12px 14px;
    display:flex; align-items:center; gap:10px;
    box-shadow:0 10px 30px rgba(0,0,0,0.35);
    border:1px solid rgba(128,128,128,0.2);
    cursor:pointer;
    animation:alert-banner-in 0.35s cubic-bezier(.22,1,.36,1);
  }
  @keyframes alert-banner-in{
    from{ transform:translateY(-14px); opacity:0; } to{ transform:translateY(0); opacity:1; }
  }
  .alert-banner-icon{
    width:34px; height:34px; border-radius:10px; flex:0 0 auto;
    background:var(--op); color:var(--op-text);
    display:flex; align-items:center; justify-content:center; font-size:16px;
  }
  .alert-banner-text{ flex:1; min-width:0; }
  .alert-banner-text .ab-title{ font-weight:700; font-size:13.5px; color:var(--text); }
  .alert-banner-text .ab-sub{ font-size:11.5px; color:var(--sub); margin-top:1px; }
  .alert-banner-close{
    flex:0 0 auto; width:26px; height:26px; border:none; background:transparent; color:var(--sub);
    font-size:16px; padding:0; cursor:pointer; line-height:1;
  }

  .conv-input-wrap{
    flex:0 0 auto; display:flex; align-items:center; gap:8px;
    background:var(--key); border-radius:16px; padding:0 16px; margin:10px 0;
    height:20%; min-height:64px;
  }
  .conv-input-wrap span{ font-size:clamp(18px,5vw,26px); color:var(--sub); font-weight:600; }
  .conv-input-wrap input{
    flex:1; width:100%; border:none; outline:none; background:transparent;
    color:var(--text); text-align:right;
    font-size:clamp(22px,7vw,34px); font-weight:600;
  }

  .conv-qty-wrap{
    flex:0 0 auto; display:flex; align-items:center; gap:8px;
    background:var(--key); border-radius:16px; padding:0 16px; margin:0 0 10px;
    height:56px;
  }
  .conv-qty-wrap span{ font-size:clamp(13px,3.6vw,16px); color:var(--sub); font-weight:600; white-space:nowrap; }
  .conv-qty-wrap input{
    flex:1; width:100%; min-width:0; border:none; outline:none; background:transparent;
    color:var(--text); text-align:right;
    font-size:clamp(18px,5.5vw,26px); font-weight:600;
  }
  .token-qty-wrap{
    flex:0 0 auto; display:flex; align-items:center; gap:8px;
    background:var(--bg); border-radius:14px; padding:0 14px; margin:10px 0;
    height:48px; min-width:0;
  }
  .token-qty-wrap span{ font-size:clamp(12px,3.2vw,14px); color:var(--sub); font-weight:600; white-space:nowrap; flex:0 0 auto; }
  .token-qty-wrap input{
    flex:1 1 auto; width:100%; min-width:0; border:none; outline:none; background:transparent;
    color:var(--text); text-align:right;
    font-size:clamp(14px,4vw,20px); font-weight:600;
  }
  .token-price-row .token-total-val{ display:inline-block; max-width:60%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:bottom; }

  .conv-total{ display:none; flex-direction:column; align-items:center; gap:6px; margin-top:10px; width:100%; }
  .conv-result-wrap.has-total .conv-total{ display:flex; }
  .conv-result-wrap.has-total > .conv-result{ font-size:clamp(18px,5vw,24px); color:var(--text); }

  .conv-result-wrap{
    flex:1 1 auto; display:flex; flex-direction:column; align-items:center;
    justify-content:center; gap:6px; min-height:0;
  }
  .conv-result-label{ font-size:clamp(11px,2.8vw,13px); color:var(--sub); }
  .conv-result{ font-size:clamp(28px,8vw,42px); font-weight:700; color:var(--op); word-break:break-all; text-align:center; }

  .rate-box{
    flex:0 0 auto; display:flex; align-items:center; justify-content:center;
    min-width:120px; padding:8px 14px; border-radius:12px;
    background:transparent; color:var(--sub);
    font-size:clamp(10px,2.6vw,12px); text-align:center; cursor:pointer;
    border:1px dashed var(--sub);
  }
  .sync-row{
    flex:0 0 auto; display:flex; align-items:center; justify-content:center;
    gap:8px; margin-bottom:2px;
  }
  .sync-btn{
    width:32px; height:32px; border-radius:50%; border:none;
    background:var(--key); color:var(--key-text);
    font-size:16px; cursor:pointer; flex:0 0 auto;
  }
  .sync-btn:active{ filter:brightness(0.85); }
  .sync-btn.syncing{ animation:spin 0.8s linear infinite; }
  @keyframes spin{ from{transform:rotate(0deg);} to{transform:rotate(360deg);} }
  .sync-time{
    flex:0 0 auto; text-align:center; margin-bottom:6px;
    font-size:clamp(9px,2.2vw,10px); color:var(--sub);
  }

  .modal-overlay{
    position:fixed; inset:0; background:rgba(0,0,0,0.55);
    display:none; align-items:center; justify-content:center;
    padding:24px; z-index:100;
  }
  .modal-overlay.open{ display:flex; }
  .modal-box{
    width:100%; max-width:320px; background:var(--card);
    border-radius:20px; padding:22px 20px; text-align:left;
    box-shadow:0 12px 40px rgba(0,0,0,0.35);
    border:1px solid rgba(128,128,128,0.15);
  }
  .modal-box h3{
    margin:0 0 6px; font-size:17px; font-weight:600; color:var(--text);
  }
  .modal-box p{
    margin:0 0 16px; font-size:13px; color:var(--sub); line-height:1.4;
  }
  .modal-box .modal-prefix{
    display:flex; align-items:center; gap:8px;
    background:var(--key); border-radius:14px; padding:0 14px;
  }
  .modal-box .modal-prefix span{ color:var(--sub); font-size:16px; white-space:nowrap; }
  .modal-box input{
    flex:1; width:100%; border:none; outline:none; background:transparent;
    color:var(--text); font-size:20px; font-weight:500;
    padding:14px 0; -moz-appearance:textfield;
  }
  .modal-box input::-webkit-outer-spin-button,
  .modal-box input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
  .modal-actions{ display:flex; gap:10px; margin-top:18px; }
  .modal-actions button{
    flex:1; height:46px; border:none; border-radius:14px;
    font-size:15px; font-weight:600; cursor:pointer;
  }
  .modal-actions .btn-cancel{ background:var(--key); color:var(--key-text); }
  .modal-actions .btn-ok{ background:var(--op); color:var(--op-text); }
  .modal-actions button:active{ filter:brightness(0.85); }


  /* ===== Panel hitung Persen ===== */
  .pct-row{ margin-bottom:10px; }
  .pct-row label{ display:block; font-size:12px; color:var(--sub); margin:0 0 4px 4px; }
  .pct-res{ margin-top:14px; border-top:1px solid rgba(128,128,128,0.2); padding-top:8px; }
  .pct-res div{ display:flex; justify-content:space-between; align-items:baseline; gap:10px; padding:7px 0; font-size:13px; color:var(--sub); }
  .pct-res b{ font-size:17px; color:var(--text); font-weight:600; text-align:right; word-break:break-all; }
  .pct-res .up b{ color:#34c759; }
  .pct-res .down b{ color:#ff3b30; }
  .hist-btn.pct-open{ color:var(--op); font-weight:700; }

  /* ===== Tombol & modal pemilih Tema Warna ===== */
  .top-bar{
    flex:0 0 auto; display:flex; align-items:center; justify-content:space-between;
    padding:0 2px 8px;
  }
  .top-bar-title{ font-size:12.5px; font-weight:700; color:var(--sub); letter-spacing:0.2px; }
  .theme-btn{
    width:29px; height:29px; border-radius:50%; border:none; flex:0 0 auto;
    background:var(--key); color:var(--key-text);
    font-size:14px; display:flex; align-items:center; justify-content:center; cursor:pointer;
  }
  .theme-btn:active{ filter:brightness(0.85); }
  @media (max-height:600px){
    .top-bar{ padding:0 2px 4px; }
    .theme-btn{ width:24px; height:24px; font-size:12px; }
  }
  .theme-modal-box{ max-width:340px; }
  .theme-modal-header{ display:flex; align-items:center; margin-bottom:10px; }
  .theme-modal-header h3{ margin:0; }
  .theme-back-btn{
    height:32px; border-radius:12px; border:none; flex:0 0 auto;
    background:var(--key); color:var(--op); padding:0 14px;
    font-size:14px; font-weight:700; display:flex; align-items:center; gap:4px; cursor:pointer;
  }
  .theme-back-btn:active{ filter:brightness(0.85); }
  .theme-grid{
    display:grid; grid-template-columns:repeat(5, 1fr); gap:14px 10px;
    margin:4px 0 4px;
  }
  .theme-swatch{
    display:flex; flex-direction:column; align-items:center; gap:6px;
    background:transparent; border:none; cursor:pointer; padding:2px 0;
  }
  .theme-swatch .dot{
    width:34px; height:34px; border-radius:50%; border:2px solid transparent;
    box-shadow:inset 0 0 0 1px rgba(128,128,128,0.25);
  }
  .theme-swatch.active .dot{ border-color:var(--text); }
  .theme-swatch span{ font-size:10.5px; color:var(--sub); text-align:center; line-height:1.2; }
  .theme-swatch.active span{ color:var(--text); font-weight:600; }


  /* ===== Popup "Pembaruan Tersedia" (PWA update) ===== */
  .update-toast{
    position:fixed; left:0; right:0; bottom:0; z-index:120;
    display:flex; justify-content:center;
    padding:14px 14px calc(14px + env(safe-area-inset-bottom,0px));
    pointer-events:none;
    transform:translateY(140%); opacity:0;
    transition:transform 0.4s cubic-bezier(.22,1,.36,1), opacity 0.3s ease;
  }
  .update-toast.open{ transform:translateY(0); opacity:1; }
  .update-toast-box{
    pointer-events:auto; width:100%; max-width:380px;
    background:var(--card); border-radius:20px; padding:16px;
    display:flex; align-items:center; gap:12px;
    box-shadow:0 14px 44px rgba(0,0,0,0.4);
    border:1px solid rgba(255,149,0,0.25);
    position:relative; overflow:hidden;
  }
  .update-toast-box::before{
    content:''; position:absolute; inset:0 auto 0 0; width:4px;
    background:var(--op);
  }
  .update-toast-icon{
    width:42px; height:42px; border-radius:13px; flex:0 0 auto;
    background:var(--op); color:var(--op-text);
    display:flex; align-items:center; justify-content:center;
    font-size:20px; animation:update-pulse 1.8s ease-in-out infinite;
  }
  @keyframes update-pulse{
    0%,100%{ transform:scale(1); } 50%{ transform:scale(1.08); }
  }
  .update-toast-text{ flex:1; min-width:0; }
  .update-toast-text .ut-title{ font-weight:700; font-size:14.5px; color:var(--text); }
  .update-toast-text .ut-sub{ font-size:12px; color:var(--sub); margin-top:2px; line-height:1.35; }
  .update-toast-actions{ display:flex; flex-direction:column; align-items:stretch; gap:6px; flex:0 0 auto; }
  .update-toast-actions .btn-update{
    border:none; border-radius:11px; padding:9px 16px; white-space:nowrap;
    font-size:13px; font-weight:700; cursor:pointer;
    background:var(--op); color:var(--op-text);
  }
  .update-toast-actions .btn-later{
    border:none; background:transparent; color:var(--sub);
    font-size:11.5px; font-weight:600; padding:2px 4px; cursor:pointer;
  }
  .update-toast-actions button:active{ filter:brightness(0.85); }
  .update-toast-spin{
    display:inline-block; width:14px; height:14px; margin-right:6px;
    border:2px solid rgba(255,255,255,0.4); border-top-color:#fff;
    border-radius:50%; vertical-align:-2px;
    animation:update-spin 0.7s linear infinite; display:none;
  }
  @keyframes update-spin{ to{ transform:rotate(360deg); } }
  .update-toast-actions .btn-update.loading .update-toast-spin{ display:inline-block; }
  .update-toast-actions .btn-update.loading .ut-btn-label{ display:none; }

  /* ===== Popup instal aplikasi (PWA) ===== */
  .install-box .install-header{ display:flex; align-items:center; gap:12px; margin-bottom:12px; }
  .install-box .install-header img{ width:48px; height:48px; border-radius:12px; flex:0 0 auto; }
  .install-box .install-header h3{ margin:0; }
  .install-box .install-sub{ margin:2px 0 0 !important; font-size:12px; color:var(--sub); }
  /* ===== Ukuran besar & responsif (HP, tablet, desktop) ===== */
  html,body{ height:100%; }
  @supports (height:100dvh){ html,body{ height:100dvh; } }
  html,body{ height:var(--app-height, 100dvh); }
  .calc{ max-width:640px; margin:0 auto; padding:clamp(10px,2.5vw,20px); }
  .tab-bar{ margin-bottom:clamp(4px,1vh,10px); gap:clamp(5px,1.2vw,8px); }
  .tab-btn{ height:clamp(32px,5vh,40px); font-size:clamp(12px,2.6vw,15px); }

  /* kalkulator */
  .display .prev{ font-size:clamp(15px,3.6vw,20px); }
  .display .curr{ font-size:clamp(32px,min(9vw,7vh),52px); }
  .display .preview{ font-size:clamp(38px,min(11vw,8.5vh),62px); }
  .keys{ gap:clamp(8px,2vw,14px); margin-top:clamp(5px,1.2vh,10px); }
  .keys button{ font-size:clamp(22px,min(6.5vw,4.5vh),34px); }

  /* konversi */
  #sahamScreen{ overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; }
  .conv-direction{ gap:clamp(14px,4vw,24px); padding:clamp(6px,2vh,16px) 0 4px; }
  .conv-currency{ font-size:clamp(18px,4.8vw,26px); min-width:64px; }
  .swap-btn{ width:clamp(46px,11vw,58px); height:clamp(46px,11vw,58px); font-size:clamp(20px,5vw,26px); }
  .clear-btn{ font-size:clamp(13px,3.4vw,16px); }
  .conv-input-wrap{
    height:auto; min-height:clamp(72px,13vh,112px);
    margin:clamp(6px,1.5vh,12px) 0; padding:0 clamp(14px,4vw,22px);
  }
  .conv-input-wrap span{ font-size:clamp(24px,6.5vw,34px); }
  .conv-input-wrap input{ min-width:0; font-size:clamp(30px,min(9vw,7.5vh),54px); }
  .conv-qty-wrap{
    height:auto; min-height:clamp(60px,10vh,84px);
    margin:0 0 clamp(6px,1.5vh,12px); padding:0 clamp(14px,4vw,22px);
  }
  .conv-qty-wrap span{ font-size:clamp(16px,4.2vw,22px); }
  .conv-qty-wrap input{ font-size:clamp(24px,min(7.5vw,6vh),40px); }
  .conv-result-wrap{ flex:1 0 auto; padding:clamp(8px,2vh,20px) 0; }
  .conv-result-label{ font-size:clamp(14px,3.6vw,18px); }
  .conv-result{
    font-size:clamp(36px,min(12vw,9vh),68px);
    white-space:nowrap; word-break:normal; max-width:100%;
  }
  .conv-result-wrap.has-total > .conv-result{ font-size:clamp(26px,min(8vw,6.5vh),42px); }
  .conv-total{ margin-top:clamp(6px,1.5vh,14px); }
  .rate-box{ font-size:clamp(13px,3.4vw,16px); padding:10px 18px; min-width:150px; }
  .sync-btn{ width:clamp(38px,9vw,46px); height:clamp(38px,9vw,46px); font-size:20px; }
  .sync-time{ font-size:clamp(11px,2.8vw,13px); margin-top:2px; }

  /* token */
  .token-intro{ font-size:clamp(12px,3.2vw,15px); }
  .token-input-wrap input{ font-size:clamp(14px,3.8vw,17px); padding:clamp(12px,3vh,16px) 16px; }
  .token-paste-btn{ width:clamp(44px,10vw,54px); font-size:clamp(17px,4.2vw,22px); }
  .token-check-btn{ font-size:clamp(14px,3.8vw,17px); padding:0 clamp(16px,4vw,24px); }
  .token-result-name{ font-size:clamp(16px,4.4vw,20px); }
  .token-price-row{ font-size:clamp(13px,3.4vw,15px); }
  .token-price-row span:last-child{ font-size:clamp(15px,4vw,18px); }

  /* jendela "Ubah Kurs" */
  .modal-box{ max-width:clamp(300px,90vw,400px); }
  .modal-box h3{ font-size:clamp(18px,4.5vw,22px); }
  .modal-box p{ font-size:clamp(14px,3.6vw,16px); }
  .modal-box .modal-prefix span{ font-size:clamp(16px,4vw,19px); }
  .modal-box input{ font-size:clamp(20px,5vw,26px); }
  .modal-actions button{ height:clamp(46px,7vh,54px); font-size:clamp(15px,3.8vw,18px); }
  /* layar pendek (HP landscape / jendela kecil): rapatkan sedikit, sisanya bisa di-scroll */
  .calc{ overflow-y:auto; overflow-x:hidden; }
  #calcScreen{ min-height:340px; }
  @media (max-height:600px){
    .conv-direction{ padding:2px 0; }
    .conv-toolbar{ padding:0 4px; }
    .clear-btn{ padding:2px 4px; font-size:13px; }
    .conv-input-wrap{ min-height:60px; margin:4px 0; }
    .conv-qty-wrap{ min-height:48px; margin-bottom:4px; }
    .conv-result-wrap{ padding:4px 0; }
    .conv-result{ font-size:clamp(28px,min(9vw,8vh),44px); }
    .conv-result-wrap.has-total > .conv-result{ font-size:clamp(22px,5vh,30px); }
    .conv-total{ margin-top:4px; }
    .token-intro{ padding:6px 2px 0; }
    .token-input-wrap input{ padding:10px 14px; }
    .token-result{ padding:12px; gap:4px; }
    .display{ padding:4px 8px 0; min-height:52px; }
    .display .curr{ font-size:clamp(22px,min(6.5vw,5vh),32px); }
    .display .preview{ font-size:clamp(26px,min(7.5vw,6vh),38px); min-height:16px; }
    .hist-bar{ margin-top:3px; gap:6px; }
    .hist-btn{ height:22px; font-size:10.5px; }
    .keys{ margin-top:4px; gap:6px; }
  }

  /* ===== Tombol gulir mengambang (ke atas / ke bawah) ===== */
  .scroll-fab{
    position:fixed; right:10px; bottom:calc(10px + env(safe-area-inset-bottom,0px)); z-index:60;
    width:22px; height:22px; border-radius:50%; border:none;
    background:var(--op); color:var(--op-text);
    display:none; align-items:center; justify-content:center;
    box-shadow:0 2px 6px rgba(0,0,0,0.2); cursor:pointer;
    opacity:0.3; transition:opacity 0.15s;
  }
  .scroll-fab:active{ filter:brightness(0.88); opacity:0.7; }
  .scroll-fab svg{ width:11px; height:11px; pointer-events:none; }
