@font-face { font-family: "Transcription IPA"; src: url("/transcription/fonts/ipa.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
/* Layout: one narrow phone column. Wine header band with the small logo in its right corner, website panel, search, then word cards: a UK block (phonemic and phonetic) and a US block (phonemic), each with its own play button. */
:root {
  --bg: #FDFBFB;
  --surface: #FFFFFF;
  --ink: #2A1119;
  --muted: #7A5C66;
  --line: #EBDCE1;
  --tint: #F7EAEE;
  --head-bg: #6D1A36;
  --head-ink: #FFFFFF;
  --btn: #6D1A36;
  --btn-ink: #FFFFFF;
  --btn-active: #A82B55;
  --focus: #A82B55;
  --font-display: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ipa: "Transcription IPA", "Gentium Plus", "Charis SIL", "DejaVu Serif", "Noto Serif", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B0A11;
    --surface: #2A111B;
    --ink: #F8EEF1;
    --muted: #C9A8B3;
    --line: #432032;
    --tint: #3A1727;
    --head-bg: #4A0F24;
    --head-ink: #FFFFFF;
    --btn: #A82B55;
    --btn-ink: #FFFFFF;
    --btn-active: #D14A78;
    --focus: #F08CAD;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1B0A11;
  --surface: #2A111B;
  --ink: #F8EEF1;
  --muted: #C9A8B3;
  --line: #432032;
  --tint: #3A1727;
  --head-bg: #4A0F24;
  --head-ink: #FFFFFF;
  --btn: #A82B55;
  --btn-ink: #FFFFFF;
  --btn-active: #D14A78;
  --focus: #F08CAD;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}
.topbar { background: var(--head-bg); color: var(--head-ink); padding: 10px 16px; }
.topbar-inner { max-width: 640px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { min-width: 0; }
.topbar h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
}
.topbar .by { display: block; margin-top: 3px; font-size: 14px; letter-spacing: 0.02em; opacity: 0.92; }
.topbar .by b { font-weight: 600; }
.logo {
  flex: none;
  width: 52px;
  height: 52px;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 3px;
}
.logo img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }

main { max-width: 640px; margin: 0 auto; padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 16px; }

.site {
  background: var(--head-bg);
  color: var(--head-ink);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.site p { margin: 0; font-size: 15px; line-height: 1.45; }
.site a {
  align-self: flex-start;
  color: var(--head-ink);
  font-weight: 600;
  font-size: 17px;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.site a:focus-visible, .play:focus-visible, .search input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.search { display: flex; flex-direction: column; gap: 6px; }
.search label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.search input {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.count { font-size: 13px; color: var(--muted); margin: 0; }
.key { font-size: 13px; color: var(--muted); margin: 0; font-family: var(--font-ipa); }

.list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.word {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.word h2 { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.2; }
.block { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
.block + .block { border-top: 1px solid var(--line); padding-top: 12px; }
.form + .form .block:first-of-type { padding-top: 0; }
.lines { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tag { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); }
.line { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cap { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.forms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.or { font-size: 13px; color: var(--muted); }
.ipa {
  max-width: 100%;
  font-family: var(--font-ipa);
  font-size: 21px;
  line-height: 1.35;
  background: var(--tint);
  border-radius: 8px;
  padding: 3px 10px;
  overflow-wrap: anywhere;
}
.play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--btn);
  color: var(--btn-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.play svg { width: 20px; height: 20px; fill: currentColor; }
.play[aria-pressed="true"] { background: var(--btn-active); }
.empty { text-align: center; color: var(--muted); padding: 24px 0; margin: 0; }
.note { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
.whead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form + .form { border-top: 1px dashed var(--line); padding-top: 12px; }
.formlabel { font-size: 13px; font-weight: 600; color: var(--btn); }
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: calc(100% - 32px);
  max-width: 480px;
  background: var(--head-bg);
  color: var(--head-ink);
  font-size: 14px;
  line-height: 1.4;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 10;
}
@media (prefers-reduced-motion: no-preference) {
  .play { transition: background-color 0.15s; }
}

.more { align-self: center; font: inherit; font-weight: 600; color: var(--btn); background: transparent; border: 1.5px solid var(--btn); border-radius: 999px; padding: 10px 22px; cursor: pointer; }
.more:focus-visible, .install:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.install { align-self: flex-start; font: inherit; font-weight: 600; color: var(--head-bg); background: var(--head-ink); border: 0; border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.sugg { color: var(--muted); font-size: 14px; margin: 0; }
.status { font-size: 12px; color: var(--muted); margin: 0; }
.intro { display: flex; flex-direction: column; gap: 8px; }
.intro .status { font-size: 14px; font-weight: 600; color: var(--btn); }
.site { margin-top: 8px; }
.introrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.themebtn { font: inherit; font-size: 13px; font-weight: 600; color: var(--btn); background: transparent; border: 1.5px solid var(--btn); border-radius: 999px; padding: 6px 14px; cursor: pointer; white-space: nowrap; }
.themebtn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.suggbox { margin-top: 10px; }
.suggrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.suggrow button { font: inherit; font-size: 16px; font-weight: 600; color: var(--btn); background: var(--surface); border: 1.5px solid var(--btn); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.suggrow button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.crumbs { font-size: 13px; color: var(--muted); margin: 0; }
.crumbs a, .rel a, .letters a, .wordlist a, .back a { color: var(--btn); font-weight: 600; text-decoration: none; }
.crumbs a:hover, .rel a:hover, .letters a:hover, .wordlist a:hover { text-decoration: underline; }
.page-h1 { font-family: var(--font-display); font-size: 30px; line-height: 1.1; margin: 0; }
.explain { display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.6; }
.explain p { margin: 0; }
.explain .ipa { font-size: 17px; padding: 1px 6px; white-space: nowrap; }
.explain h2, .rel h2 { font-family: var(--font-display); font-size: 21px; margin: 6px 0 0; }
.cta { display: inline-block; align-self: flex-start; font-weight: 600; color: var(--btn-ink); background: var(--btn); border-radius: 999px; padding: 11px 22px; text-decoration: none; }
.cta:focus-visible, .rel a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.rel ul, .wordlist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rel li a, .wordlist li a { display: inline-block; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; }
.letters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.letters a { display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--btn); border-radius: 10px; font-size: 18px; }
.browse { margin: 0; font-size: 15px; }
.browse a { color: var(--btn); font-weight: 600; }
.topbar a { color: inherit; text-decoration: none; }
