/* Kotoba: separate desktop workspace and phone detail flow. */
:root{color-scheme:light;--paper:#fff;--canvas:#f6f6f3;--ink:#252b26;--muted:#6b736b;--line:#e3e6de;--accent:#566a48;--tint:#edf1e8}
*{box-sizing:border-box}body{margin:0;background:var(--canvas);color:var(--ink);font:15px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",sans-serif;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit;color:inherit;max-width:100%;min-width:0}button,a,input,select,textarea,summary{-webkit-tap-highlight-color:transparent}button,select,input,textarea{border:1px solid var(--line);border-radius:8px;background:var(--paper);padding:10px 12px}button,summary{cursor:pointer}button{min-height:44px;transition:background .15s,border-color .15s}button:hover{background:var(--tint);border-color:#bac6af}button:disabled{opacity:.5;cursor:wait}a{color:var(--accent);text-underline-offset:4px}button.primary,.primary-link{background:var(--accent);border:1px solid var(--accent);color:white;font-weight:600;padding:11px 20px;text-decoration:none;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;min-height:44px}button.primary:hover,.primary-link:hover{background:#425638}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #8eaa78;outline-offset:3px}h1,h2,h3,p{overflow-wrap:anywhere}h1{font-size:26px;letter-spacing:-.7px;line-height:1.3;margin:9px 0 10px;font-weight:600}h2{font-size:22px;line-height:1.4;margin:0 0 12px}h3{font-size:12px;color:var(--muted);font-weight:500;letter-spacing:1px;margin:0 0 8px}p{margin:0 0 16px}.subtle{color:var(--muted);font-size:13px}.eyebrow{display:block;color:var(--accent);font-size:10px;letter-spacing:2px;font-weight:650}.app-header{height:64px;display:flex;align-items:center;gap:28px;padding:0 28px;background:var(--paper);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:10}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);font-size:14px;font-weight:650;white-space:nowrap}.brand-mark{display:grid;place-items:center;width:29px;height:29px;border:1px solid #c9d3c1;border-radius:8px;font-family:Georgia,serif;font-size:20px;color:var(--accent)}.app-header>strong{font-size:13px;font-weight:500;border-left:1px solid var(--line);padding-left:24px;white-space:nowrap}.header-actions{margin-left:auto;display:flex;align-items:center;gap:16px;min-width:0}.header-actions select{font-size:12px;background:transparent;border-color:transparent;max-width:120px}.header-actions #account{font-size:13px;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:10px 0}.shell{display:grid;grid-template-columns:208px minmax(0,1fr);min-height:calc(100vh - 64px)}.sidebar{position:sticky;top:64px;height:calc(100vh - 64px);padding:30px 18px 22px;border-right:1px solid var(--line);display:flex;flex-direction:column;overflow-y:auto;background:#fafbf8}.sidebar-heading{font-size:10px;font-weight:700;letter-spacing:2.5px;color:#838c7e;padding:0 14px 22px}#tabs{display:grid;gap:5px}#tabs button{display:flex;align-items:center;gap:12px;min-height:46px;padding:10px 14px;border:0;background:transparent;text-align:left;font-size:13px;color:#626b60}#tabs button:hover{background:#f0f2ec}#tabs button[aria-current=true]{background:#e8edde;color:#34472b;font-weight:600}.nav-icon{width:22px;flex-shrink:0;text-align:center;font-size:18px;font-weight:400;font-family:Georgia,serif}.soon-dot{width:4px;height:4px;background:#a5ae9f;border-radius:50%;margin-left:auto}.sidebar-footer{margin-top:auto;padding:40px 12px 0}.balance-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px}.balance-heading strong{font-size:14px;font-weight:600;white-space:nowrap}.quota-track{height:3px;background:#e2e7dc;border-radius:4px;margin:10px 0 6px;overflow:hidden}.quota-track span{display:block;height:100%;background:#8c9f79}.sidebar-footer small{font-size:10px;color:var(--muted)}.release-note{font-size:11px;color:var(--muted);margin:20px 0}.release-note p{margin:9px 0}.community-back{display:block;font-size:12px;text-decoration:none;color:var(--muted)}main{min-width:0;padding:32px}#notice:empty{display:none}#notice{margin:0 0 16px;padding:12px 16px;border-radius:8px;background:#eaf0e4;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}#notice.error{color:#8d3d32;background:#f7ebe7}.workspace{display:grid;grid-template-columns:minmax(280px,.85fr) minmax(360px,1.15fr);gap:24px;align-items:start}.card{background:var(--paper);border:1px solid var(--line);border-radius:12px;min-width:0;padding:28px}.panel-heading{margin-bottom:26px}.panel-heading p{margin:0}.lookup-form{padding-bottom:15px}.language-row{display:flex;align-items:center;gap:9px;margin-bottom:13px;flex-wrap:wrap}.language-row label{margin:0;font-size:0}.language-row select{font-size:13px;padding:5px 8px;background:#f5f7f1;border-color:transparent;min-height:36px}.target-language{font-size:12px;color:var(--muted)}.search-field input{width:100%;font-size:17px;height:58px;background:#fbfcf9;border-color:#d4dbcd;padding:14px 16px}.search-field input::placeholder{font-size:13px;color:#92998e}.lookup-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:13px}.lookup-footer small{font-size:11px;color:var(--muted)}.lookup-footer button{font-size:13px;white-space:nowrap}.quota-help{font-size:11px;color:var(--muted);margin:0 0 25px}.quota-help p{margin:8px 0 0;line-height:1.8}.list-heading{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding:19px 0 10px;font-size:12px}.list-heading small{font-size:10px;color:#7a8473}.list{max-height:calc(100vh - 440px);min-height:100px;overflow:auto;scrollbar-width:thin;scrollbar-color:#d7ddcf transparent}.list button{display:block;border:0;border-bottom:1px solid #eef0ea;border-radius:0;width:100%;text-align:left;background:transparent;padding:14px 8px;overflow-wrap:anywhere}.list button:hover,.list button.is-selected{background:#f3f6ef}.list .word-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:66px}.word-label{min-width:0;display:block}.word-label strong{font-size:16px;font-weight:500}.list small{display:block;font-size:11px;color:var(--muted);margin-top:1px}.row-arrow{color:#a1ac95;font-size:17px;padding-right:5px}.detail-panel{padding:36px 40px;min-height:570px}.detail-empty{min-height:490px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:32px}.empty-glyph{width:78px;height:78px;border:1px solid #dfe6d6;background:#f7f9f3;border-radius:22px;display:grid;place-items:center;font:36px "Yu Mincho","Noto Serif JP",serif;color:#7b8b6d;margin-bottom:30px}.detail-empty h2{font-size:19px;font-weight:500;letter-spacing:-.3px}.detail-empty p{font-size:13px;line-height:1.9;color:var(--muted);max-width:310px}.detail-back{display:none}.entry-heading{display:flex;justify-content:space-between;gap:14px;margin:0 0 12px}.entry-heading>div{min-width:0}.entry-heading h2{font:400 42px/1.4 "Yu Mincho","Noto Serif JP",Georgia,serif;margin:10px 0 4px;letter-spacing:.02em}.entry-heading h2:focus{outline:none}.reading{font-size:14px;color:var(--muted)}.audio-button{align-self:center;font-size:11px;flex-shrink:0;max-width:130px;background:#fafbf7;border-color:var(--line)}.tag{display:inline-block;padding:3px 9px;background:#f0f3ea;border-radius:4px;font-size:11px;color:#637354}.meaning{font-size:23px;font-weight:550;margin:22px 0 25px;line-height:1.6}.entry-section{margin:0 0 24px}.entry-section p{font-size:14px;line-height:1.9;margin:0}.example-block{margin:0 0 25px;padding:20px 22px;background:#f7f8f3;border-left:2px solid #a2b38e;border-radius:0 8px 8px 0}.example-source{font-size:17px;line-height:1.8;margin:0 0 8px}.example-translation{color:var(--muted);font-size:13px;margin:0}.collocation-list{display:flex;flex-wrap:wrap;gap:8px}.collocation-list span{font-size:13px;border:1px solid var(--line);padding:6px 11px;border-radius:6px}.entry-notes{font-size:12px;color:var(--muted);margin:0 0 22px}.entry-notes p{margin:8px 0}.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.toolbar input{flex:1}.detail-actions{padding-top:22px;border-top:1px solid var(--line);margin:28px 0 15px}.detail-actions button{font-size:12px}.entry-provenance{font-size:10px;color:#82897c;margin:0;line-height:1.7}label{display:block;margin:18px 0 6px;color:var(--muted);font-size:13px}label input,label select,label textarea{display:block;width:100%;margin-top:7px}label input[type=checkbox]{display:inline-block;width:18px;height:18px;margin:0 0 0 12px;vertical-align:middle;accent-color:var(--accent)}textarea{min-height:95px;resize:vertical}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;background:var(--canvas);padding:15px}#content[data-view=settings]>.card{max-width:720px;padding:36px}#content[data-view=settings]>.card>button{margin:22px 8px 0 0}.empty{padding:35px 0;color:var(--muted);font-size:13px}.empty h2{font-size:17px}.feature-state{padding:70px 50px;min-height:400px}.feature-state h1{margin:14px 0 20px}.feature-state p{font-size:14px;color:var(--muted);max-width:500px;margin-bottom:28px}.guest-workspace .search-panel{min-height:570px;padding:45px 36px}.guest-prompt{margin-top:65px}.guest-prompt p{font-size:14px;color:var(--muted);line-height:1.9;margin-bottom:24px}[hidden]{display:none!important}
@media (max-width:1099px){.shell{display:block}.sidebar{height:auto;position:sticky;top:64px;z-index:8;padding:8px 24px;background:#fafbf8;border-right:0;border-bottom:1px solid var(--line);overflow:visible}.sidebar-heading{display:none}#tabs{display:flex;overflow-x:auto;scrollbar-width:none;gap:4px}#tabs button{white-space:nowrap;flex-shrink:0;padding:8px 12px}.sidebar-footer{padding:0}.release-note,.community-back{display:none}#balance:not(:empty){margin-top:6px;display:flex;align-items:center;gap:15px}.balance-heading{gap:10px}.quota-track{width:65px;margin:0}main{padding:24px}.workspace{gap:18px;grid-template-columns:minmax(280px,.9fr) minmax(320px,1.1fr)}.card{padding:24px}.detail-panel{padding:28px;min-height:540px}.detail-empty{padding:18px;min-height:480px}.lookup-footer{flex-wrap:wrap}.lookup-footer button{margin-left:auto}.list{max-height:420px}}
@media (min-width:761px) and (max-width:899px){.workspace{grid-template-columns:1fr 1fr;gap:16px}.card{padding:20px}.detail-panel{padding:25px}.entry-heading{flex-wrap:wrap}.entry-heading h2{font-size:34px}.audio-button{min-height:36px}.detail-empty{padding:0}.lookup-footer small{display:none}}
@media (max-width:760px){body{font-size:15px}.app-header{height:56px;padding:0 16px;gap:12px}.brand-name{display:none}.brand-mark{width:28px;height:28px}.app-header>strong{padding-left:0;border:0;font-size:13px}.header-actions{gap:8px}.header-actions select{max-width:94px;min-height:44px;padding:8px 3px;font-size:12px}.header-actions #account{max-width:76px;font-size:12px}.shell{min-height:calc(100vh - 56px)}.sidebar{top:56px;padding:6px 16px 8px}#tabs{margin:0 -4px}#tabs button{min-height:44px;padding:8px 12px;gap:7px;font-size:13px;border-radius:6px}.nav-icon{font-size:16px;width:18px}.soon-dot{display:none}#balance:not(:empty){margin:7px 1px 0;justify-content:space-between;gap:10px}.balance-heading{font-size:10px}.balance-heading strong{font-size:12px}.quota-track{display:none}.sidebar-footer small{font-size:9px}main{padding:20px 16px 30px}.workspace{display:block}.card{padding:22px 20px;border-radius:10px}.panel-heading{margin-bottom:24px}h1{font-size:26px}.eyebrow{font-size:9px}.panel-heading .subtle{font-size:12px}.lookup-form{padding-bottom:13px}.search-field input{height:58px;font-size:18px}.search-field input::placeholder{font-size:13px}.language-row select{font-size:16px}.lookup-footer{flex-wrap:nowrap;align-items:center}.lookup-footer small{font-size:10px;max-width:95px}.lookup-footer button{font-size:13px;padding:11px 16px}.quota-help{margin-bottom:22px}.list{max-height:none;overflow:visible;min-height:0}.list .word-row{min-height:72px;padding:14px 4px}.word-label strong{font-size:18px}.list small{font-size:12px}.list-heading{padding-top:19px}.workspace>.detail-panel{display:none}.workspace.has-detail>.search-panel{display:none}.workspace.has-detail>.detail-panel{display:block}.detail-panel{min-height:0;padding:20px}.detail-back{display:block;border:0;background:none;color:var(--muted);padding:0;min-height:44px;font-size:12px;margin:0 0 22px}.entry-heading{gap:10px;flex-wrap:nowrap}.entry-heading h2{font-size:38px}.audio-button{font-size:10px;max-width:100px;padding:8px;min-height:44px}.reading{font-size:14px}.meaning{font-size:23px;margin:22px 0 26px}.entry-section p{font-size:15px}.example-block{padding:18px;margin:0 0 27px}.example-source{font-size:18px}.example-translation{font-size:13px}.collocation-list span{font-size:13px}.detail-actions{position:sticky;bottom:0;background:white;padding:14px 0 calc(14px + env(safe-area-inset-bottom));margin:25px 0 0;z-index:2}.detail-actions button{min-height:46px;font-size:12px;flex:1}.entry-provenance{margin:12px 0 0;font-size:10px}input,textarea,select{font-size:16px}.toolbar{gap:8px}.guest-workspace .search-panel{min-height:410px;padding:32px 24px}.guest-prompt{margin-top:55px}.guest-prompt .primary-link{width:100%}.feature-state{min-height:360px;padding:38px 24px}.feature-state p{font-size:14px}#content[data-view=settings]>.card{padding:24px 20px}#content[data-view=admin] .workspace>.search-panel,#content[data-view=admin] .workspace>.detail-panel{display:block}#content[data-view=admin] .detail-panel{margin-top:16px}#content[data-view=admin] .detail-empty{display:none}#content[data-view=admin] .toolbar>button{font-size:12px}.entry-heading h2{word-break:normal;overflow-wrap:anywhere}}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.extra-quota{display:block;margin-top:7px}
@media(max-width:1099px){#balance:not(:empty){flex-wrap:wrap}.extra-quota{margin:0}.sidebar-footer .extra-quota{font-size:10px}}
.search-field{position:relative}.suggestions{position:absolute;left:0;right:0;top:calc(100% + 5px);background:white;z-index:6;box-shadow:0 9px 25px #202b2014;border:1px solid var(--line);border-radius:8px;min-height:0;max-height:310px;overflow:auto!important}.suggestions .word-row{min-height:52px;padding:9px 15px}.suggestions [aria-selected=true]{background:var(--tint)}.suggestions .word-label strong{font-size:15px}.suggestions .word-label small{font-size:11px}
.tool-guide{font-size:12px;white-space:nowrap;text-decoration:none;padding:10px 0}
@media(max-width:760px){.header-actions{gap:9px}.tool-guide{font-size:11px}.header-actions select{max-width:80px}.header-actions #account{max-width:55px}.app-header{gap:9px;padding:0 12px}}
/* The notebook keeps its controls together; saved text remains the main detail. */
.notebook-exports{margin:12px 0 8px}.notebook-exports button{font-size:12px;flex:1}.notebook-count{margin:12px 0 0;font-variant-numeric:tabular-nums}.notebook-tags{border-top:1px solid var(--line);padding-top:10px;margin-top:24px}.notebook-tags label{margin-top:10px}.notebook-tags p{margin:6px 0 10px;font-size:11px}.notebook-tags button{font-size:12px}.notebook-tags input{font-size:14px}#installPwa{font-size:12px;padding:8px 12px;white-space:nowrap}
@media(min-width:761px) and (max-width:1099px){.app-header .brand-name{display:none}.app-header{gap:18px}.app-header>strong{padding-left:18px}.header-actions{gap:12px}}
@media(max-width:760px){.notebook-exports button{min-height:46px}.notebook-tags input{font-size:16px}.notebook-tags button{width:100%;min-height:46px}#installPwa,.tool-guide{display:inline-grid;place-items:center;width:32px;min-width:32px;height:44px;padding:0;border:0;background:transparent;font-size:0}#installPwa::before{content:'↓';font-size:21px;color:var(--accent)}.tool-guide::before{content:'?';font:15px/24px Georgia,serif;border:1px solid #bdc9b2;border-radius:50%;width:24px;text-align:center}.header-actions{gap:7px}.header-actions select{max-width:78px}}
@media(max-width:420px){.app-header>strong{display:none}.header-actions #account{max-width:58px}.app-header{gap:8px}.header-actions{gap:6px}}
@media(max-width:760px){#content[data-view=items] .detail-actions{position:static;padding-bottom:0}}
