* { box-sizing: border-box; }
:root { --accent: #ff8a3d; --ink: #693344; --muted: #9b6374; }
html, body { margin: 0; min-height: 100%; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0; background: #ffe4ec; }
body { min-height: 100dvh; }
.scene { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.game { position: relative; width: min(100%, 480px); min-height: 100dvh; margin: auto; padding: max(18px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: center; gap: 20px; }
button, input { font: inherit; }
button { cursor: pointer; min-height: 48px; border: 0; border-radius: 8px; padding: 12px 18px; font-weight: 650; color: var(--ink); background: #fff5f8; touch-action: manipulation; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid #b34d75; outline-offset: 3px; }
button.primary { background: var(--accent); color: #512813; box-shadow: 0 4px 0 #db6926; width: 100%; }
button.secondary { background: #fff6f9; border: 1px solid #eac0cf; }
.tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tools button { background: #fff7f8ee; }
.icon-button { width: 48px; padding: 10px; font-size: 23px; }
.brand { text-align: center; padding: 16px 8px; border-radius: 8px; background: #fff5f3ed; }
h1 { font-size: 32px; margin: 6px 0 10px; line-height: 1.3; }
h2 { font-size: 23px; line-height: 1.65; margin: 20px 0; overflow-wrap: anywhere; }
p { line-height: 1.8; margin: 10px 0; }
.eyebrow { font-size: 12px; color: var(--muted); font-weight: 700; }
.subtitle { font-size: 14px; color: var(--muted); }
.puzzle { padding: 25px 22px; border-radius: 8px; background: #fff9f7f5; border: 1px solid #efbdca; box-shadow: 0 6px 24px #83334616; }
.level-meta { display: flex; justify-content: space-between; align-items: center; font-size: 14px; gap: 10px; }
.lives { display: inline-flex; gap: 5px; color: #e87993; font-size: 21px; }
.lives .lost { color: #decfd2; }
progress { width: 100%; height: 7px; margin: 16px 0 0; border: 0; border-radius: 5px; overflow: hidden; accent-color: var(--accent); }
progress::-webkit-progress-bar { background: #f3dce4; }
progress::-webkit-progress-value { background: var(--accent); }
label { display: block; font-size: 13px; margin: 12px 0 8px; color: var(--muted); }
input { width: 100%; min-height: 52px; border: 1px solid #dfb6c5; border-radius: 8px; background: #fff; padding: 13px; color: var(--ink); }
form .primary { margin-top: 16px; }
.footer-note { text-align: center; color: var(--muted); font-size: 12px; }
.modal { position: fixed; inset: 0; z-index: 5; padding: 24px; background: #45253480; display: grid; place-items: center; overflow-y: auto; }
.modal[hidden], [hidden] { display: none !important; }
.dialog { width: min(100%, 400px); padding: 28px 24px; background: #fff6f8; border: 1px solid #efbfcf; border-radius: 8px; text-align: center; max-height: 90dvh; overflow-y: auto; }
.dialog .emblem { color: #df7699; font-size: 38px; }
.quote { font-size: 21px; font-weight: 600; line-height: 1.9; margin: 24px 0; }
.answer { padding: 12px; background: #ffe6ec; border-radius: 8px; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 40px), 420px); border-radius: 8px; padding: 14px 18px; background: #65384df5; color: #fff; z-index: 10; font-size: 14px; line-height: 1.6; }
.collection { padding: 20px 0; }
.collection-title { background: #fff6f8f5; padding: 20px; border-radius: 8px; }
.quote-list { display: grid; gap: 12px; }
.quote-item { border-radius: 8px; padding: 18px; background: #fff9f7f5; border: 1px solid #edc5d1; }
.quote-item p { font-size: 15px; }
.quote-item.locked { color: #9d7c87; background: #fff5f7ed; }
.ending { text-align: center; background: #fff6f8f5; border-radius: 8px; padding: 28px 23px; }
.ending.gold { background: #fff6ddf5; border: 1px solid #e8c16d; }
.ending .emblem { color: #c3932f; font-size: 52px; }
.ending button { margin-top: 12px; width: 100%; }
@media (max-width: 350px) { .game { padding-left: 14px; padding-right: 14px; } .puzzle { padding: 20px 16px; } h1 { font-size: 28px; } h2 { font-size: 21px; } }
@media (prefers-reduced-motion: no-preference) { button:active { transform: translateY(1px); } }
