/* Compact shared controls; existing input nodes and handlers are preserved. */
:root{--muted:#a5afbb;--shadow:0 8px 24px #0003}
html{overflow-x:hidden}body{background:#0d1016}.app{max-width:880px;padding:16px 16px 100px}
.topbar{flex-wrap:wrap;gap:12px}.logo h1{font-size:19px}.logo small{font-size:12px}.statusbar{gap:6px}.statusbar .pill:first-child,.statusbar>button{display:none}
.tabs{order:3;max-width:none;width:100%;flex-basis:100%;display:grid;grid-template-columns:repeat(3,1fr)}.tab{min-height:46px;font-size:14px}
.tab[data-view=patterns],.tab[data-view=communication]{display:none}body.advanced .tabs{display:flex;overflow-x:auto}body.advanced .tab{display:block;flex:1}
.session-strip{display:flex;align-items:center;gap:10px;padding:12px 14px;margin-bottom:12px;background:#18202b;border-radius:14px;min-width:0}.session-strip>div{min-width:0;flex:1}.session-strip b{display:block;font-size:14px}.session-strip .note{font-size:12px}.session-strip button{flex-shrink:0}
.channel{padding:14px}.ctitle{font-size:16px}.bigrow{grid-template-columns:70px 1fr;gap:12px;margin:12px 0}.bigvalue{font-size:42px;letter-spacing:-1px}.bigvalue small{display:none}.range{min-height:40px;cursor:pointer}.levelcol label{font-size:12px}
.channel .twocol{display:block}.channel .field{padding:0;background:none;border:0}.channel .field:not(.wave-field){display:none}.channel .field label{font-size:12px}.channel>.note{display:none}.btnrow{grid-template-columns:repeat(4,minmax(0,1fr))}.btn{min-height:44px}.channel select{min-height:44px;font-size:16px}.channel .mini-status{font-size:9px}
.lowergrid{display:none}body.advanced .lowergrid{display:grid}body.advanced .channel .field{display:block;padding:10px}body.advanced .channel .twocol{display:grid}body.advanced .channel>.note{display:block}
.dangerbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,880px);margin:0;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#0d1016f5;grid-template-columns:1fr 112px;backdrop-filter:blur(12px)}.stopbig,.pausebig{min-height:52px;font-size:16px}
.socialgrid{display:block}.chatcard{min-height:0;height:calc(100dvh - 300px);min-height:320px}.messages{min-height:0;max-height:none;flex:1;overscroll-behavior:contain}.chathead{gap:8px}.chathead .note{font-size:12px}.chatinput{grid-template-columns:44px 64px minmax(0,1fr) 58px;padding:10px;gap:5px}.chatinput .btn{padding:8px 4px;font-size:13px}.chatinput textarea{width:100%;min-width:0;font:16px inherit;font-size:16px}.bubble{max-width:85%;overflow-wrap:anywhere}.bubble audio{max-width:100%;width:230px}.msgmeta{font-size:11px}.dropzone{display:none}.roomline{grid-template-columns:minmax(0,1fr) auto auto}input,textarea,select{font-size:16px!important}
.quick-chat{display:flex;gap:6px;padding:8px 10px;overflow-x:auto;border-top:1px solid var(--line);flex-shrink:0}.quick-chat button{white-space:nowrap;background:#232b38;border:1px solid #354154;border-radius:20px;color:#e9eef5;padding:9px 12px;min-height:40px}.check-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:10px}.check-strip button{min-height:44px;border-radius:12px;border:1px solid #344153;background:#19222d;color:#dfe8f4}.check-strip button.active{background:#244536;border-color:#4bd594}.chat-hint{font-size:12px;color:var(--muted);min-height:20px;padding:0 12px}.unread{background:#c85cff;color:#150a1b;border-radius:12px;padding:2px 6px;margin-left:4px}.profilecard{margin-top:12px}.section label{display:block;margin:8px 0}.section select{min-height:44px}.section .btn{white-space:normal}.formgrid .field{grid-column:auto!important}.metricgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric{overflow-wrap:anywhere}.commgrid>*{min-width:0}.advanced-toggle{width:100%;margin:12px 0}.chat-launch{width:100%;margin-top:14px;text-align:left;padding:14px;border-radius:14px;background:#1b2430;border:1px solid #344153;color:#e8eef6;min-height:52px}.chat-launch small{display:block;color:#aab8c8;margin-top:4px}.note{overflow-wrap:anywhere}
@media(max-width:600px){.app{padding:12px 12px 100px}.controlgrid{grid-template-columns:1fr;gap:10px}.bigrow{grid-template-columns:65px 1fr;margin:6px 0}.channel{padding:12px}.channel .field label{display:none}.channel .twocol{margin-top:4px}.btnrow{margin-top:6px}.chatcard{height:calc(100dvh - 310px)}.statusbar .pill{font-size:11px;padding:6px 8px}.logo small{font-size:10px}.session-strip{padding:10px}.chathead{padding:10px}.chathead b{font-size:14px}.chathead .badge{max-width:90px;overflow-wrap:anywhere}.bubble{max-width:86%}.dangerbar{padding-left:12px;padding-right:12px}.formgrid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:360px){.chatinput{grid-template-columns:40px minmax(0,1fr) 52px}.chatinput #recordVoice{grid-row:2;grid-column:1/4}.logo h1{font-size:17px}}
/* v7.3: conversation lives alongside the controls. */
[hidden]{display:none!important}.tabs{grid-template-columns:1fr 1fr}
#view-control .chatcard{height:350px;min-height:300px;margin-top:10px}
#view-control .check-strip{margin-top:12px}.check-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.check-actions .btn{background:#2f81f7;color:white;border:0;font-size:13px}
.reply-panel{background:#22202a;border:1px solid #f0b429;border-radius:14px;padding:12px;margin-top:10px}.reply-panel b{font-size:14px}.pain-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin-top:10px}.wellbeing-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.reply-panel button{min-height:44px;border-radius:10px;border:1px solid #ffffff33;font:inherit;font-weight:750}
.answerGreen{background:#207d39!important;color:#fff!important;border-color:#42b85d!important}.answerYellow{background:#f0b429!important;color:#211b00!important;border-color:#ffd43b!important}.answerRed{background:#a72334!important;color:#fff!important;border-color:#db3a4d!important}
body.no-waves .wave-field,body.no-waves #aWaveBtn,body.no-waves #bWaveBtn,body.no-waves #patPlay,body.no-waves #patWave,body.no-waves #patDuration{display:none!important}body.no-waves .channel .btnrow{grid-template-columns:repeat(3,1fr)}
@media(max-width:600px){#view-control .chatcard{height:340px}.check-actions{grid-template-columns:1fr 1fr}.chathead .note{font-size:11px}}
.video-panel{padding:12px;margin-bottom:12px}.video-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}.video-heading .note{max-width:65%;text-align:right}.video-stage{position:relative;background:#050609;border-radius:12px;overflow:hidden;aspect-ratio:16/9;max-height:320px}.video-stage #partnerVideo{width:100%;height:100%;object-fit:contain}.video-stage #selfVideo{position:absolute;right:8px;bottom:8px;width:25%;max-height:40%;object-fit:cover;border:1px solid #7c8ba2;border-radius:9px;background:#18202a}.video-buttons{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.video-buttons .btn{font-size:12px;flex:1;min-width:95px}.video-panel .note{font-size:11px}
/* v7.5: wearer is a status view, controller is an adjustment view. */
.role-summary{display:block;font-size:11px;color:#b9c5d3;margin-top:3px}
.wearer-view .channel .levelcol,.wearer-view .channel .twocol,.wearer-view .channel .btnrow,.wearer-view .channel>.note:not(.wearer-wave),.wearer-view .lowergrid{display:none!important}
.wearer-view .controlgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.wearer-view .channel{padding:12px}.wearer-view .channel .bigrow{display:block;margin:10px 0}.wearer-view .channel .mini-status{display:none}.wearer-view .channel .bigvalue{font-size:42px}.wearer-view .channel .wearer-wave{display:block;font-size:12px;min-height:32px}
.controller-view .wearer-wave{display:none!important}.wearer-limits .field{margin-top:10px}.wearer-limits .field label{font-size:13px}.advanced-toggle,.tab[data-view=patterns],.tab[data-view=communication]{display:none!important}body.advanced .tabs{display:grid;grid-template-columns:1fr 1fr}body.advanced .channel .field:not(.wave-field){display:none}body.advanced .channel .twocol{display:block}body.advanced .lowergrid{display:none}
#remoteReadout{display:none}.wearer-view .video-panel{margin-bottom:10px}.wearer-view .check-strip{grid-template-columns:repeat(3,minmax(0,1fr))}.wearer-view .check-strip button{font-size:12px;padding:8px 4px}
