:root { color-scheme: light dark; --bg: #FCFCFD; --card: #fff; --header: #fff; --footer: #fff; }
[data-theme="dark"] { --bg: #18181B; --card: #000; --header: #000; --footer: #000; }
body { font-family: 'Noto Sans Georgian', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; background: var(--bg); }
header { padding: 20px; text-align: center; background: var(--header); }
  h1 { margin: 0 0 6px; font-weight: 700; }
  .sub { color: #888; font-size: 14px; }
  main { max-width: 980px; margin: 0 auto; padding: 16px; }
  .controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: center; margin-bottom: 12px; }
  .controls label { font-size: 14px; color: #666; }
  .controls select { padding: 6px 8px; border-radius: 8px; border: 1px solid #3333; }
  .hero-cards { display: grid; grid-template-columns: repeat(1, 1fr); gap: 12px; margin-bottom: 12px; }
  @media (min-width: 720px) { .hero-cards { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 600px) {
  header { padding: 10px 4vw; }
  .hdr { flex-direction: column; align-items: stretch; gap: 8px; }
  .brand { font-size: 18px; }
  main { padding: 8px 2vw; }
  .controls { flex-direction: column; gap: 10px; }
  .hero-cards { grid-template-columns: 1fr; gap: 8px; }
  .hero-card { padding: 10px; font-size: 15px; }
  .footer { font-size: 11px; padding: 10px 0; }
  .footer-inner { flex-direction: column; gap: 6px; }
  .hero-img { width: 100%; max-width: 180px; height: auto; }
}
.hero-card { border: 1px solid #3333; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; text-align: center; background: var(--card); }
  .hero-title { font-size: 14px; color: #666; }
  .hero-value { font-size: 28px; font-weight: 600; letter-spacing: 0.2px; }
  .hero-sub { font-size: 12px; color: #888; }
  .grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 16px; }
  @media (min-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); } }
section.card { border: 1px solid #3333; border-radius: 12px; padding: 16px; background: var(--card); }
  section.card h2 { margin: 0 0 12px; font-size: 18px; }
  table { width: 100%; border-collapse: collapse; }
  th, td { text-align: right; padding: 8px; border-bottom: 1px solid #3333; font-variant-numeric: tabular-nums; }
  th:first-child, td:first-child { text-align: left; }
  tfoot td { font-weight: 600; }
.footer { position: fixed; bottom: 0; left: 0; right: 0; width: 100%; margin-top: 0; font-size: 12px; color: #888; text-align: center; border-radius: 0; background: var(--footer); border-top: 1px solid var(--border); padding: 14px 0; box-sizing: border-box; display: flex; align-items: center; justify-content: center; z-index: 100; }
  .footer-inner { max-width: 980px; width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .err { color: #c00; text-align: center; margin: 12px 0; }
  .row-skeleton { opacity: .5; }
  .updated { font-size: 12px; color: #888; margin-top: 8px; text-align: center; }
  .hero-img { width: 200px; height: 200px; object-fit: contain; max-width: 100%; height: auto; }
  .hero-value { display: flex; align-items: baseline; gap: 6px; }
  .hero-price { font-size: 28px; font-weight: 600; color: #000; letter-spacing: .2px; }
  [data-theme="dark"] .hero-price { color: var(--text); }
  .hero-unit { font-size: 0.6em; color: rgba(0,0,0,.5); font-weight: 600; }
  [data-theme="dark"] .hero-unit { color: rgba(241,241,243,.6); }
  .purity-wrap { margin-left: 8px; }
  .purity-row { margin: 6px 0 0; }
  .select-compact { padding: 6px 28px 6px 10px; font-size: 12px; border-radius: 10px; }

:root { --bg: #FCFCFD; --text: #0a0a0a; --muted: #666; --muted2: #888; --border: #0000001a; }
  [data-theme="dark"] { --bg: #0c0c0f; --text: #f1f1f3; --muted: #aaa; --muted2: #888; --border: #ffffff1a; }
  body { background: var(--bg); color: var(--text); }
  header { padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .hdr { max-width: 980px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .brand { font-weight: 800; letter-spacing: .2px; }
  .theme-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
  .switch { position: relative; display: inline-block; width: 44px; height: 24px; }
  .switch input { opacity: 0; width: 0; height: 0; }
  .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #7777; transition: .2s; border-radius: 999px; border: 1px solid var(--border); }
  .slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 2px; background-color: #fff; transition: .2s; border-radius: 50%; }
  input:checked + .slider { background-color: #2226; }
  input:checked + .slider:before { transform: translateX(20px); }
  .controls { gap: 14px; }
  .controls label { color: var(--muted); font-weight: 600; letter-spacing: .2px; }
  .controls .field { display: inline-flex; align-items: center; gap: 8px; }
  .select-wrap { position: relative; display: inline-block; }
  .select-modern { -webkit-appearance: none; -moz-appearance: none; appearance: none; border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.02)); color: var(--text); padding: 10px 42px 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px -6px rgba(0,0,0,.2); transition: border-color .2s ease, box-shadow .2s ease, transform .06s ease; }
  [data-theme="dark"] .select-modern { background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00)); box-shadow: 0 1px 2px rgba(0,0,0,.5), 0 8px 24px -10px rgba(0,0,0,.8); }
  .select-modern:hover { box-shadow: 0 3px 10px rgba(0,0,0,.10), 0 10px 22px -10px rgba(0,0,0,.25); }
  .select-modern:focus { outline: none; border-color: #6aa8ff88; box-shadow: 0 0 0 4px #6aa8ff22, 0 6px 20px -8px rgba(0,0,0,.3); }
  .select-modern:active { transform: scale(.995); }
  .select-wrap:after { content: ""; position: absolute; right: 12px; top: 50%; width: 10px; height: 10px; background: currentColor; color: var(--muted); mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat center / contain; transform: translateY(-50%); opacity: .9; pointer-events: none; transition: transform .2s ease, opacity .2s ease; }
  .select-modern:focus + .chev, .select-wrap:focus-within:after { transform: translateY(-50%) rotate(180deg); opacity: 1; }
  @media (prefers-reduced-motion: reduce) { .select-modern, .select-wrap:after { transition: none; }
  }
  option { background: var(--bg); color: var(--text); }
  .updated { margin-top: 8px; }

.dd { position: relative; min-width: 260px; }
  .dd-label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px 6px; }
  .dd-control { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--bg); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.06); transition: box-shadow .2s ease, border-color .2s ease; }
  .dd-control:focus, .dd.open .dd-control { outline: none; border-color: #6aa8ff88; box-shadow: 0 0 0 4px #6aa8ff22, 0 6px 20px -8px rgba(0,0,0,.2); }
  .dd-value { flex: 1; color: var(--text); font-weight: 600; letter-spacing: .1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dd-chev { width: 16px; height: 16px; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat center / contain; background: currentColor; color: var(--muted); transition: transform .2s ease; }
  .dd.open .dd-chev { transform: rotate(180deg); }
  .dd-menu { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--bg); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 14px 40px -12px rgba(0,0,0,.35); padding: 8px; max-height: 320px; overflow: auto; z-index: 20; display: none; }
  .dd.open .dd-menu { display: block; }
  .dd-search { padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; width: 100%; background: var(--bg); color: var(--text); margin: 4px 0 8px; }
  .dd-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background .15s ease; }
  .dd-item:hover, .dd-item.active { background: rgba(100, 150, 250, .10); }
  .dd-flag { font-size: 16px; }
  .dd-text { flex: 1; }
  .dd-check { width: 16px; height: 16px; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') no-repeat center / contain; background: #2db66d; opacity: 0; }
  .dd-item.selected .dd-check { opacity: 1; }


