:root{--ink:#292929;--muted:#707070;--accent:#333333;--surface-selected:#ededed;--paper:#f5f5f5;--border:#dedede;--gold:#9b9b9b;--red:#a35d50;--red-bg:#f0f0f0;--font:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP","Hiragino Kaku Gothic ProN",Meiryo,sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--font);font-size:13px;-webkit-font-smoothing:antialiased;font-variant-numeric:tabular-nums}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}button,a,input,select,textarea{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid #838383;outline-offset:2px}a{color:inherit;text-decoration:none}button{border:1px solid var(--border);background:#fff;border-radius:5px;padding:6px 10px;white-space:nowrap}button:hover{background:#f0f0f0}input,select,textarea{min-width:0;border:1px solid var(--border);border-radius:4px;background:#fff;padding:6px 8px}select{cursor:pointer}input[type=checkbox]{accent-color:var(--accent);width:16px;height:16px;cursor:pointer}input[type=number]{font-variant-numeric:tabular-nums}h1,h2,h3,p{margin:0}h2{font-size:18px;font-weight:650;letter-spacing:.02em}h3{font-size:13px;font-weight:650}.subtle{color:var(--muted);font-size:11px}.push-right{margin-left:auto}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.rail{width:62px;position:fixed;inset:0 auto 0 0;background:#ededed;display:flex;align-items:center;flex-direction:column;gap:17px;padding:20px 0;color:#555555;z-index:10}.brand-mark{font-family:Georgia,serif;font-size:27px;font-weight:bold;color:#333333;letter-spacing:-2px;padding-bottom:16px}.brand-mark span{font-size:20px;color:#777777;padding-left:2px}.rail a:not(.brand-mark){width:36px;height:36px;display:grid;place-items:center;border-radius:7px}.rail a:not(.brand-mark):hover{background:#00000008}.rail svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.rail-help{margin-top:auto;background:transparent;color:#555555;border-color:#b0b0b0;width:28px;height:28px;padding:0;border-radius:50%}.rail-caption{font-size:9px;letter-spacing:2px;line-height:1.8;text-align:center;color:#777777}.workspace{margin-left:62px}.topbar{padding:18px 24px 15px;background:#fff;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;gap:16px}.eyebrow{font-size:10px;font-weight:650;letter-spacing:1.5px;color:var(--accent);margin-bottom:5px}.eyebrow span{color:#989898;font-weight:400;letter-spacing:1px}h1{font-size:18px;letter-spacing:.06em;font-weight:600}.header-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.header-tools select{font-size:11px;height:29px}.save-status{font-size:10px;color:#7a7a7a;margin-right:5px;white-space:nowrap}.save-status:before{content:"";display:inline-block;width:5px;height:5px;background:#949494;border-radius:50%;margin-right:5px;vertical-align:2px}.save-status.error{color:var(--red)}.save-status.error:before{background:var(--red)}.help-button{width:26px;height:26px;padding:0;border-radius:50%;font-size:12px}.button{font-size:12px;font-weight:500;min-height:31px;padding:6px 12px}.button.primary{background:var(--accent);color:#fff;border-color:var(--accent)}.button.primary:hover{background:#595959}.button.quiet{font-size:11px;min-height:28px;padding:5px 8px;background:transparent}.button.small{font-size:11px;min-height:27px;padding:4px 9px}.text-button{border:0;background:none;padding:3px 5px;font-size:11px;color:#6b6b6b}.text-button:hover{background:var(--surface-selected)}main{padding:16px 24px 12px;max-width:1740px;margin:auto}.notice{display:flex;align-items:center;gap:12px;border:1px solid #dcdcdc;background:#f7f7f7;padding:8px 11px;font-size:11px;margin-bottom:14px;border-radius:5px;line-height:1.5}.notice strong{color:#737373;white-space:nowrap}.notice button{margin-left:auto;font-size:11px;padding:4px 9px;min-height:27px}.notice.warning{color:#4f4f4f;background:#f3f3f3;border-color:#c3c3c3}.notice.warning strong{color:#4f4f4f}.notice.real{background:#f1f1f1;border-color:#dddddd;color:#616161}.page-title{display:flex;justify-content:space-between;align-items:center;margin:0 0 13px;gap:10px}.page-title>div:first-child{display:flex;align-items:baseline;gap:12px}.actions{display:flex;gap:7px}.metrics{display:flex;background:#fff;border:1px solid var(--border);border-radius:5px;margin-bottom:15px;padding:10px 0}.metric{flex:1;padding:0 18px;border-right:1px solid var(--border);min-width:0}.metric:last-child{border:0}.metric-label{font-size:10px;color:var(--muted);margin-bottom:4px}.metric-value{font-size:20px;font-weight:550;line-height:1.2;letter-spacing:-.5px}.metric-value small{font-size:11px;font-weight:400;color:var(--muted);letter-spacing:0}.metric-sub{font-size:10px;color:var(--muted);margin-left:7px}.week-section{margin-bottom:16px}.section-line{display:flex;align-items:center;gap:15px;margin-bottom:8px}.week-legend{font-size:10px;color:var(--muted);display:flex;align-items:center;gap:5px}.week-legend i{width:12px;height:4px;border-radius:1px}.planned-key{background:#d3d3d3}.actual-key{background:var(--accent);margin-left:8px}.week-navigation{margin-left:auto;display:flex;align-items:center;gap:7px;font-size:11px}.week-navigation button{padding:3px 8px;font-size:14px;min-width:26px;min-height:26px}.week-navigation .today-button{font-size:11px}.week-navigation input{font-size:11px;padding:3px 5px;max-width:130px}.week-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border:1px solid var(--border);border-radius:5px;overflow:hidden;background:#fff}.day-cell{border:0;border-right:1px solid var(--border);border-radius:0;text-align:left;padding:9px 11px 8px;min-height:89px;background:#fff}.day-cell:last-child{border-right:0}.day-cell.is-selected{background:#f1f1f1;box-shadow:inset 0 3px 0 var(--accent)}.day-label{display:flex;align-items:baseline;gap:5px;font-size:11px;color:var(--muted);margin-bottom:6px}.day-label strong{font-size:15px;color:var(--ink);font-weight:550}.today-dot{color:var(--accent);font-size:8px;letter-spacing:0}.day-total{display:flex;align-items:baseline;justify-content:space-between;gap:6px;margin-bottom:6px}.day-total strong{font-size:14px;font-weight:500}.day-total span{font-size:10px;color:var(--muted)}.bar-track{height:4px;background:#f3f3f3;position:relative;margin-top:3px;border-radius:1px;overflow:hidden}.bar-track .planned{background:#cacaca;height:100%;display:block}.bar-track .actual{background:var(--accent);height:100%;display:block}.weekend .day-label{color:#8d8d8d}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.13fr) minmax(0,1fr);gap:15px;align-items:stretch}.panel{background:#fff;border:1px solid var(--border);border-radius:5px;min-width:0;overflow:hidden}.panel-heading{display:flex;justify-content:space-between;align-items:center;min-height:42px;padding:9px 12px;border-bottom:1px solid var(--border);gap:8px}.panel-heading>div{display:flex;align-items:center;gap:8px;min-width:0}.section-no{color:#a0a0a0;font-size:10px;letter-spacing:1px}.count{font-size:10px;color:#909090;background:#f1f1f1;padding:2px 5px;border-radius:3px}.panel-heading select{font-size:11px;padding:4px 5px;max-width:125px}.segmented{display:inline-flex;border:1px solid var(--border);border-radius:4px;overflow:hidden;gap:0!important}.segmented button{font-size:11px;padding:4px 12px;border:0;border-radius:0}.segmented button.active{background:var(--accent);color:#fff}.table-toolbar{display:flex;gap:8px;align-items:center;padding:7px 11px;background:#fdfdfd;border-bottom:1px solid var(--border);min-height:37px}.table-toolbar select{font-size:11px;padding:3px 5px;max-width:142px}.check-label{font-size:11px;display:flex;align-items:center;gap:4px;white-space:nowrap}.check-label input{margin:0;width:14px;height:14px}.table-scroll{overflow:auto;scrollbar-width:thin;scrollbar-color:#d3d3d3 transparent;overscroll-behavior:contain}table{width:100%;border-collapse:collapse;table-layout:fixed;text-align:left;font-size:12px}th{font-weight:500;font-size:10px;color:#7d7d7d;background:#f7f7f7;position:sticky;top:0;z-index:1;height:29px;border-bottom:1px solid var(--border);white-space:nowrap}td{height:37px;border-bottom:1px solid #efefef;color:#424242}th,td{padding:5px 7px}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fbfbfb}tbody tr.selected{background:#f2f2f2;box-shadow:inset 2px 0 0 #797979}tbody tr.is-completed .task-name{color:#959595;text-decoration:line-through}tbody tr.is-completed{background:#fbfbfb}.task-scroll{height:326px}.task-table{min-width:560px}.task-table .check-col{width:34px;font-size:9px}.task-table .schedule-col{width:86px}.task-table .category-col{width:48px}.task-table .minutes-col{width:51px;text-align:right}.task-table .result-col{width:40px;text-align:center}.task-table .menu-col{width:30px}.task-table th small{font-size:8px;margin-left:3px;color:#a1a1a1}.task-table td{padding:4px 5px}.task-date{display:block;width:100%;font-size:10px;padding:1px 0;border-color:transparent;background:transparent;height:21px}.task-time{display:block;width:100%;font-size:10px;padding:1px 0;border-color:transparent;background:transparent;color:#868686;height:19px}.task-date:hover,.task-time:hover{border-color:var(--border)}.task-name{width:100%;border-color:transparent;background:transparent;font-size:12px;padding:1px 2px;height:23px;border-radius:3px}.task-name:focus,.task-name:hover{border-color:var(--border);background:#fff}.task-linked{font-size:9px;color:#939393;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 2px;max-width:100%}.time-input{width:100%;padding:3px 2px;text-align:right;background:transparent;border-color:transparent;border-radius:3px;-moz-appearance:textfield}.time-input::-webkit-inner-spin-button{appearance:none}.time-input:hover,.time-input:focus{border-color:var(--border);background:#fff}.category-tag{font-size:9px;padding:3px 4px;background:#f0f0f0;color:#757575;display:inline-block;border-radius:3px;white-space:nowrap}.cat-work{background:#efefef;color:#7d7d7d}.cat-english{background:#ececec;color:#777777}.cat-gym{background:#eeeeee;color:#898989}.cat-other{background:#eee;color:#858585}.row-menu{padding:3px 7px;border:0;background:none;font-size:17px;line-height:1}.rating{display:inline-grid;place-items:center;width:24px;height:23px;font-size:15px;border-radius:4px;border:1px solid transparent}.rating.r4{background:#e3efdf;color:#496d3f}.rating.r3{background:#edf3e8;color:#678359}.rating.r2{background:#faf1da;color:#a68a43}.rating.r1{background:#f8e7e0;color:#a35d50}.rating.r0{background:#f2f2f2;color:#adadad;font-size:12px}.rating-button{padding:0;background:none}.empty-row td{text-align:center;height:132px;font-size:12px;color:#959595;line-height:1.8;white-space:normal}.empty-row button{display:block;margin:10px auto 0}.inline-recorder{padding:8px 11px;border-top:1px solid var(--border);min-height:48px;background:#fcfcfc;display:flex;align-items:center;gap:8px;font-size:10px}.recorder-label{min-width:0;flex:1;line-height:1.5;overflow:hidden}.recorder-label strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;font-weight:500}.recorder-help{color:#9d9d9d;font-size:9px}.record-time{display:flex;align-items:center;gap:3px;color:#8c8c8c;white-space:nowrap}.record-time input{width:45px;font-size:11px;padding:3px 4px;height:26px;text-align:right}.rating-controls{display:flex;gap:3px;white-space:nowrap}.rating-controls button{padding:0;width:26px;height:26px;font-size:16px;border-color:var(--border);border-radius:3px;background:#fff}.rating-controls button:hover{background:var(--surface-selected);border-color:#b5b5b5}.recorder-idle{color:#949494;font-size:10px;line-height:1.5}.key-cap{font-size:9px;border:1px solid #dedede;border-radius:3px;padding:1px 3px;background:#fff}
.material-summary-wrap{max-height:147px;overflow:auto;scrollbar-width:thin}.material-table{font-size:11px}.material-table th:nth-child(2){width:104px}.material-table th:nth-child(3),.material-table th:nth-child(4){width:35px;text-align:right}.material-table td{height:28px;padding:4px 9px}.material-table td:nth-child(n+3){text-align:right}.material-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.material-table tr{cursor:pointer}.material-table tr.active{background:#f2f2f2;box-shadow:inset 2px 0 0 #7c7c7c}.material-subject{font-size:9px;color:#929292;margin-right:6px}.progress-cell{display:flex;align-items:center;gap:6px;font-size:10px;color:#8b8b8b}.mini-progress{height:4px;background:#f0f0f0;flex:1;border-radius:2px;min-width:28px;overflow:hidden}.mini-progress span{display:block;height:100%;background:#9c9c9c}.material-toolbar{gap:5px;padding:6px 9px}.material-toolbar select:first-child{flex:1;max-width:unset;min-width:60px;width:110px}.material-toolbar select:not(:first-child){max-width:92px;padding:3px 2px;font-size:10px}.search-line{display:flex;align-items:center;gap:7px;padding:5px 9px;border-bottom:1px solid var(--border)}.search-line input{font-size:10px;padding:4px 6px;border:0;background:#f6f6f6;flex:1;width:150px}.search-line span{white-space:nowrap}.item-table{min-width:400px}.item-table .importance-col{width:54px}.item-table .result-col{width:37px;text-align:center}.item-table .attempts-col{width:34px;text-align:right}.item-table .last-date-col{width:48px;text-align:center}.item-table .item-actions-col{width:52px;text-align:center}.item-table td{height:38px;padding:4px 5px;cursor:pointer}.importance-select{font-size:10px;border:1px solid transparent;background:transparent;color:#958754;padding:3px 1px;width:40px}.importance-select:hover,.importance-select:focus{border-color:var(--border)}.item-topic{font-size:11px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.item-sub{font-size:9px;color:#979797;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}.mini-action{padding:0;border:0;background:transparent;width:21px;height:23px;font-size:14px;color:#888888;border-radius:3px}.mini-action:hover{background:#ececec}.last-date{font-size:10px;color:#888888}.history-panel{margin-top:15px}.history-panel .panel-heading{min-height:40px;padding:7px 12px}.history-scroll{max-height:157px}.history-table{min-width:670px}.history-table th:first-child{width:102px}.history-table th:nth-child(2){width:90px}.history-table th:nth-child(4){width:63px}.history-table th:nth-child(5){width:90px}.history-table th:nth-child(6){width:28%}.history-table td{height:31px;font-size:11px;padding:4px 10px}.history-table .rating{width:21px;height:20px;font-size:14px}.history-date{color:#888888;font-size:10px}.history-item,.history-note{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.history-item span{font-size:10px;color:#8c8c8c}.page-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 0 0;color:#9c9c9c;font-size:9px}.page-footer .text-button{font-size:9px}
dialog{border:1px solid #dcdcdc;border-radius:9px;padding:0;width:min(540px,calc(100vw - 24px));max-height:90vh;color:var(--ink);box-shadow:0 22px 80px #2f2f2f2b}dialog::backdrop{background:#2b2b2b57;backdrop-filter:blur(2px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;padding:17px 20px;border-bottom:1px solid var(--border)}.dialog-heading h2{font-size:16px}.dialog-close{border:0;padding:0;background:none;font-size:24px;line-height:1}.dialog-body{padding:17px 20px;max-height:65vh;overflow:auto}.dialog-body>p{font-size:12px;line-height:1.8;color:#7a7a7a;margin-bottom:14px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.form-field{display:flex;flex-direction:column;gap:5px;font-size:11px;color:#737373}.form-field.full{grid-column:1/-1}.form-field input,.form-field select,.form-field textarea{width:100%;min-height:35px;color:var(--ink);font-size:12px}.form-field textarea{min-height:70px;resize:vertical}.form-hint{font-size:10px;color:#9b9b9b;line-height:1.5}.form-rating{display:flex;gap:8px}.form-rating label{cursor:pointer;display:flex;align-items:center;justify-content:center;gap:5px;padding:7px 10px;flex:1;border:1px solid var(--border);border-radius:5px}.form-rating input{width:14px;min-height:unset;margin:0;accent-color:var(--accent)}.form-rating span{font-size:22px}.dialog-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:12px 20px;border-top:1px solid var(--border);background:#fafafa}.dialog-actions .danger{margin-right:auto;color:#737373;font-size:11px}.form-error{font-size:11px;color:#686868;line-height:1.5;padding:0 20px 10px}.help-content h3{margin:17px 0 7px;font-size:12px}.help-content h3:first-child{margin-top:0}.help-content p,.help-content li{font-size:12px;line-height:1.9;color:#6c6c6c}.help-content ul,.help-content ol{margin:5px 0;padding-left:21px}.help-content table{font-size:11px;table-layout:auto;margin:8px 0}.help-content th{position:static}.help-content td{height:30px}.help-note{padding:10px;background:#f5f5f5;border-radius:4px;margin-top:10px!important}#toast{position:fixed;bottom:22px;left:50%;transform:translate(-50%,15px);background:#424242;color:#fff;border-radius:6px;padding:11px 18px;font-size:12px;z-index:100;opacity:0;pointer-events:none;transition:opacity .15s,transform .15s;max-width:calc(100vw - 24px);box-shadow:0 7px 24px #2f2f2f27}#toast.show{opacity:1;transform:translate(-50%,0)}#toast.error{background:#5c5c5c}
@media(min-width:1450px){.task-scroll{height:355px}.task-table .schedule-col{width:98px}.task-table .category-col{width:56px}.task-table .minutes-col{width:57px}.material-summary-wrap{max-height:147px}.task-table{font-size:13px}.task-name{font-size:13px}.item-topic{font-size:12px}}
@media(max-width:1180px) and (min-width:801px){.rail{width:48px}.workspace{margin-left:48px}.topbar{padding:14px 16px}.topbar h1{font-size:16px}.header-tools{gap:5px}.save-status{font-size:9px;margin:0}.header-tools .quiet{font-size:10px;padding:5px 6px}main{padding:14px 14px 10px}.dashboard-grid{gap:10px;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}.metric{padding:0 13px}.metric-value{font-size:19px}.page-footer{font-size:8px}.task-scope-label{display:none}.table-toolbar{gap:5px}.panel-heading{padding:8px 9px}.panel-heading h3{font-size:12px}.section-no{display:none}.day-cell{padding:8px}.inline-recorder{padding:7px 7px;gap:5px}.recorder-help{font-size:8px}.rating-controls{gap:2px}.rating-controls button{width:24px}.record-time input{width:39px}.material-table th:nth-child(2){width:83px}.material-table th:nth-child(3),.material-table th:nth-child(4){width:29px}.material-subject{display:none}.material-toolbar select:not(:first-child){max-width:82px}}
@media(pointer:coarse){button{min-height:34px}input,select{min-height:30px}.rating-controls button{width:32px;height:34px}.rating-button{width:30px;height:30px}.mini-action{width:25px;height:32px}.row-menu{min-width:28px;min-height:34px}.task-date,.task-time{min-height:24px;height:24px}.task-name{min-height:28px;height:28px}.task-table td{height:53px}.item-table td{height:45px}.importance-select{min-height:32px}.inline-recorder{min-height:57px}.task-scroll{height:348px}.task-table .check-col{width:37px}.task-table .result-col{width:41px}.item-table .result-col{width:40px}.history-table td{height:38px}}
@media(max-width:800px){.rail{display:none}.workspace{margin-left:0}.topbar{padding:13px 14px;align-items:flex-start}.eyebrow{font-size:9px}.eyebrow span{display:none}.topbar h1{font-size:16px;white-space:nowrap}.header-tools{gap:5px;max-width:58%}.save-status{font-size:9px;order:5;width:100%;text-align:right}.header-tools select{font-size:10px}.header-tools .quiet{font-size:10px;padding:4px 6px}.help-button{display:none}main{padding:12px}.notice{gap:7px;font-size:10px;flex-wrap:wrap}.notice strong{font-size:10px}.notice button{margin-left:0}.page-title{margin-bottom:10px}.page-title h2{font-size:16px}.page-title .subtle{display:none}.actions .button{font-size:10px;padding:5px 8px}.metrics{padding:9px 0;display:grid;grid-template-columns:repeat(3,1fr);row-gap:12px}.metric{padding:0 10px}.metric:nth-child(3){border:0}.metric:nth-child(4),.metric:nth-child(5){padding-top:7px;border-top:1px solid var(--border)}.metric-value{font-size:18px}.metric-sub{display:none}.metric-label{font-size:9px}.section-line{gap:7px;flex-wrap:wrap}.week-navigation{gap:4px;font-size:10px}.week-navigation input{display:none}.week-legend{display:none}.week-grid{overflow-x:auto;grid-template-columns:repeat(7,minmax(67px,1fr))}.day-cell{padding:7px 5px;min-height:80px}.day-label{font-size:9px;gap:3px}.day-label strong{font-size:13px}.day-total{display:block}.day-total strong{font-size:12px}.day-total span{font-size:9px;display:block}.dashboard-grid{grid-template-columns:1fr;gap:12px}.task-scroll{height:auto;max-height:390px}.task-table{min-width:unset}.task-table .schedule-col{display:none}.task-table td:nth-child(2){display:none}.task-table .category-col{width:42px}.task-table .minutes-col{width:43px}.task-table .result-col{width:34px}.task-table .menu-col{width:26px}.task-name{font-size:11px}.task-linked{font-size:8px}.task-table th{font-size:9px}.task-table td{height:49px}.task-table .check-col{width:32px}.time-input{padding:3px 1px}.table-toolbar{gap:7px}.material-summary-wrap{max-height:174px}.item-table{min-width:unset}.item-table .last-date-col,.item-table td:nth-child(5){display:none}.item-table .importance-col{width:48px}.item-table .item-actions-col{width:56px}.item-topic{font-size:11px}.item-sub{font-size:8px}.inline-recorder{padding:8px 10px;min-height:56px}.rating-controls button{width:31px;height:33px}.history-panel{margin-top:12px}.history-context{max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-scroll{max-height:215px}.history-table{min-width:550px}.history-table th:nth-child(2){width:74px}.history-table th:first-child{width:91px}.page-footer{flex-wrap:wrap;justify-content:flex-start;font-size:8px}.page-footer>span:nth-child(2){display:none}.page-footer .text-button{margin-left:auto}.form-grid{gap:11px}.dialog-body{padding:15px}.dialog-heading{padding:14px 15px}.dialog-actions{padding:12px 15px}.form-rating{gap:4px}.form-rating label{padding:7px 5px}.material-table th:nth-child(2){width:98px}.material-table th:nth-child(3),.material-table th:nth-child(4){width:31px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
@media(min-width:801px) and (max-width:1180px){.task-table{min-width:0}.task-table .schedule-col{width:76px}.task-table .category-col{width:42px}.task-table .minutes-col{width:43px}.task-table .result-col{width:36px}.task-table .menu-col{width:26px}.task-table .check-col{width:31px}}
@media(min-width:801px) and (max-height:840px){.topbar{padding-top:10px;padding-bottom:10px}main{padding-top:10px}.notice{padding:6px 10px;margin-bottom:10px}.page-title{margin-bottom:9px}.metrics{padding:8px 0;margin-bottom:10px}.metric-value{font-size:18px}.metric-label{margin-bottom:3px}.week-section{margin-bottom:10px}.section-line{margin-bottom:6px}.day-cell{min-height:73px;padding-top:6px;padding-bottom:6px}.day-label{margin-bottom:4px}.day-total{margin-bottom:3px}.panel-heading{min-height:36px;padding-top:6px;padding-bottom:6px}.material-summary-wrap{max-height:105px}.task-scroll{height:274px}.table-toolbar{min-height:32px;padding-top:4px;padding-bottom:4px}.search-line{padding-top:3px;padding-bottom:3px}.inline-recorder{min-height:49px;padding-top:5px;padding-bottom:5px}.history-panel{margin-top:10px}.history-scroll{max-height:114px}.page-footer{padding-top:8px}}
/* Subject colors occupy existing label slots; no subject-colored row backgrounds. */
:root{color-scheme:light dark}
.subject-chip{display:inline-block;color:var(--subject-color);background:var(--subject-bg);border-left:2px solid var(--subject-color);border-radius:2px;padding:1px 4px;font-size:9px;line-height:1.3;white-space:nowrap;vertical-align:baseline}
.task-linked .subject-chip{font-size:8px;padding:0 3px}
.item-sub .subject-chip{font-size:8px;padding:0 3px}
.material-area{display:inline-block;width:86px;max-width:86px;min-height:unset;height:20px;padding:1px 1px 1px 4px;margin-right:5px;border:0;border-left:2px solid var(--subject-color);border-radius:2px;color:var(--subject-color);background:var(--subject-bg);font-size:9px;vertical-align:middle}
.category-tag,.cat-work,.cat-english,.cat-gym,.cat-other{color:#616161;background:#f0f0f0}
.bar-track{display:flex}
.time-segment{display:block;flex:none;height:100%;background:var(--subject-color)}
.time-segment.is-planned{opacity:.4}
.week-task-tags{display:flex;gap:3px;overflow-x:auto;scrollbar-width:none;height:14px;margin-top:3px;text-align:left}
.week-task-tags::-webkit-scrollbar{display:none}
.calendar-task{flex:none;display:inline-block;padding:0 3px;border-left:2px solid var(--subject-color);border-radius:2px;font-size:8px;line-height:14px;color:var(--subject-color);background:var(--subject-bg);white-space:nowrap}
.day-label{margin-bottom:4px}.day-total{margin-bottom:4px}
.planned-key{background:#959595;opacity:.4}.actual-key{background:#959595}
.subject-totals{display:flex;align-items:center;gap:10px;padding-top:7px;overflow-x:auto;scrollbar-width:thin;font-size:10px;white-space:nowrap}
.subject-totals-label{color:var(--muted);flex:none;font-size:10px}
.subject-totals-label small{display:block;font-size:8px;margin-top:2px}
.subject-time{display:inline-flex;align-items:center;gap:4px;flex:none;font-size:10px}
.subject-time small{color:var(--muted);font-size:9px}
.subject-totals .subject-chip{background:transparent;padding:0 3px;font-size:9px}
@media(pointer:coarse){.material-area{height:28px;min-height:28px}}
@media(prefers-color-scheme:dark){
 :root{--ink:#e3e3e3;--muted:#b0b0b0;--accent:#dedede;--surface-selected:#383838;--paper:#151515;--border:#424242;--gold:#bbbbbb;--red:#e2a293;--red-bg:#2c2c2c}
 .brand-mark{color:#f0f0f0}.brand-mark span{color:#b0b0b0}
 .rail{background:#181818;color:#cccccc}.rail-caption{color:#a7a7a7}.rail-help{color:#d4d4d4}
 .rail a:not(.brand-mark):hover{background:#ffffff0c}
 .save-status{color:#bfbfbf}
 .topbar,.panel,.metrics,.week-grid,.day-cell,button,input,select,textarea,.rating-controls button{background:#292929;color:var(--ink)}
 .button.primary,.segmented button.active{background:#545454;border-color:#6d6d6d;color:#f4f4f4}.button.primary:hover{background:#646464}
 button:hover{background:#3a3a3a}.day-cell.is-selected{background:#393939;box-shadow:inset 0 3px 0 #b5b5b5}
 .table-toolbar,.inline-recorder,.dialog-actions{background:#2c2c2c}
 th{background:#343434;color:#bdbdbd}td{color:#dddddd;border-color:#3e3e3e}
 tbody tr:hover{background:#333333}tbody tr.selected,.material-table tr.active{background:#3b3b3b}
 tbody tr.is-completed{background:#282828}tbody tr.is-completed .task-name{color:#9d9d9d}
 .task-name,.time-input,.task-date,.task-time,.mini-action,.importance-select{background:transparent}
 .task-name:hover,.task-name:focus,.time-input:hover,.time-input:focus{background:#363636}
 .task-linked,.task-time,.item-sub,.history-date,.history-item span,.last-date,.material-subject{color:#b5b5b5}
 .text-button,.mini-action{color:#b7b7b7}.text-button:hover,.mini-action:hover{background:#3f3f3f}
 .category-tag,.cat-work,.cat-english,.cat-gym,.cat-other{color:#c6c6c6;background:#373737}
 .material-area{color:var(--subject-color);background:var(--subject-bg)}
 .importance-select{color:#c9bb80}.rating.r4{color:#b3d49e;background:#2e442c}.rating.r3{color:#b1cca3;background:#30412c}.rating.r2{color:#e3c878;background:#473d24}.rating.r1{color:#e7afa0;background:#493028}.rating.r0{color:#b7b7b7;background:#393939}
 .bar-track,.mini-progress{background:#3e3e3e}.mini-progress span{background:#a1a1a1}
 .count,.search-line input,.help-note{background:#343434;color:#bdbdbd}
 .notice{background:#323232;border-color:#555555;color:#d0d0d0}.notice strong{color:#c8c8c8}.notice.warning{background:#2d2d2d;border-color:#5c5c5c;color:#c9c9c9}.notice.warning strong{color:#c9c9c9}.notice.real{background:#363636;border-color:#525252;color:#c4c4c4}
 .help-content p,.help-content li,.dialog-body>p,.form-field{color:#bdbdbd}.form-hint,.recorder-help,.recorder-idle,.empty-row td{color:#aeaeae}
 .key-cap{background:#383838;border-color:#646464}.form-error{color:#bfbfbf}
 .help-content td{color:#dddddd}.form-field input,.form-field select,.form-field textarea{color:var(--ink)}
 dialog{color:var(--ink);background:#292929;border-color:#5b5b5b}dialog::backdrop{background:#131313b0}
 .rating-controls button:hover{background:#4b4b4b;border-color:#9f9f9f}
 .subject-totals .subject-chip{color:var(--subject-color)}
}
.history-note-content{display:flex;align-items:center;gap:6px}
.history-note-content>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.history-chevron{flex:none;color:var(--muted);font-size:19px;line-height:1;opacity:.7}
.history-record{cursor:pointer;touch-action:pan-x pan-y pinch-zoom}
.history-record:focus-visible{outline:2px solid var(--muted);outline-offset:-2px}
.history-record.selected,.history-record:active{background:color-mix(in srgb,var(--ink) 7%,var(--paper))}
@media(hover:hover){.history-record:hover{background:color-mix(in srgb,var(--ink) 5%,var(--paper))}}
@media(pointer:coarse){.history-record td{height:44px}}
.correction-context{margin:0 0 16px;font-size:12px;line-height:1.6}
.correction-context>div{display:grid;grid-template-columns:65px minmax(0,1fr);gap:8px;padding:3px 0}
.correction-context dt{color:var(--muted)}
.correction-context dd{margin:0;overflow-wrap:anywhere}
.correction-backup{margin-top:16px;padding:12px;border:1px solid var(--border);border-radius:8px}
.import-target{margin:0 0 12px;padding:10px 12px;border:2px solid;border-radius:8px;font-weight:700;font-size:15px}.import-target-real{border-color:var(--red);color:var(--red)}.import-target-demo{border-style:dashed;border-color:var(--muted);color:var(--muted)}.index-totals{margin:8px 0;padding-left:18px}.index-table-wrap{max-height:240px;overflow:auto;margin:8px 0;border:1px solid var(--border);border-radius:6px}.index-table{width:100%;border-collapse:collapse;font-size:12px}.index-table th,.index-table td{padding:4px 6px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top}.index-status{font-weight:700;white-space:nowrap}.index-status-pending,.index-status-conflict{color:var(--red)}.index-held-title{font-size:13px;margin:12px 0 4px}.index-held{margin:4px 0;padding-left:18px;font-size:12px;max-height:200px;overflow:auto}.index-nothing{margin-top:12px}
.correction-backup p{font-size:12px;line-height:1.6}
.correction-backup .check-label{white-space:normal;align-items:flex-start;line-height:1.6}
.record-change-history{margin-top:16px;font-size:12px}
.record-change-history summary{cursor:pointer;min-height:32px;padding:6px 0}
.record-change-history ol{padding-left:20px}
.record-change-history li{padding:8px 0;border-bottom:1px solid var(--border)}
.record-change-history p{margin:4px 0;white-space:pre-wrap;overflow-wrap:anywhere}

/* Cancellation navigation stays compact and wraps on narrow screens. */
.history-panel .panel-heading,.history-panel .panel-heading>div,.dialog-actions{flex-wrap:wrap}
@media(pointer:coarse){#toggle-cancelled-history,[data-action="request-cancel"],[data-action="request-restore"],[data-action="back-to-correction"]{min-height:44px}}

/* The existing list is a full-width work area; keep columns readable on iPad. */
.dashboard-grid{grid-template-columns:minmax(0,1fr)}
.inline-study-date{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:9px 11px;border-bottom:1px solid var(--border);font-size:12px}
.inline-study-date label{display:flex;align-items:center;gap:6px}
.inline-study-date small{color:var(--muted);margin-left:auto;font-size:10px}
#inline-day-status{font-size:11px}
#inline-study-day.past-day{background:#fff0ce;border-color:#a56d15;color:#704600}
#inline-study-day.future-day{background:#ffe7e0;border-color:#b64c37;color:#813523}
.inline-study-table{min-width:1050px}
.inline-study-table .importance-col{width:58px}
/* The memo has a fixed width; spare table width goes to the problem name (never below 220px). */
.inline-study-table .inline-problem-col{min-width:220px}
.inline-study-table .inline-memo-col{width:230px}
.inline-study-table .trend-col{width:196px}
.inline-study-table .inline-rating-col{width:146px}
.inline-study-table .inline-time-col{width:84px}
.inline-study-table .inline-save-col{width:70px}
.inline-study-table .inline-task-col{width:42px}
.inline-study-table th small{font-size:9px;color:var(--muted)}
.inline-study-table td{height:42px;cursor:default}
.inline-study-table td:nth-child(5){display:table-cell}
.inline-study-table input,.inline-study-table select[data-inline-field]{width:100%;min-width:0;height:32px;font-size:12px}
.inline-study-table .item-history-toggle{display:flex;align-items:center;gap:4px;width:100%;min-width:0;text-align:left;border:0;background:transparent;padding:3px 0;min-height:28px;white-space:nowrap;overflow:hidden;cursor:pointer}
/* One-line problem cell: tags stay compact, the name ellipsizes; full details live in the expansion. */
.item-row-tags{display:inline-flex;align-items:center;gap:3px;flex:none}
.item-material-tag{display:inline-block;max-width:5.5em;overflow:hidden;text-overflow:ellipsis;font-size:9px;line-height:1.4;color:var(--muted);border:1px solid var(--border);border-radius:2px;padding:0 3px}
.item-title-text{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;text-decoration:underline;text-decoration-color:var(--border);text-underline-offset:3px}
.current-material{font-size:12px;font-weight:600;max-width:14em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.item-detail{display:flex;flex-wrap:wrap;gap:2px 18px;margin:0;padding:8px 0 0;font-size:11px}
.item-detail div{display:flex;gap:6px;min-width:0}
.item-detail dt{color:var(--muted)}
.item-detail dd{margin:0;overflow-wrap:anywhere}
.inline-rating{display:flex;gap:2px}
.rating-pick{position:relative;flex:1 1 0;min-width:0;height:32px;padding:0;font-size:15px;line-height:1;border:1px solid var(--border);border-radius:4px;background:var(--paper);color:var(--muted);cursor:pointer}
.rating-pick:hover{border-color:#b5b5b5}
.rating-pick[aria-pressed="true"]{border:2px solid currentColor;box-shadow:inset 0 0 0 1px currentColor;font-weight:700}
.rating-pick.r4[aria-pressed="true"]{background:#e3efdf;color:#496d3f}
.rating-pick.r3[aria-pressed="true"]{background:#edf3e8;color:#4f6b43}
.rating-pick.r2[aria-pressed="true"]{background:#faf1da;color:#6f5a1a}
.rating-pick.r1[aria-pressed="true"]{background:#f8e7e0;color:#8a4a3e}
.inline-study-table .rating-pick:focus-visible{z-index:1;outline:2px solid var(--accent);outline-offset:1px}
.inline-save{width:100%;padding:5px;font-size:12px}
.inline-save:disabled{opacity:.4;cursor:default}
.trend-cell{white-space:nowrap}
.older-attempts{display:inline-block;width:32px;font-size:10px;color:var(--muted);vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rating-trend{display:inline-grid;grid-template-columns:repeat(6,23px);gap:3px;vertical-align:middle}
/* Mark with its days-ago count underneath, so the six marks sit close together (full date: screen reader, title, expansion). */
.trend-slot{display:flex;flex-direction:column;align-items:center;gap:1px;line-height:12px;white-space:nowrap}
.trend-slot .rating{flex:none;width:18px;height:17px;font-size:12px}
.trend-slot time{font-size:10px;line-height:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.inline-detail[hidden]{display:none}
.inline-study-table .inline-detail>td{padding:0 15px 12px;background:color-mix(in srgb,var(--ink) 3%,var(--paper))}
.expanded-history p{font-size:11px;padding:8px 0;color:var(--muted)}
.expanded-history table{table-layout:fixed;font-size:11px}
.expanded-history th{position:static}
.expanded-history th:nth-child(1){width:165px}.expanded-history th:nth-child(2){width:70px}.expanded-history th:nth-child(3){width:90px}.expanded-history th:nth-child(5){width:100px}
.expanded-history td{height:36px;font-size:11px;vertical-align:top}
.expanded-history .expanded-note{white-space:pre-wrap;overflow-wrap:anywhere}
.cancelled-result{color:var(--muted);opacity:.8}.cancelled-result td:first-child span{font-size:10px;border:1px solid var(--border);padding:1px 4px}
.inline-study-table :focus-visible{outline:2px solid var(--muted);outline-offset:-2px}
@media(pointer:coarse){.inline-study-table input,.inline-study-table select,.inline-study-table button{min-height:44px}.inline-study-table td{height:62px}}
@media(prefers-color-scheme:dark){#inline-study-day.past-day{background:#514025;color:#ffe0a6}#inline-study-day.future-day{background:#50342d;color:#ffd5c8}}
@media(prefers-color-scheme:dark){.rating-pick{background:#292929}.rating-pick:hover{border-color:#9f9f9f}.rating-pick.r4[aria-pressed="true"]{color:#b3d49e;background:#2e442c}.rating-pick.r3[aria-pressed="true"]{color:#b1cca3;background:#30412c}.rating-pick.r2[aria-pressed="true"]{color:#e3c878;background:#473d24}.rating-pick.r1[aria-pressed="true"]{color:#e7afa0;background:#493028}}

/* STEP 5: dashboard and materials are separate in-page views; hidden views leave layout and tab order. */
.page[hidden]{display:none!important}
.rail-link{width:36px;height:36px;display:grid;place-items:center;padding:0;border:0;border-radius:7px;background:transparent;color:inherit}
.rail-link:hover{background:#00000008}
.rail-link[aria-current="page"]{background:#0000000f;box-shadow:inset 2px 0 0 currentColor}
.page-tabs{display:flex;gap:2px;padding:2px;border:1px solid var(--border);border-radius:6px;margin-right:auto}
.page-tabs button{border:0;border-radius:4px;background:transparent;padding:5px 12px;font-size:12px}
.page-tabs button[aria-current="page"]{background:var(--accent);color:var(--paper);font-weight:600}
h2[tabindex="-1"]:focus,h3[tabindex="-1"]:focus{outline:none}
h2[tabindex="-1"]:focus-visible,h3[tabindex="-1"]:focus-visible{outline:2px solid var(--muted);outline-offset:2px}
/* The materials view fills the viewport; only the problem list scrolls vertically. */
.workspace.materials-mode{display:flex;flex-direction:column;height:100vh;height:100dvh;overflow:auto}
/* STEP 8: the materials view keeps one compact top bar and one operations row (study day first). */
.materials-mode .topbar{padding-top:4px;padding-bottom:4px}
.materials-mode .page-tabs{padding:1px}
.materials-mode .page-tabs button{padding:3px 10px}
.materials-mode .eyebrow{display:none}
.materials-mode .topbar h1{font-size:14px}
.materials-mode main{flex:1 1 auto;min-height:0;width:100%;display:flex;flex-direction:column;padding-top:4px;padding-bottom:4px}
.materials-mode .page-materials{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.materials-page{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.materials-header{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:4px 11px;border-bottom:1px solid var(--border)}
/* The tab already names the page; keep the heading for screen readers and as the focus target. */
.materials-header h2{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.materials-header select{font-size:11px;padding:3px 5px;max-width:150px;height:28px}
.materials-header input[type=search]{flex:1 1 160px;width:160px;font-size:11px;padding:4px 7px;height:28px}
.materials-header .button.small{min-height:28px;padding:3px 9px}
.materials-header #item-count{white-space:nowrap}
.materials-actions{display:flex;gap:6px;align-items:center;margin-left:auto}
.materials-header .inline-study-date{gap:6px;padding:0;border:0;flex:none}
.materials-header #inline-study-day{height:28px;padding:3px 6px}
.inline-study-table thead th{height:26px}
.demo-badge{display:none;font-size:10px;font-weight:700;letter-spacing:1px;line-height:1;padding:4px 6px;border:1px solid currentColor;border-radius:3px;color:var(--red)}
.materials-mode .demo-badge:not([hidden]){display:inline-block}
.materials-layout{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.materials-layout .item-scroll{height:auto;min-height:180px;overflow:auto}
/* Contain absolutely positioned descendants (e.g. per-row .sr-only text); otherwise they extend the document and the page scrolls. */
.materials-layout .item-scroll,.materials-layout .material-summary-wrap{position:relative}
.materials-layout .material-summary-wrap{display:none;max-height:none;overflow:auto;border-bottom:1px solid var(--border)}
.materials-layout.summary-open{grid-template-rows:auto minmax(0,1fr)}
.materials-layout.summary-open .material-summary-wrap{display:block;max-height:160px}
/* 1440px = rail 62 + main padding 48 + panel border 2 + sidebar 261 + list min 1050 + scrollbar ~12 (≈1435). */
@media(min-width:1440px){.materials-layout,.materials-layout.summary-open{grid-template-columns:260px minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.materials-layout .material-summary-wrap,.materials-layout.summary-open .material-summary-wrap{display:block;max-height:none;border-bottom:0;border-right:1px solid var(--border)}#toggle-material-summary{display:none}}
@media(pointer:coarse){.page-tabs button,.rail-link,.materials-actions button{min-height:44px}}
@media(pointer:coarse){.materials-header .button.small,.materials-header select,.materials-header input{min-height:44px;height:auto}}
@media(prefers-color-scheme:dark){.rail-link:hover{background:#ffffff0c}.rail-link[aria-current="page"]{background:#ffffff14}}

/* STEP 9-1: one-line Task quick add on the dashboard and a shorter Task dialog. */
.quick-task{display:flex;align-items:center;gap:6px;padding:6px 11px;border-bottom:1px solid var(--border)}
.quick-task input{flex:1 1 220px;min-width:0;font-size:12px;padding:5px 8px}
.quick-task select{font-size:11px;padding:4px 5px}
.quick-task-target{font-size:11px;color:var(--muted);white-space:nowrap}
.quick-task-target strong{color:var(--ink);font-weight:600;margin-right:2px}
.task-details{margin-top:8px;border-top:1px solid var(--border);padding-top:6px}
.task-details>summary{cursor:pointer;font-size:12px;color:var(--muted);padding:4px 0}
.task-details[open]>summary{margin-bottom:6px}
@media(pointer:coarse){.quick-task input,.quick-task select,.quick-task button{min-height:44px}.task-details>summary{min-height:44px;display:flex;align-items:center}}

/* Dialog consent labels wrap inside the dialog; the checkbox never shrinks away (inputs default to min-width:0). */
.check-label input{flex:none}
.dialog-body{overflow-wrap:anywhere}
.dialog-body .check-label{white-space:normal;align-items:flex-start;gap:6px;font-size:12px;line-height:1.6;margin-top:12px}
.dialog-body .check-label input{margin-top:3px}
@media(pointer:coarse){.dialog-body .check-label input{width:20px;height:20px;margin-top:1px}}
