:root{--bg: #f5f3ec;--surface: #fffdf8;--text: #2b2822;--text-muted: #7a7263;--border: #e4ddc9;--border-soft: color-mix(in srgb, var(--border) 55%, transparent);--accent: #c1592a;--accent-soft: rgba(193, 89, 42, .16);--danger: #b3261e;--pitch-heiban: #296aa3;--pitch-atamadaka: #b42d38;--pitch-nakadaka: #bd8c1e;--pitch-odaka: #317754;--pitch-kifuku: var(--pitch-nakadaka);--shadow-sm: 0 1px 2px rgba(43, 40, 34, .07), 0 1px 1px rgba(43, 40, 34, .04);--font-sans: ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Icons", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;--content-max: 40rem}@media (prefers-color-scheme: dark){:root{--bg: #1b1a17;--surface: #242220;--text: #ede8dc;--text-muted: #9c9384;--border: #38342c;--accent: #e2895b;--accent-soft: rgba(226, 137, 91, .2);--danger: #ff7a6e;--pitch-heiban: #6dace3;--pitch-atamadaka: #e8737c;--pitch-nakadaka: #ebb447;--pitch-odaka: #5cc18f;--pitch-kifuku: var(--pitch-nakadaka);--shadow-sm: 0 1px 3px rgba(0, 0, 0, .4)}}*,*:before,*:after{box-sizing:border-box}html,body{margin:0;height:100%}body{display:flex;flex-direction:column;background:var(--bg);height:100dvh;overflow:hidden;color:var(--text);font:16px/1.5 var(--font-sans);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}button,input{color:inherit;font:inherit}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background:none}a{color:inherit}ul{margin:0;padding:0;list-style:none}.search-dock{flex:0 0 auto;margin-bottom:var(--keyboard-inset, 0px);border-top:1px solid var(--border);background:var(--bg);padding:.75rem 1rem calc(.75rem + env(safe-area-inset-bottom))}.search-dock>*{margin-inline:auto;max-width:var(--content-max)}.search-bar{display:flex;position:relative;align-items:center;gap:.5rem;box-shadow:var(--shadow-sm);border:1px solid var(--border);border-radius:999px;background:var(--surface);padding-inline:.8rem;height:44px}.search-bar:focus-within{box-shadow:0 0 0 3px var(--accent-soft);border-color:var(--accent)}.search-icon{flex:0 0 auto;fill:var(--text-muted);width:18px;height:18px}#search{flex:1;outline:none;border:0;background:transparent;min-width:0;height:100%;font-size:1rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}#search::placeholder{color:var(--text-muted)}#search::-webkit-search-decoration,#search::-webkit-search-cancel-button{display:none}#search-clear{display:flex;flex:0 0 auto;justify-content:center;align-items:center;margin-inline-end:-.3rem;border-radius:50%;width:30px;height:30px;color:var(--text-muted)}#search-clear[hidden]{display:none}#search-clear:active{background:var(--border)}#search-clear svg{fill:currentColor;width:15px;height:15px}#settings-button{display:flex;position:fixed;top:calc(.6rem + env(safe-area-inset-top));justify-content:center;align-items:center;z-index:10;backdrop-filter:blur(14px);inset-inline-end:calc(.75rem + env(safe-area-inset-right));-webkit-backdrop-filter:blur(14px);box-shadow:var(--shadow-sm);border:1px solid var(--border-soft);border-radius:50%;background:color-mix(in srgb,var(--bg) 72%,transparent);width:44px;height:44px;color:var(--text-muted)}#settings-button:active{background:var(--accent-soft);color:var(--accent)}#settings-button svg{fill:currentColor;width:22px;height:22px}.toast{display:flex;position:fixed;align-items:center;gap:.5rem;backdrop-filter:blur(14px);margin:0 auto;inset:calc(.75rem + env(safe-area-inset-top)) 1rem auto;-webkit-backdrop-filter:blur(14px);box-shadow:0 6px 24px #2b282229,var(--shadow-sm);border:1px solid var(--border-soft);border-radius:999px;background:color-mix(in srgb,var(--bg) 80%,transparent);padding:.55rem 1rem .55rem .8rem;width:fit-content;max-width:min(calc(100% - 2rem),var(--content-max));color:var(--text);font-size:.88rem;line-height:1.4}.toast:not(.toast-open){display:none}.toast-icon{display:flex;flex:0 0 auto}.toast-icon svg{fill:currentColor;width:19px;height:19px}.toast[data-variant=info] .toast-icon{color:var(--text-muted)}.toast[data-variant=success] .toast-icon{color:var(--accent)}.toast[data-variant=error] .toast-icon{color:var(--danger)}.toast-text{display:-webkit-box;min-width:0;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3}.toast{translate:0 0;opacity:1;transition:translate .38s cubic-bezier(.32,.72,0,1),opacity .3s ease}@starting-style{.toast.toast-open{translate:0 calc(-100% - 1.5rem - env(safe-area-inset-top));opacity:0}}.toast.toast-leaving{translate:0 calc(-100% - 1.5rem - env(safe-area-inset-top));opacity:0}@media (prefers-reduced-motion: reduce){.toast{transition:none}}dialog.sheet{margin:auto auto 0;box-shadow:0 -18px 50px #2b282247;border:1px solid var(--border);border-bottom:0;border-radius:22px 22px 0 0;background:var(--bg);padding:0;width:min(100%,var(--content-max));max-width:100%;max-height:88dvh;overflow-y:auto;overscroll-behavior-y:contain;color:var(--text)}dialog.sheet::backdrop{background:#0006}dialog.sheet{translate:0 100%;transition:translate .38s cubic-bezier(.32,.72,0,1),box-shadow .38s ease,display .38s allow-discrete,overlay .38s allow-discrete}dialog.sheet[open]{translate:0 0}@starting-style{dialog.sheet[open]{translate:0 100%}}dialog.sheet::backdrop{opacity:0;transition:opacity .38s ease,display .38s allow-discrete,overlay .38s allow-discrete}dialog.sheet[open]::backdrop{opacity:1}@starting-style{dialog.sheet[open]::backdrop{opacity:0}}dialog.sheet.dialog-closing{translate:0 100%}dialog.sheet.dialog-closing::backdrop{opacity:0}dialog.sheet.dialog-closing{box-shadow:0 -18px 50px #2b282200}dialog.sheet.dialog-instant-close,dialog.sheet.dialog-instant-close::backdrop{transition:none}@media (prefers-reduced-motion: reduce){dialog.sheet,dialog.sheet::backdrop{transition:none}}.dialog-header{display:flex;position:sticky;top:0;justify-content:space-between;align-items:center;gap:.75rem;z-index:2;background:var(--bg);padding:1rem 1.1rem .65rem}.dialog-header h2{margin:0;overflow:hidden;font-weight:700;font-size:1.25rem;letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap}.dialog-close{display:flex;flex:0 0 auto;justify-content:center;align-items:center;border-radius:50%;background:var(--border-soft);width:32px;height:32px;color:var(--text-muted)}.dialog-close:active{background:var(--border)}.dialog-close svg{fill:currentColor;width:15px;height:15px}.sheet-body{display:flex;flex-direction:column;gap:1.35rem;padding:.25rem 1rem calc(1.5rem + env(safe-area-inset-bottom))}.settings-group h3{margin:0 0 .5rem .95rem;color:var(--text-muted);font-weight:600;font-size:.72rem;letter-spacing:.09em;text-transform:uppercase}.group-card{box-shadow:var(--shadow-sm);border:1px solid var(--border);border-radius:14px;background:var(--surface);overflow:hidden}.group-footnote{margin:.5rem .95rem;color:var(--text-muted);font-size:.78rem;line-height:1.45}.settings-row{display:flex;align-items:center;gap:.6rem;padding:.55rem .95rem;width:100%;min-height:52px;font-size:.95rem;text-align:start}.settings-row+.settings-row{border-top:1px solid var(--border-soft)}button.settings-row:active{background:var(--accent-soft)}.row-label{flex:1;min-width:0}.row-value{color:var(--text-muted);font-size:.9rem;font-variant-numeric:tabular-nums}.row-chevron{flex:0 0 auto;transform:rotate(45deg);opacity:.5;border-inline-end:2px solid var(--text-muted);border-block-start:2px solid var(--text-muted);border-start-end-radius:1px;width:9px;height:9px}.select-wrap{display:flex;position:relative;flex:0 1 auto;justify-content:flex-end;align-items:center;margin-inline-start:auto;max-width:60%}.select-wrap:after{position:absolute;opacity:.7;inset-inline-end:0;border-top:5px solid var(--text-muted);border-inline:4px solid transparent;width:0;height:0;pointer-events:none;content:""}.select-wrap select{-moz-appearance:none;appearance:none;-webkit-appearance:none;border:0;background:transparent;padding:.5rem 1rem .5rem 0;max-width:100%;overflow:hidden;color:var(--text-muted);font:inherit;font-size:.9rem;text-align:end;text-overflow:ellipsis;white-space:nowrap}#dictionary-list li{display:flex;align-items:center;gap:.7rem;padding:.55rem .6rem .55rem .8rem;min-height:60px}#dictionary-list li+li{border-top:1px solid var(--border-soft)}#dictionary-list:empty:before{display:block;padding:.9rem .95rem;content:"No dictionaries yet. Import a Yomitan .zip to start searching.";color:var(--text-muted);font-size:.85rem;line-height:1.5}.reorder{display:flex;flex:0 0 auto;flex-direction:column;border:1px solid var(--border);border-radius:9px;background:var(--bg);overflow:hidden}.reorder button{display:flex;justify-content:center;align-items:center;width:34px;height:17px;color:var(--text-muted)}.reorder button:before{border-inline:4px solid transparent;width:0;height:0;content:""}.reorder .move-up:before{border-bottom:5px solid currentColor}.reorder .move-down:before{border-top:5px solid currentColor}.reorder button:active:not(:disabled){background:var(--accent-soft);color:var(--accent)}.reorder button:disabled{opacity:.3}.reorder-position{display:flex;justify-content:center;align-items:center;border-block:1px solid var(--border);height:16px;color:var(--accent);font-weight:700;font-size:.68rem;font-variant-numeric:tabular-nums}.dictionary-title{display:flex;flex:1;flex-direction:column;gap:.1rem;min-width:0}.dictionary-name{overflow:hidden;font-size:.92rem;text-overflow:ellipsis;white-space:nowrap}.dictionary-meta{color:var(--text-muted);font-size:.75rem;font-variant-numeric:tabular-nums}.dictionary-actions-button{display:flex;flex:0 0 auto;justify-content:center;align-items:center;border-radius:50%;width:36px;height:36px;color:var(--text-muted)}.dictionary-actions-button:active{background:var(--accent-soft);color:var(--accent)}.dictionary-actions-button svg{fill:currentColor;width:18px;height:18px}.import-button{display:flex;align-items:center;gap:.55rem;cursor:pointer;padding:0 .95rem;width:100%;min-height:50px;color:var(--accent);font-weight:600;font-size:.9rem}#dictionary-list+.import-button{border-top:1px solid var(--border-soft)}.import-button:active{background:var(--accent-soft)}.import-button svg{flex:0 0 auto;fill:currentColor;width:18px;height:18px}.visually-hidden{position:absolute;clip-path:inset(50%);margin:-1px;border:0;padding:0;width:1px;height:1px;overflow:hidden;white-space:nowrap}#import-progress{display:block;-moz-appearance:none;appearance:none;margin:0 .95rem .9rem;border:0;border-radius:999px;width:calc(100% - 1.9rem);height:6px;overflow:hidden;-webkit-appearance:none;background:var(--border)}#import-progress[hidden]{display:none}#import-progress::-webkit-progress-bar{border-radius:999px;background:var(--border)}#import-progress::-webkit-progress-value{transition:width .15s ease;border-radius:999px;background:var(--accent)}#import-progress::-moz-progress-bar{border-radius:999px;background:var(--accent)}dialog.action-sheet .sheet-body{gap:.6rem;padding-top:1.1rem}.action-sheet-title{margin:0 0 .2rem;padding:0 .5rem;overflow:hidden;color:var(--text-muted);font-weight:600;font-size:.8rem;text-align:center;text-overflow:ellipsis;white-space:nowrap}.action-sheet .settings-row{justify-content:center;min-height:52px;font-size:1rem;text-align:center}.settings-row.danger{color:var(--danger)}.settings-row.danger.confirming{background:color-mix(in srgb,var(--danger) 12%,transparent);font-weight:700}.cancel-button{box-shadow:var(--shadow-sm);border:1px solid var(--border);border-radius:14px;background:var(--surface);width:100%;min-height:52px;font-weight:700;font-size:1rem}.cancel-button:active{background:var(--accent-soft)}.rename-form{display:flex;flex-direction:column;gap:.75rem}.text-input{border:1px solid var(--border);border-radius:12px;background:var(--surface);padding:.7rem .9rem;width:100%;min-height:48px;color:var(--text);font:inherit;font-size:1rem}.text-input::placeholder{color:var(--text-muted)}.text-input:focus{outline:none;box-shadow:0 0 0 3px var(--accent-soft);border-color:var(--accent)}.field-hint{margin:-.2rem .2rem 0;color:var(--text-muted);font-size:.78rem;line-height:1.45}.primary-button{border-radius:12px;background:var(--accent);padding:0 1rem;min-height:48px;color:#fff;font-weight:700;font-size:.95rem}.primary-button:active{opacity:.85}#dictionary-details-dialog .sheet-body{gap:.7rem}.dictionary-details-revision{margin:0 0 0 .2rem;color:var(--text-muted);font-size:.8rem}.dictionary-details-revision[hidden]{display:none}#dictionary-details-body{display:grid;grid-template-columns:auto 1fr;margin:0;font-size:.85rem}#dictionary-details-body dt{padding:.6rem 0 .6rem .95rem;color:var(--text-muted)}#dictionary-details-body dd{margin:0;padding:.6rem .95rem .6rem .8rem;text-align:end;overflow-wrap:anywhere}#dictionary-details-body dt:nth-of-type(n+2),#dictionary-details-body dd:nth-of-type(n+2){border-top:1px solid var(--border-soft)}.word-list{box-shadow:var(--shadow-sm);border:1px solid var(--border);border-radius:14px;background:var(--surface);overflow:hidden}.word-list li+li{border-top:1px solid var(--border-soft)}.word-list-row{display:grid;grid-template-columns:1fr auto;column-gap:.75rem;align-items:baseline;padding:.65rem .95rem;width:100%;text-align:start}.word-list-row:active{background:var(--accent-soft)}.word-list-headword{display:block;font-size:1.05rem}.word-list-when{color:var(--text-muted);font-size:.78rem;white-space:nowrap}.word-list-note{display:block;grid-column:1 / -1;margin-top:.15rem;overflow:hidden;color:var(--text-muted);font-size:.82rem;text-overflow:ellipsis;white-space:nowrap}main#results{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;display:flex;flex-direction:column;gap:.7rem;margin-inline:auto;padding:calc(3.5rem + env(safe-area-inset-top)) 1rem 1.5rem;width:100%;max-width:var(--content-max);overscroll-behavior-y:contain}main#results:empty{justify-content:center}main#results:empty:before{display:block;content:"日本語の言葉を検索してください";color:var(--text-muted);font-size:.9rem;text-align:center}.result-list{display:flex;flex-direction:column;gap:.55rem}.result-row{display:block;box-shadow:var(--shadow-sm);border:1px solid var(--border);border-radius:14px;background:var(--surface);padding:.8rem 1rem;width:100%;text-align:start}.result-row:active{background:var(--accent-soft)}.result-headwords{display:block;overflow:hidden;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}.result-headwords .headword{font-size:1.1rem}.result-preview{display:block;margin-top:.2rem;overflow:hidden;color:var(--text-muted);font-size:.88rem;text-overflow:ellipsis;white-space:nowrap}.entry-top-bar{display:flex;justify-content:space-between;align-items:center}.back-button{display:inline-flex;align-items:center;align-self:flex-start;gap:.3rem;padding:.3rem .1rem;color:var(--text-muted);font-weight:600;font-size:.9rem}.back-button:active{color:var(--accent)}.back-button svg{fill:none;stroke:currentColor;width:18px;height:18px}.entry-actions{display:flex;flex:0 0 auto;gap:.1rem}.favourite-button,.note-button{display:flex;flex:0 0 auto;justify-content:center;align-items:center;border-radius:50%;width:40px;height:40px;color:var(--text-muted)}.favourite-button:active,.note-button:active{background:var(--accent-soft)}.favourite-button svg,.note-button svg{width:22px;height:22px}.favourite-button[aria-pressed=true],.note-button.has-content{color:var(--accent)}.note-input{display:block;border:1px solid var(--border);border-radius:10px;background:var(--surface);padding:.8rem 1rem;width:100%;min-height:8rem;resize:vertical;color:var(--text);font:inherit;font-size:.9rem;line-height:1.5}.note-input::placeholder{color:var(--text-muted)}.note-input:focus{outline:none;border-color:var(--accent)}.entry{box-shadow:var(--shadow-sm);border:1px solid var(--border);border-radius:14px;background:var(--surface);padding:1rem 1.1rem 1.15rem}.headwords{display:flex;flex-wrap:wrap;align-items:baseline;gap:.3rem .5rem}.headword{font-weight:400;line-height:1.5}.headwords .headword{font-size:1.45rem}.forvo-button{display:flex;flex:0 0 auto;justify-content:center;align-items:center;align-self:center;animation:forvo-appear .25s ease;border-radius:50%;width:40px;height:40px;color:var(--text-muted)}.forvo-button:active{background:var(--accent-soft)}.forvo-button svg{width:22px;height:22px}.forvo-button[data-state=loading]{animation:forvo-pulse 1s ease-in-out infinite}.forvo-button[data-state=playing]{color:var(--accent)}.forvo-button[data-state=playing] .forvo-wave-inner{animation:forvo-wave 1.2s ease-in-out infinite}.forvo-button[data-state=playing] .forvo-wave-outer{animation:forvo-wave 1.2s ease-in-out .3s infinite}@keyframes forvo-appear{0%{opacity:0}}@keyframes forvo-pulse{50%{opacity:.4}}@keyframes forvo-wave{50%{opacity:.25}}@media (prefers-reduced-motion: reduce){.forvo-button,.forvo-button[data-state=loading],.forvo-button[data-state=playing] .forvo-wave-inner,.forvo-button[data-state=playing] .forvo-wave-outer{animation:none}}.headword:not(:first-child):before{margin-inline-end:.4rem;content:"・";color:var(--text-muted);font-weight:400}.headword ruby{ruby-position:over}.headword rt{color:var(--text-muted);font-weight:500;font-size:.5em;-webkit-user-select:none;user-select:none}.inflections{align-self:center;cursor:pointer;border:1px solid var(--border);border-radius:999px;background:var(--bg);padding:.2rem .6rem;color:var(--text-muted);font:inherit;font-weight:500;font-size:.75rem}.inflections:active{opacity:.7}.inflections[aria-expanded=true]{border-color:var(--accent);color:var(--text)}.inflections[aria-expanded]:after{display:inline-block;vertical-align:.1em;opacity:.6;transition:transform .15s ease;margin-inline-start:.35rem;border-top:4px solid currentColor;border-inline:3px solid transparent;width:0;height:0;content:""}.inflections[aria-expanded=true]:after{transform:rotate(-180deg)}.inflections-group{position:relative;align-self:center}.inflections-group>.inflections{align-self:unset}.inflection-panel{display:grid;position:absolute;top:100%;left:0;grid-template-rows:0fr;z-index:5;margin-top:.5rem;width:max-content;max-width:min(78vw,300px)}.inflection-panel[data-open=true]{grid-template-rows:1fr}.inflection-panel:before{display:none;position:absolute;top:-5px;left:14px;transform:rotate(45deg);border-inline-start:1px solid var(--border);border-block-start:1px solid var(--border);background:var(--bg);width:10px;height:10px;content:""}.inflection-panel[data-open=true]:before{display:block}.inflection-panel-inner{min-height:0;overflow:hidden}.inflection-panel[data-open=true] .inflection-panel-inner{box-shadow:var(--shadow-sm);border:1px solid var(--border);border-radius:10px;background:var(--bg);padding:.5rem .6rem}.inflection-reason{color:var(--text);font-size:.78rem;line-height:1.5;white-space:pre-line}.inflection-reason:not(:first-child){margin-top:.5rem;border-top:1px dashed var(--border);padding-top:.5rem}.inflection-reason strong{margin-inline-end:.3rem;font-weight:700}.tags{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.4rem}.tag{border:1px solid var(--border);border-radius:6px;background:var(--bg);padding:.1rem .45rem;color:var(--text-muted);font-weight:600;font-size:.72rem}.frequencies{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.45rem}.frequency{display:inline-flex;align-items:center;overflow:hidden;border:1px solid var(--border);border-radius:999px;font-weight:600;font-size:.68rem;line-height:1}.frequency-dictionary{background:var(--bg);padding:.25rem .4rem .25rem .5rem;color:var(--text-muted)}.frequency-value{border-inline-start:1px solid var(--border);padding:.25rem .5rem .25rem .4rem;color:var(--text);font-variant-numeric:tabular-nums}.definition{margin-top:.75rem;border-top:1px solid var(--border);padding-top:.75rem}.definition:first-of-type{margin-top:.6rem;border-top:0;padding-top:0}.dictionary{margin-bottom:.35rem;color:var(--text-muted);font-weight:600;font-size:.72rem;letter-spacing:.01em}.glossary-entry{font-size:1rem;line-height:1.85;white-space:pre-line;overflow-wrap:break-word}.glossary-entry ruby{ruby-position:over}.glossary-entry rt{color:var(--text-muted);font-size:.6em;-webkit-user-select:none;user-select:none}.glossary-entry a{border-bottom:1px solid var(--accent-soft);color:var(--accent);text-decoration:none}.glossary-entry a:active{opacity:.7}.glossary-entry ul,.glossary-entry ol{margin:.4rem 0;padding-inline-start:1.4rem;list-style:revert}.glossary-entry li{margin:.15rem 0}.glossary-entry table{margin:.5rem 0;border-collapse:collapse;width:100%;font-size:.9rem}.glossary-entry th,.glossary-entry td{border:1px solid var(--border);padding:.3rem .5rem;text-align:left}.glossary-entry details{margin:.3rem 0}.glossary-entry summary{cursor:pointer;color:var(--text-muted);list-style:revert}.glossary-entry img{display:block;max-width:100%;height:auto;margin:.65rem 0;border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow-sm)}.glossary-entry img.inline-glyph{display:inline;max-width:none;height:auto;margin:0;border:none;border-radius:0;box-shadow:none;vertical-align:middle}.message{padding:3rem 1rem;color:var(--text-muted);font-size:.9rem;text-align:center}:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}.headword[data-pronunciation-categories=heiban]{color:var(--pitch-heiban)}.headword[data-pronunciation-categories=atamadaka]{color:var(--pitch-atamadaka)}.headword[data-pronunciation-categories=nakadaka]{color:var(--pitch-nakadaka)}.headword[data-pronunciation-categories=odaka]{color:var(--pitch-odaka)}.headword[data-pronunciation-categories=kifuku]{color:var(--pitch-kifuku)}
