:root{color-scheme:light;--paper:#fbf4e6;--ink:#2f3b52;--teal:#1b6f75;--sea:#e3f2f1;--line:#dadacb;--muted:#4a5667;--red:#9a3343;font-family:"Yu Gothic",Meiryo,sans-serif;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button,a{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}a{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #cc7336;outline-offset:4px}.private{background:var(--ink);color:#fff;text-align:center;padding:9px 14px;font-size:12px;line-height:1.6}header{max-width:1080px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:24px}.wordmark{font-family:"Yu Mincho",serif;font-size:30px;font-weight:700;text-decoration:none;letter-spacing:.12em;display:flex;align-items:baseline;gap:12px}.wordmark span,.version{font-size:11px;letter-spacing:.04em;font-family:"Yu Gothic",sans-serif;font-weight:400}.intro{max-width:1032px;margin:20px auto 30px;padding:0 24px}.invitation{color:var(--teal);font-size:13px}h1{font-family:"Yu Mincho",serif;font-size:clamp(26px,4vw,40px);line-height:1.5;margin:10px 0;font-weight:700}.intro>p:last-child{font-size:14px;line-height:1.8;color:var(--muted)}.workspace{max-width:1000px;margin:0 auto;padding:0 24px;display:grid;grid-template-columns:minmax(0,400px) minmax(0,1fr);gap:60px;align-items:start}.stage{position:relative;aspect-ratio:9/16;background:var(--sea);overflow:hidden;border-radius:6px;box-shadow:0 8px 32px #2f3b5212}.stage canvas,.stage video{display:block;width:100%;height:100%;object-fit:contain}#playback{position:absolute;inset:0;background:#10151a}#stage-label{position:absolute;top:16%;left:8%;right:8%;text-align:center;background:#fbf4e6eb;color:var(--ink);font-size:11px;padding:6px 8px;border-radius:3px}#countdown{position:absolute;inset:0;display:grid;place-items:center;background:#2f3b522e;color:white;font-size:96px;font-weight:700;text-shadow:0 2px 20px #0008}.steps{padding:0;margin:0 0 24px;list-style:none;display:flex;border-bottom:1px solid var(--line);gap:24px}.steps li{padding:10px 0 14px;font-size:13px;color:var(--muted)}.steps li[aria-current]{border-bottom:3px solid var(--teal);font-weight:700;color:var(--teal)}#status{font-size:15px;line-height:1.9;min-height:3em}#error{border-left:3px solid var(--red);padding:12px;background:#fff2ed;color:#732331;font-size:14px;line-height:1.8}.check{display:flex;align-items:flex-start;gap:10px;font-size:13px;line-height:1.8;margin:18px 0}.check input{width:20px;height:20px;flex-shrink:0;margin:2px 0;accent-color:var(--teal)}label{display:block;font-size:13px;line-height:1.8}.settings-row{display:grid;grid-template-columns:1.4fr 1fr;gap:16px;margin:20px 0}select,input[type=number],textarea{display:block;background:#fffdf8;border:1px solid var(--line);border-radius:4px;padding:12px;color:var(--ink);width:100%;min-width:0;font-size:16px}textarea{font-size:13px;resize:vertical;margin:8px 0 12px;line-height:1.7}.primary,.secondary{display:block;width:100%;border:1px solid var(--teal);border-radius:4px;text-align:center;padding:14px 12px;min-height:50px;margin:12px 0;text-decoration:none;font-size:15px;line-height:1.5}.primary{background:var(--teal);color:white}.primary:hover{background:#15595e}.secondary{background:transparent;color:var(--teal)}.secondary:hover{background:var(--sea)}.text-button{background:none;border:0;color:var(--teal);text-decoration:underline;text-underline-offset:4px;padding:12px 0;min-height:48px;display:block}.hint{font-size:12px;line-height:1.9;color:var(--muted)}.slider-label{margin:20px 0}.slider-label output{float:right}input[type=range]{display:block;width:100%;accent-color:var(--teal);min-height:36px}.record::before{content:"";display:inline-block;width:11px;height:11px;background:#fff;border-radius:50%;margin-right:10px}#elapsed{font-size:28px;font-variant-numeric:tabular-nums}progress{width:100%;height:8px;accent-color:var(--teal)}details{margin-top:28px;border-top:1px solid var(--line);padding-top:18px;font-size:12px;line-height:1.9}summary{cursor:pointer;padding:6px 0;min-height:40px}#diagnostics,#file-info{overflow-wrap:anywhere;font-size:12px;color:var(--muted)}footer{text-align:center;font-size:12px;line-height:2;color:var(--muted);padding:48px 20px}
@media(max-width:700px){header{padding:16px 20px}.wordmark{font-size:25px}.wordmark span{font-size:10px}.intro{margin:10px auto 18px;padding:0 20px}.intro p{margin:6px 0}.workspace{display:flex;flex-direction:column;gap:22px;padding:0 20px}.stage{width:min(100%,320px);align-self:center}.panel{width:100%}.steps{margin-bottom:16px}.private{font-size:11px}.version{font-size:10px}footer{padding-top:28px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.song-picker{border:0;padding:0;margin:20px 0}.song-picker legend{font-size:13px;margin-bottom:8px}.song-picker label{border:1px solid var(--line);border-radius:4px;padding:12px;margin:8px 0;cursor:pointer}.song-picker label:has(input:checked){border-color:var(--teal);background:var(--sea)}.song-picker input{accent-color:var(--teal);margin-right:10px}.song-picker small{display:block;padding-left:27px;color:var(--muted)}.lyric-card{background:var(--sea);padding:16px;border-radius:4px;margin-top:18px}.lyric-label{font-size:11px;color:var(--teal);margin:0}#lyric-current{font-size:19px;font-weight:700;line-height:1.6;white-space:pre-line;margin:8px 0;color:var(--teal)}#lyric-next{font-size:12px;white-space:pre-line;margin:10px 0 0;line-height:1.6}.stage{max-width:400px}

/* One screen, one main action. Camera is shown only after setup. */
#flow-heading{grid-column:1/-1;font-size:23px;line-height:1.5;margin:0;outline:none}.workspace{row-gap:16px}.number{display:inline-grid;place-items:center;width:27px;height:27px;background:var(--teal);color:#fff;border-radius:50%;margin-right:10px;font-size:15px}.song-picker legend,.setup-step h3{font-size:16px;font-weight:700;margin:0 0 12px}.setup-step{border-top:1px solid var(--line);padding-top:20px;margin-top:24px}.setup-step .check{margin:12px 0}.settings-row{margin:12px 0 20px}#status{min-height:0;margin:0 0 18px}#adjustments{margin-top:16px}#ready-controls>.text-button{margin:auto}.stage{scroll-margin-top:12px}body[data-phase=idle] .stage,body[data-phase=preparing] .stage{display:none}body[data-phase=idle] .workspace,body[data-phase=preparing] .workspace{display:block;max-width:600px}body[data-phase=idle] #flow-heading,body[data-phase=preparing] #flow-heading{margin-bottom:12px}body:not([data-phase=idle]):not([data-phase=preparing]) header,body:not([data-phase=idle]):not([data-phase=preparing]) .intro{display:none}body:not([data-phase=idle]):not([data-phase=preparing]) .workspace{margin-top:16px}body[data-phase=ready] #lyrics{display:none}body[data-phase=countdown] #status,body[data-phase=recording] #status{display:none}
@media(max-width:700px){.workspace{gap:12px}#flow-heading{font-size:20px;align-self:flex-start}.stage{width:min(100%,calc(52svh * 9 / 16))}body[data-phase=ready] .panel #status{font-size:13px;line-height:1.6;margin:0 0 8px}#ready-controls .record{margin:0 0 4px}body[data-phase=countdown],body[data-phase=recording]{padding-bottom:145px}#record-controls{position:fixed;z-index:3;bottom:0;left:0;width:100%;padding:10px 20px max(12px,env(safe-area-inset-bottom));background:var(--paper);border-top:1px solid var(--line)}#record-controls #elapsed{font-size:18px;margin:0 0 6px}#record-controls .primary{margin:8px 0 0}.intro{margin-bottom:20px}body[data-phase=review] .stage{width:min(100%,calc(55svh * 9 / 16))}}

/* Optional illustrated posting help, kept closed until requested. */
#posting-help{margin:20px 0 10px;padding:0;border:1px solid var(--line);border-radius:6px;background:#fffdf8}#posting-help>summary{padding:12px 14px;min-height:48px;color:var(--teal);font-size:13px;font-weight:700}.posting-guide{padding:0 14px 14px}.guide-notice{padding:12px;background:var(--sea);font-size:12px;line-height:1.8;border-radius:4px}.guide-steps{list-style:none;counter-reset:guide;padding:0;margin:20px 0}.guide-steps>li{counter-increment:guide;margin:0 0 24px}.guide-steps h3{font-size:15px;line-height:1.7;margin:0 0 12px}.guide-steps h3::before{content:counter(guide);display:inline-grid;place-items:center;width:24px;height:24px;margin-right:8px;border-radius:50%;background:var(--teal);color:white;font-size:13px}.guide-steps p{font-size:13px;line-height:1.9;margin:10px 0}.guide-steps p.hint{font-size:12px}.guide-steps svg{display:block;width:100%;height:auto;max-width:400px;margin:auto;background:var(--paper);border-radius:6px}.guide-steps svg text{font-family:"Yu Gothic",Meiryo,sans-serif;font-size:13px;fill:var(--ink)}.guide-screen{fill:#fffdf8;stroke:var(--line);stroke-width:1.5}.guide-video{fill:var(--sea)}.guide-placeholder{fill:#eeeae1}.guide-accent{fill:var(--teal)}.guide-steps svg .guide-white{fill:white;font-size:12px}.guide-arrow{fill:none;stroke:var(--teal);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.guide-selected,.guide-field{stroke:var(--teal);stroke-width:2}.guide-field{fill:#fffdf8}.guide-steps svg .guide-emphasis{fill:var(--teal);font-weight:700}.guide-steps svg .guide-tag{fill:var(--teal);font-size:21px;font-weight:700}

/* One movable guide: before setup, before recording, and directly before sharing. */
#posting-tools{margin:12px 0 16px;border:1px solid #90b9b7;border-radius:6px;background:#fffdf8;overflow:hidden}#posting-tools #posting-help{margin:0;border:0;border-radius:0;background:var(--sea)}#posting-tools #posting-help>summary{font-size:14px;padding:13px 14px}#posting-tools .posting-guide{background:#fffdf8;padding-top:1px}.hashtag-row{padding:10px 14px 0}.hashtag-row>label{font-size:11px;color:var(--muted)}.hashtag-actions{display:flex;gap:8px;align-items:center;margin-top:5px}.hashtag-actions input{width:0;min-width:0;flex:1;background:transparent;border:0;font-size:16px;font-weight:700;color:var(--teal);padding:8px 0}.hashtag-actions button{flex:0 0 128px;min-height:42px;padding:7px 8px;font-size:12px;border:1px solid var(--teal);border-radius:4px;background:#fffdf8;color:var(--teal)}#hashtag-status{min-height:20px;font-size:11px;line-height:20px;margin:2px 0 0}#posting-ready #posting-tools{margin-top:8px}

/* Keep the retry choice immediately below playback; show sharing only on request. */
#review-controls>#retake{font-weight:700;border-width:2px}#review-controls>#proceed-post{margin-bottom:16px}.hashtag-actions{flex-wrap:wrap}.hashtag-actions input{flex:1 1 100%;width:100%;font-size:14px}.hashtag-actions button{margin-left:auto}#post-actions{scroll-margin-top:16px}

/* The singing cue follows the audio clock and overlays the preview without reflow. */
#sing-cue{position:absolute;z-index:2;left:12%;right:12%;top:43%;padding:10px 8px 12px;border-radius:12px;text-align:center;background:#fbf4e6ed;color:var(--teal);pointer-events:none;box-shadow:0 2px 14px #2f3b5220}#sing-cue-label{display:block;font-size:13px;font-weight:700}#sing-cue-value{display:block;font-size:clamp(30px,9vw,56px);line-height:1.2;font-variant-numeric:tabular-nums}

/* Capture identity fields */
.capture-options>label{display:block;margin:14px 0}.capture-options input[type=text]{display:block;box-sizing:border-box;width:100%;min-height:44px;margin-top:8px;padding:10px;border:1px solid #c7d3cb;border-radius:6px;font:inherit}.capture-options .check{display:flex;align-items:center;gap:10px}

/* Larger preview and thinner band for groups; preserve the entire camera frame. */
.workspace{max-width:1140px;grid-template-columns:minmax(0,500px) minmax(0,1fr);column-gap:36px}.stage{max-width:500px}
body[data-phase=ready] #lyrics{display:block}
@media(max-width:700px){.stage{width:min(100%,calc(72svh * 9 / 16));max-width:100%}body[data-phase=review] .stage{width:min(100%,calc(72svh * 9 / 16))}}

/* Optional trial is an action, not a length option. */
.trial-step{margin:18px 0 26px;padding:18px;border:1px solid var(--line);border-radius:8px;background:#fffdf8}.trial-step h3{font-size:16px;margin:0 0 8px}.trial-step p{margin:8px 0}.capture-page>header{padding:16px 20px}.capture-page .intro{padding:18px 20px 20px;max-width:1032px}.capture-page .intro h1{overflow-wrap:anywhere}

/* Optional camera/audio checks stay closed until requested. */
.trial-step{padding:12px 16px;margin:12px 0 20px}.trial-step summary{cursor:pointer;font-weight:600}.trial-step:not([open]){background:transparent}.trial-step[open] summary{margin-bottom:12px}
