:root{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;color:#1a3126;background:#f5f8f4;font-synthesis:none;-webkit-text-size-adjust:100%;--forest:#174d38;--light:#e4eee5;--ink:#1a3126;--muted:#65796c}*{box-sizing:border-box}body{margin:0}.app{max-width:780px;margin:0 auto;min-height:100dvh;display:flex;flex-direction:column}.header{padding:18px 22px;display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:rgba(245,248,244,.94);backdrop-filter:blur(16px);z-index:10;border-bottom:1px solid #e0e7de}.brand{display:flex;align-items:center;gap:10px}.logo{height:42px;width:42px;display:grid;place-items:center;color:#fff;background:var(--forest);border-radius:13px;font-size:17px;letter-spacing:-2px}.brandname{font-size:19px;font-weight:800;letter-spacing:-.5px}.brandname span{font-weight:450;color:#4a7e61}.subhead{font-size:11px;color:var(--muted);margin-top:2px}.quiet{border:0;background:transparent;color:var(--forest);font-weight:700;padding:10px;font-size:13px}main{flex:1;padding:22px 20px 28px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:2px;color:#4d8465}.import-area{padding:46px 10px 36px;text-align:center}.import-area h1{font-size:clamp(28px,7vw,44px);line-height:1.4;letter-spacing:-1.5px;margin:16px 0 14px}.import-area p{max-width:440px;margin:0 auto 26px;color:var(--muted);line-height:1.8;font-size:14px}.primary,.outline,.danger{display:inline-flex;justify-content:center;align-items:center;gap:6px;border-radius:14px;min-height:48px;padding:12px 18px;text-decoration:none;font-size:14px;font-weight:750;cursor:pointer;font-family:inherit}.primary{background:var(--forest);color:white;border:1px solid var(--forest)}.outline{border:1px solid #aec8b7;background:#fff;color:var(--forest)}.danger{border:1px solid #e6a8a4;background:#fff9f8;color:#9d3b33}.import-area .hint{font-size:12px;color:#7d8c80;margin-top:15px}.section-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:14px}.section-head h2,.section-head h3{margin:8px 0 0;font-size:22px}.import-small{min-height:40px;padding:8px 13px;font-size:13px}.library-list{display:grid;gap:10px}.library-card{display:flex;align-items:center;gap:15px;width:100%;text-align:left;background:white;color:var(--ink);border:1px solid #e0e9de;border-radius:16px;padding:18px;cursor:pointer;font-family:inherit}.library-card .thumb{width:50px;height:50px;border-radius:14px;background:#e4eee5;color:var(--forest);display:grid;place-items:center;font-size:25px;flex:0 0 auto}.library-card .info{flex:1;min-width:0}.library-card strong{font-size:16px;display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.library-card small{display:block;font-size:12px;margin-top:7px;color:var(--muted)}.library-card .chev{color:#7da08a;font-size:24px}.player .now{text-align:center;padding:14px 0 16px}.now h2{font-size:24px;line-height:1.4;overflow-wrap:anywhere;margin:8px 0}.record-meta{color:var(--muted);font-size:12px}.counter{display:flex;justify-content:space-between;font-variant-numeric:tabular-nums;font-size:12px;color:var(--muted);margin:8px 2px}#seek{width:100%;accent-color:var(--forest);height:25px}.transport{display:flex;justify-content:center;align-items:center;gap:28px;padding:12px 0}.transport-small{display:flex;flex-direction:column;align-items:center;gap:6px;background:transparent;border:0;font-size:25px;color:var(--forest);min-width:72px;cursor:pointer}.transport-small span{font-size:10px}.play{width:80px;height:80px;border-radius:50%;border:0;background:var(--forest);color:white;font-size:34px;box-shadow:0 12px 30px #174d3826;cursor:pointer;padding-left:6px}.tools{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 0 20px;border-bottom:1px solid #dce6dc}.speed-tool{font-size:12px;color:var(--muted);white-space:nowrap}.speed-tool select{background:#fff;border:1px solid #c6d7ca;padding:9px;border-radius:10px;font-size:13px;color:var(--ink)}.chip{font-family:inherit;cursor:pointer;border:1px solid #c5d8c9;background:#fff;color:var(--forest);border-radius:999px;padding:9px 12px;min-height:39px;font-weight:650;font-size:12px}.chip[aria-pressed="true"],.chip.active{background:#d8e9db;border-color:#74a487}.caption-label{display:flex;justify-content:space-between;align-items:center;margin:24px 4px 12px}.underlined{border:0;background:none;color:var(--forest);font-size:12px;text-decoration:underline;cursor:pointer}.sentence{border:1px solid #b6d1bd;background:white;box-shadow:0 12px 50px #174d380a;border-radius:22px;padding:22px 19px 16px;min-height:205px}.sentence-time{color:#789482;font-size:12px;font-variant-numeric:tabular-nums}.sentence-text{font-size:clamp(20px,5.6vw,27px);line-height:1.65;font-weight:600;letter-spacing:.1px;overflow-wrap:anywhere;min-height:72px;margin:10px 0 14px;white-space:pre-wrap}.original{border-top:1px solid #e5eee7;padding-top:12px;color:#587263;font-size:13px;white-space:pre-wrap}.sentence-nav{display:flex;align-items:center;justify-content:space-between;gap:8px}.sentence-nav span{font-size:12px;color:var(--muted)}.learnbar{text-align:center;padding:15px 0 4px}.learnbar .outline{width:100%}.sentences-title{margin-top:35px;align-items:center}.sentences-title h3{font-size:17px;margin:0}.filters{display:flex;gap:5px}.filter{font-family:inherit;font-size:12px;padding:8px 10px;border:0;border-radius:50px;background:transparent;color:#65796c}.filter.selected{background:#d6e7d9;color:#174d38;font-weight:750}.segments{display:flex;flex-direction:column;gap:6px;max-height:440px;overflow:auto;scrollbar-width:thin}.seg-item{display:flex;align-items:start;gap:12px;padding:13px 14px;border-radius:14px;border:1px solid transparent;background:#fff;text-align:left;width:100%;color:var(--ink);font-family:inherit;cursor:pointer}.seg-item.current{border-color:#91b49c;background:#e6f0e8}.seg-time{font-variant-numeric:tabular-nums;font-size:11px;color:#648371;white-space:nowrap;margin-top:3px}.seg-copy{flex:1;min-width:0;overflow-wrap:anywhere;font-size:14px;line-height:1.6}.seg-star{color:#c39141;white-space:nowrap}.details{margin-top:30px;border-top:1px solid #dce6dc;font-size:13px;color:var(--muted)}.details summary{cursor:pointer;padding:16px 0;color:var(--forest);font-weight:750}.detail-inner{display:grid;gap:14px;padding:5px 0}.detail-inner label{display:grid;gap:9px}.detail-inner input{accent-color:var(--forest)}.detail-inner .hint{margin:0;font-size:12px}footer{display:flex;justify-content:space-between;gap:10px;padding:20px;font-size:10px;color:#819489;border-top:1px solid #e0e9df}.toast{position:fixed;z-index:30;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));transform:translate(-50%,120px);transition:transform .2s ease;background:#153f2e;color:#fff;padding:13px 20px;border-radius:14px;max-width:90vw;box-shadow:0 12px 34px #153f2e52;text-align:center;font-size:13px}.toast.show{transform:translate(-50%,0)}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #4d986e;outline-offset:3px}[hidden]{display:none!important}@media(max-width:390px){.tools{gap:5px}.chip{padding:8px}.header{padding:14px 15px}main{padding:15px 12px}.transport{gap:14px}.sentence{padding:17px 15px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
/* Persistent import diagnostics: shown even if Safari closes a transient toast. */
.import-status{white-space:pre-line;overflow-wrap:anywhere;padding:15px 16px;margin:12px 0 19px;background:#f0f6ef;color:#294d38;border:1px solid #a8c6ae;border-radius:14px;font-size:13px;line-height:1.75}
.import-status.error{background:#fff5ef;color:#773b2e;border-color:#e3b3a0}
.import-status.warning{background:#fffaf0;color:#635028;border-color:#dfcb9b}
.import-status.success{background:#eef7ef;color:#265c3e;border-color:#9ec7aa}
/* v0.2 — independent clean-text / TTS practice mode */
[hidden]{display:none!important}
.mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;background:#e6eee5;padding:5px;border-radius:14px;margin:18px 0 24px}
.mode-tab{border:0;padding:12px 8px;background:transparent;color:#5f7669;border-radius:11px;font:700 14px inherit;font-family:inherit;font-size:14px;font-weight:750;cursor:pointer}
.mode-tab.selected{background:#fff;color:var(--forest);box-shadow:0 2px 8px #174d3814}
.study-intro{padding:4px 2px 12px}.study-intro h3{font-size:24px;line-height:1.42;margin:10px 0}.study-intro p{color:var(--muted);font-size:13px;line-height:1.85}
.study-panel{padding:19px;border-radius:17px;border:1px solid #d9e6da;background:#fff;margin:16px 0;display:grid;gap:11px}
.study-panel-title{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.study-panel-title strong{font-size:16px}.form-label{font-size:13px;font-weight:700;display:grid;gap:7px;color:#365447}
.full-input{font:inherit;font-size:15px;border:1px solid #becfc1;color:var(--ink);border-radius:10px;background:#fff;width:100%;min-width:0;min-height:45px;padding:11px;resize:vertical}
.study-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.study-actions .primary,.study-actions .outline{flex:1 1 auto;min-height:42px;font-size:13px;padding:9px 13px}
.study-actions label{cursor:pointer}.study-actions button:disabled{opacity:.4;cursor:default}.text-button{border:0;background:transparent;color:var(--forest);text-decoration:underline;font-weight:700;cursor:pointer;font:inherit;font-size:12px}
.soft-caption{font-size:12px;color:var(--muted)}.study-panel .hint{color:var(--muted);font-size:12px;line-height:1.65;margin:3px 0}
.study-list-head{display:flex;justify-content:space-between;align-items:end;gap:10px;margin:30px 0 7px}.study-list-head h3{margin:4px 0 0;font-size:21px}.study-list-head .outline{font-size:12px;min-height:40px;padding:8px 10px}
.study-mode>.hint{color:var(--muted);font-size:12px;line-height:1.6;margin:0 0 14px}
.study-sentences{display:grid;gap:12px}.study-sentence-card{border:1px solid #dae7db;background:#fff;border-radius:17px;padding:18px 16px;display:grid;gap:12px;transition:border-color .2s}.study-sentence-card.speaking{border-color:#428d65;box-shadow:0 0 0 2px #cce7d5}
.study-card-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px}.study-number{font-size:12px;color:var(--muted);font-weight:800}.study-change-labels{display:flex;gap:5px;flex-wrap:wrap}
.study-change{font-size:10px;color:#466551;background:#edf4ec;padding:4px 8px;border-radius:8px;font-weight:700}.study-sentence-text{font-size:22px;line-height:1.65;overflow-wrap:anywhere;color:#183e2a;font-weight:650}
.study-change-note{font-size:12px;line-height:1.7;color:#6a6e5f;margin:0}.study-source{font-size:12px;line-height:1.7;color:var(--muted);padding:8px 0;border-top:1px solid #edf2ea}.study-source summary{cursor:pointer}.study-original{color:#3c5147;background:#f5f8f4;padding:9px;border-radius:8px;margin:7px 0}
.study-card-buttons{display:flex;flex-wrap:wrap;gap:7px}.study-card-buttons button{min-height:41px;font-size:12px;padding:8px 10px;border-radius:11px;flex:1 0 auto;cursor:pointer}.study-card-buttons .chip{border:1px solid #dde9df;background:#f6faf5;color:var(--forest)}
.study-editor{border-top:1px solid #dbe8dd;display:grid;gap:12px;padding-top:13px}.study-empty{border:1px dashed #b5c9bc;background:#edf4ec;border-radius:14px;padding:20px;line-height:1.8;font-size:13px;color:#4e6458}.study-empty p{margin:5px 0 0}
@media(max-width:430px){.study-panel{padding:15px}.study-sentence-text{font-size:20px}.mode-tab{font-size:12px}.study-card-buttons{gap:6px}.study-card-buttons button{flex-grow:1}}

.study-page-nav{display:flex;align-items:center;justify-content:space-between;gap:7px;margin:12px 0 17px}.study-page-nav .outline{min-height:36px;padding:7px;font-size:12px}.study-page-nav button:disabled{opacity:.4;cursor:default}

/* v0.2.2 Safari: actual native file input occupies the visible button. */
.file-picker{position:relative;overflow:hidden;isolation:isolate;-webkit-tap-highlight-color:transparent}
.file-picker input[type=file]{display:block;position:absolute;inset:0;width:100%;height:100%;opacity:0.015;z-index:1;cursor:pointer;font-size:100px;direction:rtl}
.file-picker:focus-within{outline:3px solid #4d986e;outline-offset:3px}
.app-runtime{font-size:12px;background:#edf3ed;color:#45624c;border-radius:8px;padding:8px 11px;margin:0 0 12px;text-align:center}
