:root{--scale: 1;--blue-main: #005a9c;--blue-sub: #0077c8;--danger: #c62828;--success: #2e7d32;--text-main: #1a1a1a;--text-sub: #5a6472;--bg-page: #f7f9fc;--mic-size: clamp(120px, 36vw, 160px);--mic-icon-size: clamp(52px, 16vw, 72px);--wave-height: clamp(36px, 11vw, 52px);--page-pad-x: clamp(12px, 4vw, 20px);--safe-top: env(safe-area-inset-top, 0px);--safe-right: env(safe-area-inset-right, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--safe-left: env(safe-area-inset-left, 0px)}*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}html{height:100%;height:-webkit-fill-available}html,body,#root{width:100%;min-height:100%;min-height:100dvh;min-height:-webkit-fill-available}body{background:#1a1d23;font-family:Noto Sans TC,PingFang TC,-apple-system,BlinkMacSystemFont,sans-serif;line-height:1.5;letter-spacing:.02em;display:flex;justify-content:center;overscroll-behavior:none;touch-action:manipulation;-webkit-text-size-adjust:100%;text-size-adjust:100%}.app{width:100%;max-width:480px;min-height:100%;min-height:100dvh;min-height:-webkit-fill-available;background:var(--bg-page);display:flex;flex-direction:column;position:relative;overflow:hidden;padding-top:var(--safe-top);padding-right:var(--safe-right);padding-left:var(--safe-left)}.fontsize-switch{display:flex;gap:6px;padding:8px var(--page-pad-x);background:#fff;border-bottom:1px solid #e2e8f0;flex-shrink:0}.fontsize-switch button{flex:1;min-height:44px;border-radius:8px;border:2px solid #d0e2f3;background:#fff;color:var(--blue-main);font-weight:700;font-size:14px;cursor:pointer;font-family:inherit;touch-action:manipulation}.fontsize-switch button.active{background:var(--blue-main);color:#fff;border-color:var(--blue-main)}.app-header{padding:12px var(--page-pad-x);background:#fff;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;gap:10px}.header-brand{display:flex;align-items:center;gap:8px;min-width:0}.hospital-logo{width:28px;height:28px;fill:var(--blue-main);flex-shrink:0}.app-title{font-size:calc(clamp(18px,5vw,22px) * var(--scale));font-weight:700;color:var(--text-main);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tts-lang-selector{display:flex;align-items:center;gap:2px;font-size:calc(clamp(14px,3.8vw,16px) * var(--scale));font-weight:700;color:var(--text-sub);background:#f1f4f8;padding:6px 10px;border-radius:14px;border:1px solid #e2e8f0;flex-shrink:0;min-height:40px}.tts-lang-selector select{appearance:none;-webkit-appearance:none;border:none;background:transparent;color:inherit;font:inherit;font-weight:700;font-size:max(16px,calc(14px * var(--scale)));cursor:pointer;padding:0;margin:0}.tts-lang-selector select:focus-visible{outline:2px solid var(--blue-main);outline-offset:2px;border-radius:4px}.status-bar-banner{background:#ebf3fa;color:var(--blue-main);padding:10px var(--page-pad-x);font-size:calc(clamp(15px,4.2vw,18px) * var(--scale));font-weight:700;display:flex;align-items:center;justify-content:center;gap:8px;border-bottom:1px solid #d0e2f3;flex-shrink:0;text-align:center;transition:background .25s,color .25s;line-height:1.35}.status-bar-banner.recording{background:#fde8e8;color:var(--danger);border-bottom-color:#f8b4b4}.status-bar-banner.thinking{background:#fff0e6;color:#c75300;border-bottom-color:#ffd8c2}.status-bar-banner.playing{background:#e8f5e9;color:var(--success);border-bottom-color:#c8e6c9}.status-bar-banner.error{background:#fde8e8;color:var(--danger);border-bottom-color:#f8b4b4}.app-body{flex:1 1 auto;min-height:0;padding:clamp(12px,3vh,20px) var(--page-pad-x);overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column}.reg-panel{width:100%;display:flex;flex-direction:column;gap:10px;margin-top:8px;flex-shrink:0}.reg-card{background:#f7fafc;border:1px solid #dbe4ee;border-radius:12px;padding:14px 16px;text-align:left}.reg-card--ok{background:#eef8f0;border-color:#b7dfc0}.reg-card--muted{background:#f4f6f8;border-color:#d5dde5}.reg-card-title{margin:0 0 6px;font-size:calc(clamp(15px,4vw,17px) * var(--scale));font-weight:700;color:var(--blue-main)}.reg-card--ok .reg-card-title{color:var(--success)}.reg-card-line{margin:0;font-size:calc(clamp(14px,3.8vw,16px) * var(--scale));color:#1a2332;line-height:1.45}.reg-card-sub{margin:4px 0 0;font-size:calc(clamp(12px,3.2vw,14px) * var(--scale));color:#5a6a7a}.slot-list{margin:0;padding-left:1.4em;display:flex;flex-direction:column;gap:8px}.slot-item{font-size:calc(clamp(14px,3.8vw,16px) * var(--scale));color:#1a2332;line-height:1.4}.slot-item::marker{color:var(--blue-main);font-weight:700}.slot-when{display:block;font-weight:700}.slot-who{display:block;font-size:calc(clamp(13px,3.4vw,15px) * var(--scale));color:#5a6a7a}.app-footer-nav{padding:12px var(--page-pad-x) calc(16px + var(--safe-bottom));background:#fff;border-top:1px solid #e2e8f0;display:flex;gap:12px;flex-shrink:0}.btn{min-height:52px;border-radius:12px;font-size:calc(clamp(16px,4.5vw,18px) * var(--scale));font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:none;cursor:pointer;width:100%;box-shadow:0 2px 4px #0000000d;font-family:inherit;touch-action:manipulation}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-secondary{background:#fff;color:var(--blue-main);border:2px solid var(--blue-main)}.btn-secondary:active:not(:disabled){background:#ebf3fa}.mic-section{display:flex;flex-direction:column;align-items:center;justify-content:center;margin:auto 0;padding:clamp(8px,2vh,24px) 0;flex:1 1 auto;min-height:0;width:100%}.mic-button-wrapper{position:relative;width:var(--mic-size);height:var(--mic-size);display:flex;align-items:center;justify-content:center}.mic-btn{width:var(--mic-size);height:var(--mic-size);border-radius:50%;background:linear-gradient(135deg,#0077c8,#005a9c);box-shadow:0 10px 25px #005a9c59;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;z-index:2;touch-action:manipulation;-webkit-user-select:none;user-select:none}.mic-btn:active:not(:disabled):not(.disabled-look){transform:scale(.97)}.mic-btn.recording{background:linear-gradient(135deg,#e53935,#c62828);box-shadow:0 10px 25px #c6282866}.mic-btn.busy{background:linear-gradient(135deg,#0077c8,#005a9c);box-shadow:0 10px 25px #005a9c59}.mic-icon{width:var(--mic-icon-size);height:var(--mic-icon-size);fill:#fff}.sound-wave{display:flex;align-items:center;justify-content:center;gap:clamp(4px,1.4vw,6px);height:var(--wave-height);width:calc(var(--mic-icon-size) * 1.15)}.sound-wave-bar{flex:1 1 auto;max-width:8px;min-width:4px;height:28%;border-radius:999px;background:#fff;transform-origin:center center;transition:height .2s ease}.sound-wave--idle .sound-wave-bar:nth-child(1),.sound-wave--idle .sound-wave-bar:nth-child(5){height:22%}.sound-wave--idle .sound-wave-bar:nth-child(2),.sound-wave--idle .sound-wave-bar:nth-child(4){height:40%}.sound-wave--idle .sound-wave-bar:nth-child(3){height:58%}.sound-wave.is-active.sound-wave--soft .sound-wave-bar{animation:soundWaveSoft 1.1s ease-in-out infinite}.sound-wave.is-active.sound-wave--strong .sound-wave-bar{animation:soundWaveStrong .75s ease-in-out infinite}.sound-wave.is-active .sound-wave-bar:nth-child(1){animation-delay:0s}.sound-wave.is-active .sound-wave-bar:nth-child(2){animation-delay:.12s}.sound-wave.is-active .sound-wave-bar:nth-child(3){animation-delay:.24s}.sound-wave.is-active .sound-wave-bar:nth-child(4){animation-delay:.18s}.sound-wave.is-active .sound-wave-bar:nth-child(5){animation-delay:.06s}@keyframes soundWaveSoft{0%,to{height:24%}50%{height:72%}}@keyframes soundWaveStrong{0%,to{height:22%}40%{height:100%}70%{height:48%}}.mic-hint{font-size:calc(clamp(18px,5.2vw,22px) * var(--scale));font-weight:700;color:var(--text-main);margin-top:clamp(12px,2.5vh,16px);text-align:center;padding:0 8px}.mic-subhint{font-size:calc(clamp(15px,4.5vw,20px) * var(--scale));color:var(--text-sub);margin-top:4px;font-weight:500;text-align:center;padding:0 8px}.pulse-ring{position:absolute;top:0;left:0;width:var(--mic-size);height:var(--mic-size);border-radius:50%;background-color:#c6282866;z-index:1;opacity:0;pointer-events:none;transition:opacity .15s;animation:none}.mic-button-wrapper.recording .pulse-ring{opacity:1;animation:pulse 1.8s cubic-bezier(.215,.61,.355,1) infinite}.pulse-ring-2,.mic-button-wrapper.recording .pulse-ring-2{animation-delay:.6s}@keyframes pulse{0%{transform:scale(1);opacity:.8}to{transform:scale(1.6);opacity:0}}.loading-dots{display:inline-flex;align-items:center;gap:8px}.dot{width:12px;height:12px;background-color:var(--blue-main);border-radius:50%;animation:dotBounce 1.4s infinite ease-in-out both}.dot:nth-child(1){animation-delay:-.32s}.dot:nth-child(2){animation-delay:-.16s}@keyframes dotBounce{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.playing-bars{display:inline-flex;align-items:flex-end;gap:2px;height:16px}.playing-bar{width:3px;background:var(--success);animation:playBar .8s infinite ease-in-out}.playing-bar:nth-child(1){height:60%;animation-delay:.1s}.playing-bar:nth-child(2){height:100%;animation-delay:.3s}.playing-bar:nth-child(3){height:40%;animation-delay:.2s}@keyframes playBar{0%,to{height:30%}50%{height:100%}}svg{flex-shrink:0}@media(max-width:360px){:root{--mic-size: 112px;--mic-icon-size: 48px;--page-pad-x: 12px}.app-header{padding:10px var(--page-pad-x)}.fontsize-switch button{font-size:13px;min-height:40px}}@media(max-height:640px){:root{--mic-size: clamp(96px, 28vh, 130px);--mic-icon-size: clamp(40px, 12vh, 56px)}.fontsize-switch{padding:6px var(--page-pad-x)}.fontsize-switch button{min-height:36px}.app-header{padding:8px var(--page-pad-x)}.status-bar-banner{padding:6px var(--page-pad-x)}.mic-section{padding:4px 0}.mic-hint{margin-top:8px}.app-footer-nav{padding:8px var(--page-pad-x) calc(10px + var(--safe-bottom))}.btn{min-height:48px}}@media(min-width:481px){body{padding:0;align-items:stretch}.app{box-shadow:0 0 0 1px #ffffff0f,0 20px 50px #00000059}}@media(prefers-reduced-motion:reduce){.pulse-ring,.dot,.playing-bar,.sound-wave-bar{animation:none!important}.mic-button-wrapper.recording .pulse-ring{opacity:.45}.sound-wave.is-active .sound-wave-bar:nth-child(3){height:70%}}
