:root{color-scheme:light;font-family:"BIZ UDPGothic","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;color:#202124;background:#fff;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0}
button,input{font:inherit}
button{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button:focus-visible,.writing-area:focus-visible,summary:focus-visible{outline:3px solid #c88700;outline-offset:3px}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.app{height:100svh;height:100dvh;min-height:24rem;display:flex;flex-direction:column;gap:.65rem;padding:max(.75rem,env(safe-area-inset-top)) max(1rem,env(safe-area-inset-right)) max(.4rem,env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left));margin:auto}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-shrink:0}
h1{margin:0;font-size:1rem;font-weight:700;white-space:nowrap;color:#4b515b}
.brand-icon{display:none}
.reading-control{border:0;padding:0;margin:0;min-width:0}
.reading-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.2rem;padding:.2rem;background:#f0f1f3;border-radius:.75rem}
.reading-options label{position:relative;cursor:pointer;min-width:0}
.reading-options input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.reading-options span{display:grid;place-items:center;min-height:44px;padding:.45rem .8rem;font-size:.9375rem;font-weight:700;border-radius:.55rem;color:#656b75;white-space:nowrap}
.reading-options{position:relative;touch-action:pan-y;user-select:none;-webkit-user-select:none;--pos:0}
.reading-thumb{position:absolute;z-index:0;top:.2rem;bottom:.2rem;left:.2rem;width:calc((100% - 1rem) / 4);border-radius:.55rem;background:#fff;box-shadow:0 1px 4px #0000001c;transform:translateX(calc(var(--pos) * (100% + .2rem)));transition:transform .28s cubic-bezier(.22,.61,.36,1);pointer-events:none}
.reading-options.is-dragging .reading-thumb{transition:none}
.reading-options label{z-index:1}
.reading-options span{transition:color .2s}
.reading-options input:checked+span{color:#253ed3}
.reading-options.is-dragging input+span{color:#656b75}
.reading-options.is-dragging input+span.is-near{color:#253ed3}
.reading-options input:focus-visible+span{outline:3px solid #c88700;outline-offset:1px}
.memo{min-height:0;flex:1;display:flex;flex-direction:column;overflow:hidden}
.memo-top{display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-shrink:0}
.status{margin:0;font-size:.875rem;line-height:1.5;color:#69717e}
.record-indicator{display:none;align-items:center;gap:.4rem;white-space:nowrap;color:#a22d46;font-size:.875rem}
.record-indicator>span{width:.5rem;height:.5rem;border-radius:50%;background:#d0415a;animation:breathe 1.5s ease-in-out infinite}
.writing-area{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-color:#cbd5e9 transparent;scrollbar-width:thin;display:flex;flex-direction:column;margin-top:.25rem;padding:0 .1rem}
.empty{display:flex;flex:1;flex-direction:column;justify-content:center;align-items:flex-start;gap:1rem;padding:1rem 0}
.empty p{margin:0;font-size:clamp(3rem,6.4vw,6rem);font-weight:700;line-height:1.45;letter-spacing:.025em;color:#b0b4bd}
.empty span{font-size:1rem;line-height:1.7;color:#69717e}
.transcript{margin:0;width:100%;font-weight:700;line-height:1.55;letter-spacing:.025em;overflow-wrap:anywhere;white-space:pre-wrap;padding:.1rem 0 .8rem;font-size:clamp(3rem,6.4vw,6rem)}
[data-reading="ruby"] .transcript{line-height:1.95;padding-top:.5em}
.transcript ruby{ruby-align:center}
.transcript rt{font-size:.38em;font-weight:600;letter-spacing:0;line-height:1.2}
.interim{color:#6979a0}
.spoken-segment{border-radius:.1em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.spoken-segment.is-current{background:#ffe08a;color:#202124;text-decoration:underline;text-decoration-color:#a86600;text-underline-offset:.12em;text-decoration-thickness:.035em}
#history{flex-shrink:0}
.history-entry{position:relative;margin:0 0 1.5rem;overflow:hidden;overflow-wrap:anywhere}
.history-entry:focus-visible{outline:2px solid #c88700;outline-offset:-2px}
.entry-surface{position:relative;background:#fff;min-height:4.5rem;touch-action:pan-y;transition:transform .3s cubic-bezier(.22,.61,.36,1);padding:.25rem 0}
.swiping .entry-surface{transition:none;will-change:transform}
.entry-meta,.entry-save-state{font-size:.875rem;color:#69717e;margin:0;line-height:1.5}
.entry-play,.entry-remove{min-height:44px;min-width:44px;font:inherit;border:0;cursor:pointer}
.entry-play{display:inline-flex;align-items:center;justify-content:center;vertical-align:.12em;background:transparent;color:#3950dd;font-size:.48em;width:1.7em;height:1.7em;line-height:1;margin-left:.25em;padding:0;border-radius:50%;letter-spacing:0;white-space:nowrap}
.entry-play:hover{background:#eff2f8}
.entry-play[aria-pressed="true"]{color:#a86600;background:#fff5d6}
.entry-play:disabled,.entry-remove:disabled{opacity:.5;cursor:default}
.entry-remove{position:absolute;right:0;top:0;bottom:0;width:72px;background:#d63232;color:white;display:flex;align-items:center;justify-content:center;visibility:hidden;pointer-events:none}
.entry-remove svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.delete-open .entry-remove,.swiping .entry-remove{visibility:visible}
.delete-open .entry-remove{pointer-events:auto}
.entry-save-state:empty{display:none}
.entry-save-state{display:block}
.no-transcript,.live-wait{font-size:1.125rem;line-height:1.7;color:#69717e}
#live-entry{flex-shrink:0;min-height:8rem;padding:.5rem 0}
#storage-note{font-size:.875rem;line-height:1.5;margin:.3rem 0 0;color:#923d10;flex-shrink:0}
.notice{color:#923d10;line-height:1.6;font-size:.875rem;margin:.5rem 0 0;flex-shrink:0;max-height:25vh;overflow:auto}
#reading-note{font-size:.875rem;line-height:1.5;margin:.3rem 0 0;color:#69717e;flex-shrink:0}
.mic-monitor{flex-shrink:0;margin-top:.35rem;line-height:1.5}
.mic-reading{display:flex;gap:.7rem;align-items:center;font-size:.875rem;color:#596779}
.mic-reading meter{appearance:none;width:5rem;height:.5rem;flex-shrink:0;background:#e6e9ef;border:0;border-radius:1rem;overflow:hidden}
.mic-reading meter::-webkit-meter-bar{background:#e6e9ef;border:0;border-radius:1rem}
.mic-reading meter::-webkit-meter-optimum-value{background:#3950dd;border-radius:1rem}
.mic-reading meter::-moz-meter-bar{background:#3950dd;border-radius:1rem}
.mic-name{display:block;font-size:.75rem;color:#69717e;overflow-wrap:anywhere}
.open-site{align-self:flex-start;flex-shrink:0;min-height:44px;padding:.65rem 0;color:#233ebd;font-size:1rem;font-weight:700}
.controls{flex-shrink:0}
.input-mode{display:flex;justify-content:center;gap:.2rem;border:0;padding:0;margin:0 auto .45rem}
.input-mode label{position:relative;cursor:pointer}
.input-mode input{position:absolute;opacity:0}
.input-mode span{display:block;padding:.45rem 1rem;border-radius:1.5rem;color:#596779;background:#f2f4f8;font-size:.875rem}
.input-mode input:checked+span{background:#e7ebff;color:#263dbe;font-weight:700}
.input-mode input:focus-visible+span{outline:3px solid #3950dd;outline-offset:2px}
.input-mode input:disabled+span{opacity:.55;cursor:default}
#one-sound-help{max-width:30rem;margin:0 auto .4rem;font-size:.75rem;color:#69717e;line-height:1.4;text-align:center}
.one-sound-badge{display:block;font-size:.7rem;color:#69717e;margin-bottom:.25rem}
.button-row{display:grid;grid-template-columns:1fr;gap:.7rem;max-width:24rem;margin:0 auto}
.button-row button{display:flex;align-items:center;justify-content:center;gap:.6rem;min-height:3.6rem;padding:.7rem 1rem;border-radius:.9rem;font-size:clamp(1rem,1.7vw,1.4rem);font-weight:700;cursor:pointer;border:0;touch-action:manipulation}
.button-row button:active:not(:disabled){transform:translateY(1px)}
.button-row svg{width:1.5rem;height:1.5rem;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.talk-button{background:#3950dd;color:#fff}
.talk-button:hover:not(:disabled){background:#2e43c5}
.talk-button .stop-icon{display:none;fill:currentColor;stroke:none}
.play-button{background:#eff2f8;color:#314466}
.play-button:hover:not(:disabled){background:#e2e9f8}
.play-button:disabled{color:#7a8495;background:#f5f6f8;cursor:default}
.play-button .play-icon path:first-child{fill:currentColor;stroke:none}
.play-button .pause-icon{display:none;stroke-width:4}
.talk-button:disabled{opacity:.65;cursor:wait}
.help{max-width:48rem;margin:.25rem auto 0;color:#69717e;font-size:.875rem;line-height:1.6}
.help summary{width:fit-content;min-height:28px;padding:.2rem 0;cursor:pointer}
.help[open]{max-height:24vh;overflow:auto}
.help p{margin:.4rem 0}
[data-phase="recording"] .record-indicator{display:flex}
[data-phase="recording"] .talk-button{background:#bd3650}
[data-phase="recording"] .talk-button:hover{background:#aa2c45}
[data-phase="recording"] .mic-icon{display:none}
[data-phase="recording"] .talk-button .stop-icon{display:block}
[data-phase="playing"] .play-icon{display:none}
[data-phase="playing"] .play-button .pause-icon{display:block}
[data-phase="playing"] .play-button{background:#e8efff;color:#3049ba}
@keyframes breathe{50%{opacity:.35}}
@media(max-width:650px){.app{gap:.5rem}.topbar{align-items:stretch;flex-direction:column;gap:.5rem}h1{font-size:.875rem}.reading-options span{padding:.4rem .2rem;font-size:.875rem}.button-row{gap:.5rem}.button-row button{padding:.6rem .3rem;gap:.35rem;font-size:.9375rem}.button-row svg{width:1.25rem;height:1.25rem}.record-indicator{font-size:.75rem}}
@media(max-height:500px) and (min-width:651px){.app{min-height:19rem;gap:.25rem}.button-row button{min-height:2.8rem}.help summary{min-height:24px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Keep the talk button on screen even when the shared site header is shown. */
body{height:100svh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
body>.pair-header{flex-shrink:0}
.app{flex:1 1 auto;width:100%;height:auto;min-height:0}

/* Ruby UI keeps its parent's size and reserves space above each line. */
.empty [data-memo-ui-ruby]{font-size:inherit;line-height:inherit;color:inherit}
[data-memo-ui-ruby] ruby{ruby-align:center;ruby-position:over}
[data-memo-ui-ruby] rt{font-size:.42em;line-height:1.2;font-weight:500;letter-spacing:.02em}
[data-reading="ruby"] .topbar h1{line-height:1.9;padding-top:.45em}
[data-reading="ruby"] .topbar .app-record-name{line-height:1.9!important;margin-top:.55em!important}
[data-reading="ruby"] .status{line-height:2;padding-top:.45em}
[data-reading="ruby"] #empty-title{line-height:1.8;padding-top:.45em}
[data-reading="ruby"] #empty-help{line-height:2.1;padding-top:.45em}
[data-reading="ruby"] #talk-label{line-height:1.7;padding-top:.35em}

/* 凸凹アプリ共通ルール：オーバースクロール（バウンス）をさせない（2026-10-12） */
html,body{overscroll-behavior:none}
