:root{--bg:#f7f8f3;--surface:#fff;--text:#26301f;--muted:#6b7361;--accent:#3e7c4f;--accent-dark:#2f5f3c;--accent-soft:#e6f0e6;--danger:#b3372f;--danger-soft:#fbe9e7;--warning-soft:#fdf3d7;--info-soft:#e8f0fb;--info:#2f5f8f;--border:#dfe3d7;--radius:14px}*{box-sizing:border-box}html,body,#root{min-height:100vh;margin:0}body{background:var(--bg);color:var(--text);font-family:Segoe UI,system-ui,-apple-system,sans-serif;font-size:16px;line-height:1.45}h1{margin:.2rem 0 .4rem;font-size:1.6rem}h2{margin:0 0 .6rem;font-size:1.05rem}p{margin:.4rem 0}.muted{color:var(--muted)}.hint{color:var(--muted);margin:.2rem 0 .6rem;font-size:.85rem}.brand{letter-spacing:.04em;color:var(--accent-dark);font-weight:700}.brand-small{letter-spacing:.04em;color:var(--accent-dark);text-transform:uppercase;font-size:.8rem;font-weight:700}button{font:inherit;cursor:pointer;border:1px solid #0000;border-radius:10px;padding:.55rem 1rem}button:disabled{opacity:.55;cursor:default}.primary{background:var(--accent);color:#fff}.primary:hover:not(:disabled){background:var(--accent-dark)}.secondary{background:var(--accent-soft);color:var(--accent-dark)}.link{color:var(--accent-dark);background:0 0;border:none;padding:.3rem .2rem;text-decoration:underline}.field{margin-bottom:.7rem;display:block}.field-label{margin-bottom:.25rem;font-size:.85rem;font-weight:600;display:block}input,select{font:inherit;border:1px solid var(--border);background:var(--surface);width:100%;color:var(--text);border-radius:10px;padding:.5rem .7rem}input.invalid{border-color:var(--danger)}.field-error{color:var(--danger);margin-top:.2rem;font-size:.85rem;display:block}.form-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:0 .8rem;display:grid}.banner{border-radius:10px;padding:.6rem .8rem;font-size:.92rem}.banner.error{background:var(--danger-soft);color:var(--danger)}.banner.success{background:var(--accent-soft);color:var(--accent-dark)}.banner.warning{background:var(--warning-soft);color:#7a5b12}.banner.info{background:var(--info-soft);color:var(--info)}.landing{text-align:center;max-width:640px;margin:0 auto;padding:3rem 1.2rem}.role-cards{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem;margin:1.6rem 0;display:grid}.role-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);flex-direction:column;gap:.5rem;padding:1.3rem;display:flex}.role-card h2{margin:0}.role-card .primary{margin-top:.4rem}.auth-layout{justify-content:center;align-items:flex-start;min-height:100vh;padding:3rem 1.2rem;display:flex}.auth-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);width:100%;max-width:420px;padding:1.6rem}.auth-card .back{margin-bottom:.6rem}.auth-card form{margin-top:.8rem}.profile-list{flex-direction:column;gap:.5rem;display:flex}.profile-option{background:var(--accent-soft);color:var(--text);border:1px solid var(--border);text-align:left;align-items:center;gap:.6rem;display:flex}.profile-selected{align-items:center;gap:.5rem;font-weight:600;display:flex}.color-dot{border-radius:50%;flex:none;width:14px;height:14px;display:inline-block}.home{max-width:780px;margin:0 auto;padding:1.4rem 1.2rem 3rem}.topbar{justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1.2rem;display:flex}.topbar-right{align-items:center;gap:.7rem;display:flex}.member-chip{background:var(--accent-soft);border-radius:999px;padding:.3rem .8rem;font-size:.9rem}.home-content{flex-direction:column;gap:1rem;display:flex}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.2rem 1.3rem}.group-name{font-weight:600}.badge{background:var(--accent-soft);color:var(--accent-dark);border-radius:999px;margin-left:.3rem;padding:.1rem .55rem;font-size:.78rem;font-weight:600}.entry-code-row{flex-wrap:wrap;align-items:center;gap:.8rem;display:flex}.entry-code{letter-spacing:.25em;background:var(--accent-soft);border-radius:10px;padding:.5rem .9rem;font-family:Cascadia Mono,Consolas,monospace;font-size:1.4rem}.balance-line strong,.balance-big{font-size:1.4rem}.member-list{flex-direction:column;gap:.45rem;margin:0;padding:0;list-style:none;display:flex}.member-row{align-items:center;gap:.55rem;display:flex}.member-name{font-weight:600}.inline-form{border-top:1px dashed var(--border);max-width:280px;margin-top:.8rem;padding-top:.8rem}.inline-form-actions{gap:.6rem;display:flex}.occurrence-list,.template-list,.prize-list,.ledger-list{flex-direction:column;gap:.45rem;margin:0;padding:0;list-style:none;display:flex}.occurrence-row,.template-row,.prize-row,.ledger-row{border:1px solid var(--border);border-radius:10px;flex-wrap:wrap;align-items:center;gap:.55rem;padding:.45rem .6rem;display:flex}.occurrence-title{font-weight:600}.comment-line{flex-basis:100%;font-style:italic}.points-badge{background:var(--accent-soft);color:var(--accent-dark);border-radius:999px;padding:.1rem .55rem;font-size:.78rem;font-weight:600}.status-badge{border:1px solid var(--border);color:var(--muted);border-radius:999px;padding:.1rem .55rem;font-size:.78rem;font-weight:600}.status-badge.status-available{background:var(--info-soft);color:var(--info);border-color:#0000}.status-badge.status-claimed{background:var(--warning-soft);color:var(--text);border-color:#0000}.status-badge.status-submitted{background:var(--info-soft);color:var(--info);border-color:#0000}.status-badge.status-accepted{background:var(--accent-soft);color:var(--accent-dark);border-color:#0000}.status-badge.status-returned{background:var(--danger-soft);color:var(--danger);border-color:#0000}.weekday-editor{margin:.4rem 0 .8rem}.weekday-presets{flex-wrap:wrap;gap:.5rem;margin-bottom:.5rem;display:flex}.weekday-days{flex-wrap:wrap;gap:.35rem;display:flex}.weekday-chip{border:1px solid var(--border);background:var(--surface);cursor:pointer;border-radius:999px;padding:.25rem .7rem;font-size:.85rem}.weekday-chip.selected{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-dark);font-weight:600}.check-row{flex-wrap:wrap;gap:1.2rem;margin-bottom:.8rem;display:flex}.check{align-items:center;gap:.4rem;display:flex}.daymap{margin-top:.9rem}.daymap-row{flex-wrap:wrap;gap:.4rem;display:flex}.daymap-cell{border:1px solid var(--border);border-radius:8px;flex-direction:column;align-items:center;min-width:3.2rem;padding:.2rem .45rem;font-size:.72rem;display:flex}.daymap-cell.success{background:var(--accent-soft);color:var(--accent-dark);border-color:#0000}.daymap-cell.incomplete{background:var(--warning-soft);border-color:#0000}.daymap-cell.empty{color:var(--muted)}.daymap-value{font-weight:600}.ledger{border-top:1px dashed var(--border);margin-top:.8rem;padding-top:.6rem}.ledger-date{color:var(--muted);font-size:.85rem}.ledger-reason{flex:1}.ledger-delta.positive{color:var(--accent-dark);font-weight:600}.ledger-delta.negative{color:var(--danger);font-weight:600}@media (width<=480px){.occurrence-row,.template-row,.prize-row,.ledger-row{flex-direction:column;align-items:flex-start;gap:.3rem}.occurrence-row>button,.prize-row>button{align-self:flex-start}.topbar{flex-direction:column;align-items:flex-start}.entry-code{font-size:1.1rem}}.route-map{margin-top:.75rem}.route-progress{flex-wrap:wrap;gap:.5rem;margin-bottom:.75rem;display:flex}.route-path{align-items:flex-start;gap:1rem;margin:0;padding:.75rem .25rem;list-style:none;display:flex;overflow-x:auto}.route-start,.route-milestone{text-align:center;flex-direction:column;align-items:center;gap:.25rem;min-width:7rem;display:flex}.route-dot{border:2px solid var(--border,#c9d4e3);background:var(--surface,#fff);border-radius:50%;width:1.4rem;height:1.4rem}.route-dot.start{background:var(--border,#c9d4e3)}.route-dot.unlocked{background:#e6f6e7;border-color:#7bc47f}.route-dot.received{background:#2e7d32;border-color:#2e7d32}.route-label{font-weight:600}.route-conditions{color:var(--muted,#667);font-size:.85rem}.route-block{border-top:1px solid var(--border,#e3e8f0);margin-top:.75rem;padding-top:.75rem}.route-head{justify-content:space-between;align-items:baseline;gap:.5rem;display:flex}.task-picker{flex-direction:column;gap:.25rem;margin:.25rem 0 .75rem;padding:0;list-style:none;display:flex}.milestone-list{flex-direction:column;gap:.5rem;margin:.25rem 0;padding:0;list-style:none;display:flex}.milestone-row{grid-template-columns:auto 1fr auto auto auto auto;align-items:end;gap:.5rem;display:grid}.milestone-index{padding-bottom:.5rem;font-weight:700}.consequence-grid{margin-top:.5rem}.grade-field{min-width:5.5rem}.badge.consequence{color:#b3261e;background:#fdecea}.badge.consequence-applied{color:#2e7d32;background:#e6f6e7}@media (width<=480px){.milestone-row{grid-template-columns:1fr}.route-path{flex-wrap:wrap;gap:.75rem;overflow-x:visible}}.bell-root{position:relative}.bell-button{padding:.35rem .55rem;font-size:1.15rem;line-height:1;position:relative}.bell-badge{background:var(--accent);color:#fff;text-align:center;border-radius:999px;min-width:1.1rem;padding:.05rem .25rem;font-size:.68rem;font-weight:700;position:absolute;top:-.35rem;right:-.35rem}.bell-panel{z-index:30;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);width:min(22rem,100vw - 2rem);max-height:22rem;padding:.6rem .75rem;position:absolute;top:calc(100% + .4rem);right:0;overflow-y:auto;box-shadow:0 10px 28px #0f172a29}.bell-panel-head{justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:.4rem;display:flex}.bell-panel-title{font-weight:700}.bell-empty{color:var(--muted,#64748b);margin:.4rem 0}.bell-list{flex-direction:column;gap:.25rem;margin:0;padding:0;list-style:none;display:flex}.bell-item-button{text-align:left;border-radius:.5rem;flex-direction:column;gap:.15rem;width:100%;padding:.45rem .5rem;display:flex}.bell-item.unread .bell-item-button{background:var(--accent-soft);font-weight:600}.bell-item-comment{color:var(--muted,#64748b);font-style:italic;font-weight:400;display:block}.bell-item-grade{margin-left:.4rem;font-weight:700;display:inline-block}.bell-item-meta{color:var(--muted,#64748b);font-size:.75rem;font-weight:400}@media (width<=480px){.bell-panel{width:auto;max-height:60vh;position:fixed;inset:auto .75rem .75rem}}.tabs{border-bottom:1px solid var(--border);flex-wrap:wrap;gap:.4rem;margin-bottom:1.1rem;padding-bottom:.6rem;display:flex}.tab{border:1px solid var(--border);background:var(--surface);cursor:pointer;border-radius:999px;padding:.35rem .95rem;font-size:.92rem}.tab.active{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-dark);font-weight:600}.group-switcher-wrap{display:inline-flex;position:relative}.group-switcher{border:1px solid var(--border);background:var(--surface);cursor:pointer;max-width:11rem;color:var(--text);border-radius:999px;align-items:center;gap:.45rem;padding:.3rem .7rem;font-size:.88rem;display:inline-flex}.group-switcher-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.group-switcher-caret{color:var(--muted);font-size:.7rem}.group-switcher-menu{z-index:30;background:var(--surface);border:1px solid var(--border);border-radius:10px;min-width:11rem;max-width:calc(100vw - 2rem);max-height:16rem;margin:0;padding:.3rem;list-style:none;position:absolute;top:calc(100% + .35rem);right:0;overflow-y:auto;box-shadow:0 8px 24px #26301f29}.group-switcher-menu li>button{text-align:left;cursor:pointer;width:100%;color:var(--text);background:0 0;border:0;border-radius:7px;align-items:center;gap:.5rem;padding:.4rem .55rem;font-size:.9rem;display:flex}.group-switcher-menu li>button.focused,.group-switcher-menu li>button:hover{background:var(--accent-soft)}.group-switcher-menu li[aria-selected=true]>button{font-weight:600}.duty-photo{object-fit:cover;vertical-align:middle;border-radius:8px;width:28px;height:28px;display:inline-block}.duty-photo-lg{width:72px;height:72px}.group-list{flex-direction:column;gap:.45rem;margin:0 0 .8rem;padding:0;list-style:none;display:flex}.group-row{flex-wrap:wrap;align-items:center;gap:.6rem;display:flex}.toggle{cursor:pointer;font:inherit;color:inherit;background:0 0;border:none;align-items:center;gap:.55rem;padding:.15rem 0;display:inline-flex}.toggle-track{background:var(--border);border-radius:999px;flex:none;width:2.4rem;height:1.3rem;transition:background .15s;position:relative}.toggle.on .toggle-track{background:var(--accent)}.toggle-knob{background:#fff;border-radius:999px;width:1rem;height:1rem;transition:transform .15s;position:absolute;top:.15rem;left:.15rem}.toggle.on .toggle-knob{transform:translate(1.1rem)}.toggle-label{font-size:.92rem}.toggle:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}.duty-icon{color:var(--accent-dark);flex:none;align-self:center}.duty-icon-fallback{background:var(--border);border-radius:999px;flex:none;align-self:center;width:8px;height:8px;display:inline-block}.icon-picker{flex-wrap:wrap;gap:.35rem;display:flex}.icon-chip{border:1px solid var(--border);background:var(--surface);cursor:pointer;width:2.3rem;height:2.3rem;color:inherit;border-radius:10px;justify-content:center;align-items:center;display:inline-flex}.icon-chip.selected{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-dark)}.icon-chip .duty-icon{color:currentColor}.icon-none{width:20px;height:20px;position:relative}.icon-none:before,.icon-none:after{content:"";border-top:1.7px solid;border-radius:999px;position:absolute;top:50%;left:4px;right:4px;transform:rotate(45deg)}.icon-none:after{transform:rotate(-45deg)}@media (width<=480px){.group-switcher{max-width:9rem}.group-switcher-menu{min-width:min(11rem,100vw - 2rem)}.tabs{gap:.3rem}.tab{padding:.3rem .75rem;font-size:.88rem}}
