/* A paper-sized world. New colors meet small-text contrast on the original beige. */
.terminal-page { --rose: #814852; --muted: #685b47; --moss: #52603e; scrollbar-width: thin; scrollbar-color: #a3937c transparent; scroll-behavior: auto; padding-bottom: max(40px, env(safe-area-inset-bottom)); }
.terminal-page .terminal-path, .terminal-page .terminal-status, .terminal-page .game-instructions, .terminal-page .game-score, .terminal-page .word-clue, .terminal-page .arcade-link span { color: var(--muted); }
.terminal-page .terminal-back { color: var(--muted) !important; }
.terminal-page button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.terminal-page button:active:not(:disabled) { color: var(--rose); }
.terminal-page :is(button, a, input, summary, canvas):focus-visible { outline: 2px solid var(--rose); outline-offset: 4px; }
.terminal-page input[type="range"] { accent-color: var(--rose); width: 100%; min-height: 44px; }
.terminal-root { padding-top: 28px; }
.terminal-comfort { position: absolute; top: max(20px, env(safe-area-inset-top)); right: 16px; font-size: 20px; }
.desk-welcome { position: relative; display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.desk-cat { width: 94px; height: 94px; object-fit: contain; flex: none; }
.terminal-root .desk-welcome p { margin: 0; max-width: 20ch; color: var(--muted); font-size: 12px; }
.desk-daily { border-block: 1px dotted #a08f77; padding: 13px 0; margin-bottom: 20px; }
.desk-daily button { width: 100%; }
.desk-group { padding: 0; margin: 0 0 22px; }
.desk-group h2 { font: inherit; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.desk-group .terminal-command { width: 100%; display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px; padding: 8px 0; }
.desk-group .terminal-command span { font-size: 11px; color: var(--muted); }
.desk-private { border-top: 1px dotted #a08f77; padding-top: 16px; }
.desk-foot { margin-top: 24px !important; color: var(--muted); font-size: 11px; }
.world-root { padding-top: 30px; padding-bottom: 20px; min-width: 0; }
.world-root .terminal-path { margin-bottom: 8px; overflow-wrap: anywhere; }
.world-breadcrumb { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.world-breadcrumb .terminal-back { margin: 0; min-height: 44px; }
.world-root h1 { color: var(--rose); font-size: 19px; line-height: 1.4; margin: 0 0 22px; }
.world-root h2 { font: inherit; color: var(--rose); margin: 28px 0 12px; }
.world-root .world-prose { font-family: var(--font-body, "DM Sans"), sans-serif; font-size: 17px; line-height: 1.75; max-width: 45ch; }
.world-root .world-prose p { margin-bottom: 18px; }
.world-root .world-note { color: var(--muted); font-size: 12px; line-height: 1.7; margin-bottom: 20px; }
.world-cat { display: block; width: min(52vw, 190px); height: min(52vw, 190px); object-fit: contain; margin: 4px auto 18px; }
.world-feedback { color: var(--rose); font-size: 12px; min-height: 1.6em; line-height: 1.65; }
.world-link { background: transparent; border: 0; border-bottom: 1px dotted #a08f77; display: block; width: 100%; min-height: 52px; padding: 14px 0; text-align: left; cursor: pointer; line-height: 1.5; }
.world-link span { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; padding-left: 2ch; }
.world-link:hover { color: var(--rose); }
.world-choices { margin: 10px 0 22px; }
.world-map { margin: 22px 0; border-top: 1px dotted #a08f77; padding-top: 6px; }
.world-map summary { cursor: pointer; padding: 12px 0; min-height: 44px; color: var(--muted); font-size: 12px; }
.world-map button { width: 100%; font-size: 12px; }
.world-source { display: block; color: var(--muted); font-size: 12px; padding: 10px 0; min-height: 44px; text-underline-offset: 4px; }
.lesson-symbol { font-size: 52px; text-align: center; color: var(--rose); margin: 12px auto 26px; line-height: 1.2; }
.world-lab { border-block: 1px dotted #a08f77; padding: 22px 0; margin: 24px 0; }
.world-lab label { display: block; margin-top: 14px; font-size: 12px; color: var(--muted); }
.world-lab output { display: block; text-align: center; font-size: 15px; overflow-wrap: anywhere; }
.lab-output { padding: 14px 0; }
.bit-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bit-switch, .rhythm-pad { background: transparent; border: 1px solid #817057; border-radius: 5px; min-height: 54px; cursor: pointer; }
.bit-switch[aria-pressed="true"], .rhythm-pad[aria-pressed="true"] { background: #814852; color: #fff6e7; border-color: #814852; }
.lab-moon { text-align: center; font-size: 76px; margin-bottom: 12px; }
.coin-results { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 14px 0; }
.coin-results span { aspect-ratio: 1; display: grid; place-items: center; font-size: 11px; color: #fff6e7; background: #814852; border-radius: 50%; }
.coin-results span[data-side="tails"] { background: #52603e; }
.rhythm-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rhythm-pad.beat-playing { outline: 3px solid #241f19; outline-offset: 3px; }
.world-quiz { border: 0; padding: 0; margin: 28px 0 16px; min-width: 0; }
.world-quiz legend { margin-bottom: 12px; font-size: 13px; color: var(--ink); }
.quiz-answer { display: block; width: 100%; text-align: left; background: none; border: 1px solid #817057; padding: 12px; margin: 8px 0; border-radius: 5px; min-height: 48px; cursor: pointer; font-size: 12px !important; }
.quiz-answer[aria-pressed="true"] { outline: 2px solid var(--rose); outline-offset: 1px; }
.quiz-answer[data-correct="true"] { background: #52603e12; border-color: #52603e; }
.garden-pot { position: relative; width: 180px; height: 210px; margin: 24px auto; display: flex; flex-direction: column; align-items: center; justify-content: end; }
.garden-sprout { color: var(--flower); font-size: 78px; line-height: 1; transform-origin: bottom; position: relative; height: 85px; margin-bottom: 34px; z-index: 1; }
.garden-sprout::after { content: ""; position: absolute; height: 52px; width: 3px; background: var(--moss); top: 74px; left: calc(50% - 1px); z-index: -1; }
.garden-sprout::before { content: ""; position: absolute; width: 20px; height: 11px; background: var(--moss); border-radius: 0 100% 0 100%; top: 98px; left: calc(50% - 19px); transform: rotate(15deg); }
.garden-pot[data-stage="-1"] .garden-sprout { visibility: hidden; }
.garden-pot[data-stage="0"] .garden-sprout { font-size: 30px; height: 15px; margin-bottom: 0; }
.garden-pot[data-stage="0"] .garden-sprout::before, .garden-pot[data-stage="0"] .garden-sprout::after { display: none; }
.garden-pot[data-stage="1"] .garden-sprout { height: 26px; margin-bottom: 0; }
.garden-pot[data-stage="1"] .garden-sprout::after { height: 28px; top: 0; }
.garden-pot[data-stage="1"] .garden-sprout::before { top: 3px; width: 12px; height: 7px; left: calc(50% - 11px); }
.garden-pot[data-stage="2"] .garden-sprout { height: 55px; margin-bottom: 0; }
.garden-pot[data-stage="2"] .garden-sprout::after { height: 58px; top: 0; }
.garden-pot[data-stage="2"] .garden-sprout::before { top: 12px; }
.garden-vessel { background: #a58b70; width: 72px; height: 57px; clip-path: polygon(0 0, 100% 0, 83% 100%, 17% 100%); border-top: 6px solid #817057; border-bottom: 3px solid #817057; }
.pocket-item { color: var(--rose); font-size: 13px; padding-left: 8px; }
.sketch-paper { display: block; width: 100%; height: auto; aspect-ratio: 6 / 5; border: 1px solid #817057; border-radius: 3px; touch-action: none; margin: 12px 0 20px; background: #f2e8d6; }
.sketch-export img { display: block; width: 100%; height: auto; margin: 12px 0; border: 1px solid #817057; }
.poem-export textarea { display: block; resize: vertical; width: 100%; padding: 12px; font: 16px/1.6 Georgia, serif; color: var(--ink); background: #f2e8d6; border: 1px solid #817057; margin-bottom: 12px; }
.ink-option::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--swatch); margin-right: 6px; }
.poem-paper { min-height: 180px; padding: 22px 14px; border: 1px solid #817057; background: #f2e8d6; margin-bottom: 18px; }
.poem-word { display: inline-block; background: none; border: 0; padding: 4px 5px; min-height: 44px; color: var(--rose) !important; cursor: pointer; font-size: 18px !important; font-family: Georgia, serif !important; }
.poem-break { display: block; width: 100%; min-height: 44px; text-align: right; color: var(--muted) !important; background: none; border: 0; cursor: pointer; }
.word-bank { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0; }
.word-chip { background: none; border: 1px solid #817057; border-radius: 3px; padding: 8px 10px; min-height: 44px; cursor: pointer; font-size: 12px !important; }
.quiet-prompt { font-family: var(--font-body, "DM Sans"), sans-serif; font-size: 21px; line-height: 1.6; color: var(--rose); min-height: 4.8em; margin: 30px 0 10px !important; }
@media (prefers-reduced-motion: no-preference) {
  .terminal-page:not([data-still="true"]) .world-root { animation: paper-open .2s ease-out; }
  .terminal-page:not([data-still="true"]) .garden-sprout { animation: plant-grow .4s ease-out; }
  .terminal-page:not([data-still="true"]) .world-link { transition: color .15s, padding-left .15s; }
  @media (hover: hover) { .terminal-page:not([data-still="true"]) .world-link:hover { padding-left: 4px; } }
}
.terminal-page[data-still="true"] *, .terminal-page[data-still="true"] *::after { animation: none !important; transition: none !important; }
.terminal-page[data-still="true"] .catch-food { top: 100px; }
@keyframes paper-open { from { opacity: .4; } to { opacity: 1; } }
@keyframes plant-grow { from { opacity: .3; transform: scale(.88); } to { opacity: 1; transform: scale(1); } }
@media (max-width: 359px) { .terminal-page { padding-inline: 20px; } .world-root h1 { font-size: 17px; } .world-root .world-prose { font-size: 16px; } .desk-cat { width: 72px; height: 72px; } .world-breadcrumb { gap: 6px; } }
