/* tooloomi — design tokens */
:root {
  --brand: #6D5EF5;
  --brand-600: #5a4be0;
  --brand-50: #f0eeff;
  --mint: #22C7A9;
  --mint-50: #e6faf6;
  --bg: #FAFAF9;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --text: #18181B;
  --text-2: #52525b;
  --text-3: #8a8a93;
  --border: #e7e7e4;
  --shadow: 0 1px 2px rgba(24,24,27,.04), 0 4px 16px rgba(24,24,27,.05);
  --shadow-lg: 0 2px 4px rgba(24,24,27,.04), 0 12px 32px rgba(24,24,27,.08);
  --radius: 14px;
  --radius-sm: 10px;

  --c-pdf: #ef4444;
  --c-image: #16a34a;
  --c-media: #9333ea;
  --c-calc: #2563eb;
  --c-time: #0891b2;
  --c-text: #ea580c;
  --c-random: #e11d48;
  --c-web: #6D5EF5;
  --c-dev: #3f3f46;
  --c-convert: #ca8a04;
  --c-color: #c026d3;
}
[data-theme="dark"] {
  --bg: #0F0F12;
  --surface: #17171c;
  --surface-2: #1f1f26;
  --text: #f4f4f5;
  --text-2: #b4b4bd;
  --text-3: #7c7c87;
  --border: #2a2a33;
  --brand-50: #23204a;
  --mint-50: #10302b;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.4);
  --c-dev: #a1a1aa;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  transition: background .2s, color .2s;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header .container { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), #9b8cff);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 4px 12px rgba(109,94,245,.35);
}
.logo-mark svg { width: 17px; height: 17px; }
.logo b { color: var(--brand); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-size: 14.5px; font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.select, .icon-btn {
  height: 38px; border: 1px solid var(--border); background: var(--surface);
  border-radius: 10px; padding: 0 10px; cursor: pointer; font-size: 14px;
}
.icon-btn { width: 38px; padding: 0; display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 11px; border: 0; cursor: pointer;
  font-weight: 600; font-size: 15px; transition: transform .1s, background .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(109,94,245,.3); }
.btn-primary:hover { background: var(--brand-600); }
.btn-mint { background: var(--mint); color: #fff; }
.btn-mint:hover { filter: brightness(.95); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn svg { width: 17px; height: 17px; }

/* Hero */
.hero { padding: 72px 0 40px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -200px 0 auto 0; height: 520px; z-index: -1;
  background: radial-gradient(600px 300px at 50% 40%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
              radial-gradient(400px 200px at 70% 60%, color-mix(in srgb, var(--mint) 12%, transparent), transparent 70%);
}
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 99px; background: var(--surface); border: 1px solid var(--border);
  font-size: 13.5px; color: var(--text-2); font-weight: 500;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.hero h1 { font-size: clamp(34px, 5.5vw, 58px); line-height: 1.08; letter-spacing: -.035em; margin: 20px 0 14px; font-weight: 800; }
.hero h1 span { background: linear-gradient(90deg, var(--brand), #a06bff 60%, var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 18px; color: var(--text-2); margin: 0 auto 30px; max-width: 560px; }
.search {
  max-width: 620px; margin: 0 auto; position: relative;
}
.search input {
  width: 100%; height: 60px; border-radius: 16px; border: 1px solid var(--border);
  background: var(--surface); padding: 0 120px 0 54px; font-size: 17px; box-shadow: var(--shadow-lg); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent), var(--shadow-lg); }
.search > svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-3); }
.search kbd {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-family: inherit; font-size: 12.5px; color: var(--text-3); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 7px; background: var(--surface-2);
}
.stats { display: flex; justify-content: center; gap: 28px; margin-top: 26px; color: var(--text-3); font-size: 14px; flex-wrap: wrap; }
.stats b { color: var(--text); }

/* Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 34px 0 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: all .15s;
}
.chip:hover { border-color: var(--text-3); color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* Sections & cards */
.section { padding: 28px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 22px; margin: 0; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.section-head span { color: var(--text-3); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .15s, box-shadow .15s, border-color .15s; position: relative;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--cat) 35%, var(--border)); }
.card .ico {
  width: 42px; height: 42px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--cat) 12%, transparent); color: var(--cat);
}
.card .ico svg { width: 21px; height: 21px; }
.card h3 { font-size: 15px; margin: 0; font-weight: 600; letter-spacing: -.01em; }
.card p { margin: 1px 0 0; font-size: 13px; color: var(--text-3); line-height: 1.35; }
.card .tag {
  position: absolute; top: 10px; right: 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 6px; border-radius: 5px; background: var(--brand-50); color: var(--brand); text-transform: uppercase;
}
.card .tag.live { background: var(--mint-50); color: var(--mint); }
.cat-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--cat) 12%, transparent); color: var(--cat); }
.cat-ico svg { width: 17px; height: 17px; }
.popular .card { padding: 18px; flex-direction: column; align-items: flex-start; gap: 12px; }
.popular .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.empty { text-align: center; color: var(--text-3); padding: 40px 0; display: none; }

/* Feature band */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 30px 0 10px; }
.feature { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.feature .fi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: 12px; }
.feature .fi svg { width: 20px; height: 20px; }
.feature h4 { margin: 0 0 4px; font-size: 16px; }
.feature p { margin: 0; color: var(--text-2); font-size: 14px; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 50px; padding: 36px 0; color: var(--text-3); font-size: 14px; }
.footer .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* Tool page */
.tool-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 28px; padding: 26px 0 0; }
.crumbs { font-size: 13.5px; color: var(--text-3); display: flex; gap: 8px; align-items: center; }
.crumbs a:hover { color: var(--brand); }
.tool-title { display: flex; align-items: center; gap: 14px; margin: 16px 0 6px; }
.tool-title .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--cat) 12%, transparent); color: var(--cat); flex: none; }
.tool-title .ico svg { width: 26px; height: 26px; }
.tool-title h1 { margin: 0; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.03em; line-height: 1.15; }
.tool-sub { color: var(--text-2); margin: 0 0 22px; font-size: 16.5px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 22px; }
.drop {
  display: block;
  border: 2px dashed color-mix(in srgb, var(--brand) 40%, var(--border)); border-radius: 14px;
  padding: 46px 20px; text-align: center; cursor: pointer; transition: all .15s;
  background: color-mix(in srgb, var(--brand) 4%, transparent);
}
.drop:hover, .drop.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.drop .up { width: 58px; height: 58px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(109,94,245,.35); }
.drop .up svg { width: 28px; height: 28px; }
.drop h3 { margin: 0 0 4px; font-size: 18px; }
.drop p { margin: 0; color: var(--text-3); font-size: 14px; }
.privacy { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 14px; font-size: 13.5px; color: var(--mint); font-weight: 600; }
.privacy svg { width: 16px; height: 16px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 20px; }
.field label { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--text-2); }
.field label output { color: var(--brand); }
.field select, .field input[type=number] { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); padding: 0 10px; }
input[type=range] { width: 100%; accent-color: var(--brand); height: 40px; }
.results { margin-top: 20px; display: none; }
.results.show { display: block; }
.summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: 14px; background: var(--mint-50); margin-bottom: 14px;
}
.summary b { font-size: 22px; color: var(--mint); letter-spacing: -.02em; }
.summary small { display: block; color: var(--text-2); font-size: 13.5px; }
.file {
  display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 8px; background: var(--surface);
}
.file img { width: 52px; height: 52px; object-fit: cover; border-radius: 9px; background: var(--surface-2); flex: none; }
.file .meta { flex: 1; min-width: 0; }
.file .name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file .sizes { font-size: 13px; color: var(--text-3); }
.pill { font-size: 12.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--mint-50); color: var(--mint); flex: none; }
.pill.bad { background: var(--surface-2); color: var(--text-3); }
.next { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--text-2); }

.aside { display: flex; flex-direction: column; gap: 16px; }
.ad {
  border: 1px dashed var(--border); border-radius: 14px; height: 250px; display: grid; place-items: center;
  color: var(--text-3); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; background: var(--surface-2);
}
.side-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.side-box h4 { margin: 0 0 10px; font-size: 14px; color: var(--text-2); }
.side-box a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px; font-size: 14.5px; font-weight: 500; }
.side-box a:hover { background: var(--surface-2); }
.side-box a .cat-ico { width: 28px; height: 28px; }

.content { max-width: 760px; padding: 36px 0 0; }
.content h2 { font-size: 22px; letter-spacing: -.02em; margin: 30px 0 12px; }
.content p, .content li { color: var(--text-2); }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: 13px; display: grid; place-items: center; margin-top: 1px; }
details { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; background: var(--surface); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
summary::after { content: "+"; color: var(--text-3); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 0; }

@media (max-width: 960px) {
  .nav { display: none; }
  .tool-layout { grid-template-columns: 1fr; }
  .aside .ad { height: 120px; }
}
@media (max-width: 560px) {
  .hero { padding: 48px 0 24px; }
  .search input { height: 54px; font-size: 16px; padding-right: 20px; }
  .search kbd { display: none; }
  .header .select { display: none; }
}

/* ================= v2: search, tool UI kit ================= */
.card.is-soon { opacity: .62; }
.card.is-soon:hover { opacity: 1; }
.card .tag.soon { background: var(--surface-2); color: var(--text-3); }

/* search dropdown */
.search { z-index: 15; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; display: none; text-align: left; max-height: 70vh; overflow: auto; z-index: 30; }
.suggest.open { display: block; }
.sg-note { font-size: 13px; color: var(--text-3); padding: 8px 10px 6px; }
.sg-note b { color: var(--text); }
.sg-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; }
.sg-item.sel, .sg-item:hover { background: var(--surface-2); }
.sg-item .cat-ico { flex: none; }
.sg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sg-main b { font-size: 14.5px; font-weight: 600; }
.sg-main small { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-via { font-size: 12px; color: var(--brand); background: var(--brand-50); padding: 2px 7px; border-radius: 6px; white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.sg-soon { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }
.hsearch { position: relative; flex: 1; max-width: 340px; margin-left: auto; }
.hsearch > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.hsearch input { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); padding: 0 12px 0 36px; font-size: 14px; outline: none; }
.hsearch input:focus { border-color: var(--brand); }
.hsearch .suggest { top: calc(100% + 6px); min-width: 360px; }
.hsearch + .header-actions { margin-left: 8px; }

/* forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.form-grid.compact { gap: 12px; }
.form-grid .wide, .field.wide { grid-column: 1 / -1; }
.center-grid { max-width: 520px; margin-left: auto; margin-right: auto; }
.field .ctrl { display: flex; align-items: center; gap: 6px; position: relative; }
.field .ctrl input, .field select, .field textarea, .tool textarea, .select { width: 100%; min-height: 42px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); padding: 8px 12px; outline: none; font-size: 15px; }
.field input[type=color] { width: 56px; padding: 3px; flex: none; cursor: pointer; }
.field .ctrl input:focus, .field select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.suffix { color: var(--text-3); font-size: 13.5px; white-space: nowrap; }
.field label output { color: var(--brand); }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; color: var(--text-2); margin-right: 8px; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
textarea { font: inherit; resize: vertical; line-height: 1.5; }
.mono, code, pre, textarea.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13.5px; }
.bad { border-color: var(--c-pdf) !important; }
.big-input { font-size: 20px !important; letter-spacing: .02em; }
.flags { max-width: 70px; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 18px; width: fit-content; max-width: 100%; }
.tabs.scroll { overflow-x: auto; }
.tabs.center { margin-left: auto; margin-right: auto; }
.tab { border: 0; background: none; padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.btn-row.center { justify-content: center; }
.btn.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--brand); font-weight: 600; font-size: 13px; cursor: pointer; padding: 2px 4px; }
.note { color: var(--text-3); font-size: 13.5px; margin: 10px 0; }
.note.center, .center { text-align: center; }
.ok { color: var(--mint); font-weight: 600; } .err { color: var(--c-pdf); font-weight: 600; }
p.ok, p.err { margin: 10px 0; } p.big { font-size: 18px; }

/* stat cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 6px; }
.stat { position: relative; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid transparent; }
.stat small { display: block; font-size: 12.5px; color: var(--text-3); font-weight: 600; margin-bottom: 3px; }
.stat b { font-size: 19px; letter-spacing: -.01em; word-break: break-word; }
.stat b.sm, .stat b.mono { font-size: 15px; }
.stat span { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.stat.primary { grid-column: 1 / -1; background: var(--brand-50); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.stat.primary b { font-size: 28px; color: var(--brand); }
.stat.big b { font-size: 34px; }
.cp { position: absolute; top: 8px; right: 8px; border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 15px; opacity: 0; transition: opacity .15s; }
.stat:hover .cp { opacity: 1; }
.rand-result { text-align: center; padding: 24px; border-radius: 16px; background: var(--brand-50); margin: 14px 0; }
.rand-result.left { text-align: left; }
.rand-result b { display: block; font-size: 40px; color: var(--brand); letter-spacing: -.02em; word-break: break-word; }
.rand-result b.sm { font-size: 18px; }
.rand-result span, .rand-result small { color: var(--text-2); font-size: 14px; }

/* text io */
.io { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.io.single { grid-template-columns: 1fr; }
.io-col { display: flex; flex-direction: column; min-width: 0; }
.io-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 10px 0 6px; }
.io-head span:first-child { margin-right: auto; }
.io-meta { color: var(--text-3); font-weight: 500; }
.io textarea, textarea.tall { min-height: 240px; width: 100%; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); padding: 12px; outline: none; }
textarea.tall { min-height: 340px; }
textarea.b64 { width: 100%; min-height: 90px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); padding: 10px; font-size: 12px; }
.out-html { min-height: 240px; border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; background: var(--surface); overflow: auto; }
.prose h1, .prose h2, .prose h3 { margin: .6em 0 .3em; letter-spacing: -.02em; }
.prose blockquote { border-left: 3px solid var(--brand); margin: 0; padding: 4px 14px; color: var(--text-2); }
.prose pre, pre.code { background: var(--surface-2); border-radius: 12px; padding: 14px; overflow: auto; white-space: pre; border: 1px solid var(--border); margin: 6px 0 12px; }
pre.code.wrap { white-space: pre-wrap; word-break: break-all; }
.prose code { background: var(--surface-2); padding: 2px 5px; border-radius: 5px; }
.prose img { max-width: 100%; }
.limits { display: grid; gap: 8px; margin-top: 14px; }
.limits > div { display: grid; grid-template-columns: 150px 1fr 80px; gap: 10px; align-items: center; font-size: 13.5px; }
.limits small { text-align: right; color: var(--text-3); }
.bar, .meter { height: 8px; background: var(--surface-2); border-radius: 9px; overflow: hidden; }
.bar i, .meter i { display: block; height: 100%; background: var(--mint); border-radius: 9px; transition: width .2s; }
.meter { height: 10px; margin: 12px 0 4px; }
.diff { white-space: pre-wrap; word-break: break-word; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); line-height: 1.7; font-size: 14.5px; margin-top: 10px; }
ins { background: color-mix(in srgb, var(--mint) 25%, transparent); text-decoration: none; border-radius: 3px; }
del { background: color-mix(in srgb, var(--c-pdf) 20%, transparent); border-radius: 3px; }
mark { background: color-mix(in srgb, #F59E0B 40%, transparent); color: inherit; border-radius: 3px; }
.diff-sum { margin-top: 10px; font-size: 13px; }
.fancy { display: grid; gap: 8px; margin-top: 12px; }
.fancy-row { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font-size: 17px; }
.fancy-row:hover { border-color: var(--brand); }
.fancy-row small { width: 130px; flex: none; font-size: 12px; color: var(--text-3); }
.fancy-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fancy-row em { font-style: normal; font-size: 12.5px; color: var(--brand); font-weight: 600; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
.emoji-grid button { font-size: 26px; border: 0; background: none; padding: 6px; border-radius: 9px; cursor: pointer; }
.emoji-grid button:hover { background: var(--surface-2); }
.sub-h { font-size: 15px; margin: 20px 0 8px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; margin: 10px 0; max-height: 520px; overflow-y: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { background: var(--surface-2); font-size: 12.5px; color: var(--text-2); position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.wrap { word-break: break-all; }
.chmod td { text-align: center; } .chmod input { width: 20px; height: 20px; accent-color: var(--brand); }
.code-pill { padding: 2px 8px; border-radius: 6px; font-family: ui-monospace, monospace; }
.code-pill.c2 { background: var(--mint-50); color: var(--mint); } .code-pill.c3 { background: var(--brand-50); color: var(--brand); } .code-pill.c4 { background: #fff4e5; color: #c2410c; } .code-pill.c5 { background: #fee2e2; color: #b91c1c; } .code-pill.c1 { background: var(--surface-2); }
.hash-list { display: grid; gap: 8px; margin-top: 12px; }
.hash { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.hash small { font-weight: 700; color: var(--text-2); font-size: 12.5px; }
.hash code { word-break: break-all; font-size: 13px; }
.kv { display: flex; gap: 10px; font-size: 14px; } .kv span { color: var(--text-3); width: 50px; }
.checklist { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.chips-out { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chips-out span { padding: 7px 12px; border-radius: 9px; background: var(--surface-2); font-size: 14px; }
.chips-out .click { cursor: pointer; } .chips-out .click:hover { background: var(--brand-50); color: var(--brand); }
.chip-x { display: inline-flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; background: var(--surface-2); border-radius: 9px; font-size: 13.5px; }
.chip-x button { border: 0; background: none; cursor: pointer; color: var(--text-3); font-size: 16px; }
.row-head, .row-in { display: grid; grid-template-columns: 2fr 1fr 1fr 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.row-head { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.row-in input, .row-in select { width: 100%; min-height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); padding: 6px 10px; }
.row-in .x { border: 0; background: var(--surface-2); border-radius: 8px; height: 36px; cursor: pointer; color: var(--text-3); font-size: 18px; }
.row-head.tc, .row-in.tc { grid-template-columns: 1.2fr 1fr 1fr 1fr 60px; }
.row-in.tc span { font-size: 14px; font-weight: 600; } .row-in.tc b { text-align: right; }

/* converter */
.conv { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.conv .field select { margin-top: 8px; }
.conv input { font-size: 22px !important; font-weight: 600; }
.swap { margin-bottom: 58px; font-size: 18px; }
.formula { margin: 16px 0 4px; padding: 14px 16px; border-radius: 12px; background: var(--brand-50); font-size: 15.5px; }
.formula b { color: var(--brand); }

/* calculator */
.calc { max-width: 420px; margin: 0 auto; }
.calc.sci { max-width: 560px; }
.calc-screen { background: var(--surface-2); border-radius: 16px; padding: 16px 18px; text-align: right; margin-bottom: 12px; min-height: 96px; }
#expr { color: var(--text-3); font-size: 15px; min-height: 22px; word-break: break-all; font-family: ui-monospace, monospace; }
#res { font-size: 38px; font-weight: 700; letter-spacing: -.02em; word-break: break-all; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc.sci .calc-keys { grid-template-columns: repeat(5, 1fr); }
.ck { height: 56px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-size: 18px; font-weight: 600; cursor: pointer; transition: transform .05s, background .15s; }
.calc.sci .ck { height: 48px; font-size: 15px; }
.ck:active { transform: scale(.96); }
.ck.n { background: var(--surface-2); }
.ck.fn { color: var(--c-pdf); }
.ck.eq { background: var(--brand); color: #fff; border-color: var(--brand); }
.calc-hist { margin-top: 12px; font-size: 14px; color: var(--text-2); max-height: 160px; overflow: auto; }
.calc-hist div { padding: 4px 0; border-bottom: 1px dashed var(--border); text-align: right; }

/* time */
.big-clock { font-size: clamp(48px, 10vw, 84px); font-weight: 800; text-align: center; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 10px 0; }
.clock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; }
.clock-card { padding: 14px; border-radius: 14px; background: var(--surface-2); }
.clock-card.me { background: var(--brand-50); }
.clock-card small { display: block; font-weight: 600; color: var(--text-2); }
.clock-card b { font-size: 24px; font-variant-numeric: tabular-nums; }
.clock-card span { display: block; font-size: 12.5px; color: var(--text-3); }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 560px; margin: 0 auto; }
.cd-grid div { text-align: center; padding: 18px 6px; border-radius: 16px; background: var(--brand-50); }
.cd-grid b { display: block; font-size: 42px; color: var(--brand); font-variant-numeric: tabular-nums; }
.cd-grid small { color: var(--text-2); font-weight: 600; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-head b { font-size: 20px; min-width: 200px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--text-3); padding: 6px 0; }
.cal-day { aspect-ratio: 1.3; border-radius: 10px; background: var(--surface-2); padding: 8px; font-weight: 600; }
.cal-day.today { background: var(--brand); color: #fff; }

/* random */
.wheel-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr; gap: 20px; align-items: start; }
.wheel-box { position: relative; max-width: 520px; width: 100%; margin: 0 auto; }
.wheel-box canvas { width: 100%; height: auto; display: block; }
.wheel-pin { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 28px solid var(--text); filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.wheel-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 78px; height: 78px; border-radius: 50%; border: 4px solid #fff; background: var(--text); color: var(--bg); font-weight: 800; cursor: pointer; box-shadow: var(--shadow-lg); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.team { border-radius: 14px; padding: 14px; background: color-mix(in srgb, var(--tc) 12%, transparent); border-top: 4px solid var(--tc); display: flex; flex-direction: column; gap: 4px; }
.team b { color: var(--tc); margin-bottom: 4px; }
.dice { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.die { font-size: 72px; line-height: 1; min-width: 72px; text-align: center; display: inline-grid; place-items: center; }
.die:not(:empty) { font-variant-numeric: tabular-nums; }
.coin { width: 160px; height: 160px; margin: 20px auto; position: relative; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.2,.8,.3,1); }
.coin .f { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; font-size: 56px; font-weight: 800; backface-visibility: hidden; background: radial-gradient(circle at 35% 30%, #fde68a, #d97706); color: #7c2d12; box-shadow: inset 0 0 0 8px rgba(0,0,0,.08); }
.coin .t { transform: rotateY(180deg); }
.pw-out { display: flex; gap: 8px; align-items: center; }
.pw-out input { flex: 1; min-height: 54px; font-size: 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); padding: 0 14px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.swatch { height: 110px; border-radius: 14px; border: 0; cursor: pointer; display: flex; align-items: flex-end; padding: 0; overflow: hidden; }
.swatch span { background: rgba(255,255,255,.92); color: #111; width: 100%; padding: 6px; font-size: 13px; font-weight: 600; font-family: ui-monospace, monospace; }
.swatch-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.swatch.sm { height: 70px; } .swatch.sm span { font-size: 11px; padding: 4px; }
.balls { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.balls span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface); border: 2px solid var(--brand); color: var(--brand); }
.balls .bonus { background: var(--c-pdf); border-color: var(--c-pdf); color: #fff; }
.rps { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.rps button { width: 120px; padding: 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rps button span { font-size: 48px; } .rps button:hover { border-color: var(--brand); }

/* color */
.picker { display: flex; gap: 16px; align-items: stretch; flex-wrap: wrap; }
.picker input[type=color] { width: 220px; height: 160px; border: 0; padding: 0; background: none; cursor: pointer; }
.picker-side { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 160px; }
.big-swatch { flex: 1; min-height: 100px; border-radius: 16px; border: 1px solid var(--border); }
.dot-sw { width: 34px; height: 34px; border-radius: 9px; flex: none; border: 1px solid var(--border); }
.gen { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.gen-preview { min-height: 260px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; }
.gen-preview.grad { min-height: 260px; }
.gen-box { width: 180px; height: 130px; background: var(--surface); }
.gen-preview.glass-bg { background: linear-gradient(135deg, #6D5EF5, #22C7A9 60%, #F59E0B); }
.stops { display: grid; gap: 8px; }
.stop { display: grid; grid-template-columns: 56px 1fr 48px 30px; gap: 10px; align-items: center; }
.stop input[type=color] { width: 56px; height: 38px; border: 1px solid var(--border); border-radius: 9px; padding: 2px; }
.stop .x { border: 0; background: var(--surface-2); border-radius: 8px; height: 30px; cursor: pointer; }
.palette { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); border-radius: 16px; overflow: hidden; margin: 12px 0; min-height: 150px; }
.palette button { border: 0; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding: 12px 4px; font-weight: 700; font-family: ui-monospace, monospace; font-size: 13px; min-height: 150px; }
.contrast-preview { padding: 22px; border-radius: 16px; border: 1px solid var(--border); margin: 12px 0; }
.contrast-preview b { font-size: 24px; }
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 14px; }
.cb-item small { display: block; font-weight: 700; margin-bottom: 4px; }
.cb-item canvas { width: 100%; height: auto; border-radius: 10px; }
.pfi { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; align-items: center; }
.pfi img { max-width: 100%; border-radius: 12px; }
.pfi img:not([src]), .pfi img[src=""] { display: none; }

/* web / qr */
.qr-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.qr-box { background: var(--surface-2); border-radius: 16px; padding: 18px; display: grid; place-items: center; min-height: 280px; }
.qr-box canvas { width: 100%; max-width: 280px; height: auto; border-radius: 8px; }
.qr-box.bar svg { max-width: 100%; height: auto; background: #fff; border-radius: 8px; }
.scan-video, .rec-video { width: 100%; max-height: 420px; border-radius: 14px; background: #000; margin: 10px 0; }
.serp { padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: #fff; color: #202124; font-family: Arial, sans-serif; max-width: 640px; }
.serp.m { max-width: 400px; }
.serp-site { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.serp-site .fav { width: 28px; height: 28px; border-radius: 50%; background: #f1f3f4; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.serp-site b { font-size: 14px; font-weight: 400; display: block; } .serp-site small { font-size: 12px; color: #4d5156; }
.serp-t { font-size: 20px; color: #1a0dab; display: block; margin: 4px 0; line-height: 1.3; }
.serp p { font-size: 14px; color: #4d5156; margin: 0; line-height: 1.58; }
.kd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }
.speed { text-align: center; }
.gauge { width: 200px; height: 200px; margin: 10px auto; border-radius: 50%; border: 10px solid var(--brand-50); border-top-color: var(--brand); display: grid; place-content: center; }
.gauge b { font-size: 44px; } .gauge small { color: var(--text-3); }

/* media & files */
.canvas-wrap { overflow: auto; border-radius: 14px; background: var(--surface-2); padding: 10px; margin: 12px 0; text-align: center; }
.canvas-wrap canvas, .b64-prev { max-width: 100%; height: auto; border-radius: 8px; }
canvas.pick { cursor: crosshair; }
.cpi { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.wave { width: 100%; height: 120px; background: var(--surface-2); border-radius: 12px; margin: 10px 0; display: block; }
.dual { width: 100%; accent-color: var(--brand); }
.media-out audio, .media-out video { max-width: 260px; height: 40px; }
.media-out video { height: auto; max-height: 140px; }
.sort-list { display: grid; gap: 6px; margin: 12px 0; }
.sort-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 14px; }
.sort-item span:not(.pdf-ico) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sort-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.sort-item button { border: 0; background: var(--surface-2); border-radius: 7px; width: 30px; height: 30px; cursor: pointer; }
.pdf-ico { flex: none; width: 40px; height: 48px; border-radius: 8px; background: color-mix(in srgb, var(--c-pdf) 14%, transparent); color: var(--c-pdf); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.tile-grid { display: grid; gap: 8px; margin: 12px 0; }
.tile-grid.auto { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.tile-grid a { position: relative; display: block; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.tile-grid img { width: 100%; display: block; }
.tile-grid span { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 2px 7px; border-radius: 6px; }
.fav-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
.fav-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; min-width: 110px; }
.fav-grid small { font-size: 11.5px; color: var(--text-2); }
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin: 12px 0; }
.pg { position: relative; border: 2px solid var(--border); border-radius: 10px; padding: 8px; background: var(--surface); cursor: pointer; text-align: center; user-select: none; }
.pg img { width: 100%; height: 160px; object-fit: contain; transition: transform .2s; }
.pg span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.pg.sel { border-color: var(--brand); background: var(--brand-50); }
.pg .r, .pg .x { position: absolute; top: 6px; right: 6px; border: 0; background: var(--brand); color: #fff; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 15px; }
.pg .x { background: var(--c-pdf); }
.pg[draggable=true] { cursor: grab; }
.place-stage { overflow: auto; border-radius: 12px; background: var(--surface-2); padding: 10px; text-align: center; }
.place-stage canvas { max-width: 100%; box-shadow: var(--shadow-lg); cursor: crosshair; }
.sig-pad { width: 100%; max-width: 600px; height: auto; aspect-ratio: 3; background: #fff; border: 1px dashed var(--border); border-radius: 12px; touch-action: none; cursor: crosshair; display: block; }
.sig-type { font-family: "Homemade Apple", cursive; font-size: 28px !important; }
.crop-stage { position: relative; display: inline-block; max-width: 100%; user-select: none; touch-action: none; }
.crop-stage img { max-width: 100%; max-height: 70vh; display: block; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.5); cursor: move; }
.crop-box i { position: absolute; width: 16px; height: 16px; background: #fff; border-radius: 50%; border: 2px solid var(--brand); }
.crop-box i[data-h=nw] { left: -9px; top: -9px; cursor: nwse-resize; } .crop-box i[data-h=ne] { right: -9px; top: -9px; cursor: nesw-resize; }
.crop-box i[data-h=sw] { left: -9px; bottom: -9px; cursor: nesw-resize; } .crop-box i[data-h=se] { right: -9px; bottom: -9px; cursor: nwse-resize; }
.crop-ui { text-align: center; }
.wide-range { width: 100%; accent-color: var(--brand); }
.beats { display: flex; justify-content: center; gap: 10px; margin: 16px 0; }
.beats i { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); transition: background .05s; }
.beats i.on { background: var(--brand); }
.tuner { text-align: center; }
.tuner-note { font-size: 84px; font-weight: 800; color: var(--text-2); }
.tuner-note.ok { color: var(--mint); }
.tuner-meter { position: relative; height: 12px; background: linear-gradient(90deg, var(--c-pdf), #F59E0B 35%, var(--mint) 48% 52%, #F59E0B 65%, var(--c-pdf)); border-radius: 9px; max-width: 420px; margin: 12px auto; }
.tuner-meter i { position: absolute; top: -8px; left: 50%; width: 4px; height: 28px; background: var(--text); border-radius: 3px; transform: translateX(-50%); transition: left .1s; }
.tuner-info { display: flex; justify-content: center; gap: 24px; color: var(--text-2); }
.strings { display: flex; justify-content: center; gap: 8px; margin: 12px 0; }
.strings span { padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-weight: 700; }
.strings span.on { background: var(--mint); color: #fff; }
.noise-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.noise { padding: 22px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; }
.noise b { display: block; font-size: 17px; } .noise small { color: var(--text-3); }
.noise.on { background: var(--brand); color: #fff; border-color: var(--brand); } .noise.on small { color: #e0dcff; }
.cron-labels { display: grid; grid-template-columns: repeat(5, 1fr); font-size: 12px; color: var(--text-3); text-align: center; margin: -4px 0 8px; }
iframe.preview { width: 100%; min-height: 340px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }

/* soon / server notice */
.soon-box { text-align: center; padding: 34px 20px; }
.soon-box .big-ico { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: 28px; }
.soon-box h3 { margin: 0 0 6px; font-size: 20px; }
.soon-box p { color: var(--text-2); max-width: 460px; margin: 0 auto 16px; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 100; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 960px) {
  .hsearch { max-width: none; }
  .qr-layout, .wheel-layout, .gen, .cpi, .pfi { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .io { grid-template-columns: 1fr; }
  .conv { grid-template-columns: 1fr; } .swap { margin: 0 auto; transform: rotate(90deg); }
  .hash { grid-template-columns: 1fr auto; } .hash small { grid-column: 1 / -1; }
  .limits > div { grid-template-columns: 110px 1fr 70px; }
  .fancy-row small { width: 80px; }
  .hsearch .suggest { min-width: 0; position: fixed; left: 12px; right: 12px; top: 64px; }
  .cd-grid b { font-size: 30px; }
  .header .container { gap: 10px; }
  .header:has(.hsearch) .logo span:last-child { display: none; }
}
.note .table-wrap, .note .sub-h { color: var(--text); }
.vid-wrap { position: relative; display: block; text-align: center; background: #000; border-radius: 14px; margin: 10px 0; }
.vid-wrap .rec-video { margin: 0; display: inline-block; width: auto; max-width: 100%; max-height: 420px; vertical-align: top; transition: transform .2s; }
.vid-overlay { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); touch-action: none; }
.progress { position: relative; height: 28px; background: var(--surface-2); border-radius: 10px; overflow: hidden; margin: 10px 0; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--brand), var(--mint)); transition: width .2s; }
.progress span { position: relative; display: block; text-align: center; line-height: 28px; font-size: 13px; font-weight: 700; color: var(--text); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.compare small { display: block; font-weight: 700; color: var(--text-2); margin-bottom: 4px; }
.compare img { width: 100%; border-radius: 10px; image-rendering: auto; background: var(--surface-2); }
.privacy.cloud { color: var(--brand); }
.menu-btn { display: none; }
.nav .more { display: none; }
@media (max-width: 960px) {
  .menu-btn { display: grid; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 16px 14px; box-shadow: var(--shadow-lg); z-index: 40; gap: 0; }
  .nav.open a { padding: 12px 8px; border-bottom: 1px solid var(--border); font-size: 16px; }
  .nav.open .more { display: block; }
}
.legal { max-width: 760px; padding: 40px 0 0; }
.legal h1 { font-size: clamp(30px, 4vw, 40px); letter-spacing: -.03em; margin: 0 0 6px; }
.legal .updated { color: var(--text-3); font-size: 14px; margin-bottom: 26px; }
.legal h2 { font-size: 21px; margin: 30px 0 8px; letter-spacing: -.02em; }
.legal p, .legal li { color: var(--text-2); }
.legal a { color: var(--brand); }
.contact-card { display: grid; gap: 10px; margin: 18px 0; }
.contact-card a { display: flex; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text) !important; font-weight: 600; }
.vid-overlay, .crop-stage { overflow: hidden; }
