:root{--bg:#f6f5f2;--card:#fff;--text:#1d1d1f;--muted:#6b6b70;--line:#e2e0da;--accent:#6b4fd8;--accent-soft:#ece8fb;--warn:#b4481b}@media (prefers-color-scheme:dark){:root{--bg:#141417;--card:#1d1d22;--text:#ececef;--muted:#9b9ba3;--line:#2f2f37;--accent:#a896ff;--accent-soft:#2a2542;--warn:#ff9a6b}}*{box-sizing:border-box}body{background:var(--bg);color:var(--text);margin:0;font-family:system-ui,-apple-system,Hiragino Sans,Noto Sans JP,sans-serif;line-height:1.6}.wrap{max-width:760px;margin:0 auto;padding:24px 16px 48px}h1{margin:0;font-size:1.3rem}h2{margin:0 0 12px;font-size:1rem}.sub,.hint,footer{color:var(--muted);font-size:.875rem}.sub{margin:4px 0 20px}.hint{margin:-4px 0 12px}a{color:var(--accent)}.card{background:var(--card);border:1px solid var(--line);border-radius:12px;margin-bottom:16px;padding:16px}button{font:inherit;color:var(--text);border:1px solid var(--line);cursor:pointer;background:0 0;border-radius:8px;padding:6px 12px}button:hover{border-color:var(--accent)}.seg{grid-template-columns:repeat(3,1fr);gap:8px;display:grid}.seg label{border:1px solid var(--line);cursor:pointer;font-variant-numeric:tabular-nums;border-radius:8px;justify-content:center;align-items:center;padding:8px 4px;display:flex}.seg input{opacity:0;pointer-events:none;position:absolute}.seg label:has(input:checked){background:var(--accent-soft);border-color:var(--accent);font-weight:600}.seg label:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px}@media (width>=640px){.seg{grid-template-columns:repeat(6,1fr)}}.result{grid-template-columns:1fr;gap:12px;display:grid}@media (width>=640px){.result{grid-template-columns:repeat(3,1fr)}}.stat{flex-direction:column;min-width:0;display:flex}.stat .k{color:var(--muted);font-size:.8rem}.stat .v{font-variant-numeric:tabular-nums;font-size:1.5rem;font-weight:700}.s{color:var(--muted);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;font-size:.8rem}.s.warn{color:var(--warn)}.row-h{justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px;display:flex}.row-h h2{margin:0}.btns{gap:8px;display:flex}.dungeons{margin:0;padding:0;list-style:none}.dungeons li{flex-wrap:wrap;align-items:center;column-gap:8px;display:flex}.dungeons li+li{border-top:1px solid var(--line)}.dungeons label{cursor:pointer;flex:14em;align-items:center;gap:12px;min-width:0;padding:10px 0;display:flex}.dungeons .ctl{flex:100%;align-items:center;gap:8px;padding-bottom:6px;display:flex}.dungeons li.locked>label,.dungeons li.locked .ms{opacity:.45;cursor:not-allowed}.dungeons li.locked label{cursor:not-allowed}.dungeons input{width:18px;height:18px;accent-color:var(--accent);flex:none}.dungeons .name{flex:1;min-width:0}.dungeons small{color:var(--muted);font-size:.75rem;display:block}.dungeons label:has(input:not(:checked)) .name{color:var(--muted);text-decoration:line-through}.seg4{grid-template-columns:repeat(4,1fr)!important}.check{cursor:pointer;align-items:center;gap:8px;margin-top:12px;display:flex}.check input{width:18px;height:18px;accent-color:var(--accent);flex:none}#mul{margin:8px 0 0}.sublabel{margin:-4px 0 8px}.lv-row{flex-wrap:wrap;gap:12px;display:flex}.num{align-items:center;gap:6px;font-weight:600;display:flex}.num input{width:6.5em;font:inherit;font-variant-numeric:tabular-nums;color:var(--text);background:var(--card);border:1px solid var(--line);border-radius:8px;padding:6px 8px;font-size:1.1rem}.num input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}#band{margin:8px 0 0}.tbl-wrap{overflow-x:auto}.weeks{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%}.weeks th,.weeks td{text-align:right;border-top:1px solid var(--line);white-space:nowrap;padding:8px 6px}.weeks th:first-child,.weeks td:first-child{text-align:left}.weeks thead th{color:var(--muted);border-top:0;font-size:.8rem;font-weight:400}.weeks .lv{font-size:1.05rem;font-weight:700}.weeks small{color:var(--muted);font-size:.75rem;font-weight:400;display:block}.seg2{margin-bottom:12px;grid-template-columns:repeat(2,1fr)!important}.lv-row+.lv-row{margin-top:8px}.lv-row{align-items:center}.lv-k{width:4.5em;font-weight:600}.weeks .over,.weeks small.warn,.weeks .lv small.warn{color:var(--warn)}.dungeons .ms{flex-wrap:wrap;gap:4px;display:flex}.dungeons .ms label{font-variant-numeric:tabular-nums;border:1px solid var(--line);border-radius:6px;flex:none;gap:4px;padding:2px 8px;font-size:.75rem}.dungeons .ms input{width:14px;height:14px}.dungeons .ms label:has(input:checked){background:var(--accent-soft);border-color:var(--accent)}.dungeons .ms label:has(input:not(:checked)){color:var(--muted)}.dungeons li:has(>label input:not(:checked)) .ms{opacity:.5}.slot-sel{width:100%;font:inherit;color:var(--text);background:var(--card);border:1px solid var(--line);border-radius:8px;padding:8px}.slot-btns{flex-wrap:wrap;margin-top:8px}button:disabled{opacity:.4;cursor:not-allowed}button:disabled:hover{border-color:var(--line)}.errors{color:var(--warn);margin:12px 0 0;padding-left:1.2em;font-size:.875rem}.dungeons .ms .use{color:var(--muted);margin-left:3px;font-size:.7rem;text-decoration:none;display:inline-block}.dungeons .d-use{color:var(--muted);font-variant-numeric:tabular-nums;margin-left:8px;font-size:.8rem;text-decoration:none;display:inline-block}.seg3{grid-template-columns:repeat(3,1fr)!important}#week-lv{margin:8px 0}#week-copy{margin-bottom:12px}.weeks button.link{color:var(--accent);text-align:left;background:0 0;border:0;padding:0;text-decoration:underline}.weeks tr.cur td:first-child{font-weight:700}.weeks tfoot td{border-top:2px solid var(--line);font-weight:700}.weeks td.warn,.weeks td.warn small{color:var(--warn)}
