:root {
  color-scheme: light;
  --paper: #f2eadb;
  --paper-2: #e7dcc6;
  --ink: #1c1612;
  --ink-soft: #5e534a;
  --line: rgba(28, 22, 18, 0.14);
  --vowel: #b4331c;
  --vowel-bg: rgba(180, 51, 28, 0.12);
  --consonant: #0f5f66;
  --consonant-bg: rgba(15, 95, 102, 0.12);
  --success: #1d6a3a;
  --taken: #9d2c2c;
  --pending: #8a5a20;
  --stamp-bg: #1c1612;
  --stamp-fg: #f2eadb;
  --vowel-on-stamp: #ffb4a8;
  --consonant-on-stamp: #8fd4cc;
  --shadow: 0 18px 40px rgba(60, 36, 16, 0.08);
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

:root[data-theme="night"] {
  color-scheme: dark;
  --paper: #161311;
  --paper-2: #241f1b;
  --ink: #f4ecdf;
  --ink-soft: #cbbba8;
  --line: rgba(244, 236, 223, 0.16);
  --vowel: #ff8b70;
  --vowel-bg: rgba(255, 139, 112, 0.16);
  --consonant: #8fdad2;
  --consonant-bg: rgba(143, 218, 210, 0.14);
  --success: #8dcea8;
  --taken: #f0a39a;
  --pending: #e2b56a;
  --stamp-bg: #f4ecdf;
  --stamp-fg: #161311;
  --vowel-on-stamp: #9d2c18;
  --consonant-on-stamp: #0c4f55;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1000px 420px at 0% -10%, var(--vowel-bg), transparent 55%),
    radial-gradient(800px 380px at 100% 0%, var(--consonant-bg), transparent 50%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}

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

button, a, label, summary { -webkit-tap-highlight-color: transparent; }

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

::selection { background: var(--vowel-bg); }

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--stamp-bg);
  color: var(--stamp-fg);
  padding: 0.5rem 0.75rem;
  min-height: 44px;
  border-radius: 999px;
  z-index: 2;
}

.skip:focus { top: 0.75rem; }

.app {
  width: 100%;
  margin: 0;
  padding: 1.5rem clamp(1.25rem, 2.5vw, 2.75rem) 4rem;
  display: grid;
  grid-template-columns: minmax(17rem, 22rem) 22rem minmax(0, 1fr);
  gap: 1.75rem 2rem;
}

.studio { display: contents; }

.rhythm-col { min-width: 0; max-width: 22rem; }

.pattern-col { width: 22rem; min-width: 22rem; max-width: 22rem; }

#names { min-width: 0; }

.mast {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.mark {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4.2rem, 10vw, 6.6rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 0.8;
}

.lede {
  max-width: 38rem;
  margin: 0.9rem 0 0;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.mast-actions, .builder, .choices, .names-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mast-actions { align-items: center; margin-left: auto; }

.mast-actions button, .corner-theme {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.mast-actions .icon, .corner-theme .icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--stamp-bg);
  color: var(--stamp-fg);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1;
}

button[aria-pressed="true"] .count-pill {
  background: var(--stamp-fg);
  color: var(--stamp-bg);
}

.corner-theme {
  position: fixed;
  z-index: 70;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
}

.corner-theme svg[hidden] { display: none; }

.record-wrap { overflow-x: auto; }

.record-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.record-table caption {
  caption-side: bottom;
  text-align: left;
  color: var(--ink-soft);
  padding-top: 0.45rem;
}

.record-table th, .record-table td {
  text-align: left;
  padding: 0.65rem 0.8rem 0.65rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}

.record-table th {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}

.record-table .word-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.record-say {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  min-height: 2rem;
  padding: 0;
  border-radius: 999px;
  flex: 0 0 auto;
}

.record-table td:nth-child(2), .record-table td:nth-child(3) { font-family: var(--mono); }

.added-cell {
  color: var(--ink-soft);
  white-space: nowrap;
  font-size: 0.92rem;
}

.added-time { margin-left: 0.35rem; }

.record-save {
  width: 1%;
  vertical-align: middle;
  white-space: nowrap;
}

.record-save button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 36px;
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
}

.record-save .icon, .record-say .icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

button, .choice span, .names-head button, .actions button, .actions a {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
}

.primary, button[aria-pressed="true"] {
  background: var(--stamp-bg);
  color: var(--stamp-fg);
  border-color: var(--stamp-bg);
}

button:hover,
.chip:hover,
.choice:hover span {
  border-color: var(--ink);
}

button:active,
.chip:active,
.choice:active span {
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.primary:hover,
button[aria-pressed="true"]:hover {
  background: var(--stamp-bg);
  color: var(--stamp-fg);
  border-color: var(--stamp-bg);
  filter: brightness(1.08);
}

.primary:active,
button[aria-pressed="true"]:active {
  background: var(--stamp-bg);
  color: var(--stamp-fg);
  filter: brightness(0.92);
}

.studio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.menu-close { display: none; }

.studio h2, #names h2 {
  margin: 0 0 0.7rem;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 560;
  letter-spacing: -0.03em;
}

.studio-top h2 { margin: 0; }

.studio h2:not(:first-child) { margin-top: 1.4rem; }

.rhythms { display: grid; gap: 0.45rem; }

.rhythm {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "example status"
    "note pattern";
  gap: 0.1rem 0.75rem;
  text-align: left;
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
  background: transparent;
  border: 1px solid var(--line);
  min-height: 64px;
}

.rhythm .example {
  grid-area: example;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.rhythm .status {
  grid-area: status;
  justify-self: end;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rhythm .status.success { color: var(--success); }
.rhythm .status.pending { color: var(--pending); }

.rhythm .note {
  grid-area: note;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.rhythm .pattern {
  grid-area: pattern;
  justify-self: end;
  align-self: end;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.rhythm[aria-pressed="true"] .note,
.rhythm[aria-pressed="true"] .status { color: var(--stamp-fg); }

.rhythm[aria-pressed="true"] .v { color: var(--vowel-on-stamp); }
.rhythm[aria-pressed="true"] .c { color: var(--consonant-on-stamp); }

.field, legend, .help, .from-word, #summary, .byline, .empty {
  color: var(--ink-soft);
}

.field { display: block; margin-bottom: 0.35rem; }

.pattern-input, #starts-with {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  font-family: var(--mono);
  min-height: 44px;
}

#starts-with { max-width: 7rem; }

.help, .from-word, .legend, #summary, .byline, .empty { margin: 0.45rem 0 0; }

.jump-links, .name-next { display: none; }

.from-word:empty { display: none; }

.tokens { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.7rem; min-height: 2.4rem; }

.token {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  cursor: pointer;
}

.token.v { background: var(--vowel-bg); color: var(--vowel); }
.token.c { background: var(--consonant-bg); color: var(--consonant); }

.builder { margin-top: 0.7rem; }

kbd {
  font-family: var(--mono);
  font-size: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05rem 0.3rem;
}

.legend { display: flex; gap: 1rem; font-family: var(--mono); font-size: 0.82rem; }

.v { color: var(--vowel); }
.c { color: var(--consonant); }

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.options {
  margin-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.options fieldset,
.options .check {
  margin: 0;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.options fieldset:first-child { border-top: 0; }

.options legend { margin-bottom: 0.7rem; }

.options .choices { gap: 0.65rem; }

.options .primary { margin-top: 0.35rem; }

.syllables output {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.syllable-slider input[type="range"] {
  width: 100%;
  margin: 0.2rem 0 0;
  accent-color: var(--stamp-bg);
  min-height: 44px;
}

.ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 0.15rem;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.ticks span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 44px;
  min-height: 44px;
  color: var(--ink-soft);
  cursor: pointer;
}

.ticks span::before {
  content: "";
  width: 1px;
  height: 8px;
  background: var(--line);
}

.ticks span.on {
  color: var(--ink);
  font-weight: 600;
}

.ticks span.on::before {
  height: 12px;
  background: var(--stamp-bg);
}

legend { padding: 0; margin-bottom: 0.4rem; }

.choice { position: relative; }

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}

.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.choice input:checked + span {
  background: var(--stamp-bg);
  color: var(--stamp-fg);
  border-color: var(--stamp-bg);
}

.choice input:disabled + span { opacity: 0.45; }

.require-toggle {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0 0 0.85rem;
  cursor: pointer;
}

.require-toggle input { width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; flex: 0 0 auto; }

.require-toggle small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.choice input:focus-visible + span {
  outline: 2px solid var(--vowel);
  outline-offset: 3px;
}

.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0;
  cursor: pointer;
}

.check input { width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; }

.check small { display: block; color: var(--ink-soft); }

.primary { width: 100%; border-radius: 14px; font-weight: 600; }

.notes {
  margin-top: 0.4rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.notes summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }

.notes table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
  font-size: 0.92rem;
}

.notes caption {
  text-align: left;
  caption-side: bottom;
  color: var(--ink-soft);
  padding-top: 0.4rem;
}

.notes th, .notes td {
  text-align: left;
  padding: 0.35rem 0.4rem 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

.notes td:nth-child(2), .notes th:nth-child(2) { font-family: var(--mono); }

.names-head {
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.group { margin-top: 1.1rem; }

.group h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

.group ul { list-style: none; margin: 0; padding: 0; }

.name {
  display: grid;
  grid-template-columns: max-content max-content max-content minmax(0, 1fr);
  gap: 0.35rem 0.9rem;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.word {
  display: inline-flex;
  align-items: baseline;
  gap: 0.05rem;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 0.15rem 0.2rem;
  min-height: 44px;
  justify-content: flex-start;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1;
}

.tld {
  margin-left: 0.15rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-soft);
  letter-spacing: 0;
}

.break, .pat, .badge {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.badge {
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }

.actions button, .actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.35rem 0.7rem;
  font-size: 0.86rem;
}

.actions .icon, .chip .icon, .status-legend .icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.icon-filled { fill: currentColor; stroke: none; }

.actions button[aria-pressed="true"] {
  background: var(--stamp-bg);
  color: var(--stamp-fg);
  border-color: var(--stamp-bg);
}

.availability {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.35rem;
}

.availability-status {
  margin: 0;
  color: var(--ink-soft);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.82rem;
  text-decoration: none;
}

.chip { color: var(--ink); gap: 0.35rem; }
.chip.available { border-color: color-mix(in srgb, var(--success) 55%, var(--line)); }
.chip.available .icon { color: var(--success); }
.chip.taken { border-color: color-mix(in srgb, var(--taken) 50%, var(--line)); }
.chip.taken .icon { color: var(--taken); }
.chip.unknown .icon { color: var(--pending); }
.chip-price { color: var(--ink-soft); }

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.status-legend[hidden] { display: none; }

.status-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.status-legend .available .icon { color: var(--success); }
.status-legend .taken .icon { color: var(--taken); }

.empty {
  padding: 1.5rem 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--ink);
}

.dock {
  display: none;
}

.dock svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.scrim {
  position: fixed;
  z-index: 35;
  inset: 0;
  background: rgba(28, 22, 18, 0.46);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%) translateY(0.4rem);
  background: var(--stamp-bg);
  color: var(--stamp-fg);
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 60;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 860px) {
  .app {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem calc(5.5rem + env(safe-area-inset-bottom));
  }
  .mast {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-bottom: 0.85rem;
  }
  .mast > div:first-child { flex: 1 1 12rem; padding-right: 7.25rem; }
  .studio[data-panel="rhythms"] .pattern-col { display: none; }
  .studio[data-panel="pattern"] .rhythm-col { display: none; }
  .mast-actions { width: 100%; margin-left: 0; justify-content: flex-end; flex-wrap: nowrap; }
  .mast-actions button { padding: 0.45rem 0.6rem; }
  .record-table { width: 100%; min-width: 0; }
  .record-table th, .record-table td { padding-right: 0.12rem; }
  .record-table .word-cell { gap: 0.2rem; font-size: 1.15rem; }
  .record-table th { letter-spacing: 0; line-height: 1.1; white-space: normal; }
  .record-say { width: 1.75rem; height: 1.75rem; min-height: 1.75rem; }
  .added-cell { font-size: 0.68rem; line-height: 1.15; }
  .jump-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin-top: 0.45rem;
  }
  .jump-links button {
    border: 0;
    background: transparent;
    border-radius: 0;
    padding: 0.2rem 0;
    min-height: 44px;
    color: var(--vowel);
    text-decoration: underline;
    text-underline-offset: 0.16em;
  }
  .name-next {
    display: block;
    margin: 1.4rem 0 0.4rem;
    color: var(--ink-soft);
  }
  .added-time { display: block; margin-left: 0; }
  .record-save button { min-height: 44px; padding: 0.25rem 0.5rem; font-size: 0.72rem; }
  .mark { font-size: clamp(3.1rem, 22vw, 4.4rem); }
  .lede { font-size: 1rem; margin-top: 0.55rem; }
  .menu-close { display: inline-flex; align-items: center; }
  .studio-top {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 0 0.7rem;
    padding-bottom: 0.35rem;
    background: var(--paper);
  }
  .rhythm-col, .pattern-col { width: auto; min-width: 0; max-width: none; }
  .studio {
    display: block;
    position: fixed;
    z-index: 40;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(4.75rem + env(safe-area-inset-bottom));
    width: 100%;
    margin: 0;
    padding: 0.9rem 1rem 1.25rem;
    background: var(--paper);
    overflow: auto;
    overscroll-behavior: contain;
    box-shadow: var(--shadow);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }
  .studio.is-open { transform: translateX(0); }
  .scrim { bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
  body.menu-open { overflow: hidden; }
  .dock {
    display: flex;
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: space-around;
    padding: 0.2rem 0.35rem calc(0.2rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }
  .dock button {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    min-width: 0;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    font-size: 0.68rem;
    letter-spacing: 0;
  }
  .dock button span { white-space: nowrap; }
  .dock-mark {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.06em;
    line-height: 0.8;
  }
  .dock button:hover,
  .dock button:active { background: color-mix(in srgb, var(--ink) 8%, transparent); }
  .dock button:active { background: color-mix(in srgb, var(--ink) 14%, transparent); }
  .dock button[aria-expanded="true"],
  .dock button[aria-pressed="true"] {
    background: var(--stamp-bg);
    color: var(--stamp-fg);
  }
  body.menu-open .corner-theme { visibility: hidden; pointer-events: none; }
  .pattern-hint {
    position: fixed;
    z-index: 80;
    bottom: calc(4.9rem + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    margin: 0;
    padding: 0.4rem 0.7rem 0.3rem;
    border-radius: 16px;
    background: var(--stamp-bg);
    color: var(--stamp-fg);
    font-size: 0.82rem;
    pointer-events: none;
    transform: translateX(-50%);
  }
  .pattern-hint[hidden] { display: none !important; }
  .pattern-hint svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: hint-bob 0.9s ease-in-out infinite;
  }
  .toast { bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
  .notes { overflow-x: auto; }
  .name {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "word word"
      "break pat"
      "actions actions"
      "search search";
  }
  .word { grid-area: word; }
  .break { grid-area: break; }
  .pat { grid-area: pat; }
  .actions { grid-area: actions; justify-content: flex-start; }
  .availability { grid-area: search; }
  .actions button, .actions a { min-height: 44px; }
}

@keyframes hint-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast, .studio, .pattern-hint svg { transition: none; animation: none; }
}

@media print {
  .studio, .mast-actions, .actions, .skip, #copy-all, .toast, .dock, .scrim, .corner-theme { display: none !important; }
  .app { display: block; width: auto; }
  body { background: white; color: black; }
}
