:root{color-scheme:light;--ink:#17212b;--muted:#65717d;--paper:#f4f7f6;--surface:#fff;--line:#d9e2df;--green:#176b52;--green-light:#dcefe7;--coral:#de654d;--yellow:#f0c34e;--blue:#3274a8;--shadow:0 12px 36px rgba(23,33,43,.1);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
*{box-sizing:border-box}html,body{min-height:100%;margin:0}body{background:var(--paper);color:var(--ink);letter-spacing:0}button,select,input{font:inherit}button{-webkit-tap-highlight-color:transparent}
.app-header{align-items:center;background:rgba(255,255,255,.94);border-bottom:1px solid var(--line);display:flex;height:72px;justify-content:space-between;padding:max(12px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) 12px max(20px,env(safe-area-inset-left))}
.brand{align-items:center;color:var(--ink);display:inline-flex;font-size:18px;font-weight:750;gap:10px;text-decoration:none}.brand img{flex:0 0 44px}.icon-button{align-items:center;background:transparent;border:0;color:var(--ink);cursor:pointer;display:inline-flex;font-size:26px;height:44px;justify-content:center;width:44px}
.icon-button:focus-visible,.primary-button:focus-visible,.mode-button:focus-visible,.save-button:focus-visible{outline:3px solid var(--yellow);outline-offset:3px}.app-shell{margin:0 auto;max-width:1040px;min-height:calc(100vh - 72px);padding:28px max(20px,env(safe-area-inset-right)) max(36px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))}
.companion-stage{align-items:center;display:flex;flex-direction:column;justify-content:center;min-height:min(570px,64vh);text-align:center}.status-line{align-items:center;color:var(--muted);display:flex;font-size:15px;gap:8px;min-height:24px}.status-dot{background:#9aa5ae;border-radius:50%;height:10px;width:10px}
body[data-state=listening] .status-dot{animation:pulse 1.4s infinite;background:var(--green)}body[data-state=thinking] .status-dot{animation:pulse .7s infinite;background:var(--yellow)}body[data-state=speaking] .status-dot{animation:pulse .9s infinite;background:var(--coral)}
.voice-visual{align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:50%;box-shadow:var(--shadow);display:flex;gap:7px;height:148px;justify-content:center;margin:26px 0;width:148px}.voice-visual span{background:var(--green);border-radius:5px;display:block;height:24px;width:7px}body[data-state=listening] .voice-visual span,body[data-state=speaking] .voice-visual span{animation:voice-wave .9s ease-in-out infinite alternate}.voice-visual span:nth-child(2){animation-delay:.12s!important;background:var(--blue)}.voice-visual span:nth-child(3){animation-delay:.24s!important;background:var(--coral)}.voice-visual span:nth-child(4){animation-delay:.36s!important;background:var(--yellow)}.voice-visual span:nth-child(5){animation-delay:.48s!important}
.reply{font-size:clamp(24px,3.4vh,36px);font-weight:720;line-height:1.45;margin:0;max-width:780px;min-height:104px;overflow-wrap:anywhere}.heard{color:var(--muted);font-size:16px;line-height:1.6;margin:12px 0 20px;min-height:26px}.primary-button{align-items:center;background:var(--green);border:0;border-radius:7px;box-shadow:0 8px 20px rgba(23,107,82,.22);color:#fff;cursor:pointer;display:inline-flex;font-size:20px;font-weight:720;gap:12px;height:60px;justify-content:center;min-width:210px;padding:0 28px}.primary-button.is-running{background:#a33d31}.button-symbol{font-size:16px}
.mode-section{border-top:1px solid var(--line);padding-top:24px}.section-heading{align-items:baseline;display:flex;justify-content:space-between;margin-bottom:16px}.section-heading h2{font-size:20px;margin:0}.section-heading span{color:var(--muted);font-size:14px}.mode-control{display:grid;gap:10px;grid-template-columns:repeat(4,minmax(0,1fr))}.mode-button{align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:7px;color:var(--ink);cursor:pointer;display:flex;font-size:17px;font-weight:680;gap:9px;height:64px;justify-content:center;min-width:0;padding:0 10px}.mode-button span{color:var(--coral);font-size:20px}.mode-button.is-active{background:var(--green-light);border-color:var(--green);color:#0d523d}
.settings-dialog{background:var(--surface);border:0;border-radius:8px;box-shadow:var(--shadow);color:var(--ink);max-width:calc(100vw - 32px);padding:0;width:480px}.settings-dialog::backdrop{background:rgba(23,33,43,.5)}.settings-dialog form{padding:24px}.dialog-heading{align-items:center;display:flex;justify-content:space-between;margin-bottom:18px}.dialog-heading h2{font-size:22px;margin:0}.setting-row,.setting-field{align-items:center;border-top:1px solid var(--line);display:flex;justify-content:space-between;min-height:76px}.setting-row span{display:flex;flex-direction:column;gap:4px}.setting-row small{color:var(--muted)}.setting-row input{height:24px;width:44px}.setting-field select{background:var(--surface);border:1px solid var(--line);border-radius:6px;height:42px;padding:0 12px}.setting-field input[type=range]{accent-color:var(--green);width:180px}.save-button{background:var(--green);border:0;border-radius:7px;color:#fff;cursor:pointer;font-weight:700;height:50px;margin-top:18px;width:100%}
@keyframes pulse{50%{opacity:.35;transform:scale(.76)}}@keyframes voice-wave{from{height:20px}to{height:64px}}
@media(max-width:680px){.app-header{height:64px}.brand{font-size:16px}.brand img{height:38px;width:38px}.app-shell{min-height:calc(100vh - 64px);padding-top:18px}.companion-stage{min-height:520px}.voice-visual{height:124px;margin:20px 0;width:124px}.reply{font-size:25px;min-height:116px}.mode-control{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}}
