:root { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", sans-serif; color: #edf2f7; background: #101722; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(circle at 20% 0, #284263, #101722 60%); }
button, input { font: inherit; }
button { min-height: 52px; border: 0; border-radius: 14px; padding: 12px 16px; cursor: pointer; font-weight: 700; touch-action: manipulation; }
button:disabled { cursor: wait; opacity: .58; }
button:focus-visible, input:focus-visible { outline: 3px solid #f7cd74; outline-offset: 3px; }
.app-shell { width: min(720px, 100%); min-height: 100dvh; margin: auto; padding: max(24px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom)); }
.app-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
h1 { margin: 0; font-size: 1.45rem; }
h2 { margin-top: 0; }
.header-button { min-height: 38px; padding: 7px 11px; background: transparent; border: 1px solid #536984; color: #dce8f8; font-size: .88rem; }
.panel, .card { background: rgba(22, 32, 47, .92); border: 1px solid #33455f; border-radius: 22px; padding: 24px; box-shadow: 0 16px 45px #0004; }
.loading-dot { width: 28px; height: 28px; margin: 0 auto 14px; border: 4px solid #41658c; border-top-color: #f2a646; border-radius: 50%; animation: spin .8s linear infinite; }
.card { min-height: 340px; display: grid; grid-template-columns: 132px 1fr; gap: 20px; align-items: stretch; margin-top: 32px; }
.card.answer-revealed { min-height: 0; grid-template-columns: 1fr; }
.audio-button { background: #325f9b; color: #fff; font-size: 1rem; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.audio-button.is-playing .play-symbol { animation: pulse .7s ease-in-out infinite alternate; }
.play-symbol { font-size: 1.65rem; }
.answer { min-width: 0; align-self: center; }
.answer h2 { font-size: 2rem; margin: .2rem 0; word-break: break-word; }
.reading { color: #a9c7e9; font-size: 1.15rem; }
.meaning { font-size: 1.25rem; line-height: 1.6; }
.example { border-top: 1px solid #3d4c61; margin-top: 20px; padding-top: 16px; color: #ccd8e8; }
.example p { color: #b6c7da; line-height: 1.6; }
.controls { margin-top: 20px; }
.primary { width: 100%; background: #f2a646; color: #241a0c; }
.secondary { width: 100%; margin-top: 16px; background: #384b64; color: #edf2f7; }
.rating-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rating-grid button { background: #58718e; color: #fff; }
.rating-grid .again { background: #b95656; }
.rating-grid .mastered { background: #4a9b78; }
.hidden { display: none !important; }
.message { min-height: 1.4rem; color: #ffca87; line-height: 1.45; }
label { display: block; margin: 18px 0 6px; color: #cbd8e8; }
input { display: block; width: 100%; min-height: 48px; padding: 12px; border: 1px solid #536984; border-radius: 10px; background: #0c1420; color: #fff; }
.panel .primary { margin-top: 20px; }
.dashboard-summary { padding: 14px 0; color: #cbd8e8; line-height: 1.6; }
.ruby { line-height: 2.2; font-size: 1.08rem; }
.ruby ruby rt { font-size: .57em; color: #9cc5ed; }
.ruby rb { letter-spacing: .02em; }
.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; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { to { transform: scale(1.2); } }
@media (max-width: 480px) { .app-shell { padding-inline: 14px; } .app-header { flex-wrap: wrap; } .app-header #progress { margin: 0; } .card { grid-template-columns: 1fr; min-height: 360px; } .audio-button { min-height: 96px; } .answer h2 { font-size: 1.8rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } }
