:root {
  --bg: #090c11;
  --bg-soft: #0d1118;
  --panel: rgba(17, 22, 30, 0.82);
  --panel-strong: #121821;
  --card: rgba(18, 24, 33, 0.8);
  --card-hover: #161e29;
  --text: #f6f8fb;
  --muted: #8f9bad;
  --muted-2: #667386;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);
  --accent: #7cffa8;
  --accent-soft: rgba(124,255,168,0.12);
  --accent-2: #5ae6ff;
  --danger: #ff7b88;
  --warning: #ffd479;
  --shadow: 0 30px 80px rgba(0,0,0,.34);
  --radius: 24px;
}

body.light {
  --bg: #f3f6f8;
  --bg-soft: #edf1f4;
  --panel: rgba(255,255,255,.86);
  --panel-strong: #ffffff;
  --card: rgba(255,255,255,.86);
  --card-hover: #ffffff;
  --text: #10151c;
  --muted: #657182;
  --muted-2: #8591a1;
  --line: rgba(10,20,30,.09);
  --line-strong: rgba(10,20,30,.15);
  --accent: #22b968;
  --accent-soft: rgba(34,185,104,.1);
  --accent-2: #18a7c5;
  --shadow: 0 28px 70px rgba(32,49,65,.14);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% -10%, rgba(84, 180, 137, .08), transparent 37%),
    var(--bg);
  color: var(--text);
  transition: background .25s ease, color .25s ease;
  overflow-x: hidden;
}

button, textarea, input, select { font: inherit; }

button { color: inherit; }

button:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(100px);
  opacity: .12;
  pointer-events: none;
  z-index: 0;
}
.ambient-one { width: 360px; height: 360px; background: #49ff9a; top: 100px; left: -190px; }
.ambient-two { width: 420px; height: 420px; background: #2fcff1; right: -260px; top: 420px; opacity: .08; }

.topbar, main, footer { position: relative; z-index: 1; }

.topbar {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(124,255,168,.2);
}

.brand-mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark.small { width: 30px; height: 30px; border-radius: 9px; }

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.privacy-status {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}

.status-dot, .toast-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.icon-button, .close-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  cursor: pointer;
  transition: .2s ease;
}
.icon-button { width: 36px; height: 36px; border-radius: 11px; }
.icon-button:hover, .close-button:hover { background: var(--card-hover); border-color: var(--line-strong); }
.icon-button svg, .close-button svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
}
.sun-icon { display: none; }
body.light .moon-icon { display: none; }
body.light .sun-icon { display: block; }

main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }

.hero {
  min-height: 530px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 80px 0 92px;
}

.hero-badge, .eyebrow, .modal-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--accent);
}

.hero-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(124,255,168,.18);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 9px 12px;
  margin-bottom: 24px;
}

.badge-spark { font-size: 11px; }

.hero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(44px, 7.2vw, 82px);
  line-height: .98;
  letter-spacing: -0.065em;
  font-weight: 800;
}

.hero h1 span {
  display: inline-block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 650;
}

.hero-copy {
  margin: 28px auto 0;
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.7;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.primary-button {
  height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px 0 20px;
  background: var(--text);
  color: var(--bg);
  font-weight: 750;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform .2s ease, opacity .2s ease;
}
.primary-button:hover { transform: translateY(-2px); }
.primary-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

.local-note { display: flex; align-items: center; gap: 10px; text-align: left; }
.local-note .lock-mini {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; background: var(--accent-soft); color: var(--accent);
  font-size: 19px;
}
.local-note span:last-child { display: flex; flex-direction: column; gap: 2px; }
.local-note strong { font-size: 12px; }
.local-note small { color: var(--muted); font-size: 11px; }

.tools-section {
  border-top: 1px solid var(--line);
  padding: 74px 0 86px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 9px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.045em;
}

.section-heading p {
  max-width: 430px;
  margin: 0 0 4px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tool-card {
  min-height: 205px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  padding: 22px;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
  backdrop-filter: blur(18px);
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--card-hover);
}
.tool-card.featured::after {
  content: "";
  position: absolute;
  width: 180px; height: 180px; border-radius: 50%;
  background: var(--accent);
  filter: blur(90px);
  opacity: .08;
  top: -100px; right: -80px;
}

.tool-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 13px; border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
}
.tool-icon svg {
  width: 20px; height: 20px; fill: none;
  stroke: var(--text); stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round;
}

.tool-copy { display: flex; flex-direction: column; margin-top: auto; }
.tool-copy strong { font-size: 16px; letter-spacing: -.02em; }
.tool-copy small { margin-top: 7px; max-width: 290px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.tool-tag {
  position: absolute; top: 22px; right: 22px;
  font-size: 8px; font-weight: 800; letter-spacing: .12em;
  color: var(--accent); border: 1px solid rgba(124,255,168,.18);
  border-radius: 999px; padding: 5px 7px; background: var(--accent-soft);
}
.tool-tag.new { color: var(--accent-2); border-color: rgba(90,230,255,.18); background: rgba(90,230,255,.08); }

.card-arrow {
  position: absolute; right: 20px; bottom: 19px;
  color: var(--muted-2); opacity: 0;
  transform: translate(-3px, 3px);
  transition: .2s ease;
}
.tool-card:hover .card-arrow { opacity: 1; transform: translate(0,0); }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.trust-strip > div { padding: 28px 26px 30px; border-right: 1px solid var(--line); }
.trust-strip > div:last-child { border-right: 0; }
.trust-strip span { display: block; font-size: 9px; font-weight: 800; letter-spacing: .14em; color: var(--accent); margin-bottom: 14px; }
.trust-strip strong { display: block; font-size: 14px; }
.trust-strip small { display: block; color: var(--muted); margin-top: 7px; line-height: 1.5; }

footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand > div { display: flex; flex-direction: column; gap: 2px; }
.footer-brand strong { font-size: 13px; }
.footer-brand small, .footer-version { color: var(--muted-2); font-size: 10px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2,5,9,.68);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.tool-modal {
  width: min(760px, 100%);
  max-height: min(820px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  transform: translateY(14px) scale(.985);
  transition: transform .22s ease;
}
.modal-backdrop.open .tool-modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-header h3 { margin: 7px 0 0; font-size: 22px; letter-spacing: -.035em; }
.close-button { width: 36px; height: 36px; border-radius: 11px; }
.modal-body { padding: 22px; overflow-y: auto; max-height: calc(100vh - 145px); }

.tool-description {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}
.field-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.field-label span:last-child { color: var(--muted-2); font-weight: 600; }

textarea, input[type="text"], input[type="number"], .output-box {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 14px;
}
textarea {
  resize: vertical;
  min-height: 145px;
  padding: 14px;
  line-height: 1.55;
  font-size: 13px;
}
input[type="text"], input[type="number"] { height: 44px; padding: 0 13px; }

.tool-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.action-btn {
  height: 40px;
  border-radius: 11px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: .18s ease;
}
.action-btn:hover { border-color: var(--line-strong); background: var(--card-hover); }
.action-btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.action-btn.danger { color: var(--danger); }
.action-btn:disabled { opacity: .45; cursor: not-allowed; }

.output-wrap { margin-top: 18px; }
.output-box {
  min-height: 68px;
  padding: 13px 14px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}
.output-box.mono, textarea.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.stat-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stat-chip {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 10px;
  color: var(--muted);
}
.stat-chip strong { color: var(--text); margin-left: 4px; }

.option-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 15px;
}
.range-wrap { display: grid; grid-template-columns: 1fr 62px; gap: 10px; align-items: center; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.check-pill input { accent-color: var(--accent); }

.password-result {
  display: flex;
  align-items: center;
  gap: 8px;
}
.password-result .output-box { min-height: 48px; display: flex; align-items: center; flex: 1; }
.strength {
  margin-top: 10px;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
}
.strength > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }

.dropzone {
  border: 1px dashed var(--line-strong);
  background: var(--bg-soft);
  border-radius: 16px;
  min-height: 175px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  cursor: pointer;
  transition: .18s ease;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { display: block; margin-bottom: 7px; font-size: 14px; }
.dropzone small { color: var(--muted); line-height: 1.5; }
.dropzone input { display: none; }
.preview-image {
  display: block;
  max-width: 100%;
  max-height: 280px;
  margin: 18px auto 0;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.notice {
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.notice.ok { border-color: rgba(124,255,168,.18); background: var(--accent-soft); }
.notice.warn { border-color: rgba(255,212,121,.2); background: rgba(255,212,121,.06); }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 700;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 900px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading { align-items: start; flex-direction: column; }
  .section-heading p { max-width: 560px; }
}

@media (max-width: 640px) {
  .topbar, main, footer { width: min(100% - 24px, 1180px); }
  .topbar { height: 72px; }
  .privacy-status { display: none; }
  .hero { min-height: auto; padding: 74px 0 76px; }
  .hero h1 { font-size: clamp(40px, 13vw, 58px); }
  .hero-copy { font-size: 14px; margin-top: 23px; }
  .hero-actions { width: 100%; flex-direction: column; gap: 16px; }
  .primary-button { width: 100%; justify-content: center; }
  .local-note { align-self: flex-start; }
  .tools-section { padding: 54px 0 64px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 176px; }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-strip > div { border-right: 0; border-bottom: 1px solid var(--line); padding-left: 4px; padding-right: 4px; }
  .trust-strip > div:last-child { border-bottom: 0; }
  footer { min-height: 130px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 15px; }
  .tool-modal { border-radius: 20px; }
  .modal-header { padding: 18px 17px 15px; }
  .modal-body { padding: 17px; }
  .option-grid { grid-template-columns: 1fr; gap: 8px; }
  .toast { right: 12px; bottom: 12px; left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* v0.2 — cleaner result + QR */
.result-summary {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 13px;
}
.result-summary-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.result-summary-icon {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
}
.result-summary strong { display: block; font-size: 12px; }
.result-summary small { display: block; color: var(--muted); margin-top: 2px; font-size: 10px; }
.result-summary.success { border-color: rgba(124,255,168,.18); background: var(--accent-soft); }
.result-summary.changed { border-color: rgba(90,230,255,.18); background: rgba(90,230,255,.06); }
.result-summary.error { border-color: rgba(255,123,136,.2); background: rgba(255,123,136,.06); }

.qr-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
  padding: 16px;
}
.qr-panel[hidden] { display: none !important; }
.qr-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.qr-panel-head strong { font-size: 12px; }
.qr-panel-head small { color: var(--muted); font-size: 10px; }
.qr-content {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: center;
}
.qr-box {
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}
.qr-box img, .qr-box canvas { max-width: 100%; max-height: 100%; }
.qr-details { min-width: 0; }
.qr-details p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  word-break: break-word;
}
.qr-input-row { display: grid; grid-template-columns: 1fr 110px; gap: 9px; }
.qr-size-select {
  height: 44px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 12px;
  padding: 0 11px;
}
.qr-standalone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 18px;
  align-items: start;
}
.qr-preview-card {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  place-items: center;
  min-height: 260px;
}
.qr-preview-placeholder { text-align: center; color: var(--muted); font-size: 11px; line-height: 1.5; }
.qr-preview-placeholder strong { display: block; color: var(--text); font-size: 13px; margin-bottom: 5px; }
.qr-preview-card .qr-box { width: 198px; height: 198px; }

@media (max-width: 640px) {
  .qr-content, .qr-standalone { grid-template-columns: 1fr; }
  .qr-box { width: min(220px, 100%); height: auto; aspect-ratio: 1; margin: 0 auto; }
  .qr-preview-card { min-height: 230px; }
  .qr-input-row { grid-template-columns: 1fr; }
  .result-summary { align-items: flex-start; }
}


/* v0.3 — File Hash + Image Studio */
.compact-dropzone { min-height: 145px; }
.file-summary-card {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
}
.file-summary-icon {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
  font-family: "SFMono-Regular", Consolas, monospace;
}
.file-summary-copy { min-width: 0; flex: 1; }
.file-summary-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.file-summary-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.file-private-badge {
  flex: 0 0 auto;
  padding: 5px 7px;
  border: 1px solid rgba(124,255,168,.18);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}
.hash-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 16px;
}
.wide-select { width: 100%; }
.hash-run-btn { min-width: 122px; }
.hash-output { min-height: 82px; user-select: all; }
.hash-compare { margin-top: 18px; }

.image-studio-layout {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(220px, .86fr) 1.14fr;
  gap: 18px;
  align-items: start;
}
.image-preview-shell {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
  padding: 10px;
  min-width: 0;
}
.preview-image.studio-preview {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  margin: 0;
  border: 0;
  border-radius: 11px;
  background: rgba(255,255,255,.02);
}
.image-preview-caption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.studio-settings {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 3px 0;
}
.dimension-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.dimension-grid div { min-width: 0; }
.dimension-grid small { display: block; margin: 0 0 6px; color: var(--muted); font-size: 9px; }
.dimension-grid input { width: 100%; }
.studio-lock { margin-top: 9px; width: fit-content; }
.studio-actions { margin-top: 18px; }
.studio-result {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.studio-result[hidden] { display: none !important; }
.studio-metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  padding: 11px;
}
.studio-metric span { display: block; color: var(--muted); font-size: 9px; margin-bottom: 5px; }
.studio-metric strong { font-size: 12px; }
.studio-metric.emphasis { border-color: rgba(124,255,168,.16); background: var(--accent-soft); }
.saving-good { color: var(--accent); }
.saving-warn { color: var(--warning); }

@media (max-width: 640px) {
  .hash-controls, .image-studio-layout { grid-template-columns: 1fr; }
  .hash-run-btn { width: 100%; }
  .studio-result { grid-template-columns: 1fr 1fr; }
  .dimension-grid { grid-template-columns: 1fr 1fr; }
  .file-private-badge { display: none; }
}


/* v0.4 — QR Reader + File Inspector */
.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
}
.reader-preview {
  position: relative;
  min-height: 270px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.reader-preview img,
.reader-preview video {
  width: 100%;
  max-height: 390px;
  object-fit: contain;
  display: block;
}
.reader-preview video {
  min-height: 270px;
  object-fit: cover;
}
.reader-placeholder {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.reader-placeholder strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 6px;
}
.reader-scan-frame {
  pointer-events: none;
  position: absolute;
  width: min(62%, 210px);
  aspect-ratio: 1;
  border: 1px solid rgba(124,255,168,.32);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(0,0,0,.18);
}
.reader-scan-frame::before,
.reader-scan-frame::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--accent);
}
.reader-scan-frame::before {
  left: -1px; top: -1px;
  border-left: 2px solid var(--accent);
  border-top: 2px solid var(--accent);
  border-radius: 8px 0 0 0;
}
.reader-scan-frame::after {
  right: -1px; bottom: -1px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  border-radius: 0 0 8px 0;
}
.reader-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reader-result-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--bg-soft);
  padding: 14px;
}
.reader-result-card[hidden] { display: none !important; }
.reader-result-card span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
}
.reader-result-value {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}
.reader-compat {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}
.reader-compat strong { color: var(--text); }

.inspector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.inspector-metric {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 11px;
}
.inspector-metric span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 5px;
}
.inspector-metric strong {
  display: block;
  font-size: 11px;
  word-break: break-word;
}
.inspector-section {
  margin-top: 18px;
}
.hex-preview {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.7;
  word-break: break-all;
}
.text-preview {
  max-height: 230px;
  overflow: auto;
  white-space: pre-wrap;
}
.signature-good { color: var(--accent); }
.signature-neutral { color: var(--warning); }

.repo-ready-strip {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(90,230,255,.16);
  background: rgba(90,230,255,.05);
  border-radius: 12px;
  color: var(--muted);
  font-size: 10px;
}
.repo-ready-strip strong { color: var(--text); }

@media (max-width: 640px) {
  .reader-layout { grid-template-columns: 1fr; }
  .reader-preview { min-height: 230px; }
  .reader-preview video { min-height: 230px; }
  .inspector-grid { grid-template-columns: 1fr 1fr; }
}
