/* Nihongo Quest styles (moved out of index.html as is, 2026-11-11). */
/* 1.1.0: the pages wear 書房's colours — by night its navy under the lamps, by day warm paper; the indigo is the one of the
   room's 今日練習／聽一輪 tags. The last group is for the room's things on the pages (課程's shelf and course books, ribbons). */
:root, [data-theme="dark"] {
  --bg: #23253f; --bg-elev: #2d2f52; --bg-elev-2: #34375e; --bg-sunken: #1d1f36; --bg-hover: #383b64;
  --line: #3a3d66; --line-2: #4a4d7a;
  --fg: #ecebf6; --fg-2: #c3c1dc; --fg-3: #9e9cc2;
  --accent: #9aa6ff; --accent-fg: #14162e; --accent-soft: rgba(154,166,255,.16); --accent-line: rgba(154,166,255,.5);
  --ok: #7cc98e; --ok-soft: rgba(124,201,142,.14); --ok-line: rgba(124,201,142,.5);
  --bad: #ff8a7a; --bad-soft: rgba(255,138,122,.14); --bad-line: rgba(255,138,122,.5);
  --warn: #f4c15d; --warn-soft: rgba(244,193,93,.14);
  --heat-0: #34375e; --heat-1: #2f4a45; --heat-2: #3f6a52; --heat-3: #5a9a6c; --heat-4: #86cf92; --gauge-seen: #3f6a52;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 24px -14px rgba(0,0,0,.6);
  --ruby: #a9a7c8;
  --shelf: #2b2a44; --wood: #5a4535; --wood-edge: #46362a; --label: #e6dcc4; --label-ink: #2f2a22; --label-ink-2: #5b5144; --gold: #c9a64f;
  --cover-keep: 76%; --cover-shade: #1c1e38; --note: #45412f; --paper: #d9d2c0;
  --pic-disc: #3b3e6b; --pic-shadow: rgba(0,0,0,.3); --pic-steam: #8e8bb8;   /* a word's picture (pics.js): its round backdrop, ground shadow, steam */
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3ebde; --bg-elev: #fffaf2; --bg-elev-2: #f7f0e3; --bg-sunken: #ece2d0; --bg-hover: #f1e8d8;
  --line: #e8dcc6; --line-2: #d9c9ab;
  --fg: #3a3328; --fg-2: #5f5443; --fg-3: #726550;
  --accent: #5262e8; --accent-fg: #ffffff; --accent-soft: rgba(82,98,232,.1); --accent-line: rgba(82,98,232,.45);
  --ok: #3f7a4a; --ok-soft: rgba(79,128,92,.13); --ok-line: rgba(79,128,92,.5);
  --bad: #c2412f; --bad-soft: rgba(200,85,63,.11); --bad-line: rgba(200,85,63,.45);
  --warn: #9a5b00; --warn-soft: rgba(201,140,40,.14);
  --heat-0: #ebe2d1; --heat-1: #cfe0c2; --heat-2: #9cc58f; --heat-3: #5f9a6c; --heat-4: #3f7a4a; --gauge-seen: #8fbf86;
  --shadow: 0 1px 2px rgba(90,70,40,.07), 0 10px 24px -16px rgba(90,70,40,.32);
  --ruby: #7a6d57;
  --shelf: #ece1cc; --wood: #c99a63; --wood-edge: #a87843; --label: #f6efdf; --label-ink: #3a3328; --label-ink-2: #6b604d; --gold: #ecc66a;
  --cover-keep: 100%; --cover-shade: #1c1e38; --note: #fdf2c8; --paper: #fffdf6;
  --pic-disc: #efe3cd; --pic-shadow: rgba(90,60,30,.16); --pic-steam: #b4a891;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { touch-action: manipulation; overscroll-behavior: none; }   /* …and no rubber-band past the content (iOS 16+, Android) or pull-to-refresh */   /* no double-tap zoom; pinch zoom is off too (viewport meta + the gesture handlers below): a zoomed page breaks the one-screen layout */
body {
  background: var(--bg); color: var(--fg);
  font-family: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans JP", sans-serif;
  font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
.jp { font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans TC", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-family: "Noto Sans JP", sans-serif; }
.brand-name { font-weight: 700; letter-spacing: .01em; }
.brand-sub { font-size: 12px; color: var(--fg-3); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-2); cursor: pointer; text-align: left; font-size: 14px; }
.nav-item:hover { background: var(--bg-hover); color: var(--fg); }
.nav-item[aria-current="page"] { background: var(--bg-elev-2); color: var(--fg); font-weight: 500; }
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-item .count { margin-left: auto; font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-title { font-weight: 600; font-size: 15px; }
.content { width: 100%; max-width: 1000px; margin: 0 auto; padding: 28px 32px 72px; }
.content:focus { outline: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { display: flex; }
  .content { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
  .page-head .page-title.dup-title { display: none; }   /* the topbar shows it already */
  .page-head .page-title.dup-title + .page-sub { margin-top: 0; }
  .page-head { margin-bottom: 14px; }
  body.practicing .content { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }   /* no tab bar while practising, so no room kept for it */
  body.practicing .content:has(> .pr-next) { padding-bottom: 0; }   /* the sticky 下一題 strip carries its own bottom padding: the page ends exactly under the button (not the one in a phone's result panel) */
}
body.practicing .sidebar, body.practicing .topbar { display: none; }
body.practicing .app { grid-template-columns: 1fr; }
body.practicing .content { max-width: 760px; padding-top: calc(18px + env(safe-area-inset-top, 0px)); }   /* the topbar (which clears the notch) is hidden here, so the page clears it itself: in an installed app ✕ and the progress bar sat under the status bar */

/* ---------- typography ---------- */
h1, h2, h3, h4 { margin: 0; line-height: 1.35; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title { font-size: 22px; font-weight: 700; letter-spacing: .01em; }
.page-sub { color: var(--fg-3); font-size: 14px; margin-top: 2px; }
.muted { color: var(--fg-3); }
.dim { color: var(--fg-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* ---------- surfaces ---------- */
.card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.card + .card, .stack > * + * { margin-top: 14px; }
.grid > .card + .card { margin-top: 0; }
.card + .grid, .grid + .card, .grid + .grid, .banner + .grid { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title { font-size: 15px; font-weight: 600; }
.card-sub { font-size: 13px; color: var(--fg-3); }
.panel { background: var(--bg-sunken); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; min-height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-elev-2); color: var(--fg); cursor: pointer; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s, transform .06s; text-decoration: none; }
.btn:hover { background: var(--bg-hover); border-color: var(--line-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); border-color: var(--accent); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--fg); }
.btn-danger { color: var(--bad); }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 48px; padding: 10px 20px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; min-height: 36px; padding: 0; }
.btn svg { width: 16px; height: 16px; flex: none; }
.ico-furi { display: inline-flex; align-items: flex-end; justify-content: center; width: 18px; height: 18px; font-size: 14px; line-height: 1; flex: none; }
.ico-furi rt { font-size: 8px; color: currentColor; opacity: .75; }
.input, .select, textarea.input { width: 100%; min-height: 38px; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-sunken); color: var(--fg); font-size: 14px; }
.select { padding-right: 30px; }
.input:focus, .select:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; color: var(--fg-2); font-weight: 500; }
.hint { font-size: 12px; color: var(--fg-3); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--bg-sunken); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--fg-2); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--bg-elev); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.2); font-weight: 500; }
/* 我的標記 (2026-11-11): one button going round 0★ → 2★ → 5★; 我學過一些's level buttons */
.mark-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 30px; padding: 3px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--bg-elev-2); color: var(--fg-3); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .15s, color .15s; }
.mark-btn[data-now="2"] { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.mark-btn[data-now="5"] { color: var(--accent-fg); border-color: var(--accent); background: var(--accent); }
.btn.start-lv { justify-content: flex-start; gap: 12px; text-align: left; margin-bottom: 8px; }
.btn.start-lv b { min-width: 34px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 38px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .label { color: var(--fg); font-size: 14px; }
.setting-row .hint { font-size: 11.5px; line-height: 1.45; opacity: 0.8; margin-top: 2px; }
.setting-row > .row, .setting-row > .btn, .setting-row > select { flex: none; }

/* ---------- chips, badges, progress ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: 12px; background: var(--bg-elev-2); color: var(--fg-2); border: 1px solid var(--line); white-space: nowrap; }
.chip-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-sunken); color: var(--fg-3); font-size: 12px; font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; flex: none; }
.bar { height: 8px; border-radius: 99px; background: var(--bg-sunken); overflow: hidden; border: 1px solid var(--line); }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .3s; }
.bar.ok > span { background: var(--ok); }
.bar.thin { height: 5px; }
.bar.stack { height: 10px; background-repeat: no-repeat; background-size: 100% 100%; }
.bar.stack.thin { height: 6px; }
.bar.stack.grow { margin-top: 0; }
.seg-dot.mastered { background: var(--heat-4); }
.seg-dot.learned { background: var(--heat-3); }
.seg-dot.seen { background: var(--heat-2); }
.seg-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.legs { display: flex; flex-wrap: wrap; gap: 4px 12px; } .leg { white-space: nowrap; }   /* a legend item never breaks between its name and number */
.plan-note { color: var(--fg-3); font-size: 13px; margin: 0 0 14px; }   /* 1.0.35: a quiet line next to what it is about, not a yellow box */
/* 1.1.0: 學習分析's 今天 card (today's scope, the day's note, 說明) and 課程's 目前 card hold what the 今日 card held */
.plan-topics { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; color: var(--fg-2); font-size: 14px; line-height: 1.6; }
.plan-topics b { color: var(--fg-3); font-weight: 500; font-size: 12px; margin-right: 8px; }
.plan-line { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; color: var(--fg-2); font-size: 14px; }
.plan-line b { color: var(--fg); font-variant-numeric: tabular-nums; }
.day-card .plan-note { margin-bottom: 10px; }
/* 學習分析 as 書房's cork board (1.1.0): a strip of cork with its pinned papers on top, a pin in every card, 今天 a note */
.cork-strip { position: relative; display: flex; align-items: center; gap: 16px; height: 80px; margin: 0 0 22px; padding: 0 18px; border: 6px solid color-mix(in srgb, #9a6c42 var(--cover-keep), var(--cover-shade)); border-radius: 10px;
  background: radial-gradient(rgba(90, 55, 25, .3) 1px, transparent 1.7px) 0 0 / 7px 7px, radial-gradient(rgba(255, 236, 200, .28) 1px, transparent 1.7px) 3px 4px / 9px 9px, color-mix(in srgb, #c99a6b var(--cover-keep), var(--cover-shade)); }
@media (max-width: 900px) { .cork-strip { margin: -16px -16px 20px; border-width: 0 0 6px; border-radius: 0; } }
.cork-strip .pinned { position: relative; flex: none; display: grid; place-items: center; border-radius: 2px; box-shadow: 0 3px 6px rgba(60, 35, 15, .3); }
.cork-strip .pinned::before, #view:has(> .cork-strip) > .card::before { content: ''; position: absolute; top: -5px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .7) 0 1.5px, transparent 2.5px), var(--pin, #d9534f); box-shadow: 0 2px 3px rgba(0, 0, 0, .35); z-index: 1; }
.cork-strip .chart { width: 66px; height: 50px; background: #fffaf2; transform: rotate(-3deg); --pin: #4f7fd1; }
.cork-strip .chart svg { width: 54px; height: 38px; }
.cork-strip .sticky { width: 50px; height: 46px; background: #f6d96b; transform: rotate(4deg); --pin: #e0b04a; }
.cork-strip .sticky i { display: block; width: 32px; height: 2px; margin: 5px 0; background: rgba(90, 70, 20, .35); }
.cork-strip .photo { width: 44px; height: 52px; background: #f3c2b2; transform: rotate(-2deg); }
.cork-strip .photo i { width: 22px; height: 22px; border-radius: 50%; background: #e2683f; }
[data-theme="dark"] .cork-strip .pinned { filter: brightness(.8); }
#view:has(> .cork-strip) > .card { position: relative; }
#view:has(> .cork-strip) > .card:nth-of-type(3n) { --pin: #4f7fd1; } #view:has(> .cork-strip) > .card:nth-of-type(3n + 1) { --pin: #e0b04a; }
.day-card { background: var(--note); border-color: transparent; }   /* 今天: a note pinned on the board */
.day-help summary { display: inline-block; font-size: 12px; color: var(--fg-3); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; cursor: pointer; list-style: none; }
.day-help summary::-webkit-details-marker { display: none; } .day-help summary::before { content: "▸ "; } .day-help[open] summary::before { content: "▾ "; }
.day-help p { margin: 10px 0 0; line-height: 1.7; }
.now-card .label { font-size: 12px; color: var(--fg-3); margin-bottom: 2px; }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.dots i.on { background: var(--ok); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-l { font-size: 12px; color: var(--fg-3); }
.ring { position: relative; width: 96px; height: 96px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .ring-txt { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.15; }
.ring .ring-txt b { font-size: 22px; font-variant-numeric: tabular-nums; }

/* ---------- lists & tables ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item.clickable { cursor: pointer; border-radius: 10px; padding: 12px 10px; }
.list-item > svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.list-item.clickable:hover { background: var(--bg-hover); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--fg-3); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg-elev); position: sticky; top: 0; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.empty { text-align: center; color: var(--fg-3); padding: 28px 12px; font-size: 14px; }

/* ---------- 書房 and the yard (1.1.0): the app lives in a house ----------
   The app opens in 書房, a room where every feature is a thing to tap (ROOM) and the door leads out to the yard; in the
   yard, a tap on the house goes back in. Both follow the clock: --day (0 night, 1 day) and --warm (the sunrise／sunset glow) come
   from the phone's clock (sceneTick, on body); dawn 5–7 and dusk 17–19 blend the two. --f (0–1) is how much of today's list is
   done (the ring it replaces): in the yard the sky comes out with it — by night stars one by one, a nebula from 25%, fireflies
   from 50%, the aurora and shooting stars from 75%, a constellation at 100%; by day the grey sky turns blue, the sun brightens
   from 25%, flowers and butterflies come at 50%, birds at 75%, a rainbow at 100% — and in 書房 the desk lamp warms the room.
   Either theme; with motion reduced (the rule at the top) everything stands still. */
body.scene .content { max-width: none; padding: 0; }
:root { --day: 0; --warm: 0; --lit: 0; --sx: 50%; --sy: 20%; }
.yard { position: relative; z-index: 0; min-height: 100vh; }
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(130% 75% at 50% 100%, #2c3a7a, #18214f 45%, #0c1233);
  --md: calc(var(--day) + (1 - var(--day)) * .2); }   /* by night a deep blue, not black, and the moon lights the land: a fifth of its daylight colour in its night one (--md; 2026-11-10, the user: night was too dark) */
@media (min-width: 901px) { .sky { left: 236px; } }   /* beside the sidebar */
.sky .tint { position: absolute; inset: 0; transition: opacity 3s; }
.sky .t-grey { background: linear-gradient(#93a3b3, #c6d0d8 60%, #e2e7eb); opacity: var(--day); }   /* a grey day at 0% … */
.sky .t-blue { background: linear-gradient(#3d8cdb, #8bc5ef 58%, #e0f2fb); opacity: calc(var(--day) * (.15 + .85 * var(--f))); }   /* … bluer as the list fills */
.sky .t-warm { background: linear-gradient(to top, #ffb36b, #ff8a7a 20%, rgba(150, 96, 200, .5) 46%, transparent 76%); opacity: var(--warm); }   /* sunrise, sunset */
.sky .sun { position: absolute; left: var(--sx); top: var(--sy); width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; opacity: var(--day); transition: opacity 3s;
  background: radial-gradient(circle, #fffdf0 52%, color-mix(in srgb, #ffb04a calc(var(--warm) * 100%), #fff2b3) 56%, transparent 72%); }
.sky .sun::before { content: ''; position: absolute; inset: -46px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 238, 170, .7), rgba(255, 222, 140, .22) 50%, transparent); opacity: calc(.3 + .7 * clamp(0, (var(--f) - .2) / .3, 1)); transition: opacity 1.5s; }   /* brighter from 25% */
.sky .night { position: absolute; inset: 0; opacity: calc(1 - var(--day)); transition: opacity 3s; }
.sky .dayset { position: absolute; inset: 0; opacity: var(--day); transition: opacity 3s; }
body.scene-day .sky :is(.night, .flies), body.scene-night .sky :is(.dayset, .flowers, .butterflies) { display: none; }   /* the hidden half stops moving */
/* by night */
.sky .moon { position: absolute; left: 13%; top: 9%; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 9px -3px 0 0 #f3efe0; filter: drop-shadow(0 0 8px rgba(255, 246, 220, .45)); transform: rotate(-20deg); }
.sky .nebula { position: absolute; border-radius: 50%; opacity: calc(clamp(0, (var(--f) - .25) / .35, 1) * .6); transition: opacity 1.5s; }   /* still: big moving layers cost a phone too much memory */
.sky .n1 { width: 130vw; height: 70vh; left: -45vw; top: -12vh; background: radial-gradient(closest-side, rgba(124, 92, 255, .45), rgba(124, 92, 255, .12) 55%, transparent); }
.sky .n2 { width: 120vw; height: 60vh; right: -50vw; top: 30vh; background: radial-gradient(closest-side, rgba(64, 140, 255, .38), rgba(64, 140, 255, .1) 55%, transparent); }
.sky .aurora { position: absolute; left: -25%; right: -25%; top: -6%; height: 44%; opacity: calc(clamp(0, (var(--f) - .75) / .2, 1) * .8); transition: opacity 1.5s;
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 2px, rgba(0, 0, 0, .8) 2px 5px, #000 5px 9px, rgba(0, 0, 0, .86) 9px 13px); mask-image: repeating-linear-gradient(90deg, #000 0 2px, rgba(0, 0, 0, .8) 2px 5px, #000 5px 9px, rgba(0, 0, 0, .86) 9px 13px); }   /* faint, uneven vertical rays */
.sky .aurora i { position: absolute; inset: 0; transform-origin: 50% 0; animation: aurora 16s ease-in-out infinite alternate;
  background: radial-gradient(26% 15% at 24% 64%, rgba(72, 232, 184, .5), transparent 72%), radial-gradient(26% 13% at 46% 50%, rgba(72, 232, 184, .42), transparent 72%), radial-gradient(28% 14% at 70% 40%, rgba(110, 200, 255, .34), transparent 72%); }   /* a chain of glows climbing to the right: a bent ribbon */
.sky .aurora i + i { animation-duration: 21s; animation-delay: -9s; background: radial-gradient(26% 12% at 34% 44%, rgba(168, 120, 255, .4), transparent 72%), radial-gradient(24% 12% at 62% 60%, rgba(168, 120, 255, .32), transparent 72%); }
@keyframes aurora { from { transform: translateX(-7%) skewX(-14deg) scaleY(.8); } to { transform: translateX(7%) skewX(12deg) scaleY(1.15); } }
.sky .st { position: absolute; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); opacity: 0; transition: opacity 1.5s; }
.sky .st.on { opacity: 1; }
.sky .st::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 calc(var(--s) * 2.5) rgba(190, 200, 255, .85); opacity: .8; }
.sky .st.on::after { animation: twinkle var(--d) ease-in-out var(--w) infinite alternate; }
.sky .st.dip::after { box-shadow: 0 0 8px 1px rgba(205, 212, 255, .95); }
@keyframes twinkle { from { opacity: .2; } to { opacity: 1; } }
.sky .dipper { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 2s; }
.sky .faint { position: absolute; inset: 0; width: 100%; height: 100%; } .sky .faint circle { fill: #e2e8ff; } .sky .faint g { opacity: .5; }
.sky .faint g.tw { animation: faintTw 5s ease-in-out infinite alternate; } @keyframes faintTw { from { opacity: .2; } to { opacity: .75; } }
.sky .dipper path { fill: none; stroke: rgba(200, 210, 255, .4); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.yard.full .dipper { opacity: 1; }
.sky .meteors { position: absolute; inset: 0; opacity: clamp(0, (var(--f) - .75) * 8, 1); transition: opacity 1.5s; }
.sky .meteor { position: absolute; width: 120px; height: 1.5px; border-radius: 1px; background: linear-gradient(90deg, transparent, #fff); opacity: 0; transform-origin: 0 50%; animation: meteor var(--d) linear var(--w) infinite; }
@keyframes meteor { 0% { transform: rotate(28deg) translateX(0); opacity: 0; } 1% { opacity: 1; } 6% { transform: rotate(28deg) translateX(320px); opacity: 0; } 100% { transform: rotate(28deg) translateX(320px); opacity: 0; } }
/* the Halloween witch (1.2.2, yWitch): far off, a dark shape rimmed by the moonlight with a few sparks off her broom; over
   the sky and back once a minute (past the moon going right), bobbing; only by night. The finger's target is bigger than she is.
   Standing still (motion reduced) she hovers by the moon */
.sky .witch { position: absolute; left: 0; top: 0; width: 22px; height: 16px; display: none; transform: translate(22vw, 15vh); animation: witchFly 60s linear infinite; }
[data-theme="dark"] .sky .witch { display: block; }
.sky .witch .w-bob { position: absolute; inset: 0; animation: witchBob 2.8s ease-in-out infinite alternate; }
.sky .witch .w-fig { position: absolute; inset: 0; filter: drop-shadow(0 0 .6px rgba(222, 228, 255, .9)) drop-shadow(0 0 2.5px rgba(160, 172, 255, .4)); }
.sky .witch svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: #0f0c26; stroke: #0f0c26; stroke-width: 0; stroke-linecap: round; }
.sky .witch .w-hit { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; border-radius: 50%; background: none; pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sky .witch .w-spark { position: absolute; left: 1px; top: 12px; width: 1.6px; height: 1.6px; border-radius: 50%; background: #ffe9a8; box-shadow: 0 0 3px 1px rgba(255, 216, 130, .7); opacity: 0; animation: witchSpark 1.5s ease-out infinite; }
.sky .witch .w-spark + .w-spark { top: 13.5px; animation-delay: -.5s; } .sky .witch .w-spark + .w-spark + .w-spark { top: 11px; animation-delay: -1s; }
@keyframes witchBob { from { transform: translateY(-2.5px); } to { transform: translateY(2.5px); } }
@keyframes witchSpark { 0% { transform: none; opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(-8px, 6px); opacity: 0; } }
@keyframes witchFly {   /* x: from just off the left (-40px) to just off the right, a share p of the way at p × 42% of the minute */
  0% { transform: translate(-40px, 15vh) scaleX(1); }
  4.2% { transform: translate(calc(-40px + .1 * (100vw + 54px)), calc(9vh + 6px)) scaleX(1); }
  11.76% { transform: translate(calc(-40px + .28 * (100vw + 54px)), calc(9vh + 8px)) scaleX(1); }
  21% { transform: translate(calc(-40px + .5 * (100vw + 54px)), 17vh) scaleX(1); }
  31.5% { transform: translate(calc(-40px + .75 * (100vw + 54px)), 12vh) scaleX(1); }
  42%, 46% { transform: translate(calc(100vw + 14px), 16vh) scaleX(1); }
  46.01%, 50% { transform: translate(calc(100vw + 14px), 27vh) scaleX(-1); }
  60.5% { transform: translate(calc(-40px + .75 * (100vw + 54px)), 22vh) scaleX(-1); }
  71% { transform: translate(calc(-40px + .5 * (100vw + 54px)), 29vh) scaleX(-1); }
  81.5% { transform: translate(calc(-40px + .25 * (100vw + 54px)), 23vh) scaleX(-1); }
  92%, 96% { transform: translate(-40px, 26vh) scaleX(-1); }
  96.01%, 100% { transform: translate(-40px, 15vh) scaleX(1); }
}
/* caught (witchCatch keeps her where she was): she slips off and tumbles down behind the hills, her hat a beat behind, and the
   broom wobbles on and away */
.sky .witch.fall .w-hit { pointer-events: none; } .sky .witch.fall .w-spark { display: none; }
.sky .witch .w-rider { transform-origin: 52% 55%; } .sky .witch .w-hat { transform-origin: 54% 20%; } .sky .witch .w-broom { transform-origin: 50% 75%; }
.sky .witch.fall .w-rider { animation: witchFall 1.9s forwards; }
.sky .witch.fall .w-hat { animation: witchHat 2.8s linear forwards; }
.sky .witch.fall .w-broom { animation: witchBroom 2.2s ease-in forwards; }
@keyframes witchFall { 0% { transform: none; animation-timing-function: ease-out; } 14% { transform: translate(1px, -5px) rotate(-25deg); animation-timing-function: cubic-bezier(.5, 0, 1, .6); } 100% { transform: translate(-6px, 80vh) rotate(-560deg); } }
@keyframes witchHat { 0% { transform: none; } 25% { transform: translate(5px, 14px) rotate(30deg); } 50% { transform: translate(-3px, 34px) rotate(-25deg); } 75% { transform: translate(6px, 58px) rotate(25deg); opacity: 1; } 100% { transform: translate(0, 86px) rotate(-15deg); opacity: 0; } }
@keyframes witchBroom { 0% { transform: none; } 18% { transform: translate(3px, -2px) rotate(-14deg); } 36% { transform: translate(8px, 2px) rotate(12deg); } 100% { transform: translate(110px, -48px) rotate(-10deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sky .witch.fall { visibility: hidden; } }
/* snow over every place outside at Christmas (2026-11-14, ySnow): above the world, under the buttons */
.sky > .snow { position: absolute; inset: 0; z-index: 1000; pointer-events: none; overflow: hidden; }
.sky > .snow i { position: absolute; top: -12px; width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: .88; box-shadow: 0 0 2px rgba(130, 150, 190, .55); animation: snowFall var(--d) linear var(--w) infinite; }
@keyframes snowFall { 0% { transform: translate(0, -12px); } 50% { transform: translate(calc(var(--x) * .5 + 10px), 52vh); } 100% { transform: translate(var(--x), calc(100vh + 24px)); } }
@media (prefers-reduced-motion: reduce) { .sky > .snow i { animation: none; top: var(--y); } }
/* Santa (2026-11-14, yWitch at Christmas): the witch's way over the sky and back, a sleigh behind two reindeer as one moonlit
   shape, the lead one's red nose aglow; tapped, three presents tumble out and he climbs away out of sight */
.sky .santa { position: absolute; left: 0; top: 0; width: 50px; height: 18px; display: none; transform: translate(22vw, 15vh); animation: witchFly 60s linear infinite; }
[data-theme="dark"] .sky .santa { display: block; }
.sky .santa .w-bob { position: absolute; inset: 0; animation: witchBob 3.2s ease-in-out infinite alternate; }
.sky .santa .w-fig { position: absolute; inset: 0; filter: drop-shadow(0 0 .6px rgba(222, 228, 255, .9)) drop-shadow(0 0 2.5px rgba(160, 172, 255, .4)); }
.sky .santa svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: #0f0c26; stroke: #0f0c26; stroke-width: 0; stroke-linecap: round; }
.sky .santa .s-deer { animation: santaGallop .5s ease-in-out infinite alternate; transform-origin: 70% 50%; }
@keyframes santaGallop { from { transform: translateY(-.6px); } to { transform: translateY(.6px); } }
.sky .santa .s-nose { position: absolute; left: 49px; top: 3.3px; width: 2.2px; height: 2.2px; border-radius: 50%; background: #ff5a4a; box-shadow: 0 0 3px 1.4px rgba(255, 90, 74, .8); animation: santaNose 1.2s ease-in-out infinite alternate; }
@keyframes santaNose { from { opacity: .6; } to { opacity: 1; } }
.sky .santa .w-hit { position: absolute; left: 50%; top: 50%; width: 60px; height: 44px; margin: -22px 0 0 -30px; padding: 0; border: 0; border-radius: 50%; background: none; pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sky .santa .s-gift { position: absolute; left: 12px; top: 8px; width: 4px; height: 4px; border-radius: .6px; opacity: 0; background: linear-gradient(90deg, transparent 40%, #ffe9a8 40% 60%, transparent 60%), linear-gradient(transparent 40%, #ffe9a8 40% 60%, transparent 60%), #d0453c; }
.sky .santa .s-gift.g1 { left: 15px; background-color: #3f8a52; } .sky .santa .s-gift.g2 { left: 9px; background-color: #5a7fc8; }
.sky .santa.gave .w-hit { pointer-events: none; }
.sky .santa.gave .s-gift { animation: santaGift 2s cubic-bezier(.4, 0, 1, .7) forwards; } .sky .santa.gave .s-gift.g1 { animation-delay: .15s; } .sky .santa.gave .s-gift.g2 { animation-delay: .3s; }
.sky .santa.gave .w-fig { animation: santaAway 2.4s ease-in .6s forwards; }
@keyframes santaGift { 0% { opacity: 1; transform: none; } 100% { opacity: 1; transform: translate(-6px, 60vh) rotate(400deg); } }
@keyframes santaAway { to { transform: translate(160px, -110px) scale(.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sky .santa.gave { visibility: hidden; } .sky .santa .s-deer, .sky .santa .s-nose { animation: none; } }
/* by day: clouds always (greyer at 0%, peach at dawn and dusk), birds from 75%, a rainbow at 100% */
.sky .rainbow { position: absolute; left: 50%; bottom: 120px; width: 130vmin; height: 130vmin; margin-left: -65vmin; border-radius: 50%; transform: translateY(50%); opacity: 0; transition: opacity 3s;
  background: radial-gradient(closest-side, transparent 80%, rgba(255, 96, 96, .5) 81%, rgba(255, 168, 72, .5) 83%, rgba(255, 228, 92, .5) 85%, rgba(112, 208, 120, .5) 87%, rgba(88, 158, 238, .5) 89%, rgba(150, 110, 228, .5) 91%, transparent 92.5%); }
.yard.full .rainbow { opacity: .8; }
.sky .cloud { position: absolute; left: 0; width: 92px; height: 26px; border-radius: 20px; animation: cloud var(--d) linear var(--w) infinite;
  background: color-mix(in srgb, #ffd2b4 calc(var(--warm) * 100%), color-mix(in srgb, #fff calc((.55 + .45 * var(--f)) * 100%), #c5ced6)); }
.sky .cloud::before, .sky .cloud::after { content: ''; position: absolute; border-radius: 50%; background: inherit; }
.sky .cloud::before { width: 42px; height: 42px; left: 14px; top: -20px; } .sky .cloud::after { width: 32px; height: 32px; left: 44px; top: -13px; }
@keyframes cloud { from { transform: translateX(-130px) scale(var(--k)); } to { transform: translateX(calc(100vw + 30px)) scale(var(--k)); } }
.sky .plane { position: absolute; left: 0; top: 7%; width: 46px; height: 16px; animation: skyPlane 80s linear -20s infinite; }   /* round 7 (2026-11-10): life in the sky over the places out */
.sky .plane svg { position: absolute; inset: 0; width: 100%; height: 100%; } .sky .plane .trail { position: absolute; right: 40px; top: 7px; width: 240px; height: 2px; border-radius: 1px; background: linear-gradient(to left, rgba(255, 255, 255, .8), rgba(255, 255, 255, 0)); }
@keyframes skyPlane { 0% { transform: translate(-320px, 30px); } 45% { transform: translate(calc(100vw + 60px), 0); } 100% { transform: translate(calc(100vw + 60px), 0); } }
.sky .balloon { position: absolute; left: 0; top: 30%; width: 34px; height: 51px; animation: skyBalloon 150s linear -40s infinite; } .sky .balloon svg { width: 100%; height: 100%; animation: balloonBob 6s ease-in-out infinite alternate; }
@keyframes skyBalloon { from { transform: translateX(-60px); } to { transform: translateX(calc(100vw + 20px)); } } @keyframes balloonBob { to { transform: translateY(-14px); } }
.sky .nplane { position: absolute; left: 0; top: 12%; width: 3px; height: 3px; border-radius: 50%; background: #ff5a5a; box-shadow: 9px 1px 0 #fff; animation: skyPlane 95s linear -50s infinite, nplaneBlink 1.2s steps(2) infinite; }
@keyframes nplaneBlink { 50% { opacity: .2; } }
.yard.indoor .sky :is(.plane, .balloon, .nplane) { display: none; }
@media (prefers-reduced-motion: reduce) { .sky :is(.plane, .balloon, .nplane), .sky .balloon svg { animation: none; display: none; } }
.sky .birds { position: absolute; left: 0; right: 0; top: 16%; height: 50px; opacity: clamp(0, (var(--f) - .75) / .15, 1); transition: opacity 2s; }
.sky .flock { position: absolute; left: 0; top: 0; width: 70px; height: 40px; animation: flock 24s linear infinite; }
@keyframes flock { from { transform: translateX(-90px); } to { transform: translateX(calc(100vw + 20px)); } }
.sky .flock i { position: absolute; width: 15px; height: 8px; }
/* a place's own birds (placeSky): gulls gliding over the sea, crows by the shrine and the castle; by day, whatever the list */
.sky .fliers { position: absolute; inset: 0; }
.sky .flier { position: absolute; left: 0; width: 30px; height: 14px; animation: flier var(--d) linear var(--w) infinite; } .sky .flier.back { animation-direction: reverse; }
@keyframes flier { from { transform: translateX(-40px); } to { transform: translateX(calc(100vw + 40px)); } }
.sky .flier i { position: absolute; inset: 0; animation: flierBob 3.4s ease-in-out infinite alternate; } @keyframes flierBob { to { transform: translateY(12px); } }
.sky .flier i::before, .sky .flier i::after { content: ''; position: absolute; top: 6px; width: 15px; height: 3px; border-radius: 3px 3px 1px 1px; animation: gullL 1.3s ease-in-out infinite alternate; }
.sky .flier i::before { left: 0; transform-origin: 100% 50%; } .sky .flier i::after { left: 14px; transform-origin: 0 50%; animation-name: gullR; }
@keyframes gullL { from { transform: rotate(30deg); } to { transform: rotate(6deg); } } @keyframes gullR { from { transform: rotate(-30deg); } to { transform: rotate(-6deg); } }   /* gliding: the wings held up in a V */
.sky .gull .flier i::before, .sky .gull .flier i::after { background: #fbfcfd; box-shadow: 0 1.5px 0 rgba(60, 72, 96, .45); }
.sky .crow .flier { width: 24px; } .sky .crow .flier i::before, .sky .crow .flier i::after { width: 12px; background: #2b2b38; animation-name: flap; animation-duration: .38s; } .sky .crow .flier i::after { left: 11px; animation-name: flap2; }
@media (prefers-reduced-motion: reduce) { .sky .fliers { display: none; } }
.sky .flock i::before, .sky .flock i::after { content: ''; position: absolute; top: 3px; width: 8px; height: 2px; border-radius: 2px; background: #2c3954; animation: flap .45s ease-in-out infinite alternate; }
.sky .flock i::before { left: 0; transform-origin: 100% 50%; } .sky .flock i::after { left: 7px; transform-origin: 0 50%; animation-name: flap2; }
@keyframes flap { from { transform: rotate(28deg); } to { transform: rotate(-18deg); } } @keyframes flap2 { from { transform: rotate(-28deg); } to { transform: rotate(18deg); } }
/* the land and the house: one still drawing (1 unit = 1px, its middle shown) and the house standing on it, the ground 220px up —
   room in front for what will be placed there. Their colours run from night to day with --day; by day the grass greens with --f */
.sky .land { position: absolute; left: 0; bottom: 0; width: 100%; height: 370px; }
.sky .land :is(.far, .near, .trunk, .crown, .post, .lane) { transition: fill 3s; } .sky .land :is(.ridge, .rail) { transition: stroke 3s; }
.sky .land .far { fill: color-mix(in srgb, color-mix(in srgb, #8fc486 calc(var(--f) * 100%), #a6b3a2) calc(var(--md, var(--day, 1)) * 100%), #121436); } .sky .land .near { fill: color-mix(in srgb, color-mix(in srgb, #5a9e4d calc(var(--f) * 100%), #7f9179) calc(var(--md, var(--day, 1)) * 100%), #090a1e); } .sky .land .ridge { fill: none; stroke: color-mix(in srgb, rgba(255, 255, 255, .4) calc(var(--md, var(--day, 1)) * 100%), rgba(150, 165, 255, .18)); stroke-width: 1.2; }
.sky .land .trunk { fill: color-mix(in srgb, #6b4a2f calc(var(--md, var(--day, 1)) * 100%), #0b0c22); } .sky .land .crown { fill: color-mix(in srgb, color-mix(in srgb, #3f8a46 calc(var(--f) * 100%), #6f8669) calc(var(--md, var(--day, 1)) * 100%), #0b0c22); } .sky .land .post { fill: color-mix(in srgb, #c9a679 calc(var(--md, var(--day, 1)) * 100%), #0b0c22); } .sky .land .rail { fill: none; stroke: color-mix(in srgb, #c9a679 calc(var(--md, var(--day, 1)) * 100%), #0b0c22); stroke-width: 2.4; }
.sky .land .asphalt { fill: color-mix(in srgb, #7d7b78 calc(var(--md, var(--day, 1)) * 100%), #14152e); } .sky .land .pave { fill: color-mix(in srgb, #d3cdc0 calc(var(--md, var(--day, 1)) * 100%), #23244a); }   /* the main road (#/street) */
.sky .land :is(.asphalt, .pave) { transition: fill 3s; } .sky .land .kerb { fill: color-mix(in srgb, #b4ad9e calc(var(--md, var(--day, 1)) * 100%), #1c1d3e); transition: fill 3s; }
.sky .land .rline { fill: none; stroke: color-mix(in srgb, rgba(255, 255, 255, .9) calc(var(--md, var(--day, 1)) * 100%), rgba(170, 176, 230, .3)); stroke-width: 2.4; transition: stroke 3s; } .sky .land .rline.dash { stroke-dasharray: 22 16; }
.yard.away .study-edit { display: none; }   /* nothing to set out by the road or on the beach */
/* test (2026-11-09): the beach */
.sky .land .sea { fill: color-mix(in srgb, #5fa6d0 calc(var(--md, var(--day, 1)) * 100%), #12173e); } .sky .land .sea-far { fill: color-mix(in srgb, #9acbe3 calc(var(--md, var(--day, 1)) * 100%), #1a2050); }
.sky .land .isle { fill: color-mix(in srgb, #7f9d8c calc(var(--md, var(--day, 1)) * 100%), #10133a); } .sky .land .wet { fill: color-mix(in srgb, #cdb88c calc(var(--md, var(--day, 1)) * 100%), #24243e); }
.sky .land .sand { fill: color-mix(in srgb, #ecdcb0 calc(var(--md, var(--day, 1)) * 100%), #2c2b46); } .sky .land .shell { fill: color-mix(in srgb, var(--c) calc(var(--md, var(--day, 1)) * 100%), #3a3a5a); } .sky .land .star { fill: color-mix(in srgb, #e8875f calc(var(--md, var(--day, 1)) * 100%), #3a3050); }
.sky .land :is(.sea, .sea-far, .isle, .wet, .sand, .shell, .star) { transition: fill 3s; }
.sky .land .glint { stroke: rgba(255, 255, 255, calc(.25 + .45 * var(--day))); stroke-width: 2; stroke-linecap: round; animation: glint 3.2s ease-in-out var(--w) infinite; }
@keyframes glint { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.sky .land .foam { fill: none; stroke: color-mix(in srgb, rgba(255, 255, 255, .95) calc(var(--md, var(--day, 1)) * 100%), rgba(170, 180, 240, .35)); stroke-width: 4; stroke-linecap: round; animation: foamIn 5.5s ease-in-out infinite alternate; }
@keyframes foamIn { from { transform: translateY(-5px); opacity: .7; } to { transform: translateY(5px); opacity: 1; } }
.sky .npc { position: absolute; left: 50%; bottom: -10px; width: 120px; height: 210px; margin-left: -60px; transform-origin: 50% 95.24%; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; }
.sky .hero.npc { pointer-events: none; } .sky .hero.npc::before { content: ''; position: absolute; left: 27%; right: 23%; top: 10%; bottom: 3%; pointer-events: auto; }   /* someone takes a tap in the middle of the box round them, where they are drawn (ムギ too, his own drawing), not the whole box: a tap beside or behind them is a step there (2026-11-10) */
.sky .hero.npc.passer, .sky .hero.npc.passer::before { pointer-events: none; }   /* passers-by (PASSERS): a tap goes through them */
/* 外場 (HALL, 2026-11-15): the customers' 「！」 only while they want the hero, the dish they wait for over them; the hero's tray; the three things to say at the foot */
.sky .cust:not(.need) .hl-mark { display: none; }
.sky .cust .hl-want { display: none; position: absolute; left: 50%; top: -10%; transform: translateX(-50%); padding: 6px 14px; border-radius: 18px; background: #fffaf0; color: #a8241c; font-style: normal; font-weight: 700; font-size: 30px; white-space: nowrap; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.sky .cust.want .hl-want { display: block; }
.sky .yhero .hl-tray { position: absolute; left: 50%; bottom: 40%; width: 96px; height: 84px; transform: translateX(-14%); background: radial-gradient(ellipse 48% 15% at 50% 86%, #8a5a36 0 90%, transparent 100%); pointer-events: none; --pic-shadow: transparent; --pic-steam: #c9bda6; }
.sky .yhero .hl-tray .pic { display: block; width: 100%; height: 100%; }
/* これ／それ／あれ (2026-11-19): held up while it is asked — the おすすめ board at the hero's side (the tray on the other), the red menu at the customer's shoulder (seated, the table hides their hands) */
.sky :is(.yhero, .cust) :is(.hl-board, .hl-menu) { position: absolute; left: 50%; bottom: 30%; width: max-content; display: grid; justify-items: center; padding: 6px 10px 7px; border: 4px solid #a8241c; border-radius: 10px; background: #fffaf0; box-shadow: 0 4px 0 rgba(0, 0, 0, .2); pointer-events: none; --pic-shadow: transparent; --pic-steam: #c9bda6; }
.sky :is(.yhero, .cust) :is(.hl-board, .hl-menu) b { font-size: 22px; line-height: 1.15; color: #c8322a; white-space: nowrap; }
.sky :is(.yhero, .cust) :is(.hl-board, .hl-menu) .pic { display: block; width: 72px; height: 64px; }
.sky :is(.yhero, .cust) :is(.hl-board, .hl-menu) i { font-style: normal; font-weight: 700; font-size: 22px; line-height: 1.15; color: #3b2a1c; white-space: nowrap; }
.sky .yhero .hl-board { transform: translateX(-118%); }
.sky .cust .hl-menu { bottom: 44%; padding: 4px 8px 5px; transform: translateX(16%) rotate(6deg); border-color: #7a1a14; background: #b8322a; } .sky .cust .hl-menu :is(b, i) { font-size: 19px; } .sky .cust .hl-menu .pic { width: 58px; height: 50px; } .sky .cust .hl-menu b { color: #f6d47a; } .sky .cust .hl-menu .pic { border-radius: 6px; background: #fffaf0; } .sky .cust .hl-menu i { color: #fffaf0; }
.hl-pick { position: absolute; z-index: 60; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); transform: translateX(-50%); width: min(520px, calc(100% - 24px)); padding: 14px 12px 12px; border-radius: 16px; overflow: hidden; background: rgba(251, 243, 226, .97); color: #2b2b33; box-shadow: 0 8px 28px rgba(0, 0, 0, .3); --pc: #4fae5a; --pic-shadow: rgba(90, 60, 30, .16); --pic-steam: #b4a891; }
.hl-q { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; color: #6e4a30; } .hl-ear { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 #d8c8a8; font-size: 19px; cursor: pointer; }
.hl-opts { display: grid; gap: 8px; } .hl-opt { min-height: 48px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 3px 0 #d8c8a8; font: inherit; font-size: 19px; font-weight: 700; color: #2b2b33; cursor: pointer; }
.hl-where .hl-opt { display: grid; gap: 1px; padding: 6px 10px; } .hl-where .hl-opt small { font-size: 12px; font-weight: 400; color: #8a7a6e; }
.hl-opt.wk-bad { animation: shake .3s ease; } .hl-opt.wk-hint { box-shadow: 0 0 0 3px #f6e08a, 0 0 12px 2px rgba(246, 224, 138, .8); }
@media (prefers-reduced-motion: reduce) { .hl-opt.wk-bad { animation: none; } }
/* 外場 2.0 (2026-11-15): patience — a countdown bar over the head (2026-11-16, the user; their face at its left), green → amber → red, there
   while they are answered too, the 「！」 over it; 💦/💢/♪ by the head; cross: a fidget now and then; the HUD up top */
.sky .cust { --pc: #4fae5a; } .sky .cust[data-mood="meh"] { --pc: #f0a92a; } .sky .cust[data-mood="mad"] { --pc: #e0402f; }
.sky .cust .hl-pat { display: none; position: absolute; left: 50%; top: -16px; width: 170px; height: 42px; margin-left: -85px; border-radius: 21px; background: rgba(43, 27, 20, .85); box-shadow: 0 0 0 4px rgba(255, 255, 255, .9), 0 4px 0 4px rgba(0, 0, 0, .18); pointer-events: none; }
.sky .cust.pat .hl-pat { display: block; } .sky .cust.asked .hl-mark { display: none; }
.sky .cust .hl-pat::before { content: ''; position: absolute; left: 44px; top: 11px; height: 20px; width: calc(114px * var(--p, 1)); border-radius: 10px; background: var(--pc); transition: background-color .3s; }
.sky .cust .hl-pat::after { content: '🙂'; position: absolute; left: 4px; top: 3px; width: 36px; height: 36px; display: grid; place-items: center; font-size: 30px; line-height: 1; }
.sky .cust[data-mood="meh"] .hl-pat::after { content: '😐'; } .sky .cust[data-mood="mad"] .hl-pat::after { content: '😠'; }
.sky .cust.pat .hl-mark { top: -86px; } .sky .cust.want .hl-want { top: -72px; } .sky .cust.want:is(.need, .asked) .hl-want { display: none; }   /* over the countdown (its top 216 over the feet: BAR in the hall's code, 226, a little over it) */
.sky .cust[data-mood="mad"] .hl-mark { background: #e0402f; box-shadow: 0 4px 0 #a8241c; }
.sky .cust .hl-emo { position: absolute; left: 68%; top: 16%; font-style: normal; font-size: 40px; line-height: 1; pointer-events: none; animation: hlEmo .9s ease-in-out infinite alternate; }
.sky .cust .hl-emo:empty { display: none; }
@keyframes hlEmo { from { transform: translateY(0) scale(1); } to { transform: translateY(-6px) scale(1.08); } }
.sky .cust[data-mood="mad"] > svg { animation: hlFume 2.2s ease-in-out infinite; }
@keyframes hlFume { 0%, 76%, 100% { transform: none; } 80% { transform: translateX(-3px); } 85% { transform: translateX(3px); } 90% { transform: translateX(-2px); } 95% { transform: translateX(1px); } }
.hl-hud { position: absolute; z-index: 55; left: 12px; top: calc(env(safe-area-inset-top, 0px) + 10px); display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 999px; background: rgba(43, 27, 20, .84); color: #fbf3e2; font-size: 14px; white-space: nowrap; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); pointer-events: none; }
.hl-hud .hl-stars { color: #f6c945; letter-spacing: 1px; font-size: 17px; } .hl-hud .hl-streak { color: #ffd88a; font-weight: 700; }
@media (max-width: 599px) { .hl-hud { top: calc(env(safe-area-inset-top, 0px) + 58px); } }   /* a phone: under the top buttons (the purse, the wardrobe…), not over them */
@media (prefers-reduced-motion: reduce) { .sky .cust .hl-emo, .sky .cust[data-mood="mad"] > svg { animation: none; } }
/* the dishes picked by their pictures (the order by name: its name under it; the pass: a number only); the phone ringing at the register */
.hl-dishes { grid-template-columns: repeat(3, 1fr); } .hl-dishes .hl-opt { display: grid; justify-items: center; align-content: center; gap: 2px; padding: 6px 4px; }
.hl-dishes .hl-opt .pic { width: min(84px, 21vw); height: auto; aspect-ratio: 1; } .hl-dishes .hl-opt span { font-size: 15px; line-height: 1.2; } .hl-dishes .hl-n { font-size: 12px; font-weight: 400; color: #8a7a6e; }
.sky .hl-ring { position: absolute; z-index: 40; font-style: normal; font-size: 36px; line-height: 1; pointer-events: none; transform: translateX(-50%); animation: hlRing .45s ease-in-out infinite; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .25)); }
@keyframes hlRing { 0%, 100% { transform: translateX(-50%) rotate(-14deg); } 50% { transform: translateX(-50%) rotate(14deg); } }
@media (prefers-reduced-motion: reduce) { .sky .hl-ring { animation: none; } }
/* 外場 2.0 §4: the room lifted over the panel (the hero and the one asked kept in sight); the panel: who
   is talking (their face as it is now), the three things to say as the hero's speech bubbles (a row on a wide screen) */
.yard[data-place="rairai"] .sky .yworld { bottom: var(--hl-lift, 0px); transition: bottom .35s cubic-bezier(.3, .7, .4, 1); }
.hl-pick { border-top: 6px solid #c8322a; padding-top: 8px; }   /* the shop's red along its top (their countdown is over their head) */
.hl-top { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; } .hl-top .hl-q { flex: 1; margin: 0; }
.hl-face { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: #f4e6cc; box-shadow: inset 0 0 0 2px #e8d4b0; } .hl-face svg { width: 100%; height: 100%; } .hl-tel { font-size: 26px; }
.hl-opts:not(.hl-dishes):not(.hl-where) .hl-opt { border-radius: 16px 16px 16px 5px; }
@media (min-width: 640px) { .hl-pick { width: min(660px, calc(100% - 24px)); } .hl-opts:not(.hl-dishes) { grid-template-columns: repeat(3, 1fr); } .hl-opts:not(.hl-dishes) .hl-opt { padding: 8px 10px; font-size: 17px; } }
/* the words heard: sound bars in the bubble over the speaker till answered */
.sky .ysay.hl-heard { animation: hlHeard .3s ease-out both; } @keyframes hlHeard { from { opacity: 0; transform: translate(-50%, 6px) scale(.8); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }   /* up at once and staying while asked (the 60 s bubble's own fade-in took 5 s) */
.sky .ysay .hl-wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; padding: 1px 2px; vertical-align: middle; }
.sky .ysay .hl-wave i { display: block; width: 3px; height: 100%; border-radius: 2px; background: #c8322a; animation: hlWave .8s ease-in-out infinite; }
.sky .ysay .hl-wave i:nth-child(2) { animation-delay: -.16s; } .sky .ysay .hl-wave i:nth-child(3) { animation-delay: -.32s; } .sky .ysay .hl-wave i:nth-child(4) { animation-delay: -.48s; } .sky .ysay .hl-wave i:nth-child(5) { animation-delay: -.64s; }
@keyframes hlWave { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
/* a dish on a table (steaming; an empty plate once eaten) */
.sky .hl-plate { position: absolute; width: 60px; height: 60px; margin-left: -30px; pointer-events: none; --pic-shadow: rgba(90, 60, 30, .16); --pic-steam: #b4a891; } .sky .hl-plate .pic { display: block; width: 100%; height: 100%; }
/* a free table's 「！」 while someone at the door waits to be shown to one (2026-11-18, the user): the customers' mark, as big, tapped as the table */
.sky .hl-tmark { position: absolute; z-index: 3000; width: 64px; height: 64px; margin-left: -32px; padding: 0; border: 0; background: none; font: inherit; transform-origin: 50% 100%; cursor: pointer; pointer-events: auto; }
.sky .hl-tmark b { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; font-weight: 900; font-size: 44px; line-height: 1; color: #fff; background: #f0883e; box-shadow: 0 4px 0 #c45f1e, 0 0 0 6px rgba(255, 255, 255, .85); animation: evMark 1.1s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .sky .hl-tmark b { animation: none; } }
/* the results: each group's face and the words they said, tapped to hear again */
.crr-groups { display: grid; gap: 5px; max-height: 26vh; margin: 8px 0 2px; overflow: auto; } .crr-g { display: flex; align-items: flex-start; gap: 6px; } .crr-face { flex: none; font-size: 20px; line-height: 1.4; }
.crr-says { display: flex; flex-wrap: wrap; gap: 4px; } .crr-say { padding: 3px 8px; border: 0; border-radius: 10px; background: #f4e6cc; color: #3a2c24; font: inherit; font-size: 13px; cursor: pointer; } .crr-says em { color: #9a8a7e; }
@media (prefers-reduced-motion: reduce) { .sky .ysay .hl-wave i { animation: none; } .yard[data-place="rairai"] .sky .yworld { transition: none; } }
.sky .npc svg { width: 100%; height: 100%; overflow: visible; filter: brightness(calc(.64 + .36 * var(--day))) saturate(calc(.8 + .2 * var(--day))); }
.sky .npc .ev-mark { position: absolute; left: 50%; top: -14%; width: 64px; height: 64px; margin-left: -32px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-weight: 900; font-size: 44px; line-height: 1; color: #fff; background: #f0883e; box-shadow: 0 4px 0 #c45f1e, 0 0 0 6px rgba(255, 255, 255, .85); animation: evMark 1.1s ease-in-out infinite alternate; pointer-events: none; }   /* scaled with the person (×.2–.5) */
@keyframes evMark { from { transform: translateY(0); } to { transform: translateY(-14px); } }
.yard.indoor { --day: 1; --warm: 0; }   /* a room is lit the same by night and day (its lamps) */
.yard.indoor .npc:is(.npc-go, .npc-teppei) .arm.r { animation: heroArm .42s ease-in-out infinite alternate; }   /* at the stove, at the grill */
.yard.indoor .npc:is(.bench, .kneel):not(.back) .head { animation: heroNod 2.8s ease-in-out infinite; }   /* eating, talking */
@media (prefers-reduced-motion: reduce) { .yard.indoor .npc .arm.r, .yard.indoor .npc .head { animation: none; } }
.yard.indoor .sky { background: radial-gradient(ellipse at 50% 38%, #f7eedd, #dccaa8); } .yard.indoor[data-place="izakaya"] .sky { background: radial-gradient(ellipse at 50% 38%, #4c3324, #1e140d); }   /* round the room block (seen at 45°) */
.yard.indoor .sky > :not(.yworld) { display: none; }
.sky .bus { position: absolute; left: 50%; width: 280px; height: 140px; transform-origin: 50% 100%; transform: translateX(900px) scale(var(--k)); transition: transform .6s cubic-bezier(.2, .8, .3, 1); pointer-events: none; }
.sky .bus.in { transform: translateX(-140px) scale(var(--k)); } .sky .bus.go { transform: translateX(-1100px) scale(var(--k)); transition-duration: .8s; transition-timing-function: ease-in; }
.sky .bus svg { width: 100%; height: 100%; overflow: visible; }
.bus-board { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: calc(72px + env(safe-area-inset-top, 0px)) 12px 12px; background: rgba(12, 10, 24, .25); }
.bus-card { width: min(340px, 100%); display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--bg-elev); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .22); animation: talkIn .25s ease-out; }
.bus-stop-btn { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; font: inherit; font-size: 15px; font-weight: 600; color: var(--fg); background: var(--bg-elev-2); cursor: pointer; }
.bus-stop-btn:disabled { opacity: .5; cursor: default; } .bus-stop-btn small { font-size: 12px; font-weight: 400; color: var(--fg-3); }
.bus-note { margin: 0; font-size: 13px; color: var(--fg-3); }
@media (prefers-reduced-motion: reduce) { .sky .npc .ev-mark { animation: none; } }
/* the cruise ship (CRUISE, test 2026-11-12): it rocks a little at the quay, its wake while it moves, smoke from its funnel; the
   passengers fade in at the door and out going back in; the tour's bar along the foot of the scene (out of sight under a talk) */
.sky .land .cruise-ship:not(.far):not(.sailing) .cs-bob { animation: csBob 4.6s ease-in-out infinite alternate; } @keyframes csBob { to { transform: translateY(1.6px); } }
.sky .land .cs-wake { opacity: 0; transition: opacity .8s; } .sky .land .cruise-ship.sailing .cs-wake { opacity: 1; }
.sky .land .cs-smoke { animation: csSmoke 3.4s ease-in-out infinite alternate; } @keyframes csSmoke { from { opacity: .25; transform: translateY(2px); } to { opacity: .65; transform: translateY(-5px); } }
.sky .land .cruise-front { transition: opacity .5s; }
.sky .tourist.cr-in > svg { animation: crIn .5s ease-out; } @keyframes crIn { from { opacity: 0; } }
.sky .tourist.cr-gone { opacity: 0; transition: opacity .4s; }
.sky .tourist.flip .cr-flag text { transform: scaleX(-1); transform-box: fill-box; transform-origin: center; }   /* 高橋 turned left: the flag's word still reads the right way */
.cruise-bar { position: absolute; z-index: 40; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 8px; max-width: calc(100% - 32px); padding: 8px 16px; border-radius: 18px; background: rgba(255, 255, 255, .95); color: #3a2c24; box-shadow: 0 4px 14px rgba(0, 0, 0, .22); font: 600 14px/1.2 system-ui, sans-serif; white-space: nowrap; }
.cruise-bar .cb-n { color: #b0602a; font-weight: 800; font-variant-numeric: tabular-nums; } .cruise-bar .cb-t { overflow: hidden; text-overflow: ellipsis; } .cruise-bar .cb-busy { color: #8a7a6e; }
.cruise-bar .cb-go { white-space: nowrap; color: #6a5a4e; } .cruise-bar .cb-go::before { content: '→ '; } .cruise-bar .cb-busy:empty { display: none; }   /* on by 高橋's 「！」 (2026-11-13) */
/* a menu bought from with 円 (YEN, 2026-11-13): the names and prices in Japanese, the Chinese under them on a tap; had before: 済 */
/* the pictures on these light cards keep the day's backdrop, shadow and steam whatever the theme (2026-11-13: navy discs by night) */
:is(.menu-card, .food-book, .eat-scene, .yen-stamp) { --pic-disc: #efe3cd; --pic-shadow: rgba(90,60,30,.16); --pic-steam: #b4a891; }
.menu-card .mc-list { display: grid; gap: 6px; }
.mc-item { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 0 10px; padding: 7px 12px 7px 8px; border: 1px solid #e6dac4; border-radius: 12px; font: inherit; text-align: left; color: #3a2c24; background: #fffdf6; cursor: pointer; }
.mc-item:not(:disabled):hover { border-color: #c9a97a; } .mc-item:disabled { opacity: .5; cursor: default; }
.mc-name { font-size: 17px; font-weight: 700; } .mc-price { display: grid; justify-items: end; line-height: 1.15; font-variant-numeric: tabular-nums; } .mc-price small { font-size: 10px; color: #8a7a6e; } .mc-price b { font-size: 17px; color: #b0602a; }
.mc-zh { display: none; grid-column: 2 / -1; font-size: 13px; color: #8a7a6e; } .menu-card.zh .mc-zh { display: block; }
.mc-pic { grid-row: span 2; width: 52px; height: 52px; } .mc-pic .pic { width: 100%; height: 100%; }
.mc-item.locked { opacity: .75; cursor: default; } .mc-item.locked .mc-pic { filter: grayscale(1) blur(2.5px); opacity: .55; } .mc-item.locked .mc-name { color: #a89a88; }
.mc-lock { grid-column: 2 / -1; font-size: 12.5px; color: #8a7a6e; }
.mc-item.full .mc-price::after { content: '吃不下了'; display: block; font-size: 11px; color: #8a7a6e; text-align: right; }
.mc-item.full[data-k="d"] .mc-price::after { content: '喝不下了'; } .mc-item.full[data-k="b"] .mc-price::after { content: '今天泡過了'; } .mc-item.full[data-k="o"] .mc-price::after { content: '今天抽過了'; }   /* the bath and おみくじ: once a day */
/* having it (2026-11-13): its picture big, bitten into (the bites are holes in a mask) or tipped up and drunk, the hero beside it */
.eat-scene { position: fixed; inset: 0; z-index: 77; display: grid; place-items: center; padding: 16px; background: rgba(40, 24, 12, .5); animation: talkIn .25s ease-out; }
.es-card { position: relative; width: min(340px, 100%); padding: 16px 16px 14px; border-radius: 20px; text-align: center; background: radial-gradient(120% 80% at 50% 30%, #fff8e8, #f4e2c4); color: #3a2c24; box-shadow: 0 14px 40px rgba(0, 0, 0, .3); }
.es-name { margin: 0; font-size: 22px; font-weight: 800; }
.es-face { margin: 8px auto 0; width: min(100%, 300px, calc((100dvh - 300px) * .857)); min-width: 200px; }   /* the close-up (EATSCENE, 360 × 420), short of the screen's height on a small phone */
.es-stage { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(90, 60, 30, .12); }
.es-bubble { position: relative; margin: 10px 0 0; padding: 10px 14px; border-radius: 16px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.es-bubble::before { content: ''; position: absolute; left: 26%; top: -8px; border: 8px solid transparent; border-top: 0; border-bottom-color: #fff; }
.es-bubble.pop { animation: kotoBump .3s ease-out; } .es-say { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.9; } .es-zh { margin: 2px 0 0; font-size: 13px; color: #8a7a6e; }
.es-foot { display: flex; justify-content: flex-end; align-items: center; margin: 6px 0 10px; } .es-zh-btn[hidden], .es-ok[hidden] { display: none; } .es-ok { width: 100%; }
.es-card .zh-btn { color: #8a7a6e; border-color: #e0d2bc; }   /* the card's own beige, by day and by night */
@media (prefers-reduced-motion: reduce) { .eat-scene, .es-bubble.pop { animation: none; transition: none; } }
.mc-had { margin-left: 6px; padding: 0 4px; border: 1.5px solid #c8392f; border-radius: 50%; font-style: normal; font-size: 11px; color: #c8392f; vertical-align: 3px; }
.mc-top { margin-left: auto; display: flex; align-items: center; gap: 10px; } .mc-purse { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-variant-numeric: tabular-nums; } .mc-purse .yen-i { width: 20px; height: 20px; }
.mc-none { margin: 0 0 8px; font-size: 13px; color: var(--fg-3); }
.yen-stamp { position: fixed; z-index: 76; top: calc(64px + env(safe-area-inset-top, 0px)); left: 50%; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 16px; border-radius: 14px; background: #fffaf0; color: #3a2c24; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); transform: translateX(-50%); transition: opacity .4s; }
.yen-stamp b { font-size: 13px; color: #8a6a52; } .yen-stamp span { font-size: 16px; font-weight: 700; }
.yen-stamp i { display: grid; place-items: center; width: 34px; height: 34px; border: 3px solid #c8392f; border-radius: 50%; font: 900 17px/1 'Hiragino Mincho ProN', 'Noto Serif JP', serif; color: #c8392f; transform: rotate(-12deg); animation: crrStamp .34s cubic-bezier(.3, 1.6, .5, 1) .15s backwards; }
.yen-stamp.off { opacity: 0; }
.food-book { max-height: min(62vh, 560px); overflow-y: auto; }   /* as 町の手帳: the list scrolls inside the book (2026-11-13, the user's phone: it ran up under the status bar) */
/* 美食手帳 as a stamp card (2026-11-13, the user's pick): a dashed ring a thing; had, its picture in it and a red 済 stamped over */
.food-book .fb-count { margin: 0 0 10px; font-size: 14px; color: var(--fg-2, #6a5a4e); } .fb-menu h4 { margin: 14px 0 8px; font-size: 15px; color: #7a5a3a; }
.fb-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 6px; }
.fb-item { position: relative; display: grid; justify-items: center; align-content: start; gap: 1px; text-align: center; color: var(--soft, #a89a88); }
.fb-pic { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 3px; border: 1.5px dashed var(--line-2, #d9ccb4); border-radius: 50%; } .fb-pic .pic { width: 46px; height: 46px; }
.fb-item.had { color: var(--ink, #3a2c24); } .fb-item.had .fb-pic { border: 1.5px solid var(--rule, #e6dac4); background: var(--card, #fffdf6); }
.fb-name { font-size: 13.5px; font-weight: 700; line-height: 1.35; word-break: keep-all; } .fb-item small { font-size: 11px; line-height: 1.35; }
.fb-stamp { position: absolute; left: calc(50% + 12px); top: -4px; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid #c8392f; border-radius: 50%; font: 900 14px/1 'Hiragino Mincho ProN', 'Noto Serif JP', serif; font-style: normal; color: #c8392f; background: rgba(255, 250, 240, .5); transform: rotate(-12deg); opacity: .88; }
.fb-day { color: var(--soft, #8a7a6e); }
@media (prefers-reduced-motion: reduce) { .yen-stamp i { animation: none; } }
/* the trip's results (2026-11-13): the numbers tick up one after another, then the grade is stamped on with a thump */
.cr-result { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: 16px; background: rgba(12, 10, 24, .45); animation: talkIn .25s ease-out; }
.crr-card { position: relative; width: min(360px, 100%); padding: 18px 18px 16px; border-radius: 18px; background: #fffaf0; color: #3a2c24; box-shadow: 0 14px 40px rgba(0, 0, 0, .3); font-variant-numeric: tabular-nums; }
.crr-card.thud { animation: crrThud .32s ease-out; }
.crr-head { display: grid; gap: 2px; margin-bottom: 10px; } .crr-head b { font-size: 19px; } .crr-head span { font-size: 14px; color: #8a7a6e; }
/* 中華街の打工 (2026-11-14): the 打工證 page in 町の手帳 */
/* a job's card (JOBS): the keeper's face and word on top */
.wk-head { display: flex; align-items: baseline; gap: 10px; padding-right: 40px; } .wk-head b { font-size: 20px; } .wk-n { font-size: 14px; opacity: .7; }
.wk-who { display: flex; align-items: center; gap: 10px; margin-top: 8px; min-height: 52px; } .wk-who .kr-face { width: 46px; height: 46px; flex: none; }
.wk-say { margin: 0; display: grid; gap: 1px; font-size: 15px; } .wk-say span { font-size: 12.5px; opacity: .7; } .wk-say.bad b { color: #c0392b; } .wk-say.ok b { color: #2f7a6a; }
/* 站櫃: the customer and what they say, the four things on the counter (a picture, the name, the price) */
.wk-counter .cls-card { background: #fbf3e2; color: #2b2b33; border-bottom: 10px solid #c8322a; }
.wk-cust { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 64px; margin: 8px 0; opacity: .35; transition: opacity .3s, transform .4s; }
.wk-pat { flex: 1 0 100%; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .12); overflow: hidden; }
.wk-emo { position: absolute; left: 38px; top: -6px; font-style: normal; font-size: 22px; line-height: 1; pointer-events: none; } .wk-emo:empty { display: none; }
.wk-grr { position: absolute; left: 50px; top: -20px; z-index: 1; padding: 2px 9px; border-radius: 10px; background: #fff3e0; color: #b4441c; font-size: 15px; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); pointer-events: none; animation: wkGrr 2.2s ease forwards; }
@keyframes wkGrr { 0% { opacity: 0; transform: translateY(4px); } 12%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } } .wk-cust.on { opacity: 1; } .wk-cust.bye { transform: translateX(-30px); opacity: 0; }
.wk-cust .kr-face { width: 56px; height: 56px; flex: none; } .wk-bub { position: relative; margin: 0; display: grid; gap: 1px; padding: 8px 12px; border-radius: 14px; background: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .08); font-size: 18px; } .wk-bub span { font-size: 12.5px; opacity: .6; } .wk-cnt { font-style: normal; font-weight: 700; color: #c8322a; }
.wk-goods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; border-radius: 10px; background: #8a5a34; }
.wk-good { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; border: 0; border-radius: 8px; background: #f6ecd8; cursor: pointer; font: inherit; color: #2b2b33; } .wk-good .pic { width: 54px; height: 54px; } .wk-good b { font-size: 19px; } .wk-good small { font-size: 12px; color: #8a5a34; }
.wk-ear { display: inline-block; min-width: 3.2em; margin-right: 2px; padding: 0 8px; border: 0; border-bottom: 2px dashed #c8322a; border-radius: 6px; background: #fbe9d0; font: inherit; font-size: 16px; line-height: 1.5; cursor: pointer; vertical-align: baseline; }
.wk-good.wk-bad, .wk-opt.wk-bad { animation: shake .3s ease; } .wk-good.wk-hint, .wk-opt.wk-hint { box-shadow: 0 0 0 3px #f6e08a, 0 0 12px 2px rgba(246, 224, 138, .8); }
.wk-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; min-height: 0; } .wk-opt { font-size: 16px; }
/* the rules before a shift (WORK.intro, 2026-11-19): who and where, how it goes, the abilities it takes, the pay, はい／いいえ */
.wk-rules .cls-card { text-align: left; } .wk-rhead { display: flex; align-items: center; gap: 10px; } .wk-rhead p { display: grid; margin: 0; } .wk-rhead b { font-size: 18px; } .wk-rhead span { font-size: 13px; color: #8a7a6e; }
.wk-rules h4 { margin: 12px 0 4px; font-size: 13px; color: #a8241c; } .wk-how { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.55; } .wk-how li + li { margin-top: 3px; }
.wk-uses { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; } .wk-uses span { padding: 2px 10px; border-radius: 99px; background: #fbeee0; color: #8a3a1c; font-size: 13px; font-weight: 600; }
.wk-pay, .wk-back { margin: 12px 0 0; font-size: 13px; color: #6a5a4e; } .wk-back { color: #a8241c; font-weight: 600; }
.wk-ask { display: grid; justify-items: center; margin: 14px 0 8px; } .wk-ask b { font-size: 18px; } .wk-ask span { font-size: 12px; color: #8a7a6e; }
.wk-yn { display: flex; justify-content: center; gap: 10px; } .wk-yn .btn { min-width: 96px; font-size: 16px; }
/* a price spelled (2026-11-19): the pieces tapped so far, a blank for each to come; a tile used: greyed */
/* 收銀 (2026-11-19): the customer's things on the counter, one to three with their tags; the sum spelled in pieces */
.wk-till .cls-card { background: #f4f1e2; color: #2b2b33; border-bottom: 10px solid #2f6a4a; }
.wk-goods.n1 { grid-template-columns: minmax(0, 160px); justify-content: center; }
span.wk-good { cursor: default; } span.wk-good small { font-size: 15px; font-weight: 700; color: #c8322a; }
.wk-spell { flex-basis: 100%; display: flex; justify-content: center; align-items: flex-end; gap: 4px; min-height: 34px; margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.wk-spell b { padding: 1px 6px; border-radius: 8px; background: #fff3d6; color: #6a3a1c; } .wk-spell i { width: 40px; height: 28px; border-bottom: 3px solid #c9b48a; }
.wk-spell b:last-of-type { animation: wk-pop .25s ease-out; } @keyframes wk-pop { from { transform: scale(.7); } }
.wk-tile { min-height: 42px; min-width: 52px; padding: 0 12px; font-size: 18px; } .wk-tile:disabled { opacity: .35; }
.wk-till .wk-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); } .wk-till .wk-spell { grid-column: 1 / -1; } .wk-till .wk-tile { min-width: 0; padding: 0 4px; }   /* up to twelve: three rows of four */
.wk-me { margin: 8px 0 0; min-height: 1.4em; text-align: center; display: grid; gap: 1px; } .wk-me b { font-size: 15px; color: #2f7a6a; } .wk-me span { font-size: 12px; opacity: .65; }
/* 包包子: the bun as far as it has come and 王's word (its picture beside it till known); six pictures to choose from; a perfect bun
   out of the steamer in a burst of gold, a perfect shift more of it */
.wk-buns .cls-card { background: #fbf3e2; color: #2b2b33; border-bottom: 10px solid #2f7a6a; }
.wk-closeup { position: relative; margin: 4px -4px 6px; border-radius: 12px; overflow: hidden; background: linear-gradient(#f6e6c8, #ecd3a8); } .wk-closeup svg { display: block; width: 100%; height: auto; }
.wk-closeup.wk-shine::before { content: ''; position: absolute; inset: -40%; z-index: 0; background: repeating-conic-gradient(from 0deg, rgba(255, 214, 90, .7) 0 8deg, rgba(255, 214, 90, 0) 8deg 20deg); animation: wkRays 1.1s ease-out forwards; pointer-events: none; }
.wk-closeup svg { position: relative; z-index: 1; } .wk-hand.go { animation: wkPress .28s ease-out; transform-box: fill-box; transform-origin: center; } @keyframes wkPress { 40% { transform: translate(-14px, 14px) scale(.9); } }
.wk-steamer .wk-done.ok { filter: drop-shadow(0 0 3px #f6e08a); }
.wk-closeup.lump .wk-bunnow { animation: wkSlump .5s ease-out; transform-box: fill-box; transform-origin: 50% 100%; } @keyframes wkSlump { from { transform: scaleY(1.3); } 55% { transform: scale(1.1, .82); } }   /* a bun out of time sags */
.wk-krow { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; } .wk-krow .wk-ear { flex: none; width: 42px; height: 42px; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 #d8c8a8; font-size: 20px; } .wk-clock { flex: 1; height: 10px; border-radius: 5px; background: #e6d6b8; overflow: hidden; }
/* the clocks (2026-11-19, every job timed as 外場 is): a bun's by the speaker, a customer's under them — --p what is left, coloured by 外場's moods */
.wk-clock, .wk-cust { --pc: #4fae5a; } .wk-clock[data-mood="meh"], .wk-cust[data-mood="meh"] { --pc: #f0a92a; } .wk-clock[data-mood="mad"], .wk-cust[data-mood="mad"] { --pc: #e0402f; }
.wk-clock i, .wk-pat i { display: block; height: 100%; width: calc(100% * var(--p, 1)); background: var(--pc); transition: background-color .3s; }
.wk-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .wk-key { min-height: 56px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 3px 0 #d8c8a8; font: inherit; font-size: 30px; font-weight: 700; color: #2b2b33; cursor: pointer; }
.wk-keys.four { grid-template-columns: repeat(2, 1fr); }   /* under twelve kana seen */
.wk-key:active { transform: translateY(2px); box-shadow: 0 1px 0 #d8c8a8; } .wk-key.wk-bad { animation: shake .3s ease; } .wk-key.wk-hint { box-shadow: 0 0 0 3px #f6e08a, 0 0 12px 2px rgba(246, 224, 138, .8); }
@keyframes wkRays { 0% { transform: scale(.3) rotate(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.15) rotate(40deg); opacity: 0; } }
.wk-buns .cls-card.wk-shine-all { animation: wkGold 1.6s ease-out; } @keyframes wkGold { 0%, 100% { box-shadow: 0 12px 40px rgba(0, 0, 0, .35); } 40% { box-shadow: 0 0 0 6px #f6e08a, 0 0 60px 20px rgba(255, 214, 90, .9); } }
@media (prefers-reduced-motion: reduce) { .wk-closeup.wk-shine::before { animation: none; opacity: .6; } .wk-buns .cls-card.wk-shine-all, .wk-key.wk-bad, .wk-hand.go, .wk-closeup.lump .wk-bunnow { animation: none; } }
@media (prefers-reduced-motion: reduce) { .wk-cust { transition: none; } .wk-grr { animation: none; } .wk-good.wk-bad, .wk-opt.wk-bad { animation: none; } }
.wk-board .cls-card { background: #fbf3e2; color: #2b2b33; border-top: 8px solid #c8322a; } .wk-bhead { display: grid; gap: 2px; padding-right: 40px; } .wk-bhead b { font-size: 21px; color: #a82828; } .wk-bhead span { font-size: 13px; color: #8a7a6e; }
.wk-jobs { list-style: none; margin: 12px 0 8px; padding: 0; display: grid; gap: 6px; } .wk-job { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: rgba(138, 122, 110, .1); color: #6a5a4e; } .wk-job.ok { background: rgba(47, 122, 106, .12); color: #2b2b33; }
.wk-job p { margin: 0; } .wk-jtop { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; } .wk-jtop b { font-size: 16px; color: #2b2b33; } .wk-jtop small { font-size: 12px; color: #8a7a6e; } .wk-jtop em { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 700; color: #b0602a; }
.wk-does { font-size: 13px; line-height: 1.5; } .wk-need { font-size: 12.5px; color: #8a7a6e; } .wk-job.ok .wk-need { color: #2f7a6a; font-weight: 700; }   /* each job what it is (2026-11-20) */ .wk-today { margin: 6px 0 4px; font-weight: 700; }
.wk-book { display: grid; gap: 12px; } .wk-card { display: grid; gap: 2px; justify-items: start; padding: 12px 14px; border: 1.5px dashed #a8946e; border-radius: 12px; background: rgba(255, 250, 236, .5); }
.wk-title { font-size: 13px; color: #8a7a6e; } .wk-rank { font-size: 24px; } .wk-tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .wk-tbl th, .wk-tbl td { padding: 5px 4px; border-bottom: 1px solid rgba(138, 122, 110, .3); text-align: left; } .wk-tbl th { font-size: 12px; color: #8a7a6e; font-weight: 600; } .wk-note { margin: 0; font-size: 12.5px; color: #8a7a6e; }
.crr-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #e6d9c4; font-size: 15px; }
.crr-row > span { display: inline-flex; align-items: center; gap: 6px; } .crr-row :is(.koto-i, .yen-i) { width: 20px; height: 20px; } .crr-row b { font-size: 18px; } .crr-row i { font-style: normal; }
.crr-sum { border-bottom: 0; } .crr-sum b { font-size: 22px; color: #b0602a; }
.crr-stamp { position: absolute; right: -8px; top: -24px; width: 92px; height: 92px; background: rgba(255, 250, 240, .55); display: grid; place-content: center; text-align: center; border: 4px solid currentColor; border-radius: 50%; color: #c8392f; transform: rotate(-14deg) scale(2.6); opacity: 0; pointer-events: none; }
.crr-stamp::before { content: ''; position: absolute; inset: 4px; border: 1.5px solid currentColor; border-radius: 50%; }
.crr-stamp b { font: 900 40px/1 'Hiragino Mincho ProN', 'Noto Serif JP', serif; } .crr-stamp span { font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.crr-stamp.gS { color: #c9971a; } .crr-stamp.gA { color: #c8392f; } .crr-stamp.gE, .crr-stamp.gD { color: #8a6a5a; }
.crr-stamp.on { animation: crrStamp .34s cubic-bezier(.3, 1.6, .5, 1) forwards; } .crr-stamp.still { animation: none; opacity: .9; transform: rotate(-14deg); }
.crr-rank { margin: 10px 0 12px; font-size: 14px; color: #6a5a4e; } .crr-rank em { font-style: normal; font-weight: 800; color: #b0602a; } .crr-rank small { display: block; margin-top: 2px; font-size: 12px; color: #8a7a6e; }
.wk-tbl td.wk-s { font-weight: 800; color: #b0602a; }   /* a job's best an S: one of the four the 打工證 waits on (2026-11-20) */
.crr-ok { width: 100%; }
@keyframes crrStamp { from { opacity: 0; transform: rotate(-14deg) scale(2.6); } 60% { opacity: .95; transform: rotate(-14deg) scale(.92); } to { opacity: .9; transform: rotate(-14deg) scale(1); } }
@keyframes crrThud { 0%, 100% { transform: none; } 30% { transform: translate(-3px, 2px); } 60% { transform: translate(2px, -1px); } }
@media (prefers-reduced-motion: reduce) { .cr-result, .crr-card.thud, .crr-stamp.on { animation: none; } .crr-stamp.on { opacity: .9; transform: rotate(-14deg); } }
.yard:has(> .talk) .cruise-bar { visibility: hidden; }
.cruise-travel { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(24, 28, 46, .92); color: #fff; font: 700 20px/1.4 system-ui, sans-serif; text-align: center; opacity: 0; transition: opacity .5s; pointer-events: none; }   /* on to a place further off (a bus ride, a walk): the screen fades, a line says how */
.cruise-travel.on { opacity: 1; pointer-events: auto; }
.talk-face .cr-crowd { display: flex; width: 100%; height: 100%; overflow: hidden; } .talk-face .cr-crowd svg { flex: none; width: 56%; height: 100%; margin: 0 -14%; }
@media (prefers-reduced-motion: reduce) { .sky .land .cruise-ship .cs-bob, .sky .land .cs-smoke { animation: none; } }
.sky .npc-mugi .mugi-tail { transform-box: fill-box; transform-origin: 0% 100%; animation: mugiWag .45s ease-in-out infinite alternate; }
.sky .npc-mugi:is(.walk, .run) > svg { animation: mugiTrot .3s ease-in-out infinite alternate; } @keyframes mugiTrot { to { transform: translateY(-7px); } }   /* ムギ on the move (TOWNLIFE): a trot, he has no legs to swing */
@keyframes mugiWag { from { transform: rotate(-10deg); } to { transform: rotate(12deg); } }
/* test (2026-11-09): someone at the front door — コンコン by it; a few lines with a neighbour */
.room .knock { position: absolute; pointer-events: none; display: flex; gap: 4px; white-space: nowrap; justify-content: center; align-items: center; }
.room .knock i { font-style: normal; font-weight: 800; font-size: 15px; color: #fff; background: rgba(60, 44, 32, .78); border-radius: 10px; padding: 2px 6px; opacity: 0; }
.room .knock.on i { animation: knockPop 1.2s ease-out; } .room .knock.on i + i { animation-delay: .2s; }
@keyframes knockPop { 0% { opacity: 0; transform: translateY(6px) scale(.7); } 15% { opacity: 1; transform: translateY(0) scale(1.08); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
.study .thing.knocking .tag { animation: doorShake .5s ease-in-out 3; }
@keyframes doorShake { 25% { transform: translateX(-3px) rotate(-4deg); } 75% { transform: translateX(3px) rotate(4deg); } }
.talk { position: fixed; z-index: 60; inset: 0; padding: 12px 12px calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: flex-end; justify-content: center; cursor: pointer; }   /* the whole screen: a tap anywhere goes on (the user: taps beside the card sent the hero off) */
.story { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)); background: #241f2e; color: #f4ecdc; cursor: pointer; animation: gotIn .5s ease-out; }
.story.out { opacity: 0; transition: opacity .4s; }
.story-skip { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; padding: 6px 12px; border: 1px solid rgba(244, 236, 220, .35); border-radius: 999px; background: none; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.story-page { display: grid; justify-items: center; gap: 18px; width: min(420px, 100%); animation: talkIn .5s ease-out; }
.story-art { width: 100%; aspect-ratio: 3 / 2; display: grid; place-items: center; border-radius: 18px; overflow: hidden; background: #f3e9d6; } .story-art > svg { width: 100%; height: 100%; }
.story-letter { width: 100%; padding: 22px 20px; border-radius: 6px; background: #fbf6ea; color: #4a3a2c; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); font-family: serif; transform: rotate(-1.2deg); }
.story-letter p { margin: 0; font-size: 17px; line-height: 2.1; } .story-letter p:first-child { margin-bottom: 4px; } .story-letter p:last-child { text-align: right; margin-top: 6px; } .story-letter rt { font-size: 9px; color: #9a8a74; }
.story-zh { margin: 0; text-align: center; font-size: 16px; line-height: 1.7; }
.story-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 64px; } .story-tap { font-size: 13px; opacity: .7; animation: talkNext 1s ease-in-out infinite alternate; }
.story-dots { display: flex; gap: 8px; } .story-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(244, 236, 220, .3); } .story-dots i.on { background: #f4ecdc; }
.story-hero { position: relative; width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(closest-side, #fff6e0, #f3e9d6); } .story-hero > svg { height: 92%; width: auto; }
.story-hero i { position: absolute; top: 18%; left: calc(14% + var(--i) * 17%); font-style: normal; font-weight: 800; font-size: 22px; color: #5a68d8; opacity: 0; animation: storyKana 3s ease-in-out calc(var(--i) * .4s) infinite; }
@keyframes storyKana { 0% { transform: translateY(16px); opacity: 0; } 30%, 70% { opacity: .9; } 100% { transform: translateY(-14px); opacity: 0; } }
.story-mem { position: relative; width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 6%; background: linear-gradient(#f6e7cf, #efd9b6); }
.sm-fig { position: relative; display: grid; } .sm-fig > svg { width: auto; } .sm-fig.granny > svg { height: 200px; } .sm-fig.kid > svg { height: 128px; }
.sm-say { position: absolute; top: 4%; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 3px 9px; border-radius: 12px; background: #fff; color: #4a3a2c; font-size: 15px; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); } .sm-fig.granny .sm-say { left: 70%; } .sm-say.q { top: -12%; font-weight: 800; color: #5a68d8; }
.story-diary { position: relative; display: flex; gap: 4px; width: 92%; height: 82%; padding: 10px; border-radius: 6px; background: #7a5a3a; }
.sd-page { flex: 1; padding: 10px 8px; background: #fbf6ea; color: #4a3a2c; font-family: serif; font-size: 11px; line-height: 1.8; overflow: hidden; filter: blur(1.1px); } .sd-page p { margin: 0; }
.sd-q { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #5a68d8; text-shadow: 0 2px 0 #fff; }
.diary { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); background: rgba(20, 16, 28, .6); animation: gotIn .25s ease-out; }
/* the books (2026-11-13, the user's picks): her diary is washi with a stab binding (四つ目綴じ) and its words in mincho; 町の手帳
   (美食手帳 too) a kraft-covered grid notebook with an elastic band; index stickers down the right edge of both. Their own light
   colours whatever the theme, and by night lit as under a desk lamp: a little darker and warmer, the lamp's glow top left */
.diary-book { --night: calc(1 - var(--day, 1)); --pp: color-mix(in srgb, #fbf6ea calc(var(--day, 1) * 100%), #e8d7b2); --ink: #4a3a2c; --soft: color-mix(in srgb, #9a8a74 calc(var(--day, 1) * 100%), #7d6c54); --rule: color-mix(in srgb, #e6d9bf calc(var(--day, 1) * 100%), #cdb98f);
  --card: color-mix(in srgb, var(--pp) 55%, #fff); --bg-elev-2: var(--card); --bg-hover: color-mix(in srgb, var(--pp) 80%, #b08a5a); --line: var(--rule); --line-2: color-mix(in srgb, var(--rule) 70%, #9a7a52); --fg: var(--ink); --fg-2: #5b4a38; --fg-3: var(--soft); color-scheme: light;
  position: relative; width: min(440px, calc(100vw - 62px)); margin-right: 30px; color: var(--ink); box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
.diary-book::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; opacity: var(--night);
  background: radial-gradient(130% 100% at 18% -5%, rgba(255, 222, 160, .3), rgba(255, 222, 160, 0) 45%, rgba(46, 30, 12, .3) 100%); }
.diary-book.bk-g { padding: 18px 18px 16px 54px; border-radius: 3px 8px 8px 3px; background-color: var(--pp);
  background-image: radial-gradient(rgba(120, 90, 50, calc(.07 + .05 * var(--night))) 1px, transparent 1.6px), radial-gradient(rgba(120, 90, 50, calc(.05 + .04 * var(--night))) 1px, transparent 1.7px); background-size: 7px 9px, 11px 13px; }
.diary-book.bk-g::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 36px; border-radius: 3px 0 0 3px; box-shadow: inset -3px 0 0 rgba(0, 0, 0, .18);   /* indigo, four holes, the thread round the spine */
  background: radial-gradient(circle at 21px 50%, var(--pp) 0 2.6px, rgba(255, 255, 255, .85) 2.8px 3.9px, transparent 4.2px) 0 0 / 100% 25% repeat-y,
    linear-gradient(transparent calc(50% - 1px), rgba(255, 255, 255, .85) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 21px 25% repeat-y,
    linear-gradient(transparent 12.5%, rgba(255, 255, 255, .85) 12.5% 87.5%, transparent 87.5%) 3px 0 / 2px 100% no-repeat, #2e3f6e; }
.diary-book.bk-note { padding: 10px 32px 10px 10px; border-radius: 12px; background-color: color-mix(in srgb, #b98a57 calc(var(--day, 1) * 100%), #946b41);
  background-image: radial-gradient(rgba(70, 40, 10, .12) 1px, transparent 1.5px); background-size: 6px 7px; }
.diary-book.bk-note::before { content: ''; position: absolute; top: 0; bottom: 0; right: 11px; width: 9px; background: #2b2d3a; box-shadow: inset 2px 0 0 rgba(255, 255, 255, .12), 0 0 3px rgba(0, 0, 0, .3); }   /* the elastic band */
.bk-note .bk-page { --pp: color-mix(in srgb, #fbfaf5 calc(var(--day, 1) * 100%), #e5dbc2); --rule: color-mix(in srgb, #e1e6e3 calc(var(--day, 1) * 100%), #cdc4aa); padding: 14px 14px 12px; border-radius: 6px; background-color: var(--pp);
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 16px 16px; background-position: -1px -1px; }
.bk-note .bk-page.bk-plain { background-image: none; box-shadow: inset 0 0 0 1px rgba(160, 130, 90, .18); }   /* 美食手帳 and 打工證: plain paper (2026-11-20, the user: the grid too busy behind them) */
.diary-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--soft); margin-bottom: 10px; } .diary-head rt { font-size: 8px; }
.diary-book .talk-say { color: #8a6a52; }
.bk-g :is(.diary-head, .diary-page) { font-family: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', serif; }
.diary-page { font-size: 18px; line-height: 2.2; min-height: 9em; } .diary-page p { margin: 0; } .diary-page rt { font-size: 9px; color: var(--soft); }
.diary-page.locked { filter: blur(3.5px); user-select: none; opacity: .7; }
.diary-zh summary { cursor: pointer; font-size: 13px; color: #8a6a52; } .diary-zh p { margin: 6px 0 0; font-size: 14px; color: #6b5a48; }
.diary-lock { margin: 8px 0 0; font-size: 13.5px; color: #8a6a52; }
.diary-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
.diary-tabs { position: absolute; z-index: 1; left: 100%; top: 34px; display: grid; gap: 6px; justify-items: start; }   /* index stickers sticking out of the right edge; the open one further */
.diary-tabs button { writing-mode: vertical-rl; padding: 10px 6px 10px 4px; border: 0; border-radius: 0 8px 8px 0; font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; color: #3a2c24; cursor: pointer;
  background: #f2b8b0; filter: brightness(calc(.84 + .16 * var(--day, 1))) saturate(.85); box-shadow: inset 3px 0 2px -2px rgba(0, 0, 0, .25); }
.diary-tabs [data-diary="tab-town"] { background: #a9d0e8; } .diary-tabs [data-diary="tab-food"] { background: #f6d77a; }
.diary-tabs button[aria-pressed="true"] { padding-right: 10px; filter: brightness(calc(.86 + .14 * var(--day, 1))); box-shadow: 2px 1px 3px rgba(0, 0, 0, .2); }
.town-book { max-height: min(62vh, 560px); overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; }
.tb-count { margin: -4px 0 0; text-align: center; font-size: 12px; color: #9a8a74; } .tb-intro { margin: 0; font-size: 13px; color: #6b5a48; }
.tb-index { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .tb-who { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border: 1px solid var(--rule); border-radius: 10px; font: inherit; font-size: 11.5px; color: var(--ink); background: var(--card); cursor: pointer; }
.tb-who .tb-face { width: 44px; height: 44px; } .tb-who.blur .tb-face { filter: blur(5px) grayscale(.8); opacity: .65; }
.tb-page { display: grid; gap: 8px; } .tb-top { display: flex; gap: 12px; align-items: center; } .tb-face.big { width: 76px; height: 76px; }
.tb-name { display: grid; gap: 2px; } .tb-name b { font-size: 18px; } .tb-name ruby, .tb-name span { font-size: 12px; color: #9a8a74; }
.tb-bio { margin: 0; font-size: 13.5px; line-height: 1.65; color: #5a4a3a; } .tb-h { margin: 6px 0 0; font-size: 13px; color: #8a6a52; border-bottom: 1px dashed #d9ccb4; padding-bottom: 4px; }
.tb-talk { border: 1px solid var(--rule); border-radius: 10px; background: var(--card); padding: 6px 10px; } .tb-talk summary { cursor: pointer; font-size: 13.5px; font-weight: 600; } .tb-talk summary small { margin-left: 8px; font-weight: 400; color: #9a8a74; }
.tb-lines { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; } .tb-lines li { display: grid; gap: 1px; font-size: 13px; } .tb-lines b { font-size: 11.5px; color: #8a6a52; } .tb-lines span { font-size: 14px; } .tb-lines small { color: #8a7a66; }
.tb-page.blur .tb-top, .tb-page.blur .tb-fog { filter: blur(8px) grayscale(.6); user-select: none; pointer-events: none; } .tb-fog p { margin: 0 0 6px; font-size: 13.5px; } .tb-yet { margin: 4px 0 0; font-size: 13px; color: #9a8a74; text-align: center; }
.tb-person { display: flex; gap: 10px; } .tb-face { flex: none; width: 52px; height: 52px; border-radius: 12px; background: color-mix(in srgb, var(--pp, #fbf6ea) 70%, #d9c7a4); overflow: hidden; } .tb-face svg { width: 100%; height: 100%; }
.tb-body { flex: 1; min-width: 0; font-size: 13.5px; } .tb-body b { font-size: 15px; } .tb-body > span { margin-left: 8px; font-size: 12px; color: #9a8a74; } .tb-body p { margin: 4px 0 0; line-height: 1.6; color: #6b5a48; }
.town-tools { margin-top: 6px; padding-top: 12px; border-top: 1px dashed #d9ccb4; font-size: 13px; } .town-tools .btn { white-space: normal; } .town-tools .btn[aria-pressed="true"] { background: #7a5a3a; color: #fbf6ea; }
.tt-unit { margin-top: 10px; } .tt-unit > span { font-weight: 700; color: #8a6a52; }
.tb-ev { display: flex; justify-content: space-between; width: 100%; margin-top: 6px; padding: 6px 10px; border: 1px solid #d9ccb4; border-radius: 10px; font: inherit; font-size: 13px; color: var(--ink); background: var(--card); cursor: pointer; } .tb-ev small { color: var(--soft); }
.got { position: fixed; inset: 0; z-index: 70; display: grid; grid-template: 100% / 100%; place-items: center; background: rgba(12, 10, 24, .62); cursor: pointer; animation: gotIn .25s ease-out; overflow: hidden; }
.got.out { opacity: 0; transition: opacity .25s; } @keyframes gotIn { from { opacity: 0; } }
.got > * { grid-area: 1 / 1; }   /* (2026-11-10) the one cell the screen's size: a burst wider than a phone grew it from the left edge and set everything off to the right */
.got-burst { width: min(520px, 130vmin); height: min(520px, 130vmin); border-radius: 50%; background: repeating-conic-gradient(rgba(255, 236, 170, .34) 0 10deg, transparent 10deg 24deg); -webkit-mask: radial-gradient(closest-side, #000 30%, transparent); mask: radial-gradient(closest-side, #000 30%, transparent); animation: gotSpin 9s linear infinite, gotBurst .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes gotSpin { to { transform: rotate(360deg); } } @keyframes gotBurst { from { scale: .2; opacity: 0; } }
.got-art { width: 168px; height: 168px; display: grid; place-items: center; border-radius: 28px; background: radial-gradient(closest-side, rgba(255, 248, 225, .95), rgba(255, 240, 200, .5) 70%, transparent); animation: gotPop .6s cubic-bezier(.2, 1.5, .4, 1) .05s backwards, gotFloat 2.4s ease-in-out .7s infinite alternate; }
.got-art > svg { width: 120px; height: 120px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
@keyframes gotPop { from { transform: scale(.2) rotate(-12deg); opacity: 0; } } @keyframes gotFloat { to { transform: translateY(-6px); } }
.got-spark { width: 14px; height: 14px; background: #ffe27a; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: gotSpark 1.6s ease-out var(--w) infinite; }
@keyframes gotSpark { 0% { transform: translate(0, 0) scale(.3); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(var(--x), var(--y)) scale(1.1) rotate(90deg); opacity: 0; } }
.got-text { align-self: end; margin-bottom: 18vh; display: grid; justify-items: center; gap: 4px; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .4); animation: talkIn .4s ease-out .25s backwards; }
.got-text span { font-size: 13px; letter-spacing: .3em; color: #ffe27a; } .got-text b { font-size: 24px; } .got-text small { font-size: 13px; opacity: .85; }
.yard .talk { align-items: flex-start; padding-top: calc(72px + env(safe-area-inset-top, 0px)); }   /* out of doors the people stand low on the screen: the words go up top */
.talk-card { position: relative; display: flex; gap: 12px; align-items: flex-start; width: min(560px, 100%); padding: 14px; border-radius: 16px; background: var(--bg-elev); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .22); animation: talkIn .25s ease-out; }
@keyframes talkIn { from { transform: translateY(14px); opacity: 0; } }
.talk-face { flex: none; width: 76px; height: 76px; border-radius: 14px; background: var(--bg-sunken); overflow: hidden; } .talk-face svg { width: 100%; height: 100%; }
.talk-body { flex: 1; min-width: 0; } .talk-name { font-weight: 800; font-size: 15px; } .talk-name span { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--fg-3); }
.talk-ja { margin: 6px 0 2px; font-size: 18px; line-height: 1.9; } .talk-ja rt { font-size: 10px; color: var(--fg-3); } .talk-zh { margin: 0; font-size: 13.5px; color: var(--fg-2); }
.talk-say { display: inline-flex; vertical-align: middle; padding: 3px; border: 0; background: none; color: var(--accent); cursor: pointer; } .talk-say svg { width: 18px; height: 18px; }
.talk-gift { display: flex; align-items: center; gap: 10px; margin-top: 10px; } .talk-gift .thumb { width: 54px; height: 54px; border-radius: 10px; background: var(--bg-sunken); } .talk-gift b { flex: 1; }
.talk-gloss { margin: 0 0 4px; font-size: 12px; color: var(--accent); } .talk-zh.hide { display: none; }
/* 中文 on a line in Japanese (talks, the cruise, menus, having something): faint and small — the Japanese is the learner's level,
   read first (2026-11-13, the user); full strength under a finger or the keyboard */
.zh-btn { padding: 1px 8px; border: 1px solid var(--line-2); border-radius: 99px; font: inherit; font-size: 11px; line-height: 1.5; color: var(--fg-3); background: none; opacity: .6; cursor: pointer; }
.zh-btn:hover, .zh-btn:focus-visible { opacity: 1; }
.talk-card.asking .talk-name span { font-weight: 600; color: var(--fg-2); }
.talk-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; } .talk-opt { display: flex; align-items: center; gap: 4px; }
.talk-pick { flex: 1; text-align: left; padding: 9px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; font: inherit; font-size: 17px; line-height: 1.8; color: var(--fg); background: var(--bg-elev-2); cursor: pointer; } .talk-pick rt { font-size: 10px; color: var(--fg-3); }
.talk-nw { white-space: nowrap; }   /* a pick's line broken only at its spaces (メニュー、みせて／ください。) */
.talk-pick small { display: block; font-size: 12px; line-height: 1.5; color: var(--fg-3); }   /* a keeper's 點餐／打工／閒聊 (TALK pick): its Chinese, while 中文 is open */
.talk-pick:hover { border-color: var(--accent); } .talk-opt.wrong .talk-pick { opacity: .45; border-style: dashed; cursor: default; } .talk-opt.shake { animation: talkShake .35s; }
@keyframes talkShake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.talk-why { margin: 8px 0 0; font-size: 13px; color: var(--bad, #c0503a); }
.talk-next { position: absolute; right: 14px; bottom: 8px; font-size: 11px; color: var(--fg-3); animation: talkNext 1s ease-in-out infinite alternate; } @keyframes talkNext { to { transform: translateY(3px); } }
.sky .way-btn { position: absolute; left: 50%; width: 64px; height: 44px; margin-left: -32px; pointer-events: auto; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; } .sky .way-btn .tag { top: -8px; }
/* ways one might not find (yWayEdge, 2026-11-19): named always; one near a side slid in to stay whole */
.sky .way-edge { z-index: 9000; } .sky .way-edge .tag { padding-right: 12px; transform: translate(calc(-50% + var(--nx, 0px)), calc(-50% + var(--ny, 0px))); } .sky .way-edge .tag-name { display: inline; }
.sky .way-edge:active .tag { transform: translate(calc(-50% + var(--nx, 0px)), calc(-50% + var(--ny, 0px))) scale(.94); }
.sky .land .lane { fill: color-mix(in srgb, rgba(232, 214, 168, .95) calc(var(--md, var(--day, 1)) * 100%), rgba(150, 160, 230, .07)); }
/* the yard's ground (2026-11-14, a ware of kind ground): 雪地 — the lawn, the hills either side and the far slope white (blue in shade,
   moonlit by night), the path a trodden track, the tufts and the side trails snowed over, no flowers */
.yard.ground-snowfield .yard-land .near { fill: color-mix(in srgb, color-mix(in srgb, #f4f8fc calc(var(--f) * 100%), #e2e8f0) calc(var(--md, var(--day, 1)) * 100%), #2e3666); }
.yard.ground-snowfield .yard-land .far { fill: color-mix(in srgb, color-mix(in srgb, #e6edf6 calc(var(--f) * 100%), #d6dde8) calc(var(--md, var(--day, 1)) * 100%), #252c58); }
.yard.ground-snowfield .yard-land .lane { fill: color-mix(in srgb, rgba(200, 211, 228, .95) calc(var(--md, var(--day, 1)) * 100%), rgba(150, 160, 230, .14)); }
.yard.ground-snowfield .yard-land .lawn { --c: #eaf0f7 !important; --n: #29305e !important; }
.yard.ground-snowfield .yard-land .trail { --c: #c9d3e3 !important; --n: #3a3f6a !important; }
.yard.ground-snowfield .yard-land .fx-tuft { --c: #dde6f1 !important; --n: #2a3262 !important; }
.yard.ground-snowfield .flowers { display: none; }
.sky .house { position: absolute; left: 50%; bottom: 218px; width: 140px; height: 130px; margin-left: -70px; transform: scale(1.15); transform-origin: 50% 100%; }
.sky .house > svg { position: absolute; inset: 0; overflow: visible; }
.sky .house :is(.wall, .chim, .roof, .pane, .door) { transition: fill 3s, opacity 1.5s; } .sky .house :is(.rim, .mull) { transition: stroke 3s; }
.sky .house .wall { fill: color-mix(in srgb, #f1e3c6 calc(var(--md, var(--day, 1)) * 100%), #0c0d25); } .sky .house .chim { fill: color-mix(in srgb, #9a5640 calc(var(--md, var(--day, 1)) * 100%), #0c0d25); } .sky .house .roof { fill: color-mix(in srgb, #b4543c calc(var(--md, var(--day, 1)) * 100%), #11133a); } .sky .house .rim { fill: none; stroke: color-mix(in srgb, rgba(255, 255, 255, .45) calc(var(--md, var(--day, 1)) * 100%), rgba(170, 182, 255, .35)); stroke-width: 1.4; stroke-linejoin: round; }
.sky .house .pane { fill: color-mix(in srgb, #cfe9f8 calc(var(--day) * 100%), #ffcf7a); opacity: calc((.55 + .45 * var(--f)) * (1 - var(--day)) + var(--day)); } .sky .house .mull { stroke: color-mix(in srgb, #ffffff calc(var(--md, var(--day, 1)) * 100%), #0c0d25); stroke-width: 2; }   /* lit by night, the sky in them by day */
.sky .house .door { fill: color-mix(in srgb, #7a4b2e calc(var(--md, var(--day, 1)) * 100%), #15173c); } .sky .house .knob { fill: #ffcf7a; }
/* the cottage's details (2026-11-10): trims, footing and steps, shingles, bricks, shutters, flower boxes, the door's panels, the lamp */
:is(.sky .house, .house-thumb) .trim { fill: color-mix(in srgb, #fbf6ec calc(var(--md, var(--day, 1)) * 100%), #1e2044); } :is(.sky .house, .house-thumb) .siding { fill: none; stroke: color-mix(in srgb, rgba(150, 110, 70, .2) calc(var(--md, var(--day, 1)) * 100%), rgba(0, 0, 0, .3)); stroke-width: .8; }
:is(.sky .house, .house-thumb) .eave { fill: #000; opacity: .09; } :is(.sky .house, .house-thumb) .stone { fill: color-mix(in srgb, #b9b1a3 calc(var(--md, var(--day, 1)) * 100%), #1c1d3e); } :is(.sky .house, .house-thumb) .stone2 { fill: color-mix(in srgb, #a9a193 calc(var(--md, var(--day, 1)) * 100%), #17183a); }
:is(.sky .house, .house-thumb) :is(.brick, .shingle, .panel, .slat) { fill: none; stroke: #000; stroke-opacity: .17; stroke-width: .9; } :is(.sky .house, .house-thumb) .fascia { fill: none; stroke: color-mix(in srgb, #8a3a2a calc(var(--md, var(--day, 1)) * 100%), #0c0d25); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
:is(.sky .house, .house-thumb) .shutter { fill: color-mix(in srgb, #5f8a7a calc(var(--md, var(--day, 1)) * 100%), #141c34); } :is(.sky .house, .house-thumb) .fbox { fill: color-mix(in srgb, #8a5a3a calc(var(--md, var(--day, 1)) * 100%), #1c1838); } :is(.sky .house, .house-thumb) .mat { fill: color-mix(in srgb, #9a6a40 calc(var(--md, var(--day, 1)) * 100%), #1c1838); }
:is(.sky .house, .house-thumb) .leafy { fill: color-mix(in srgb, #5f9a4a calc(var(--md, var(--day, 1)) * 100%), #0e1630); } :is(.sky .house, .house-thumb) .flower { opacity: calc(.3 + .7 * var(--day)); } :is(.sky .house, .house-thumb) .bush { fill: color-mix(in srgb, #5a9a4a calc(var(--md, var(--day, 1)) * 100%), #0c162a); }
:is(.sky .house, .house-thumb) .tread { fill: color-mix(in srgb, #e4ddd0 calc(var(--md, var(--day, 1)) * 100%), #2a2c50); } :is(.sky .house, .house-thumb) .riser { fill: color-mix(in srgb, #a39a8b calc(var(--md, var(--day, 1)) * 100%), #14152e); }
:is(.sky .house, .house-thumb) .stepshade { fill: #2b1c12; opacity: calc(.08 + .12 * var(--day)); } :is(.sky .house, .house-thumb) .sill { stroke: color-mix(in srgb, #8a7a64 calc(var(--md, var(--day, 1)) * 100%), #0c0d25); stroke-width: 1.4; }
:is(.sky .house, .house-thumb) .lamp { fill: color-mix(in srgb, #e8dcb4 calc(var(--day) * 100%), #ffd98a); } :is(.sky .house, .house-thumb) .lampglow { fill: #ffd98a; opacity: calc((1 - var(--day)) * .45); }
.house-thumb :is(.wall) { fill: color-mix(in srgb, #f1e3c6 calc(var(--md, var(--day, 1)) * 100%), #0c0d25); } .house-thumb :is(.roof, .chim) { fill: color-mix(in srgb, #b4543c calc(var(--md, var(--day, 1)) * 100%), #11133a); } .house-thumb .door { fill: color-mix(in srgb, #7a4b2e calc(var(--md, var(--day, 1)) * 100%), #15173c); } .house-thumb .pane { fill: color-mix(in srgb, #cfe9f8 calc(var(--day) * 100%), #ffcf7a); } .house-thumb .mull { stroke: #fff; stroke-width: 2; } .house-thumb .rim { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 1.4; } .house-thumb .knob { fill: #ffcf7a; }
/* 蘑菇屋 (1.2.0): a red cap with white spots over a cream stem; the same pane, door and rim colours as the cottage */
:is(.sky .house, .house-thumb) :is(.m-stem, .m-cap, .m-dot, .m-gill, .m-pipe, .m-shade) { transition: fill 3s; }
:is(.sky .house, .house-thumb) .m-stem { fill: color-mix(in srgb, #f4e8d2 calc(var(--md, var(--day, 1)) * 100%), #0e0f2a); }
:is(.sky .house, .house-thumb) .m-shade { fill: color-mix(in srgb, rgba(150, 110, 70, .22) calc(var(--md, var(--day, 1)) * 100%), rgba(0, 0, 20, .3)); }
:is(.sky .house, .house-thumb) .m-cap { fill: color-mix(in srgb, #d4473a calc(var(--md, var(--day, 1)) * 100%), #2a1838); }
:is(.sky .house, .house-thumb) .m-dot { fill: color-mix(in srgb, #fff8ec calc(var(--md, var(--day, 1)) * 100%), #4a3c66); }
:is(.sky .house, .house-thumb) .m-gill { fill: color-mix(in srgb, #ead6b4 calc(var(--md, var(--day, 1)) * 100%), #15163a); }
:is(.sky .house, .house-thumb) .m-pipe { fill: color-mix(in srgb, #7e6a5a calc(var(--md, var(--day, 1)) * 100%), #0c0d25); }
:is(.sky .house, .house-thumb, .sky .busstop, .sky .land) .hc { fill: color-mix(in srgb, var(--c) calc(var(--md, var(--day, 1)) * 100%), var(--n)); transition: fill 3s; }
:is(.sky .house, .house-thumb, .sky .busstop, .sky .land) .hs { fill: none; stroke: color-mix(in srgb, var(--c) calc(var(--md, var(--day, 1)) * 100%), var(--n)); stroke-linecap: round; stroke-linejoin: round; transition: stroke 3s; }
:is(.sky .house, .house-thumb) .m-grass { fill: none; stroke: color-mix(in srgb, #5f9a4a calc(var(--md, var(--day, 1)) * 100%), #0b0c22); stroke-width: 1.6; stroke-linecap: round; }
.house-thumb :is(.wall, .roof, .chim) { fill: #f1e3c6; } .house-thumb .rim { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 1.4; } .house-thumb .pane { fill: #cfe9f8; } .house-thumb .mull { stroke: #fff; stroke-width: 2; } .house-thumb .door { fill: #7a4b2e; } .house-thumb .knob { fill: #ffcf7a; }
.sky .house .win { position: absolute; border-radius: 50%; opacity: calc((.12 + .88 * var(--f)) * (1 - var(--day))); transition: opacity 1.5s; }   /* the light round each window, warmer as the list fills */
.sky .house .win::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 196, 110, .55), rgba(255, 196, 110, .14) 55%, transparent); animation: flicker 3.2s ease-in-out infinite alternate; }
.sky .house .w1 { left: 13px; top: 61px; width: 60px; height: 60px; } .sky .house .w2 { left: 67px; top: 61px; width: 60px; height: 60px; } .sky .house .w3 { left: 53px; top: 35px; width: 34px; height: 34px; }
.sky .house .w2::after { animation-duration: 4.1s; animation-delay: -1.3s; } .sky .house .w3::after { animation-duration: 2.7s; animation-delay: -.6s; }
@keyframes flicker { 0% { opacity: .78; } 45% { opacity: 1; } 60% { opacity: .86; } 100% { opacity: .96; } }
.sky .house .spill { position: absolute; left: -40px; right: -40px; bottom: -18px; height: 40px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 190, 100, .22), transparent); opacity: calc(var(--f) * (1 - var(--day))); transition: opacity 1.5s; }
.sky .house .smoke { position: absolute; left: 91px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, rgba(255, 255, 255, .8) calc(var(--md, var(--day, 1)) * 100%), rgba(196, 202, 236, .5)), transparent); opacity: 0; animation: smoke 6s ease-out infinite; }
.sky .house .smoke + .smoke { animation-delay: -2s; } .sky .house .smoke + .smoke + .smoke { animation-delay: -4s; }
@keyframes smoke { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 15% { opacity: .75; } 100% { transform: translate(16px, -64px) scale(2.8); opacity: 0; } }
.sky .flies { position: absolute; left: 0; right: 0; bottom: 130px; height: 190px; opacity: calc(clamp(0, (var(--f) - .5) / .25, 1) * (1 - var(--day))); transition: opacity 1.5s; }
.sky .flies i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #e9ff9c; box-shadow: 0 0 6px 2px rgba(214, 255, 120, .55); animation: fly var(--d) ease-in-out var(--w) infinite alternate, blink 2.4s ease-in-out var(--w) infinite alternate; }
@keyframes fly { from { transform: translate(0, 0); } 50% { transform: translate(var(--dx), var(--dy)); } to { transform: translate(calc(var(--dx) * -.6), calc(var(--dy) * .5)); } }
@keyframes blink { from { opacity: .15; } to { opacity: 1; } }
.sky .flowers { position: absolute; left: 0; right: 0; bottom: 0; height: 240px; opacity: calc(var(--day) * clamp(0, (var(--f) - .5) / .15, 1)); transition: opacity 2s; }
.sky .fl { position: absolute; width: 2px; height: 13px; border-radius: 1px; background: #3d7f3f; transform-origin: 50% 100%; animation: sway var(--d) ease-in-out var(--w) infinite alternate; }
.sky .fl::after { content: ''; position: absolute; left: -4px; top: -8px; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle, #ffe27a 0 26%, var(--c) 30%); }
@keyframes sway { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
.sky .butterflies { position: absolute; left: 0; right: 0; bottom: 140px; height: 120px; opacity: calc(var(--day) * clamp(0, (var(--f) - .5) / .15, 1)); transition: opacity 2s; }
.sky .bf { position: absolute; width: 12px; height: 10px; animation: flutter var(--d) ease-in-out var(--w) infinite alternate; }
.sky .bf::before, .sky .bf::after { content: ''; position: absolute; top: 0; width: 6px; height: 9px; border-radius: 60% 60% 50% 50%; background: var(--c); animation: wing .22s ease-in-out infinite alternate; }
.sky .bf::before { left: 0; transform-origin: 100% 50%; } .sky .bf::after { right: 0; transform-origin: 0 50%; }
@keyframes wing { from { transform: scaleX(1); } to { transform: scaleX(.25); } }
@keyframes flutter { 0% { transform: translate(0, 0); } 25% { transform: translate(var(--dx), calc(var(--dy) * -1)); } 50% { transform: translate(calc(var(--dx) * 1.6), var(--dy)); } 75% { transform: translate(calc(var(--dx) * .6), calc(var(--dy) * -1.4)); } 100% { transform: translate(calc(var(--dx) * -.4), 0); } }
/* the page opens: the sky comes out with the energy (each star at its share of the way), then the rest */
@keyframes skyFade { from { opacity: 0; } }
.yard.anim .st.on { animation: skyFade 1s ease-out var(--in) backwards; }
.yard.anim :is(.nebula, .clouds) { animation: skyFade 1.2s ease-out .3s backwards; }
.yard.anim :is(.pane, .win, .spill, .flowers, .butterflies) { animation: skyFade 1.2s ease-out .4s backwards; }
.yard.anim :is(.aurora, .meteors, .flies, .birds) { animation: skyFade 1.4s ease-out .7s backwards; }
.yard.anim :is(.dipper, .rainbow) { animation: skyFade 1.5s ease-out 1.2s backwards; }
/* 書房: an isometric room (ROOM), drawn much bigger than the screen — x along the right wall, y along the left wall, z up, the
   back corner at 0. A phone sees a part of it round the hero and the camera goes with him as he walks; a swipe looks round freely,
   two fingers zoom from the whole room (where a wide screen starts) to twice as close. Every colour in the drawing is worked out per face: its daylight
   colour, mixed by --day with two night versions (the lamps dim, and bright when today's list is done) mixed by --f. Moving parts
   are HTML overlays so the big drawing never repaints. */
.study { position: relative; height: 100vh; height: 100dvh; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none;
  background: radial-gradient(circle at 7% 9%, rgba(255, 255, 255, 0.90) 0 1.0px, transparent 1.7px), radial-gradient(circle at 19% 4%, rgba(255, 255, 255, 0.82) 0 0.8px, transparent 1.5px), radial-gradient(circle at 31% 14%, rgba(255, 255, 255, 0.78) 0 0.7px, transparent 1.4px), radial-gradient(circle at 44% 6%, rgba(255, 255, 255, 0.90) 0 1.0px, transparent 1.7px), radial-gradient(circle at 58% 11%, rgba(255, 255, 255, 0.82) 0 0.8px, transparent 1.5px), radial-gradient(circle at 71% 4%, rgba(255, 255, 255, 0.86) 0 0.9px, transparent 1.6px), radial-gradient(circle at 86% 9%, rgba(255, 255, 255, 0.90) 0 1.0px, transparent 1.7px), radial-gradient(circle at 94% 21%, rgba(255, 255, 255, 0.78) 0 0.7px, transparent 1.4px), radial-gradient(circle at 12% 27%, rgba(255, 255, 255, 0.78) 0 0.7px, transparent 1.4px), radial-gradient(circle at 63% 24%, rgba(255, 255, 255, 0.74) 0 0.6px, transparent 1.3px), radial-gradient(circle at 80% 31%, rgba(255, 255, 255, 0.82) 0 0.8px, transparent 1.5px), radial-gradient(circle at 4% 46%, rgba(255, 255, 255, 0.78) 0 0.7px, transparent 1.4px), radial-gradient(circle at 96% 52%, rgba(255, 255, 255, 0.82) 0 0.8px, transparent 1.5px), radial-gradient(circle at 9% 78%, rgba(255, 255, 255, 0.78) 0 0.7px, transparent 1.4px), radial-gradient(circle at 91% 84%, rgba(255, 255, 255, 0.86) 0 0.9px, transparent 1.6px), radial-gradient(circle at 22% 92%, rgba(255, 255, 255, 0.74) 0 0.6px, transparent 1.3px), radial-gradient(circle at 76% 95%, rgba(255, 255, 255, 0.78) 0 0.7px, transparent 1.4px), radial-gradient(130% 75% at 50% 100%, #2c3a7a, #18214f 45%, #0c1233); }   /* by night the yard's deep blue (2026-11-10) */
/* round the room (a block cut open, 1.2.0): the yard's sky — its night with a few stars, and over it by day its grey that turns
   blue as the day's list fills (dawn and dusk: .warm-wash) */
.study::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: var(--day);
  background: linear-gradient(color-mix(in srgb, #3d8cdb calc((.15 + .85 * var(--f)) * 100%), #93a3b3), color-mix(in srgb, #8bc5ef calc((.15 + .85 * var(--f)) * 100%), #c6d0d8) 58%, color-mix(in srgb, #e0f2fb calc((.15 + .85 * var(--f)) * 100%), #e2e7eb)); }
.room-wrap { position: absolute; inset: 0; }   /* walking in and out zooms this, round the middle of the screen */
.room { position: absolute; left: 0; top: 0; transform-origin: 0 0; }   /* sized and slid by the camera (ROOM.place); scaled as well while two fingers zoom, sized again when they let go */
.room.glide { transition: transform .45s cubic-bezier(.2, .8, .25, 1); } .room.glide.soft { transition: transform .7s cubic-bezier(.45, 0, .55, 1); }   /* the hero stopped: put in the middle slow in, slow out */
.room > * { position: absolute; }
.room .art { left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
:is(.room, svg.thumb) .hl { fill: none; stroke: color-mix(in srgb, rgba(255, 255, 255, .22) calc(var(--day) * 100%), rgba(255, 214, 170, .1)); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }   /* the lit edges */
:is(.room, svg.thumb) .ln { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
:is(.room, svg.thumb) .day-only { opacity: var(--day); } :is(.room, svg.thumb) .night-only { opacity: calc(1 - var(--day)); } .room .wp { opacity: calc(.18 + .82 * var(--day)); }   /* wp: the wallpaper's stripes, faint by night */
/* the window: the sky at this hour behind the glass, on the slant of the right wall */
.w-sky { overflow: hidden; transform-origin: 0 0; transform: matrix(1, .5, 0, 1, 0, 0); background: linear-gradient(#0b0c26, #232056); }
.w-sky.l { transform: matrix(1, -.5, 0, 1, 0, 0); }   /* a window moved to the left wall (1.2.0) */
.room svg.art .win-patch { display: none; }   /* the wall whole while the window is dragged */
.w-sky > *, .w-sky :is(.w-moon, .w-star, .w-cloud) { position: absolute; }
.w-sky .wt-day { inset: 0; background: linear-gradient(#5aa3e6, #bfe2f6); opacity: var(--day); }
.w-sky .wt-warm { inset: 0; background: linear-gradient(to top, #ffb36b, #ff8a7a 35%, rgba(150, 96, 200, .45) 70%, transparent); opacity: var(--warm); }
.w-sky .w-night { inset: 0; opacity: calc(1 - var(--day)); } .w-sky .w-day { inset: 0; opacity: var(--day); }
.w-sky .w-moon { left: 58%; top: 14%; width: 20%; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 5px -2px 0 0 #f6f1e0; transform: rotate(-20deg); }
.w-sky .w-star { width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: var(--o); }
.w-sky .w-cloud { left: -56%; width: 46%; height: 10%; border-radius: 99px; background: rgba(255, 255, 255, .95); animation: wcloud var(--d) steps(160) var(--w) infinite; }   /* left, in small steps: no layer of its own */
.w-sky .w-cloud::before { content: ''; position: absolute; left: 22%; top: -70%; width: 42%; height: 150%; border-radius: 50%; background: inherit; }
@keyframes wcloud { from { left: -56%; } to { left: 106%; } }
.w-sky .w-hills { left: -10%; right: -10%; bottom: -8%; height: 30%; border-radius: 50% 50% 0 0; background: color-mix(in srgb, #8cc47e calc(var(--day) * 100%), #141640); }
.w-sky .w-hills2 { left: 30%; right: -30%; bottom: -12%; height: 34%; border-radius: 50% 50% 0 0; background: color-mix(in srgb, #74b06a calc(var(--day) * 100%), #10122f); }
/* the clock tells the time (sceneTick's --hh／--mm; the second hand runs on its own from the second the room was drawn) */
.room .clock-hands { transform-origin: 0 0; transform: matrix(1, -.5, 0, 1, 0, 0); } .room .clock-hands.on-r { transform: matrix(1, .5, 0, 1, 0, 0); }
.clock-hands i { position: absolute; left: 50%; bottom: 50%; border-radius: 2px; transform-origin: 50% 100%; background: color-mix(in srgb, #3a2a20 calc(var(--lit) * 100%), #d8dcff); transition: background-color .4s; }
.clock-hands .hh { width: 2.5px; height: 26%; margin-left: -1.25px; transform: rotate(var(--hh)); }
.clock-hands .mm { width: 1.6px; height: 36%; margin-left: -.8px; transform: rotate(var(--mm)); }
.clock-hands .ss { width: 1px; height: 38%; margin-left: -.5px; background: #e0524b; animation: tick 60s steps(60) var(--ssd) infinite; }
@keyframes tick { to { transform: rotate(360deg); } }
/* lights: the desk lamp warms the room as today's list fills (most of it by night), the lamp on the chest of drawers glows by
   night; the string of bulbs lights up bulb by bulb as the list fills (by night) */
.room .glow { border-radius: 50%; pointer-events: none; }
.room .lamp-glow { opacity: calc((.18 + .82 * var(--f)) * (1 - .75 * var(--day))); background: radial-gradient(closest-side, rgba(255, 214, 150, .62), rgba(255, 196, 120, .22) 45%, transparent); transition: opacity 1.5s; }
.room .lamp-glow.lamp2 { opacity: calc(.5 * (1 - .8 * var(--day))); }
.room .bulb { width: 5px; height: 6px; margin: -1px 0 0 -2.5px; border-radius: 45% 45% 50% 50%; background: color-mix(in srgb, rgba(255, 252, 240, .9) calc(var(--day) * 100%), rgba(120, 110, 150, .9)); }
.room .bulb.on { background: color-mix(in srgb, rgba(255, 252, 240, .95) calc(var(--day) * 100%), #ffe0a0); box-shadow: 0 0 calc((1 - var(--day)) * 9px) calc((1 - var(--day)) * 2px) rgba(255, 200, 110, .75); }
.room .bulb:nth-child(3n + 1).on { box-shadow: 0 0 calc((1 - var(--day)) * 9px) calc((1 - var(--day)) * 2px) rgba(255, 150, 140, .7); }
.room .bulb:nth-child(3n + 2).on { box-shadow: 0 0 calc((1 - var(--day)) * 9px) calc((1 - var(--day)) * 2px) rgba(160, 220, 255, .7); }
/* the notebook glows while questions wait; notes rise from the headphones; steam from the tea */
.room .note-glow { pointer-events: none; transition: opacity 1s, transform .4s ease-in; }
.room .note-glow::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 246, 205, .8), rgba(255, 236, 170, .3) 55%, transparent); animation: notePulse 2.6s ease-in-out infinite alternate; }
@keyframes notePulse { from { opacity: .5; transform: scale(.94); } to { opacity: 1; transform: scale(1.06); } }
.study.full .note-glow { opacity: .3; }   /* the day's list done: a quiet glow (a tap still gives 多學) */
.study.diving .note-glow { opacity: 1; transform: scale(1.7); }
.room .tune { pointer-events: none; } .study:not(.music) .tune.gramo, .study.edit .tune.gramo { display: none; }
/* test (2026-11-09): the gramophone's records */
.rec-list { display: grid; gap: 8px; } .rec { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elev); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rec.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; } .rec-disc { width: 48px; height: 48px; flex: none; } .rec-disc.on { animation: recSpin 2.4s linear infinite; }
@keyframes recSpin { to { transform: rotate(360deg); } }
.rec-text { display: grid; gap: 2px; flex: 1; min-width: 0; } .rec-name { font-size: 17px; font-weight: 700; } .rec-name rt { font-size: 10px; font-weight: 400; color: var(--fg-3); }
.rec-now { font-size: 12px; color: var(--accent); white-space: nowrap; }
.room .tune i { position: absolute; left: 50%; bottom: 0; font-style: normal; font-size: 15px; font-weight: 700; line-height: 1; opacity: 0; color: color-mix(in srgb, #5a6cf0 calc(var(--day) * 100%), #c9d0ff); text-shadow: 0 1px 0 rgba(255, 255, 255, .6); animation: tune 3.6s ease-out var(--w) infinite; }
@keyframes tune { 0% { transform: translate(0, 34px) rotate(-8deg); opacity: 0; } 18% { opacity: 1; } 100% { transform: translate(var(--dx), -10px) rotate(10deg); opacity: 0; } }
.room .steam { pointer-events: none; }
.room .steam i { position: absolute; left: 30%; bottom: 0; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, rgba(255, 255, 255, .95) calc(var(--day) * 100%), rgba(230, 232, 255, .6)), transparent); opacity: 0; animation: steam 3.4s ease-out var(--w) infinite; }
@keyframes steam { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 30% { opacity: .85; } 100% { transform: translate(4px, -20px) scale(1.7); opacity: 0; } }
.study > .warm-wash { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(160deg, rgba(255, 170, 110, .22), rgba(255, 130, 90, .1)); opacity: var(--warm); }   /* dawn and dusk, over the screen */
/* layers in the room, so nothing swaps places while the camera slides (iPhone Safari did, with the window's sky): nothing under the
   big drawing has a layer of its own — the sky behind the window paints with the room — and every overlay above it that moves, or
   is drawn over one that moves, has one (the lamps' light, the glows and notes, the drawer, the tags), in page order */
.room .lamp-glow { will-change: opacity; }
.study .thing { will-change: transform; }
/* the top drawer of the chest slides out before 錯題本 opens (ROOM.pull) */
.room .drawer-fx { display: none; overflow: visible; pointer-events: none; will-change: transform; }
.study.drawer-pull .drawer-fx { display: block; }
.study.drawer-pull .dw-slide { animation: drawerOut .42s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes drawerOut { from { transform: translate(var(--dwx), var(--dwy)); } }
/* tapping a thing (ROOM.enter): its own small motion first — the newest course book slides out, a card hops out of the card box, the
   headphones are picked up off the desk, the calendar's page drops away, the door swings open (ROOM.door) — then the room zooms into it as it
   fades and the page eases in; back in 書房 the room zooms out of the thing you left by. Each moving part is a small drawing of its
   own (.fx), hidden until its thing is tapped; the headphones always are one. */
.room .fx { display: none; overflow: visible; pointer-events: none; will-change: transform; }
.room .fx-phones, .study.fx-shelf .fx-book, .study.fx-cards .fx-card, .study.fx-calendar .fx-page, .study.fx-door .fx-door.on { display: block; }
.study.fx-shelf .fx-book .mv { animation: fxOut .34s cubic-bezier(.2, .8, .3, 1) both; }
.study.fx-cards .fx-card .mv { animation: fxHop .44s cubic-bezier(.3, .7, .3, 1) both; }
.study.fx-phones .fx-phones .mv { animation: fxLift .34s cubic-bezier(.2, .8, .3, 1) both; }
.study.fx-calendar .fx-page .mv { animation: fxDrop .42s cubic-bezier(.5, 0, .8, .5) both; }
@keyframes fxOut { from { transform: translate(var(--fx), var(--fy)); } }
@keyframes fxHop { 0% { transform: translate(var(--fx), var(--fy)); } 40% { transform: translate(var(--ux), var(--uy)); } 100% { transform: none; } }
@keyframes fxLift { to { transform: translateY(-18px); } }
@keyframes fxDrop { to { transform: translate(var(--fx), var(--fy)); opacity: 0; } }
.study.fx-phones .tune i { animation-duration: 1.1s; }
.thing.picked::before { opacity: .45; }
.study.zoom .room-wrap { transform: scale(1.6); opacity: 0; transition: transform .32s cubic-bezier(.55, 0, .8, .4), opacity .3s ease-in; }
.study.zoom :is(.room-hint, .study-tools, .mail-hint) { opacity: 0; transition: opacity .2s; }
@keyframes roomBack { from { opacity: 0; transform: scale(1.5); } }
.study.anim.back .room-wrap { animation: roomBack .45s cubic-bezier(.2, .7, .3, 1) backwards; }
#view.page-in { animation: pageIn .3s ease-out both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
/* how to lead the hero, until he has been led once (and again on a tap on him till then) */
.room-hint { position: absolute; z-index: 3; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); padding: 6px 12px; border-radius: 99px; font-size: 12px; white-space: nowrap; color: #fff; background: rgba(20, 22, 44, .8); pointer-events: none; opacity: 0; transition: opacity .3s; }
.room-hint.on { opacity: 1; }
.study-tools { position: absolute; z-index: 2; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; display: flex; gap: 8px; }
.study-koto { height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 9px; border: 0; border-radius: 12px; font: inherit; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer;
  color: color-mix(in srgb, #3a3350 calc(var(--lit) * 100%), #f2e6c4); background: color-mix(in srgb, rgba(255, 255, 255, .55) calc(var(--lit) * 100%), rgba(20, 22, 52, .55)); transition: color .4s, background-color .4s, opacity .4s, box-shadow .4s; }
.study-koto :is(.koto-i, .yen-i) { width: 22px; height: 22px; }
:is(.study-edit, .study-wear) { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; cursor: pointer;
  color: color-mix(in srgb, #3a3350 calc(var(--lit) * 100%), #dfe3ff); background: color-mix(in srgb, rgba(255, 255, 255, .55) calc(var(--lit) * 100%), rgba(20, 22, 52, .55)); transition: color .4s, background-color .4s, opacity .4s; }
:is(.study-edit, .study-wear) svg { width: 22px; height: 22px; }
/* the hero (1.2.0): a box of its own over the room; the parts move by pose (walk, run, sit, reach, crouch, look, out), now and
   then on their own (idle-…: HERO.idle) and when tapped (hop, wave, spin, cheer: HERO.react) */
:is(.study, .yard) .hero { position: absolute; pointer-events: none; will-change: transform; transition: opacity .3s; }
:is(.study, .yard) .hero svg { width: 100%; height: 100%; display: block; overflow: visible; }
:is(.study, .yard) .hero .fig { pointer-events: auto; cursor: pointer; transform-box: view-box; transform-origin: 0 0; }
:is(.study, .yard) .hero.flip .fig { transform: scaleX(-1); }
:is(.study, .yard) .hero :is(.f-back, .f-front3, .f-back3) { display: none; } :is(.study, .yard) .hero:is(.back, .turn) .f-front { display: none; }   /* four views: facing us or from behind, straight or a little turned (.turn; .flip mirrors it) */
:is(.study, .yard) .hero.turn:not(.back) .f-front3, :is(.study, .yard) .hero.back:not(.turn) .f-back, :is(.study, .yard) .hero.back.turn .f-back3 { display: inline; }
:is(.study, .yard) .hero :is(.bob, .leg, .arm, .head, .eyes) { transform-box: view-box; }
:is(.study, .yard) .hero .bob { animation: heroBreathe 3.2s ease-in-out infinite; }
.stall-keeper .bob { transform-box: view-box; animation: heroBreathe 3.2s ease-in-out calc(var(--k, 0) * -.7s) infinite; }   /* the 緣日's keepers, behind their counters */
:is(.study, .yard) .hero .eyes { transform-origin: 2px -117px; animation: heroBlink 4.6s infinite; }
:is(.study, .yard) .hero .leg.l { transform-origin: -7px -27px; } :is(.study, .yard) .hero .leg.r { transform-origin: 11px -27px; }   /* the Q版 body (test): hips, shoulders, neck */
:is(.study, .yard) .hero .arm.l { transform-origin: -11.5px -63.5px; } :is(.study, .yard) .hero .arm.r { transform-origin: 15.5px -63.5px; transition: transform .25s; }
:is(.study, .yard) .hero .head { transform-origin: 2px -64px; transition: transform .25s; }
:is(.study, .yard) .hero:is(.walk, .run) .leg.l { animation: heroLeg var(--step, .42s) ease-in-out infinite alternate; } :is(.study, .yard) .hero:is(.walk, .run) .leg.r { animation: heroLeg var(--step, .42s) ease-in-out infinite alternate-reverse; }
:is(.study, .yard) .hero:is(.walk, .run) .arm.l { animation: heroArm var(--step, .42s) ease-in-out infinite alternate-reverse; } :is(.study, .yard) .hero:is(.walk, .run) .arm.r { animation: heroArm var(--step, .42s) ease-in-out infinite alternate; }
:is(.study, .yard) .hero:is(.walk, .run) .bob { animation: heroStep calc(var(--step, .42s) / 2) ease-in-out infinite alternate; }
:is(.study, .yard) .hero.walk { --lean: 2deg; } :is(.study, .yard) .hero.run { --step: .28s; --lean: 4deg; }   /* leaning into the way they go (.flip mirrors it) */
:is(.study, .yard) .hero.sit .bob { animation: none; transform: translateY(-43px); } :is(.study, .yard) .hero.sit .legs { display: none; }
:is(.study, .yard) .hero.reach .arm.r { transform: rotate(-88deg); } :is(.study, .yard) .hero.look .head { transform: translateY(-2px) rotate(-6deg); }
:is(.study, .yard) .hero.crouch .bob { animation: none; transform: translateY(10px) scaleY(.92); } :is(.study, .yard) .hero.crouch .arm.r { transform: rotate(-60deg); }
:is(.study, .yard) .hero.out { opacity: 0; }
/* test (2026-11-09): on the sofa, feet swinging over the edge; kneeling at the kotatsu, the legs folded under */
:is(.study, .yard) .hero.sofa .bob { animation: none; transform: translateY(-22px); } :is(.study, .yard) .hero.sofa .leg.l { animation: heroSwing 1.3s ease-in-out infinite alternate; } :is(.study, .yard) .hero.sofa .leg.r { animation: heroSwing 1.3s ease-in-out -.65s infinite alternate; }
@keyframes heroSwing { from { transform: rotate(-12deg); } to { transform: rotate(10deg); } }
:is(.study, .yard) .hero.kneel .bob { animation: none; transform: translateY(20px); } :is(.study, .yard) .hero.kneel .legs { display: none; }
:is(.study, .yard) .hero.sofa .h-shadow { display: none; }   /* up on the cushion */
/* test (2026-11-09): asleep on the bed — laid along it (feet at the hero's spot, the head toward the pillow), eyes shut, z z Z */
:is(.study, .yard) .hero.sleep .bob { animation: heroSleep 3.2s ease-in-out infinite; transform-origin: 0 0; transform: translateY(-54px) rotate(63deg); } :is(.study, .yard) .hero.sleep .h-shadow { display: none; }
@keyframes heroSleep { 50% { transform: translateY(-55.5px) rotate(63deg); } }
:is(.study, .yard) .hero.sleep .eyes { animation: none; transform: scaleY(.1); }
.study .hero.sleep::after { content: 'z'; position: absolute; left: 118%; top: 2%; font: 700 15px/1 system-ui, sans-serif; color: #8fa4d8; text-shadow: 9px -9px 0 rgba(143, 164, 216, .75), 18px -20px 0 rgba(143, 164, 216, .5); animation: heroZzz 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes heroZzz { 0% { transform: translate(0, 6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(6px, -10px); opacity: 0; } }
/* watering a plant: a can tips over it, drops fall, the plant sways */
.study .watering { position: absolute; pointer-events: none; } .study .watering svg { width: 100%; height: 100%; overflow: visible; }
.study .watering .can { transform-box: fill-box; transform-origin: 30% 70%; animation: canTip 1.9s ease-in-out forwards; }
@keyframes canTip { 0% { transform: rotate(0) translateY(6px); opacity: 0; } 15% { opacity: 1; transform: rotate(0); } 35%, 80% { transform: rotate(32deg); opacity: 1; } 100% { transform: rotate(0) translateY(-4px); opacity: 0; } }
.study .watering .drop { opacity: 0; animation: dropFall .5s ease-in infinite; animation-delay: var(--w); } .study .watering .drops { animation: dropsOn 1.9s linear forwards; }
@keyframes dropFall { 0% { transform: translate(0, 0); opacity: .9; } 100% { transform: translate(4px, 30px); opacity: 0; } }
@keyframes dropsOn { 0%, 30% { opacity: 0; } 34%, 80% { opacity: 1; } 84%, 100% { opacity: 0; } }
.study .watering .spark { opacity: 0; animation: sparkUp 1s ease-out 1.5s forwards; } .study .watering .spark:nth-child(2) { animation-delay: 1.65s; } .study .watering .spark:nth-child(3) { animation-delay: 1.8s; }
@keyframes sparkUp { 0% { transform: translateY(6px) scale(.5); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-12px) scale(1); opacity: 0; } }
.room svg.art g.joy { transform-box: fill-box; transform-origin: 50% 100%; animation: plantJoy .7s ease-in-out 1.6s 2; }
@keyframes plantJoy { 25% { transform: rotate(-3deg) scaleY(1.03); } 75% { transform: rotate(3deg) scaleY(1.03); } }
:is(.study, .yard) .hero.hop:not(.sit, .sofa, .kneel) .bob { animation: heroHop .5s cubic-bezier(.3, .7, .4, 1); }
:is(.study, .yard) .hero.idle-look .head { animation: heroLookRound 1.8s ease-in-out; } :is(.study, .yard) .hero.idle-nod .head { animation: heroNod 1.6s ease-in-out; }
:is(.study, .yard) .hero:is(.idle-stretch, .cheer) .arm.l { animation: heroUpL 1.6s ease-in-out; } :is(.study, .yard) .hero:is(.idle-stretch, .cheer) .arm.r { animation: heroUpR 1.6s ease-in-out; } :is(.study, .yard) .hero.idle-stretch .bob { animation: heroTall 1.6s ease-in-out; }
:is(.study, .yard) .hero.cheer :is(.arm.l, .arm.r) { animation-duration: .9s; } :is(.study, .yard) .hero.cheer:not(.sit, .sofa, .kneel) .bob { animation: heroHop .5s cubic-bezier(.3, .7, .4, 1) .15s; }
:is(.study, .yard) .hero:is(.idle-wave, .wave) .arm.r { animation: heroWave 1.5s ease-in-out; } :is(.study, .yard) .hero.wave .arm.r { animation-duration: 1.2s; }
:is(.study, .yard) .hero.idle-sway .bob { animation: heroSway 2.2s ease-in-out; } :is(.study, .yard) .hero.idle-bounce .bob { animation: heroBounce .9s ease-in-out; }
:is(.study, .yard) .hero .tail { transform-box: view-box; animation: heroTail 2.8s ease-in-out infinite; } :is(.study, .yard) .hero .tail.t0 { transform-origin: 18px -31px; } :is(.study, .yard) .hero .tail.t1 { transform-origin: 2px -30px; }
:is(.study, .yard) .hero.idle-maneki .arm.r { animation: heroManeki 1.8s ease-in-out; } :is(.study, .yard) .hero.idle-maneki .head { animation: heroTilt 1.8s ease-in-out; }
:is(.study, .yard) .hero .nya { position: absolute; left: 60%; top: -4%; padding: 1px 8px 2px; border-radius: 10px; font-style: normal; font-weight: 700; font-size: 13px; line-height: 1.5; white-space: nowrap; color: #3b3428; background: #fffdf6; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); pointer-events: none; animation: heroNya 1.4s ease-out forwards; }
@keyframes heroBreathe { 50% { transform: translateY(-1.5px); } }
@keyframes heroBlink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes heroLeg { from { transform: rotate(22deg); } to { transform: rotate(-22deg); } }
@keyframes heroArm { from { transform: rotate(12deg); } to { transform: rotate(-12deg); } }   /* a small swing: the Q版 arms are short */
@keyframes heroStep { from { transform: rotate(var(--lean, 0deg)); } to { transform: translateY(-3px) rotate(var(--lean, 0deg)); } }
@keyframes heroHop { 40% { transform: translateY(-16px); } 75% { transform: translateY(1px) scaleY(.97); } }
@keyframes heroLookRound { 25% { transform: rotate(-7deg); } 65% { transform: rotate(7deg); } }
@keyframes heroNod { 30%, 70% { transform: rotate(6deg) translateY(1px); } 50% { transform: none; } }
@keyframes heroUpL { 30%, 70% { transform: rotate(74deg); } }
@keyframes heroUpR { 30%, 70% { transform: rotate(-74deg); } }   /* arms out to the sides, under the chin: the big head hides any higher */
@keyframes heroTall { 30%, 70% { transform: translateY(-3px) scaleY(1.03); } }
@keyframes heroWave { 15%, 45%, 75% { transform: rotate(-80deg); } 30%, 60% { transform: rotate(-58deg); } }
@keyframes heroSway { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
@keyframes heroBounce { 25%, 75% { transform: translateY(-6px); } 50% { transform: none; } }
@keyframes heroTail { 50% { transform: rotate(8deg); } }
@keyframes heroManeki { 15%, 45%, 75% { transform: rotate(-76deg); } 30%, 60% { transform: rotate(-54deg); } }
@keyframes heroTilt { 20%, 80% { transform: rotate(5deg); } }
@keyframes heroNya { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 15% { opacity: 1; transform: none; } 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }
.study .front { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; will-change: transform; }
.study.edit :is(.hero, .front) { display: none; }
/* the dressing room (1.2.0): the 衣櫃 button zooms in on the hero — the room grows round them and dims, a big copy of them flies
   up to the stage (DRESS: the head for the face's tabs, all of them for clothes) and the panel slides in, from the right on a wide
   screen. A tap on one of the choices shows it on them at once. */
.study .room-wrap { transition: transform .5s cubic-bezier(.2, .8, .25, 1); }
.study.dressing .room-wrap { transform: scale(1.5); transform-origin: var(--zx, 50%) var(--zy, 50%); }
.study:is(.dressing, .undressing) .room .hero, .study.dressing :is(.study-tools, .room-hint, .mail-hint, .thing) { visibility: hidden; }
.yard .sky { transition: transform .5s cubic-bezier(.2, .8, .25, 1); }   /* the dressing room out in the yard (1.2.0) */
.yard.dressing .sky { transform: scale(1.5); transform-origin: var(--zx, 50%) var(--zy, 50%); }
.yard:is(.dressing, .undressing) .sky .yhero, .yard.dressing :is(.yard-tools, .sky .thing) { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .study .room-wrap, .dress .dress-hero.fly, .dress-panel { transition: none; } }
.dress { position: absolute; inset: 0; z-index: 6; --panel-h: min(50%, 440px); --panel-w: 0px; }
.dress-dim { position: absolute; inset: 0; opacity: 0; transition: opacity .45s; background: radial-gradient(closest-side at var(--spx, 50%) var(--spy, 30%), rgba(255, 246, 226, .5), rgba(255, 246, 226, 0)), rgba(16, 18, 38, .66); }
.dress.on .dress-dim { opacity: 1; }
.dress .dress-hero { left: 0; top: 0; width: 120px; height: 210px; transform-origin: 0 0; }
.dress .dress-hero .fig { cursor: pointer; }
.dress .dress-hero.fly { transition: transform .5s cubic-bezier(.2, .8, .25, 1); }
.dress-bar { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 12px; right: calc(var(--panel-w) + 12px); display: flex; align-items: center; justify-content: space-between; gap: 8px; opacity: 0; transition: opacity .3s .2s; }
.dress.on .dress-bar { opacity: 1; }
.dress-bar .t { font-weight: 700; font-size: 15px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.dress-bar button { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; border: 0; border-radius: 99px; font: inherit; font-size: 13.5px; font-weight: 700; color: #fff; background: rgba(20, 22, 44, .62); cursor: pointer; }
.dress-bar .ok { background: #5a6cf0; box-shadow: 0 4px 14px rgba(70, 90, 230, .4); }
.dress-tools { position: absolute; right: calc(var(--panel-w) + 10px); bottom: calc(var(--panel-h) + 12px); display: flex; flex-direction: column; gap: 8px; opacity: 0; transition: opacity .3s .2s; }   /* 隨機 and 轉身, round, at the stage's edge */
.dress.on .dress-tools { opacity: 1; }
.dress-tools button { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(20, 22, 44, .62); cursor: pointer; }
.dress-tools svg { width: 20px; height: 20px; }
.dress-panel { position: absolute; left: 0; right: 0; bottom: 0; height: var(--panel-h); display: flex; flex-direction: column; border-radius: 18px 18px 0 0; color: var(--fg); background: var(--bg-elev); box-shadow: 0 -8px 30px rgba(0, 0, 0, .28); transform: translateY(102%); transition: transform .45s cubic-bezier(.2, .8, .25, 1); }
.dress.on .dress-panel { transform: none; }
@media (min-width: 760px) and (min-aspect-ratio: 1/1) {
  .dress { --panel-h: 0px; --panel-w: 380px; }
  .dress-panel { left: auto; top: 0; width: var(--panel-w); height: auto; border-radius: 18px 0 0 18px; transform: translateX(102%); }
}
.dress-tabs { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 12px 12px 6px; scrollbar-width: none; }
.dress-tabs button { flex: none; padding: 7px 13px; border: 0; border-radius: 99px; font: inherit; font-size: 13px; font-weight: 600; color: var(--fg-2); background: var(--bg-elev-2); cursor: pointer; }
.dress-tabs button[aria-pressed="true"] { color: var(--accent-fg); background: var(--accent); }
.dress-tabs.many { gap: 4px; } .dress-tabs.many button { flex: 1 0 40px; padding: 7px 4px; }   /* the wardrobe's seven parts share the row (2026-11-12): all in sight on a 375 px phone; narrower, the row scrolls */
.dress-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px calc(14px + env(safe-area-inset-bottom, 0px)); }
.dress-sec h3 { margin: 12px 2px 7px; font-size: 12.5px; font-weight: 700; color: var(--fg-2); }
.dress-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.dress-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 4px 6px; border: 2px solid transparent; border-radius: 12px; font: inherit; font-size: 11.5px; color: var(--fg); background: var(--bg-elev-2); cursor: pointer; }
.dress-opt svg { width: 58px; height: 58px; display: block; overflow: hidden; }
.dress-opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.dress-sws { display: flex; flex-wrap: wrap; gap: 10px; padding: 2px 2px 4px; }
.dress-sw { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); cursor: pointer; }
.dress-sw[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), 0 0 0 2px var(--bg-elev), 0 0 0 4px var(--accent); }
.dress-wear { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0 6px; }
.dress-wear .list { display: flex; flex-wrap: wrap; gap: 8px; }
.dress-note { margin: 12px 2px 0; padding: 8px 10px; border-radius: 9px; font-size: 12.5px; line-height: 1.5; color: var(--fg-2); background: var(--bg-sunken); }
.dress-more { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 2px 4px; font-size: 13px; color: var(--fg-2); }
.wr-it { width: 72px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 1.5px solid transparent; border-radius: 10px; font: inherit; font-size: 12px; color: var(--fg); background: var(--bg-sunken); cursor: pointer; }
.wr-it svg { width: 56px; height: 56px; } .wr-it.on { border-color: var(--accent); background: var(--accent-soft); }
/* 擺設 (1.2.0): the room's own controls step aside, each ware gets a clear button, the picked one a glow and its tools */
.study.edit :is(.study-tools, .room-hint, .mail-hint), .study.edit .thing { display: none; }
.study .lamp-tap { position: absolute; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }   /* a lamp: a tap switches it */
/* a lamp switched off (test): no pool of light, its shade and bulb dark by night */
.lamp-off .night-only { display: none; }
.lamp-off :is([fill="#fff4d2"], [fill="#fff4d8"], [fill="#fffbea"]) { fill: color-mix(in srgb, #f3ecdc calc(var(--day) * 100%), #4a4658); }
.lamp-off :is([style*="#ffd27a"], [style*="#ffd36a"], [style*="#ffd98a"], [style*="#fff1c4"]) { fill: color-mix(in srgb, #e9dcc0 calc(var(--day) * 100%), #4a4458) !important; }
.study .ware-use { position: absolute; padding: 0; border: 0; border-radius: 12px; background: none; cursor: pointer; }
.study .deco { position: absolute; padding: 0; border: 0; border-radius: 10px; background: none; cursor: grab; touch-action: none; }
.study .deco.sel { outline: 2px dashed rgba(255, 255, 255, .9); outline-offset: 2px; box-shadow: 0 0 0 4px rgba(90, 108, 240, .35); }
.study .deco.wall.sel { background: rgba(90, 108, 240, .28); }   /* a wall ware's tap area is its own slanted shape (a clip, which hides an outline): tinted instead */
.study.dragging .deco, .study.dragging .edit-sel { opacity: 0; }
.study .ghost { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; will-change: transform; filter: drop-shadow(0 0 2px rgba(255, 255, 255, .9)) drop-shadow(0 6px 8px rgba(0, 0, 0, .25)); }
.study .ghost.bad { filter: drop-shadow(0 0 2px #e0524b) drop-shadow(0 0 3px #e0524b); opacity: .75; }
.edit-sel { position: absolute; z-index: 3; display: flex; gap: 6px; transform: translate(-50%, calc(-100% - 10px)); } .edit-sel.under { transform: translate(-50%, 10px); }
.edit-sel .sel-note { padding: 7px 12px; border-radius: 99px; font-size: 12.5px; color: #fff; background: rgba(20, 22, 44, .7); white-space: nowrap; }
.study.drag-desk .fx-phones, .study.drag-desk :is(.tune, .steam, .note-glow) { visibility: hidden; }
.edit-sel button { padding: 7px 12px; border: 0; border-radius: 99px; font: inherit; font-size: 13px; font-weight: 600; color: #fff; background: rgba(20, 22, 44, .86); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); cursor: pointer; }
.edit-top { position: absolute; z-index: 3; top: calc(10px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.edit-hint { padding: 7px 11px; border-radius: 99px; font-size: 12.5px; color: #fff; background: rgba(20, 22, 44, .78); }
.edit-tray { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(20, 22, 44, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tray-it { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 0; border-radius: 10px; font: inherit; font-size: 11.5px; color: #fff; background: rgba(255, 255, 255, .1); cursor: pointer; --day: 1; --f: 1; --lit: 1; }
.tray-it svg { width: 50px; height: 50px; overflow: visible; }
.tray-it { position: relative; } .tray-it .tray-n { position: absolute; right: 5px; top: 4px; min-width: 22px; padding: 1px 5px; border-radius: 10px; font-size: 11px; font-weight: 700; line-height: 1.5; color: #3b3428; background: #ffd27a; }   /* a pile: how many */
.tray-house[aria-pressed="true"] { background: rgba(255, 255, 255, .26); box-shadow: inset 0 0 0 2px #ffd27a; }   /* the house up now */
.tray-empty { padding: 10px 4px; font-size: 13px; color: rgba(255, 255, 255, .85); }
.edit-tray { touch-action: pan-x; transition: background-color .15s, box-shadow .15s; }
.edit-tray .tray-row { display: flex; gap: 8px; overflow-x: auto; touch-action: pan-x; }
/* the storage box's tabs (2026-11-14, the user: not everything at once): small chips over its row, each with how many it holds */
.tray-tabs { display: flex; gap: 6px; margin-bottom: 7px; }
.tray-tab { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border: 0; border-radius: 99px; font: inherit; font-size: 12px; color: rgba(255, 255, 255, .82); background: rgba(255, 255, 255, .12); cursor: pointer; }
.tray-tab b { min-width: 16px; padding: 0 4px; border-radius: 8px; font-size: 10.5px; line-height: 1.5; text-align: center; color: inherit; background: rgba(255, 255, 255, .16); }
.tray-tab[aria-selected="true"] { color: #2a2c44; font-weight: 700; background: rgba(255, 255, 255, .94); } .tray-tab[aria-selected="true"] b { background: rgba(42, 44, 68, .12); }   /* sideways the box scrolls; up and down a ware is pulled out (1.2.0) */
.edit-tray.drop { background: rgba(70, 86, 210, .9); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85); }   /* a ware held over it goes in */
.edit-tray.no-drop { box-shadow: inset 0 0 0 2px #e0524b; }
.study-gear { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; cursor: pointer;
  color: color-mix(in srgb, #3a3350 calc(var(--lit) * 100%), #dfe3ff); background: color-mix(in srgb, rgba(255, 255, 255, .55) calc(var(--lit) * 100%), rgba(20, 22, 52, .55)); transition: color .4s, background-color .4s, opacity .4s; }
.study-gear svg { width: 22px; height: 22px; }
.study.quiet .study-tools > :not(:focus-visible) { opacity: 0; }   /* resting with the signs (1.2.0): a tap there brings them back, a second one opens */
/* a thing: a clear button over the drawing, its name tag at --tx／--ty (light or dark by --lit, which flips at half daylight) */
.thing { position: absolute; padding: 0; border: 0; border-radius: 14px; background: none; cursor: pointer; }
.thing::before { content: ''; position: absolute; inset: -8%; border-radius: 16px; background: radial-gradient(closest-side, rgba(255, 236, 170, .38), transparent); opacity: 0; transition: opacity .15s; }
.thing:active::before, .thing:focus-visible::before { opacity: 1; } .thing:focus-visible { outline: none; }
.tag { position: absolute; left: var(--tx, 50%); top: var(--ty, 100%); transform: translate(calc(-50% + var(--nx, 0px)), -50%); padding: 2px 8px; border-radius: 99px; font-size: 11px; line-height: 1.5; white-space: nowrap; letter-spacing: .02em; font-size: 10.5px; transition: transform .12s, color .4s, background-color .4s;
  color: color-mix(in srgb, #2a3352 calc(var(--lit) * 100%), #e8eaff); background: color-mix(in srgb, rgba(255, 255, 255, .84) calc(var(--lit) * 100%), rgba(14, 16, 40, .74)); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.thing:active .tag { transform: translate(calc(-50% + var(--nx, 0px)), -50%) scale(.94); }   /* --nx: slid in to stay whole at a side of the screen (ROOM.place) */
/* a thing's badge (1.2.0): its sign in a round badge, the sidebar's signs; 今日練習 and 聽一輪, the two that matter, blue and
   bigger. Today's practice wears a ring that fills with the day (錯題本 stays plain); a tap on a thing shows
   its words for a moment (.named). A few seconds after the last touch, and while a finger moves the room, they rest out of sight.
   The yard's three (the door, the mailbox, 古道具屋) are signs the same way. */
.thing .tag { display: inline-flex; align-items: center; gap: 5px; padding: 5px; font-size: 12.5px; font-weight: 600; letter-spacing: 0; transition: transform .12s, color .4s, background-color .4s, opacity .4s; }
.thing .tag svg { width: 16px; height: 16px; flex: none; }
.thing.primary .tag { padding: 8px; font-size: 14px; font-weight: 700; color: #fff; background: #5a6cf0; box-shadow: 0 4px 14px rgba(70, 90, 230, .42), inset 0 1px 0 rgba(255, 255, 255, .25); }
.thing.primary .tag > svg:not(.ring) { width: 20px; height: 20px; }
.study.far .thing .tag { padding: 4px; } .study.far .thing.primary .tag { padding: 6px; } .study.far .thing.primary .tag > svg:not(.ring) { width: 16px; height: 16px; }   /* zoomed well out (a wide screen starts there): the room is drawn smaller */
.thing .tag-name { display: none; } :is(.study, .yard) .thing.named .tag { padding-right: 12px; } .thing.named .tag-name { display: inline; } .thing.named .ring { display: none; }
.thing .tag svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; fill: none; stroke-width: 3; stroke: rgba(255, 255, 255, .3); }
.thing .ring .fill { stroke: #fff; } .thing:not(.primary) .tag svg.ring { display: none; }   /* done: a plain white badge like the rest */
:is(.study, .yard).quiet .thing:not(.mail):not(.knocking):not(.named):not(:focus-visible) .tag { opacity: 0; pointer-events: none; }   /* resting: a tap on the thing itself still opens it (the door's letters stay in sight, so does the mailbox's) */
.thing.minor .tag { opacity: .7; }
.thing.away .tag { opacity: 0; transition: opacity .2s; }   /* a thing off the screen: its art may peek in at the edge, its tag waits */
.study .thing:not(.away) { z-index: 1; }   /* where tap areas overlap, a thing on the screen wins over one peeking in */
.sky .house .enter { position: absolute; left: 4px; right: 4px; top: 14px; bottom: 0; pointer-events: auto; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.sky .house .enter .tag { top: 60%; padding: 4px; } .sky .house .enter .tag svg { width: 14px; height: 14px; }   /* over the door, between the windows (the house is drawn 1.15×) */
/* the mail (1.1.0): the door's tag counts the letters in the mailbox outside and wears a red dot; a letter this device has
   not been told about brings the hint at the top left once (under the room's buttons on a phone) */
.thing.mail:not(.away) .tag { opacity: 1; }
/* test (2026-11-10): the bed — the way there marked when a sleep would meet someone; the menu of hours; the fade of a sleep */
.nap-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; } .nap-to { position: relative; }
.nap-fade { position: fixed; inset: 0; z-index: 2000; background: #0b0d1a; pointer-events: none; animation: napFade 1.5s ease-in-out forwards; }
@keyframes napFade { 0% { opacity: 0; } 40%, 55% { opacity: 1; } 100% { opacity: 0; } }
.tb-wait { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--bg-sunken); } .diary-book .tb-wait { background: color-mix(in srgb, var(--pp) 75%, #c9a878); } .tb-wait p { margin: 0; }
.thing.mail .tag::after { content: ''; position: absolute; top: -2px; right: -2px; width: 7px; height: 7px; border-radius: 50%; background: #ef4f45; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85); }
.mail-hint { position: absolute; z-index: 3; top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 9px 8px 11px; border: 0; border-radius: 99px; font: inherit; font-size: 12.5px; color: #fff;
  background: rgba(20, 22, 44, .84); box-shadow: 0 4px 14px rgba(0, 0, 0, .28); cursor: pointer; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .3s, transform .3s; }
.mail-hint.on { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 480px) { .mail-hint { top: calc(60px + env(safe-area-inset-top, 0px)); } }
.mail-hint svg { width: 16px; height: 16px; flex: none; } .mail-hint svg:last-child { width: 13px; height: 13px; opacity: .7; }
/* 古道具屋's hill (1.2.0): a low hill on the left behind the far hills, the shop on top, a path with lamps by night */
.sky .mtn { position: absolute; left: 0; bottom: 0; width: 100%; height: 600px; overflow: visible; }
/* 古道具屋 under fog until it opens (2026-11-11): soft puffs that drift a little, white by day, a dim blue by night; lifting once */
.sky .mtn .fg0 { stop-color: color-mix(in srgb, rgba(244, 246, 250, .97) calc(var(--md, var(--day, 1)) * 100%), rgba(150, 158, 210, .9)); }
.sky .mtn .fg1 { stop-color: color-mix(in srgb, rgba(236, 240, 246, .78) calc(var(--md, var(--day, 1)) * 100%), rgba(120, 128, 190, .66)); }
.sky .mtn .fg2 { stop-color: rgba(236, 240, 246, 0); }
.sky .mtn .shop-fog ellipse { transform-box: fill-box; transform-origin: center; animation: fogDrift 13s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -1.6s); }
.sky .mtn .shop-fog.lift { animation: fogLift 3.2s ease-in .8s forwards; }
@keyframes fogDrift { from { transform: translateX(-7px) scale(1); } to { transform: translateX(7px) scale(1.04); } }
@keyframes fogLift { to { opacity: 0; transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .sky .mtn .shop-fog ellipse { animation: none; } .sky .mtn .shop-fog.lift { animation: none; opacity: 0; } }
.sky .mtn .m-far { fill: color-mix(in srgb, color-mix(in srgb, #c2d0dc calc(var(--f) * 100%), #c8cfd4) calc(var(--md, var(--day, 1)) * 100%), #12143c); }
.sky .mtn .m-main { fill: color-mix(in srgb, color-mix(in srgb, #9dbcb0 calc(var(--f) * 100%), #aebab4) calc(var(--md, var(--day, 1)) * 100%), #181b4b); }
.sky .mtn .m-shade { fill: color-mix(in srgb, rgba(40, 70, 60, .12) calc(var(--md, var(--day, 1)) * 100%), rgba(0, 0, 20, .25)); }
.sky .mtn .m-rim { fill: none; stroke: color-mix(in srgb, rgba(255, 255, 255, .5) calc(var(--md, var(--day, 1)) * 100%), rgba(160, 172, 255, .26)); stroke-width: 1.3; stroke-linejoin: round; }
.sky .mtn .m-path { fill: none; stroke: color-mix(in srgb, rgba(238, 228, 196, .72) calc(var(--md, var(--day, 1)) * 100%), rgba(150, 160, 230, .16)); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sky .mtn .p-lamp { fill: #ffd28a; opacity: calc(1 - var(--day)); filter: drop-shadow(0 0 3px rgba(255, 200, 120, .9)); }
.sky .mtn .s-glow { opacity: calc(1 - var(--day)); }
.sky .mtn .s-ground { fill: color-mix(in srgb, #c9b48a calc(var(--md, var(--day, 1)) * 100%), #1b1e52); }
.sky .mtn .s-wall { fill: color-mix(in srgb, #9a7350 calc(var(--md, var(--day, 1)) * 100%), #23275e); } .sky .mtn .s-beam { fill: color-mix(in srgb, #6a4a32 calc(var(--md, var(--day, 1)) * 100%), #0f1136); }
.sky .mtn .s-roof { fill: color-mix(in srgb, #545c70 calc(var(--md, var(--day, 1)) * 100%), #10123a); } .sky .mtn .s-rim { fill: none; stroke: color-mix(in srgb, rgba(255, 255, 255, .55) calc(var(--md, var(--day, 1)) * 100%), rgba(170, 182, 255, .4)); stroke-width: 1; stroke-linejoin: round; }
.sky .mtn .s-tile { fill: none; stroke: color-mix(in srgb, rgba(255, 255, 255, .22) calc(var(--md, var(--day, 1)) * 100%), rgba(170, 182, 255, .16)); stroke-width: .8; }
.sky .mtn .s-open { fill: color-mix(in srgb, #5a4334 calc(var(--day) * 100%), #ffc874); } .sky .mtn .s-noren { fill: color-mix(in srgb, #3b3f73 calc(var(--md, var(--day, 1)) * 100%), #2c2f66); }
.sky .mtn .s-ko { font: 700 6.4px 'Hiragino Mincho ProN', 'Noto Serif JP', serif; fill: #fff; opacity: .92; }
.sky .mtn .s-sign { fill: color-mix(in srgb, #e9d6ae calc(var(--md, var(--day, 1)) * 100%), #3a3e78); stroke: color-mix(in srgb, #6a4a32 calc(var(--md, var(--day, 1)) * 100%), #0f1136); stroke-width: .8; }
.sky .mtn .s-cord { stroke: color-mix(in srgb, #3a2a20 calc(var(--md, var(--day, 1)) * 100%), #0c0d25); stroke-width: 1; } .sky .mtn .s-paper { fill: color-mix(in srgb, #fbf3e2 calc(var(--day) * 100%), #ffd58e); } .sky .mtn .s-band { stroke: #d9483b; stroke-width: 1; }
.sky .mtn .s-pot { fill: color-mix(in srgb, #8c5a3c calc(var(--md, var(--day, 1)) * 100%), #15173f); } .sky .mtn .s-pot-rim { fill: color-mix(in srgb, #6e4430 calc(var(--md, var(--day, 1)) * 100%), #10123a); }
.sky .mtn .s-box { fill: color-mix(in srgb, #b98d5c calc(var(--md, var(--day, 1)) * 100%), #1a1d4a); } .sky .mtn .s-box2 { fill: color-mix(in srgb, #a07a4e calc(var(--md, var(--day, 1)) * 100%), #171a45); }
.sky .mtn .s-owl { fill: color-mix(in srgb, #8a5f3e calc(var(--md, var(--day, 1)) * 100%), #2a2550); stroke: none; } .sky .mtn .s-owl path { fill: none; stroke: color-mix(in srgb, #6e4a30 calc(var(--md, var(--day, 1)) * 100%), #2a2550); stroke-width: .8; } .sky .mtn .s-owl-eye { fill: color-mix(in srgb, #fff8e6 calc(var(--md, var(--day, 1)) * 100%), #ffd36b); }
.sky .shop-btn { position: absolute; width: 64px; height: 52px; margin-left: -32px; pointer-events: auto; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.sky .shop-btn .tag { top: calc(100% + 4px); }
/* the bus stop (test, 2026-11-09): drawn like a ware; its sign button over it, unscaled; the hero on its bench, legs swinging */
.sky .busstop { position: absolute; left: 50%; pointer-events: none; } .sky .busstop svg { width: 100%; height: 100%; overflow: visible; }
.sky .bus-btn { position: absolute; left: 50%; pointer-events: auto; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; } .sky .bus-btn .tag { top: -14px; }
.sky .beach-prop { pointer-events: none; }
.sky .town-shop { position: absolute; left: 50%; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; z-index: 1; }   /* the town's shop fronts, to tap */
/* test (2026-11-10): the places out and about drawn taller (.tall: up into the sky) and each with its own life — wires and a
   passing truck on the main road, a train over the station, smoke from the bath's chimney, leaves and the festival's fireworks at
   the shrine, petals and the moat at the castle, flags in town, gulls and the lighthouse at the beach */
.study .room-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: calc(var(--day, 1) * .9); }   /* clouds drifting by behind the room in the sky by day (2026-11-10) */
.study .rcloud { position: absolute; left: 0; width: 110px; height: 30px; border-radius: 22px; background: color-mix(in srgb, #ffe0c8 calc(var(--warm, 0) * 100%), #fff); opacity: .7; animation: rcloud var(--d) linear var(--w) infinite; }
.study .rcloud::before, .study .rcloud::after { content: ''; position: absolute; border-radius: 50%; background: inherit; } .study .rcloud::before { width: 50px; height: 50px; left: 16px; top: -24px; } .study .rcloud::after { width: 38px; height: 38px; left: 54px; top: -15px; }
@keyframes rcloud { from { transform: translateX(-160px) scale(var(--k)); } to { transform: translateX(calc(100vw + 40px)) scale(var(--k)); } }
@media (prefers-reduced-motion: reduce) { .study .rcloud { animation: none; } }
.study .art .cur { transform-box: fill-box; transform-origin: 50% 0; animation: curSway 5.5s ease-in-out var(--w, 0s) infinite alternate; } @keyframes curSway { from { transform: skewX(-1.6deg); } to { transform: skewX(1.6deg) scaleY(1.005); } }
.study .art .sun { fill: color-mix(in srgb, #fff0bf calc(var(--day, 1) * 100%), #c4d0ff); opacity: calc(.07 + .2 * var(--day, 1)); pointer-events: none; }
.study .art .mote { fill: #fffbe8; opacity: 0; animation: mote var(--d) ease-in-out var(--w) infinite; pointer-events: none; } @keyframes mote { 0%, 100% { transform: translate(0, 0); opacity: 0; } 30% { opacity: calc(.75 * var(--day, 1)); } 70% { opacity: calc(.6 * var(--day, 1)); } 50% { transform: translate(5px, 9px); } }
@media (prefers-reduced-motion: reduce) { .study .art :is(.mote, .cur) { animation: none; } }
.yard .yhero.fading { opacity: 0; transition: opacity .75s ease-in; }   /* off toward the beach or the town: fading as he goes (yGo) */
.sky .use-btn { position: absolute; left: 50%; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; }   /* PLACE_USE: a thing to tap */
.sky .use-btn::after { content: ''; position: absolute; left: 50%; top: -4px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 3px rgba(255, 255, 255, .28), 0 1px 3px rgba(0, 0, 0, .25); transition: opacity .5s; animation: useHint 2.4s ease-in-out infinite; }
.yard.quiet .sky .use-btn::after { opacity: 0; } .sky .use-btn.tried::after, .sky .use-btn.signed::after { display: none; } .sky .use-btn.signed .tag { top: var(--ty, -6px); }   /* signed (日本語教室): a badge as in 書房, not a dot */
 .yard.edit .sky .use-btn, .yard.dressing .sky .use-btn { display: none; } @keyframes useHint { 50% { transform: scale(1.4); opacity: .55; } }
.sky .ypop { position: absolute; z-index: 3000; padding: 3px 10px; border-radius: 12px; background: rgba(255, 255, 255, .94); color: #3a2c24; font: 700 13px/1.25 system-ui, sans-serif; font-style: normal; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); pointer-events: none; animation: yPop 1.8s ease-out forwards; }
.sky .ysay { position: absolute; z-index: 3000; width: max-content; max-width: 200px; text-align: center; padding: 3px 10px 2px; border-radius: 13px; background: rgba(255, 255, 255, .95); color: #3a2c24; font: 600 13px/1.45 system-ui, sans-serif; font-style: normal; white-space: normal; box-shadow: 0 2px 6px rgba(0, 0, 0, .16); pointer-events: none; transform: translateX(-50%); animation: ySay var(--ms, 2500ms) ease-out forwards; }   /* words over someone's head (TOWNLIFE): not read out, no Chinese */
.sky .ysay::after { content: ''; position: absolute; left: clamp(10px, calc(50% - var(--dx, 0px)), calc(100% - 10px)); bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: rgba(255, 255, 255, .95); }
.sky .ysay rt { font-size: 9px; font-weight: 500; color: #7a6a5e; }
@keyframes ySay { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); } 8% { opacity: 1; transform: translate(-50%, 0) scale(1); } 88% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -4px); } }
@media (prefers-reduced-motion: reduce) { .sky .ysay { animation-name: ySayCalm; } @keyframes ySayCalm { 0%, 100% { opacity: 0; } 6%, 90% { opacity: 1; } } }
@keyframes yPop { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.7); } 14% { opacity: 1; transform: translate(-50%, 0) scale(1.06); } 24% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -16px); } }
.sky .yleaf { position: absolute; z-index: 2990; width: 7px; height: 5px; border-radius: 60% 0; background: var(--c); pointer-events: none; opacity: 0; animation: yLeaf var(--d) ease-in var(--w) forwards; }
@keyframes yLeaf { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 10% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), 120px) rotate(400deg); } }
.sky .land [data-fx].ride-swing { animation: rideSwing 1.5s ease-in-out infinite alternate !important; } .yard .yhero.ride-swing > svg { animation: rideSwing 1.5s ease-in-out infinite alternate; }
@keyframes rideSwing { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
.sky .land [data-fx].ride-rock { animation: rideRock .8s ease-in-out infinite alternate !important; } .yard .yhero.ride-rock > svg { animation: rideRock .8s ease-in-out infinite alternate; }
@keyframes rideRock { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.sky .land [data-fx].flown { animation: fxFlown 6s ease-in-out; } @keyframes fxFlown { 0% { transform: none; opacity: 1; } 14% { transform: translate(80px, -160px); opacity: 0; } 82% { transform: translate(-40px, -70px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.sky .land [data-fx]:is(.buy, .honk, .purr, .wake) { transform-box: fill-box; transform-origin: 50% 100%; animation: fxNudge .2s ease-in-out 8 alternate; } @keyframes fxNudge { to { transform: scale(1.04, .96); } }
.sky .land [data-fx].ring { animation: fxRing .32s ease-in-out 6 alternate !important; } @keyframes fxRing { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.sky .land [data-fx].shake { transform-box: fill-box; transform-origin: 50% 100%; animation: fxShake .16s ease-in-out 10 alternate; } @keyframes fxShake { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
.sky .land [data-fx].pinch { animation-play-state: paused; } .sky .land .pinch .claws { transform-box: fill-box; transform-origin: 50% 100%; animation: fxPinch .2s ease-in-out infinite alternate; } @keyframes fxPinch { to { transform: translateY(-4px) scaleY(1.2); } }
.sky .land [data-fx].spout { animation: none; transform-box: fill-box; transform-origin: 0 100%; transform: scale(1.9); }
.sky .land [data-fx] { transition: opacity .5s; } .sky .land [data-fx].gone { opacity: 0; } .sky .land [data-fx].jingle .fx-sway { animation-duration: .2s !important; }
.sky .land [data-fx].flop path { transform-box: fill-box; transform-origin: 50% 100%; animation: fxFlop .16s ease-in-out 10 alternate; } @keyframes fxFlop { to { transform: translateY(-4px) rotate(-14deg); } }
.sky .land [data-fx].cheer .fx-flag { animation-duration: .22s; } .sky .land [data-fx].beckon .paw { transform-box: fill-box; transform-origin: 30% 100%; animation: fxBeckon .28s ease-in-out 8 alternate; } @keyframes fxBeckon { to { transform: rotate(-26deg); } }
:is(.study, .yard) .hero.bow .bob { animation: heroBow 1.4s ease-in-out; } @keyframes heroBow { 35%, 65% { transform: translateY(5px) scaleY(.93); } }
@media (prefers-reduced-motion: reduce) { .sky :is(.ypop, .yleaf), .sky .use-btn::after { animation-duration: .01s; } .sky .land [data-fx][class] { animation: none !important; } .yard .yhero > svg { animation: none !important; } .stall-keeper .bob { animation: none; } }
.sky .cloudshade { position: absolute; left: 0; bottom: 10px; width: 560px; height: 96px; border-radius: 50%; background: radial-gradient(closest-side, rgba(36, 48, 72, .11), rgba(36, 48, 72, 0)); opacity: var(--day); pointer-events: none; animation: cloudShade 110s linear infinite; }   /* a cloud's shadow over the ground by day (2026-11-10) */
.sky .cloudshade.c2 { width: 320px; height: 80px; bottom: 70px; animation-duration: 150s; animation-delay: -70s; } .yard.indoor .cloudshade { display: none; }
@keyframes cloudShade { from { transform: translateX(-480px); } to { transform: translateX(1300px); } }
@media (prefers-reduced-motion: reduce) { .sky .cloudshade { animation: none; display: none; } }
.sky .land.tall { height: 770px; } .sky .land.prop { pointer-events: none; }
.sky .land .wire { fill: none; stroke: color-mix(in srgb, #55555f calc(var(--md, var(--day, 1)) * 100%), #3a3d66); stroke-width: 1.4; }
.sky .land .lit { fill: #ffd98a; opacity: calc(.08 + .92 * (1 - var(--day))); transition: opacity 3s; }
.sky .land .glow { opacity: calc((1 - var(--day)) * .9); transition: opacity 3s; } .sky .land .day-only { opacity: var(--day); }
.sky .land .fx-car { animation: fxCar 19s linear infinite; } @keyframes fxCar { 0% { transform: translateX(-300px); } 50%, 100% { transform: translateX(1500px); } }
.sky .land .fx-train { animation: fxTrain 21s linear infinite; } @keyframes fxTrain { 0%, 30% { transform: translateX(1500px); } 70%, 100% { transform: translateX(-1300px); } }
.sky .land .fx-bob { transform-box: fill-box; transform-origin: 50% 100%; animation: fxBob 2.4s ease-in-out infinite alternate; } @keyframes fxBob { from { transform: rotate(-3deg) translateY(0); } to { transform: rotate(3deg) translateY(-1.5px); } }
.sky .land .fx-breathe { transform-box: fill-box; transform-origin: 50% 100%; animation: fxBreathe 3.4s ease-in-out infinite; } @keyframes fxBreathe { 50% { transform: scale(1.015, 1.05); } }
.sky .land .fx-peck { transform-box: fill-box; transform-origin: 30% 80%; animation: fxPeck 1.8s ease-in-out infinite; } @keyframes fxPeck { 0%, 60%, 100% { transform: rotate(0); } 70%, 90% { transform: rotate(28deg); } }
.sky .land .fx-sway { transform-box: fill-box; transform-origin: 50% 0; animation: fxSway 3.2s ease-in-out infinite alternate; } @keyframes fxSway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
.sky .land .fx-flag { transform-box: fill-box; transform-origin: 0 50%; animation: fxFlag 1.6s ease-in-out infinite alternate; } @keyframes fxFlag { from { transform: skewY(-4deg) scaleX(.94); } to { transform: skewY(4deg) scaleX(1); } }
.sky .land .fx-smoke { transform-box: fill-box; transform-origin: center; animation: fxSmoke 7s ease-out infinite; opacity: 0; } @keyframes fxSmoke { 0% { transform: translate(0, 0) scale(.5); opacity: 0; } 15% { opacity: .7; } 100% { transform: translate(130px, -80px) scale(2.4); opacity: 0; } }
.sky .land .fx-steam { transform-box: fill-box; transform-origin: center; animation: fxSteam 4.5s ease-out infinite; opacity: 0; } @keyframes fxSteam { 0% { transform: translate(0, 0) scale(.5); opacity: 0; } 25% { opacity: .55; } 100% { transform: translate(14px, -60px) scale(1.8); opacity: 0; } }
.sky .land .fx-fall { animation: fxFall 11s linear infinite; opacity: 0; } @keyframes fxFall { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 8% { opacity: .95; } 92% { opacity: .9; } 100% { transform: translate(-70px, 330px) rotate(540deg); opacity: 0; } }
.sky .land .fx-ripple { transform-box: fill-box; transform-origin: center; animation: fxRipple 3.6s ease-out infinite; opacity: 0; } @keyframes fxRipple { 0% { transform: scale(.3); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
.sky .land .fx-blink { animation: fxBlink 1.4s steps(2) infinite; } @keyframes fxBlink { 50% { opacity: .25; } }
.sky .land .fx-scroll { animation: fxScroll 9s linear infinite; } @keyframes fxScroll { from { transform: translateX(0); } to { transform: translateX(-260px); } }
.sky .land .fx-fly { animation: fxFly 26s linear infinite; } @keyframes fxFly { 0% { transform: translate(-160px, 0); } 100% { transform: translate(1400px, -60px); } }
.sky .land .fx-wing { transform-box: fill-box; transform-origin: center; animation: fxWing .5s ease-in-out infinite alternate; } @keyframes fxWing { to { transform: scaleY(.45); } }
.sky .land .fx-gull { animation: fxGull 18s ease-in-out infinite; } @keyframes fxGull { 0% { transform: translate(0, 0); } 25% { transform: translate(160px, -30px); } 50% { transform: translate(300px, 10px); } 75% { transform: translate(150px, 30px); } 100% { transform: translate(0, 0); } }
.sky .land .fx-beam { transform-box: view-box; animation: fxBeam 6s linear infinite; opacity: calc((1 - var(--day)) * .55); } @keyframes fxBeam { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }
.sky .land .fx-sweep { transform-box: view-box; animation: fxSweep 7s ease-in-out infinite alternate; } @keyframes fxSweep { from { transform: rotate(-24deg); } to { transform: rotate(30deg); } }
.sky .land .fx-boom { transform-box: fill-box; transform-origin: center; animation: fxBoom 4.2s ease-out infinite; opacity: 0; } @keyframes fxBoom { 0%, 8% { transform: scale(.1); opacity: 0; } 12% { opacity: 1; } 45% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.12); opacity: 0; } }
.sky .land .fx-fan { transform-box: fill-box; transform-origin: center; animation: fxFan .9s linear infinite; } @keyframes fxFan { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }
.sky .land .fx-crab { animation: fxCrab 11s ease-in-out infinite; } @keyframes fxCrab { 0%, 12% { transform: translateX(0); } 30%, 52% { transform: translateX(70px); } 70%, 100% { transform: translateX(0); } }
.sky .land .fx-legs { animation: fxLegs .18s steps(2) infinite; } @keyframes fxLegs { 50% { transform: translateY(-1.5px); } }
.sky .land .fx-swim { transform-box: fill-box; transform-origin: center; animation: fxSwim 34s linear infinite; } @keyframes fxSwim { 0% { transform: translateX(0) scaleX(1); } 48% { transform: translateX(260px) scaleX(1); } 50% { transform: translateX(260px) scaleX(-1); } 98% { transform: translateX(0) scaleX(-1); } 100% { transform: translateX(0) scaleX(1); } }
.sky .land .fx-spin { transform-box: view-box; animation: fxSpin 1.4s linear infinite; } @keyframes fxSpin { to { transform: rotate(360deg); } }
.sky .land .fx-sail { animation: fxSail 70s linear infinite; } @keyframes fxSail { from { transform: translateX(-200px); } to { transform: translateX(1300px); } }
.sky .land .fx-tvpic { animation: fxTv 3s linear infinite; } @keyframes fxTv { to { transform: translateX(-2.16px); } }   /* in the wall's own units (×31) */
.sky .land .fx-tuft { transform-box: fill-box; transform-origin: 50% 100%; animation: fxTuft 3s ease-in-out infinite alternate; } @keyframes fxTuft { from { transform: skewX(-7deg); } to { transform: skewX(7deg); } }
@media (prefers-reduced-motion: reduce) { .sky .land :is(.fx-sweep, .fx-car, .fx-train, .fx-bob, .fx-breathe, .fx-peck, .fx-sway, .fx-flag, .fx-smoke, .fx-steam, .fx-fall, .fx-ripple, .fx-blink, .fx-scroll, .fx-fly, .fx-wing, .fx-gull, .fx-beam, .fx-boom, .fx-fan, .fx-crab, .fx-legs, .fx-swim, .fx-tuft, .fx-spin, .fx-sail) { animation: none; } }
.sky .land .seam { fill: none; stroke: color-mix(in srgb, #b4ad9e calc(var(--md, var(--day, 1)) * 100%), #1c1d3e); stroke-width: 2; stroke-linecap: round; }
.yard .hero.bench .bob { animation: none; transform: translateY(-13px); } .yard .hero.bench .h-shadow { display: none; }   /* the hips on the seat (40 up), the thighs coming at us (the legs short) */
.yard .hero.bench .legs { transform-box: view-box; transform-origin: 2px -27px; transform: scaleY(.55); }
.yard .hero.bench .leg.l { animation: heroSwing 1.3s ease-in-out infinite alternate; } .yard .hero.bench .leg.r { animation: heroSwing 1.3s ease-in-out -.65s infinite alternate; }
/* the hero in the yard: its feet at the bottom edge, moved up the lawn and scaled by distance; darker by night; behind the mailbox when further up */
.sky .yhero { left: 50%; bottom: -10px; width: 120px; height: 210px; margin-left: -60px; transform-origin: 50% 95.24%; }
.sky .yhero svg { filter: brightness(calc(.64 + .36 * var(--day))) saturate(calc(.8 + .2 * var(--day))); }   /* by night a little darker than by day, never dark (1.2.0) */
.sky .yhero { z-index: 1; }   /* in the order of the yard's things by how far up the lawn (inline); behind the house on the hill path */
/* up the hill path to 古道具屋 (1.2.0): small with the distance and outlined so he stands out by day and by night (the outline is
   set on his drawing as he goes, yClimbLook, so it stays about a pixel on the screen); the house stands in front of the path */
.yard.climbing .house { z-index: 2; } .yard.climbing .shop-btn .tag { opacity: 0; transition: opacity .3s; }   /* its name steps aside while he runs up to it */
/* the mailbox by the house: its flag is up while there are letters (and rises as the yard opens), its door drops open on a tap */
.sky .mailbox { position: absolute; z-index: 146; left: 50%; bottom: 154px; width: 52px; height: 66px; margin-left: 30px; }   /* 300 − its 154 px up the lawn, like the wares */
.sky .mailbox > svg { position: absolute; inset: 0; overflow: visible; }
.sky .yware { position: absolute; left: 50%; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; touch-action: none; }
.sky .yware .art { width: 100%; height: 100%; display: block; overflow: visible; filter: brightness(calc(.45 + .55 * var(--day))) saturate(calc(.75 + .25 * var(--day))); }
.sky .yware .glow { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(255, 214, 130, .85), rgba(255, 190, 100, .3) 45%, transparent); opacity: calc(1 - var(--day)); transition: opacity 1.5s; }
/* Christmas (2026-11-14): bulbs over a ware's drawing that the night does not dim, twinkling; off with the glow */
.sky .yware .lights { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: calc(1 - var(--day)); transition: opacity 1.5s; }
.sky .yware .lights .tw { animation: bulbTw 1.6s ease-in-out infinite alternate; } .sky .yware .lights .tw2 { animation: bulbTw 1.6s ease-in-out -.8s infinite alternate; }
@keyframes bulbTw { from { fill-opacity: .12; } to { fill-opacity: .5; } }
.sky .yware.off .lights { display: none; }
/* the snowman patted, the tree looked up at (2026-11-14, yardUse): he squashes and bounces with his bucket hopping; the tree's lights
   show by day too and twinkle fast, its star shines; bits of snow or sparkles drift off (yPuff) */
.sky .yware.poke .sm-all { transform-box: fill-box; transform-origin: 50% 100%; animation: smWobble .9s ease-out; }
.sky .yware.poke .sm-hat { transform-box: fill-box; transform-origin: 50% 100%; animation: smHat 1s ease-out; }
@keyframes smWobble { 0% { transform: none; } 18% { transform: scale(1.08, .9); } 40% { transform: scale(.95, 1.07); } 62% { transform: scale(1.03, .97) rotate(-2deg); } 82% { transform: rotate(1.5deg); } 100% { transform: none; } }
@keyframes smHat { 0%, 14% { transform: none; } 40% { transform: translateY(-18px) rotate(-14deg); } 64% { transform: rotate(7deg); } 82% { transform: rotate(-3deg); } 100% { transform: none; } }
.sky .yware.poke[data-ware="bigtree"] .art { transform-origin: 50% 100%; animation: treeShake .7s ease-in-out; }
@keyframes treeShake { 25% { transform: rotate(-1.4deg); } 60% { transform: rotate(1deg); } }
.sky .yware.poke .lights { opacity: max(calc(1 - var(--day)), .9); transition-duration: .2s; } .sky .yware.poke .lights :is(.tw, .tw2) { animation-duration: .22s; }
.sky .yware.poke .st-star { transform-box: fill-box; transform-origin: 50% 50%; animation: stStar 1.3s ease-out; }
@keyframes stStar { 0% { transform: none; } 30% { transform: scale(1.55) rotate(20deg); filter: drop-shadow(0 0 6px #ffe680); } 100% { transform: none; } }
.sky .ypuff { position: absolute; z-index: 2990; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 3px var(--c); pointer-events: none; opacity: 0; animation: yPuff 1.5s ease-out var(--w) forwards; }
@keyframes yPuff { 0% { opacity: 1; transform: none; } 30% { opacity: 1; transform: translate(calc(var(--dx) * .5), calc(var(--dy) * -1)); } 100% { opacity: 0; transform: translate(var(--dx), 46px); } }
@media (prefers-reduced-motion: reduce) { .sky .yware.poke :is(.sm-all, .sm-hat, .st-star), .sky .yware.poke[data-ware="bigtree"] .art { animation: none; } .sky .ypuff { display: none; } }
@media (prefers-reduced-motion: reduce) { .sky .yware .lights .tw, .sky .yware .lights .tw2 { animation: none; } }
.sky .yware.off .glow { display: none; } .sky .yware.off [style*="#ffd27a"] { fill: #4a4842 !important; }   /* a lamp switched off */
/* 觀星 (test): the telescope's eyepiece over the dark, the constellation's name under it */
.yard .scope { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; background: rgba(4, 5, 18, .9); color: #f3f0e6; text-align: center; animation: scopeIn .35s ease-out; }
@keyframes scopeIn { from { opacity: 0; } }
.scope .sc-ring { width: min(80vw, 56vh, 420px); aspect-ratio: 1; border-radius: 50%; padding: 6px; background: #2a2c38; box-shadow: 0 0 0 3px #4a4d5e, 0 10px 40px rgba(0, 0, 0, .6); animation: scopeZoom .5s cubic-bezier(.2, .8, .25, 1); }
@keyframes scopeZoom { from { transform: scale(.6); } }
.scope .sc-view, .scope .sc-sky { width: 100%; height: 100%; display: block; border-radius: 50%; }
.scope .sc-bg { fill: #0b0d2a; } .scope .sc-sky.day .sc-bg { fill: #8fc3ea; }
.scope .sc-dust { fill: #fff; animation: scTwinkle 3s ease-in-out infinite alternate; animation-delay: var(--w); } .scope .sc-sky.day :is(.sc-dust, .sc-star) { opacity: .28; animation: none; }
.scope .sc-star { animation: scTwinkle 2.4s ease-in-out infinite alternate; animation-delay: var(--w); filter: drop-shadow(0 0 3px rgba(255, 250, 220, .9)); }
@keyframes scTwinkle { from { opacity: .45; } to { opacity: 1; } }
.scope .sc-line { fill: none; stroke: rgba(170, 200, 255, .55); stroke-width: 1; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: scLine .9s ease-out .25s forwards; } .scope .sc-sky.day .sc-line { stroke: rgba(255, 255, 255, .6); }
@keyframes scLine { to { stroke-dashoffset: 0; } }
.scope .sc-meteor { stroke: #fff; stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 40; stroke-dashoffset: 40; opacity: 0; animation: scMeteor 7s ease-in 2s infinite; } .scope .sc-sky.day .sc-meteor { display: none; }
@keyframes scMeteor { 0% { stroke-dashoffset: 40; opacity: 0; } 4% { opacity: 1; } 10% { stroke-dashoffset: -40; opacity: 0; } 100% { opacity: 0; } }
.scope .sc-name { margin-top: 10px; font-size: 28px; font-weight: 700; letter-spacing: .06em; } .scope .sc-name rt { font-size: 12px; font-weight: 400; letter-spacing: .1em; color: #c9c6ff; }
.scope .sc-zh { font-size: 14px; color: #d9d5c8; max-width: 420px; } .scope .sc-note { font-size: 12px; color: #9a98b6; min-height: 1.4em; }
.scope .sc-btns { display: flex; gap: 10px; margin-top: 6px; } .scope .sc-btns .btn { min-width: 44px; }
.sky .yware.stirred svg.art { overflow: visible; }
.sky .yware .stir .rip { fill: none; stroke: #fff; stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; animation: pondRip 1.6s ease-out var(--w) forwards; }
@keyframes pondRip { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(4.5); opacity: 0; } }
.sky .yware .stir .leap { opacity: 0; transform-box: view-box; animation: koiLeap 1s ease-in-out 1.05s forwards; }
@keyframes koiLeap { 0% { transform: translate(-14px, -22px) rotate(-40deg) scale(.6); opacity: 0; } 12% { opacity: 1; } 50% { transform: translate(6px, -58px) rotate(0) scale(1); } 88% { transform: translate(26px, -22px) rotate(40deg) scale(.7); opacity: 1; } 100% { transform: translate(28px, -18px) rotate(45deg) scale(.5); opacity: 0; } }
.sky .yware .stir .spl { fill: #cfeaf7; opacity: 0; animation: pondSplash .6s ease-out var(--w) forwards; }
@keyframes pondSplash { 0% { transform: translate(0, 0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
.sky .yware .koi { transform-box: view-box; transform-origin: 0 0; animation: koiSwim 16s linear infinite; } .sky .yware .koi.k2 { animation-duration: 22s; animation-direction: reverse; }
@keyframes koiSwim { to { transform: rotate(360deg); } }
.yard.edit .sky .yware { cursor: grab; } .yard.edit .sky .yware.sel { outline: 2px dashed rgba(255, 255, 255, .9); outline-offset: 2px; border-radius: 10px; }
.yard.edit .sky .yware.bad .art { filter: drop-shadow(0 0 2px #e0524b) drop-shadow(0 0 3px #e0524b); opacity: .75; }
.yard.dragging .ysel .edit-sel { opacity: 0; }
.yard-tools { position: fixed; z-index: 5; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; display: flex; gap: 8px; }   /* 書房's buttons (sceneTools) */
.yard.quiet .yard-tools > :not(:focus-visible) { opacity: 0; }   /* resting with the signs: a first tap only brings them back */
.yard.edit .yard-tools, .yard.edit .sky .thing { display: none; }
/* the yard as wide as a computer's screen on every screen (1.2.0): the ground and what stands on it are a world 1200px wide
   (or the screen's width, when wider) that a phone swipes along and that follows the hero; the sky stays put */
.yard { touch-action: none; }
.sky .yworld { position: absolute; top: 0; bottom: 0; left: 50%; will-change: transform; transform-origin: 50% 100%; }   /* drawn larger on a phone held upright (yardZoom): from the bottom */
.sky .yworld.glide { transition: transform .35s cubic-bezier(.2, .8, .3, 1); }
.sky .ysel .edit-sel { z-index: 400; pointer-events: auto; }
.sky .yware.new { z-index: 450 !important; }
.yard .yedit { position: fixed; inset: 0; z-index: 6; pointer-events: none; } .yard .yedit > * { pointer-events: auto; }
.yard .yedit .edit-tray { top: calc(58px + env(safe-area-inset-top, 0px)); bottom: auto; padding-bottom: 10px; }
.yard .ysel .edit-sel { top: auto; transform: translate(-50%, 0); } .sky .mailbox > svg * { transform-box: view-box; }
.sky .mailbox .mb-shadow { fill: rgba(0, 0, 0, .16); opacity: var(--day); }
.sky .mailbox .mb-post { fill: color-mix(in srgb, #8a5a36 calc(var(--md, var(--day, 1)) * 100%), #15173c); transition: fill 3s; }
.sky .mailbox .mb-body { fill: color-mix(in srgb, #4a7fa8 calc(var(--md, var(--day, 1)) * 100%), #1d2152); transition: fill 3s; }
.sky .mailbox .mb-rim { fill: none; stroke: color-mix(in srgb, rgba(255, 255, 255, .45) calc(var(--md, var(--day, 1)) * 100%), rgba(160, 170, 255, .2)); stroke-width: 1.2; stroke-linecap: round; }
.sky .mailbox .mb-lid { fill: color-mix(in srgb, #3a6a92 calc(var(--md, var(--day, 1)) * 100%), #171a45); transform-origin: 6.2px 35px; transition: fill 3s, transform .28s ease-out; }
.sky .mailbox.open .mb-lid { transform: rotate(-80deg); }
.sky .mailbox .mb-flag { fill: color-mix(in srgb, #e2483b calc(var(--md, var(--day, 1)) * 100%), #c9463c); transform-origin: 38px 27.9px; transition: fill 3s, transform .55s cubic-bezier(.3, 1.6, .5, 1); }
.sky .mailbox.has .mb-flag { transform: rotate(90deg); }
.sky .mailbox .mb-pin { fill: color-mix(in srgb, #d7dde4 calc(var(--md, var(--day, 1)) * 100%), #4a4f80); }
.sky .mailbox .mb-env { fill: color-mix(in srgb, #fffdf5 calc(var(--md, var(--day, 1)) * 100%), #c9cdea); opacity: 0; transition: fill 3s, opacity .3s; }
.sky .mailbox.has .mb-env { opacity: 1; }
.sky .mailbox .mbox { position: absolute; left: -8px; right: -8px; top: 6px; bottom: -4px; pointer-events: auto; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.sky .mailbox .mbox .tag { top: calc(100% + 10px); }
@keyframes flagUp { from { transform: rotate(0deg); } }
.yard.anim .mailbox.has .mb-flag { animation: flagUp .7s cubic-bezier(.3, 1.6, .5, 1) .7s backwards; }
/* the letters (2026-11-13, the user's pick): in the mailbox a pile of envelopes (a postcard for the app's short ones); opened, the
   sheet drawn up out of its envelope. The paper in its own light colours whatever the theme, lamp-lit by night as the books are */
.letters { display: flex; flex-direction: column; gap: 12px; }
.letter, .letter-list { --pp: color-mix(in srgb, #fffdf7 calc(var(--day, 1) * 100%), #ebdfc3); --rule: color-mix(in srgb, #ead9c6 calc(var(--day, 1) * 100%), #d3bf9e); --kraft: color-mix(in srgb, #ecdcb8 calc(var(--day, 1) * 100%), #c8b088);
  --lamp: radial-gradient(130% 100% at 18% -5%, rgba(255, 222, 160, calc(.28 * (1 - var(--day, 1)))), rgba(255, 222, 160, 0) 45%, rgba(46, 30, 12, calc(.28 * (1 - var(--day, 1)))) 100%); }
.ltr-sheet, .pc { --bg-elev: var(--pp); --bg-elev-2: color-mix(in srgb, var(--pp) 60%, #fff); --line: var(--rule); --line-2: #d8c9a8; --fg: #3b3428; --fg-2: #5b513f; --fg-3: #8a7d66; color-scheme: light; color: var(--fg); }
.ltr-sheet { position: relative; margin: 0 14px; padding: 16px 18px 50px; border-radius: 3px; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45);
  background: var(--lamp), repeating-linear-gradient(transparent 0 25px, var(--rule) 25px 26px) 0 16px / 100% calc(100% - 66px) no-repeat, var(--pp); font-size: 14px; line-height: 26px; }   /* the words sit on the lines */
.ltr-art { position: absolute; top: 8px; right: 10px; width: 54px; height: 36px; }
.letter-title { font-weight: 700; font-size: 15px; line-height: 26px; margin: 0 58px 0 0; }
.letter-body { font-size: 14px; line-height: 26px; color: var(--fg-2); }
.letter-body ul { margin: 0; padding-left: 1.2em; }
.letter-body p { margin: 0; text-indent: 2em; text-wrap: pretty; } .letter-body .letter-sign { display: flex; justify-content: flex-end; align-items: center; gap: 8px; height: 26px; margin: 0; text-indent: 0; font-weight: 700; color: var(--fg); }
.letter[style*="--hanko"] .letter-sign::after { content: var(--hanko); display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border: 1.6px solid #c8392f; border-radius: 50%; writing-mode: vertical-rl;   /* the writer's seal */
  font: 700 10px/1 'Hiragino Mincho ProN', 'Noto Serif JP', serif; letter-spacing: -.1em; color: #c8392f; transform: rotate(-8deg); opacity: .9; }
.ltr-env { position: relative; z-index: 1; height: 92px; margin-top: -40px; border-radius: 6px; background: var(--lamp), radial-gradient(rgba(120, 80, 30, .08) 1px, transparent 1.5px) 0 0 / 6px 7px, var(--kraft); box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5); }
.ltr-env::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 12px; border-radius: 6px 6px 0 0; background: rgba(90, 60, 20, .1); }   /* its open mouth */
.ltr-zip { position: absolute; left: 14px; top: 18px; display: flex; gap: 2px; align-items: center; color: #c8392f; font-size: 12px; } .ltr-zip i { width: 11px; height: 14px; border: 1.2px solid #d2564a; } .ltr-zip em { font-style: normal; margin: 0 1px; }
.ltr-stamp { position: absolute; right: 14px; top: 14px; width: 34px; height: 40px; padding: 4px; background: #fff;   /* perforated round its edge only */
  -webkit-mask: linear-gradient(#000, #000) center / calc(100% - 5px) calc(100% - 5px) no-repeat, radial-gradient(circle 2.2px at 2.4px 2.4px, transparent 98%, #000) -2.4px -2.4px / 6.4px 6.4px;
  mask: linear-gradient(#000, #000) center / calc(100% - 5px) calc(100% - 5px) no-repeat, radial-gradient(circle 2.2px at 2.4px 2.4px, transparent 98%, #000) -2.4px -2.4px / 6.4px 6.4px; }
.ltr-stamp b { display: grid; height: 100%; place-items: end; padding: 2px 3px; background: linear-gradient(160deg, #6fa6c8, #3f6f9a); color: #fff; font-size: 9px; }
.ltr-pm { position: absolute; right: 40px; top: 24px; display: grid; place-items: center; width: 42px; height: 42px; border: 1.3px solid rgba(60, 40, 90, .5); border-radius: 50%; font-size: 8.5px; line-height: 1.3; text-align: center; color: rgba(60, 40, 90, .7); transform: rotate(-12deg); }
.ltr-to { position: absolute; left: 0; right: 0; top: 46px; text-align: center; font-size: 17px; color: #3a2c24; letter-spacing: .1em; }
.ltr-from { position: absolute; right: 14px; bottom: 6px; font-size: 11.5px; color: #5b4a38; }
.letter.drawn .ltr-sheet { animation: ltrDraw .5s cubic-bezier(.2, .8, .3, 1) .08s backwards; } @keyframes ltrDraw { from { transform: translateY(46px); } }
.pc { width: min(320px, 100%); margin: 0 auto; padding: 12px; display: grid; gap: 8px; border-radius: 6px; background: var(--lamp), var(--pp); box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45); }   /* upright, as a はがき is */
.pc-top { display: flex; justify-content: space-between; align-items: start; } .pc .ltr-zip { position: static; }
.pc-stamp { display: grid; place-items: center; width: 34px; height: 40px; border: 1px solid #d2564a; color: #c8392f; font-size: 8.5px; line-height: 1.25; text-align: center; }
.pc-pic { width: 100%; display: block; border-radius: 4px; } .pc .letter-title { margin: 4px 0 2px; }
.pc .letter-body { background: repeating-linear-gradient(transparent 0 25px, var(--rule) 25px 26px); }
.letter.pcard.drawn .pc { animation: gotIn .3s ease-out; }
@media (prefers-reduced-motion: reduce) { .letter.drawn :is(.ltr-sheet, .pc) { animation: none; } }
.letter-list { display: grid; gap: 8px; }
.letter-row { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 56px 12px 12px; border: 0; border-radius: 6px; color: #3b3428; font: inherit; text-align: left; cursor: pointer;
  background: var(--lamp), radial-gradient(rgba(120, 80, 30, .08) 1px, transparent 1.5px) 0 0 / 6px 7px, var(--kraft); box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .45); }   /* an envelope */
.letter-row::after { content: ''; position: absolute; right: 12px; top: 10px; width: 26px; height: 30px; background: linear-gradient(160deg, #6fa6c8, #3f6f9a); box-shadow: 0 0 0 2px #fff, 0 1px 3px 2px rgba(0, 0, 0, .15); }   /* its stamp */
.letter-row.pcard { background: var(--lamp), var(--pp); } .letter-row.pcard::after { width: 22px; height: 26px; background: none; border: 1px solid #d2564a; box-shadow: none; }
.letter-row .lr-face { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--pp) 70%, #fff); overflow: hidden; color: #8a7d66; } .letter-row .lr-face svg { width: 100%; height: 100%; }
.letter-row.pcard .lr-face { border-radius: 4px; width: 46px; height: 32px; } .letter-row.pcard .lr-face svg { width: 100%; height: 100%; object-fit: cover; }
.letter-row .lr-title { flex: 1; min-width: 0; display: grid; font-weight: 600; } .letter-row .lr-title small { font-weight: 400; color: #7a6c56; }
.letter-row .lr-state { flex: none; font-size: 12px; padding: 2px 8px; border-radius: 99px; } .letter-row.unread .lr-state { color: #fff; background: #d8453a; } .letter-row.read { filter: saturate(.7); } .letter-row.read .lr-state { color: #7a6c56; border: 1px solid rgba(90, 60, 20, .25); }
.letter-row.read .lr-title { font-weight: 500; }
.letter-got { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--fg-2); }
.letter-got .koto-i, .letter [data-act="letter-gift"] .koto-i { width: 18px; height: 18px; }
.letter [data-act="letter-gift"] { display: inline-flex; align-items: center; gap: 5px; }
/* walking in: the yard zooms into the door; 書房 eases in when it opens (out through the door: ROOM.door) */
@keyframes roomIn { from { opacity: 0; transform: scale(1.05); } }
.study.anim .room-wrap { animation: roomIn .4s ease-out backwards; }
.yard.entering .sky { transform: scale(2.6); opacity: 0; transform-origin: calc(50% + var(--ycx, 0px)) calc(100% - 232px * var(--yz, 1)); transition: transform .42s ease-in, opacity .42s ease-in; }
/* the dive (diveInto): the notebook's light spreads over the screen and fades into the questions */
.dive-veil { position: fixed; z-index: 90; border-radius: 50%; pointer-events: none; transform: scale(.04); opacity: 0; transition: transform .34s cubic-bezier(.5, 0, .8, .4), opacity .1s;
  background: radial-gradient(closest-side, #fff, color-mix(in srgb, var(--accent) 50%, #fff) 15%, var(--accent) 40%, color-mix(in srgb, var(--accent) 70%, var(--bg)) 62%, transparent); }   /* sized so the opaque 62% reaches the farthest corner */
.dive-veil.cover { transform: scale(1); opacity: 1; }
.dive-veil.out { opacity: 0; transition: opacity .35s ease-out; }
.tools-part { margin-top: 36px; }   /* 工具與 AI below 學習分析 (1.1.0) */
.top-home { display: inline-flex; align-items: center; padding: 4px 11px 4px 8px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg-elev); color: var(--fg-2); font-size: 13px; cursor: pointer; }
/* ---------- 聽一輪 (the 🎧 tab): 錯題本｜單字 over the player ---------- */
.listen-seg { display: flex; margin-bottom: 12px; }
/* 書房's headphones lying on the desk over the player (1.1.0; no stand since 1.3.0); the notes rise while it plays */
.listen-top { align-items: center; }
@media (max-width: 900px) { .listen-top { justify-content: center; margin-bottom: 8px; } }
.listen-stand { position: relative; flex: none; width: 64px; height: 60px; }
.listen-stand svg { display: block; width: 64px; height: 60px; overflow: visible; }
.listen-stand .desk-top { fill: color-mix(in srgb, #b08159 70%, var(--bg)); }
.listen-stand .band { stroke: #5a6cf0; } .listen-stand .cup { fill: #4a58d6; } .listen-stand .pad { fill: #333d9c; }
.listen-stand .notes i { position: absolute; left: 50%; top: 8px; font-style: normal; font-size: 14px; font-weight: 700; line-height: 1; color: var(--accent); opacity: 0; pointer-events: none; }
.listen-stand.playing .notes i { animation: tune 3.3s ease-in-out var(--w) infinite; }
@media (prefers-reduced-motion: reduce) { .listen-stand.playing .notes i { animation: none; } }
.listen-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.listen-seg .n { font-size: 11px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.install-guide ol { padding-left: 20px; margin: 4px 0 0; } .install-guide li { margin-bottom: 4px; } .install-guide p { margin: 6px 0 0; }
.listen.compact .listen-opts { position: relative; }
@media (max-width: 600px) { .listen.compact .listen-opts { padding-right: 84px; } }   /* the pills keep clear of the count at the corner */
.listen.compact .listen-count { position: absolute; right: 0; bottom: 6px; font-size: 11px; color: var(--fg-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 沉浸播放 (the full-page player): no chrome, the card fills the screen, always the landscape layout (word + meaning | example).
   A portrait viewport (iPhone cannot be turned by script) gets the whole page rotated 90°: the box is sized to the swapped
   viewport and turned around its top-left corner, so the notch (device top) ends up at the page's left edge. */
body.immersive .sidebar, body.immersive .topbar { display: none; }
body.immersive .app { grid-template-columns: 1fr; height: 100svh; } @supports (height: 1dvh) { body.immersive .app { height: 100dvh; } }
body.immersive .main { min-height: 0; background: var(--bg); }
body.immersive .content { max-width: none; flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
@media (orientation: portrait) {
  body.immersive .main { position: fixed; top: 0; left: 0; width: 100svh; height: 100svw; transform: translateX(100svw) rotate(90deg); transform-origin: top left; }
  @supports (height: 1dvh) { body.immersive .main { width: 100dvh; height: 100dvw; transform: translateX(100dvw) rotate(90deg); } }
  body.immersive .content { padding: 8px calc(8px + env(safe-area-inset-bottom, 0px)) 8px calc(8px + env(safe-area-inset-top, 0px)); }
}
body.immersive .card.listen.full { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; padding: 10px 16px 10px; }
body.immersive .listen.full .listen-x { position: absolute; top: 6px; right: 6px; z-index: 2; }
body.immersive .listen.full .listen-meta { position: absolute; left: 18px; bottom: 26px; font-size: 12px; white-space: nowrap; max-width: 34%; overflow: hidden; text-overflow: ellipsis; }
body.immersive .listen.full .listen-opts { position: absolute; right: 16px; bottom: 20px; margin: 0; }
.listen.full .listen-x, .listen.full .listen-meta { }   /* (in the plain full page these sit in flow via the rules below) */
body:not(.immersive) .listen.full .listen-x { float: right; } body:not(.immersive) .listen.full .listen-meta { display: block; margin-bottom: 6px; }
body.immersive .listen.full #listenCard { contain: size; flex: 1 1 0; height: auto; min-height: 120px; overflow: hidden; }   /* never scrolls: fitFlash() shrinks the type until everything is inside */
/* one column, top to bottom: (caption) Japanese, Chinese, example — sized by fitFlash() to fill the box without overflowing */
body.immersive .listen.full .flash { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; padding: 2px 8px; }
body.immersive .listen.full .flash .word { white-space: nowrap; line-height: 1.25; font-size: 56px; max-width: 100%; }
body.immersive .listen.full .flash .meaning { margin-top: 0; font-size: 26px; }
body.immersive .listen.full .flash .listen-sentence { font-size: 30px; line-height: 1.6; margin-top: 0; }
body.immersive .listen.full .flash .listen-ex { margin: 8px 0 0; width: min(100%, 720px); }
body.immersive .listen.full .example .jp { font-size: 22px; } body.immersive .listen.full .example .zh { font-size: 15px; }
body.immersive .listen.full .listen-ctl { margin-top: 4px; gap: 36px; } body.immersive .listen.full .hint { display: none; } body.immersive .listen.full .listen-bar { margin-top: 4px; }
body.immersive .listen.full .lplay { width: 56px; height: 56px; } body.immersive .listen.full .lplay svg { width: 26px; height: 26px; }
.listen-full { margin-left: auto; }
/* the theme picker button: name + count over a thin progress bar */
.theme-pick { font: inherit; text-align: left; min-width: 0; padding: 6px 10px 7px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-elev-2); color: var(--fg); cursor: pointer; }
.theme-pick .tp-row { display: flex; align-items: baseline; gap: 8px; } .theme-pick .tp-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.theme-pick .tp-n { margin-left: auto; white-space: nowrap; } .theme-pick .tp-caret { color: var(--fg-3); line-height: 1; }
.theme-pick .tp-bar { margin-top: 5px; height: 4px; }
.theme-list { display: flex; flex-direction: column; gap: 6px; }
.theme-row { font: inherit; text-align: left; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--fg); cursor: pointer; }
.theme-row.on { border-color: var(--accent-line); background: var(--accent-soft); } .theme-row:disabled { opacity: .45; cursor: default; }
.theme-row .tp-name { font-weight: 500; } .theme-row .bar { margin-top: 8px; }
/* the player: (word mode) the theme select, or the notebook's count, and the full-screen button on one line */
.listen-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.listen-head .select { min-width: 0; flex: 1 1 0; padding-top: 7px; padding-bottom: 7px; font-size: 13px; }   /* fills to the card's right edge, flush with the switch above */
@media (min-width: 901px) { .listen-head .select { max-width: 280px; } }
/* phones and tablets: 書房, the yard and 聽一輪 are one screen each — the player card takes the height left */
@media (max-width: 900px) {
  /* a fixed-height shell (min-height alone never lets flex items shrink); the content area scrolls on its own when a short screen needs it */
  body.fit .app { height: 100svh; } @supports (height: 1dvh) { body.fit .app { height: 100dvh; } }
  body.fit .main { min-height: 0; }
  #view.fit { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
  #view.fit > * { flex: none; }
  #view.fit > .listen-card { flex: 1 1 auto; display: flex; flex-direction: column; }
  #view.fit > :is(.yard, .study) { flex: 1 1 auto; min-height: 0; height: auto; }
  body.scene .topbar { display: none; }   /* 書房 and the yard are whole screens */
  /* contain: size — the item area's content does not count toward the card's minimum height, so the card shrinks until the
     area is 150px (then the content area scrolls) and never ends up shorter than its own controls */
  #view.fit .listen.compact #listenCard { contain: size; flex: 1 1 0; height: auto; min-height: 150px; max-height: 420px; }
  .listen.compact .listen-ctl { margin-top: 10px; } .listen.compact .listen-opts { margin-top: 12px; }
}

/* ---------- heatmap ---------- */
.heat-row { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-start; }
.heat-row > .grow { min-width: 0; }
.heat-stats { flex: 1 1 240px; align-content: start; }
@media (max-width: 760px) { .heat-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.heat-wrap { overflow-x: auto; padding-bottom: 4px; max-width: 100%; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 12px); gap: 3px; width: max-content; }
.heat i { width: 12px; height: 12px; border-radius: 3px; background: var(--heat-0); display: block; }
.heat i.l1 { background: var(--heat-1); } .heat i.l2 { background: var(--heat-2); } .heat i.l3 { background: var(--heat-3); } .heat i.l4 { background: var(--heat-4); }
.heat i.future { background: transparent; }
.heat i.today { outline: 1px solid var(--fg-3); outline-offset: 1px; }
.heat-months { display: grid; grid-auto-flow: column; gap: 3px; width: max-content; font-size: 11px; color: var(--fg-3); margin-bottom: 4px; }
.heat-months span { width: 12px; white-space: nowrap; overflow: visible; }
.legend { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--fg-3); }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ---------- course ---------- */
.unit-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 120px; gap: 14px; align-items: center; padding: 12px 12px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.unit-row:hover { background: var(--bg-hover); }
.unit-row.current { border-color: var(--accent-line); background: var(--accent-soft); }
.unit-weeks { font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.unit-title { font-weight: 500; }
.unit-desc { font-size: 13px; color: var(--fg-3); }
@media (max-width: 640px) { .unit-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
/* the stage cards fold (1.0.27): the head is the summary, ▸ turns when open, 完成 or the stage's % sits on the right */
.stage-card > summary { cursor: pointer; list-style: none; }
.stage-card > summary::-webkit-details-marker { display: none; }
.stage-card > summary .card-title::before { content: "▸"; display: inline-block; width: 1em; line-height: 1; text-align: center; color: var(--fg-3); transition: transform .15s; }   /* a box as tall as the glyph, so it turns in place */
.stage-card[open] > summary .card-title::before { transform: rotate(90deg); }
.stage-card > summary .card-sub { padding-left: 1em; }
.stage-card:not([open]) > summary { margin-bottom: 0; }
/* 課程 as 書房's bookcase (1.1.0): the shelf of course books on top, each stage card the cover of its book (a stage not begun
   waits dashed), ribbons on the current unit and the 目前 card; the covers darken under the night lamps (--cover-keep) */
.course-shelf { margin: 0 0 18px; padding: 12px 16px 6px; border-radius: 14px; background: var(--shelf); border: 1px solid var(--line); }
@media (max-width: 900px) { .course-shelf { margin: -16px -16px 16px; border-radius: 0; border-width: 0 0 1px; } }
[data-theme="dark"] .course-shelf { background: radial-gradient(170px 90px at 74px 62px, rgba(255, 190, 110, .18), rgba(255, 190, 110, 0) 70%), var(--shelf); }   /* the lamp on the books */
.course-shelf .spines { display: flex; align-items: flex-end; gap: 6px; height: 82px; }
.course-shelf .board { height: 8px; border-radius: 2px; background: var(--wood); box-shadow: 0 3px 0 var(--wood-edge); margin-bottom: 3px; }
.course-shelf .daruma { width: 34px; height: 38px; flex: none; }
[data-theme="dark"] .course-shelf .daruma { filter: brightness(.78); }
.spine { position: relative; flex: none; width: 34px; height: var(--h); padding: 7px 0 0; border: 1.5px dashed var(--line-2); border-radius: 3px 3px 1px 1px; background: none; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.spine.on { border: 0; background: color-mix(in srgb, var(--book) var(--cover-keep), var(--cover-shade)); box-shadow: inset -3px 0 0 rgba(0, 0, 0, .12); }
.spine.cur { height: calc(var(--h) + 10px); box-shadow: inset -3px 0 0 rgba(0, 0, 0, .14), 0 6px 12px -6px rgba(60, 30, 15, .6); }
.spine .lab { width: 22px; padding: 4px 0; border-radius: 2px; background: var(--label); color: var(--label-ink); font-size: 12px; font-weight: 700; line-height: 1.15; display: flex; justify-content: center; }
.spine .lab.v { writing-mode: vertical-rl; font-size: 11px; letter-spacing: 1px; align-items: center; }
.spine i { width: 24px; height: 2px; margin-top: auto; background: var(--gold); }   /* two gilt lines near the foot */
.spine i + i { margin: 3px 0 7px; }
.spine .num { font-size: 12px; font-weight: 700; color: var(--fg-3); }
.spine .rib { position: absolute; top: -4px; right: 3px; width: 10px; height: 22px; fill: var(--gold); }
.spine:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stage-card.book { padding: 0; overflow: hidden; }
.stage-card.book > summary { margin: 0; padding: 9px 10px; background: color-mix(in srgb, var(--book) var(--cover-keep), var(--cover-shade)); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .1); }
.stage-card.book > :not(summary) { margin-left: 16px; margin-right: 16px; }
.stage-card.book > .stage-foot { margin-bottom: 16px; }
.stage-card.book > .list { margin-top: 8px; margin-left: 6px; margin-right: 6px; }
.stage-label { flex: 1; min-width: 0; }
.stage-card.book .stage-label { background: var(--label); border-radius: 6px; padding: 8px 12px; }
.stage-card.book .stage-label .card-title { color: var(--label-ink); }
.stage-card.book .stage-label .card-title::before, .stage-card.book .stage-label .card-sub { color: var(--label-ink-2); }
.stage-card.book .stage-state { flex: none; padding: 3px 10px; border-radius: 99px; background: var(--label); color: var(--label-ink); font-size: 13px; font-weight: 700; }
.stage-card.book .stage-state .muted { color: var(--label-ink); }
.stage-card.book .stage-state .chip { padding: 0; border: 0; background: none; color: #3f6338; font-weight: 700; }
.stage-card.unbegun { background: none; border: 1.5px dashed var(--line-2); box-shadow: none; }
.now-card { position: relative; }
.now-card > .ribbon { position: absolute; top: -1px; right: 20px; width: 16px; height: 30px; fill: color-mix(in srgb, var(--book) var(--cover-keep), var(--cover-shade)); }
.now-card .label, .now-card .card-title { padding-right: 30px; }
.unit-row.current { position: relative; padding-right: 32px; }
.unit-row > .ribbon { position: absolute; top: -1px; right: 10px; width: 14px; height: 26px; fill: color-mix(in srgb, var(--book) var(--cover-keep), var(--cover-shade)); }
.stage-state { flex: none; font-size: 13px; }
.lesson h3 { font-size: 16px; margin: 18px 0 6px; }
/* 講義's own screen (2026-11-11): pages all one size between a top and a foot strip, swiped sideways; a stack of sheets */
body.reading { overflow: hidden; }
.reader { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--bg); padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.rd-top, .rd-foot { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 720px; margin: 0 auto; }
.rd-top { padding: 10px 14px 6px; }
.rd-name { min-width: 0; }
.rd-title { font-size: 15px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-track { flex: 1; min-height: 0; display: flex; width: 100%; max-width: 720px; margin: 0 auto; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.rd-track::-webkit-scrollbar { display: none; }
.rd-page { flex: 0 0 100%; min-width: 0; height: 100%; padding: 6px 24px 18px 14px; scroll-snap-align: start; scroll-snap-stop: always; }
.rd-sheet { height: 100%; overflow-y: auto; padding: 22px 20px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--line);
  box-shadow: 4px 5px 0 -1px var(--bg-elev), 4px 5px 0 0 var(--line), 8px 10px 0 -1px var(--bg-elev), 8px 10px 0 0 var(--line); font-size: 17px; line-height: 1.8; }
.rd-sheet > * + * { margin-top: 10px; }
.rd-sheet > :first-child { margin-top: 0; }
.rd-sheet h3 { font-size: 20px; margin: 0 0 8px; }
.rd-sheet .rule { font-size: 15px; margin: 0; }
.rd-sheet ul { margin: 10px 0 0; padding-left: 22px; }
.rd-sheet li { color: var(--fg); margin: 0; }
.rd-sheet .example { margin-bottom: 0; }
.rd-sheet .example .jp { font-size: 19px; }
.rd-sheet .example .zh { font-size: 14px; }
.rd-sheet .tipbox { font-size: 16px; line-height: 1.8; }
.rd-sheet .kana-grid { margin: 0; gap: 4px; max-width: none; }
.rd-sheet > * + .kana-grid { margin-top: 10px; }
.rd-sheet .kana-cell { flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: 4px; padding: 3px 0; line-height: 1.2; }   /* the whole table on one page: カタカナ and rōmaji share a line */
.rd-sheet .kana-cell .hira { flex-basis: 100%; text-align: center; font-size: 19px; }
.rd-sheet .kana-cell .kata, .rd-sheet .kana-cell .roma { font-size: 11px; }
.lp-title { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--fg-3); }
.rd-sheet .lp-ex { margin-top: 18px; }
.lp-formula { font-size: 16px; line-height: 1.8; }
.rd-foot { flex-direction: column; gap: 6px; padding: 2px 24px 14px; }
.rd-track.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.lp-fin { text-align: center; color: var(--fg-3); letter-spacing: .3em; font-size: 14px; padding-top: 18px; }
.rd-bar { width: 100%; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.rd-bar i { display: block; height: 100%; background: var(--accent); transition: width .25s ease; }
.rd-count { font-size: 13px; color: var(--fg-3); }
.lesson .rule { display: inline-block; font-size: 13px; color: var(--fg-2); background: var(--bg-sunken); border: 1px solid var(--line); padding: 4px 10px; border-radius: 8px; margin: 2px 0 8px; }
.lesson ul { margin: 6px 0 10px; padding-left: 20px; }
.lesson li { margin: 4px 0; color: var(--fg-2); }
.example { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--bg-sunken); border: 1px solid var(--line); margin: 8px 0; }
.example > div { flex: 1; min-width: 0; }
.example .jp { font-size: 17px; line-height: 1.9; }
.example .zh { font-size: 13px; color: var(--fg-3); }
.kana-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 10px 0 14px; max-width: 420px; }
.kana-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-sunken); color: var(--fg); font: inherit; cursor: pointer; }
.kana-cell.empty { border-color: transparent; background: transparent; cursor: default; }
.kana-pair { display: grid; gap: 10px; margin: 8px 0; }
.kana-pair .kana-script-seg { justify-self: start; }
.kana-table-title { font-size: 12px; color: var(--fg-3); margin-bottom: 4px; }
.kana-heat { display: grid; gap: 4px; max-width: 420px; }
.kana-heat-row { display: grid; grid-template-columns: 26px repeat(5, minmax(0, 1fr)) 40px; gap: 4px; align-items: stretch; }
.mark-btn.mark-sm { min-width: 0; min-height: 0; padding: 0 4px; font-size: 11.5px; }   /* 我的標記 at a 五十音 row's end */
.kana-all { display: flex; align-items: center; justify-content: flex-end; gap: 8px; max-width: 420px; margin-top: 8px; } .kana-all .mark-sm { min-width: 48px; min-height: 28px; }
.kana-heat .kana-cell { padding: 5px 0 3px; min-width: 0; }
.kana-heat .kana-cell .hira { font-size: 20px; }
.kana-heat .kana-cell .roma { font-size: 10px; }
.kana-cell.heat-1 .roma, .kana-cell.heat-2 .roma, .kana-cell.heat-3 .roma, .kana-cell.heat-4 .roma { color: inherit; opacity: .8; }
@media (max-width: 760px) { .kana-pair[data-show="hira"] .kana-table[data-script="kata"], .kana-pair[data-show="kata"] .kana-table[data-script="hira"], .kana-table-title { display: none; } }
@media (min-width: 761px) { .kana-pair { grid-template-columns: repeat(2, minmax(0, 420px)); gap: 24px; } .kana-pair .kana-script-seg { display: none; } }
.kana-cell.heat-1 { background: var(--heat-1); } .kana-cell.heat-2 { background: var(--heat-2); } .kana-cell.heat-3 { background: var(--heat-3); color: #fff; } .kana-cell.heat-4 { background: var(--heat-4); color: #fff; }
.kana-row-btn { border: 1px solid var(--line); background: var(--bg-elev-2); border-radius: 8px; font-size: 10px; cursor: pointer; color: inherit; }
.kanji-chip { cursor: pointer; font-size: 15px; padding: 1px 8px; }
.theme-card { cursor: pointer; } .theme-card:hover { border-color: var(--line-2); background: var(--bg-hover); }   /* the card opens its word table (1.0.27) */
/* 單字 as 書房's card box (1.1.0): the themes are index cards (a coloured tab at the top left, the red rule under the
   heading), the levels its dividers */
.theme-grid { row-gap: 22px; }
.index-card { position: relative; margin-top: 10px; overflow: visible; }
.index-card::before { content: ''; position: absolute; left: 16px; top: -11px; width: 46px; height: 11px; border-radius: 5px 5px 0 0; background: color-mix(in srgb, var(--tab) var(--cover-keep), var(--cover-shade)); }
.index-card > .row:first-child { padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1.5px solid color-mix(in srgb, #d9786a 55%, transparent); }
.seg.dividers { display: flex; gap: 4px; padding: 0 6px; border: 0; border-bottom: 1.5px solid var(--line-2); border-radius: 0; background: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.seg.dividers button { flex: none; margin-bottom: -1.5px; padding: 7px 11px 6px; border: 1.5px solid var(--line-2); border-bottom: 0; border-radius: 9px 9px 0 0; background: var(--bg-sunken); color: var(--fg-2); box-shadow: none; }
.seg.dividers button[aria-pressed="true"] { padding-bottom: 7.5px; background: var(--bg-elev); color: var(--fg); font-weight: 700; }
.theme-link { display: block; color: inherit; text-decoration: none; }
.kana-cell .hira { font-size: 22px; line-height: 1.2; }
.kana-cell .kata { font-size: 13px; color: var(--fg-2); }
.kana-cell .roma { font-size: 11px; color: var(--fg-3); }
.chip-link { cursor: pointer; border-style: dashed; font: inherit; font-size: inherit; }
.tipbox { padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); border: 1px solid transparent; color: var(--fg); font-size: 14px; }

/* ---------- practice ---------- */
.pr-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pr-top .bar { flex: 1; }
.pr-count { font-size: 13px; color: var(--fg-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 18px; box-shadow: var(--shadow); }
.q-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--fg-3); margin-bottom: 10px; }
.q-instr { font-size: 14px; color: var(--fg-2); margin-bottom: 10px; }
.q-stem { font-size: 26px; line-height: 2.05; font-weight: 500; word-break: break-word; }
.q-stem.word { font-size: 52px; line-height: 1.7; text-align: center; padding: 6px 0; }
.q-stem.zhstem { font-family: inherit; font-size: 24px; text-align: center; }
.q-sub { margin-top: 6px; font-size: 14px; color: var(--fg-3); }
.q-stem:is(.word, .zhstem) + .q-sub { text-align: center; }
.q-sub .toggle-zh { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font-size: 13px; }
/* a reading question sits under its passage and should not outshine it */
.passage + .q-stem { font-size: 20px; font-weight: 400; line-height: 1.95; }
@media (max-width: 600px) { .q-card { padding: 18px 16px 14px; } .q-stem { font-size: 20px; line-height: 1.9; } .q-stem.word { font-size: 44px; } .passage + .q-stem { font-size: 18px; } }
/* baseline, not centre (2026-11-13): a word with furigana is a ruby item of its own, and centring it with its reading pushed its kanji
   below the kana; and the box sits on the sentence's line, so a filled word reads level with the words around it */
.blank { display: inline-flex; align-items: baseline; justify-content: center; min-width: 3.2em; padding: 0 8px; margin: 0 3px; line-height: 1.5; border-radius: 8px; border: 1.5px dashed var(--accent-line); color: var(--accent); background: var(--accent-soft); font-size: .9em; vertical-align: baseline; }
.blank.filled { border-style: solid; color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); }
.blank.star { min-width: 2.2em; }
.uline { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--accent); }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.opts.wide { grid-template-columns: 1fr; }
@media (max-width: 600px) { .opts { grid-template-columns: 1fr; } }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-elev-2); cursor: pointer; text-align: left; font-size: 18px; line-height: 1.6; transition: border-color .12s, background .12s; }
.opt:hover:not(:disabled) { border-color: var(--accent-line); background: var(--bg-hover); }
.opt:disabled { cursor: default; }
.opt.zh { font-size: 16px; }
.opt.long { font-size: 16px; }
.opt.correct { border-color: var(--ok-line); background: var(--ok-soft); }
.opt.correct .kbd { border-color: var(--ok-line); color: var(--ok); }
.opt.wrong { border-color: var(--bad-line); background: var(--bad-soft); }
.opt.wrong .kbd { border-color: var(--bad-line); color: var(--bad); }
.opt.faded { opacity: .55; }
/* Japanese options: a line tall enough for furigana, so options with and without it sit at the same height */
.opt > .jp { line-height: 2.1; }
/* options of one or two characters (百 目 日 白, ち ら き さ, ga gi): the shape is the question, so they are big, two by two */
.opts.glyph { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts.glyph .opt { position: relative; flex-direction: column; justify-content: center; gap: 0; min-height: 76px; padding: 8px 12px; font-size: 32px; line-height: 1.3; text-align: center; }
.opts.glyph .opt > .jp { line-height: 1.6; }
.opts.glyph .opt .kbd { position: absolute; left: 10px; top: 10px; }
.opts.glyph .opt-zh { margin-left: 0; max-width: 100%; text-align: center; }
/* 讀讀看 (2026-11-14): four pictures to pick from; one inside the 答錯了 line and the phone panel's list, small */
.opt .opt-pic { width: 76px; height: 76px; } .fb-head .opt-pic, .fb-opt .opt-pic { display: inline-block; width: 26px; height: 26px; vertical-align: -7px; }
.opt-audio { padding: 6px 8px 6px 12px; gap: 8px; cursor: default; }
.opt-play { flex: 1 1 auto; display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 4px; border: 0; background: none; color: var(--accent); font-size: 16px; font-weight: 500; cursor: pointer; text-align: left; border-radius: 8px; }
.opt-play:hover { background: var(--bg-hover); }
.opt-play svg { width: 20px; height: 20px; flex: none; }
.opt-pick { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-elev); color: var(--fg-2); font-size: 14px; cursor: pointer; }
.opt-pick:hover:not(:disabled) { border-color: var(--accent-line); background: var(--bg-hover); color: var(--fg); }
.changelog { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.changelog ul { margin: 4px 0 0; padding-left: 18px; }
.changelog ul li { margin: 2px 0; line-height: 1.55; }
.opt-zh { margin-left: auto; flex: 0 1 auto; max-width: 48%; text-align: right; font-size: 13px; line-height: 1.35; color: var(--fg-3); }
.feedback { margin-top: 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-sunken); }
.feedback.ok { border-color: var(--ok-line); }
.feedback.bad { border-color: var(--bad-line); }
/* the result in three sizes: 17 the answer and the sentence, 15 the options and the note, 13 the small print */
.fb-head { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.fb-head svg { width: 20px; height: 20px; flex: none; }
.fb-head.ok { color: var(--ok); } .fb-head.bad { color: var(--bad); }
.fb-full { font-size: 17px; line-height: 2; margin: 4px 0; }
.fb-why { color: var(--fg-2); font-size: 15px; }
.fb-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 10px; font-size: 13px; color: var(--fg-3); }
.fb-meta .chip { font-size: 13px; }
.pr-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pr-actions .left, .pr-actions .right { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
@media (hover: none) and (pointer: coarse) { .kbd-hint, .opt .kbd, .opt-pick .kbd { display: none !important; } }   /* touch screens: no keyboard, no key hints (2026-11-11, the user: nor the options' 1–4) */
.banner.compact { padding: 8px 12px; font-size: 13px; gap: 8px 12px; }
.pr-next { display: flex; justify-content: flex-end; margin-top: 12px; }
@media (max-width: 600px) {
  /* only the button sticks (the tool row stays in flow above the feedback), on a solid strip so nothing shows through */
  .pr-next { position: sticky; bottom: 0; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); background: var(--bg); }
  .pr-next .btn-primary { width: 100%; min-height: 48px; font-size: 16px; }
  /* 1.0.42: ✕ and the progress bar stay on top while a long answer scrolls (the page's top padding moves into the strip) */
  body.practicing .content { padding-top: 0; }
  body.practicing .pr-top { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 10px; margin: 0 -16px 6px; }   /* across the side gutters too, so the card's shadow does not show beside it */
  /* the card fills the screen and the options (or tiles) sit at its foot, the tool row under it, where a thumb reaches;
     a card taller than the screen just scrolls. Flex items keep their margins apart: none of the card's blocks has a margin next to another's. */
  body.practicing .content:has(> .q-card) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  body.practicing .content > .q-card { flex: 1 0 auto; display: flex; flex-direction: column; }
  .q-card > :is(.opts, .spell, .order, .match) { margin-top: auto; }
  /* a word or a kanji on its own sits halfway down the room the options leave (a sentence stays at the top) */
  .q-card > .q-stem:is(.word, .zhstem, .picstem) { margin-top: auto; }
  .q-card > .opts { padding-top: 18px; }
  /* 1.0.43: the result rises from the bottom in a panel (renderPractice draws it on a phone only) while the options stay put:
     the page keeps its tool row as an inert ghost of the same height, and room under the page (--sheet-h, kept by sheetFit)
     lets everything scroll up above the panel. It shows after the answer's pop or shake, and only on that draw. */
  body.practicing .content:has(> .fb-sheet) { margin-bottom: var(--sheet-h, 0px); }
  .pr-ghost { visibility: hidden; }
  .fb-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-height: 70vh; max-height: 70dvh; display: flex; flex-direction: column; background: linear-gradient(var(--ok-soft), var(--ok-soft)), var(--bg-elev); border-top: 2px solid var(--ok-line); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 30px -14px rgba(0,0,0,.55); }
  .fb-sheet.bad { background: linear-gradient(var(--bad-soft), var(--bad-soft)), var(--bg-elev); border-top-color: var(--bad-line); }
  .fb-sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px 0; }
  .fb-sheet .feedback { margin: 0; padding: 0; border: 0; background: none; }
  .fb-sheet .pr-actions { margin-top: 8px; }
  .fb-sheet .pr-next { position: static; margin: 0; padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); background: none; }
  .fb-sheet.rise { animation: sheetUp .25s ease-out .3s backwards; }
  @keyframes sheetUp { from { transform: translateY(100%); } }
}
.fb-opts { display: grid; gap: 2px; margin: 0 0 8px; font-size: 15px; }
.fb-opt { display: flex; align-items: baseline; gap: 6px; color: var(--fg-2); }
.fb-opt .fb-mark { flex: none; width: 1.1em; text-align: center; color: var(--fg-3); }
.fb-opt.ok { color: var(--fg); } .fb-opt.ok .fb-mark { color: var(--ok); } .fb-opt.bad .fb-mark { color: var(--bad); }
.fb-opt-zh { color: var(--fg-3); font-size: 13px; }
.fb-you { margin-left: auto; flex: none; padding-left: 8px; font-size: 13px; color: var(--bad); }
.speak-big { display: inline-flex; align-items: center; gap: 10px; margin: 8px auto; padding: 14px 22px; border-radius: 99px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); cursor: pointer; font-size: 16px; }
.speak-big svg { width: 22px; height: 22px; }
.speech-prog { max-width: 320px; margin: 2px auto 0; }
.speech-prog .bar { height: 6px; border-radius: 99px; background: var(--bg-sunken); border: 1px solid var(--line); overflow: hidden; }
.speech-prog .bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s linear; }
.speech-prog.done .bar span { background: var(--ok); }
.speech-prog .lab { margin-top: 4px; text-align: center; }
.spell { text-align: center; }
.spell-out { min-height: 48px; font-size: 30px; letter-spacing: 2px; padding: 6px 0 10px; border-bottom: 2px solid var(--line-2); margin: 0 auto 14px; max-width: 420px; }
.spell-out.ok { border-color: var(--ok); } .spell-out.bad { border-color: var(--bad, #e5484d); }
.spell-piece { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; border-radius: 6px; cursor: pointer; }   /* a placed piece: tap to take it back */
.spell-piece:hover { background: var(--bg-hover); }
.spell-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.spell-tile { width: 52px; height: 52px; font-size: 24px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-sunken); color: var(--fg); cursor: pointer; }
.spell-tile:disabled { opacity: .25; cursor: default; }
.conj-tile { width: auto; min-width: 52px; padding: 0 10px; }
.conj-in { font-size: 24px; text-align: center; max-width: 320px; margin: 0 auto 10px; display: block; }
.fb-diff { margin-top: 6px; font-size: 17px; } .fb-diff mark { background: var(--bad-line, rgba(229,72,77,.25)); color: var(--bad); border-radius: 4px; padding: 0 2px; }
.order-sub { margin: 0 0 4px; text-align: center; }
.order-out { min-height: 48px; font-size: 22px; line-height: 2; padding: 6px 0 10px; border-bottom: 2px solid var(--line-2); margin: 0 auto 14px; max-width: 560px; text-align: center; }
.order-out.ok { border-color: var(--ok); } .order-out.bad { border-color: var(--bad, #e5484d); }
.order-slot { display: inline-block; min-width: 2.2em; margin: 0 3px; border-bottom: 2px solid var(--line-2); text-align: center; color: var(--fg-3); }
.order-slot.filled { color: var(--fg); border-color: var(--accent); }
button.order-slot { font: inherit; background: none; border-width: 0 0 2px; border-style: solid; border-radius: 0; padding: 0; cursor: pointer; }
button.order-slot:hover { background: var(--bg-hover); }
.order-slot.wrong { color: var(--bad); border-color: var(--bad); }
.order-slot.key { color: var(--accent); font-weight: 700; }   /* 句意拼貼: the piece that carries the grammar point, once answered */
.zh-build .order-out { font-size: 20px; }
.order-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.order-tile { padding: 10px 14px; font-size: 20px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-sunken); color: var(--fg); cursor: pointer; }
.order-tile:disabled { opacity: .25; cursor: default; }
/* 1.0.44: tiles and placed pieces can be dragged (a copy follows the finger, a gap opens where it would go) */
.q-card [data-ti] { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tile-drag { position: fixed; z-index: 90; margin: 0; pointer-events: none; transform: scale(1.08); box-shadow: 0 10px 24px -6px rgba(0,0,0,.45); background: var(--bg-elev-2); border: 1px solid var(--accent-line); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.tile-lifted { opacity: .25; }
.tile-away { position: absolute !important; visibility: hidden; }
.tile-gap { display: inline-block; width: 1.1em; height: 1em; margin: 0 2px; vertical-align: middle; border-radius: 6px; background: var(--accent-soft); }
.order-out .tile-gap { width: 3em; }
.tile-row .tile-ok { margin-left: auto; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.match-col { display: flex; flex-direction: column; gap: 8px; }
.match-word, .match-meaning { padding: 12px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-sunken); color: var(--fg); font: inherit; font-size: 16px; cursor: pointer; text-align: center; }
.match-word.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.preview.grammar .word { font-size: 24px; line-height: 1.4; }
.preview.grammar .rule { display: inline-block; text-align: left; font-size: 14px; color: var(--fg-2); background: var(--bg-sunken); border: 1px solid var(--line); padding: 6px 12px; border-radius: 8px; }
.preview.grammar .points { text-align: left; max-width: 560px; margin: 14px auto 0; padding-left: 20px; color: var(--fg-2); line-height: 1.7; }
.preview.grammar .points li + li { margin-top: 4px; }
.mlist { padding: 0; } .mlist.card { padding: 4px 16px; }
details.mrow { border-bottom: 1px solid var(--line); } details.mrow:last-child { border-bottom: none; }
details.mrow > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; }
details.mrow > summary::-webkit-details-marker { display: none; }
details.mrow > summary .mprompt { flex: 1 1 240px; font-size: 16px; line-height: 1.8; min-width: 0; }
details.mrow .mbody { padding: 4px 0 14px; }
.mgroup .mlist { padding: 0; }
/* 錯題本 as 書房's red notebook (1.1.0): its cover on top, the list on ruled paper with a red margin line */
.notebook-cover { position: relative; display: flex; align-items: center; height: 76px; margin: 0 0 18px; padding: 0 18px 0 48px; border-radius: 10px 14px 14px 10px; background: color-mix(in srgb, #b8463a var(--cover-keep), var(--cover-shade)); box-shadow: inset 12px 0 0 rgba(0, 0, 0, .14), 0 8px 18px -12px rgba(80, 30, 20, .6); }
@media (max-width: 900px) { .notebook-cover { margin: -16px -16px 16px; border-radius: 0; } }
.notebook-cover .stitch { position: absolute; left: 24px; top: 10px; bottom: 10px; border-left: 2px dashed rgba(255, 236, 210, .5); }
.nb-label { display: flex; flex-direction: column; gap: 1px; padding: 7px 16px; border-radius: 6px; background: var(--label); color: var(--label-ink); }
.nb-label b { font-size: 16px; } .nb-label span { font-size: 12.5px; color: var(--label-ink-2); }
.card.ruled { position: relative; padding-left: 32px; }
.card.ruled::before { content: ''; position: absolute; left: 19px; top: 0; bottom: 0; width: 1.5px; background: color-mix(in srgb, #d9786a 60%, transparent); }
.card.ruled details.mrow { border-bottom-color: color-mix(in srgb, #7f9cc8 38%, transparent); }
/* 模擬考's countdown with 書房's 日めくり hanging beside it (1.1.0): hung on a nail by a string, its page in paper colours */
.exam-cal-card { display: flex; align-items: flex-start; gap: 18px; }
.exam-cal-card > .grow { min-width: 0; }
.day-cal { position: relative; flex: none; width: 104px; padding-top: 16px; }
.day-cal::before { content: ''; position: absolute; top: 0; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #8a6a4a; }   /* the nail */
.day-cal::after { content: ''; position: absolute; top: 4px; left: 28%; right: 28%; height: 14px; border: 1.5px solid #8a6a4a; border-bottom: 0; border-radius: 50% 50% 0 0; }   /* the string */
.day-cal .sheet { overflow: hidden; border-radius: 3px; background: var(--paper); color: #3a3328; text-align: center; box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 6px 14px -8px rgba(60, 40, 20, .55); }
.day-cal .mon { padding: 3px 0; background: color-mix(in srgb, #b84a35 var(--cover-keep), var(--cover-shade)); color: #fff; font-size: 13px; font-weight: 700; }
.day-cal .date { margin-top: 2px; font-size: 40px; font-weight: 800; line-height: 1.1; }
.day-cal .wd { font-size: 12px; font-weight: 700; }
.day-cal .sat { color: #345fb0; } .day-cal .sun { color: #a83d2a; }   /* dark enough to read on the paper by night too */
.day-cal .stamp { width: fit-content; margin: 5px auto 0; padding: 0 6px; border: 1.5px solid #a83d2a; border-radius: 4px; color: #a83d2a; font-family: "Hiragino Mincho ProN", "Noto Serif JP", "Noto Serif CJK JP", serif; font-size: 11.5px; font-weight: 700; transform: rotate(-5deg); opacity: .9; }
.day-cal .left { margin: 6px 8px 0; padding: 4px 0 6px; border-top: 1px solid rgba(0, 0, 0, .08); color: #a83d2a; font-size: 11.5px; font-weight: 700; }
.match-word.matched, .match-meaning.matched { border-color: var(--ok); color: var(--ok); opacity: .7; cursor: default; }
@keyframes wrongFlash { 0%, 100% { border-color: var(--line); box-shadow: none; } 15%, 70% { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-line); } }
.match-word.wrong-flash, .match-meaning.wrong-flash { animation: wrongFlash .55s ease; }
/* 1.0.41: a progress ring, bar or gauge carrying data-anim plays once when its page opens (playAnims); an answer pops or shakes
   on the draw right after it (just-ok / just-bad); the practice bar slides from the last card's spot. Each starts from a var and
   ends on the element's own value, so with motion reduced (the rule at the top) everything simply shows where it ends. */
@keyframes ringIn { from { stroke-dashoffset: var(--from); } }
.ring.anim .arc { animation: ringIn .6s ease-out; }
@keyframes uncover { from { transform: scaleX(1); } }
.bar.stack[data-anim] { position: relative; }
.bar.stack[data-anim]::after { content: ''; position: absolute; inset: 0; background: var(--bg-sunken); transform-origin: right; transform: scaleX(0); }
.bar.stack.anim::after { animation: uncover .6s ease-out; }
@keyframes sweepIn { from { stroke-dasharray: 0 1; } to { stroke-dasharray: 1 0; } }   /* dashes only while it plays: at rest the mask is whole */
@keyframes needleIn { from { transform: rotate(var(--a)); } }
.gauge .needle { transform-origin: 100px 100px; }
.gauge.anim .sweep { animation: sweepIn var(--t) ease-out; } .gauge.anim .needle { animation: needleIn var(--t) ease-out; }
@keyframes barSlide { from { width: var(--from); } }
.bar > span.slide { animation: barSlide .3s ease-out; }
@keyframes pop { 40% { transform: scale(1.04); } }
@keyframes iconPop { from { transform: scale(.3); opacity: 0; } }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.q-card.just-ok :is(.opt.correct, .spell-out.ok, .order-out.ok) { animation: pop .3s ease-out; }
.q-card.just-ok .fb-head svg { animation: iconPop .3s cubic-bezier(.3, 1.6, .6, 1); }
.q-card.just-bad :is(.opt.wrong, .spell-out.bad, .order-out.bad) { animation: shake .3s ease; }
/* 1.0.50: the run chip by 答對了, the dots this answer lit and the 升到熟悉 chip; on a phone they wait for the panel to rise */
@keyframes dotUp { 0% { transform: scale(.2); } 55% { transform: scale(1.8); box-shadow: 0 0 0 3px var(--ok-soft); } }
.q-card.just-ok :is(.combo, .lv-up) { animation: iconPop .35s cubic-bezier(.3, 1.6, .6, 1); }
.q-card.just-ok .dots i.up { animation: dotUp .5s ease-out .1s backwards; }
.fb-sheet.rise :is(.combo, .lv-up) { animation: iconPop .35s cubic-bezier(.3, 1.6, .6, 1) .5s backwards; }
.fb-sheet.rise .dots i.up { animation: dotUp .5s ease-out .6s backwards; }
.preview { text-align: center; padding: 20px 10px 8px; }
.preview .word { font-size: 44px; font-weight: 600; line-height: 1.5; }
/* a word's picture (pics.js, 2026-11-11): above the word on its first look, and the stem of 看圖選字 */
.pic { display: block; width: 100%; height: auto; }
.pic .pd { fill: var(--pic-disc); } .pic .ps { fill: var(--pic-shadow); }
.pic .ph { fill: none; stroke: #fff; stroke-opacity: .38; stroke-width: 2.6; stroke-linecap: round; }
.pic .pst { fill: none; stroke: var(--pic-steam); stroke-width: 2.4; stroke-linecap: round; }
.preview .pic { width: 120px; margin: 0 auto 2px; }
.q-stem.picstem { padding: 2px 0; } .q-stem.picstem .pic { width: 190px; max-width: 60%; margin: 0 auto; }
.preview .reading { font-size: 18px; color: var(--fg-3); }
.preview .meaning { font-size: 22px; font-weight: 600; margin-top: 6px; }
.preview .example { margin-top: 16px; text-align: left; padding: 12px 14px; border-radius: 12px; background: var(--bg-sunken); }
/* a new kana's card (2026-11-14): big character, its romaji, where it came from, its other script, look-alikes */
.kana-preview .word { font-size: 72px; line-height: 1.3; }
.kana-preview .reading { font-size: 22px; font-weight: 600; color: var(--fg-2); }
.kana-preview .kp-origin { margin: 10px auto 4px; padding: 6px 12px; display: inline-block; border-radius: 10px; background: var(--bg-sunken); font-size: 15px; }
.kana-preview .kp-row { margin-top: 6px; font-size: 15px; } .kana-preview .kp-row .jp { font-size: 20px; }
.flash { text-align: center; padding: 28px 18px; }
.flash .word { font-size: 46px; font-weight: 600; line-height: 1.6; }
.flash .reading { font-size: 18px; color: var(--fg-3); }
.flash .meaning { font-size: 22px; font-weight: 600; margin-top: 8px; }
.fill-ans { color: var(--accent); font-weight: 600; }
.listen-sentence { font-size: 24px; line-height: 1.9; margin-top: 10px; }
.listen-ex { text-align: left; }
.listen-kanji, .listen-reads { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin-top: 8px; }
.listen-kanji .kanji-chip { display: inline-flex; align-items: baseline; gap: 5px; font-size: 16px; line-height: 1.4; padding: 1px 9px; }
.listen-kanji .lk-m { font-size: 12px; color: var(--fg-3); }
/* a kanji card (1.0.28): the kanji is the card's word and a button to its sheet; one example word on a line under the readings */
.listen-k { border: 0; background: none; padding: 0; cursor: pointer; }
.listen-reads .chip { font-size: 15px; padding: 1px 10px; }   /* as large as the word cards' kanji chips */
.listen-kex { margin-top: 8px; font-size: 17px; } .listen-kex .lk-r, .listen-kex .lk-m { margin-left: .4em; color: var(--fg-3); }
body.immersive .listen.full .flash .listen-kanji, body.immersive .listen.full .flash .listen-reads { margin-top: 4px; }   /* fitFlash shrinks the word for every pixel the row takes */
body.immersive .listen.full .flash .listen-reads .chip { font-size: 18px; } body.immersive .listen.full .flash .listen-kex { margin-top: 4px; font-size: 22px; }
/* the item area has a fixed height so the transport and pills never move when a word card gives way to a sentence card
   (the compact one 260px since 1.0.27: a word card with its kanji row is about 250px) */
.listen #listenCard { height: 290px; display: grid; align-content: center; overflow-y: auto; }
.listen.compact #listenCard { height: 260px; }
.listen.compact .flash { padding: 14px 8px 6px; } .listen.compact .flash .word { font-size: 34px; } .listen.compact .flash .meaning { font-size: 19px; }
.listen.compact .listen-sentence { font-size: 20px; } .listen.compact .lplay { width: 60px; height: 60px; } .listen.compact .lplay svg { width: 28px; height: 28px; }
.listen-bar { height: 3px; border-radius: 2px; background: var(--bg-sunken); margin: 6px 18px 0; overflow: hidden; }
.listen-bar span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s; }
.listen-ctl { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 16px; }
.lbtn { background: none; border: 0; color: var(--fg-2); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.lbtn svg { width: 28px; height: 28px; } .lbtn:hover { color: var(--fg); } .lbtn:active { background: var(--bg-sunken); }
.lplay { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .28); }
.lplay svg { width: 32px; height: 32px; } .lplay:active { transform: scale(.96); }
.listen-opts { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.lopt { font: inherit; font-size: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--fg-3); cursor: pointer; white-space: nowrap; }
.lopt svg { width: 16px; height: 16px; }
.lopt-scope { padding: 0 4px; gap: 0; } .lopt-scope span { padding: 3px 7px; border-radius: 99px; color: var(--fg-3); font-size: 12px; line-height: 1.4; } .lopt-scope span.on { color: var(--accent); background: var(--accent-soft); }   /* 字｜文: both sides visible, the lit one is playing */ .lopt { min-width: 44px; justify-content: center; font-weight: 600; } .lopt.on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.rate.two { grid-template-columns: repeat(2, 1fr); }
.flash .front-stem { font-size: 24px; line-height: 1.8; }
.rate .btn { flex-direction: column; gap: 0; min-height: 56px; }
.rate .btn small { font-size: 11px; color: var(--fg-3); font-weight: 400; }

/* ---------- ruby ---------- */
ruby { ruby-position: over; ruby-align: center; }
/* never smaller than 9px; no letter-spacing, so a long reading (しゅくだい over 宿題) pushes the words beside it no further than it must */
rt { font-size: max(.5em, 9px); color: var(--ruby); font-weight: 400; user-select: none; }
body.no-furi rt { visibility: hidden; }
body.no-furi .keep-furi rt { visibility: visible; }
body.furi-smart ruby.known rt { visibility: hidden; }
/* ---------- kanji, passages, charts ---------- */
.kanji-big { font-size: 72px; line-height: 1.1; font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif; }
.kanji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.kanji-tile { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-elev-2); font-size: 26px; cursor: pointer; color: var(--fg); }
.kanji-tile:hover { border-color: var(--accent-line); }
.kanji-tile.lv1 { background: var(--heat-1); } .kanji-tile.lv2 { background: var(--heat-2); } .kanji-tile.lv3 { background: var(--heat-3); color: #fff; } .kanji-tile.lv4 { background: var(--heat-4); color: #08130d; }
.kanji-tile.big { width: 88px; height: 88px; font-size: 52px; cursor: default; flex: none; }
.passage { font-size: 17px; line-height: 2; }
.chart-tip { position: fixed; z-index: 80; pointer-events: none; background: var(--bg-elev); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; font-size: 12px; color: var(--fg-2); box-shadow: var(--shadow); opacity: 0; transition: opacity .1s; }
.chart-tip b { color: var(--fg); font-size: 14px; display: block; }
.chart-tip.show { opacity: 1; }
.week-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.week-stat { min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--bg-sunken); border: 1px solid var(--line); }
.week-stat-v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; } .week-stat-v.up { color: var(--ok); }
.week-stat-l { font-size: 11px; color: var(--fg-3); }
.week-line { width: 100%; height: auto; display: block; margin-top: 12px; overflow: visible; }
.week-line polyline { fill: none; stroke: var(--heat-4); stroke-width: 2; stroke-linejoin: round; } .week-line .week-area { fill: var(--heat-4); opacity: .14; }
.week-dot { fill: var(--heat-4); outline: none; stroke: transparent; stroke-width: 14px; pointer-events: all; }   /* the stroke is the tap area */ .week-dot.today { fill: var(--accent); } .week-dot:hover, .week-dot:focus { filter: brightness(1.2); }
.week-axis { display: flex; justify-content: space-between; margin-top: 2px; font-size: 11px; color: var(--fg-3); } .week-axis .today { color: var(--accent); font-weight: 600; }
.week-share { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 12px; } .week-share-l, .week-empty { margin-top: 6px; }
.course-sub .btn { margin-left: 2px; vertical-align: baseline; } .course-text { margin-top: 8px; }
.course-line { width: 100%; max-width: 560px; height: auto; display: block; margin: 10px auto 4px; overflow: visible; }   /* wider than that, its labels outgrow the card's text */
.course-line .axis { stroke: var(--line-2); stroke-width: 4; stroke-linecap: round; } .course-line .start { fill: var(--fg-2); }
.course-line .mark { stroke: var(--fg-2); stroke-width: 1.5; } .course-line .mark.deadline { stroke-dasharray: 3 3; }
.course-line text { font-size: 11px; fill: var(--fg-3); } .course-line text.lvl { font-size: 12px; font-weight: 600; fill: var(--fg-2); }
.course-dot.other, .course-line text.other { fill: var(--ok); } .course-dot.target, .course-line text.target { fill: var(--accent); } .course-dot.late, .course-line text.late { fill: var(--warn); }
.course-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); } .course-row .strong { font-weight: 600; }
.course-lv { font-weight: 700; } .course-lv.other, .course-row span.other { color: var(--ok); } .course-lv.target, .course-row span.target { color: var(--accent); } .course-lv.late, .course-row span.late { color: var(--warn); }
.course-advice { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg-sunken); color: var(--fg-2); font-size: 13px; line-height: 1.6; }
tr.lag td { color: var(--warn, #d08a00); font-weight: 600; }
.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.gauge { min-width: 0; } .gauge svg { width: 100%; max-width: 260px; height: auto; display: block; margin: 0 auto; }
@media (max-width: 600px) { .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .gauges .gauge:last-child:nth-child(odd) { grid-column: 1 / -1; } .gauge svg { max-width: 170px; } .col-left { display: none; } }
.gauge .track { fill: none; stroke: var(--heat-0); }
.gauge path.arc { fill: none; outline: none; } .gauge path.arc:hover, .gauge path.arc:focus { filter: brightness(1.15); }
.gauge .arc.seen { stroke: var(--gauge-seen); } .gauge .arc.learned { stroke: var(--heat-3); } .gauge .arc.mastered { stroke: var(--heat-4); }
.gauge .tick { stroke: var(--fg-3); stroke-width: 1; opacity: .55; } .gauge .tick-l { fill: var(--fg-3); font-size: 8px; opacity: .8; }
.gauge .needle { stroke: var(--fg); stroke-width: 2.5; stroke-linecap: round; } .gauge .pivot { fill: var(--fg); }
.gauge .hero { fill: var(--fg); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; } .gauge .hero-l { fill: var(--fg-2); font-size: 15px; font-weight: 600; }
.gauge path.track { outline: none; } .seg-dot.gseen { background: var(--gauge-seen); }
.cseg { flex-basis: 0; min-height: 0; } .cseg.v, .seg-dot.v { background: var(--heat-4); } .cseg.g, .seg-dot.g { background: var(--heat-3); } .cseg.q, .seg-dot.q { background: var(--heat-2); }
.barrow { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 10px; align-items: center; padding: 6px 0; }
.barrow .track { height: 10px; border-radius: 0 4px 4px 0; background: var(--bg-sunken); overflow: hidden; outline: none; }
.barrow .fill { height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.barrow .val { font-size: 12px; color: var(--fg-2); font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }

/* ---------- markdown ---------- */
.md p { margin: 0 0 8px; } .md p:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: 4px 0 8px; padding-left: 20px; }
.md h1, .md h2, .md h3, .md h4 { font-size: 15px; margin: 12px 0 6px; }
.md code { background: var(--bg-sunken); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.md pre { background: var(--bg-sunken); border: 1px solid var(--line); padding: 10px 12px; border-radius: 8px; overflow-x: auto; }
.md table { border-collapse: collapse; margin: 6px 0; font-size: 13px; }
.md th, .md td { border: 1px solid var(--line); padding: 4px 8px; }
.md blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid var(--line-2); color: var(--fg-2); }
.md strong { color: var(--fg); }

/* ---------- modal & toast ---------- */
/* The dialog is a column: fixed header, scrolling body, (mobile) footer with a close button. Heights use the small
   viewport unit so a mobile browser's toolbar never hides the header; no backdrop-filter (Brave repaint issues). */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(5,6,10,.7); display: grid; place-items: center; padding: 16px; }
.modal { display: flex; flex-direction: column; width: min(720px, 100%); max-height: min(88svh, 900px); overflow: hidden; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 64px -16px rgba(0,0,0,.6); }
.modal-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: var(--bg-elev); border-bottom: 1px solid var(--line); }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 18px 20px; }
.modal-foot { display: none; flex: none; padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg-elev); }
.modal-title { font-weight: 600; font-size: 16px; }
@supports (height: 1dvh) { .modal { max-height: min(88dvh, 900px); } }
@media (max-width: 600px) {
  .modal-back { padding: 0; place-items: end stretch; }
  .modal { width: 100%; max-height: calc(100svh - env(safe-area-inset-top) - 8px); border-radius: 16px 16px 0 0; }
  @supports (height: 1dvh) { .modal { max-height: calc(100dvh - env(safe-area-inset-top) - 8px); } }
  .modal-foot { display: flex; justify-content: flex-end; }
}
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 80; max-width: min(560px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 12px; background: var(--fg); color: var(--bg); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.sync-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-3); cursor: pointer; white-space: nowrap; }
.sync-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--fg-3); flex: none; }
.sync-chip.is-idle::before { background: var(--ok); }
.sync-chip.is-pending::before, .sync-chip.is-syncing::before { background: var(--warn); }
.sync-chip.is-error::before { background: var(--bad); }
.topbar #syncChip { margin-left: auto; }
@media (max-width: 900px) { .toast { bottom: calc(24px + env(safe-area-inset-bottom)); } body.practicing .toast { bottom: 24px; } }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); margin-bottom: 14px; font-size: 14px; }
.banner.warn { border-color: transparent; background: var(--warn-soft); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
details.disclose > summary { cursor: pointer; list-style: none; color: var(--fg-2); font-size: 14px; }
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary::before { content: "▸"; display: inline-block; width: 1em; color: var(--fg-3); transition: transform .15s; }
details.disclose[open] > summary::before { transform: rotate(90deg); }
/* 古道具屋 (1.2.0): the shop front (beam, noren, paper lantern, 福爺 and what he says, the counter with your 言靈), the wares */
.shop-front { position: relative; height: 168px; margin: 0 0 18px; border-radius: 12px; overflow: hidden; background: linear-gradient(color-mix(in srgb, var(--shelf) 72%, #000 8%), var(--shelf)); }
@media (max-width: 900px) { .shop-front { margin: -16px -16px 16px; border-radius: 0; } }
.shop-front .beam { position: absolute; left: 0; right: 0; top: 0; height: 16px; background: var(--wood); box-shadow: 0 3px 0 var(--wood-edge), 0 8px 12px -6px rgba(0, 0, 0, .35); }
.shop-front .noren { position: absolute; left: 50%; top: 16px; width: 228px; margin-left: -114px; height: 54px; display: flex; gap: 5px; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .18)); }
.shop-front .noren i { flex: 1; display: grid; place-items: center; border-radius: 0 0 4px 4px; background: linear-gradient(#383c6e, #3f4479); }
.shop-front .noren b { color: #fff; font: 700 22px/1 'Hiragino Mincho ProN', 'Noto Serif JP', serif; opacity: .94; }
.shop-front .lantern { position: absolute; right: 26px; top: 24px; width: 22px; height: 30px; border-radius: 45%; background: radial-gradient(circle at 40% 35%, #fffaf0, #f3e6cc 70%); }
:root[data-theme="dark"] .shop-front .lantern { background: radial-gradient(circle at 40% 35%, #fff2c8, #ffc46a 70%); box-shadow: 0 0 18px rgba(255, 170, 90, .8); }
.shop-front .lantern::before { content: ''; position: absolute; left: 50%; top: -8px; height: 8px; border-left: 1.5px solid var(--wood-edge); }
.shop-front .lantern i { position: absolute; left: 0; right: 0; height: 2.5px; background: #d9483b; } .shop-front .lantern i:first-child { top: 7px; } .shop-front .lantern i + i { bottom: 7px; }
.shop-front .fuku { position: absolute; left: 12px; bottom: 14px; width: 86px; height: 92px; padding: 0; border: 0; background: none; cursor: pointer; }
.shop-front .fuku svg { width: 100%; height: 100%; display: block; animation: fukuBob 3.6s ease-in-out infinite; transform-origin: 50% 100%; }
.shop-front .fuku:active svg { transform: scale(.96); }
.shop-front .fuku .eyes { animation: fukuBlink 5s infinite; transform-origin: 45px 44px; }
@keyframes fukuBob { 50% { transform: translateY(-2px) rotate(-1.5deg); } }
@keyframes fukuBlink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.fuku-say { position: absolute; left: 104px; top: 70px; max-width: min(240px, calc(100% - 120px)); padding: 7px 11px; border-radius: 12px; background: var(--label); color: var(--label-ink); font-size: 13px; line-height: 1.35; box-shadow: 0 4px 10px -5px rgba(0, 0, 0, .5); }
.fuku-say::before { content: ''; position: absolute; left: -6px; top: 12px; border: 6px solid transparent; border-left: 0; border-right-color: var(--label); }
.fuku-say b { display: block; font-size: 14px; } .fuku-say small { color: var(--label-ink-2); font-size: 12px; }
.fuku-say.pop { animation: kotoIn .35s cubic-bezier(.3, 1.4, .5, 1); }
.shop-front .counter { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: var(--wood); border-top: 4px solid var(--wood-edge); }
.shop-front .purse { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px 6px 9px; border-radius: 99px; background: var(--label); color: var(--label-ink); font-size: 14px; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .45); }
.shop-front .purse b { font-size: 17px; font-variant-numeric: tabular-nums; } .shop-front .purse .koto-i { width: 22px; height: 22px; }
.shop-tabs { position: sticky; top: 0; z-index: 6; display: flex; gap: 6px; margin: 0 -16px 4px; padding: 8px 16px; overflow-x: auto; background: var(--bg); }   /* held up top while the wares scroll by (2026-11-10) */
@media (max-width: 900px) { .shop-tabs { top: calc(54px + env(safe-area-inset-top)); } .shop-head { display: none; } }   /* under the top bar; its title says 古道具屋 already */
.shop-tabs button { position: relative; flex: none; padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px; font: inherit; font-size: 14px; font-weight: 600; color: var(--fg-2); background: var(--bg-elev); cursor: pointer; }
.shop-tabs button[aria-selected="true"] { color: var(--accent-fg); border-color: var(--accent); background: var(--accent); }
.shop-tabs .dot { position: absolute; top: 3px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #e0524b; box-shadow: 0 0 0 2px var(--bg-elev); }
.shop-note { margin: 18px 2px; font-size: 14px; color: var(--fg-2); }
.shop-sec { margin-top: 18px; } .shop-h { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--fg-2); letter-spacing: .04em; }
.shop-h3 { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-size: 13px; font-weight: 700; color: var(--fg-3); letter-spacing: .04em; } .shop-h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }   /* a festival's kinds under 限時 (2026-11-14) */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
@media (min-width: 900px) { .shop-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; } }
.shop-item { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 6px 6px 8px; }
.shop-item .art { width: 100%; aspect-ratio: 1; height: auto; padding: 0; border: 0; display: grid; place-items: center; border-radius: 10px; background: var(--bg-sunken); --day: 1; --f: 1; --lit: 1; color: var(--fg-2); cursor: pointer; }
.shop-item .art svg { width: 84%; height: 84%; overflow: visible; }
.shop-item .nm { font-weight: 700; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .shop-item .ds { display: none; font-size: 13px; line-height: 1.55; color: var(--fg-2); } .shop-item .ds.swap { color: var(--accent); }
.shop-item .buy { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.shop-grid > .shop-item.card { margin: 0; }   /* .card + .card's space pushed every tile but the first down */
.shop-item .buy .btn { padding: 3px 9px; min-height: 0; font-size: 12px; } .shop-item .buy .chip { font-size: 11px; padding: 2px 6px; }
.ware-peek .shop-item.big { padding: 0; gap: 8px; } .ware-peek .shop-item.big .art { aspect-ratio: auto; height: 200px; cursor: default; } .ware-peek .shop-item.big .art svg { width: 170px; height: 170px; }
.ware-peek .shop-item.big .nm { font-size: 17px; white-space: normal; } .ware-peek .shop-item.big .ds { display: block; } .ware-peek .shop-item.big .buy .btn { padding: 8px 16px; font-size: 14px; } .ware-peek .shop-item.big .price { font-size: 16px; }
.shop-item .price { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; } .shop-item .price.owned { font-size: 13px; font-weight: 600; color: var(--fg-2); }
.shop-item .price .koto-i { width: 16px; height: 16px; }
.shop-item.soon { background: none; box-shadow: none; border: 1.5px dashed var(--line-2); } .shop-item.soon .nm, .shop-item.soon .ds { opacity: .6; }
.btn.btn-muted { opacity: .55; cursor: default; }
svg.defs-only { position: absolute; width: 0; height: 0; overflow: hidden; }
/* 言靈 (1.2.0): the glowing あ, the line on the summary */
.koto-i { width: 1.3em; height: 1.3em; flex: none; vertical-align: -.28em; }
.koto-gain { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; margin-top: 14px; padding: 9px 14px; border-radius: 12px; font-size: 14px; background: color-mix(in srgb, var(--gold) 16%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 42%, transparent); }
.koto-gain .koto-i { width: 24px; height: 24px; }
.koto-gain b { font-size: 17px; font-variant-numeric: tabular-nums; }
.koto-gain .sep { width: 1px; height: 18px; background: color-mix(in srgb, var(--gold) 50%, transparent); }
.koto-gain .tot { margin-left: auto; font-size: 13px; opacity: .75; font-variant-numeric: tabular-nums; }
.koto-gain .cap { font-size: 13px; opacity: .8; }
/* 言靈 gained away from a set's end (1.2.0): every 5 minutes 聽一輪 plays, a letter's gift; a small あ rising at the top */
.koto-pop { position: fixed; z-index: 60; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); display: flex; align-items: center; gap: 6px; padding: 7px 14px 7px 9px; border-radius: 99px; font-size: 14px; color: var(--fg);
  background: color-mix(in srgb, var(--gold) 22%, var(--bg)); border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); pointer-events: none; transform: translateX(-50%); animation: kotoRise 2.6s ease-out both; }
.koto-pop .koto-i { width: 22px; height: 22px; } .koto-pop b { font-size: 16px; font-variant-numeric: tabular-nums; }
.koto-pop.full { animation-duration: 4.2s; }
.koto-pop.book { animation-duration: 3.6s; padding: 7px 14px 7px 8px; }   /* a book read through (bookCoins): the あ fly into it, no words */
.koto-pop.book .koto-i { width: 26px; height: 26px; } .koto-pop.book b { display: inline-block; font-size: 18px; }
.koto-pop b.bump { animation: kotoBump .22s ease-out; }
@keyframes kotoRise { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.9); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -8px); } }
/* the witch's 言靈 (1.2.2, witchCoins): a ring of light and ten glowing あ where she slipped, flown into the 言靈 button
   (moved by the script); the button bounces at each, glows at the last, +100 rises beside it */
.koto-coin, .koto-burst { position: fixed; z-index: 55; left: 0; top: 0; pointer-events: none; }
.koto-coin { width: 18px; height: 18px; margin: -9px 0 0 -9px; filter: drop-shadow(0 0 4px rgba(255, 214, 120, .85)); }
.koto-coin .koto-i { display: block; width: 100%; height: 100%; animation: coinTwinkle .8s ease-in-out infinite alternate; }
.koto-burst { width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; border: 2px solid rgba(255, 222, 140, .9); box-shadow: 0 0 12px rgba(255, 210, 120, .7), inset 0 0 8px rgba(255, 210, 120, .5); animation: coinBurst .55s ease-out forwards; }
.study-koto.bump { animation: kotoBump .22s ease-out; }
.study-koto.glow { box-shadow: 0 0 0 2px rgba(255, 214, 120, .9), 0 0 18px 4px rgba(255, 200, 90, .55); }
.koto-plus { position: fixed; z-index: 56; pointer-events: none; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: #ffd978; text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 10px rgba(255, 200, 90, .65); transform: translate(-100%, -50%); animation: kotoPlus 1.6s ease-out forwards; }
@keyframes coinTwinkle { from { transform: scale(.88); } to { transform: scale(1.08); } }
@keyframes coinBurst { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.2); opacity: 0; } }
@keyframes kotoBump { 40% { transform: scale(1.14); } }
@keyframes kotoPlus { 0% { opacity: 0; transform: translate(-100%, calc(-50% + 8px)); } 15% { opacity: 1; transform: translate(-100%, -50%); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-100%, calc(-50% - 14px)); } }
.koto-gain.pop { animation: kotoIn .5s cubic-bezier(.3, 1.4, .5, 1) .35s backwards; } .koto-gain.pop .koto-i { animation: kotoSpin .7s ease-out .45s backwards; }
@keyframes kotoIn { from { opacity: 0; transform: translateY(6px) scale(.96); } }
/* the summary (2026-11-10): 這組的收穫, its chips popping in one by one the first time; the 言靈 total bumps as each あ lands;
   全對 in gold; confetti over it all (summaryReward) */
.harvest { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--bg-sunken); }
.harvest-h { font-size: 13px; font-weight: 700; color: var(--fg-2); margin-bottom: 6px; }
.harvest-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 0; }
.harvest-l { font-size: 12px; color: var(--fg-3); min-width: 4.5em; }
.harvest.play .chip { animation: chipIn .38s cubic-bezier(.3, 1.5, .5, 1) backwards; animation-delay: calc(.55s + var(--i) * 70ms); }
@keyframes chipIn { from { opacity: 0; transform: translateY(8px) scale(.7); } }
.koto-gain .tot .num { display: inline-block; }
.koto-gain .tot .num.bump { animation: kotoBump .22s ease-out; }
.page-title.all-right { color: var(--gold); transform-origin: left center; animation: titlePop .55s cubic-bezier(.3, 1.5, .5, 1) .2s backwards; }
@keyframes titlePop { from { opacity: 0; transform: scale(.6); } }
.confetti { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; width: 8px; height: 11px; margin: -5px 0 0 -4px; border-radius: 2px; }
@keyframes kotoSpin { from { transform: scale(.4) rotate(-40deg); opacity: 0; } 60% { transform: scale(1.18) rotate(6deg); opacity: 1; } }
/* 2026-11-11 polish: shrine, castle, station, sento */
/* idle: the bath cat breathes in its sleep and its tail's tip twitches now and then */
.sky .land .fx-flick { transform-box: fill-box; transform-origin: 100% 80%; animation: fxFlick 6s ease-in-out infinite; } @keyframes fxFlick { 0%, 72%, 100% { transform: rotate(0); } 78% { transform: rotate(-12deg); } 84% { transform: rotate(5deg); } 90% { transform: rotate(-6deg); } }
/* the bell rung: the rope swings (fxRing), the bell shakes on it and the tassel whips after */
.sky .land [data-fx="bell"].ring .suzu { transform-box: fill-box; transform-origin: 50% 0; animation: bellJig .08s linear 24 alternate; } @keyframes bellJig { from { transform: rotate(-11deg); } to { transform: rotate(11deg); } }
.sky .land [data-fx="bell"].ring .tassel { transform-box: fill-box; transform-origin: 50% 0; animation: bellTassel .32s ease-in-out .1s 6 alternate; } @keyframes bellTassel { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
/* the fox bowed to: a breeze stirs its bib, the key in its mouth glints */
.sky .land [data-fx="fox"] .glint { opacity: 0; transform-box: fill-box; transform-origin: center; }
.sky .land [data-fx="fox"].bless .glint { animation: foxGlint 1.2s ease-out .35s; } @keyframes foxGlint { 0% { opacity: 0; transform: scale(.2) rotate(0); } 30% { opacity: 1; transform: scale(1.25) rotate(45deg); } 100% { opacity: 0; transform: scale(.5) rotate(90deg); } }
.sky .land [data-fx="fox"].bless .bib { transform-box: fill-box; transform-origin: 50% 0; animation: foxBib .3s ease-in-out 6 alternate; } @keyframes foxBib { from { transform: skewX(0) scaleY(1); } to { transform: skewX(-10deg) scaleY(.93); } }
/* a fortune drawn: the tied slips flutter (jingle), the ema clack on their cords */
.sky .land :is([data-fx="kuji"], [data-fx="okuema"]).jingle .ema { transform-box: fill-box; transform-origin: 50% 0; animation: emaClack .14s ease-in-out 12 alternate; } @keyframes emaClack { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
/* the taxi's horn: the body bounces on its springs (the wheels stay put), the headlight flashes */
.sky .land [data-fx="taxi"].honk { animation: none; } .sky .land [data-fx="taxi"] .tlamp { opacity: 0; }
.sky .land [data-fx="taxi"].honk .tbody { animation: taxiBob .2s ease-in-out 8 alternate; } @keyframes taxiBob { to { transform: translateY(-1.8px); } }
.sky .land [data-fx="taxi"].honk .tlamp { animation: taxiFlash .4s linear 4; } @keyframes taxiFlash { 0%, 45% { opacity: 1; } 50%, 100% { opacity: 0; } }
/* the bath cat stroked: it nuzzles up, an ear flicks, the tail curls round, it blushes (not squashed as a whole) */
.sky .land [data-fx="scat"].purr { animation: none; } .sky .land [data-fx="scat"] .blush ellipse { transition: fill-opacity .5s; } .sky .land [data-fx="scat"].purr .blush ellipse { fill-opacity: .9; }
.sky .land [data-fx="scat"].purr .chead { transform-box: fill-box; transform-origin: 20% 90%; animation: catNuzzle .32s ease-in-out 8 alternate; } @keyframes catNuzzle { to { transform: rotate(-9deg) translate(-.4px, -.8px); } }
.sky .land [data-fx="scat"].purr .ear { transform-box: fill-box; transform-origin: 30% 100%; animation: catEar .16s ease-in-out .4s 6 alternate; } @keyframes catEar { to { transform: rotate(-20deg); } }
.sky .land [data-fx="scat"].purr .ctail { animation: catCurl .36s ease-in-out 7 alternate; } @keyframes catCurl { to { transform: rotate(18deg); } }
@media (prefers-reduced-motion: reduce) { .sky .land :is(.fx-flick) { animation: none; } .sky .land [data-fx] :is(.suzu, .tassel, .glint, .bib, .ema, .tbody, .tlamp, .chead, .ear, .ctail) { animation: none !important; } }
/* 2026-11-11 polish: wares floor, rug */
/* a pot plant from 古道具屋 watered (盆栽, 仙人掌, 竹子): its pot stays put and only the plant sways, from its base */
.room svg.art g.joy:has(.leafy) { animation: none; }
.room svg.art g.joy .leafy { transform-box: fill-box; transform-origin: 50% 100%; animation: plantJoy .7s ease-in-out 1.6s 2; }
@media (prefers-reduced-motion: reduce) { .room svg.art g.joy .leafy { animation: none; } }
/* 2026-11-11 polish: park, beach */
/* the park: the panda's spring bends as he rocks it and its head nods along; a swing's shadow follows its seat on a ride; a shine
   runs down the slide while he slides down it; the park clock's red second hand ticks, and a gleam runs round its rim when he looks
   at it (glint); the drinking fountain's jet leaps up, drops fall into the basin and rings spread on its water (spout) */
.sky .land .pspring { transform-box: fill-box; transform-origin: 50% 100%; }
.sky .land.prop:has([data-fx="panda"].ride-rock) .pspring { animation: pandaSpring .8s ease-in-out infinite alternate; } @keyframes pandaSpring { from { transform: skewX(6deg); } to { transform: skewX(-6deg); } }
.sky .land [data-fx="panda"] .phead { transform-box: fill-box; transform-origin: 30% 95%; } .sky .land [data-fx="panda"].ride-rock .phead { animation: pandaNod .8s ease-in-out -.2s infinite alternate; } @keyframes pandaNod { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.sky .land .sw-shade { transform-box: fill-box; transform-origin: 50% 50%; }
.sky .land [data-fx="swing0"].ride-swing ~ .sw-shade.s0, .sky .land [data-fx="swing1"].ride-swing ~ .sw-shade.s1 { animation: swingShade 1.5s infinite alternate; }
@keyframes swingShade { 0% { transform: translateX(20px) scaleX(.8); animation-timing-function: ease-in; } 50% { transform: none; animation-timing-function: ease-out; } 100% { transform: translateX(-20px) scaleX(.8); } }
.sky .land .slide-shine { opacity: 0; } .yard:has(.yhero.sliding.bench) .land .slide-shine { animation: slideShine .7s linear infinite; } @keyframes slideShine { from { stroke-dashoffset: 10; opacity: .7; } to { stroke-dashoffset: -100; opacity: .7; } }
.sky .land .psec { transform-box: view-box; animation: clockSec 60s steps(60) infinite; } @keyframes clockSec { to { transform: rotate(360deg); } }
.sky .land [data-fx="clock"] .pshine { opacity: 0; transform-box: view-box; } .sky .land [data-fx="clock"].glint .pshine { animation: clockGlint 1.3s ease-in-out; }
@keyframes clockGlint { 0% { opacity: 0; transform: rotate(-60deg); } 25%, 70% { opacity: .9; } 100% { opacity: 0; transform: rotate(250deg); } }
.sky .land [data-fx="fountain"].spout { transform: none; } .sky .land [data-fx="fountain"] .jet { transform-box: fill-box; transform-origin: 0 100%; }
.sky .land [data-fx="fountain"].spout .jet { animation: fountainJet 1.8s ease-out; } @keyframes fountainJet { 0% { transform: none; } 14%, 78% { transform: scale(1.1, 2.3); } 100% { transform: none; } }
.sky .land [data-fx="fountain"] :is(.drop, .rip) { opacity: 0; transform-box: fill-box; transform-origin: center; }
.sky .land [data-fx="fountain"].spout .drop { animation: fountainDrop .42s ease-in .25s infinite; } @keyframes fountainDrop { 0% { opacity: .95; transform: none; } 100% { opacity: .2; transform: translate(-.4px, 5px); } }
.sky .land [data-fx="fountain"].spout .rip { animation: fountainRip .6s ease-out .3s infinite; } @keyframes fountainRip { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.6); } }
/* the beach: on a pinch the crab raises its claws, snips with each claw's finger and pops its eyes up (its walk stops, as before);
   a shell or the starfish picked up lifts and turns as it goes; cheering at the sandcastle sand trickles down its towers */
.sky .land [data-fx="crab"].pinch .claws { animation: none; transform: translateY(-2.5px); } .sky .land [data-fx="crab"] :is(.claws, .eyes) { transition: transform .2s ease-out; }
.sky .land [data-fx="crab"].pinch .eyes { transform: translateY(-1.6px); } .sky .land [data-fx="crab"] .nip { transform-box: fill-box; } .sky .land [data-fx="crab"] .nip.l { transform-origin: 0 100%; } .sky .land [data-fx="crab"] .nip.r { transform-origin: 100% 100%; }
.sky .land [data-fx="crab"].pinch .nip.l { animation: crabNipL .18s ease-in-out infinite alternate; } @keyframes crabNipL { from { transform: rotate(24deg); } to { transform: rotate(-4deg); } }
.sky .land [data-fx="crab"].pinch .nip.r { animation: crabNipR .18s ease-in-out infinite alternate; } @keyframes crabNipR { from { transform: rotate(-24deg); } to { transform: rotate(4deg); } }
.sky .land :is([data-fx="star"], [data-fx="shell"]) { transform-box: fill-box; transform-origin: 50% 50%; }
.sky .land [data-fx="star"].gone { transform: translateY(-9px) rotate(40deg) scale(.9); transition: opacity .45s .2s, transform .6s cubic-bezier(.3, 1.3, .5, 1); }
.sky .land [data-fx="shell"].gone { transform: translateY(-8px) rotate(-28deg) scale(.9); transition: opacity .45s .2s, transform .6s cubic-bezier(.3, 1.3, .5, 1); }
.sky .land [data-fx="castle"] .grain { opacity: 0; } .sky .land [data-fx="castle"].cheer .grain { animation: castleGrain .7s ease-in infinite; } @keyframes castleGrain { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(.6px, 15px); } }
@media (prefers-reduced-motion: reduce) { .sky .land :is(.pspring, .phead, .sw-shade, .slide-shine, .psec, .pshine, .jet, .drop, .rip, .claws, .eyes, .nip, .grain) { animation: none !important; transition: none !important; }
  .sky .land [data-fx="fountain"].spout .jet { transform: scale(1.1, 2.3); } .sky .land :is([data-fx="star"], [data-fx="shell"]).gone { transition: none; } }
/* 2026-11-11 polish: shokudo, izakaya, yard */
/* the yard's tree: its boughs the trunk's colour, the light on its clumps and leaves by day; shaken (1.6 s as before), the trunk stays: the crown sways on it, every other clump rustles, the lit leaves flicker */
.sky .land .twig { fill: none; stroke: color-mix(in srgb, #6b4a2f calc(var(--md, var(--day, 1)) * 100%), #0b0c22); stroke-width: 2.6; stroke-linecap: round; transition: stroke 3s; }
.sky .land [data-fx="ytree"] .crown-lit { fill: #fff; opacity: calc(.13 * var(--day, 1)); } .sky .land [data-fx="ytree"] .leaf-lit { fill: #fff; opacity: calc(.2 * var(--day, 1)); }
.sky .land [data-fx="ytree"].shake { animation: none; }
.sky .land [data-fx="ytree"].shake .crown-g { transform-box: fill-box; transform-origin: 50% 100%; animation: ytreeSway .16s ease-in-out 10 alternate; } @keyframes ytreeSway { from { transform: rotate(-2.6deg); } to { transform: rotate(2.6deg) translateY(-.6px); } }
.sky .land [data-fx="ytree"].shake .crown > circle:nth-child(even) { transform-box: fill-box; transform-origin: 50% 50%; animation: ytreeLobe .12s ease-in-out 13 alternate; } @keyframes ytreeLobe { to { transform: translate(.8px, -.8px) scale(1.05); } }
.sky .land [data-fx="ytree"].shake .leaf-lit { animation: ytreeFlick .16s steps(2) 10 alternate; } @keyframes ytreeFlick { to { opacity: calc(.5 * var(--day, 1)); } }
/* the mailbox: the shade under its box and down its post, a sheen, the wood's grain, the knob on its lid (which opens with the lid) */
.sky .mailbox .mb-tone { fill: rgba(0, 0, 0, .16); } .sky .mailbox .mb-sheen { fill: #fff; opacity: calc(.06 + .14 * var(--day, 1)); }
.sky .mailbox .mb-grain { fill: none; stroke: rgba(0, 0, 0, .18); stroke-width: .7; stroke-linecap: round; } .sky .mailbox .mb-lidhl { fill: none; stroke: rgba(255, 255, 255, .3); stroke-width: .8; stroke-linecap: round; }
.sky .mailbox .mb-knob { fill: color-mix(in srgb, #d7dde4 calc(var(--md, var(--day, 1)) * 100%), #4a4f80); }
/* the rooms' things used (each as long as before): 招き猫's bell jingles and its head tilts as it beckons; the kitchen's noren parts; the
   kamidana's streamers flutter; the bottles in the crates clink; the grill flares and its skewers sizzle; the top sake barrel rocks */
.sky .land [data-fx="maneki"].beckon .bell { transform-box: fill-box; transform-origin: 50% 0; animation: manekiBell .14s ease-in-out 16 alternate; } @keyframes manekiBell { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
.sky .land [data-fx="maneki"].beckon .mhead { transform-box: fill-box; transform-origin: 50% 90%; animation: manekiTilt .56s ease-in-out 4 alternate; } @keyframes manekiTilt { to { transform: rotate(-7deg); } }
.sky .land [data-fx="noren"].part .fx-sway { animation: norenPart .3s ease-out 0s 6 alternate !important; } .sky .land [data-fx="noren"].part .fx-sway + .fx-sway { animation-name: norenPart2 !important; }
@keyframes norenPart { to { transform: rotate(16deg); } } @keyframes norenPart2 { to { transform: rotate(-16deg); } }
.sky .land [data-fx="kamidana"].flutter .shide { transform-box: fill-box; transform-origin: 50% 0; animation: shideFlutter .18s ease-in-out 10 alternate; } .sky .land [data-fx="kamidana"].flutter .shide:nth-child(2) { animation-delay: -.09s; }
@keyframes shideFlutter { from { transform: rotate(-10deg); } to { transform: rotate(10deg) scaleY(.94); } }
.sky .land [data-fx="crates"].rattle .clink { transform-box: fill-box; transform-origin: 50% 100%; animation: cratesClink .1s steps(2) 18; } @keyframes cratesClink { 50% { transform: translateY(-1px) rotate(4deg); } }
.sky .land [data-fx="grill"].flare .fx-blink { animation: grillFlare .15s steps(2) 0s 12 !important; } @keyframes grillFlare { 50% { opacity: 1; } }
.sky .land [data-fx="grill"].flare .kushi { animation: grillSizzle .1s steps(2) 18; } @keyframes grillSizzle { 50% { transform: translateY(-.8px); } }
.sky .land [data-fx="taru"].rock { transform-box: fill-box; transform-origin: 50% 100%; animation: taruRock .3s ease-in-out 6 alternate; } @keyframes taruRock { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
@media (prefers-reduced-motion: reduce) { .sky .land [data-fx="ytree"].shake :is(.crown-g, .crown > circle, .leaf-lit), .sky .land [data-fx="maneki"].beckon :is(.paw, .bell, .mhead), .sky .land [data-fx="noren"].part .fx-sway, .sky .land [data-fx="kamidana"].flutter .shide, .sky .land [data-fx="crates"].rattle .clink, .sky .land [data-fx="grill"].flare :is(.fx-blink, .kushi) { animation: none !important; } }
/* 2026-11-11 polish: street, harbor, town */
.sky .land .fx-hubspin { transform-box: fill-box; transform-origin: center; animation: sbHubSpin .5s linear infinite; } @keyframes sbHubSpin { to { transform: rotate(360deg); } }   /* the truck's hubs, the bike's spokes */
/* the drinks machine: a button blinks, a can drops into the tray, the flap swings; the postbox: its lip lifts and a letter
   slides in (no more squashing either whole); the curve mirror tips on its clamp as a glint runs over the glass */
.sky .land :is([data-fx="vend"], [data-fx="post"]).buy { animation: none; }
.sky .land [data-fx="vend"].buy .vpick { animation: sbPick 1.6s step-end; } @keyframes sbPick { 0%, 10%, 20%, 100% { opacity: 1; } 5%, 15% { opacity: .1; } }
.sky .land [data-fx="vend"].buy .vcan { animation: sbCan 1.6s ease-in forwards; } @keyframes sbCan { 0%, 22% { opacity: 0; transform: translateY(-3.6px); } 24% { opacity: 1; transform: translateY(-3.6px); } 34% { transform: translateY(0); } 40% { transform: translateY(-1.2px); } 46%, 100% { opacity: 1; transform: translateY(0); } }
.sky .land [data-fx="vend"].buy .vflap { transform-box: fill-box; transform-origin: 50% 0; animation: sbFlap 1.6s ease-out; } @keyframes sbFlap { 0%, 30% { transform: none; } 38%, 70% { transform: scaleY(.4); } 82%, 100% { transform: none; } }
.sky .land [data-fx="post"].buy .plip { transform-box: fill-box; transform-origin: 50% 100%; animation: sbLip 1.6s ease-in-out; } @keyframes sbLip { 0%, 100% { transform: none; } 14%, 52% { transform: translateY(-1.6px); } }
.sky .land [data-fx="post"].buy .pletter { animation: sbLetter 1.6s ease-in forwards; } @keyframes sbLetter { 0% { opacity: 0; transform: translateY(-6px); } 14% { opacity: 1; transform: translateY(-5px); } 40% { opacity: 1; transform: translateY(1px); } 54%, 100% { opacity: 0; transform: translateY(6px); } }
.sky .land [data-fx="cmirror"].shine { transform-box: fill-box; transform-origin: 50% 100%; animation: sbTip 1.4s ease-in-out; } @keyframes sbTip { 25% { transform: rotate(-5deg); } 55% { transform: rotate(3deg); } 80% { transform: rotate(-1deg); } }
.sky .land [data-fx="cmirror"].shine .mshine { animation: sbShine 1.4s ease-in-out; } @keyframes sbShine { 0%, 30% { opacity: 0; transform: translate(-6px, -6px); } 50% { opacity: .95; } 75%, 100% { opacity: 0; transform: translate(6px, 6px); } }
/* the harbour: gulls' wings beat from their shoulders, the net stirs in the wind; the fish flop one after another; the gull on
   the bollard beats its wing as it flies off; the cat shuts its eyes, tilts its head and swishes its tail (no squash) */
.sky .land .fx-wing.gullwing { transform-origin: 50% 100%; } .sky .land .hctail { transform-origin: 0 100%; }
.sky .land .fx-netwave { transform-box: fill-box; transform-origin: 50% 0; animation: hbNetWave 4.4s ease-in-out infinite alternate; } @keyframes hbNetWave { from { transform: skewX(-1deg) scaleY(1); } to { transform: skewX(1deg) scaleY(.97); } }
.sky .land [data-fx="fish"].flop path { animation: none; } .sky .land [data-fx="fish"].flop .hfish { transform-box: fill-box; transform-origin: 50% 100%; animation: fxFlop .16s ease-in-out 10 alternate; }
.sky .land [data-fx="gull"].flown .gwing { transform-box: fill-box; transform-origin: 85% 40%; animation: hbGullFlap .16s ease-in-out infinite alternate; } @keyframes hbGullFlap { to { transform: rotate(-40deg) scaleY(1.2); } }
.sky .land [data-fx="hcat"].purr { animation: none; } .sky .land [data-fx="hcat"] :is(.hceo, .hcec) { transition: opacity .2s; } .sky .land [data-fx="hcat"].purr .hceo { opacity: 0; } .sky .land [data-fx="hcat"].purr .hcec { opacity: 1; }
.sky .land [data-fx="hcat"].purr .hchead { transform-box: fill-box; transform-origin: 50% 90%; animation: hbCatTilt 2.6s ease-in-out; } @keyframes hbCatTilt { 15%, 80% { transform: rotate(-8deg); } }
.sky .land [data-fx="hcat"].purr .fx-sway { animation-duration: .5s !important; }
/* the town: the barber pole's stripes turn up it; rung, the wind chimes' clappers swing and their strips flutter */
.sky .land .fx-barberpole { animation: twBarber 1.8s linear infinite; } @keyframes twBarber { to { transform: translateY(-12px); } }
.sky .land [data-fx="chimes"] .zz { transform-box: fill-box; transform-origin: 50% 0; } .sky .land [data-fx="chimes"].jingle .zz { animation: twClapper .12s ease-in-out infinite alternate; } @keyframes twClapper { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
.sky .land [data-fx="chimes"].jingle .tz { transform-box: fill-box; transform-origin: 50% 0; animation: twStrip .18s ease-in-out infinite alternate; } @keyframes twStrip { from { transform: skewX(-12deg) rotate(6deg); } to { transform: skewX(10deg) rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .sky .land :is(.fx-hubspin, .fx-netwave, .fx-barberpole) { animation: none; } .sky .land [data-fx] :is(.vpick, .vcan, .vflap, .plip, .pletter, .mshine, .hfish, .gwing, .hchead, .zz, .tz) { animation: none !important; } }
/* 2026-11-11 polish: wares wall, yard, house */
.sky .yware.stirred .lily { transform-box: fill-box; transform-origin: center; animation: lilyBob 1.1s ease-in-out .5s 2; } .sky .yware.stirred .lily.l1 { animation-delay: 1.5s; }   /* the pond: its lily pads rock as the rings reach them */
@keyframes lilyBob { 30% { transform: translateY(1.4px) rotate(-5deg); } 70% { transform: translateY(-.6px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .sky .yware.stirred .lily { animation: none; } }
/* おもかる石 (奥社, 2026-11-14): the ball on the lantern lifted off and set down again */
.sky .land [data-fx="omokaru"].lift .stone { transform-box: fill-box; transform-origin: 50% 100%; animation: okuLift 1.6s ease-in-out; } @keyframes okuLift { 0%, 100% { transform: none; } 30%, 62% { transform: translateY(-9px) rotate(-4deg); } 46% { transform: translateY(-11px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .sky .land [data-fx="omokaru"].lift .stone { animation: none; } }
/* ---- 公民館 and its 日本語教室 (2026-11-14, 新手第一週) ---- */
.sky .land [data-fx="kcat"].purr .chead { transform-box: fill-box; transform-origin: 50% 90%; animation: kcatNuzzle .5s ease-in-out 3 alternate; } @keyframes kcatNuzzle { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.sky .land [data-fx="nobori"].flap .fx-sway { animation-duration: .35s !important; }
.sky .land [data-fx="kbikes"].ring { animation: none !important; } .sky .land [data-fx="kbikes"].ring g g { animation: kbikeBell .12s ease-in-out 8 alternate; } @keyframes kbikeBell { to { transform: translateY(-1.6px); } }
.sky .land [data-fx="cranes"].flutter { animation-duration: .4s !important; }
.sky .land [data-fx="radio"] .rnotes { opacity: 0; transition: opacity .3s; } .sky .land [data-fx="radio"].playing .rnotes { opacity: 1; }
.sky .land [data-fx="radio"].playing .rnote { animation: radioNote 1.2s ease-out infinite; } @keyframes radioNote { from { transform: translate(0, 4px); opacity: 0; } 30% { opacity: 1; } to { transform: translate(6px, -14px); opacity: 0; } }
.sky .land [data-fx="radio"].playing .rbody { animation: radioBob .4s ease-in-out infinite alternate; } @keyframes radioBob { to { transform: translateY(-1px); } }
@media (prefers-reduced-motion: reduce) { .sky .land [data-fx="radio"].playing :is(.rnote, .rbody), .sky .land [data-fx="kcat"].purr .chead, .sky .land [data-fx="kbikes"].ring g g { animation: none; } }
/* a card over the classroom: the blackboard, かるた, the song, a picture book */
.cls { position: fixed; inset: 0; z-index: 77; display: grid; place-items: center; padding: 16px; background: rgba(30, 24, 16, .5); animation: talkIn .25s ease-out; }
.cls-card { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 18px 16px 16px; border-radius: 18px; background: var(--bg-elev); color: var(--fg); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.cls-x { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; font-size: 16px; color: var(--fg-2); background: var(--bg-sunken); cursor: pointer; z-index: 2; }
.kr-face { display: block; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; background: var(--bg-sunken); } .kr-face svg { width: 100%; height: 100%; }
.kr-say { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 4px); padding: 3px 9px; border-radius: 10px; font-style: normal; font-size: 13px; white-space: nowrap; color: #2b2b33; background: #fffdf6; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); opacity: 0; pointer-events: none; }
.kr-say.on { animation: krSay 1.8s ease-out forwards; } @keyframes krSay { 0% { opacity: 0; transform: translate(-50%, 8px); } 12%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -4px); } }
/* the blackboard: green, chalk letters in columns from the right (あ行 first), a ？ for each not learned yet */
.cls-board .cls-card { background: #2e5343; color: #f4f1e6; border: 8px solid #7a5a3a; }
.cls-board .cls-x { background: rgba(255, 255, 255, .12); color: #f4f1e6; }
.cb-head { display: flex; align-items: baseline; gap: 10px; padding-right: 40px; } .cb-head b { font-size: 20px; letter-spacing: .1em; } .cb-head span { font-size: 13px; opacity: .75; }
.cb-tabs { display: flex; gap: 6px; margin: 10px 0; } .cb-tab { padding: 4px 12px; border: 1px solid rgba(244, 241, 230, .4); border-radius: 99px; font: inherit; font-size: 13px; color: inherit; background: none; cursor: pointer; } .cb-tab.on { background: rgba(244, 241, 230, .9); color: #2e5343; }
.cb-board { display: flex; flex-direction: row-reverse; justify-content: space-between; gap: 2px; }
.cb-col { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.cb-k { display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1 / 1.15; padding: 0; border: 0; border-radius: 6px; font: inherit; font-size: clamp(16px, 4.6vw, 24px); line-height: 1.1; color: #f4f1e6; background: none; cursor: pointer; }
.cb-k small { font-size: 9px; opacity: .6; } .cb-k.off { opacity: .22; font-size: 14px; cursor: default; } .cb-k.cb-empty { visibility: hidden; }
/* 中華街大通り (2026-11-14): the chestnut pan's steam rising, puffing when tapped */
.sky .land [data-fx="kuri"] .dr-steam { animation: drSteam 2.4s ease-out infinite; opacity: 0; } .sky .land [data-fx="kuri"].puff .dr-steam { animation-duration: .9s; }
@keyframes drSteam { 0% { opacity: 0; transform: translateY(4px); } 30% { opacity: .9; } 100% { opacity: 0; transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .sky .land [data-fx="kuri"] .dr-steam { animation: none; opacity: .6; } }
.cb-k.cb-wrote { position: relative; } .cb-k.cb-wrote::after { content: '✓'; position: absolute; top: 0; right: 1px; font-size: 10px; line-height: 1; color: #f6e08a; }
.cb-k:not(.off):hover { background: rgba(255, 255, 255, .1); } .cb-k.pop { animation: iconPop .35s cubic-bezier(.3, 1.6, .6, 1); }
.cb-note { margin: 10px 0 0; font-size: 13px; opacity: .75; text-align: center; }
/* かるた on a tatami: the call (📻 and the kana, its romaji as a hint), eight cards, the three players */
.cls-karuta .cls-card { background: #e9e3c8; color: #2b2b33; }
.kr-top { display: flex; justify-content: center; padding-right: 30px; } .kr-reader { display: flex; align-items: center; gap: 10px; padding: 6px 16px; border-radius: 99px; background: #fffdf6; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.kr-radio { font-size: 22px; } .kr-call { min-width: 60px; font-size: 20px; font-weight: 700; text-align: center; } .kr-call.kr-hint { color: #b8442c; }
.kr-mat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; padding: 14px; border-radius: 10px; background: #c9c98e; box-shadow: inset 0 0 0 3px #2b2b33; }
.kr-card { aspect-ratio: 3 / 4; border: 2px solid #d0453c; border-radius: 6px; font: inherit; font-size: clamp(26px, 8vw, 40px); color: #2b2b33; background: #fbf8f0; box-shadow: 0 2px 0 rgba(0, 0, 0, .18); cursor: pointer; transition: transform .25s, opacity .25s; }
.kr-card:active { transform: scale(.94); } .kr-card.shake { animation: talkShake .35s; }
.kr-card.kr-got { opacity: .28; transform: scale(.88) rotate(-6deg); cursor: default; } .kr-card.by-hero { border-color: #3f9a8c; } .kr-card.by-chen { border-color: #d0574b; } .kr-card.by-maria { border-color: #e6c23a; }
.kr-people { display: flex; justify-content: space-around; gap: 8px; } .kr-who { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; transition: opacity .3s; }
.kr-who i { font-style: normal; font-size: 18px; font-weight: 700; } .kr-who.out { opacity: .4; }
.kr-note { margin: 10px 0 0; font-size: 13px; text-align: center; opacity: .7; }
.kr-end { margin-top: 12px; text-align: center; } .kr-result { margin: 0; font-size: 17px; font-weight: 700; } .kr-line { display: flex; flex-direction: column; margin: 6px 0 10px; } .kr-line span { font-size: 13px; opacity: .7; }
.kr-btns, .sg-btns, .pb-btns { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
/* the song: the row being sung, each kana lit as it comes; the four singers bob */
.sg-head { display: flex; align-items: center; gap: 8px; padding-right: 40px; } .sg-head b { font-size: 17px; } .sg-radio { font-size: 22px; }
.sg-row { display: flex; justify-content: center; gap: 8px; margin: 18px 0; }
.sg-k { display: flex; flex-direction: column; align-items: center; width: 54px; padding: 6px 0; border-radius: 10px; font-size: 32px; background: var(--bg-sunken); opacity: .45; transition: opacity .2s, transform .2s; }
.sg-k small { font-size: 11px; color: var(--fg-3); } .sg-k.on { opacity: 1; transform: translateY(-4px); background: var(--bg-elev-2); }
.sg-people { display: flex; justify-content: space-around; margin-top: 26px; } .sg-who { position: relative; transition: transform .2s; } .sg-who.sg-bob { transform: translateY(-5px); }
@media (prefers-reduced-motion: reduce) { .sg-who.sg-bob, .sg-k.on { transform: none; } }
/* a picture book's page (pb-: the diary's notebook has .bk-page and .bk-note, 2026-11-20: these hit its 美食手帳); a word from someone */
.pb-page { text-align: center; padding-top: 8px; } .pb-page .pic { width: 150px; margin: 0 auto; } .pb-word { margin-top: 6px; font-size: 36px; font-weight: 600; } .pb-zh { font-size: 15px; color: var(--fg-2); } .pb-note { margin: 8px 0 0; font-size: 13px; color: var(--fg-3); }
.cn-who { display: flex; align-items: center; gap: 12px; padding-right: 36px; } .cn-who p { display: flex; flex-direction: column; margin: 0; } .cn-who span { font-size: 13px; color: var(--fg-2); }
/* ---- みなと中華街 (2026-11-14, 新手第一週) ---- */
.sky .land [data-fx="panda"].hug .pbody { animation: pandaHug .9s ease-in-out; } @keyframes pandaHug { 0%, 100% { transform: none; } 25% { transform: translateY(-10px) rotate(-6deg); } 50% { transform: translateY(0) rotate(6deg) scale(1.05); } 75% { transform: translateY(-5px) rotate(-3deg); } }
.sky .land [data-fx="shishi"].bite .shead { transform-box: fill-box; transform-origin: 50% 30%; animation: shishiBite .18s ease-in-out 6 alternate; } @keyframes shishiBite { to { transform: scaleY(.84) translateY(2px); } }
@media (prefers-reduced-motion: reduce) { .sky .land [data-fx="panda"].hug .pbody, .sky .land [data-fx="shishi"].bite .shead { animation: none; } }
/* 漢字陷阱: the word as written, its reading, three meanings — the Chinese one is the trap */
.cls-trap .cls-card { background: #fbf3e2; color: #2b2b33; border-top: 8px solid #c8322a; }
.tp-head { display: flex; align-items: baseline; gap: 10px; padding-right: 40px; } .tp-head b { font-size: 17px; color: #a8262e; } .tp-head span { font-size: 13px; color: #8a6a48; }
.tp-lead { margin: 10px 0 0; font-size: 14px; color: #6a5a48; }
.tp-word { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 2px; font-size: 54px; font-weight: 700; line-height: 1.5; } .tp-word rt { font-size: 15px; font-weight: 400; color: #8a6a48; }
.tp-say { display: grid; place-items: center; flex: none; align-self: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; color: #a8262e; background: rgba(168, 38, 46, .08); cursor: pointer; } .tp-say svg { width: 22px; height: 22px; }
.tp-q { margin: 4px 0 8px; text-align: center; font-size: 14px; color: #6a5a48; }
.tp-opts { display: flex; flex-direction: column; gap: 8px; } .tp-opt { padding: 11px 14px; border: 1.5px solid #e2cfa8; border-radius: 12px; font: inherit; font-size: 17px; color: #2b2b33; background: #fffdf6; cursor: pointer; text-align: left; }
.tp-opt:hover:not(:disabled) { border-color: #c8322a; } .tp-opt.bad { opacity: .5; border-style: dashed; text-decoration: line-through; } .tp-opt.ok { border-color: #3f9a8c; background: #e6f4ec; font-weight: 700; } .tp-opt.shake { animation: talkShake .35s; }
.tp-react { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; font-size: 14px; color: #8a2a24; background: #fbe4dc; }
.tp-done { margin-top: 10px; } .tp-note { margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 14px; background: #e6f4ec; color: #22504a; }
/* ---- 寫寫看 (2026-11-14, 新手第一週 stage 5): a kana written stroke by stroke on a blackboard ---- */
.cls-write .cls-card { background: #2e5343; color: #f4f1e6; border: 8px solid #7a5a3a; }
.cls-write .cls-x { background: rgba(255, 255, 255, .12); color: #f4f1e6; }
.wr-head { display: flex; align-items: center; gap: 10px; padding-right: 40px; } .wr-head b { font-size: 30px; } .wr-head span { font-size: 14px; opacity: .75; }
.cls-write .tp-say { color: #f4f1e6; background: rgba(255, 255, 255, .12); }
.wr-board { display: flex; justify-content: center; margin-top: 8px; }
.wr-pad { width: min(78vw, 340px); aspect-ratio: 1; touch-action: none; cursor: crosshair; border-radius: 10px; background: #34604e; }
.wr-pad .wr-grid { stroke: #f4f1e6; stroke-opacity: .16; stroke-width: .5; stroke-dasharray: 2 2; fill: none; } .wr-pad .wr-frame { fill: none; stroke: #f4f1e6; stroke-opacity: .22; stroke-width: .6; }
.wr-pad .wr-model { fill: none; stroke: #f4f1e6; stroke-opacity: .2; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; } .wr-pad .wr-model.due { stroke-opacity: .34; } .wr-pad .wr-model.done { stroke-opacity: 0; }
.wr-pad .wr-num { font-size: 7px; font-weight: 700; fill: #f4f1e6; fill-opacity: .45; } .wr-pad .wr-num.due { fill: #f6e08a; fill-opacity: 1; font-size: 8.5px; }
.wr-pad :is(.wr-chalk, .wr-live, .wr-show) { fill: none; stroke: #fbf8ee; stroke-width: 4.6; stroke-linecap: round; stroke-linejoin: round; } .wr-pad .wr-show { stroke: #f6e08a; }
.wr-pad .wr-rub { fill: none; stroke: #f08a8a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; animation: wrRub .65s ease-out forwards; } @keyframes wrRub { 60% { opacity: .8; } to { opacity: 0; } }
.wr-say { min-height: 1.5em; margin: 8px 0 0; text-align: center; font-size: 14px; } .wr-say.bad { color: #f6b0a0; } .wr-say.ok { color: #f6e08a; font-weight: 700; }
.wr-btns { display: flex; justify-content: center; gap: 8px; margin-top: 8px; } .wr-btns .btn { background: rgba(255, 255, 255, .1); color: #f4f1e6; border-color: rgba(244, 241, 230, .35); }
.wr-btns .btn.wr-next { background: #f6e08a; color: #2e5343; border-color: #f6e08a; font-weight: 700; }
.wr-credit { margin: 8px 0 0; text-align: center; font-size: 10.5px; opacity: .5; }
.cls-write .wr-hori { margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .1); } .cls-write .wr-hori span { color: #d8e6dc; }
.cb-tab.cb-write { margin-left: auto; border-color: #f6e08a; color: #f6e08a; }
@media (prefers-reduced-motion: reduce) { .wr-pad .wr-rub { animation: none; opacity: .5; } }
.sg-head .sg-rows { margin-left: 4px; font-size: 12px; color: var(--fg-3); } .sg-note { min-height: 1.2em; margin: -6px 0 0; text-align: center; font-size: 13px; color: var(--fg-3); }
/* the speaker in the jobs (2026-11-20, the user: 🔊 looked ugly): the app's own line icon (icon('speaker')) */
.wk-ear svg, .hl-ear svg { display: block; width: 22px; height: 22px; margin: auto; color: #8a5a34; } .wk-bub .wk-ear svg { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; color: #c8322a; }
.crr-say svg { width: 14px; height: 14px; margin-right: 3px; vertical-align: -2px; color: #8a5a34; }
