:root { color-scheme: light; --paper: #f7f9fc; --ink: #202b3d; --muted: #626d80; --line: #d9dfe9; --accent: #3659a2; --surface: #ebeff7; --field: #ffffff; --serif: "Yu Mincho", "Hiragino Mincho ProN", "Songti TC", "Noto Serif CJK TC", serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 system-ui, -apple-system, "Noto Sans TC", sans-serif; }
.page { max-width: 850px; padding: 0 40px; margin: 0 auto; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--ink); }
.wordmark { font: 600 16px/1.5 system-ui, sans-serif; letter-spacing: .02em; margin: 0; }
.edition { font-size: 12px; color: var(--muted); }
h1 { font: 500 clamp(26px, 4vw, 34px)/1.4 var(--serif); letter-spacing: .06em; margin: 0; }
.search-desk { position: sticky; top: 0; z-index: 2; padding: 18px 0 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.search-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.search-caption { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
kbd { font: inherit; }
h2 { font-size: 16px; line-height: 1.5; margin: 0; }
h3 { font-size: 15px; margin: 0 0 12px; }
p { margin: 0 0 12px; }
button, input { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; min-height: 44px; min-width: 44px; border-radius: 0; }
button:disabled { cursor: wait; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.search-box { display: flex; align-items: center; background: var(--field); border: 1px solid var(--ink); border-bottom-width: 2px; padding: 6px; gap: 4px; }
.search-box:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
input { appearance: none; border: 0; border-radius: 0; background: transparent; color: var(--ink); padding: 12px; width: 100%; min-width: 0; outline: none; font: 24px/1.5 var(--serif); }
input::-webkit-search-cancel-button { -webkit-appearance: none; }
input::placeholder { color: var(--muted); font: 16px/1.5 system-ui, sans-serif; }
#clear-query { flex: 0 0 44px; border: 0; background: transparent; font-size: 26px; color: var(--muted); }
#submit-query { flex-shrink: 0; border: 0; padding: 8px 16px; background: var(--ink); color: var(--paper); font-size: 14px; }
#submit-query:hover { background: var(--accent); }
#submit-query:disabled { opacity: .5; }
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.section-heading { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 20px; min-height: 44px; }
.text-button { padding: 8px 10px; color: var(--accent); background: none; border: 0; font-size: 14px; }
.results { list-style: none; padding: 0; margin: 16px 0 0; }
.results li { border-bottom: 1px solid var(--line); }
.results li:first-child { border-top: 1px solid var(--line); }
.entry-button { width: 100%; text-align: left; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 20px 8px; border: 0; border-radius: 0; background: transparent; color: var(--ink); }
.entry-button:hover { background: var(--surface); }
.entry-reading { display: inline; font: 500 25px/1.6 var(--serif); overflow-wrap: anywhere; }
.entry-original { font: 400 17px/1.6 var(--serif); color: var(--muted); display: inline-block; margin-left: 18px; overflow-wrap: anywhere; }
.entry-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.entry-arrow { font-size: 22px; color: var(--accent); }
.secondary { background: var(--field); border: 1px solid var(--line); color: var(--accent); padding: 10px 20px; }
.more { width: 100%; margin-top: 16px; }
.empty { border-top: 1px solid var(--line); padding: 28px 0 36px; margin-top: 16px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 6px; }
.empty p { margin: 0; font-size: 14px; }
.notice { margin: 20px 0; padding: 14px 16px; background: var(--surface); border-left: 2px solid var(--accent); overflow-wrap: anywhere; }
.warning { background: #fff0dc; color: #71411b; font-size: 14px; }
.reading-guide { padding: 8px 0; margin-top: 40px; border-top: 1px solid var(--line); }
.reading-guide h2 { font-size: 15px; margin-bottom: 10px; }
.reading-guide p { color: var(--muted); font-size: 14px; }
footer { border-top: 1px solid var(--line); padding: 22px 0 32px; color: var(--muted); font-size: 12px; }
summary { cursor: pointer; padding: 12px 0; min-height: 44px; color: var(--accent); font-size: 14px; }
details p, .source-links { overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: 3px; }
.source-links { padding-left: 20px; }
.source-links a { display: inline-block; padding: 10px 0; min-height: 44px; }
#detail { scroll-margin-top: 145px; margin-top: 20px; min-width: 0; }
.back { margin: 0 0 12px -10px; }
.entry-detail { border-top: 2px solid var(--ink); background: transparent; padding: 26px 0; border-radius: 0; min-width: 0; }
.entry-detail h2 { font: 500 38px/1.4 var(--serif); overflow-wrap: anywhere; }
.detail-original { color: var(--muted); font-size: 18px; margin-top: 4px; overflow-wrap: anywhere; }
.detail-pos { display: inline-block; font-size: 12px; border: 1px solid var(--line); border-radius: 0; padding: 2px 8px; margin: 10px 0 20px; overflow-wrap: anywhere; }
.condition { padding: 14px; border-left: 3px solid var(--accent); background: var(--surface); margin-bottom: 24px; }
.condition h3 { color: var(--accent); margin-bottom: 6px; }
.condition p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pronunciation + .pronunciation { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 22px; }
.pitch-scroll { max-width: 100%; overflow-x: auto; border-radius: 0; background: var(--surface); }
.pitch-scroll svg { display: block; max-width: none; }
.pitch-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; }
.pitch-dot { fill: var(--field); stroke: var(--accent); stroke-width: 3; }
.pitch-guide { stroke: var(--line); stroke-width: 1; }
.pitch-kana { fill: var(--ink); font-size: 19px; text-anchor: middle; }
.pitch-level { fill: var(--accent); font-size: 13px; text-anchor: middle; }
.pitch-text { font-size: 13px; color: var(--muted); margin-top: 10px; overflow-wrap: anywhere; }
.drop-note { color: var(--accent); background: var(--surface); padding: 8px 12px; font-size: 14px; margin-top: 12px; border-radius: 0; }
.raw-note { color: var(--accent); font-size: 14px; }
.raw-code { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 12px; padding: 14px; background: var(--surface); border-radius: 0; font-size: 17px; }
.source { font-size: 13px; color: var(--muted); margin: 24px 0 6px; overflow-wrap: anywhere; }
.raw-fields { font-size: 13px; }
.raw-fields dt { font-weight: 600; margin-top: 10px; }
.raw-fields dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.examples { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; margin-top: 20px; }
.examples-label { font-size: 12px; }
.example-word { background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px 0; color: var(--accent); font: 18px/1.5 var(--serif); }
.example-word:hover { border-color: var(--accent); }
.entry-button { scroll-margin-top: 145px; }
@media (max-width: 600px) {
  .page { padding: 0 20px; }
  .masthead { padding: 20px 0 16px; }
  .wordmark { font-size: 16px; }
  .edition { font-size: 11px; }
  .search-desk { padding: 20px 0 14px; }
  .search-heading { margin-bottom: 12px; }
  .search-caption { font-size: 10px; letter-spacing: 0; }
  input { padding: 10px 6px; font-size: 21px; }
  input::placeholder { font-size: 14px; }
  #submit-query { padding: 8px 12px; }
  #submit-query span { display: none; }
  .entry-button { padding: 17px 4px; }
  .entry-reading { font-size: 23px; }
  .entry-original { font-size: 16px; margin-left: 12px; }
  .entry-detail h2 { font-size: 32px; }
  #detail, .entry-button { scroll-margin-top: 145px; }
}
@media (hover: none) and (pointer: coarse) { .keyboard-hint { display: none; } }
@media (max-height: 500px) { .search-desk { position: static; } }
@media (prefers-reduced-motion: no-preference) {
  .entry-button { transition: background-color .15s; }
}

.entry-button { padding-bottom: 8px; }
.entry-button[aria-expanded="true"] { background: var(--surface); box-shadow: inset 3px 0 var(--accent); }
.inline-pitch { padding: 0 8px 16px; }
.inline-pitch h3 { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.inline-pitch .pitch-scroll { background: transparent; }
.inline-pitch svg { height: 110px; width: auto; }
.inline-pitch .pitch-text { margin-top: 2px; }
.condition-hint { font-size: 13px; color: var(--accent); margin: 0 8px 18px; }
.expanded > .inline-pitch, .expanded > .condition-hint { display: none; }
#results #detail { padding: 0 16px 12px; margin-top: 0; }
#results .entry-detail { border-top: 0; padding-top: 8px; }
@media (max-width: 480px) { .edition { font-size: 9px; } .page { padding: 0 16px; } }
