/* 話題交響曲 v3
   版面想法：一步一題。手機一次只問一件事，底部分頁；桌機是左設定右樂譜。 */
:root{
  --tabh:64px;
  --bg:#F5F6FA; --surface:#FFFFFF; --sunk:#EEF0F6;
  --ink:#1B1F3B; --muted:#5B6078; --line:#DADDE8; --ctl:#8C91A8;
  --accent:#CF2F4A; --accent-ink:#FFFFFF; --accent-soft:#FDE7EB; --accent-deep:#8E1B30;
  --sun:#FFE9A8; --sun-ink:#4A3600;
  --good:#1F7A55; --warn:#6B4A00; --warn-soft:#FFF4D1; --bad:#B3261E; --bad-soft:#FBE7E3;
  --shadow:0 1px 2px rgba(27,31,59,.06),0 8px 24px rgba(27,31,59,.06);
  --f-body:"Outfit","Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;
  --r:20px; --r-ctl:14px;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root{
    --bg:#14162A; --surface:#1E2140; --sunk:#272B4D;
    --ink:#F1F2F8; --muted:#A9AEC6; --line:#343A60; --ctl:#7C82A3;
    --accent:#FF8196; --accent-ink:#2A0A12; --accent-soft:#4A1F2C; --accent-deep:#FFC2CC;
    --sun:#5A4712; --sun-ink:#FFE9A8;
    --good:#7FD3A9; --warn:#F0C566; --warn-soft:#3D3212; --bad:#FF9B8E; --bad-soft:#43201C;
    --shadow:0 1px 2px rgba(0,0,0,.3);
    color-scheme:dark;
  }
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%;scroll-padding-top:72px}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:16px;line-height:1.6;padding-bottom:calc(var(--tabh) + env(safe-area-inset-bottom,0px))}
h1,h2,h3,p,ol,ul,dl,dd{margin:0}
h1,h2,h3{text-wrap:balance}
p,li,small{text-wrap:pretty}
button,input,select,textarea{font:inherit;color:inherit}
button{touch-action:manipulation}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip{position:absolute;left:-999px;top:8px;background:var(--accent);color:var(--accent-ink);padding:8px 14px;border-radius:8px;z-index:50}
.skip:focus{left:8px}
.noscript{padding:24px;text-align:center}

/* 外框 */
.top{position:sticky;top:0;z-index:20;background:var(--bg);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 20px;min-height:60px}
.brand{display:flex;align-items:baseline;gap:8px;text-decoration:none;color:var(--ink);min-height:44px;align-items:center}
.brand-it{font-weight:700;font-size:18px;color:var(--accent);line-height:1}
.brand-zh{font-weight:900;font-size:17px;letter-spacing:.04em;line-height:1.2}
.mechip{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 14px 0 6px;border:1.5px solid var(--line);border-radius:22px;background:var(--surface);color:var(--ink);text-decoration:none;font-size:15px;font-weight:700;max-width:46vw}
.mechip i{flex:none;width:30px;height:30px;border-radius:50%;background:var(--accent-soft);color:var(--accent-deep);display:flex;align-items:center;justify-content:center;font-style:normal;font-size:15px}
.mechip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;background:var(--surface);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom,0px)}
.tabs a{flex:1;min-width:0;height:var(--tabh);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-decoration:none;color:var(--muted);font-size:12px;font-weight:500;white-space:nowrap}
.tabs a svg{width:22px;height:22px;flex:none}
.tabs a[aria-current="page"]{color:var(--accent);font-weight:700}
main{max-width:1180px;margin:0 auto;padding:20px 24px 8px;display:flex;flex-direction:column;gap:20px;outline:none}
.foot{max-width:1180px;margin:0 auto;padding:16px 24px 24px;font-size:13px;color:var(--muted);display:flex;flex-direction:column;gap:4px}
.langs{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin-top:8px}
.langs button{min-height:44px;padding:0 12px;border:1.5px solid var(--line);border-radius:22px;background:var(--surface);color:var(--ink);font-size:14px;font-weight:500;cursor:pointer}
.langs button[aria-pressed=true]{border-color:var(--accent);color:var(--accent);font-weight:700}
html[lang=ja] body{font-family:"Outfit","Noto Sans JP","Hiragino Sans","Yu Gothic",sans-serif}
html[lang=en] .stephead h2{font-size:28px}
.only-desktop{display:none!important}
@media (min-width:900px){
  body{padding-bottom:0}
  .top{padding:10px 24px}
  .tabs{position:static;background:none;border:0;padding:0;gap:4px;margin-left:auto}
  .tabs a{flex:none;flex-direction:row;gap:8px;height:44px;padding:0 14px;border-radius:22px;font-size:15px}
  .tabs a svg{width:18px;height:18px}
  .tabs a:hover{background:var(--sunk);color:var(--ink)}
  .tabs a[aria-current="page"]{background:var(--accent-soft);color:var(--accent-deep)}
  .mechip{max-width:200px}
  main{padding:24px 24px 8px}
  .foot{padding:16px 24px 32px}
  .only-mobile{display:none!important}
  .only-desktop{display:flex!important}
}

/* 基本元件 */
.vhead{display:flex;flex-direction:column;gap:4px}
.vhead h1{font-weight:900;font-size:clamp(26px,5vw,34px);line-height:1.3}
.vhead p{color:var(--muted);max-width:40em}
.panel,.card{background:var(--surface);border-radius:var(--r);padding:18px;display:flex;flex-direction:column;gap:16px;min-width:0;box-shadow:var(--shadow)}
.panel>h2,.h2{font-size:20px;font-weight:900;line-height:1.35}
.panel>h2 small,.h2 small{display:block;font-weight:400;font-size:13px;color:var(--muted);margin-top:2px}
.h1{font-weight:900;font-size:26px;line-height:1.3}
.hint{font-size:13px;color:var(--muted)}
.banner{font-size:14px;background:var(--accent-soft);color:var(--ink);border-radius:var(--r-ctl);padding:12px 14px}
.banner a{color:var(--accent-deep);font-weight:700}
.banner.warn{background:var(--warn-soft);color:var(--ink)}
.empty{text-align:center;color:var(--muted);padding:20px 8px;display:flex;flex-direction:column;gap:10px;align-items:center}
.field{display:flex;flex-direction:column;gap:8px;min-width:0}
.field>label,.lab{font-size:14px;font-weight:700;color:var(--ink)}
.row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (max-width:520px){.row{grid-template-columns:minmax(0,1fr)}}
input[type=text],input[type=email],input[type=password],input[type=date],input[type=time],select,textarea{width:100%;min-width:0;max-width:100%;min-height:52px;padding:10px 16px;background:var(--surface);border:1.5px solid var(--ctl);border-radius:var(--r-ctl)}
/* iPhone 的日期與時間欄有自己的最小寬度，會撐破欄位，這裡把它壓回容器內 */
input[type=date],input[type=time]{-webkit-appearance:none;appearance:none;display:block;text-align:left}
input::-webkit-date-and-time-value{text-align:left;min-height:1.5em}
select{-webkit-appearance:none;appearance:none;padding-right:42px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238C91A8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center}
input.big{min-height:64px;padding:0 20px;border:2px solid var(--accent);border-radius:20px;font-size:22px;font-weight:700}
textarea{min-height:96px;resize:vertical;line-height:1.5;font-size:14px}
textarea[readonly]{background:var(--sunk);font-size:13px}
input[type=range]{width:100%;accent-color:var(--accent);min-height:32px;margin:0}
.rangehead{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.rangehead output{font-weight:700;color:var(--accent);font-size:14px;text-align:right}
.seg{display:flex;border:1.5px solid var(--ctl);border-radius:var(--r-ctl);overflow:hidden}
.seg label{flex:1;min-width:0;position:relative}
.seg input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.seg span{display:flex;align-items:center;justify-content:center;min-height:48px;padding:0 6px;font-size:15px;border-left:1.5px solid var(--ctl);white-space:nowrap}
.seg label:first-child span{border-left:0}
.seg input:checked+span{background:var(--ink);color:var(--bg);font-weight:700}
.seg input:focus-visible+span{outline:2px solid var(--accent);outline-offset:-3px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{position:relative}
.chip input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.chip span,.chipbtn{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border:1.5px solid var(--ctl);border-radius:22px;font-size:16px;font-weight:500;background:var(--surface);color:var(--ink);cursor:pointer;white-space:nowrap}
.chip input:checked+span{background:var(--ink);border-color:var(--ink);color:var(--bg);font-weight:700}
.chip input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
.chipbtn:hover{border-color:var(--accent);color:var(--accent)}
.optlist{display:flex;flex-direction:column;gap:8px}
.opt{position:relative}
.opt input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.opt span{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;padding:0 18px;border:1.5px solid var(--line);border-radius:18px;background:var(--surface);font-weight:500;cursor:pointer}
.opt input:checked+span{border:2px solid var(--ink);background:var(--sunk);font-weight:700;padding:0 17.5px}
.opt input:checked+span::after{content:"";flex:none;width:8px;height:15px;border:solid var(--ink);border-width:0 3px 3px 0;transform:rotate(45deg) translate(-3px,-2px)}
.opt input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 20px;border-radius:999px;border:1.5px solid var(--ctl);background:var(--surface);cursor:pointer;font-weight:700;text-decoration:none;color:var(--ink);white-space:nowrap}
.btn:hover{border-color:var(--accent);color:var(--accent)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.btn.primary:hover{filter:brightness(1.06);color:var(--accent-ink)}
.btn.ink{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.btn.ink:hover{filter:brightness(1.15);color:var(--bg)}
.btn.big{min-height:58px;font-size:18px}
.btn.danger{color:var(--bad);border-color:var(--bad)}
.btn.block{width:100%}
.btn.grow{flex:1.4}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn svg,.linkbtn svg,.iconbtn svg,.hint svg{flex:none}
.linkbtn{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 4px;border:0;background:none;color:var(--accent);font-size:15px;font-weight:700;cursor:pointer;align-self:center}
.iconbtn{flex:none;width:44px;height:44px;border:0;background:none;color:var(--ink);cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:50%;margin-left:-12px}
.tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.mini{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 16px;font-size:15px;font-weight:500;border:1.5px solid var(--line);border-radius:22px;background:var(--surface);color:var(--ink);cursor:pointer}
.mini:hover{border-color:var(--accent)}
.mini[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:700}
.mini.like{background:var(--accent-soft);border-color:var(--accent-soft);color:var(--accent-deep);font-weight:700}
.mini.like[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.sw{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;align-items:center;position:relative}
.sw input{position:absolute;opacity:0;width:44px;height:26px;margin:0;cursor:pointer}
.sw .track{width:44px;height:26px;border-radius:13px;background:var(--ctl);position:relative;transition:background .15s}
.sw .track::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:var(--surface);transition:transform .15s}
.sw input:checked+.track{background:var(--accent)}
.sw input:checked+.track::after{transform:translateX(18px)}
.sw input:disabled+.track{opacity:.45}
.sw input:focus-visible+.track{outline:2px solid var(--accent);outline-offset:2px}
.sw b{font-weight:500}
.sw small{grid-column:2;font-size:13px;color:var(--muted)}
details.more>summary{cursor:pointer;font-size:15px;color:var(--accent);min-height:44px;display:flex;align-items:center;font-weight:700}
details.more[open]>summary{margin-bottom:10px}
details.more>.stack{display:flex;flex-direction:column;gap:14px}
.stack{display:flex;flex-direction:column;gap:14px}
.pill{display:inline-flex;align-items:center;padding:2px 10px;border-radius:999px;font-size:13px;font-weight:700;border:1px solid currentColor;white-space:nowrap}
.pill.same{color:var(--good)} .pill.comp{color:var(--accent)} .pill.warm{color:var(--warn)}
.tags{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.tag{font-size:13px;padding:2px 10px;border-radius:11px;background:var(--sunk);color:var(--muted);font-weight:500}
.tag.cat{background:transparent;padding-left:0;padding-right:2px}
.tag.sens{background:var(--warn-soft);color:var(--warn)}
.tag.goal{background:var(--accent-soft);color:var(--accent-deep)}
.tag.day{background:var(--sun);color:var(--sun-ink);font-weight:700}
.toast{position:fixed;left:50%;bottom:calc(var(--tabh) + 16px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:10px 18px;border-radius:999px;font-size:14px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:40;max-width:90vw;text-align:center}
.toast.on{opacity:1}
@media (min-width:900px){.toast{bottom:24px}}

/* 今晚：一步一題 */
.tonight{display:flex;flex-direction:column;gap:20px}
.pane{display:flex;flex-direction:column;gap:20px;min-width:0}
.tonight[data-pane=setup] .pane-score{display:none}
.tonight[data-pane=score] .pane-setup{display:none}
.wiz{display:flex;flex-direction:column;gap:20px;min-width:0}
.wizbar{display:flex;align-items:center;gap:6px;min-height:48px}
.wizprog{flex:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.wizprog i{height:6px;border-radius:3px;background:var(--line)}
.wizprog i.on{background:var(--accent)}
.wizcount{font-size:14px;font-weight:500;color:var(--muted);font-variant-numeric:tabular-nums}
.step{display:flex;flex-direction:column;gap:18px;min-width:0}
.stephead{display:flex;flex-direction:column;gap:6px}
.stephead h2{font-weight:900;font-size:30px;line-height:1.3;overflow-wrap:anywhere}
.stephead p{color:var(--muted);font-size:15px}
.avatar{width:88px;height:88px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:40px;margin-bottom:14px}
.hint.lock{display:flex;align-items:center;gap:6px}
.bubble{align-self:flex-start;max-width:100%;background:var(--surface);border:1px solid var(--line);border-radius:20px 20px 20px 6px;padding:14px 18px;font-weight:500;overflow-wrap:anywhere}
.stepper{flex:1;min-width:0;list-style:none;margin:0;padding:0;display:flex;gap:6px}
.stepper li{flex:1;min-width:0;display:flex}
.stepper button{flex:1;min-width:0;display:flex;align-items:center;gap:6px;min-height:48px;padding:0 2px;border:0;border-bottom:3px solid var(--line);background:none;color:var(--muted);font-size:14px;font-weight:500;cursor:pointer}
.stepper i{flex:none;width:24px;height:24px;border-radius:50%;background:var(--line);color:var(--ink);display:flex;align-items:center;justify-content:center;font-style:normal;font-size:13px;font-weight:700}
.stepper i svg{width:14px;height:14px}
.stepper span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stepper .on button{color:var(--ink);font-weight:700;border-bottom-color:var(--accent)}
.stepper .on i{background:var(--accent);color:var(--accent-ink)}
.stepper .done button{color:var(--ink);border-bottom-color:var(--ink)}
.stepper .done i{background:var(--ink);color:var(--bg)}
/* 主要按鈕固定在畫面底部、分頁列上方，底色是實的，內容不會從後面透出來 */
.wiznav,.playbar{position:sticky;bottom:calc(var(--tabh) + env(safe-area-inset-bottom,0px));z-index:6;display:flex;gap:12px;margin:0 -24px;padding:12px 24px;background:var(--bg);border-top:1px solid var(--line)}
.wiznav .btn,.playbar .btn{flex:1}
@media (min-width:900px){.playbar{bottom:0;margin:0;padding:12px 0}}
.wiznote{text-align:center;font-size:13px;color:var(--muted)}
@media (max-width:899px){
  .wiz[data-step="1"] .step:not([data-step="1"]),
  .wiz[data-step="2"] .step:not([data-step="2"]),
  .wiz[data-step="3"] .step:not([data-step="3"]),
  .wiz[data-step="4"] .step:not([data-step="4"]){display:none}
}
@media (min-width:900px){
  .tonight{display:grid;grid-template-columns:minmax(0,420px) minmax(0,1fr);gap:24px;align-items:start}
  .tonight[data-pane] .pane{display:flex}
  .wiz{gap:28px}
  .stephead h2{font-size:22px}
  .avatar{width:56px;height:56px;font-size:26px;margin-bottom:8px}
}
.hub{display:flex;flex-direction:column;gap:12px;width:100%;max-width:560px;margin:0 auto}
.hub .vhead{margin-bottom:8px}
.hubcard{display:flex;align-items:center;gap:14px;min-height:88px;padding:14px 16px;border:0;border-radius:20px;background:var(--surface);color:var(--ink);font:inherit;text-align:left;text-decoration:none;cursor:pointer;box-shadow:var(--shadow)}
.hubcard>i{flex:none;width:48px;height:48px;border-radius:14px;background:var(--sunk);color:var(--ink);display:flex;align-items:center;justify-content:center}
.hubcard>span{flex:1;min-width:0}
.hubcard b{display:block;font-weight:900;font-size:18px;line-height:1.4}
.hubcard small{display:block;font-size:14px;color:var(--muted);line-height:1.5}
.hubcard>svg{flex:none;color:var(--muted)}
.hubcard.dark{background:var(--ink);color:var(--bg)}
.hubcard.dark>i{background:var(--accent);color:var(--accent-ink)}
.hubcard.now{background:var(--accent);color:var(--accent-ink)}
.hubcard.now>i{background:var(--accent-ink);color:var(--accent)}
.hubcard.dark small,.hubcard.dark>svg,.hubcard.now small,.hubcard.now>svg{color:inherit}
.hubnote{display:flex;align-items:center;gap:8px;min-height:48px;padding:0 6px;color:var(--ink);text-decoration:none;font-weight:500}
.hubnote span:nth-child(2){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hubnote svg{flex:none;color:var(--muted)}
.gh{display:flex;align-items:center;gap:10px}
.gh i{flex:none;width:36px;height:36px;border-radius:12px;background:var(--accent-soft);color:var(--accent-deep);display:flex;align-items:center;justify-content:center}
.gh i svg{width:20px;height:20px}
.mini.icon{width:44px;padding:0}
.mini svg{width:18px;height:18px;flex:none}
.addown{display:flex;flex-direction:column;gap:8px;margin-top:12px;padding:14px;border:1.5px dashed var(--ctl);border-radius:16px}
.addown .chipbtn{white-space:normal;text-align:left;min-height:44px;height:auto;padding:8px 14px}
.check{display:flex;align-items:flex-start;gap:10px;font-size:14px;cursor:pointer}
.check input{flex:none;width:22px;height:22px;margin:1px 0 0;accent-color:var(--accent)}
.scoretools .btn[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.scenes{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:8px}
.scene{display:flex;flex-direction:column;gap:4px;align-items:flex-start;text-align:left;min-height:92px;padding:12px 14px;border:1.5px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);cursor:pointer}
.scene:hover{border-color:var(--accent)}
.scene b{font-weight:700;font-size:16px;line-height:1.35}
.scene span{font-size:13px;color:var(--muted);line-height:1.45}
.quicklist{list-style:none;padding:0;display:flex;flex-direction:column;gap:12px}
.quicklist .q{font-size:18px;font-weight:500;line-height:1.5}
.pcard{background:var(--surface);border-radius:24px;padding:18px;display:flex;flex-direction:column;gap:16px;box-shadow:var(--shadow)}
.pcard>header{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.pcard .pname{font-weight:900;font-size:18px}
.pauto{font-size:13px;color:var(--accent);font-weight:500;text-align:right}
.placebox{display:flex;gap:8px}
.placebox input{flex:1;min-width:0}
.ptag{display:inline-flex;align-items:center;gap:4px;min-height:44px;padding:0 4px 0 14px;border-radius:22px;background:var(--accent-soft);color:var(--accent-deep);font-size:15px;font-weight:500}
.ptag button{width:40px;height:40px;border:0;background:none;cursor:pointer;color:inherit;font-size:18px;border-radius:50%}
.ptag button:hover{background:var(--surface)}

/* 樂譜 */
.scorehead{display:flex;align-items:center;gap:8px}
.scorehead>div{flex:1;min-width:0}
.scorehead .lab{font-size:13px;font-weight:500;color:var(--muted);display:block}
.hero{background:var(--ink);color:var(--bg);border-radius:24px;padding:20px;display:flex;flex-direction:column;gap:14px;min-width:0}
.hero .herotitle{display:block;font-weight:900;font-size:22px;line-height:1.35}
.hero .herosub{display:block;font-size:15px;font-weight:500;overflow-wrap:anywhere}
.herosegs{list-style:none;padding:0;display:flex;gap:4px;font-size:13px;line-height:1.4;font-variant-numeric:tabular-nums}
.herosegs li{min-width:max-content;display:flex;flex-direction:column}
.herosegs em{font-style:normal;font-weight:700;color:var(--sun)}
.curve svg{display:block;width:100%;height:56px}
.curve path{fill:none;stroke:var(--sun);stroke-width:3;stroke-linecap:round;vector-effect:non-scaling-stroke}
.curve line{stroke:currentColor;stroke-width:1;opacity:.28;vector-effect:non-scaling-stroke}
.herosegs b{display:block}
.herohint{font-size:13px}
.scoretools .btn{flex:1 1 auto}
.duo{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:baseline}
.duo .pair{font-size:22px;font-weight:900;line-height:1.3}
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.fact{background:var(--sunk);border-radius:var(--r-ctl);padding:10px 14px}
.fact dt{font-size:12px;color:var(--muted)} .fact dd{font-weight:500;font-size:15px}
.depth{display:flex;gap:4px;margin-top:4px}
.depth i{height:8px;flex:1;border-radius:4px;background:var(--line)}
.depth i.on{background:var(--accent)}
.goalbox{background:var(--sunk);border-radius:var(--r-ctl);padding:14px 16px;display:flex;flex-direction:column;gap:6px}
.goalbox h3{font-size:16px;font-weight:700}
.goalbox ol{padding-left:1.3em;display:flex;flex-direction:column;gap:2px}
.mvts{display:flex;flex-direction:column;gap:12px}
details.mvt>summary{list-style:none;cursor:pointer;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:4px 10px;min-height:64px;padding:10px 18px;border-radius:20px;background:var(--surface);box-shadow:var(--shadow)}
details.mvt>summary::-webkit-details-marker{display:none}
details.mvt>summary::after{content:"";width:9px;height:9px;border:solid var(--muted);border-width:0 2.5px 2.5px 0;transform:rotate(45deg) translate(-2px,-2px);transition:transform .15s}
details.mvt[open]>summary{background:none;box-shadow:none;padding:4px 2px;min-height:44px}
details.mvt[open]>summary::after{transform:rotate(-135deg) translate(-2px,-2px)}
.mvt .mvname b{font-weight:900;font-size:20px}
.mvt .it{font-size:14px;font-weight:500;color:var(--muted)}
.mvt .time{font-variant-numeric:tabular-nums;font-size:14px;font-weight:700;color:var(--accent);white-space:nowrap;text-align:right}
.mvt .count{display:block;font-weight:500;color:var(--muted)}
details.mvt[open] .count{display:none}
.mvt .goal{font-size:14px;color:var(--muted);padding:0 2px}
.mvt ol{list-style:none;padding:0;display:flex;flex-direction:column;gap:12px;margin-top:12px}
.topic{background:var(--surface);border-radius:20px;padding:16px;display:flex;flex-direction:column;gap:6px;box-shadow:var(--shadow)}
.topic .tt{font-size:18px;line-height:1.4}
.tt{font-weight:700}
.aiq{background:var(--accent-soft);border-radius:var(--r-ctl);padding:10px 12px;font-size:15px;display:flex;flex-direction:column;gap:2px}
.aiq small{font-size:12px;font-weight:700;color:var(--accent-deep)}
.rate{display:flex;gap:8px;flex-wrap:wrap}
.topic .rate{padding-top:6px}
.minegrp{display:flex;flex-direction:column;gap:8px}
.minegrp>.why{font-size:14px;color:var(--muted)}
.lvl{align-self:flex-start;font-size:13px;font-weight:700;padding:2px 10px;border-radius:11px;white-space:nowrap}
.lvl.bad{background:var(--ink);color:var(--bg)} .lvl.warn{background:var(--sun);color:var(--sun-ink)}
.minechips{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.minechips li{padding:8px 14px;border-radius:18px;background:var(--accent-soft);color:var(--accent-deep);font-size:15px;font-weight:500}
.mines{list-style:none;padding:0;display:flex;flex-direction:column;gap:8px}
.mines li{display:flex;flex-direction:column;gap:2px;padding:10px 14px;border-radius:var(--r-ctl);background:var(--warn-soft)}
.mines li b{font-weight:700}
.mines .why{font-size:14px;color:var(--muted)}
.mines.bad li{background:var(--accent-soft)}
.rescue{padding-left:1.2em;display:flex;flex-direction:column;gap:6px}

/* 播放畫面 */
body.playing{background:#0B0C12;padding-bottom:0}
body.playing .top,body.playing .tabs,body.playing .foot{display:none}
.play{--bg:#0B0C12;--surface:#161824;--sunk:#1F2233;--ink:#F4F1EA;--muted:#A9AEC6;--line:#2C3048;--ctl:#6E7494;--accent:#FF8196;--accent-ink:#2A0A12;--accent-soft:#3A1A24;--accent-deep:#FFC2CC;--sun:#FFE9A8;--sun-ink:#4A3600;--shadow:none;
  color:var(--ink);width:100%;max-width:640px;margin:0 auto;min-height:calc(100dvh - 48px);display:flex;flex-direction:column;gap:18px}
.playtop{display:flex;align-items:center;justify-content:space-between;gap:12px}
.playtop .clock{font-size:20px;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums}
.playdots{display:flex;gap:4px}
.playdots i{flex:1;height:5px;border-radius:3px;background:var(--line)}
.playdots i.done{background:var(--muted)}
.playdots i.on{background:var(--sun)}
.playmv{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;font-size:14px;color:var(--muted)}
.playmv b{font-size:18px;font-weight:900;color:var(--sun)}
.play .bigq{flex:1;display:flex;align-items:center;min-height:180px;font-size:clamp(28px,7.6vw,40px);line-height:1.4;font-weight:700}
.playtime{display:flex;flex-direction:column;gap:8px;font-size:14px;color:var(--muted)}
.play .progress i{background:var(--sun)}
.play .btn.primary,.play .stars button[aria-pressed=true]{background:var(--sun);border-color:var(--sun);color:var(--sun-ink)}
.play .stars button[aria-pressed=true] small{color:var(--sun-ink)}
.play .lab{color:var(--muted);font-weight:500}

/* 播放結束後的評分 */
.live{max-width:640px;margin:0 auto;width:100%;display:flex;flex-direction:column;gap:16px}
.progress{height:6px;border-radius:3px;background:var(--line);overflow:hidden}
.progress i{display:block;height:100%;background:var(--accent)}
.livecard{background:var(--surface);border-radius:24px;padding:22px 20px;display:flex;flex-direction:column;gap:14px;min-height:260px;box-shadow:var(--shadow)}
.livecard .mvchip{display:flex;justify-content:space-between;gap:8px;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.livecard .mvchip b{font-size:15px;color:var(--accent);font-weight:700;line-height:1}
.livecard h2{font-size:15px;font-weight:700;color:var(--muted)}
.livecard .bigq{font-size:clamp(22px,5.6vw,28px);line-height:1.5;font-weight:700}
.stars{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.stars button{min-height:56px;border:1.5px solid var(--ctl);border-radius:var(--r-ctl);background:var(--surface);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:700;line-height:1.2}
.stars button small{font-weight:400;font-size:11px;color:var(--muted)}
.stars button[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.stars button[aria-pressed=true] small{color:var(--accent-ink)}
.livenav{display:grid;grid-template-columns:1fr 2fr;gap:8px}
.jumplist{list-style:none;padding:0;display:flex;flex-direction:column}
.jumplist button{width:100%;text-align:left;min-height:44px;padding:8px 4px;border:0;border-top:1px solid var(--line);background:none;cursor:pointer;display:flex;justify-content:space-between;gap:8px}
.jumplist button[aria-current=true]{color:var(--accent);font-weight:700}
.jumplist span.sc{color:var(--muted);font-size:13px;white-space:nowrap}

/* 清單型頁面 */
.list{list-style:none;padding:0;display:flex;flex-direction:column}
.list>li{padding:14px 0;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:8px}
.list>li:first-child{border-top:0;padding-top:0}
.rowhead{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
.rowhead b{font-size:16px}
.meta{font-size:13px;color:var(--muted)}
details.sess>summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:8px;align-items:baseline;min-height:44px}
details.sess>summary::-webkit-details-marker{display:none}
details.sess>summary .who{font-weight:700}
details.sess[open]>summary{margin-bottom:8px}
.scorepill{font-weight:700;color:var(--accent);white-space:nowrap;font-variant-numeric:tabular-nums}
table.board{width:100%;border-collapse:collapse;font-size:14px}
table.board th{font-size:12px;color:var(--muted);font-weight:500;text-align:left;padding:6px 4px;border-bottom:1px solid var(--line)}
table.board td{padding:8px 4px;border-bottom:1px solid var(--line);vertical-align:top}
table.board td.num,table.board th.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.tablewrap{overflow-x:auto}
.grid2{display:grid;gap:20px;grid-template-columns:minmax(0,1fr)}
@media (min-width:900px){.grid2{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}
.steps{padding-left:1.3em;display:flex;flex-direction:column;gap:4px;font-size:15px}
.heat{list-style:none;padding:0;display:flex;flex-direction:column}
.heat li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;padding:12px 0;border-top:1px solid var(--line);align-items:center}
.heat .name{font-weight:700;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.heat .barwrap{grid-column:1/-1;height:8px;border-radius:4px;background:var(--sunk);overflow:hidden;display:flex}
.heat .barwrap i{display:block;height:100%}
.heat .barwrap .h{background:var(--accent)} .heat .barwrap .k{background:var(--ink)}
.votes{display:flex;gap:6px}
.vote{min-height:44px;padding:0 12px;border-radius:22px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}
.vote[aria-pressed=true].hot{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:700}
.vote[aria-pressed=true].risky{background:var(--ink);border-color:var(--ink);color:var(--bg);font-weight:700}
.legend{display:flex;flex-wrap:wrap;gap:14px;font-size:13px;color:var(--muted)}
.legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
/* 日文標題只在詞的邊界換行。播放畫面的提示訊息移到上方，不擋評分按鈕 */
html[lang="ja"] .scorehead .h1{word-break:keep-all;overflow-wrap:anywhere}
body.playing .toast{bottom:auto;top:calc(10px + env(safe-area-inset-top,0px))}
/* 深色模式的樂譜總覽維持深底，曲線用亮色 */
@media (prefers-color-scheme:dark){
  .hero{background:#0B0C12;color:#F4F1EA;box-shadow:inset 0 0 0 1px var(--line)}
  .hero .curve path{stroke:#FFE9A8}
  .hero .herosegs em{color:#FFE9A8}
}
/* 很窄的手機，「改設定」只留圖示，標題才不會被擠成一字一行 */
@media (max-width:359px){.scorehead .btn{font-size:0;gap:0;padding:0 13px}}
/* 看對方心情聊 */
.scenes.moods .scene i{width:36px;height:36px;border-radius:12px;background:var(--accent-soft);color:var(--accent-deep);display:flex;align-items:center;justify-content:center;margin-bottom:4px}
ol.teach{list-style:none;padding:0;display:flex;flex-direction:column;gap:12px;counter-reset:teach}
ol.teach li{counter-increment:teach;display:grid;grid-template-columns:28px 1fr;column-gap:10px;row-gap:2px}
ol.teach li::before{content:counter(teach);grid-row:1/3;width:28px;height:28px;border-radius:50%;background:var(--ink);color:var(--bg);font-weight:700;font-size:14px;display:flex;align-items:center;justify-content:center}
ol.teach li b{font-weight:700;line-height:1.5}
ol.teach li span{font-size:15px;color:var(--muted);line-height:1.6}
.sign{font-size:15px;line-height:1.6;background:var(--sunk);border-radius:var(--r-ctl);padding:10px 14px}
.sign b{display:block;font-size:13px;color:var(--muted);font-weight:500}
.care{font-size:14px;line-height:1.6;background:var(--warn-soft);border-radius:var(--r-ctl);padding:10px 14px}
.listhead{font-size:16px;font-weight:700}
.panel.teach h3{font-size:14px;font-weight:700}
.panel.teach details.more[open]{display:flex;flex-direction:column;gap:12px}
/* 播放畫面：下一題預告、換心情、鎖定畫面 */
.nextq{display:flex;gap:10px;align-items:baseline;font-size:15px;color:var(--muted);line-height:1.5}
.nextq b{flex:none;font-size:12px;font-weight:700;color:var(--sun);border:1px solid currentColor;border-radius:999px;padding:1px 8px;white-space:nowrap}
.nextq span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.moodbar{display:flex;flex-wrap:wrap;gap:8px}
.moodbar .btn{flex:1 1 auto}
.moodpick{display:flex;flex-direction:column;gap:10px;background:var(--surface);border-radius:16px;padding:14px}
.lockrow{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--muted);line-height:1.5}
.lockrow span{flex:1;display:flex;gap:8px;align-items:flex-start}
.lockrow svg{flex:none;margin-top:2px}
.play .care{background:#3D3212;color:var(--ink)}
.play .moodbar .btn{white-space:normal;line-height:1.3;padding-top:8px;padding-bottom:8px}
/* 隱私模式 */
.unlock{display:flex;flex-direction:column;gap:8px}
.lockpanel{border:1.5px solid var(--ink)}
/* 手機播放器的啟動卡片 */
.lockcard{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:16px;background:var(--surface);border:1.5px solid var(--line)}
.lockcard.on{border-color:var(--sun)}
.lockcard>i{flex:none;width:40px;height:40px;border-radius:12px;background:var(--sunk);color:var(--muted);display:flex;align-items:center;justify-content:center}
.lockcard.on>i{background:var(--sun);color:var(--sun-ink)}
.lockcard>span{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.lockcard b{font-size:15px;font-weight:700;line-height:1.4}
.lockcard small{font-size:12.5px;color:var(--muted);line-height:1.5}
.lockcard .btn{flex:none;min-height:40px;padding:0 14px}
/* 首頁的故事卡、關於我們 */
.storycard{display:flex;align-items:center;gap:14px;padding:10px;border-radius:20px;background:var(--surface);box-shadow:var(--shadow);text-decoration:none;color:var(--ink)}
.storycard img{flex:none;width:96px;height:72px;object-fit:cover;border-radius:14px}
.storycard span{flex:1;min-width:0}
.storycard b{display:block;font-weight:700;font-size:16px;line-height:1.4}
.storycard small{display:block;font-size:13px;color:var(--muted);line-height:1.5}
.storycard>svg{flex:none;color:var(--muted);margin-right:6px}
.about,.plans{width:100%;max-width:760px;margin:0 auto;display:flex;flex-direction:column;gap:18px}
.abouthero{border-radius:24px;overflow:hidden;background:var(--surface);box-shadow:var(--shadow)}
.abouthero img,.story img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover}
.abouthero div{padding:18px 20px 22px}
.abouthero h1{font-weight:900;font-size:clamp(26px,5.6vw,36px);line-height:1.3}
.abouthero p{font-size:16px;line-height:1.75;color:var(--muted);margin-top:8px;max-width:34em}
.story{display:grid;border-radius:20px;overflow:hidden;background:var(--surface);box-shadow:var(--shadow)}
.story div{padding:16px 18px 20px}
.story h3{font-size:18px;font-weight:900;margin-bottom:6px}
.story p{font-size:16px;line-height:1.85}
.story.quote{background:var(--sun);color:var(--sun-ink)}
@media (min-width:760px){.story:not(.quote){grid-template-columns:5fr 6fr;align-items:center}}
/* 方案與費用 */
.plangrid{display:grid;gap:12px;grid-template-columns:minmax(0,1fr)}
@media (min-width:760px){.plangrid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.plan{display:flex;flex-direction:column;gap:8px;padding:18px;border-radius:20px;background:var(--surface);box-shadow:var(--shadow);border:1.5px solid transparent}
.plan header{display:flex;justify-content:space-between;align-items:center;gap:8px}
.plan h3{font-size:18px;font-weight:900}
.plan .price{font-size:24px;font-weight:900;line-height:1.3}
.plan.plus{border-color:var(--accent)}
.plans details.more{border-top:1px solid var(--line);padding:10px 0}
.plans details.more:first-of-type{border-top:0}
.plans details.more p{font-size:15px;color:var(--muted);line-height:1.7;padding-top:6px}
/* AI 助手的分頁與 AI 記憶 */
.aitabs .chipbtn[aria-selected=true]{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.aipanel{max-width:760px}
.insight{display:flex;flex-direction:column;gap:10px}
.ilist{list-style:none;padding:0;display:flex;flex-direction:column}
.ilist li{display:grid;grid-template-columns:1fr auto;gap:2px 12px;align-items:center;padding:8px 0;border-top:1px solid var(--line)}
.iname{font-weight:700}
.iname small{font-weight:400;color:var(--muted);font-size:12px;margin-left:8px}
.ibar{display:flex;gap:3px}
.ibar i{width:14px;height:8px;border-radius:4px;background:var(--line)}
.ibar i.on{background:var(--accent)}
.inote{grid-column:1/-1;font-size:13px;color:var(--muted)}
.sign .inote{display:block}
.sign a{display:inline-block;color:var(--accent-deep);font-weight:700;font-size:14px}
.footlinks{display:flex;flex-wrap:wrap;gap:6px 18px}
.footlinks a{color:var(--ink);font-weight:500}
/* 換頁時把焦點移到主要內容，但不需要畫出外框 */
main:focus-visible{outline:none}
html[lang="ja"] .vhead h1{word-break:keep-all;overflow-wrap:anywhere}
/* 會員與條款 */
.acct,.legal{width:100%;max-width:760px;margin:0 auto;display:flex;flex-direction:column;gap:18px}
.kv{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;font-size:15px}
.kv dt{color:var(--muted)}
.kv dd{font-weight:500;overflow-wrap:anywhere}
.codebox input{font-size:24px;font-weight:700;letter-spacing:.3em;text-align:center;font-variant-numeric:tabular-nums}
.legal h2{font-size:17px;font-weight:900;margin-top:6px}
.legal p,.legal li{font-size:15px;line-height:1.85}
.legal ul{padding-left:1.3em;display:flex;flex-direction:column;gap:4px}
.legal .panel{gap:10px}
.acct .tools .btn,.plans .tools .btn{white-space:normal;line-height:1.35;padding-top:8px;padding-bottom:8px;text-align:center}
