* { box-sizing: border-box; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #536fa6; outline-offset: 3px; }
.consent-check { display: flex !important; flex-direction: row; gap: .6rem; align-items: flex-start; }
.consent-check input { width: 20px; min-height: 20px; flex: none; margin: .13rem 0 0; }
.consent-check a, #account-form a { text-decoration: underline; text-underline-offset: .17em; }
button, input, summary { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); }
small { color: var(--muted); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.game-menu { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding-top: 12px; }
.game-menu > div { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.nav-link { min-height: 35px; padding: 7px 15px; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--muted); font-size: 14px; font-weight: 650; }
.nav-link[aria-current=page] { background: #e1def0; color: var(--ink); }
.profile-button { justify-self: end; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 40px; padding: 5px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 690; font-size: 14px; }
.profile-button span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-button:hover, .nav-link:hover { border-color: #acbbd8; color: var(--accent-dark); }

main.shell { min-height: 62vh; padding-block: 32px 58px; }
main:has(.masthead) { padding-top: 6px; }
.loading { padding-block: 40px; color: var(--muted); }
.masthead { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; min-height: 215px; padding-block: 13px 18px; }
.masthead-side { display: block; width: 100%; max-width: 277px; height: auto; }
.masthead-end { justify-self: end; }
.masthead-start { justify-self: start; }
.masthead-identity { display: flex; align-items: center; justify-content: center; gap: clamp(3px, .65vw, 12px); }
.masthead-flower { display: block; width: clamp(98px, 12.4vw, 173px); height: auto; flex: none; }
h1 { font-size: clamp(2.45rem, 4.7vw, 4.15rem); line-height: 1.04; letter-spacing: -.055em; margin-bottom: 18px; font-weight: 700; }
.masthead h1 { font-size: clamp(4rem, 7.7vw, 7rem); line-height: .94; margin: 0; letter-spacing: -.062em; }
.masthead h1 span { display: block; margin-top: 14px; font: 600 clamp(.9rem, 1.58vw, 1.31rem)/1.3 'Manrope', 'Inter', 'Segoe UI', system-ui, sans-serif; letter-spacing: -.026em; color: var(--muted); }
.today-card { position: relative; isolation: isolate; overflow: hidden; min-height: 218px; padding: clamp(22px, 3vw, 40px); border: 1px solid #d8d9ea; border-radius: 29px; background: var(--today-wash); box-shadow: var(--shadow); }
.today-copy { width: min(72%, 540px); position: relative; }
.today-card h2 { margin-bottom: 9px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.04; letter-spacing: -.045em; }
.card-copy { max-width: 39ch; color: #343b47; line-height: 1.43; font-size: clamp(.93rem, 1.25vw, 1.06rem); margin-bottom: 0; }
.today-card .actions { gap: 6px 14px; margin-top: 18px; }
.today-card .primary { min-height: 48px; padding-inline: 20px; box-shadow: inset 0 1px 0 #fff3; }
.flower-marks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.flower-marks:empty { display: none; }
.family-mark { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 11px; margin: 0; border: 1px solid #fff9; border-radius: 14px; background: #f5eff8e8; color: var(--accent-dark); font-size: .83rem; line-height: 1.35; overflow-wrap: anywhere; }
.family-mark > span:first-child { color: #6259a1; font-size: 1.25rem; line-height: 1; }
.metric-label { display: inline-block; padding: 5px 12px 6px; max-width: 100%; border-radius: 999px; background: var(--blue-wash); color: #303d57; font: 650 .92rem/1.25 'Manrope', 'Inter', 'Segoe UI', system-ui, sans-serif; }
.eyebrow { margin-bottom: 17px; color: var(--accent); font-size: .73rem; font-weight: 800; letter-spacing: .115em; text-transform: uppercase; }
.intro-text { max-width: 42ch; color: var(--muted); line-height: 1.6; font-size: 1.02rem; margin-bottom: 25px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 9px; border: 1px solid transparent; border-radius: 999px; min-height: 46px; padding: 10px 17px; font-weight: 700; font-size: .92rem; background: var(--card); }
.button:hover { border-color: #b2bdd6; }
.primary { background: var(--ink); color: #fff9ee; }
.primary:hover { background: #40484c; }
.secondary { border-color: var(--line); }
.text-button { background: transparent; box-shadow: none; color: var(--accent); padding-inline: 7px; }
.button:disabled { opacity: .55; }
.arrow { font-weight: 500; font-size: 1.22em; line-height: 1; }
.section { margin-top: 39px; }
.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 16px; }
.section h2, .section-head h2 { font-size: clamp(1.46rem, 2.6vw, 2.05rem); margin-bottom: 0; letter-spacing: -.045em; }
.section-head small { font-size: .85rem; text-align: right; }
.profile-list, .catalog { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.profile-card, .exercise-card { display: flex; gap: 11px; align-items: center; min-height: 77px; border: 1px solid var(--line); border-radius: 19px; background-color: var(--card); padding: 11px 13px; text-align: left; }
.practice-card { width: 100%; min-width: 0; overflow-wrap: anywhere; background: linear-gradient(145deg, #fffaee, #f9ecdc); }
.practice-card:hover { background: linear-gradient(145deg, #fff8e9, #f4e3d6); border-color: #9aaed3; }
.practice-arrow { margin-left: auto; flex: none; color: var(--accent); font-size: 1.08rem; }
.profile-card { white-space: normal; overflow-wrap: anywhere; }
.profile-card:hover { border-color: #a6b4d3; }
.profile-card[aria-pressed=true] { border-color: #879bc4; background: #edf0f8; }
.profile-card strong, .exercise-card strong { display: block; font-size: .9rem; line-height: 1.24; }
.profile-card small, .exercise-card small { display: block; margin-top: 3px; font-size: .76rem; }
.profile-card.add { border-style: dashed; background: transparent; }
.avatar, .tile-icon { flex: none; display: grid; place-items: center; border-radius: 14px; width: 42px; height: 42px; font-weight: 750; color: var(--ink); }
.tile-icon { font-size: 1.36rem; line-height: 1; }
.profile-button .avatar { width: 28px; height: 28px; border-radius: 8px; font-size: .8rem; }
.blue, .avatar-0 { background: var(--blue-wash); }
.lilac, .avatar-1 { background: var(--lilac-wash); }
.mint, .avatar-2 { background: var(--mint-wash); }
.peach, .avatar-3 { background: var(--peach-wash); }
.avatar-4 { background: var(--yellow-wash); }
.avatar-5 { background: var(--pink-wash); }

dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100% - 26px); overflow: auto; padding: 25px; border: 1px solid var(--line); border-radius: 26px; color: var(--ink); background: var(--card); box-shadow: 0 24px 70px #3d2f2742; }
dialog::backdrop { background: #342d285d; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 14px; }
.dialog-head h2 { margin: 3px 0 0; letter-spacing: -.05em; }
.close { background: var(--tile-paper); border: 0; border-radius: 50%; font-size: 1.35rem; width: 36px; height: 36px; flex: none; }
.close:hover { background: var(--lilac); }
dialog .profile-list { grid-template-columns: 1fr; }
.dialog-actions { margin-top: 14px; }
.dialog-status { margin: 12px 0 0; color: #605473; font-size: .88rem; font-weight: 650; }
.pair-code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; letter-spacing: .12em; }
.form { display: grid; gap: 15px; }
.form label, .text-label { display: grid; gap: 8px; font-size: .9rem; font-weight: 700; }
input { width: 100%; border: 1px solid #d7cbb9; background: #fffaf1; border-radius: 13px; padding: 11px 13px; color: var(--ink); min-height: 46px; font-size: 1rem; }
.form small { line-height: 1.5; }
.form-error { margin: 0; color: #8b2d55; font-weight: 650; font-size: .88rem; }
.notice { position: fixed; inset: auto 18px 18px auto; z-index: 2; width: max-content; max-width: calc(100% - 36px); border: 1px solid #dac5d7; border-radius: 12px; padding: 12px 16px; background: #fff8fb; color: #68385c; box-shadow: 0 4px 20px #463a5229; }

.training { width: min(100%, 780px); margin: 0 auto; }
.training-header { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 9px; color: var(--muted); font-size: .88rem; font-weight: 700; }
.training-header span:last-child { border-radius: 999px; background: var(--blue-wash); color: var(--accent-dark); padding: 4px 10px; white-space: nowrap; }
.practice-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; color: var(--accent-dark); font-size: .88rem; font-weight: 750; }
.practice-header > span { padding: 7px 13px; border-radius: 999px; background: var(--mint-wash); }
.practice-header .button { padding-inline: 12px; min-height: 41px; }
progress { appearance: none; width: 100%; height: 8px; background: #ece1d1; border: 0; border-radius: 10px; overflow: hidden; color: var(--accent); display: block; }
progress::-webkit-progress-bar { background: #ece1d1; }
progress::-webkit-progress-value { background: #96acda; border-radius: 10px; }
progress::-moz-progress-bar { background: #96acda; }
.round-panel { background: var(--card); margin-top: 19px; scroll-margin-top: 12px; border: 1px solid var(--line); border-radius: 28px; padding: clamp(17px, 4.9vw, 42px); box-shadow: var(--shadow); }
.round-panel h1, .page-title { font-size: clamp(2rem, 4.6vw, 3.45rem); }
.round-panel h2 { font-size: clamp(1.22rem, 3vw, 1.75rem); letter-spacing: -.038em; margin-bottom: 12px; }
.round-panel .tile-icon { margin-bottom: 16px; width: 54px; height: 54px; font-size: 1.75rem; }
.rules-copy { color: var(--muted); font-size: clamp(1.05rem, 3vw, 1.2rem); line-height: 1.55; max-width: 53ch; }
.example { padding: 14px 17px; background: var(--blue-wash); border-radius: 17px; line-height: 1.5; color: var(--accent-dark); margin: 18px 0; }
.purpose { color: var(--muted); font-size: .88rem; margin-bottom: 22px; }
.task-title { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.task-title small { align-self: start; border-radius: 999px; background: var(--lilac-wash); padding: 6px 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.description-back { margin-bottom: 8px; }
.reading-panel .reading-part { font: 700 1rem/1.35 'Manrope', 'Inter', 'Segoe UI', system-ui, sans-serif; color: var(--accent-dark); margin-bottom: 15px; }
.reading-card { display: flex; flex-direction: column-reverse; max-height: min(66dvh, 735px); overflow-y: auto; border: 1px solid var(--line); border-radius: 19px; background: #fff5e2; padding: clamp(14px, 4vw, 35px); }
.reading-text { flex: none; transform: rotate(180deg); color: #414747; font: 500 clamp(1.12rem, 4.65vw, 1.35rem)/1.56 'Manrope', 'Inter', 'Segoe UI', system-ui, sans-serif; overflow-wrap: anywhere; }
.reading-text p { margin: 0; }
.reading-text p + p { margin-top: .85em; }
.reading-inverted { transform: rotate(180deg); max-height: calc(100dvh - 64px); overflow-y: auto; }
.story-title { font-weight: 750; color: var(--accent-dark); margin-bottom: 12px; }
.reading-actions { margin-top: 14px; }
.reading-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.reading-navigation .button { padding-inline: 8px; }
.reading-lock { margin-top: 9px; margin-bottom: 0; color: var(--muted); font-size: .82rem; }
.reading-question-number { color: var(--muted); font-size: .88rem; margin-bottom: 7px; }
.reading-panel .reading-question { font: 750 clamp(1.3rem, 4.8vw, 1.65rem)/1.3 'Manrope', 'Inter', 'Segoe UI', system-ui, sans-serif; letter-spacing: -.015em; }
.reading-choices { display: grid; gap: 9px; }
.reading-choices .button { justify-content: start; text-align: left; }
.reading-retry { color: var(--accent-dark); background: var(--lilac-wash); padding: 10px 15px; border-radius: 14px; margin-top: 14px; }
.story-complete { margin-block: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: var(--lilac-wash); }
.round-copy { color: var(--muted); line-height: 1.5; margin-bottom: 13px; }
.game-body { min-height: 140px; position: relative; }
.arithmetic-prompt { position: relative; }
.feedback-pop { pointer-events: none; position: absolute; z-index: 1; top: 0; left: 50%; transform: translate(-50%, -14%); padding: 7px 16px; border: 1px solid #8bb88b; border-radius: 999px; color: #245335; background: linear-gradient(145deg, #e5f7d7, #bde7c1); font-weight: 800; white-space: nowrap; box-shadow: var(--shadow); }
.arithmetic-prompt .feedback-pop { top: 50%; transform: translate(-50%, -50%); }
.grid { display: grid; gap: 8px; width: min(100%, 440px); margin: 16px auto 22px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cell { border: 1px solid var(--line); border-radius: 15px; background-color: var(--cell-tint, var(--tile-paper)); aspect-ratio: 1.15; min-width: 0; padding: 0; display: grid; place-items: center; font: 700 clamp(1.35rem, 5.9vw, 2.13rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.schulte-tint-0 { --cell-tint: #f8dbe7; }
.schulte-tint-1 { --cell-tint: #dbeaff; }
.schulte-tint-2 { --cell-tint: #fbefc3; }
.cell:hover:not(:disabled), .symbol:hover { border-color: #8b9fc3; }
.cell.marked, .symbol[aria-pressed=true], .picture[aria-pressed=true] { background: var(--circle-tint, var(--blue)); border-color: #7590bc; box-shadow: inset 0 0 0 1px #7590bc; color: var(--accent-dark); }
.cell.tap-right { background-color: #c3ebc7; box-shadow: inset 0 0 0 2px #75ad7e; }
.cell.tap-wrong { box-shadow: inset 0 0 0 2px #c87882; }
.cell.tap-correction { background-color: #f7c7cb; }
.cell.red { color: #a52047; }
.cell.black { color: #272526; }
.ink-0 { color: #d91d12; }
.ink-1 { color: #2059de; }
.ink-2 { color: #16843a; }
.ink-3 { color: #f4c516; -webkit-text-stroke: .45px #785b0f; paint-order: stroke fill; }
.ink-4 { color: #762fbd; }
.ink-5 { color: #111; }
.tokens { display: grid; grid-template-columns: repeat(var(--columns, 5), minmax(0, 1fr)); width: min(100%, 550px); gap: 6px; margin: 14px auto 21px; }
.tokens[data-columns="6"] { --columns: 6; }
.tokens[data-columns="7"] { --columns: 7; }
.symbol { border: 1px solid var(--line); border-radius: 11px; background: var(--circle-tint, #faf0e1); min-height: 42px; padding: 3px; font-weight: 750; }
.tokens .symbol { display: grid; place-items: center; min-width: 0; font-size: clamp(1.32rem, 4.9vw, 1.68rem); line-height: 1; min-height: 45px; }
.tokens[data-format="pairs"] .symbol { font-size: clamp(.82rem, 3.8vw, 1.2rem); }
.bourdon-prompt strong { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.bourdon-target { display: inline-grid; place-items: center; height: 39px; min-width: 39px; border-radius: 11px; background: var(--mint-wash); font-size: 1.5rem; }
.bourdon-target[data-format="pairs"] { font-size: 1.1rem; }
.dot-pattern { display: inline-grid; grid-template-columns: repeat(3, 5px); grid-template-rows: repeat(3, 5px); gap: 3px; }
.dot-pattern i.lit { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ring-pattern { display: inline-block; width: 23px; height: 23px; border: 3px solid currentColor; border-top-color: transparent; border-radius: 50%; }
.ring-1 { transform: rotate(45deg); } .ring-2 { transform: rotate(90deg); }
.ring-3 { transform: rotate(135deg); } .ring-4 { transform: rotate(180deg); }
.ring-5 { transform: rotate(225deg); } .ring-6 { transform: rotate(270deg); }
.ring-7 { transform: rotate(315deg); }
.word-circles { --circle-diameter: clamp(70px, 18.5vw, 92px); display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(7px, 1.8vw, 12px); width: min(100%, 640px); margin: 16px auto 22px; }
.word-circles .symbol { display: grid; place-items: center; flex: none; width: var(--circle-diameter); height: var(--circle-diameter); padding: 6px; border-radius: 50%; font-size: clamp(.875rem, 3.6vw, 1rem); line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
[data-circle-tint="0"] { --circle-tint: #f7d9e8; }
[data-circle-tint="1"] { --circle-tint: #dbeafe; }
[data-circle-tint="2"] { --circle-tint: #faedbc; }
[data-circle-tint="3"] { --circle-tint: #e1efd2; }
[data-circle-tint="4"] { --circle-tint: #e9dff5; }
[data-circle-tint="5"] { --circle-tint: #f8ddcd; }
[data-circle-tint="6"] { --circle-tint: #d6efe9; }
[data-circle-tint="7"] { --circle-tint: #fbe7f0; }
[data-circle-tint="8"] { --circle-tint: #e3e7fc; }
[data-circle-tint="9"] { --circle-tint: #f6e0bd; }
[data-circle-tint="10"] { --circle-tint: #dcebdc; }
[data-circle-tint="11"] { --circle-tint: #f3e3f8; }
[data-circle-tint="12"] { --circle-tint: #f7dada; }
[data-circle-tint="13"] { --circle-tint: #d8f0fa; }
[data-circle-tint="14"] { --circle-tint: #f4efc9; }
[data-circle-tint="15"] { --circle-tint: #ddefdb; }
[data-circle-tint="16"] { --circle-tint: #e4daf3; }
[data-circle-tint="17"] { --circle-tint: #ffe9d2; }
[data-circle-tint="18"] { --circle-tint: #dceeea; }
[data-circle-tint="19"] { --circle-tint: #f2d4ea; }
.stroop-field { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(9px, 1.8vw, 18px) 10px; width: min(100%, 620px); margin: 15px auto 20px; padding: clamp(13px, 3vw, 29px); border: 1px solid var(--line); border-radius: 19px; background: #fffdf8; }
.stroop-field .ink-word { font-weight: 680; font-size: clamp(1.04rem, 4.55vw, 1.82rem); line-height: 1.3; text-transform: capitalize; white-space: nowrap; }
.stroop-field .ink-word:nth-child(6n+1) { grid-column: 1 / -1; justify-self: start; margin-inline-start: 14%; }
.stroop-field .ink-word:nth-child(6n+2) { grid-column: 1 / -1; justify-self: end; margin-inline-end: 15%; }
.stroop-field .ink-word:nth-child(6n+3) { grid-column: 1; justify-self: center; }
.stroop-field .ink-word:nth-child(6n+4) { grid-column: 2; justify-self: end; margin-block-start: clamp(11px, 2vw, 18px); }
.stroop-field .ink-word:nth-child(6n+5) { grid-column: 1; justify-self: start; }
.stroop-field .ink-word:nth-child(6n) { grid-column: 2; justify-self: center; margin-block-start: 9px; }
.stroop-field .ink-word:nth-child(12n+7) { justify-self: center; margin-inline-start: 0; }
.stroop-field .ink-word:nth-child(12n+8) { margin-inline-end: 3%; }
.stroop-prompt { padding: 10px; border-radius: 14px; background: #fffdf8; text-transform: uppercase; }
.prompt { text-align: center; font-size: clamp(1.58rem, 5vw, 2.8rem); line-height: 1.25; margin: 16px 0 23px; font-weight: 770; overflow-wrap: anywhere; }
.prompt code { font: inherit; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 15px; }
.choices .button { width: 100%; overflow-wrap: anywhere; }
.choices .button:disabled { opacity: 1; }
.game-body .answer-wrong { background: linear-gradient(145deg, #ffe4dd, #fac1c7); color: #762e3b; border-color: #cc808a; box-shadow: inset 0 0 0 1px #cc808a; opacity: 1; }
.game-body .symbol.answer-right { background: #e7f2da; color: #245335; border-color: #a7c59a; opacity: 1; }
.game-body .symbol.answer-right[aria-pressed=true] { background: #c5e8bd; border-color: #75ad7e; box-shadow: inset 0 0 0 1px #75ad7e; }
.text-answer { display: grid; grid-template-columns: minmax(100px, 1fr) auto; align-items: end; gap: 9px; }
.cipher-key { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 18px 0; }
.cipher-key span { padding: 6px 9px; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; }
.puzzle-image { display: block; width: min(100%, 620px); height: auto; margin: 10px auto 15px; background: #f8eddb; border: 1px solid var(--line); border-radius: 17px; }
.maze-board { width: min(100%, 490px); background: #fff7e9; }
.spiral { max-width: 390px; }
.pictures { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 15px 0 20px; }
.picture-choices { --picture-size: 70px; display: grid; grid-template-columns: repeat(3, var(--picture-size)); }
.picture { display: inline-grid; place-items: center; position: relative; width: var(--picture-size, 62px); height: var(--picture-size, 62px); padding: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.picture small { position: absolute; right: 3px; top: 3px; min-width: 1.2em; border-radius: 50%; background: var(--paper); color: var(--accent-dark); font-weight: 750; font-size: .73rem; }
.picture small:empty { display: none; }
.memory-image { display: block; width: min(82%, 56px); aspect-ratio: 1; background: url('./memory-pictures.webp') no-repeat var(--sprite-x, 0%) var(--sprite-y, 0%) / 300% 300%; }
.memory-image-extra { background-image: url('./memory-pictures-extra.webp'); }
.sprite-x-1 { --sprite-x: 50%; }
.sprite-x-2 { --sprite-x: 100%; }
.sprite-y-1 { --sprite-y: 50%; }
.sprite-y-2 { --sprite-y: 100%; }
.memory-preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.memory-countdown { padding: 8px 12px; border-radius: 999px; background: var(--lilac-wash); color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.memory-countdown strong { display: inline-block; min-width: 2ch; text-align: end; }
.recap-list { list-style: none; padding: 0; margin: 16px 0 22px; }
.recap-panel { background: linear-gradient(155deg, #fff9ee 60%, #f9e5e5); }
.recap-opening { display: grid; grid-template-columns: minmax(0, 1fr) minmax(106px, 29%); gap: clamp(14px, 3vw, 26px); align-items: center; margin-bottom: 20px; }
.recap-opening h1 { margin-bottom: 15px; }
.recap-reflection { display: grid; gap: 4px; margin: 0; line-height: 1.45; color: var(--muted); font-size: clamp(.94rem, 1.75vw, 1.1rem); }
.recap-reflection strong { color: var(--ink); }
.recap-bloom { padding: 7%; border-radius: 50%; background: radial-gradient(ellipse, #e0e8fb 8%, #f3edf4 63%, transparent 72%); }
.recap-bloom canvas { width: 100%; height: auto; display: block; }
.recap-plant-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.recap-plant { display: inline-flex; align-items: center; gap: 10px; text-align: left; min-height: 60px; padding: 5px 14px 5px 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--plant-wash); }
.recap-plant canvas { width: 48px; height: auto; }
.recap-plant span { display: grid; gap: 3px; }
.flower-recipients { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.flower-recipients button:disabled { color: var(--muted); opacity: .76; }
.recap-plant:hover { border-color: #9da7bd; }
.meadow-view { width: min(100%, 520px); margin-inline: auto; }
.meadow-card { padding: clamp(16px, 4.4vw, 32px); border: 1px solid var(--line); border-radius: clamp(24px, 7.5vw, 42px); background: linear-gradient(140deg, #fcf6eb, #f8f0e3); text-align: center; box-shadow: var(--shadow); }
.meadow-card h1 { margin: 2px 0 19px; color: #383e43; font-size: clamp(2rem, 8.9vw, 3.6rem); }
.meadow-count { margin: 0 auto 5px; padding: 10px 13px; border-radius: 999px; background: linear-gradient(108deg, #a9bce9, #edc7e2 85%); color: #393e46; font: 700 clamp(1.45rem, 5.35vw, 2.35rem)/1.2 var(--display); font-variant-numeric: tabular-nums; }
.meadow-count-ripe { background: linear-gradient(110deg, #fcbfc9, #ffdeba); }
.meadow-scene { position: relative; isolation: isolate; overflow: hidden; width: 100%; aspect-ratio: 1; }
.meadow-sprite { display: block; background: url('./meadow-atlas.webp') no-repeat var(--sprite-x, 0%) var(--sprite-y, 0%) / 300% 300%; pointer-events: none; }
[data-sprite="chamomile"], [data-sprite="forgetmenot"], [data-sprite="butterfly"] { --sprite-x: 50%; }
[data-sprite="bellflower"], [data-sprite="grass"], [data-sprite="lilac-butterfly"] { --sprite-x: 100%; }
[data-sprite="clover"], [data-sprite="forgetmenot"], [data-sprite="grass"] { --sprite-y: 50%; }
[data-sprite="ground"], [data-sprite="butterfly"], [data-sprite="lilac-butterfly"] { --sprite-y: 100%; }
.meadow-ground { position: absolute; left: -2%; bottom: -31%; width: 104%; aspect-ratio: 1; }
.meadow-grass { position: absolute; aspect-ratio: 1; opacity: .77; transform: translateX(-50%) rotate(var(--grass-lean, 0deg)); transform-origin: bottom center; }
.meadow-stem { position: absolute; width: 40%; aspect-ratio: 1; transform: translateX(-50%); pointer-events: none; }
.meadow-stem > .meadow-sprite { width: 100%; height: 100%; transform: translate(var(--blossom-shift-x, 0%), var(--blossom-shift-y, -23%)); }
.meadow-stem[data-species="cornflower"] { --blossom-shift-x: -5%; --blossom-shift-y: -20%; }
.meadow-stem[data-species="bellflower"] { --blossom-shift-x: -12%; --blossom-shift-y: -27%; }
.meadow-stem[data-species="clover"] { --blossom-shift-y: -17%; }
.meadow-flower { position: absolute; top: 0; left: 50%; width: clamp(28px, 48%, 100px); height: clamp(28px, 33%, 64px); padding: 0; transform: translate(-50%, -50%); border: 1px solid transparent; border-radius: 50%; background: transparent; pointer-events: auto; }
@media (hover: hover) {
  .meadow-flower:hover { border-color: #93a47b78; background: #fff3; }
}
.meadow-butterfly { position: absolute; width: 16%; aspect-ratio: 1; }
.meadow-butterfly-left { top: 7%; left: 14%; transform: rotate(-12deg); }
.meadow-butterfly-right { top: 13%; right: 9%; transform: rotate(12deg); }
.meadow-caption { margin: 8px auto 0; color: #3e454b; font: 600 clamp(1.05rem, 3.7vw, 1.35rem)/1.35 var(--display); }
.meadow-actions { justify-content: center; margin-top: 13px; }
.plant-cornflower { --plant-wash: var(--blue-wash); }
.plant-chamomile { --plant-wash: linear-gradient(145deg, #fff9e8, #f7edca); }
.plant-bellflower { --plant-wash: var(--lilac-wash); }
.plant-clover { --plant-wash: var(--mint-wash); }
.plant-forgetmenot { --plant-wash: linear-gradient(145deg, #eef5fa, #d6e1ee); }
.plant-detail { display: flex; align-items: center; gap: 15px; padding: 9px 12px; margin-bottom: 15px; border-radius: 16px; background: var(--plant-wash); }
.plant-detail-art { width: 86px; height: auto; }
.plant-latin { font-style: italic; margin-bottom: 5px; }
.plant-date { margin-bottom: 0; color: var(--muted); font-size: .87rem; }
.plant-fact { margin-bottom: 9px; line-height: 1.5; }
.plant-source { color: var(--accent-dark); font-size: .85rem; text-underline-offset: .18em; }
.recap-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block: 18px 10px; }
.recap-stat { padding: clamp(13px, 2.7vw, 23px); border-radius: 19px; }
.recap-stat dt { color: #453d33; font-size: .88rem; font-weight: 700; }
.recap-stat dd { margin: 5px 0 0; font: 700 clamp(1.45rem, 4.5vw, 2.35rem)/1.08 var(--display); }
.recap-list li, .history-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.recap-list li { margin-bottom: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff9ed; }
.recap-list li strong { margin-right: auto; }
.recap-list .tile-icon { width: 42px; height: 42px; margin: 0; font-size: 1.28rem; }
.recap-list li span:last-child { color: var(--muted); font-size: .83rem; text-align: right; }
.stats-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 13px 20px; margin-bottom: 17px; }
.stats-heading .intro-text { margin: 0; }
.period-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.period-switch [aria-pressed=true] { background: var(--lilac); color: var(--ink); }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.metric { background: var(--card); border: 1px solid var(--line); padding: clamp(15px, 2.2vw, 24px); border-radius: 22px; box-shadow: var(--shadow); }
.metric h3 { margin-bottom: 9px; }
.metric:nth-child(2) .metric-label { background: var(--pink-wash); }
.metric:nth-child(3) .metric-label { background: var(--mint-wash); }
.metric:nth-child(4) .metric-label { background: var(--yellow-wash); }
.metric:nth-child(5) .metric-label { background: var(--lilac-wash); }
.metric canvas { width: 100%; height: auto; display: block; }
.metric small { display: block; line-height: 1.55; margin-top: 6px; }
.metric-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 0; }
.metric-days div { padding: 8px 11px; border-radius: 11px; background: var(--tile-paper); }
.metric-days dt { color: var(--muted); font-size: .8rem; }
.metric-days dd { margin: 3px 0 0; font-weight: 700; font-size: .93rem; }
.history-day { margin-bottom: 14px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.history-day h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; margin: 0; font: inherit; font-weight: 750; }
.history-day h3 small { font-weight: 500; }
.history-row { width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: transparent; }
.history-row:first-of-type { margin-top: 7px; }
.history-row small { flex: none; white-space: nowrap; }
.history-row:hover { color: var(--accent-dark); background: var(--lilac); }
.history-empty { margin: 7px 0 0; color: var(--muted); font-size: .88rem; }
.history-more summary { width: fit-content; padding: 7px 0 0; color: var(--accent-dark); cursor: pointer; font-size: .88rem; font-weight: 700; }

@media (max-width: 850px) {
  .masthead { min-height: 174px; }
  .today-card { border-radius: 23px; }
  .profile-list, .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .masthead { grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 0; padding-block: 12px 16px; }
  .masthead-side { display: none; }
  .masthead-identity { justify-content: center; }
  .masthead-flower { width: clamp(67px, 19vw, 130px); }
  .masthead h1 { font-size: clamp(2.7rem, 11vw, 5rem); }
  .masthead h1 span { margin-top: 8px; }
  .today-card { padding: 19px 21px; }
  .today-card h2 { font-size: clamp(1.85rem, 5.6vw, 2.47rem); }
}
@media (max-width: 640px) {
  .game-menu > div { gap: 0; padding: 2px; }
  .nav-link { padding: 6px 8px; font-size: .8rem; }
  .profile-button { padding: 4px 8px; font-size: .78rem; max-width: min(105px, 100%); gap: 4px; min-height: 37px; }
  .profile-button .avatar { width: 22px; height: 22px; }
  main.shell { padding-block: 20px 45px; }
  main:has(.masthead) { padding-top: 5px; }
  .today-card { min-height: 174px; padding: 17px 16px; }
  .today-copy { width: 78%; }
  .today-art { left: 34%; }
  .today-card .actions { margin-top: 12px; }
  .today-card .primary { min-height: 44px; padding-inline: 11px; }
  .today-card .text-button { min-height: 38px; padding-inline: 4px; }
  .section { margin-top: 29px; }
  .profile-list, .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .profile-card, .exercise-card { min-height: 63px; padding: 7px; gap: 7px; }
  .tile-icon, .avatar { width: 34px; height: 34px; border-radius: 11px; font-size: 1.1rem; }
  .profile-card strong, .exercise-card strong { font-size: .82rem; }
  .practice-arrow { display: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .round-panel { margin-top: 14px; border-radius: 21px; }
  .cell { border-radius: 12px; }
  .task-title { gap: 8px; }
  .task-title small { font-size: .72rem; padding: 5px 8px; }
}
@media (max-width: 360px) {
  .task-title { flex-wrap: wrap; row-gap: 0; margin-bottom: 12px; }
  .task-title h1 { margin-bottom: 7px; }
}
@media (max-width: 500px) {
  .recap-opening { grid-template-columns: 1fr; gap: 2px; }
  .recap-bloom { justify-self: center; width: 114px; order: -1; padding: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .profile-card, .cell, .symbol { transition: background-color .14s, border-color .14s; }
}
