:root{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#17202d;background:#f6f8fb;font-size:15px;-webkit-text-size-adjust:100%}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{touch-action:manipulation;cursor:pointer}button:disabled{opacity:.5;cursor:default}
.topbar{position:sticky;top:0;z-index:10;display:flex;justify-content:space-between;align-items:center;padding:calc(9px + env(safe-area-inset-top)) 16px 10px;background:#1e293b;color:#fff;box-shadow:0 2px 4px #17202d2b}.topbar strong{font-size:18px;display:block}.topbar small{display:block;color:#b7c6da;font-size:11px}.ghost{border:1px solid #718096;color:#fff;background:transparent;border-radius:8px;padding:7px 11px}
.container{max-width:760px;margin:auto;padding:12px 9px 28px}.file-toolbar{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin:7px 0 11px}.button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;background:white;border:1px solid #bdc8d7;color:#17202d;border-radius:9px;padding:8px 12px;text-align:center;text-decoration:none;font-size:13px;font-weight:650;white-space:nowrap}.button.primary{color:#fff;background:#235f94;border-color:#235f94}.button.subtle{background:#eef2f7}
#alert:not(:empty){padding:9px 12px;margin:8px 0;color:#1e4f65;background:#e6f4fb;border-left:4px solid #2584ae;border-radius:6px;font-size:13px}
.statusline{display:grid;grid-template-columns:1fr 1fr 1fr;border:1px solid #e1e6ed;border-radius:11px;background:white;padding:10px 8px;margin:8px 0;gap:5px}.statusline>div{text-align:center}.statusline span{font-size:11px;color:#66768a;display:block}.statusline strong{font-size:14px;white-space:nowrap}
.empty{margin:24px 0;padding:20px;border:1px solid #dee6ec;background:white;border-radius:12px}.empty h2{font-size:18px;margin:0 0 10px}.empty p{line-height:1.6}.hint{font-size:12px;color:#66768a;line-height:1.55}
.sheet-header,.sheet-row{display:grid;grid-template-columns:35px minmax(100px,1fr) minmax(90px,1fr);gap:0;align-items:stretch}.sheet-header{background:#e5edf6;position:sticky;top:64px;z-index:5;font-size:11px;font-weight:700;color:#3f526b}.sheet-header>div{padding:9px 4px;border-right:1px solid #ced9e5}.sheet-header>div:last-child{border-right:0}
.sheet-list{background:#fff;border:1px solid #dce3eb;border-top:0;border-radius:0 0 9px 9px;max-height:calc(100dvh - 320px);min-height:200px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.sheet-row{border-bottom:1px solid #edf0f5;min-height:43px}.sheet-row.current{background:#eaf5ff;outline:1px solid #81b7d9;outline-offset:-1px}.sheet-row.graded{color:#53606f}.cell-number{font-size:12px;color:#91a1ad;text-align:center;padding:12px 2px 5px;border-right:1px solid #e5eaf0}.cell-btn{border:0;border-right:1px solid #e5eaf0;background:transparent;padding:11px 7px;text-align:left;min-width:0;overflow-wrap:anywhere;line-height:1.3}.cell-btn:active{background:#d1eaff}.word-cell{font-weight:600}.word-cell .play-icon{font-size:11px;color:#2f76a7;margin-right:5px}.answer-cell{font-size:13px;color:#243c55}.answer-cell .placeholder{color:#b6c0cc}.answer-cell strong{color:#1c6787}.answer-cell .meaning{display:block;font-weight:500;white-space:pre-wrap;margin-bottom:4px}.answer-cell .pitch{font-size:12px;font-weight:700}.done-mark{color:#53835b;margin-left:4px}
.score-panel{position:sticky;bottom:0;z-index:6;background:#fff;border:1px solid #dce3eb;border-radius:11px;padding:9px;margin:10px 0 0;box-shadow:0 -2px 15px #16263c15;padding-bottom:calc(10px + env(safe-area-inset-bottom))}.score-description{font-size:12px;color:#4e6276;min-height:18px;padding-bottom:7px;white-space:normal}.score-controls{display:flex;align-items:center;gap:7px}.score-controls label{font-size:12px;white-space:nowrap}.score-controls input{min-width:0;width:86px;font-size:18px;font-weight:700;letter-spacing:3px;text-align:center;padding:8px;border:1px solid #aebcce;border-radius:8px;background:#fff;min-height:43px}.score-controls .button{flex:1}.quick-score{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-top:8px}.quick-score button{border:1px solid #d0dae5;background:#f7f9fc;border-radius:7px;min-height:46px;font-weight:700;font-size:16px}.quick-score small{font-size:10px;color:#6b7a88;display:block;font-weight:400}
.settings{background:#fff;padding:14px;border-radius:12px;border:1px solid #dee6ee;margin:14px 0}.settings h2{margin:0;font-size:17px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:9px;margin:14px 0}.setting-row select{max-width:190px;border-radius:7px;padding:9px;border:1px solid #ccd6e0}.checkbox{display:flex;gap:9px;align-items:flex-start;font-size:13px;line-height:1.5}.checkbox input{transform:scale(1.2)}.note-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:14px 0}.note-card{padding:8px;border-radius:8px;background:#f2f6f9;border:1px solid #e3ebf1;font-size:12px}.note-card strong{font-size:14px}.note-card span{display:block;color:#66768a;margin-top:3px}.footer{text-align:center;font-size:11px;color:#8894a3;padding:10px 7px 25px}
@media(max-width:365px){.file-toolbar .button{padding:7px 9px;font-size:12px}.sheet-header,.sheet-row{grid-template-columns:28px minmax(99px,1fr) minmax(94px,1fr)}.cell-btn{padding:10px 5px}.score-controls label{display:none}.score-description{font-size:11px}.quick-score small{font-size:9px}}
