:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #23332b;
  background: #f5f7f3;
  --green: #245641;
  --dark: #163f30;
  --muted: #526357;
  --line: #dde6dd;
  --paper: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #377754; outline-offset: 3px; }
a { color: var(--dark); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.65rem); line-height: .99; letter-spacing: -.065em; overflow-wrap: anywhere; }
h2 { font-size: 1.4rem; letter-spacing: -.035em; overflow-wrap: anywhere; }
p { line-height: 1.55; }
ul { padding: 0; margin: 0; list-style: none; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: fixed; top: .6rem; left: .6rem; z-index: 3; background: white; padding: .6rem; }
.top { background: white; border-bottom: 1px solid var(--line); }
.top-inner, .container { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.top-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.top-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
#switch-profile { border-color: #e4ce8d; background: #fff5d5; color: #594112; }
#switch-profile:hover { background: #f9e9b5; }
.brand { display: flex; align-items: center; gap: .7rem; font-size: 1.06rem; font-weight: 760; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 38px; border-radius: 16px 10px 15px 11px; background: #e4edda; border: 1px solid #c8dabc; flex: none; }
.container { padding-block: 2rem 4rem; }
#status:empty, #copy-status:empty { display: none; }
#status:not(:empty) { margin-bottom: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); background: white; border-radius: 10px; }
.button { min-height: 44px; padding: .55rem .9rem; border: 1px solid transparent; border-radius: 18px 11px 17px 12px; font-size: .94rem; font-weight: 670; }
.primary { background: var(--green); color: white; box-shadow: 0 2px 0 #123d2e; }
.primary:hover { background-color: var(--dark); }
.primary:active { box-shadow: 0 1px 0 #123d2e; }
.secondary { background: white; color: var(--green); border-color: #d3ded4; }
.secondary:hover { background: #edf3ee; }
.button-icon { font-size: 1rem; margin-inline-end: .12rem; }
.heading-icon { font-size: 1.12rem; }
.icon { width: 44px; padding-inline: 0; border-radius: 50% 44% 49% 43%; font-size: 1.3rem; }
.danger { color: #9c322f; border-color: #e7cdca; background: #fff; margin-right: auto; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.welcome { display: grid; grid-template-columns: 1.35fr 1fr; min-height: 515px; gap: 1.2rem; }
.intro, .banner { background: linear-gradient(115deg, #e1eddc 20%, #edf1d5 100%); border: 1px solid #d5e2ce; color: var(--dark); border-radius: 26px 19px 24px 20px; position: relative; overflow: hidden; }
.intro { padding: clamp(1.7rem, 5vw, 3.5rem); min-height: 460px; }
.intro h1 { max-width: 13ch; }
.intro p:last-of-type { max-width: 28ch; margin-top: 1rem; }
.eyebrow { font-size: .87rem; font-weight: 760; letter-spacing: .075em; text-transform: uppercase; margin-bottom: .85rem; }
.onboarding { padding: clamp(1.35rem, 4vw, 2.5rem); align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.onboarding h2 { font-size: 1.85rem; }
.onboarding p, .subtle { color: var(--muted); }
.onboarding > p { margin-top: .75rem; }
.profile-list { display: grid; gap: .65rem; margin-block: 1rem; }
.profile-list:empty { margin-bottom: 0; }
.profile-list .button { min-height: 52px; text-align: left; padding-inline: 1rem; overflow-wrap: anywhere; }
.clean-mascot { position: absolute; bottom: .7rem; right: 1.1rem; width: 190px; height: 158px; pointer-events: none; }
.mascot-sponge { position: absolute; inset: auto auto 24px 15px; width: 102px; height: 71px; transform: rotate(-12deg); border: 2px solid #b88d42; border-radius: 17px 12px 19px 13px; box-shadow: 0 6px 0 #d5a846; background: radial-gradient(circle at 19% 23%, #e5b857 0 4px, transparent 4.5px), radial-gradient(circle at 82% 26%, #e5b857 0 5px, transparent 5.5px), radial-gradient(circle at 16% 73%, #e5b857 0 6px, transparent 6.5px), radial-gradient(circle at 83% 75%, #e5b857 0 3px, transparent 3.5px), #f7d888; }
.mascot-face { position: absolute; inset: 20px auto auto 37px; width: 7px; height: 8px; border-radius: 50%; background: var(--dark); box-shadow: 20px 0 var(--dark); }
.mascot-face::after { content: ""; position: absolute; inset: 12px auto auto 5px; width: 16px; height: 10px; border-bottom: 3px solid var(--dark); border-radius: 0 0 50% 50%; }
.mascot-bubbles, .mascot-bubbles::before, .mascot-bubbles::after { position: absolute; border: 2px solid #93b9bd; border-radius: 50%; background: #eff8f5; box-shadow: inset 2px 2px #fff; }
.mascot-bubbles { width: 23px; height: 23px; inset: 22px auto auto 25px; }
.mascot-bubbles::before, .mascot-bubbles::after { content: ""; }
.mascot-bubbles::before { width: 12px; height: 12px; inset: -14px auto auto 29px; }
.mascot-bubbles::after { width: 19px; height: 19px; inset: 13px auto auto 60px; }
.mascot-broom { position: absolute; inset: auto 7px 23px auto; font-size: 3.9rem; line-height: 1; transform: rotate(-10deg); }
.banner { min-height: 205px; padding: 2rem; display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) 162px; }
.banner-copy { margin-top: .6rem; }
.banner h1 { font-size: clamp(2.15rem, 6vw, 3.65rem); }
.banner .button { margin-top: 1rem; }
.header-modules { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, .39fr); gap: 1.2rem; margin-block: 1rem 1.2rem; align-items: start; }
.ranking-head { flex-wrap: wrap; }
.ranking-list { list-style: none; padding: 0; margin: .75rem 0 0; }
.ranking-list li > strong { flex: 1; }
.ranking-list .rank-first { color: var(--dark); }
.rank-number { display: grid; place-items: center; flex: none; min-width: 34px; min-height: 34px; border-radius: 9px; background: #edf2eb; font-weight: 750; }
.rank-first .rank-number { background: #faeddd; color: #79491b; }
#winner-description:not(:empty) { margin-top: .45rem; }
.mode-card { padding: 1.25rem; }
.mode-card p { margin-block: .4rem .8rem; }
.cleanup-complete:not(:empty) { margin: .85rem 0; padding: .6rem .75rem; border: 1px solid #a8c7af; border-radius: 9px; background: #e4eee0; color: var(--dark); font-weight: 750; }
.board-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, .39fr); gap: 1.2rem; align-items: start; }
.board-sidebar { display: grid; min-width: 0; gap: 1.2rem; }
.tasks, .people { padding: 1.25rem; }
.turns-card { padding: 1.25rem; border-color: #c4d9c8; background: #eff7ee; }
.turns-card ul { margin-top: .75rem; }
.turns-card li { padding: .65rem 0; border-top: 1px solid #d5e5d7; }
.turns-card li:last-child { padding-bottom: 0; }
.turns-card h3 { font-size: 1rem; overflow-wrap: anywhere; }
.turn-next { margin-top: .2rem; color: var(--muted); }
.turn-next strong { color: var(--dark); overflow-wrap: anywhere; }
.turn-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .65rem; }
.turn-actions .button { padding-inline: .62rem; }
.tips-card { padding: 1.25rem; border-color: #ead9a6; background: #fff9e6; }
.tips-card h2 { margin-bottom: .85rem; }
#tip-content { display: flow-root; overflow-wrap: anywhere; }
.tip-icon { float: right; display: grid; place-items: center; width: 47px; height: 44px; margin: 0 0 .35rem .45rem; border: 1px solid #ead9a6; border-radius: 14px 9px 16px 10px; background: #fffdf6; font-size: 1.28rem; transform: rotate(6deg); }
.tip-task { color: #6b5429; font-size: .875rem; font-weight: 720; }
#tip-name { margin-block: .2rem .35rem; color: var(--dark); font-size: 1.1rem; line-height: 1.22; }
#tip-text { color: #474333; }
.tip-controls { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.tip-controls .button { padding-inline: .62rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.tools { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-block: 1rem .75rem; }
.tasks > .section-head { margin-bottom: .75rem; }
input, select { width: 100%; min-width: 0; min-height: 44px; background-color: white; color: #23332b; border: 1px solid #aebfb0; border-radius: 9px; padding: .55rem .65rem; }
select { appearance: none; padding-right: 1.8rem; background-image: linear-gradient(45deg, transparent 50%, #526357 50%), linear-gradient(135deg, #526357 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.tools select { width: auto; max-width: 100%; font-size: .9rem; }
.task-list li, .people li { border-top: 1px solid var(--line); }
.task-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .65rem 0; }
.register { grid-column: 1; padding-inline: .5rem; }
.register-state { min-width: 4.65rem; text-align: center; font-size: .9rem; }
.assignment-done { color: var(--green); font-weight: 720; }
.task-title { font-weight: 690; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: .25rem .55rem; margin-top: .25rem; font-size: .875rem; color: var(--muted); }
.chip { background: #edf2e8; color: #355641; border-radius: 5px; padding: 0 .35rem; }
.points-chip { background: #f7eedc; color: #694816; }
.task-name-entry { display: flex; align-items: center; gap: .55rem; margin-top: .35rem; }
.task-name-entry input { margin-top: 0; }
.task-name-entry .points-chip { flex: none; padding: .25rem .5rem; }
.empty { text-align: center; padding: 2.4rem .8rem 2.8rem; border-top: 1px solid var(--line); color: var(--muted); }
.empty span { display: grid; place-items: center; margin: 0 auto .8rem; width: 50px; height: 50px; border-radius: 15px; background: #e7f0e2; color: var(--green); font-size: 1.25rem; }
.empty h3 { color: #23332b; margin-bottom: .3rem; }
.people ul { margin-top: 1.1rem; }
.people li { display: flex; align-items: center; gap: .7rem; padding-block: .7rem; overflow-wrap: anywhere; }
.avatar { display: grid; place-items: center; width: 39px; height: 39px; flex: none; border-radius: 12px; background: #e6eee2; color: #315a43; font-weight: 750; }
.people li:nth-child(3n+2) .avatar { background: #fae9db; color: #784a24; }
.people li:nth-child(3n+3) .avatar { background: #e8e8f4; color: #51567d; }
.people small { display: block; color: var(--muted); font-size: .875rem; }
dialog { width: min(440px, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto; overscroll-behavior: contain; background: var(--paper); color: inherit; border: 1px solid var(--line); border-radius: 18px; padding: 1.25rem; }
dialog:not([open]) { display: none; }
dialog::backdrop { background: #18352780; }
.dialog-fallback-open { overflow: hidden; }
.dialog-fallback-open::after { content: ""; position: fixed; inset: 0; z-index: 10; background: #18352780; }
.dialog-fallback { display: block; position: fixed; inset: 0; height: fit-content; margin: auto; z-index: 11; }
.turn-notice { position: fixed; z-index: 4; right: 1rem; bottom: 1rem; width: min(440px, calc(100% - 2rem)); max-height: 65vh; overflow: auto; padding: 1.25rem; border: 1px solid #e8cf8e; border-radius: 18px; background: #fff7db; box-shadow: 0 8px 26px #18352733; cursor: pointer; }
.turn-notice-close { position: absolute; inset: .65rem .65rem auto auto; }
.turn-notice-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: .65rem; border-radius: 14px 9px 16px 10px; background: #f9e3a8; font-size: 1.3rem; transform: rotate(-7deg); }
.turn-notice p { margin-block: .4rem .8rem; }
.turn-notice ul { display: grid; gap: .4rem; }
.turn-notice li { padding: .5rem .65rem; border-radius: 9px; background: white; color: var(--dark); font-weight: 720; overflow-wrap: anywhere; }
dialog .section-head { margin-bottom: 1rem; }
dialog p { color: var(--muted); margin-bottom: 1rem; }
dialog #copy-status { margin: .75rem 0 0; }
#invite-enrollment { margin-top: .85rem; padding-top: .7rem; border-top: 1px solid var(--line); }
#invite-enrollment summary { min-height: 44px; padding-block: .55rem; cursor: pointer; font-weight: 680; }
label { display: block; font-size: .94rem; font-weight: 650; }
label input, label select { margin-top: .35rem; }
dialog label + label { margin-top: .85rem; }
.password-field + .password-field, #profile-name-field:not([hidden]) + .password-field { margin-top: .85rem; }
.password-entry { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: .45rem; margin-top: .35rem; }
.password-entry input { min-height: 48px; }
.password-entry input::-ms-reveal { display: none; }
.password-entry .password-eye { display: grid; place-items: center; min-width: 48px; min-height: 48px; padding: 0; border-radius: 9px; }
.password-eye-slash { display: none; }
.password-eye.is-visible .password-eye-slash { display: inline; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.15rem; }
.form-error { margin: .75rem 0 0; color: #982f2f; font-weight: 600; }
.catalog-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-block: .75rem; }
#catalog-task-details:not(:empty), #catalog-notice:not(:empty) { margin: .55rem 0; }
#catalog-task-details:empty { display: none; }
.catalog-create { margin-top: .35rem; }
.history-grid { margin-top: 1.2rem; }
.history-card, .winner-card { padding: 1.25rem; }
.calendar-head { flex-wrap: wrap; margin-bottom: 1rem; }
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: .55rem; }
.month-nav p { text-align: center; min-width: 9.5rem; font-weight: 700; }
.weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; text-align: center; }
.weekdays { color: var(--muted); font-size: .875rem; padding-bottom: .35rem; }
.calendar-days button { min-width: 0; min-height: 48px; display: grid; place-content: center; gap: .02rem; border: 1px solid var(--line); border-radius: 8px; background: #f6f8f5; color: var(--dark); padding: .2rem; }
.calendar-days button.has-records { background: #e2eee1; border-color: #9ebb9e; }
.calendar-days button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: white; }
.calendar-days small { font-size: .75rem; line-height: 1; font-weight: 700; }
.history-detail { border-top: 1px solid var(--line); margin-top: 1.15rem; padding-top: 1rem; }
.history-detail h3 { font-size: 1rem; margin-bottom: .4rem; }
.history-detail p { color: var(--muted); }
#history-list li, #leaderboard li, #deleted-list li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding-block: .65rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
#history-list li:last-child, #leaderboard li:last-child, #deleted-list li:last-child { border-bottom: 0; }
#history-list small, #deleted-list small { display: block; color: var(--muted); font-size: .875rem; }
#leaderboard li > span:last-child { flex: none; font-weight: 700; }
.history-action { flex: none; }
.history-deletions { margin-top: 1rem; padding: .65rem 0 0; border-top: 1px solid var(--line); }
.history-deletions summary { min-height: 44px; padding: .55rem 0; cursor: pointer; font-weight: 700; }
.history-deletions p, #deleted-count { color: var(--muted); }
#calendar-action:empty { display: none; }
#calendar-action:not(:empty), #password-hint { margin-top: .55rem; }
.settings-dialog { width: min(700px, calc(100% - 2rem)); }
.live-draw-dialog { width: min(660px, calc(100% - 1.5rem)); }
.live-draw-dialog .draw-queue, .live-draw-dialog .draw-board { background: white; }
.live-draw-dialog .draw-queue h3, .live-draw-dialog .draw-board h3 { margin-bottom: .45rem; }
.live-draw-dialog .draw-queue ol { max-height: 28vh; overflow-y: auto; }
.live-status { justify-self: start; margin: 0; padding: .3rem .6rem; border-radius: 8px; background: #fff3cc; color: var(--dark); font-size: .9rem; font-weight: 720; }
.trade-link { justify-self: start; }
.mode-card .trade-link, #open-trades-settings { margin-top: .55rem; }
#trade-form { margin-bottom: 1rem; }
#trade-dialog p:empty { display: none; }
#trade-list li, #trade-tray-list li { padding-block: .7rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
#trade-list p, #trade-tray-list p { margin: .25rem 0 0; }
.trade-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .55rem; }
#trade-offer-panel, .trade-tray { margin-block: 0 1rem; }
#trade-offer-panel summary { min-height: 44px; padding-block: .55rem; font-weight: 720; }
.trade-popup { position: fixed; z-index: 20; inset: auto .75rem .75rem auto; width: min(440px, calc(100% - 1.5rem)); max-height: 70vh; overflow: auto; padding: 1rem; border: 1px solid #e8cf8e; border-radius: 16px; background: #fff7db; box-shadow: 0 8px 26px #18352733; overflow-wrap: anywhere; }
.trade-popup p { margin: .4rem 0 0; }
.trade-popup p:empty { display: none; }
.trade-popup .section-head { margin: 0; }
.trade-popup .icon { flex: 0 0 44px; }
#password-settings { margin-bottom: 1.15rem; }
#password-settings summary { min-height: 44px; padding-block: .55rem; font-weight: 720; }
#password-form { padding-top: .35rem; }
#new-password-hint { margin: .35rem 0 .85rem; }
#password-status:empty { display: none; }
#password-reset { margin-block: 0 1.15rem; }
#password-reset-list { list-style: none; padding: 0; margin: .55rem 0 0; }
#password-reset-list button { justify-self: start; }
#password-reset-status:empty { display: none; }
.switch-row, .participant { display: flex; align-items: center; gap: .55rem; }
.switch-row { min-height: 44px; }
.switch-row input, .participant input { width: 20px; min-height: 20px; margin: 0; accent-color: var(--green); flex: none; }
.rotation-switch { margin-top: .7rem; }
.rotation-order { margin: 0; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: 10px; }
.rotation-order legend { padding-inline: .3rem; font-weight: 680; }
.rotation-order ol { padding-inline-start: 1.4rem; margin: 0; }
.rotation-order li { padding-block: .35rem; overflow-wrap: anywhere; }
.rotation-actions { display: flex; gap: .4rem; margin-top: .3rem; }
.rotation-actions .button { padding-inline: .55rem; }
#cleanup-participants { margin: .7rem 0 0; border: 1px solid var(--line); border-radius: 10px; padding: .45rem .65rem; }
#cleanup-participants legend { padding-inline: .3rem; font-weight: 680; }
#cleanup-roster { display: flex; flex-wrap: wrap; gap: .35rem .7rem; }
.participant { min-height: 40px; margin: 0; padding: .3rem .55rem; border-radius: 8px; background: #edf2eb; }
#cleanup-notice:empty { display: none; }
#cleanup-notice { margin-block: .75rem 0; }
.cleanup-active { margin-top: 1.15rem; }
.cleanup-task-selection { margin-bottom: 1rem; padding: 0 .85rem .65rem; border: 1px solid var(--line); border-radius: 12px; }
.cleanup-task-selection summary { min-height: 44px; padding-block: .55rem; font-weight: 720; }
.cleanup-task-selection p { margin-bottom: .65rem; }
.cleanup-selection-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
#cleanup-task-options { display: grid; gap: .25rem; max-height: 45vh; overflow-y: auto; margin-block: .6rem; }
#cleanup-task-options .participant { min-height: 44px; overflow-wrap: anywhere; }
dialog #cleanup-task-options label + label { margin-top: 0; }
.draw-stage { display: grid; gap: .8rem; padding: 1rem; border-radius: 14px; border: 1px solid #c8dcca; background: #e4eee0; }
.draw-stage .section-head { flex-wrap: wrap; margin: 0; }
.draw-stage h3 { font-size: 1.12rem; }
#draw-count { font-size: .9rem; color: var(--muted); }
.draw-display { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 1rem; }
.wheel-frame { position: relative; width: min(100%, 256px); margin-inline: auto; padding: .7rem .25rem .25rem; isolation: isolate; }
.wheel-pointer { position: absolute; z-index: 1; inset: 0 auto auto 50%; width: 30px; height: 28px; transform: translateX(-50%); clip-path: polygon(0 0, 100% 0, 50% 100%); background: var(--dark); }
.draw-wheel { --wheel-angle: 0deg; position: relative; aspect-ratio: 1; border: 5px solid white; border-radius: 50%; background: #c4dfcd; box-shadow: 0 0 0 1px #98b7a3, 0 6px 12px #163f3026; transform: rotate(var(--wheel-angle)); }
.draw-wheel[data-segments="2"] { background: conic-gradient(#c4dfcd 0turn .5turn, #f8dfa7 .5turn 1turn); }
.draw-wheel[data-segments="3"] { background: conic-gradient(#c4dfcd 0turn calc(1turn / 3), #f8dfa7 calc(1turn / 3) calc(2turn / 3), #d9d8ef calc(2turn / 3) 1turn); }
.draw-wheel::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 16%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 4px solid white; border-radius: 50%; background: var(--green); }
.wheel-label { position: absolute; inset: 0; display: grid; justify-items: center; transform: rotate(var(--sector-angle)); }
.wheel-label span { position: absolute; inset-block-start: 9%; width: 43%; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; padding: .16rem .25rem; border: 1px solid transparent; border-radius: 8px; line-height: 1.14; text-align: center; font-size: .9rem; font-weight: 760; color: var(--dark); transform: rotate(calc(0deg - var(--sector-angle) - var(--wheel-angle))); }
.wheel-label.wheel-winner span { border-color: #537b62; background: #fff; }
.draw-cards { display: grid; gap: .7rem; }
.draw-next, .draw-result { display: grid; align-content: center; gap: .45rem; padding: .8rem; border-radius: 12px; background: #fff; text-align: center; overflow-wrap: anywhere; }
.draw-next { min-height: 88px; border: 1px solid #abc8b1; color: var(--dark); }
#draw-next-task, #live-next-task { font-size: 1.4rem; line-height: 1.12; }
.draw-result { min-height: 110px; }
.draw-label { color: var(--muted); font-size: .875rem; font-weight: 700; }
#draw-task, #live-result-task { color: var(--dark); font-size: 1.15rem; line-height: 1.12; }
#draw-person, #live-result-person { color: var(--green); font-size: 1.85rem; font-weight: 800; line-height: 1.05; letter-spacing: -.025em; }
#draw-person:empty { display: none; }
.draw-result:has(#draw-person:not(:empty)) #draw-task { font-size: 1.45rem; }
.draw-next.drawing { animation: draw-pulse 300ms ease-in-out alternate infinite; }
.draw-result.revealed { animation: draw-reveal 450ms ease-out; }
.draw-button { justify-self: center; min-width: 150px; border-color: #be9247; border-radius: 20px 12px 18px 14px; background: radial-gradient(circle at 9% 25%, #e4b963 0 3px, transparent 3.5px), radial-gradient(circle at 89% 65%, #e4b963 0 4px, transparent 4.5px), #f8db95; color: #3d3015; box-shadow: 0 3px 0 #ba8c43; letter-spacing: .06em; }
.draw-button:hover { background-color: #f4ce79; }
.draw-button:active { box-shadow: 0 1px 0 #ba8c43; }
.draw-progress { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: .85rem; margin-top: 1rem; align-items: start; }
.draw-queue, .draw-board { padding: .8rem; border: 1px solid var(--line); border-radius: 12px; }
.draw-progress h4 { margin: 0 0 .65rem; font-size: 1rem; color: var(--dark); }
.draw-queue ol { display: grid; gap: .3rem; padding: 0; margin: 0; list-style: none; }
.draw-queue li { padding: .4rem .55rem; border-radius: 7px; background: #f5f7f3; font-size: .9rem; overflow-wrap: anywhere; }
.draw-queue li[aria-current="true"] { background: #e4eee0; color: var(--dark); font-weight: 720; }
.draw-queue p { margin: 0; }
.draw-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }
.draw-table th, .draw-table td { padding: .45rem; overflow-wrap: anywhere; vertical-align: top; font-size: .875rem; }
.draw-table th { background: #e4eee0; color: var(--dark); }
.draw-table th:nth-child(2) { background: #f8edcf; }
.draw-table th:nth-child(3) { background: #eeedf8; }
.draw-person-progress { display: block; margin-top: .25rem; color: var(--muted); font-size: .875rem; font-weight: 600; }
.draw-table td { border-bottom: 1px solid var(--line); }
.draw-table td.draw-cell-empty { color: var(--muted); }
.draw-assigned-title, .draw-table .assignment-done { display: block; }
.draw-table .assignment-done { margin-top: .28rem; }
.draw-mark { margin-top: .3rem; padding-inline: .35rem; max-width: 100%; font-size: .875rem; overflow-wrap: anywhere; }
.draw-table .cleanup-edit-task { display: block; margin-top: .3rem; padding-inline: .35rem; max-width: 100%; overflow-wrap: anywhere; }
.manual-assignments { margin-block: .75rem; }
.manual-assignments summary { min-height: 44px; padding: .55rem 0; cursor: pointer; font-weight: 700; }
.assignment-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: .65rem; border-top: 1px solid var(--line); padding-block: .45rem; overflow-wrap: anywhere; }
.assignment-row select { margin: 0; }
.cleanup-task-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.cleanup-task-actions select { flex: 1 1 7rem; }
@keyframes draw-pulse { from { opacity: .7; } to { opacity: 1; } }
@keyframes draw-reveal { from { opacity: .45; transform: scale(.96); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .draw-next.drawing, .draw-result.revealed { animation: none; } }
@media (max-width: 760px) {
  .welcome, .board-grid, .header-modules { grid-template-columns: 1fr; }
  .intro { min-height: 375px; }
}
@media (max-width: 500px) {
  .top-inner, .container { width: calc(100% - 1.5rem); }
  .container { padding-top: 1rem; }
  .top-inner { min-height: 66px; }
  .top-inner:has(#switch-profile:not([hidden])) { align-items: flex-start; flex-direction: column; padding-block: .6rem; }
  .top-actions { justify-content: flex-start; }
  .onboarding { grid-row: 1; }
  .intro { min-height: 285px; }
  .intro p:last-of-type { max-width: 19ch; }
  .intro .clean-mascot { right: 0; bottom: 0; transform: scale(.64); transform-origin: bottom right; }
  .banner { grid-template-columns: minmax(0, 1fr) 70px; padding: 1.25rem; min-height: 175px; }
  .banner .clean-mascot { right: .1rem; bottom: .15rem; transform: scale(.48); transform-origin: bottom right; }
  .tasks, .people, .tips-card, .turns-card { padding: .85rem; }
  .history-card, .winner-card, .mode-card { padding: .85rem; }
  .calendar-days, .weekdays { gap: .2rem; }
  .calendar-days button { min-height: 44px; }
  .draw-display { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .draw-progress { grid-template-columns: minmax(0, 1fr); }
  .wheel-frame { width: min(100%, 218px); }
  .draw-result { min-height: 100px; }
  .cleanup-task-row { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  dialog, .dialog-fallback { position: fixed; inset: .75rem 0 auto; margin: 0 auto; max-height: calc(100vh - 1.5rem); max-height: calc(var(--visible-height, 100dvh) - 1.5rem); padding: 1rem; }
  input, select, .tools select { font-size: 1rem; }
  .dialog-actions { flex-wrap: wrap; }
  .calendar-head .month-nav { width: 100%; }
  .month-nav p { min-width: 0; }
}
