  #currency-converter{
    --bg:#ffffff;
    --card:#ffffff;
    --muted:#6b7280;
    --border:#e5e7eb;
    --primary:#2563eb;
    --accent:#4caf50;
    --accent-bg:#f1f8e9;
    --shadow:0 6px 24px rgba(16,24,40,.06);
    --radius:14px;
    --heading:#0b1220;
    --text:#0f172a;
    --up:#16a34a;
    --down:#dc2626;
    color: var(--text-color, #111);
  }

  #currency-converter .tool-title{
    margin:0 0 18px;
    font-size:1.6rem;
    font-weight:700;
    text-align:center;
    color:var(--heading);
  }

  #currency-converter .converter{
    width:100%;
    max-width:820px;
    margin-inline:auto;
    position:relative;
  }

  #currency-converter .section-heading{
    display:flex;
    align-items:center;
    gap:10px;
    margin:0 0 10px;
    font-size:1.05rem;
    font-weight:600;
    color:var(--heading);
  }
  #currency-converter .section-heading .h-ico{
    width:28px;height:28px;border-radius:8px;display:grid;place-items:center;
    background:#eff6ff;border:1px solid #bfdbfe;color:#2563eb;flex:0 0 28px;
    box-shadow:0 1px 4px rgba(37,99,235,.12);
  }

  #currency-converter .card{
    background:transparent;
    border:none;
    border-radius:0;
    box-shadow:none;
    padding:0;
    margin-top:20px;
  }

  #currency-converter canvas{
    width:100%!important;
    height:100%!important;
    display:block;
    background:transparent;
    border-radius:10px;
  }

  #currency-converter .chart-hint{
    font-size:0.8rem;
    color:var(--muted);
    margin:-4px 0 8px;
  }
  #currency-converter .chart-head{
    display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;
  }
  #currency-converter .chart-title{
    font-size:0.95rem;font-weight:700;color:#0f172a;
  }

  #currency-converter .ranges{
    display:flex;flex-wrap:wrap;gap:8px;margin:0;
  }
  #currency-converter .ranges button{
    padding:6px 12px;
    border:1px solid var(--border);
    background:#fff;
    border-radius:999px;
    cursor:pointer;
    font-size:0.85rem;
    color:#0f172a;
    transition:all .15s;
  }
  #currency-converter .ranges button:hover{
    border-color:var(--primary);
    color:var(--primary);
  }
  #currency-converter .ranges button.active{
    background:#eff6ff;
    border-color:var(--primary);
    color:var(--primary);
    font-weight:600;
  }

  #currency-converter .stats-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:0 16px;
  }
  #currency-converter .stat-row{
    display:flex;justify-content:space-between;align-items:center;
    padding:8px 0;
    border-bottom:1px dotted var(--border);
    font-size:0.9rem;
  }
  #currency-converter .stat-row:last-child{border-bottom:none;}

  #currency-converter .delta{
    display:inline-flex;align-items:center;gap:6px;font-weight:700;
  }
  #currency-converter .delta.up{color:var(--up);}
  #currency-converter .delta.down{color:var(--down);}

  #currency-converter .pill{
    display:inline-block;
    border:1px solid var(--border);
    border-radius:999px;
    padding:2px 8px;
    font-size:0.75rem;
    color:#334155;
    background:#fff;
  }
  #currency-converter .muted{
    color:var(--muted);
    font-size:0.8rem;
    margin-top:8px;
  }

  #currency-converter .rates-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap:0 16px;
    font-size:0.9rem;
  }
  #currency-converter .rate-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
    padding:8px 0;
    border-bottom:1px dotted var(--border);
  }
  #currency-converter .rate-row:last-child{border-bottom:none;}

  #currency-converter .rate-left{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:4px;
    min-width:0;
  }
  #currency-converter .rate-name{
    white-space:normal;
    word-break:break-word;
  }

  #currency-converter .rate-right{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    min-width:0;
    flex-shrink:0;
  }
  #currency-converter .rate-right b{white-space:nowrap;}

  #currency-converter .mini-copy{
    width:28px;height:28px;display:grid;place-items:center;border-radius:50%;
    border:1px solid #cbd5e1;background:#fff;cursor:pointer;font-size:12px;color:#334155;
    box-shadow:0 1px 6px rgba(0,0,0,.05);transition:border-color .15s,color .15s,box-shadow .15s;
  }
  #currency-converter .mini-copy:hover{
    border-color:var(--primary);color:var(--primary);box-shadow:0 2px 8px rgba(37,99,235,.15);
  }

  #currency-converter .all-rates-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:4px;
  }

  #currency-converter .list-mode-switch{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:0;
  }
  #currency-converter .list-mode-switch button{
    padding:6px 12px;
    border:1px solid var(--border);
    background:#fff;
    border-radius:999px;
    cursor:pointer;
    font-size:0.8rem;
    color:#0f172a;
    transition:all .15s;
    white-space:nowrap;
  }
  #currency-converter .list-mode-switch button:hover{
    border-color:var(--primary);
    color:var(--primary);
  }
  #currency-converter .list-mode-switch button.active{
    background:#eff6ff;
    border-color:var(--primary);
    color:var(--primary);
    font-weight:600;
  }

  #currency-converter .calcini-currency{
    --border:#e5e7eb; --primary:#2563eb; --heading:#0b1220; --text:#0f172a;
    --sel-bg:#f3f4f6; --sel-arrow:#0f172a; --sel-border:#e5e7eb; --sel-focus:#2563eb;
    background:transparent; color:var(--text); padding:0;
  }
  #currency-converter .calcini-currency .section-heading{
    margin:1.1rem 0 .55rem;
    font-size:1rem;
    font-weight:600;
  }
  #currency-converter .calcini-currency .h-ico{
    width:28px;height:28px;border-radius:8px;display:grid;place-items:center;flex:0 0 28px;
    background:#eff6ff; border:1px solid #bfdbfe; color:var(--primary);
  }
  #currency-converter .calcini-currency .converter{
    width:100%; max-width:820px; margin-inline:auto; position:relative; padding-inline:8px;
  }
  #currency-converter .calcini-currency .rows{display:grid; gap:.75rem;}

  #currency-converter .calcini-currency .row{
    position:relative; display:flex; align-items:stretch; padding-left:44px;
    border:1px solid var(--border); border-radius:14px; background:#fff;
    transition: box-shadow .15s ease, border-color .15s ease;
    overflow:hidden;
  }
  #currency-converter .calcini-currency .rows > .row:first-of-type:focus-within{
    border-color:#d7e2fa; box-shadow:0 0 0 2px #d7e2fa;
  }
  #currency-converter .calcini-currency .rows > .row:last-of-type:focus-within{
    border-color:#a5d6a7; box-shadow:0 0 0 2px #a5d6a7;
  }

  #currency-converter .calcini-currency .row input[type="number"]{
    border:none; outline:none; font-size:1rem; padding:14px;
    flex: 1 1 58%; width:auto; min-width:0;
    background:transparent; text-align:right;
    border-top-left-radius:14px; border-bottom-left-radius:14px;
  }

  #currency-converter .calcini-currency .side-btn{
    position:absolute; left:8px; top:50%; transform:translateY(-50%);
    width:32px;height:32px;border-radius:50%;
    border:1px solid #cbd5e1; background:#fff; cursor:pointer;
    display:grid; place-items:center; font-size:14px; color:#334155;
    transition:border-color .15s ease,color .15s ease;
  }
  #currency-converter .calcini-currency .side-btn:hover{
    border-color:var(--primary); color:var(--primary);
  }

  #currency-converter .calcini-currency .swap-wrapper{position:relative; height:0;}
  #currency-converter .calcini-currency .swap-button{
    position:absolute; top:-18px; right:16px; z-index:5;
    background:#fff; color:var(--primary);
    border:1px solid var(--primary); border-radius:50%;
    width:36px; height:36px; font-size:15px;
    cursor:pointer; display:grid; place-items:center;
    box-shadow:0 2px 10px rgba(0,0,0,.06);
  }
  #currency-converter .calcini-currency .rotate-90{
    display:inline-block; transform:rotate(90deg);
  }

  #currency-converter .calcini-currency .row select{
    -webkit-appearance:none; -moz-appearance:none; appearance:none;
    border:none; outline:none;
    font-size:0.95rem; line-height:1.2;
    padding:14px 44px 14px 14px;
    flex: 1 1 42%; width:auto; min-width:0;
    color:var(--text);
    background: var(--sel-bg);
    border-left:1px solid var(--sel-border);
    border-top-right-radius:14px; border-bottom-right-radius:14px;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    background-image: url("data:image/svg+xml;utf8,\
      <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'>\
        <path fill='%230f172a' d='M5.43 7.57a1 1 0 011.41 0L10 10.73l3.16-3.16a1 1 0 111.41 1.41l-3.87 3.87a1.5 1.5 0 01-2.12 0L5.43 9a1 1 0 010-1.41z'/>\
      </svg>");
    background-repeat:no-repeat;
    background-position:right 14px center;
    background-size:18px 18px;
  }
  #currency-converter .calcini-currency .row select::-ms-expand{ display:none; }
  #currency-converter .calcini-currency .row select:focus{
    box-shadow:0 0 0 2px color-mix(in srgb, var(--sel-focus) 30%, transparent);
  }
  #currency-converter .calcini-currency .row select option:disabled{
    color:#9aa3b2; background:var(--sel-bg);
  }

  @media (forced-colors: active){
    #currency-converter .calcini-currency .row select{
      background:Canvas; color:CanvasText; border:1px solid ButtonText;
      background-image:none; padding-right:14px;
    }
  }

  #currency-converter .calcini-currency,
  #currency-converter .calcini-currency *{
    box-sizing:border-box; min-width:0;
  }
  #currency-converter .calcini-currency .row{overflow:hidden;}

  @media (max-width: 560px){
    #currency-converter .stats-grid{
      grid-template-columns:1fr;
    }
  }

  @media (max-width: 550px){
    #currency-converter .calcini-currency .converter{padding-inline:8px;}
    #currency-converter .calcini-currency .row{
      padding:0;
      display:grid;
      grid-template-columns: 40px 1fr;
      grid-template-rows: 48px auto;
      column-gap:10px;
      row-gap:0;
      border-radius:14px;
    }
    #currency-converter .calcini-currency .side-btn{
      position:static;
      width:30px; height:30px; font-size:13px;
      align-self:center; justify-self:center;
      margin:0; transform:none; z-index:1;
    }
    #currency-converter .calcini-currency .row input[type="number"]{
      grid-column:2; grid-row:1;
      width:100%; height:48px;
      padding:0 44px 0 12px;
      font-size:0.95rem; text-align:right; line-height:1.2;
      border-top-left-radius:14px; border-top-right-radius:14px;
      border-bottom-left-radius:0; border-bottom-right-radius:0;
      background:#fff;
    }
    #currency-converter .calcini-currency .row select{
      grid-column:1 / -1; grid-row:2;
      width:100%;
      padding:12px 36px 12px 12px;
      font-size:.94rem;
      border-left:none;
      border-top:1px solid var(--sel-border);
      border-top-left-radius:0; border-top-right-radius:0;
      border-bottom-left-radius:14px; border-bottom-right-radius:14px;
      text-align:right;
      text-align-last:right;
      direction:ltr;
      background-position:right 10px center;
      background-size:14px 14px;
      white-space:nowrap; overflow:hidden;text-overflow:ellipsis;
    }
    #currency-converter .calcini-currency .swap-button{
      position:relative; top:0; right:auto;
      margin:.45rem auto; width:34px; height:34px; font-size:14px;
    }
    #currency-converter .calcini-currency .swap-wrapper{ height:auto; }
  }

  #currency-converter .calcini-currency .row input[type="number"]::-webkit-outer-spin-button,
  #currency-converter .calcini-currency .row input[type="number"]::-webkit-inner-spin-button{
    margin-left:6px;
  }