/* Hey Elia: soft paper, indigo ink, letters with postage-stamp attachments. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #eef0fb;
  --sheet: #fcfcff;
  --ink: #27295c;
  --ink-soft: #5d618f;
  --line: #d8dcf1;
  --lilac: #cbbff8;
  --lilac-deep: #6b58d6;
  --mint: #b8e9d6;
  --butter: #ffe69e;
  --blush: #ffcad7;
  --danger: #b4234a;
  --ok: #1f7a57;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Atkinson", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.25rem;
  --step-4: 3.5rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
}

a { color: var(--lilac-deep); text-underline-offset: 0.18em; }

:focus-visible {
  outline: 3px solid var(--lilac-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] { display: none !important; }

/* Pages stay invisible for the moment it takes to load their language. */
html[data-i18n-pending] body { visibility: hidden; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Layout ---------- */

.page {
  width: min(100% - 32px, 720px);
  margin: 0 auto;
  padding: 28px 0 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.wordmark {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 650;
  font-size: var(--step-3);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 4px 18px;
  flex-wrap: wrap;
  font-size: var(--step--1);
}
.nav a, .nav button {
  color: var(--ink-soft);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  cursor: pointer;
}
.nav a:hover, .nav button:hover { color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--butter);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

.lede { color: var(--ink-soft); margin: 8px 0 28px; max-width: 60ch; }

/* ---------- The sheet (a letter) ---------- */

.sheet-stack { position: relative; }
.sheet-stack::before {
  content: "";
  position: absolute;
  inset: 10px -6px -10px 8px;
  background: var(--lilac);
  border-radius: 30px;
  transform: rotate(1.6deg);
}

.sheet {
  position: relative;
  background: var(--sheet);
  border-radius: 28px;
  padding: 28px clamp(20px, 5vw, 44px) 32px;
  border: 1px solid var(--line);
}

/* ---------- Forms & buttons ---------- */

label { display: block; font-weight: 700; font-size: var(--step--1); margin-bottom: 6px; }

input[type="text"], input[type="password"], select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
}
input:focus-visible, select:focus-visible { outline: none; border-color: var(--lilac-deep); }

.field { margin-bottom: 18px; }
.hint { color: var(--ink-soft); font-size: var(--step--1); margin-top: 4px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: transform 120ms ease, background-color 120ms ease;
}
.btn:hover { background: #33367a; }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #a5a8c8; cursor: not-allowed; transform: none; }

.btn-soft { background: var(--butter); color: var(--ink); }
.btn-soft:hover { background: #ffdc72; }

.btn-quiet {
  background: none;
  color: var(--ink-soft);
  padding: 6px 10px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.btn-quiet:hover { background: none; color: var(--ink); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { color: #8e1636; }

.notice {
  border-radius: 14px;
  padding: 10px 14px;
  font-size: var(--step--1);
  margin: 0 0 16px;
}
.notice.error { background: #ffe3ea; color: var(--danger); }
.notice.success { background: #dcf5ea; color: var(--ok); }

/* ---------- Login ---------- */

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}
.login {
  width: min(100%, 420px);
}
.login .wordmark {
  display: block;
  font-size: clamp(3rem, 14vw, var(--step-4) * 1.4);
  margin-bottom: 6px;
}
.login .lede { margin-bottom: 28px; }
.login .btn { width: 100%; margin-top: 6px; }

.lang-switch {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 28px;
}
.lang-switch button {
  background: none;
  border: 0;
  padding: 4px 2px;
  font: inherit;
  font-size: var(--step--1);
  color: var(--ink-soft);
  cursor: pointer;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--butter);
}
.lang-choice { margin-top: 14px; }

/* ---------- Editor ---------- */

.toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.toolbar button {
  min-width: 40px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.toolbar button:hover { background: var(--line); }
.toolbar button[aria-pressed="true"] { background: var(--lilac); }
.toolbar .t-bold { font-weight: 700; }
.toolbar .t-italic { font-style: italic; font-family: var(--serif); }
.toolbar .t-underline { text-decoration: underline; }
.toolbar .t-strikethrough { text-decoration: line-through; }

.editor, .letter-body {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 60, "opsz" 18;
  font-size: 1.1875rem;
  line-height: 1.7;
  max-width: 64ch;
}
.editor {
  min-height: 260px;
  outline: none;
  padding: 4px 0;
  overflow-wrap: anywhere;
}
.editor:empty::before {
  content: attr(data-placeholder);
  color: #9da1c4;
}
.editor p, .letter-body p { margin: 0 0 0.8em; }
.editor ul, .editor ol, .letter-body ul, .letter-body ol { margin: 0 0 0.8em; padding-left: 1.4em; }
.editor blockquote, .letter-body blockquote {
  margin: 0 0 0.8em;
  padding-left: 1em;
  border-left: 4px solid var(--lilac);
}
.letter-body { overflow-wrap: anywhere; }
.letter-body > :last-child { margin-bottom: 0; }

.compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px dashed var(--line);
}
.signature { font-family: var(--serif); font-style: italic; color: var(--ink-soft); }

.drop-active .sheet { outline: 3px dashed var(--lilac-deep); outline-offset: -10px; }

/* ---------- Stamps (attachments) ---------- */

.stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.stamp {
  --r: 5px;
  position: relative;
  width: 116px;
  height: 140px;
  padding: calc(2 * var(--r));
  background: var(--paper);
  border: 0;
  font: inherit;
  color: var(--ink);
  text-align: left;
  filter: drop-shadow(0 2px 0 var(--line));
  -webkit-mask:
    radial-gradient(var(--r), #0000 98%, #000) round calc(-1.5 * var(--r)) calc(-1.5 * var(--r)) / calc(3 * var(--r)) calc(3 * var(--r)),
    linear-gradient(#000 0 0) no-repeat 50% / calc(100% - 3 * var(--r)) calc(100% - 3 * var(--r));
  mask:
    radial-gradient(var(--r), #0000 98%, #000) round calc(-1.5 * var(--r)) calc(-1.5 * var(--r)) / calc(3 * var(--r)) calc(3 * var(--r)),
    linear-gradient(#000 0 0) no-repeat 50% / calc(100% - 3 * var(--r)) calc(100% - 3 * var(--r));
}
.stamp:nth-child(3n+1) { transform: rotate(-2deg); }
.stamp:nth-child(3n+2) { transform: rotate(1.5deg); }

button.stamp, a.stamp { cursor: pointer; }
button.stamp:hover, a.stamp:hover { transform: rotate(0) translateY(-3px); }
.stamp:focus-visible { outline: none; filter: drop-shadow(0 0 0 var(--lilac-deep)) drop-shadow(0 0 3px var(--lilac-deep)); }

.stamp-face {
  position: relative;
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px;
  background: var(--butter);
}
.stamp[data-kind="audio"] .stamp-face { background: var(--mint); }
.stamp[data-kind="video"] .stamp-face { background: var(--blush); }
.stamp[data-kind="image"] .stamp-face { background: var(--lilac); }

.stamp-face img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stamp-name {
  position: relative;
  font-size: 0.75rem;
  line-height: 1.25;
  font-weight: 700;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.stamp-face:has(img) .stamp-name {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  padding: 2px 6px;
}
.stamp-meta { position: relative; font-size: 0.6875rem; color: var(--ink-soft); }

/* Drawn glyphs: a play triangle for video, sound bars for audio. */
.stamp-glyph {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
}
.stamp[data-kind="video"] .stamp-glyph {
  width: 0; height: 0;
  border-left: 26px solid var(--ink);
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  margin-left: 4px;
}
.stamp[data-kind="audio"] .stamp-glyph {
  width: 44px; height: 32px;
  background:
    linear-gradient(var(--ink) 0 0) 0 60% / 5px 40% no-repeat,
    linear-gradient(var(--ink) 0 0) 10px 50% / 5px 80% no-repeat,
    linear-gradient(var(--ink) 0 0) 20px 50% / 5px 100% no-repeat,
    linear-gradient(var(--ink) 0 0) 30px 50% / 5px 60% no-repeat,
    linear-gradient(var(--ink) 0 0) 40px 50% / 4px 30% no-repeat;
}
.stamp[data-kind="file"] .stamp-glyph,
.stamp[data-kind="image"] .stamp-glyph {
  width: 34px; height: 26px;
  border: 3px solid var(--ink);
  border-radius: 6px;
}

.stamp-progress {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: rgba(39, 41, 92, 0.15);
  margin-top: 6px;
  overflow: hidden;
}
.stamp-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 200ms linear;
}
.stamp[data-state="done"] .stamp-progress { visibility: hidden; }
.stamp[data-state="error"] .stamp-face { background: #ffe3ea; }
.stamp[data-state="error"] .stamp-meta { color: var(--danger); }

.stamp-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.stamp-remove:hover { background: #fff; color: var(--danger); }

.stamp-add {
  width: 116px;
  height: 140px;
  border: 2px dashed var(--lilac-deep);
  border-radius: 12px;
  background: transparent;
  color: var(--lilac-deep);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 700;
  cursor: pointer;
  padding: 10px;
  line-height: 1.3;
}
.stamp-add:hover { background: #fff; }

/* ---------- Mode switch ---------- */

.mode-switch { margin: 0 0 22px; }
.mode-switch button { font-size: var(--step-0); padding: 8px 20px; }

.optional { font-weight: 400; color: var(--ink-soft); }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--lilac-deep);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

/* ---------- Recorder ---------- */

.recorder {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "btn info" "meter meter";
  align-items: center;
  gap: 16px 20px;
  background: var(--paper);
  border-radius: 22px;
  padding: 20px;
  margin-top: 6px;
}
.rec-btn { grid-area: btn; }
.rec-info { grid-area: info; }
.rec-meter { grid-area: meter; width: 100%; height: 48px; }
.recorder:not([data-state="recording"]) .rec-meter { display: none; }

.rec-btn {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.rec-btn:hover { background: #33367a; }
.rec-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blush);
  transition: border-radius 160ms ease, width 160ms ease, height 160ms ease;
}
.recorder[data-state="recording"] .rec-icon { width: 22px; height: 22px; border-radius: 5px; }
.recorder[data-state="recording"] .rec-btn::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 3px solid var(--blush);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  from { transform: scale(0.94); opacity: 1; }
  to { transform: scale(1.18); opacity: 0; }
}
.recorder[data-state="starting"] .rec-btn { opacity: 0.6; cursor: wait; }

.rec-time {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-size: var(--step-3);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.rec-hint { color: var(--ink-soft); font-size: var(--step--1); margin-top: 6px; }

.voice-result {
  background: var(--paper);
  border-radius: 22px;
  padding: 18px 20px 12px;
  margin-top: 6px;
}
.voice-upload { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.voice-upload .stamp-progress { flex: 1; margin: 0; }
.voice-upload[data-state="done"] .stamp-progress { display: none; }
.voice-upload[data-state="error"] .hint { color: var(--danger); }
.voice-result .btn-quiet { padding-left: 0; margin-top: 6px; }
.voice-alt { margin-top: 14px; }

/* ---------- Player ---------- */

.player {
  display: flex;
  align-items: center;
  gap: 14px;
}
.player-btn {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.player-btn:hover { background: #33367a; }
.player-icon {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-left: 16px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}
.player[data-state="playing"] .player-icon {
  width: 16px;
  height: 18px;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(#fff 0 0) left / 5px 100% no-repeat,
    linear-gradient(#fff 0 0) right / 5px 100% no-repeat;
}
.player-time {
  flex: none;
  font-size: var(--step--1);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  min-width: 5.5em;
  text-align: right;
}

.player-range {
  --p: 0%;
  flex: 1;
  min-width: 0;
  height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.player-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(var(--lilac-deep) 0 0) 0 / var(--p) 100% no-repeat, var(--line);
}
.player-range::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(var(--lilac-deep) 0 0) 0 / var(--p) 100% no-repeat, var(--line);
}
.player-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--lilac-deep);
}
.player-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--lilac-deep);
}
.player-range:focus-visible { outline: 3px solid var(--lilac-deep); outline-offset: 2px; }

/* ---------- Sent ---------- */

.sent {
  text-align: left;
  padding: 24px 0 8px;
}
.sent h2 { font-size: var(--step-3); margin-bottom: 8px; }

.sheet-stack.leaving {
  animation: lift 520ms ease-in forwards;
}
@keyframes lift {
  to { transform: translateY(-40px) rotate(-3deg); opacity: 0; }
}

/* ---------- Letters ---------- */

.letters-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.segmented { display: inline-flex; background: #fff; border-radius: 999px; padding: 4px; border: 1px solid var(--line); }
.segmented button {
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--step--1);
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.year {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: var(--step-4);
  font-weight: 700;
  color: var(--lilac);
  line-height: 1;
  margin: 48px 0 20px;
}
.year:first-child { margin-top: 0; }

.letter { margin-bottom: 40px; }
.letter-voice::before { background: var(--mint); transform: rotate(-1.4deg); }
.voice-title {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 18px;
}
.audio-list { display: grid; gap: 14px; margin-top: 22px; }
.audio-item { background: var(--paper); border-radius: 18px; padding: 12px 16px 10px; }
.audio-name { font-size: var(--step--1); font-weight: 700; margin-bottom: 6px; overflow-wrap: anywhere; }
.audio-item .player-btn { width: 44px; height: 44px; }
.voice-download { margin-top: 10px; font-size: var(--step--1); }
.letter .sheet { padding-top: 24px; }
.letter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.letter-from { font-family: var(--serif); font-size: var(--step-1); font-weight: 600; }
.letter-date { color: var(--ink-soft); font-size: var(--step--1); }
.letter-actions { margin-top: 16px; text-align: right; }

.empty {
  text-align: left;
  padding: 8px 0;
}

.more { display: flex; justify-content: center; margin-top: 8px; }

/* ---------- Viewer ---------- */

dialog.viewer {
  border: 0;
  border-radius: 24px;
  padding: 20px;
  width: min(100% - 32px, 960px);
  max-height: calc(100vh - 32px);
  background: var(--sheet);
  color: var(--ink);
}
dialog.viewer::backdrop { background: rgba(39, 41, 92, 0.55); }
.viewer-media { display: grid; place-items: center; }
.viewer-media img, .viewer-media video {
  max-width: 100%;
  max-height: calc(100vh - 180px);
  border-radius: 14px;
  background: #000;
}
.viewer-media img { background: none; }
.viewer-audio { width: 100%; padding: 32px 8px; }
.viewer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.viewer-title { font-weight: 700; overflow-wrap: anywhere; }

/* ---------- Admin ---------- */

.section { margin-bottom: 56px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row-main { min-width: 0; }
.row-title { font-weight: 700; }
.row-sub { color: var(--ink-soft); font-size: var(--step--1); }
.row-actions { display: flex; gap: 4px; flex-wrap: wrap; }

.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--paper);
  margin-left: 6px;
  vertical-align: 2px;
}
.pill.off { background: #ffe3ea; color: var(--danger); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 16px;
}

dialog.form-dialog {
  border: 0;
  border-radius: 24px;
  padding: 28px;
  width: min(100% - 32px, 440px);
  background: var(--sheet);
  color: var(--ink);
}
dialog.form-dialog::backdrop { background: rgba(39, 41, 92, 0.45); }
dialog.form-dialog h2 { margin-bottom: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.status-line { color: var(--ink-soft); font-size: var(--step--1); margin: 0 0 12px; }

@media (max-width: 520px) {
  .recorder { grid-template-columns: auto 1fr; padding: 16px; }
  .player-time { min-width: 0; }
  .topbar { margin-bottom: 28px; }
  .stamp, .stamp-add { width: 100px; height: 124px; }
  .compose-footer .btn { width: 100%; }
}

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