:root{--bg: #f6f5f3;--surface: #ffffff;--surface-2: #f1efec;--text: #1c1b1a;--muted: #6b6760;--border: #e2ded8;--accent: #b91c1c;--accent-fg: #ffffff;--done: #15803d;--done-bg: #dcfce7;--tonight-bg: #bbf7d0;--warn: #b45309;--danger: #b91c1c;--excused-bg: #fef3c7;--radius: 12px;--tap: 48px;color-scheme:light}@media(prefers-color-scheme:dark){:root{--bg: #161514;--surface: #211f1e;--surface-2: #2b2927;--text: #f1eeea;--muted: #a39e96;--border: #3a3734;--accent: #ef4444;--done: #4ade80;--done-bg: #14361f;--tonight-bg: #1d5a31;--warn: #fbbf24;--danger: #f87171;--excused-bg: #4a3a12;color-scheme:dark}}*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;font-size:16px;line-height:1.4;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}h1,h2,h3,h4{margin:0 0 8px;line-height:1.2}h2{font-size:1.2rem}h3{font-size:1.05rem}h4{font-size:.95rem;margin-top:16px}button,input,select{font:inherit;color:inherit}input,select{min-height:44px;padding:8px 10px;border:1px solid var(--border);border-radius:8px;background:var(--surface);max-width:100%}input[type=checkbox]{min-height:0;width:22px;height:22px;accent-color:var(--accent)}.btn{min-height:44px;padding:8px 14px;border:1px solid var(--border);border-radius:10px;background:var(--surface);cursor:pointer;white-space:nowrap;touch-action:manipulation}.btn:active{transform:translateY(1px)}.btn:disabled{opacity:.5;cursor:default}.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-fg);font-weight:600}.btn.danger{color:var(--danger);border-color:var(--danger);background:transparent}.btn.ghost{border-color:transparent;background:transparent}.btn.small{min-height:36px;padding:4px 10px;font-size:.9rem}.btn.big{min-height:52px;font-size:1.1rem}.btn.on{background:var(--excused-bg);border-color:var(--warn);font-weight:600}.muted{color:var(--muted)}.small{font-size:.85rem}.error{color:var(--danger)}.empty{color:var(--muted);text-align:center;padding:24px 8px}.hint{color:var(--muted);font-size:.85rem;margin:12px 4px 32px}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px;margin-bottom:12px}.dot{display:inline-block;width:14px;height:14px;border-radius:50%;flex:none;border:1px solid rgba(0,0,0,.15)}.dot.big{width:22px;height:22px}.login{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px}.login-card{width:100%;max-width:380px;display:flex;flex-direction:column;gap:14px;text-align:center;align-items:center}.login-card label{width:100%;text-align:left;display:flex;flex-direction:column;gap:4px;font-weight:600}.login-card .btn{width:100%}.brand-logo{display:inline-flex;background:#fff;border-radius:12px;padding:10px 14px}.brand-logo img{display:block;width:220px;height:auto}.login-note{max-width:380px;margin:12px auto 0;color:var(--muted);font-size:.8rem;text-align:center}.device-list li{gap:10px;flex-wrap:wrap}.center-screen{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}.app{max-width:900px;margin:0 auto;min-height:100vh}.topbar{position:sticky;top:0;z-index:10;background:var(--surface);border-bottom:1px solid var(--border);padding:env(safe-area-inset-top) 0 0}.topbar-row{display:flex;align-items:center;gap:8px;padding:8px 12px 4px}.brand{color:var(--accent);font-size:1.15rem}.date-select{flex:1;min-width:0;font-weight:600}.tabs{display:flex;overflow-x:auto;padding:0 4px}.tabs button{flex:1;min-height:44px;border:none;background:none;border-bottom:3px solid transparent;cursor:pointer;font-weight:600;color:var(--muted);padding:0 10px;white-space:nowrap}.tabs button.active{color:var(--accent);border-bottom-color:var(--accent)}.status{font-size:.85rem;padding:4px 12px;text-align:center}.status.offline{background:var(--danger);color:#fff}.status.saving{background:var(--excused-bg)}.filters{padding:8px 12px 0}.chips{display:flex;gap:6px;overflow-x:auto;padding-bottom:8px;scrollbar-width:none}.chip{min-height:38px;padding:4px 12px;border-radius:999px;border:1.5px solid var(--border);background:var(--surface);cursor:pointer;white-space:nowrap;display:inline-flex;align-items:center;gap:6px;flex:none}.chip.on{background:var(--text);color:var(--bg);border-color:var(--text);font-weight:600}.chip.color.on .dot{border-color:#ffffffb3}.content{padding:4px 12px 24px}.summary-line{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:4px 2px 10px;flex-wrap:wrap}.list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.row{display:flex;align-items:stretch;gap:6px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:4px}.name{font-weight:600}.sub{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:.88rem;color:var(--muted)}.att-main{flex:1;display:flex;align-items:center;gap:10px;min-height:var(--tap);border:none;background:none;text-align:left;cursor:pointer;padding:4px 8px;border-radius:8px}.check{width:28px;height:28px;border-radius:8px;border:2px solid var(--border);display:inline-flex;align-items:center;justify-content:center;font-weight:800;flex:none}.row.att.present{background:var(--done-bg);border-color:var(--done)}.row.att.present .check{background:var(--done);border-color:var(--done);color:#fff}.row.att.excused{background:var(--excused-bg)}.att-label{margin-left:auto;font-size:.85rem;color:var(--muted)}.row.att .btn{align-self:center}.hb-main{flex:1;min-width:0;display:flex;align-items:center;gap:10px;min-height:56px;border:none;background:none;text-align:left;cursor:pointer;padding:4px 8px}.hb-text{display:flex;flex-direction:column;gap:2px;min-width:0}.tonight{font-size:.85rem;color:var(--done);font-weight:600}.next-btn{align-self:center;background:var(--done-bg);border-color:var(--done);color:var(--text);font-weight:600;min-height:var(--tap)}.book-badge{font-size:.75rem;font-weight:700;padding:1px 8px;border-radius:999px;background:var(--surface-2);color:var(--text)}.book-badge.b-H{background:#dbeafe;color:#1e3a8a}.book-badge.b-W{background:#fce7f3;color:#831843}.book-badge.b-S{background:#ede9fe;color:#4c1d95}.done-text{color:var(--done);font-weight:600}.warn-text{color:var(--warn)}.overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;z-index:50;display:flex;justify-content:center;align-items:flex-end}.overlay.top{z-index:60;align-items:center;padding:16px}.sheet{background:var(--bg);width:100%;max-width:760px;height:100%;overflow-y:auto;padding:0 12px 32px;-webkit-overflow-scrolling:touch}@media(min-width:800px){.overlay{align-items:center;padding:24px}.sheet{height:auto;max-height:100%;border-radius:var(--radius)}}.sheet-head{position:sticky;top:0;z-index:2;background:var(--bg);display:flex;align-items:center;gap:10px;padding:12px 0 8px;border-bottom:1px solid var(--border);margin-bottom:10px}.sheet-title{flex:1;min-width:0}.sheet-title h2{margin:0}.book-tabs{margin-bottom:4px}.heading-card{padding:10px 12px}.heading-card.complete{border-color:var(--done)}.heading-title{display:flex;justify-content:space-between;align-items:center;width:100%;border:none;background:none;padding:4px 0 8px;cursor:pointer;text-align:left}.heading-title h3{margin:0}.group-label{font-size:.85rem;color:var(--muted);font-weight:600;margin:6px 0 4px}.items{display:grid;grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:6px}.items.wide{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}.item{min-height:52px;border:1.5px solid var(--border);border-radius:10px;background:var(--surface);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4px;touch-action:manipulation}.item-label{font-weight:700}.item-date{font-size:.72rem;color:var(--done)}.item.done{background:var(--done-bg);border-color:var(--done)}.item.done .item-label:before{content:"✓ ";color:var(--done)}.item.tonight{background:var(--tonight-bg)}.small-items{grid-template-columns:repeat(auto-fill,minmax(46px,1fr));margin-bottom:4px}.small-items .item{min-height:38px}.small-items .group-label{grid-column:1 / -1}.banner{border-radius:var(--radius);padding:12px 14px;margin-bottom:12px}.banner p{margin:0 0 8px}.banner.success{background:var(--done-bg);border:1px solid var(--done)}.banner.warn{background:var(--excused-bg);border:1px solid var(--warn)}.banner-row{display:flex;gap:8px;flex-wrap:wrap}.dialog{background:var(--surface);border-radius:var(--radius);padding:18px;width:100%;max-width:380px}.dialog-buttons{display:flex;flex-direction:column;gap:8px}.earned-list,.plain{list-style:none;margin:0;padding:0}.earned-list li,.device-list li,.leader-list li{display:flex;justify-content:space-between;align-items:center;padding:6px 0;border-bottom:1px solid var(--border)}.mini-table{width:100%;border-collapse:collapse;font-size:.9rem}.mini-table th,.mini-table td{text-align:left;padding:4px 6px;border-bottom:1px solid var(--border)}.summary-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin:4px 0 12px}.summary-head p{margin:0}.totals{list-style:none;margin:0;padding:0;columns:2 220px}.totals li{display:flex;justify-content:space-between;gap:8px;padding:3px 0;break-inside:avoid}.award-people{list-style:none;margin:0;padding:0}.award-people>li{padding:8px 0;border-bottom:1px solid var(--border);break-inside:avoid}.award-person{display:flex;align-items:center;gap:8px;margin-bottom:6px}.award-chips{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}.award-chip{padding:3px 10px;border-radius:999px;background:var(--surface-2);font-size:.9rem}.award-chip.k-book{background:#fde68a;color:#713f12;font-weight:700}.award-chip.k-rot{background:#fecaca;color:#7f1d1d}.award-chip.k-blue{background:#bfdbfe;color:#1e3a8a}.award-chip.k-oneoff{background:#e9d5ff;color:#581c87}.admin-nav{margin-top:8px}.add-btn{width:100%;margin-bottom:12px}.form{display:flex;flex-direction:column;gap:10px}.form-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}.form-grid label{display:flex;flex-direction:column;gap:4px;font-size:.9rem;font-weight:600}.form-grid label.inline{grid-column:1 / -1}label.inline{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:6px;font-weight:400!important}.form-buttons{display:flex;gap:8px;justify-content:flex-end;margin-top:8px}.form-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:6px 0}.form-row .grow{flex:1;min-width:140px}.num{width:70px}.num.wide{width:90px}.color-input{width:110px}.dot.as-button{border:2px solid var(--border);cursor:pointer;padding:0;flex:none}.add-group{border-top:1px solid var(--border);margin-top:8px;padding-top:8px}.color-picker{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}.color-picker .swatch{width:40px;height:40px;border-radius:50%;border:2px solid var(--border);cursor:pointer;font-weight:800;font-size:1rem;display:inline-flex;align-items:center;justify-content:center;padding:0}.color-picker .swatch.on{border-color:var(--text);box-shadow:0 0 0 2px var(--surface) inset}.color-picker .swatch.custom{background:conic-gradient(#dc2626,#facc15,#16a34a,#0ea5e9,#7e22ce,#dc2626);overflow:hidden;position:relative}.color-picker .swatch.custom input{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;width:100%;height:100%;min-height:0;padding:0;border:none;cursor:pointer}.admin-row{border-bottom:1px solid var(--border);padding:6px 0}.admin-row.inactive,.award-editor.inactive{opacity:.55}.admin-row-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.admin-row-head .muted{flex:1}.edit-panel{background:var(--surface-2);border-radius:10px;padding:12px;margin-top:8px}.danger-zone{margin-top:16px;padding-top:10px;border-top:1px dashed var(--border)}.group-row,.quarter-row,.award-editor{border-top:1px solid var(--border);padding-top:6px;margin-top:6px}.quarter-row p{margin:0 0 6px}.meeting-date{min-width:110px;font-weight:600}.rot-items{display:flex;flex-direction:column;gap:6px;align-items:flex-start;margin-bottom:6px}.picker{width:100%;background:var(--surface-2);border-radius:10px;padding:10px}.picker-heading{margin-top:8px}.sub-nav{margin-bottom:8px}.sheet-view{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:10px}.sheet-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:8px}.sheet-controls .grow{flex:1}.sheet-controls select,.sheet-controls input.search{min-height:38px;padding:4px 8px}.sheet-controls input.search{width:150px}.sheet-note{margin:0 0 8px}.sort-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:8px}.sort-bar select{min-height:34px;padding:2px 6px;font-size:.85rem}.sort-chip{display:inline-flex;align-items:center;gap:4px}.sort-chip>button{min-height:34px;border:1.5px solid var(--border);border-radius:999px;background:var(--surface-2);padding:2px 10px;font-size:.85rem;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:4px}.sort-chip>button.x,.sort-chip .x{border:none;background:none;padding:2px 4px;font-weight:400;color:var(--muted);cursor:pointer;min-height:34px}.sheet-table th.sorted-second button{color:var(--muted);text-decoration:underline;text-underline-offset:3px}.sheet-table th .arrow sup{font-size:.7em}.sheet-scroll{overflow:auto;max-height:70vh;border:1px solid var(--border);border-radius:8px;-webkit-overflow-scrolling:touch}.sheet-table{border-collapse:separate;border-spacing:0;font-size:.85rem;white-space:nowrap}.sheet-table th,.sheet-table td{border-right:1px solid var(--border);border-bottom:1px solid var(--border);padding:3px 8px;text-align:left;background:var(--surface)}.sheet-table thead th{position:sticky;top:0;z-index:2;background:var(--surface-2);padding:0;vertical-align:bottom}.sheet-table thead .group-row th{top:0;z-index:3;padding:3px 8px;font-size:.75rem;color:var(--muted);text-align:center;border-bottom:1px solid var(--border)}.sheet-table thead .group-row+tr th{top:25px}.sheet-table thead .group-row th.has-group{background:var(--surface-2)}.sheet-table thead th button{width:100%;min-height:34px;border:none;background:none;font:inherit;font-weight:700;cursor:pointer;padding:4px 8px;text-align:left;white-space:nowrap}.sheet-table th.sorted button{color:var(--accent)}.sheet-table th .arrow{font-size:.7em;margin-left:4px}.sheet-table th.vertical{height:136px;vertical-align:bottom}.sheet-table th.vertical button{writing-mode:vertical-rl;transform:rotate(180deg);height:132px;width:100%;min-height:0;padding:6px 2px;text-align:left;overflow:hidden;text-overflow:ellipsis}.sheet-table th.vertical .arrow{margin:0 0 3px}.sheet-table th.narrow button,.sheet-table td.narrow{text-align:center;padding-left:4px;padding-right:4px}.sheet-table td.narrow{min-width:38px}.sheet-table .sticky-col{position:sticky;left:0;z-index:1;border-right:2px solid var(--border);font-weight:600}.sheet-table thead .sticky-col{z-index:4}.sheet-table tbody tr:nth-child(2n) td{background:var(--bg)}.sheet-table .who{display:inline-flex;align-items:center;gap:6px}.sheet-table .cell-p{background:var(--done-bg)!important;color:var(--done);font-weight:700}.sheet-table .cell-e{background:var(--excused-bg)!important;font-weight:700}.sheet-table .cell-a{color:var(--danger);font-weight:700}.sheet-table .cell-na{color:var(--muted);opacity:.5}.sheet-table .cell-award{background:var(--done-bg)!important;font-weight:600}.toast{position:fixed;left:50%;bottom:calc(16px + env(safe-area-inset-bottom));transform:translate(-50%);z-index:100;background:var(--text);color:var(--bg);padding:10px 16px;border-radius:12px;box-shadow:0 6px 24px #00000040;display:flex;align-items:center;gap:12px;max-width:calc(100% - 24px)}.toast.error{background:var(--danger);color:#fff}.toast .btn{background:transparent;color:inherit;border-color:currentColor}@media print{:root{--bg: #fff;--surface: #fff;--text: #000}.topbar,.filters,.no-print,.toast{display:none!important}.card{border:none;padding:0 0 12px}.content{padding:0}.award-chip{border:1px solid #999}}
