/* ───────────── tokens ───────────── */
:root {
  color-scheme: dark;
  interpolate-size: allow-keywords;

  --bg: #0c0c0b;
  --text: #f2f1ed;
  --text-2: rgb(242 241 237 / 0.62);
  --text-3: rgb(242 241 237 / 0.4);
  --fill: rgb(255 255 255 / 0.05);
  --fill-2: rgb(255 255 255 / 0.09);
  --fill-3: rgb(255 255 255 / 0.16);
  --hairline: rgb(255 255 255 / 0.08);
  --dash: rgb(255 255 255 / 0.16);
  --rim: rgb(255 255 255 / 0.45);
  --spec: rgb(255 255 255 / 0.26);
  --well: rgb(0 0 0 / 0.3);
  --glass-tint: linear-gradient(180deg, rgb(255 255 255 / 0.09), rgb(255 255 255 / 0.035));
  --shadow-lg: 0 40px 80px -36px rgb(0 0 0 / 0.85), 0 12px 30px -16px rgb(0 0 0 / 0.6);
  --shadow-sm: 0 8px 20px -12px rgb(0 0 0 / 0.7);

  /* One accent, used sparingly. Everything else is ink and paper. */
  --accent: #ff6a2b;
  --solid: #f2f1ed;
  --ink: #0c0c0b;
  --focus: rgb(242 241 237 / 0.55);
  --focus-glow: rgb(242 241 237 / 0.09);
  --danger: #ff5f57;
  --danger-glow: rgb(255 95 87 / 0.14);
  --ticker: rgb(255 255 255 / 0.035);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  --font-num: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --out: cubic-bezier(0.22, 1, 0.36, 1);
  --cell: 92px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #ebe9e4;
    --text: #141412;
    --text-2: rgb(20 20 18 / 0.62);
    --text-3: rgb(20 20 18 / 0.42);
    --fill: rgb(255 255 255 / 0.4);
    --fill-2: rgb(255 255 255 / 0.6);
    --fill-3: rgb(255 255 255 / 0.92);
    --hairline: rgb(20 20 18 / 0.08);
    --dash: rgb(20 20 18 / 0.2);
    --rim: rgb(255 255 255 / 0.95);
    --spec: rgb(255 255 255 / 0.9);
    --well: rgb(255 255 255 / 0.4);
    --glass-tint: linear-gradient(180deg, rgb(255 255 255 / 0.62), rgb(255 255 255 / 0.38));
    --shadow-lg: 0 40px 80px -40px rgb(30 25 15 / 0.3), 0 12px 30px -18px rgb(30 25 15 / 0.22);
    --shadow-sm: 0 8px 20px -12px rgb(30 25 15 / 0.3);
    --accent: #e4511b;
    --solid: #141412;
    --ink: #f7f6f2;
    --focus: rgb(20 20 18 / 0.5);
    --focus-glow: rgb(20 20 18 / 0.07);
    --danger: #d63a32;
    --danger-glow: rgb(214 58 50 / 0.12);
    --ticker: rgb(20 20 18 / 0.045);
  }
}

/* ───────────── base ───────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

button,
label,
summary,
[role="tab"],
.btn,
.badge {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

h1,
h2 {
  text-wrap: balance;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.fx {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.i {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ───────────── backdrop: oversized codes drifting behind the glass ───────────── */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ticker {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: space-evenly;
  color: var(--ticker);
  font: 800 clamp(150px, 34vh, 380px)/0.82 var(--font-display);
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  user-select: none;
}

.track {
  display: flex;
  width: max-content;
  animation: ticker 150s linear infinite;
  will-change: transform;
}

.track:nth-child(2) {
  animation-duration: 190s;
  animation-direction: reverse;
}

.track span {
  padding-right: 0.3em;
}

@keyframes ticker {
  to { transform: translate3d(-50%, 0, 0); }
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ───────────── liquid glass ───────────── */
.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass-tint);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    inset 0 1px 0.5px var(--spec),
    inset 0 -1px 0.5px rgb(255 255 255 / 0.06),
    var(--shadow-lg);
}

/* Rim light: bright where light enters (top-left) and leaves (bottom-right). */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(140deg,
      var(--rim),
      rgb(255 255 255 / 0.1) 26%,
      rgb(255 255 255 / 0.02) 50%,
      rgb(255 255 255 / 0.08) 74%,
      rgb(255 255 255 / 0.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Sheen that follows the pointer across the surface. */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), rgb(255 255 255 / 0.07), transparent 60%);
  opacity: var(--sheen, 0);
  transition: opacity 0.6s;
}

/* ───────────── layout ───────────── */
.shell {
  width: min(100% - 32px, 540px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 0 max(36px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font: 680 19px/1 var(--font-display);
  letter-spacing: -0.03em;
}

.logo {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.logo .hot {
  fill: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 560;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: inset 0 1px 0.5px var(--spec), var(--shadow-sm);
  transition: color 0.2s, transform 0.3s var(--spring);
}

a.badge:hover {
  color: var(--text);
}

a.badge:active {
  transform: scale(0.96);
}

.badge .i {
  width: 15px;
  height: 15px;
  color: var(--text-3);
  transition: color 0.2s;
}

a.badge:hover .i {
  color: var(--text);
}

/* Filled icons, like the GitHub mark, instead of the usual outlines. */
.i.solid {
  fill: currentColor;
  stroke: none;
}

.hero {
  padding: 18px 2px 4px;
}

.hero h1 {
  margin: 0;
  font: 660 clamp(30px, 7vw, 42px)/1.08 var(--font-display);
  letter-spacing: -0.035em;
}

.hero h1 span {
  color: var(--text-3);
}

/* Entrance: everything settles in from a soft blur. Fill backwards only: a
   lingering filter animation would make the element a backdrop root and stop
   any glass inside it from seeing the page behind. */
.reveal {
  animation: rise 0.6s var(--out) backwards;
}

.d1 { animation-delay: 40ms; }
.d2 { animation-delay: 80ms; }
.d3 { animation-delay: 120ms; }
.d4 { animation-delay: 160ms; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(8px);
  }
}

/* ───────────── segmented control ───────────── */
.seg {
  align-self: center;
  touch-action: pan-y;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 280px);
  padding: 4px;
  border-radius: 999px;
  box-shadow: inset 0 1px 0.5px var(--spec), var(--shadow-sm);
}

.seg button {
  position: relative;
  z-index: 1;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.seg button[aria-selected="true"] {
  color: var(--text);
}

.seg-thumb,
.chips-thumb {
  position: absolute;
  left: 0;
  border-radius: 999px;
  background: var(--fill-3);
  will-change: transform;
  transition: box-shadow 0.25s var(--out);
}

.seg-thumb {
  top: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  transform: translateX(4px);
  box-shadow:
    inset 0 1px 0.5px var(--spec),
    0 6px 16px -8px rgb(0 0 0 / 0.55);
}

/* Held: the pill lifts off the track. */
.seg-thumb.pressed,
.chips-thumb.pressed {
  box-shadow:
    inset 0 1px 0.5px var(--spec),
    inset 0 0 0 1px var(--hairline),
    0 8px 18px -8px rgb(0 0 0 / 0.6);
}

/* While dragging, the label under the pill lights up instead of the current choice. */
.dragging {
  cursor: grabbing;
}

.dragging [aria-selected="true"]:not(.lit),
.dragging [aria-checked="true"]:not(.lit) {
  color: var(--text-2);
}

.seg button.lit,
.chips button.lit {
  color: var(--text);
}

/* ───────────── card + views ───────────── */
.card {
  padding: 22px;
  border-radius: 32px;
}

.card.animating {
  overflow: hidden;
}

.viewport {
  display: grid;
}

.view {
  grid-area: 1 / 1;
  display: none;
  min-width: 0;
}

.view.active,
.view.leaving {
  display: block;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hint {
  margin: 12px 0 0;
  color: var(--text-3);
  font-size: 12.5px;
  text-align: center;
  text-wrap: balance;
}

.hint.warn {
  color: var(--danger);
}

/* ───────────── compose ───────────── */
.note {
  display: block;
  width: 100%;
  min-height: 128px;
  max-height: 320px;
  padding: 16px 18px;
  border: 0;
  border-radius: 20px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--hairline), inset 0 2px 8px rgb(0 0 0 / 0.1);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  resize: none;
  outline: none;
  transition: box-shadow 0.25s var(--out);
}

.note::placeholder {
  color: var(--text-3);
}

.note:focus {
  box-shadow: inset 0 0 0 1.5px var(--focus), 0 0 0 4px var(--focus-glow);
}

.dropzone {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 13px 16px;
  border: 1.5px dashed var(--dash);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.3s var(--spring);
}

.dropzone:hover {
  background: var(--fill);
  border-color: var(--focus);
}

.dropzone:active {
  transform: scale(0.985);
}

.dz-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 13px;
  background: var(--fill-2);
  box-shadow: inset 0 1px 0.5px var(--spec), inset 0 0 0 1px var(--hairline);
  color: var(--text);
}

.dz-icon .i {
  width: 20px;
  height: 20px;
}

.dz-text {
  display: grid;
  min-width: 0;
}

.dz-text strong {
  font-weight: 600;
}

.dz-text small {
  color: var(--text-2);
  font-size: 13px;
}

.dz-text u {
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}

.files {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.files:empty {
  display: none;
}

.file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px;
  border-radius: 16px;
  background: var(--fill);
  box-shadow: inset 0 0 0 1px var(--hairline);
  animation: pop-in 0.35s var(--out) both;
}

.file.out {
  animation: pop-out 0.2s ease-in forwards;
}

.thumb {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  overflow: hidden;
  border-radius: 11px;
  background: var(--fill-2);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--text-2);
  font: 700 10px/1 var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  object-fit: cover;
}

.file-info {
  display: grid;
  flex: 1;
  min-width: 0;
}

.file-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.file-size {
  color: var(--text-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.3s var(--spring);
}

.icon-btn:hover {
  background: var(--fill-2);
  color: var(--text);
}

.icon-btn:active {
  transform: scale(0.88);
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(6px);
  }
}

@keyframes pop-out {
  to {
    opacity: 0;
    transform: scale(0.97);
    filter: blur(5px);
  }
}

/* ───────────── options ───────────── */
.options {
  display: grid;
  margin: 14px 0 18px;
  padding: 2px 8px 2px 16px;
  border-radius: 20px;
  background: var(--fill);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.option {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-height: 54px;
  padding: 7px 0;
}

.option + .option {
  border-top: 1px solid var(--hairline);
}

label.option {
  cursor: pointer;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 520;
}

.option-label .i {
  color: var(--text-3);
}

.chips {
  position: relative;
  touch-action: pan-y;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.chips button {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}

.chips button[aria-checked="true"] {
  color: var(--text);
}

.chips-thumb {
  top: 3px;
  bottom: 3px;
  box-shadow: inset 0 1px 0.5px var(--spec), 0 4px 12px -4px rgb(0 0 0 / 0.45);
}

/* Liquid toggle: the knob stretches while pressed, then springs across. */
.switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  margin: 0;
  border-radius: 999px;
  background: var(--fill-2);
  box-shadow: inset 0 0 0 1px var(--hairline), inset 0 2px 6px rgb(0 0 0 / 0.18);
  cursor: pointer;
  transition: background 0.25s var(--out);
}

.switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 3px 8px rgb(0 0 0 / 0.3), inset 0 -1px 2px rgb(0 0 0 / 0.08);
  transition: transform 0.4s var(--spring), width 0.2s var(--out);
}

.switch:checked {
  background: var(--accent);
}

.switch:checked::before {
  transform: translateX(20px);
}

.switch:active::before {
  width: 32px;
}

.switch:checked:active::before {
  transform: translateX(14px);
}

/* ───────────── buttons ───────────── */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s var(--spring), box-shadow 0.2s, opacity 0.2s, background 0.2s;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.btn-primary {
  width: 100%;
  overflow: hidden;
  background: var(--solid);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0.5px rgb(255 255 255 / 0.5),
    inset 0 -2px 5px rgb(0 0 0 / 0.12),
    0 12px 26px -14px rgb(0 0 0 / 0.7);
}

/* Glossy upper lens */
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 1px 1px 52%;
  z-index: -1;
  border-radius: 999px 999px 40% 40% / 999px 999px 16px 16px;
  background: linear-gradient(rgb(255 255 255 / 0.22), rgb(255 255 255 / 0));
  pointer-events: none;
}

.btn-primary:hover:not(:disabled) {
  box-shadow:
    inset 0 1px 0.5px rgb(255 255 255 / 0.5),
    inset 0 -2px 5px rgb(0 0 0 / 0.12),
    0 16px 30px -14px rgb(0 0 0 / 0.8);
}

.btn-glass {
  background: var(--fill-2);
  box-shadow: inset 0 1px 0.5px var(--spec), inset 0 0 0 1px var(--hairline), var(--shadow-sm);
}

.btn-glass:hover {
  background: var(--fill-3);
}

.btn.wide {
  width: 100%;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.text-btn .i {
  width: 16px;
  height: 16px;
}

.text-btn:hover {
  background: var(--fill);
  color: var(--text);
}

.text-btn.danger {
  color: var(--danger);
}

.text-btn.small {
  padding: 6px 10px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

/* ───────────── progress ───────────── */
.progress {
  display: grid;
  justify-items: center;
  padding: 40px 6px 30px;
  text-align: center;
}

.loader {
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 25%, var(--text) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(1turn); } }

.progress-title {
  margin: 0;
  font: 620 18px/1.3 var(--font-display);
  letter-spacing: -0.02em;
}

.progress-sub {
  margin: 6px 0 20px;
  color: var(--text-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.bar {
  width: min(100%, 280px);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--fill-2);
}

.bar span {
  display: block;
  width: calc(var(--p, 0) * 100%);
  height: 100%;
  border-radius: inherit;
  background: var(--text);
  transition: width 0.25s var(--out);
}

.bar.indeterminate span {
  width: 34%;
  animation: sweep 1.1s var(--out) infinite;
}

@keyframes sweep {
  from { transform: translateX(-110%); }
  to { transform: translateX(300%); }
}

/* ───────────── code reels ───────────── */
.done,
.enter {
  display: grid;
  justify-items: center;
  padding: 14px 0 2px;
  text-align: center;
}

.code {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.reel {
  position: relative;
  width: calc(var(--cell) * 0.76);
  height: var(--cell);
  overflow: hidden;
  border-radius: 20px;
  background: var(--fill);
  box-shadow:
    inset 0 1px 0.5px var(--spec),
    inset 0 0 0 1px var(--hairline),
    inset 0 -12px 24px rgb(0 0 0 / 0.12),
    var(--shadow-sm);
}

.reel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.12), transparent 40%, transparent 72%, rgb(0 0 0 / 0.06));
  pointer-events: none;
}

.window {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(transparent, #000 24%, #000 76%, transparent);
  mask-image: linear-gradient(transparent, #000 24%, #000 76%, transparent);
}

.strip span {
  display: grid;
  place-items: center;
  height: var(--cell);
  font: 640 calc(var(--cell) * 0.54)/1 var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--fill);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.pill .i {
  width: 15px;
  height: 15px;
}

.pill.burn {
  color: var(--accent);
}

.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  width: 100%;
}

.subactions {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

/* ───────────── code entry ───────────── */
.pin {
  display: flex;
  gap: 10px;
}

.pin input {
  width: calc(var(--cell) * 0.76);
  height: var(--cell);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--hairline), inset 0 3px 10px rgb(0 0 0 / 0.12);
  color: var(--text);
  caret-color: transparent;
  font: 640 calc(var(--cell) * 0.48)/1 var(--font-num);
  font-variant-numeric: tabular-nums;
  text-align: center;
  outline: none;
  transition: box-shadow 0.25s var(--out), background 0.2s, transform 0.35s var(--spring);
}

.pin input::placeholder {
  color: var(--text-3);
  opacity: 0.6;
}

.pin input:focus {
  background: var(--fill);
  box-shadow:
    inset 0 1px 0.5px var(--spec),
    inset 0 0 0 1.5px var(--focus),
    0 0 0 5px var(--focus-glow);
  transform: translateY(-2px);
}

.pin input:focus::placeholder {
  color: var(--text);
  opacity: 0.9;
}

.pin input.filled {
  background: var(--fill-2);
  box-shadow: inset 0 1px 0.5px var(--spec), inset 0 0 0 1px var(--hairline), var(--shadow-sm);
}

.pin.error input {
  box-shadow: inset 0 0 0 1.5px var(--danger), 0 0 0 5px var(--danger-glow);
}

.pin-msg {
  min-height: 21px;
  margin: 12px 0 14px;
  color: var(--danger);
  font-size: 13.5px;
  text-wrap: balance;
}

/* ───────────── result ───────────── */
.result-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 2px 18px;
}

.result-head h2 {
  margin: 0;
  font: 660 20px/1.2 var(--font-display);
  letter-spacing: -0.02em;
}

.check-orb {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--solid);
  box-shadow: inset 0 1px 0.5px rgb(255 255 255 / 0.5), var(--shadow-sm);
  color: var(--ink);
}

.check-orb .i {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.muted {
  margin: 2px 0 0;
  color: var(--text-2);
  font-size: 13.5px;
}

.result-body {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.block {
  overflow: hidden;
  border-radius: 20px;
  background: var(--fill);
  box-shadow: inset 0 0 0 1px var(--hairline);
  animation: pop-in 0.45s var(--out) both;
  animation-delay: calc(var(--i, 0) * 60ms + 80ms);
}

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 0 18px;
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.message {
  max-height: 46vh;
  margin: 0;
  padding: 6px 18px 18px;
  overflow: auto;
  font-size: 15.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  padding: 8px;
}

.gallery.single {
  grid-template-columns: 1fr;
}

.shot {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: var(--well);
}

.shot img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.gallery.single .shot img {
  aspect-ratio: auto;
  max-height: 420px;
  object-fit: contain;
}

.shot figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 12px;
  border-radius: 12px;
  background: rgb(12 12 11 / 0.42);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: inset 0 1px 0.5px rgb(255 255 255 / 0.22);
  color: #fff;
  font-size: 12.5px;
  font-weight: 550;
}

.shot figcaption span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.shot .icon-btn {
  width: 32px;
  height: 32px;
  color: #fff;
}

.shot .icon-btn:hover {
  background: rgb(255 255 255 / 0.18);
}

.block .files {
  margin: 0;
  padding: 8px;
}

.block .file {
  animation: none;
  background: transparent;
  box-shadow: none;
}

/* ───────────── footer ───────────── */
.foot {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

.how {
  border-radius: 22px;
  box-shadow: inset 0 1px 0.5px var(--spec), var(--shadow-sm);
}

.how summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 22px;
  font-size: 14.5px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.how summary::-webkit-details-marker {
  display: none;
}

.how summary .i {
  color: var(--text-2);
  transition: transform 0.35s var(--spring);
}

.how[open] summary .i {
  transform: rotate(180deg);
}

.how::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.35s var(--out), content-visibility 0.35s allow-discrete;
}

.how[open]::details-content {
  block-size: auto;
}

.how-body {
  padding: 0 20px 20px;
  color: var(--text-2);
  font-size: 14px;
}

.how ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.how li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  counter-increment: step;
}

.how li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fill-2);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--text);
  font: 650 12px/1 var(--font-num);
}

.how strong {
  color: var(--text);
  font-weight: 600;
}

.caveat {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 2px solid var(--accent);
  border-radius: 4px 14px 14px 4px;
  background: var(--fill);
  font-size: 13px;
}

.fine {
  margin: 0;
  color: var(--text-3);
  font-size: 12.5px;
  text-align: center;
}

.fine a {
  color: inherit;
  text-underline-offset: 2px;
}

/* ───────────── overlays ───────────── */
.drag-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(12 12 11 / 0.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fade 0.2s ease both;
}

.drag-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 34px 46px;
  border-radius: 30px;
  text-align: center;
  animation: rise 0.4s var(--spring) both;
}

.drag-card .i {
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  color: var(--accent);
}

.drag-card strong {
  font-size: 18px;
}

.drag-card small {
  color: var(--text-2);
}

@keyframes fade { from { opacity: 0; } }

.toast {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  padding: 12px 20px 12px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 550;
  transform: translateX(-50%);
}

.toast .i {
  color: var(--text);
}

.toast.error .i {
  color: var(--danger);
}

/* ───────────── small screens ───────────── */
.narrow-only {
  display: none;
}

@media (max-width: 440px) {
  :root {
    --cell: 80px;
  }

  .wide-only {
    display: none;
  }

  .narrow-only {
    display: inline;
  }

  /* Send screen: keep the whole form, and the footer under it, on one phone screen. */
  .note {
    min-height: 96px;
    padding: 13px 15px;
  }

  .dropzone {
    gap: 12px;
    margin-top: 10px;
    padding: 9px 12px;
  }

  .dz-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .options {
    margin: 10px 0 12px;
  }

  .option {
    min-height: 46px;
    padding: 4px 0;
  }

  #send-btn {
    height: 48px;
  }

  .hint.idle {
    display: none;
  }

  .card {
    padding: 16px;
    border-radius: 28px;
  }

  .badge {
    padding: 0 12px 0 10px;
  }

  .options {
    padding: 2px 6px 2px 14px;
  }

  .option-label .i {
    display: none;
  }

  .chips button {
    padding: 0 10px;
  }
}

@media (max-width: 360px) {
  :root {
    --cell: 70px;
  }

  .badge {
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .loader,
  .bar.indeterminate span {
    animation-duration: 1.2s !important;
    animation-iteration-count: infinite !important;
  }
}
