:root {
  --paper: #f6f0e3;
  --surface: #fffdf8;
  --paper-deep: #eee4d1;
  --milk-tea: #ddc4a1;
  --ink: #17222d;
  --muted: #65717b;
  --border: #d8cebe;
  --sign-red: #a93f2d;
  --sign-red-dark: #803025;
  --sign-red-soft: #f2d9d2;
  --hk-blue: #2c657c;
  --hk-blue-soft: #dcebee;
  --tram-yellow: #ddbd3d;
  --tram-yellow-soft: #f8edbd;
  --success: #276c51;
  --shadow-line: 0 2px 0 rgb(23 34 45 / 16%);
  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --container: 1180px;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: "Noto Sans HK", "Noto Sans TC", Aptos, "Segoe UI", "Microsoft JhengHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
}

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

html {
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgb(169 63 45 / 3%) 1px, transparent 1px) 0 0 / 80px 80px,
    var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
textarea {
  font: inherit;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--ink);
  background: rgb(246 240 227 / 94%);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.wordmark-mark {
  min-width: 78px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--tram-yellow-soft);
  box-shadow: inset 0 -4px 0 rgb(221 189 61 / 22%);
  font-weight: 800;
  line-height: 1;
}

.wordmark-copy {
  display: grid;
  gap: 1px;
}

.wordmark-copy strong {
  font-size: 14px;
  line-height: 1.2;
}

.wordmark-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding-inline: 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--hk-blue-soft);
}

.section-rule {
  border-bottom: 1px solid var(--ink);
}

.hero {
  padding: 34px 0 30px;
}

.hero-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  align-items: end;
  gap: 32px;
  margin-bottom: 22px;
}

.eyebrow,
.section-kicker,
.field-label {
  color: var(--hk-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 8px;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
}

h1 {
  max-width: 770px;
  margin-bottom: 0;
  font-size: clamp(40px, 5.2vw, 64px);
  letter-spacing: -0.035em;
  line-height: 0.98;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 3vw, 43px);
  letter-spacing: -0.025em;
  line-height: 1.05;
}

h3 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.15;
}

.hero-cantonese {
  margin: 10px 0 0;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.hero-copy {
  max-width: 670px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.trust-board {
  border: 1px solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-line);
}

.trust-board span {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 13px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
}

.trust-board span:last-child {
  border-bottom: 0;
}

.trust-board b {
  color: var(--hk-blue);
}

.translator-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 156px minmax(0, 1.14fr);
  min-height: 350px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-line);
}

.translator-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: var(--surface);
}

.panel-head {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -18px -18px 16px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper-deep);
}

.panel-label {
  margin: 0;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.count.is-near-limit {
  color: var(--sign-red);
  font-weight: 800;
}

textarea {
  width: 100%;
  min-height: 166px;
  flex: 1;
  resize: none;
  padding: 14px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: #fcf8ee;
  font-size: 17px;
  line-height: 1.55;
}

textarea::placeholder {
  color: #8a918f;
}

textarea:focus {
  outline: none;
  border-color: var(--hk-blue);
  box-shadow: inset 0 0 0 1px var(--hk-blue);
  background: var(--surface);
}

.input-actions {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.text-button {
  min-height: 40px;
  padding: 0 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 650;
}

.text-button:hover {
  color: var(--ink);
}

.live-status {
  min-height: 20px;
  margin: 0;
  color: var(--hk-blue);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.mini-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-examples button,
.scenario-grid button {
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface);
  font-weight: 750;
  transition: 140ms ease;
}

.mini-examples button {
  min-height: 36px;
  padding-inline: 11px;
  font-size: 12px;
}

.mini-examples button:hover,
.scenario-grid button:hover {
  border-color: var(--hk-blue);
  background: var(--hk-blue-soft);
  transform: translateY(-1px);
}

.action-column {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  border-inline: 1px solid var(--ink);
  background: var(--milk-tea);
}

.primary-button {
  width: 100%;
  min-height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--sign-red);
  border-radius: var(--radius-md);
  color: #fffaf0;
  background: var(--sign-red);
  box-shadow: inset 0 -4px 0 rgb(67 24 18 / 25%);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  transition: 140ms ease;
}

.button-label {
  min-width: 0;
  font-size: 14px;
}

.button-label span {
  display: block;
}

.primary-button:hover {
  border-color: var(--sign-red-dark);
  background: var(--sign-red-dark);
}

.primary-button:active,
.secondary-button:active,
.icon-button:active,
.phrase-play:active,
.scenario-grid button:active {
  transform: scale(0.97);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.primary-button svg {
  width: 20px;
}

.button-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgb(255 250 240 / 40%);
  border-top-color: #fffaf0;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.primary-button.is-loading .button-spinner {
  display: inline-block;
}

.primary-button.is-loading .button-arrow {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.result-panel {
  background: #fffdf8;
}

.semantic-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding-inline: 10px;
  border: 1px solid var(--hk-blue);
  border-radius: var(--radius-sm);
  color: var(--hk-blue);
  background: var(--hk-blue-soft);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.result-body {
  min-height: 275px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

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

.script-choice-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  line-height: 1.35;
  text-transform: uppercase;
}

.script-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: var(--paper-deep);
}

.script-toggle button {
  min-width: 86px;
  min-height: 37px;
  padding: 4px 9px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  transition: 140ms ease;
}

.script-toggle button span,
.script-toggle button b {
  display: block;
}

.script-toggle button b {
  margin-top: 2px;
  font-family: var(--body);
  font-size: 12px;
}

.script-toggle button:hover:not([aria-pressed="true"]) {
  color: var(--ink);
  background: var(--surface);
}

.script-toggle button[aria-pressed="true"] {
  color: var(--surface);
  background: var(--ink);
  box-shadow: 0 2px 0 oklch(0.323 0.066 246.8 / 0.14);
}

.result-copy {
  display: grid;
  gap: 16px;
}

.field-label {
  margin-bottom: 7px;
}

.cantonese-result {
  margin: 0;
  font-size: clamp(30px, 3.1vw, 43px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.jyutping-block {
  padding-top: 13px;
  border-top: 1px solid var(--ink);
}

.jyutping,
.phrase-jyutping {
  font-family: var(--mono);
}

.jyutping {
  margin: 0;
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.tone {
  min-width: 1.42em;
  height: 1.42em;
  display: inline-grid;
  place-items: center;
  margin-inline: 0.03em;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--ink);
  font-size: 0.76em;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  vertical-align: 0.12em;
}

.tone-1 { border-color: #34708b; background: #e1edf2; }
.tone-2 { border-color: #b94c39; background: #f6e3dd; }
.tone-3 { border-color: #3e7860; background: #e1eee7; }
.tone-4 { border-color: #655e85; background: #e8e5ef; }
.tone-5 { border-color: #af8725; background: var(--tram-yellow-soft); }
.tone-6 { border-color: #566673; background: #e8ecee; }

.tone-key {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.tone-key span {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  padding-inline: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 10px;
}

.demo-notice {
  margin: 0;
  padding: 9px 10px;
  border-left: 3px solid var(--tram-yellow);
  color: var(--muted);
  background: var(--tram-yellow-soft);
  font-size: 12px;
}

.result-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.audio-controls,
.copy-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.copy-controls {
  justify-content: flex-end;
}

.secondary-button,
.icon-button,
.phrase-play {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  transition: 140ms ease;
}

.secondary-button {
  padding-inline: 10px;
}

.icon-button,
.phrase-play {
  position: relative;
  width: 44px;
  padding: 0;
}

.secondary-button svg,
.icon-button svg,
.phrase-play svg {
  width: 18px;
  height: 18px;
}

.secondary-button:hover,
.icon-button:hover,
.phrase-play:hover {
  border-color: var(--ink);
  background: var(--paper-deep);
}

.secondary-button.is-playing,
.phrase-play.is-playing {
  border-color: var(--hk-blue);
  color: var(--hk-blue);
  background: var(--hk-blue-soft);
  box-shadow: inset 0 0 0 1px rgb(44 101 124 / 25%);
}

.icon-button.is-confirmed,
.secondary-button.is-confirmed {
  border-color: var(--success);
  color: var(--success);
  background: #e3f0e8;
}

.result-status {
  margin-top: 4px;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: max-content;
  max-width: 180px;
  padding: 5px 7px;
  border-radius: 4px;
  color: #fff;
  background: var(--ink);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: 120ms ease;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.examples-strip,
.value-section,
.comparison-section,
.phrases-section,
.steps-section,
.pronunciation-section,
.faq-section {
  padding: 56px 0;
}

.strip-heading,
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: end;
  gap: 28px;
  margin-bottom: 26px;
}

.section-kicker {
  margin-bottom: 8px;
}

.strip-heading > p,
.section-heading > p {
  margin: 0;
  color: var(--muted);
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.scenario-grid button {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 12px 10px;
  text-align: left;
}

.scenario-grid b {
  font-size: 18px;
}

.scenario-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-line);
}

.feature-grid article {
  min-height: 285px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-right: 1px solid var(--ink);
}

.feature-grid article:last-child {
  border-right: 0;
}

.feature-number {
  width: 42px;
  height: 31px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 40px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--tram-yellow-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}

.feature-grid p {
  margin: 0;
  color: var(--muted);
}

.feature-grid strong {
  margin-top: auto;
  padding-top: 28px;
  color: var(--sign-red);
  font-size: 13px;
}

.comparison-section {
  background: var(--paper-deep);
}

.comparison-table {
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-line);
}

.comparison-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(260px, 1.3fr) minmax(210px, 1fr);
  border-bottom: 1px solid var(--ink);
}

.comparison-row:last-child {
  border-bottom: 0;
}

.comparison-row > span {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 78px;
  padding: 15px 17px;
  border-right: 1px solid var(--ink);
}

.comparison-row > span:last-child {
  border-right: 0;
}

.comparison-head {
  color: var(--muted);
  background: var(--tram-yellow-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.comparison-head > span {
  min-height: 46px;
}

.comparison-row b {
  font-size: 20px;
}

.comparison-row small {
  font-family: var(--mono);
  line-height: 1.55;
}

.accuracy-note {
  max-width: 860px;
  margin: 18px 0 0;
  padding-left: 13px;
  border-left: 3px solid var(--tram-yellow);
  color: var(--muted);
  font-size: 13px;
}

.phrase-list {
  border-top: 1px solid var(--ink);
}

.phrase-row {
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(210px, 1.15fr) minmax(200px, 1fr) minmax(260px, 1.3fr) 44px;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ink);
}

.phrase-row p {
  margin: 0;
}

.phrase-english {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
}

.phrase-cantonese {
  font-size: 21px;
  font-weight: 800;
}

.phrase-jyutping {
  font-size: 13px;
  line-height: 1.8;
}

.steps-section {
  background: var(--paper-deep);
}

.steps-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 72px;
}

.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.steps-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 18px;
  padding: 19px 0;
  border-bottom: 1px solid var(--ink);
}

.steps-list > li > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}

.steps-list b {
  font-size: 17px;
}

.steps-list p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.pronunciation-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 72px;
}

.pronunciation-copy {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-line);
}

.pronunciation-copy p {
  margin: 0;
  color: var(--muted);
}

.pronunciation-copy b {
  color: var(--ink);
}

.pronunciation-copy code {
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--ink);
  background: var(--tram-yellow-soft);
  font-family: var(--mono);
  font-size: 0.92em;
}

.compact-heading {
  grid-template-columns: 1fr;
}

.faq-list {
  border-top: 1px solid var(--ink);
}

.faq-item {
  border-bottom: 1px solid var(--ink);
}

.faq-item h3 {
  margin: 0;
  font-family: var(--body);
}

.faq-item button {
  width: 100%;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 4px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 750;
  text-align: left;
}

.faq-item button:hover {
  color: var(--hk-blue);
}

.faq-item button svg {
  width: 22px;
  flex: 0 0 auto;
  transition: transform 150ms ease;
}

.faq-item button[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.faq-item > div {
  max-width: 820px;
  padding: 0 44px 20px 4px;
  color: var(--muted);
}

.site-footer {
  padding: 34px 0;
  color: #f7f1e6;
  background: var(--ink);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
}

.site-footer .wordmark-mark {
  color: var(--ink);
}

.site-footer .wordmark-copy small,
.site-footer p,
.footer-links {
  color: #adb7be;
}

.site-footer p {
  max-width: 580px;
  margin: 18px 0 0;
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  font-size: 12px;
}

.footer-links a:hover {
  color: #fff;
}

.legal-main {
  padding: 58px 0 76px;
}

.legal-article {
  max-width: 820px;
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-line);
}

.legal-article h1 {
  font-size: clamp(38px, 5vw, 58px);
}

.legal-article h2 {
  margin-top: 34px;
  font-size: 25px;
}

.legal-article p,
.legal-article li {
  color: var(--muted);
}

.legal-article a {
  color: var(--hk-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-meta {
  margin: 12px 0 28px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

@media (max-width: 1000px) {
  .translator-shell {
    grid-template-columns: minmax(0, 1fr) 128px minmax(0, 1.1fr);
  }

  .result-toolbar {
    grid-template-columns: 1fr;
  }

  .copy-controls {
    justify-content: flex-start;
  }

  .scenario-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .phrase-row {
    grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) 44px;
  }

  .phrase-jyutping {
    grid-column: 1 / 3;
    margin-top: -10px !important;
  }

  .phrase-play {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}

@media (max-width: 780px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    min-height: 58px;
  }

  .wordmark-copy {
    display: none;
  }

  .site-nav a:nth-child(2) {
    display: none;
  }

  .site-nav a {
    padding-inline: 8px;
    font-size: 11px;
  }

  .hero {
    padding-top: 26px;
  }

  .hero-intro,
  .strip-heading,
  .section-heading,
  .steps-layout,
  .pronunciation-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-intro {
    gap: 22px;
  }

  .trust-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-board span {
    min-width: 0;
    display: grid;
    justify-items: start;
    align-content: center;
    gap: 0;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    font-size: 11px;
  }

  .trust-board span:last-child {
    border-right: 0;
  }

  .translator-shell {
    grid-template-columns: 1fr;
  }

  .translator-panel {
    padding: 16px;
  }

  .panel-head {
    margin: -16px -16px 14px;
  }

  .action-column {
    padding: 10px 16px;
    border-inline: 0;
    border-block: 1px solid var(--ink);
  }

  .primary-button {
    min-height: 54px;
  }

  .button-label {
    font-size: 15px;
  }

  .button-label span {
    display: inline;
  }

  .button-label span + span::before {
    content: " · ";
  }

  .result-body {
    min-height: 310px;
  }

  .examples-strip,
  .value-section,
  .comparison-section,
  .phrases-section,
  .steps-section,
  .pronunciation-section,
  .faq-section {
    padding: 44px 0;
  }

  .strip-heading,
  .section-heading {
    align-items: start;
    gap: 13px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .feature-grid article:last-child {
    border-bottom: 0;
  }

  .feature-number {
    margin-bottom: 24px;
  }

  .steps-layout {
    gap: 30px;
  }

  .pronunciation-layout {
    gap: 24px;
  }

  .comparison-row {
    grid-template-columns: 1fr;
  }

  .comparison-row > span {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .comparison-row > span:last-child {
    border-bottom: 0;
  }

  .comparison-head {
    display: none;
  }

  .comparison-row > span::before {
    color: var(--hk-blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .comparison-row > span:nth-child(1)::before { content: "English"; }
  .comparison-row > span:nth-child(2)::before { content: "Spoken Cantonese + Jyutping"; }
  .comparison-row > span:nth-child(3)::before { content: "Formal written Chinese"; }

  .legal-main {
    padding: 34px 0 52px;
  }

  .legal-article {
    padding: 24px 20px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 540px) {
  h1 {
    font-size: 39px;
  }

  .hero-cantonese {
    font-size: 28px;
  }

  .hero-copy {
    font-size: 15px;
  }

  .trust-board {
    grid-template-columns: 1fr;
  }

  .trust-board span {
    min-height: 37px;
    display: flex;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .trust-board span:last-child {
    border-bottom: 0;
  }

  .semantic-badge {
    font-size: 10px;
  }

  .scenario-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-toolbar,
  .audio-controls,
  .copy-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .secondary-button {
    white-space: normal;
  }

  .copy-controls .secondary-button {
    grid-column: 2;
  }

  .phrase-row {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px 14px;
  }

  .phrase-english,
  .phrase-cantonese,
  .phrase-jyutping {
    grid-column: 1;
  }

  .phrase-jyutping {
    margin-top: 0 !important;
  }

  .phrase-play {
    grid-column: 2;
    grid-row: 1 / 4;
  }
}

/* Interlinear Cantonese result and compact learner preferences */
.translator-shell[data-direction="en-yue"] .result-body {
  gap: 0;
}

.translator-shell[data-direction="en-yue"] .result-preferences {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin: -4px 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.translator-shell[data-direction="en-yue"] .result-preferences .script-toggle {
  display: inline-flex;
  width: auto;
  padding: 2px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--paper-deep);
}

.translator-shell[data-direction="en-yue"] .result-preferences .script-toggle button {
  min-width: 0;
  min-height: 36px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 850;
}

.translator-shell[data-direction="en-yue"] .result-preferences .script-toggle button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 3px oklch(0.323 0.066 246.8 / 0.12);
}

.translator-shell[data-direction="en-yue"] .preference-toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.translator-shell[data-direction="en-yue"] .preference-toggle:hover,
.translator-shell[data-direction="en-yue"] .preference-toggle:focus-visible {
  color: var(--ink);
  background: var(--hk-blue-soft);
}

.translator-shell[data-direction="en-yue"] .switch-dot {
  width: 20px;
  height: 14px;
  position: relative;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--line-soft);
  transition: background-color 160ms ease;
}

.translator-shell[data-direction="en-yue"] .switch-dot::after {
  content: "";
  width: 10px;
  height: 10px;
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: var(--surface);
  transition: transform 160ms ease;
}

.translator-shell[data-direction="en-yue"] .preference-toggle[aria-checked="true"] {
  color: var(--ink);
}

.translator-shell[data-direction="en-yue"] .preference-toggle[aria-checked="true"] .switch-dot {
  background: var(--hk-blue);
}

.translator-shell[data-direction="en-yue"] .preference-toggle[aria-checked="true"] .switch-dot::after {
  transform: translateX(6px);
}

.translator-shell[data-direction="en-yue"] .result-preferences .speed-control select {
  min-height: 40px;
  padding: 0 20px 0 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background-color: transparent;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}

.translator-shell[data-direction="en-yue"] .result-preferences .tool-action {
  width: 34px;
  min-width: 34px;
  min-height: 40px;
  padding: 0;
}

.translator-shell[data-direction="en-yue"] .result-audio-settings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.translator-shell[data-direction="en-yue"] .result-preferences .copy-button {
  margin-left: auto;
}

.translator-shell[data-direction="en-yue"] .result-copy {
  min-height: 150px;
  display: block;
}

.translator-shell[data-direction="en-yue"] .result-footer {
  min-height: 58px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.translator-shell[data-direction="en-yue"] .result-footer .result-status {
  flex: 1;
  margin: 0 0 10px;
}

.translator-shell[data-direction="en-yue"] .result-footer .speed-control select {
  min-height: 44px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--ink);
  background-color: var(--surface);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 850;
}

.translator-shell[data-direction="en-yue"] .result-footer .audio-button {
  width: 50px;
  min-width: 50px;
  min-height: 50px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--tram-yellow);
}

.translator-shell[data-direction="en-yue"] .result-footer .audio-button:hover,
.translator-shell[data-direction="en-yue"] .result-footer .audio-button:focus-visible,
.translator-shell[data-direction="en-yue"] .result-footer .audio-button.is-playing {
  color: var(--surface);
  background: var(--ink);
}

.translator-shell[data-direction="en-yue"] .result-footer .audio-button svg {
  width: 21px;
  height: 21px;
}

.translator-shell[data-direction="en-yue"] .interlinear-result {
  margin: 0;
  padding: 15px 0 8px;
  color: var(--ink);
  font-family: var(--cjk);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 850;
  line-height: 2;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.translator-shell[data-direction="en-yue"] .interlinear-token {
  margin-right: 0.1em;
  ruby-align: center;
  ruby-position: over;
}

.translator-shell[data-direction="en-yue"] .interlinear-token rt {
  color: var(--hk-blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.25;
}

.translator-shell[data-direction="en-yue"] .interlinear-token rt .tone {
  min-width: 0;
  height: auto;
  display: inline;
  margin: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  vertical-align: baseline;
}

.translator-shell[data-direction="en-yue"] .interlinear-punctuation {
  display: inline;
  margin-left: -0.08em;
}

.translator-shell[data-direction="en-yue"] .interlinear-result.is-jyutping-hidden {
  padding-top: 2px;
  line-height: 1.45;
}

.translator-shell[data-direction="en-yue"] .interlinear-result.is-jyutping-hidden rt {
  display: none;
}

@media (max-width: 540px) {
  .translator-shell[data-direction="en-yue"] .result-preferences {
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .translator-shell[data-direction="en-yue"] .result-preferences .script-toggle button,
  .translator-shell[data-direction="en-yue"] .preference-toggle,
  .translator-shell[data-direction="en-yue"] .result-preferences .speed-control select,
  .translator-shell[data-direction="en-yue"] .result-preferences .tool-action {
    min-height: 44px;
  }

  .translator-shell[data-direction="en-yue"] .preference-toggle {
    padding-inline: 7px;
  }

  .translator-shell[data-direction="en-yue"] .interlinear-result {
    padding-top: 12px;
    font-size: 35px;
    line-height: 2.05;
  }
}

/* Focused English-to-Cantonese workflow */
.home-page .hero {
  padding: clamp(12px, 1.5vw, 18px) 0 22px;
}

.home-page .hero-intro {
  display: block;
  max-width: none;
  margin-bottom: 14px;
}

.home-page h1 {
  max-width: 900px;
  font-size: clamp(42px, 4.2vw, 56px);
  line-height: 1;
}

.home-page .hero-copy {
  max-width: 980px;
  margin-top: 7px;
  line-height: 1.5;
}

.translator-shell[data-direction="en-yue"] {
  grid-template-rows: auto auto;
  grid-template-areas:
    "input result"
    "action result";
  min-height: 0;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  box-shadow: 0 18px 42px oklch(0.323 0.066 246.8 / 0.09);
}

.translator-shell[data-direction="en-yue"] .translator-panel {
  padding: 24px;
}

.translator-shell[data-direction="en-yue"] .panel-head {
  min-height: 52px;
  margin: -24px -24px 20px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}

.translator-shell[data-direction="en-yue"] .input-panel {
  padding-left: 24px;
  padding-bottom: 12px;
}

.translator-shell[data-direction="en-yue"] textarea {
  min-height: 188px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fffefa;
  font-weight: 650;
}

.translator-shell[data-direction="en-yue"] textarea:focus {
  border-color: var(--hk-blue);
  box-shadow: 0 0 0 3px var(--hk-blue-soft);
}

.panel-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compact-clear {
  min-height: 32px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11px;
}

.translator-shell[data-direction="en-yue"] .count {
  color: var(--muted);
  font-size: 11px;
}

.translator-shell[data-direction="en-yue"] .input-status {
  min-height: 20px;
  margin: 5px 0 4px;
}

.translator-shell[data-direction="en-yue"] .mini-examples {
  align-items: center;
  gap: 4px 10px;
}

.translator-shell[data-direction="en-yue"] .mini-examples::before {
  content: "Try:";
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.translator-shell[data-direction="en-yue"] .mini-examples button {
  min-height: 34px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  color: var(--hk-blue);
  background: transparent;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 750;
}

.translator-shell[data-direction="en-yue"] .mini-examples button:hover {
  color: var(--ink);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  transform: none;
}

.translator-shell[data-direction="en-yue"] .action-column {
  align-items: flex-start;
  justify-content: stretch;
  padding: 0 24px 24px;
  border: 0;
  background: var(--surface);
}

.translator-shell[data-direction="en-yue"] .primary-button {
  width: 100%;
  max-width: none;
  flex-basis: auto;
  min-height: 54px;
  border: 1px solid var(--ink);
  border-radius: 11px;
  box-shadow: none;
}

.translator-shell[data-direction="en-yue"] .result-panel {
  padding-right: 24px;
  padding-bottom: 24px;
  border-left: 1px solid var(--line-soft);
  background: #fffdf8;
}

.translator-shell[data-direction="en-yue"] .result-head {
  gap: 10px;
  background: #fffdf8;
}

.translator-shell[data-direction="en-yue"] .result-head .script-toggle {
  width: auto;
  flex: 0 0 auto;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.translator-shell[data-direction="en-yue"] .result-head .script-toggle button {
  min-width: 48px;
  min-height: 36px;
  padding: 4px 9px;
  border-radius: 8px;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 850;
}

.translator-shell[data-direction="en-yue"] .result-head .script-toggle button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--tram-yellow-soft);
  box-shadow: none;
}

.translator-shell[data-direction="en-yue"] .result-copy {
  gap: 18px;
}

.translator-shell[data-direction="en-yue"] .jyutping-block {
  padding-top: 16px;
  border: 0;
}

.translator-shell[data-direction="en-yue"] .result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-width: 1px;
  border-color: var(--line-soft);
}

.translator-shell[data-direction="en-yue"] .audio-controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
}

.translator-shell[data-direction="en-yue"] .tool-action {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 750;
}

.translator-shell[data-direction="en-yue"] .tool-action:hover,
.translator-shell[data-direction="en-yue"] .tool-action:focus-visible {
  color: var(--ink);
  background: var(--hk-blue-soft);
}

.translator-shell[data-direction="en-yue"] .tool-action.is-playing {
  color: var(--hk-blue);
  background: var(--hk-blue-soft);
  box-shadow: none;
}

.translator-shell[data-direction="en-yue"] .tool-action svg {
  width: 19px;
  height: 19px;
}

.translator-shell[data-direction="en-yue"] .icon-action {
  width: 44px;
  padding: 0;
}

.translator-shell[data-direction="en-yue"] .speed-control select {
  min-height: 40px;
  padding: 0 24px 0 7px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background-color: transparent;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.translator-shell[data-direction="en-yue"] .speed-control select:hover,
.translator-shell[data-direction="en-yue"] .speed-control select:focus-visible {
  color: var(--ink);
  background-color: var(--paper-deep);
  outline: none;
}

@media (max-width: 780px) {
  .translator-shell[data-direction="en-yue"] {
    grid-template-rows: none;
    grid-template-areas:
      "input"
      "action"
      "result";
  }

  .translator-shell[data-direction="en-yue"] .input-panel {
    padding: 18px 18px 10px;
  }

  .translator-shell[data-direction="en-yue"] .action-column {
    padding: 0 18px 18px;
    border-bottom: 1px solid var(--line-soft);
  }

  .translator-shell[data-direction="en-yue"] .result-body {
    min-height: 270px;
  }

  .translator-shell[data-direction="en-yue"] .result-panel {
    padding: 18px;
    border-left: 0;
  }

  .translator-shell[data-direction="en-yue"] .panel-head {
    margin: -18px -18px 16px;
  }
}

@media (max-width: 540px) {
  .translator-shell[data-direction="en-yue"] .result-head .script-toggle {
    width: auto;
  }

  .translator-shell[data-direction="en-yue"] .result-toolbar {
    display: flex;
    grid-template-columns: none;
  }

  .translator-shell[data-direction="en-yue"] .audio-controls {
    display: flex;
  }

  .translator-shell[data-direction="en-yue"] .copy-controls {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Open Design direction: warm Hong Kong transit signage */
:root {
  --paper: oklch(0.955 0.02 82);
  --surface: oklch(0.985 0.012 88);
  --paper-deep: oklch(0.93 0.025 80);
  --milk-tea: oklch(0.9 0.012 202);
  --ink: oklch(0.323 0.066 246.8);
  --muted: oklch(0.472 0.033 232.2);
  --border: oklch(0.323 0.066 246.8);
  --line-soft: oklch(0.323 0.066 246.8 / 0.3);
  --sign-red: oklch(0.531 0.182 28.8);
  --sign-red-dark: oklch(0.43 0.15 28.8);
  --sign-red-soft: oklch(0.9 0.06 30);
  --hk-blue: oklch(0.472 0.055 232.2);
  --hk-blue-soft: oklch(0.9 0.012 202);
  --tram-yellow: oklch(0.821 0.157 84.9);
  --tram-yellow-soft: oklch(0.94 0.055 86);
  --success: oklch(0.48 0.1 155);
  --shadow-line: 0 7px 0 oklch(0.323 0.066 246.8 / 0.09);
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --display: "Bahnschrift Condensed", "DIN Condensed", "Avenir Next Condensed", "Franklin Gothic Condensed", "Noto Sans TC", sans-serif;
  --body: Aptos, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html {
  overflow-x: hidden;
}

body.transit-paper {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, oklch(0.985 0.012 88 / 0.55) 0 1px, transparent 1.6px) 0 0 / 28px 28px,
    radial-gradient(circle at 82% 7%, oklch(0.323 0.066 246.8 / 0.045) 0 1px, transparent 1.5px) 0 0 / 38px 38px,
    linear-gradient(90deg, oklch(0.323 0.066 246.8 / 0.025) 1px, transparent 1px) 0 0 / 112px 112px,
    var(--paper);
  line-height: 1.65;
}

:focus-visible {
  outline-color: var(--sign-red);
  outline-width: 3px;
  outline-offset: 4px;
}

.site-header {
  padding: 14px 0 9px;
  border-bottom: 0;
  background: linear-gradient(to bottom, var(--surface) 76%, transparent);
  backdrop-filter: none;
}

.header-inner {
  min-height: 72px;
  padding: 10px 14px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: var(--surface);
  box-shadow:
    inset 0 0 0 2px var(--surface),
    inset 0 0 0 3px var(--ink),
    0 5px 0 oklch(0.323 0.066 246.8 / 0.08);
}

.wordmark-mark {
  min-width: 82px;
  min-height: 42px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--tram-yellow);
  box-shadow: inset 0 0 0 2px var(--surface);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 900;
}

.wordmark-copy strong {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1;
}

.wordmark-copy small,
.site-nav a {
  font-family: var(--mono);
  font-weight: 850;
}

.site-nav {
  gap: 7px;
}

.site-nav a {
  border: 2px solid transparent;
  border-radius: 999px;
  color: var(--ink);
}

.site-nav a:hover {
  border-color: var(--ink);
  background: var(--hk-blue-soft);
}

.section-rule {
  border-bottom: 1px solid var(--line-soft);
}

.hero {
  position: relative;
  padding: clamp(30px, 5vw, 62px) 0 0;
  isolation: isolate;
}

.hero-intro {
  align-items: center;
  gap: clamp(24px, 5vw, 56px);
  margin-bottom: 28px;
}

.eyebrow,
.section-kicker,
.field-label {
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 900;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
}

.eyebrow::before,
.section-kicker::before {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--sign-red);
  content: "";
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 900;
}

h1 {
  max-width: 840px;
  font-size: clamp(48px, 6vw, 76px);
  letter-spacing: -0.035em;
  line-height: 0.94;
}

h2 {
  font-size: clamp(36px, 4.5vw, 56px);
  letter-spacing: -0.025em;
  line-height: 1;
}

h3 {
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.08;
}

.hero-cantonese {
  color: var(--hk-blue);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
}

.hero-copy {
  max-width: 650px;
  font-weight: 600;
  line-height: 1.72;
}

.trust-board {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.trust-board span {
  min-height: 42px;
  padding-inline: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 700;
}

.translator-shell {
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "input result"
    "action action";
  border: 4px solid var(--ink);
  border-radius: 30px;
  background: var(--surface);
  box-shadow:
    inset 0 0 0 2px var(--ink),
    0 12px 0 oklch(0.323 0.066 246.8 / 0.1);
}

.translator-panel {
  padding: 24px;
}

.panel-head {
  min-height: 56px;
  margin: -24px -24px 19px;
  padding: 11px 18px;
  border-bottom: 3px solid var(--ink);
  background: var(--surface);
}

.panel-label {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0;
}

.count,
.semantic-badge {
  font-family: var(--mono);
  font-weight: 900;
}

.input-panel {
  grid-area: input;
  padding-left: 27px;
}

textarea {
  min-height: 178px;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--surface);
  font-size: 18px;
  font-weight: 720;
  resize: vertical;
}

textarea:focus {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--tram-yellow);
}

.mini-examples button,
.scenario-grid button {
  border: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-weight: 900;
}

.mini-examples button {
  border-radius: 999px;
  background: var(--hk-blue-soft);
}

.action-column {
  grid-area: action;
  padding: 20px 14px;
  border-top: 1px solid var(--line-soft);
  border-inline: 0;
  background: var(--surface);
}

.primary-button {
  width: 280px;
  max-width: 100%;
  flex: 0 1 280px;
  min-height: 60px;
  border: 3px solid var(--ink);
  border-radius: 13px;
  color: var(--ink);
  background: var(--tram-yellow);
  box-shadow: 0 4px 0 oklch(0.323 0.066 246.8 / 0.14);
  font-family: var(--display);
  font-weight: 900;
}

.primary-button:hover {
  border-color: var(--ink);
  color: var(--surface);
  background: var(--ink);
}

.button-label {
  font-size: 18px;
}

.result-panel {
  grid-area: result;
  padding-right: 27px;
  border-left: 1px solid var(--line-soft);
  background: var(--surface);
}

.result-panel .panel-head {
  background: var(--tram-yellow);
}

.semantic-badge {
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--tram-yellow);
}

.cantonese-result {
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 950;
}

.jyutping-block,
.result-toolbar {
  border-color: var(--ink);
  border-width: 2px;
}

.tone-key span {
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
}

.secondary-button,
.icon-button,
.phrase-play {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 850;
}

.secondary-button:hover,
.icon-button:hover,
.phrase-play:hover {
  border-color: var(--ink);
  color: var(--surface);
  background: var(--ink);
}

.harbour-route {
  position: relative;
  height: 62px;
  margin-top: 34px;
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
  color: var(--ink);
  background:
    linear-gradient(135deg, transparent 0 52%, var(--ink) 53% 55%, transparent 56%) 24px 26px / 34px 34px repeat-x,
    linear-gradient(to bottom, transparent 0 48px, var(--hk-blue-soft) 49px 100%);
  opacity: 0.72;
}

.harbour-route::before,
.harbour-route::after {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--hk-blue);
  content: "";
}

.harbour-route::before {
  bottom: 19px;
  box-shadow: 0 8px 0 var(--hk-blue);
}

.harbour-route::after {
  bottom: 3px;
}

.route-stop {
  position: absolute;
  left: clamp(18px, 7vw, 84px);
  bottom: 9px;
  z-index: 2;
  width: 17px;
  height: 17px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--sign-red);
}

.route-caption,
.tram-mark {
  position: absolute;
  z-index: 3;
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
}

.route-caption {
  left: clamp(48px, 10vw, 115px);
  bottom: 3px;
  padding: 5px 10px;
  background: var(--surface);
}

.tram-mark {
  right: clamp(6px, 3vw, 30px);
  bottom: 2px;
  padding: 8px 14px;
  border-radius: 9px 9px 3px 3px;
  background: var(--tram-yellow);
  box-shadow: 7px 7px 0 oklch(0.323 0.066 246.8 / 0.12);
}

.examples-strip,
.value-section,
.comparison-section,
.phrases-section,
.steps-section,
.pronunciation-section,
.faq-section {
  padding: clamp(52px, 7vw, 88px) 0;
}

.examples-strip,
.phrases-section,
.pronunciation-section {
  background: var(--surface);
}

.value-section,
.faq-section {
  background: var(--paper);
}

.section-kicker {
  padding: 8px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: none;
}

.strip-heading,
.section-heading {
  margin-bottom: 30px;
}

.strip-heading > p,
.section-heading > p {
  font-weight: 500;
  line-height: 1.75;
}

.scenario-grid {
  gap: 12px;
}

.scenario-grid button {
  position: relative;
  min-height: 104px;
  padding: 15px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 0 50%, var(--paper) 0 7px, transparent 8px),
    radial-gradient(circle at 100% 50%, var(--paper) 0 7px, transparent 8px),
    var(--surface);
  box-shadow: none;
}

.scenario-grid button:hover {
  border-color: var(--ink);
  color: var(--surface);
  background: var(--ink);
}

.scenario-grid button:hover span {
  color: var(--surface);
}

.scenario-grid b {
  color: inherit;
  font-family: var(--body);
  font-size: 22px;
}

.feature-grid,
.comparison-table,
.phrase-list,
.pronunciation-copy,
.faq-list,
.legal-article {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: none;
}

.feature-grid article {
  padding: 28px;
  border-right: 1px solid var(--line-soft);
}

.feature-number {
  width: 52px;
  height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--tram-yellow);
  font-weight: 900;
}

.feature-grid strong {
  color: var(--sign-red);
  font-family: var(--mono);
}

.comparison-section,
.steps-section {
  background: oklch(0.785 0.016 202 / 0.16);
}

.comparison-row {
  border-bottom: 1px solid var(--line-soft);
}

.comparison-row > span {
  padding: 18px 20px;
  border-right: 1px solid var(--line-soft);
}

.comparison-head {
  color: var(--surface);
  background: var(--ink);
}

.comparison-row b {
  font-size: 23px;
  font-weight: 900;
}

.phrase-list {
  overflow: hidden;
  border-top-width: 1px;
}

.phrase-row {
  min-height: 104px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.phrase-row:last-child {
  border-bottom: 0;
}

.phrase-english {
  font-size: 22px;
  font-weight: 900;
}

.phrase-cantonese {
  font-size: 23px;
  font-weight: 900;
}

.phrase-play {
  border-radius: 50%;
  background: var(--tram-yellow);
}

.steps-list {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: none;
}

.steps-list li {
  padding: 22px;
  border-bottom: 1px solid var(--line-soft);
}

.steps-list li:last-child {
  border-bottom: 0;
}

.steps-list > li > span {
  border: 1px solid var(--line-soft);
  color: var(--surface);
  background: var(--sign-red);
  font-weight: 900;
}

.pronunciation-copy {
  padding: 28px;
}

.pronunciation-copy code {
  border: 1px solid var(--line-soft);
  background: var(--tram-yellow);
}

.faq-list {
  overflow: hidden;
  border-top-width: 1px;
}

.faq-item {
  padding-inline: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.faq-item:last-child {
  border-bottom: 0;
}

.faq-item button {
  min-height: 74px;
  font-weight: 750;
}

.feature-grid p,
.steps-list p,
.pronunciation-copy p,
.faq-item > div {
  line-height: 1.72;
  font-weight: 500;
}

.site-footer {
  padding: 44px 0;
  border-top: 1px solid var(--line-soft);
}

.site-footer .wordmark-mark {
  color: var(--ink);
  background: var(--tram-yellow);
}

.editorial-section {
  padding: clamp(52px, 7vw, 88px) 0;
  background: var(--paper);
}

.editorial-section.editorial-surface {
  background: var(--surface);
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
}

.editorial-grid article {
  padding: 28px 30px 30px 0;
  border-bottom: 1px solid var(--line-soft);
}

.editorial-grid article:nth-child(odd) {
  padding-right: 34px;
  border-right: 1px solid var(--line-soft);
}

.editorial-grid article:nth-child(even) {
  padding-left: 34px;
}

.editorial-grid h3 {
  margin-bottom: 11px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
}

.editorial-grid p {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.78;
}

.editorial-grid b {
  color: var(--ink);
}

.compact-editorial-grid article {
  padding-block: 24px;
}

.legal-article {
  padding: 42px;
}

@media (max-width: 1000px) {
  .translator-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .site-header {
    padding-top: 9px;
  }

  .header-inner {
    min-height: 62px;
    padding: 8px 10px;
    border-width: 3px;
    border-radius: 18px;
  }

  .wordmark-mark {
    min-width: 72px;
    min-height: 38px;
  }

  .hero {
    padding-top: 30px;
  }

  .translator-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "input"
      "action"
      "result";
    border-width: 4px;
    border-radius: 26px;
  }

  .translator-panel,
  .input-panel,
  .result-panel {
    padding: 18px;
  }

  .panel-head {
    min-height: 52px;
    margin: -18px -18px 16px;
    padding: 10px 14px;
  }

  .action-column {
    padding: 12px 18px;
    border-inline: 0;
    border-block: 1px solid var(--line-soft);
  }

  .primary-button {
    width: 100%;
    min-height: 60px;
  }

  .result-panel {
    border-left: 0;
  }

  .result-body {
    min-height: 320px;
  }

  .harbour-route {
    margin-top: 24px;
  }

  .feature-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .comparison-row > span {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .comparison-row > span:last-child {
    border-bottom: 0;
  }

  .editorial-grid {
    grid-template-columns: 1fr;
  }

  .editorial-grid article,
  .editorial-grid article:nth-child(odd),
  .editorial-grid article:nth-child(even) {
    padding: 24px 0;
    border-right: 0;
  }
}

@media (max-width: 540px) {
  .container {
    width: min(100% - 20px, var(--container));
  }

  h1 {
    font-size: clamp(44px, 14vw, 58px);
  }

  h2 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .hero-cantonese {
    font-size: 27px;
  }

  .trust-board span {
    border: 1px solid var(--line-soft);
  }

  .translator-title {
    font-size: 1.55rem;
  }

  .semantic-badge {
    padding-inline: 8px;
  }

  .script-choice {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .script-toggle {
    width: 100%;
  }

  .script-toggle button {
    min-width: 0;
  }

  .route-caption {
    display: none;
  }

  .tram-mark {
    right: 3px;
    font-size: 10px;
  }

  .feature-grid,
  .comparison-table,
  .phrase-list,
  .pronunciation-copy,
  .faq-list,
  .legal-article {
    border-width: 1px;
    border-radius: 18px;
  }

  .phrase-row {
    padding-inline: 14px;
  }

  .steps-list {
    border-width: 1px;
  }

  .faq-item {
    padding-inline: 14px;
  }

  .legal-article {
    padding: 25px 20px;
  }
}

@media (max-width: 540px) {
  .translator-shell[data-direction="en-yue"] .result-preferences button,
  .translator-shell[data-direction="en-yue"] .result-preferences select {
    min-height: 44px;
  }

  .translator-shell[data-direction="en-yue"] .result-preferences .script-toggle button {
    height: 44px;
    min-height: 44px;
  }
}

/* Open Design translator module: clear desktop workspace and continuous mobile flow */
.translator-shell[data-direction="en-yue"] {
  --translator-ink: var(--ink);
  --translator-soft: var(--hk-blue-soft);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto;
  grid-template-areas:
    "languages languages"
    "source result";
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 36px oklch(0.323 0.066 246.8 / 0.1);
}

.translator-shell[data-direction="en-yue"] .translator-source-column {
  grid-area: source;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.translator-language-bar {
  grid-area: languages;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  padding-inline: 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}

.language-option,
.language-swap {
  min-height: 57px;
  display: flex;
  align-items: center;
  position: relative;
  color: var(--muted);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.language-option.is-active,
.language-target {
  color: var(--translator-ink);
}

.language-option.is-active::after,
.language-target::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--tram-yellow);
  content: "";
}

.language-target {
  justify-content: flex-start;
  padding-left: 20px;
}

.language-swap {
  min-width: 64px;
  justify-content: center;
  align-self: center;
  padding-inline: 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.language-swap svg {
  width: 21px;
  height: 21px;
}

.language-swap:hover,
.language-swap:focus-visible {
  color: var(--translator-ink);
  background: var(--translator-soft);
}

.translator-shell[data-direction="en-yue"] .translator-panel {
  padding: 22px 24px;
}

.translator-shell[data-direction="en-yue"] .input-panel {
  padding: 18px 24px 8px;
}

.translator-shell[data-direction="en-yue"] .panel-label {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  color: var(--ink);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.translator-shell[data-direction="en-yue"] .input-panel .panel-head {
  min-height: 44px;
  justify-content: space-between;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.translator-shell[data-direction="en-yue"] .result-head {
  min-height: 44px;
  display: flex;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.translator-shell[data-direction="en-yue"] textarea {
  min-height: 148px;
  flex: 0 0 auto;
  padding: 8px 2px 12px;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 450;
  line-height: 1.45;
  resize: none;
}

.translator-shell[data-direction="en-yue"] textarea:focus {
  border-color: transparent;
  box-shadow: none;
  outline: 3px solid var(--hk-blue);
  outline-offset: 4px;
}

.translator-shell[data-direction="en-yue"] textarea::placeholder {
  color: var(--muted);
}

.input-utility-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.paste-button,
.new-translation-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: var(--tram-yellow-soft);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 750;
}

.paste-button:hover,
.paste-button:focus-visible,
.new-translation-button:hover,
.new-translation-button:focus-visible {
  color: var(--surface);
  background: var(--ink);
}

.translator-shell[data-direction="en-yue"] .input-status {
  margin: 2px 0;
}

.translator-shell[data-direction="en-yue"] .mini-examples {
  min-height: 36px;
  gap: 6px;
  padding-top: 5px;
}

.translator-shell[data-direction="en-yue"] .mini-examples::before {
  content: none;
}

.translator-shell[data-direction="en-yue"] .mini-examples button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
}

.translator-shell[data-direction="en-yue"] .action-column {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 16px;
  border: 0;
  background: var(--surface);
}

.translator-shell[data-direction="en-yue"] .primary-button {
  width: 100%;
  min-height: 52px;
  padding-inline: 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--tram-yellow);
  box-shadow: none;
}

.translation-error {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--sign-red);
  border-radius: 6px;
  color: var(--ink);
  background: var(--sign-red-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.example-chip {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--tram-yellow-soft);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.translator-shell[data-direction="en-yue"] .primary-button:hover,
.translator-shell[data-direction="en-yue"] .primary-button:focus-visible {
  color: var(--surface);
  background: var(--ink);
}

.translator-shell[data-direction="en-yue"] .result-panel {
  min-height: 404px;
  padding: 22px 24px;
  border-left: 1px solid var(--line-soft);
  background: var(--surface);
}

.mobile-source-summary {
  display: none;
}

.translator-shell[data-direction="en-yue"] .result-preferences {
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom-color: var(--line-soft);
}

.translator-shell[data-direction="en-yue"] .result-preferences .script-toggle {
  border-color: var(--line-soft);
  background: var(--paper-deep);
}

.translator-shell[data-direction="en-yue"] .result-preferences .script-toggle button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface);
}

.translator-shell[data-direction="en-yue"] .interlinear-result {
  color: var(--ink);
  font-size: clamp(35px, 4vw, 50px);
  font-weight: 650;
}

.translator-shell[data-direction="en-yue"] .interlinear-word {
  display: inline-block;
  white-space: nowrap;
}

.translator-shell[data-direction="en-yue"] .interlinear-token rt {
  color: var(--hk-blue);
}

.translator-shell[data-direction="en-yue"] .result-footer {
  display: block;
  border-top-color: var(--line-soft);
}

.translator-shell[data-direction="en-yue"][data-has-result="false"] .result-preferences,
.translator-shell[data-direction="en-yue"][data-has-result="false"] .result-footer {
  display: none;
}

.translator-shell[data-direction="en-yue"][data-has-result="false"] .result-copy {
  min-height: 190px;
}

.translator-shell[data-direction="en-yue"] .result-actions,
.translator-shell[data-direction="en-yue"] .result-audio-settings,
.translator-shell[data-direction="en-yue"] .result-copy-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.translator-shell[data-direction="en-yue"] .result-actions {
  justify-content: space-between;
}

.translator-shell[data-direction="en-yue"] .result-copy-actions {
  justify-content: flex-end;
}

.translator-shell[data-direction="en-yue"] .result-placeholder {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  background: var(--paper);
}

.translator-shell[data-direction="en-yue"] .interlinear-result:not(:empty) + .result-placeholder,
.translator-shell[data-direction="en-yue"] .result-copy:has(.demo-notice:not([hidden])) .result-placeholder {
  display: none;
}

.translator-shell[data-direction="en-yue"] .result-footer .audio-button {
  border: 0;
  color: var(--ink);
  background: var(--tram-yellow);
}

.translator-shell[data-direction="en-yue"] .result-footer .audio-button:hover,
.translator-shell[data-direction="en-yue"] .result-footer .audio-button:focus-visible,
.translator-shell[data-direction="en-yue"] .result-footer .audio-button.is-playing {
  color: var(--surface);
  background: var(--ink);
}

.new-translation-button {
  display: inline-flex;
  margin: 0;
}

@media (max-width: 780px) {
  .home-page .hero {
    padding: 18px 0 26px;
  }

  .home-page .hero-intro {
    margin-bottom: 14px;
  }

  .home-page .eyebrow,
  .home-page .hero-copy {
    display: none;
  }

  .home-page h1 {
    max-width: none;
    font-size: clamp(30px, 9vw, 38px);
    line-height: 1.05;
  }

  .translator-shell[data-direction="en-yue"] {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "languages"
      "source"
      "result";
    border-color: var(--line-soft);
    border-radius: 8px;
    box-shadow: 0 8px 24px oklch(0.323 0.066 246.8 / 0.08);
  }

  .translator-shell[data-direction="en-yue"][data-view="result"] .translator-source-column,
  .translator-shell[data-direction="en-yue"][data-view="input"] .result-panel {
    display: none;
  }

  .translator-shell[data-direction="en-yue"][data-view="result"] .result-panel,
  .translator-shell[data-direction="en-yue"][data-view="input"] .translator-source-column {
    display: flex;
  }

  .translator-language-bar {
    min-height: 60px;
    padding-inline: 14px;
  }

  .language-option,
  .language-swap {
    min-height: 59px;
    font-size: 14px;
  }

  .language-swap {
    min-width: 66px;
    font-size: 11px;
  }

  .language-target {
    justify-content: flex-end;
    padding-left: 0;
  }

  .translator-shell[data-direction="en-yue"] .input-panel {
    min-height: 0;
    padding: 18px 18px 10px;
  }

  .translator-shell[data-direction="en-yue"] textarea {
    min-height: 190px;
    padding-top: 8px;
    font-size: clamp(22px, 7vw, 30px);
    line-height: 1.35;
  }

  .translator-shell[data-direction="en-yue"][data-view="result"] textarea {
    min-height: 96px;
  }

  .translator-shell[data-direction="en-yue"] .input-utility-row {
    min-height: 54px;
  }

  .translator-shell[data-direction="en-yue"] .action-column {
    padding: 14px 18px 16px;
    border: 0;
    border-block: 1px solid var(--line-soft);
  }

  .translator-shell[data-direction="en-yue"] .result-panel {
    min-height: 0;
    padding: 18px;
    border-left: 0;
    background: var(--surface);
  }

  .mobile-source-summary {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-soft);
  }

  .translator-shell[data-direction="en-yue"][data-view="result"] .mobile-source-summary {
    display: block;
  }

  .mobile-source-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
  }

  .mobile-source-summary p {
    margin: 10px 0 0;
    color: var(--ink);
    font-size: clamp(22px, 7vw, 30px);
    line-height: 1.35;
  }

  .translator-shell[data-direction="en-yue"] .result-preferences {
    justify-content: flex-start;
    margin-bottom: 18px;
  }

  .translator-shell[data-direction="en-yue"] .result-preferences .script-toggle {
    width: 100%;
  }

  .translator-shell[data-direction="en-yue"] .result-copy {
    min-height: 180px;
  }

  .translator-shell[data-direction="en-yue"] .interlinear-result {
    padding-top: 8px;
    font-size: clamp(28px, 7.5vw, 34px);
    line-height: 1.75;
  }

  .translator-shell[data-direction="en-yue"] .result-footer {
    margin-top: 16px;
  }

  .translator-shell[data-direction="en-yue"] .result-actions,
  .translator-shell[data-direction="en-yue"] .result-audio-settings,
  .translator-shell[data-direction="en-yue"] .result-copy-actions {
    width: 100%;
    align-items: stretch;
  }

  .translator-shell[data-direction="en-yue"] .result-copy-actions .tool-action,
  .translator-shell[data-direction="en-yue"] .result-copy-actions .new-translation-button {
    flex: 1 1 140px;
  }

  .harbour-route {
    display: none;
  }
}

@media (max-width: 360px) {
  .translator-language-bar {
    padding-inline: 10px;
  }

  .language-swap {
    min-width: 58px;
    padding-inline: 6px;
  }

  .translator-shell[data-direction="en-yue"] .result-panel {
    padding-inline: 16px;
  }

  .mobile-source-summary {
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .translator-shell[data-direction="en-yue"] .result-preferences {
    gap: 2px;
  }

  .translator-shell[data-direction="en-yue"] .preference-toggle {
    padding-inline: 5px;
  }
}
