:root {
  --ink: #152642; --muted: #52647d; --blue: #234bc5; --blue-dark: #193a9b;
  --blue-soft: #edf3ff; --line: #dce4ef; --bg: #f3f6fb; --yellow: #ffcd46;
  --navy: #142540; --radius: 20px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Segoe UI', Inter, Arial, sans-serif; font-size: 16px; line-height: 1.5; }
button, input, select { font: inherit; }
button, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border-radius: 12px; transition: background .16s, border-color .16s, box-shadow .16s; touch-action: manipulation; }
button:disabled { opacity: .48; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #2b64da; outline-offset: 4px; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; background: var(--blue); color: white; padding: 12px 18px; border-radius: 10px; }
.skip-link:focus { top: 12px; }
header { min-height: 76px; background: white; border-bottom: 1px solid var(--line); padding: 12px max(24px, calc((100vw - 1340px) / 2)); display: flex; align-items: center; gap: 25px; }
.brand { font-size: 26px; font-weight: 750; letter-spacing: -1px; display: flex; align-items: center; white-space: nowrap; }
.brand > span:last-child { color: var(--blue); }
.brand-mark { background: var(--blue); color: white; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; margin-right: 11px; box-shadow: 0 3px 8px #234bc51a; }
.brand-mark svg { width: 24px; height: 24px; }
.header-note { padding-left: 24px; border-left: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.prototype { font-size: 12px; color: #52647d; background: #f1f4f9; border: 1px solid #e1e7f0; padding: 4px 10px; border-radius: 20px; }
.quiet { background: none; border: 1px solid transparent; padding: 10px 12px; color: var(--blue); font-size: 14px; font-weight: 600; min-height: 44px; }
.quiet:hover:not(:disabled) { background: var(--blue-soft); }
.settings-button { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.settings-button svg { width: 20px; height: 20px; }
main { max-width: 1388px; margin: auto; padding: 30px 24px 0; }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.eyebrow { font-size: 12px; font-weight: 750; color: var(--blue); letter-spacing: 1.5px; margin: 0 0 8px; }
h1 { font-size: clamp(28px, 3vw, 38px); font-weight: 750; line-height: 1.15; letter-spacing: -1.5px; margin: 0 0 10px; }
.intro p:not(.eyebrow) { margin: 0; color: var(--muted); }
h2 { font-size: 23px; line-height: 1.3; letter-spacing: -.65px; margin: 0; }
h3 { font-size: 18px; line-height: 1.4; margin: 0; }
.intro-tools { display: flex; align-items: end; gap: 12px; }
.language { width: 228px; display: grid; gap: 7px; }
.language label { font-size: 14px; font-weight: 600; }
select { min-height: 46px; border: 1px solid #c5d1e2; background: white; border-radius: 11px; padding: 10px 12px; width: 100%; color: var(--ink); }
.camera-jump.secondary, .board-jump.quiet { display: none; }
.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; }
.control-panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; scroll-margin-top: 20px; }
.control-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.control-title h2 { font-size: 18px; letter-spacing: -.4px; }
.local-tag { font-size: 12px; color: #36598b; background: #eef4fc; border: 1px solid #dce6f5; padding: 4px 7px; border-radius: 6px; white-space: nowrap; }
.camera-preview { aspect-ratio: 4/3; background: var(--navy); border-radius: 14px; overflow: hidden; margin: 20px 0 14px; position: relative; }
.camera-preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
#camera-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #f0f5ff; }
#camera-placeholder > span { color: #8fa8d0; margin-bottom: 10px; }
#camera-placeholder svg { width: 44px; height: 44px; }
#camera-placeholder strong { font-size: 15px; font-weight: 600; }
#camera-placeholder p { font-size: 14px; color: #bccbe1; margin: 4px 0 20px; }
.camera-state { position: absolute; bottom: 0; left: 0; right: 0; background: #0e1e34dd; padding: 6px 10px; font-size: 12px; color: #d1def2; text-align: center; }
.tracking-status { font-size: 14px; color: var(--muted); margin: 0 0 15px; min-height: 42px; }
.primary { background: var(--blue); border: 1px solid var(--blue); color: white; padding: 12px 16px; font-size: 15px; font-weight: 650; min-height: 48px; }
.primary:hover:not(:disabled), .confirm-button:hover:not(:disabled) { background: var(--blue-dark); border-color: var(--blue-dark); }
.control-panel > .primary { width: 100%; }
.secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; background: white; border: 1px solid #c8d5e8; color: #284778; padding: 10px 12px; font-size: 14px; font-weight: 600; border-radius: 11px; text-decoration: none; }
.secondary:hover:not(:disabled) { background: #f1f6fd; border-color: #a6bad7; }
.full { width: 100%; }
.camera-actions { display: grid; gap: 5px; margin-top: 9px; }
.compact-label { display: none; }
.camera-actions .quiet { color: var(--muted); }
.control-divider { height: 1px; background: var(--line); margin: 17px 0; }
.hint { font-size: 14px; color: var(--muted); margin: 10px 0 15px; }
.control-panel > .hint { font-size: 13px; margin-bottom: 16px; }
.instructions { font-size: 14px; color: var(--muted); margin: 16px 0; }
.instructions summary { font-size: 14px; font-weight: 600; color: #284778; cursor: pointer; min-height: 36px; }
.instructions ol { padding-left: 21px; }
.instructions li { margin: 9px 0; }
.privacy { display: flex; align-items: start; gap: 9px; border-top: 1px solid var(--line); padding-top: 16px; }
.privacy svg { color: #2c7182; width: 22px; height: 22px; flex-shrink: 0; }
.privacy strong { font-size: 14px; font-weight: 600; }
.privacy p { font-size: 13px; color: var(--muted); margin: 5px 0 0; }
.communication { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; min-width: 0; box-shadow: 0 4px 20px #193a6605; }
.board-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.pause { background: #f4f7fc; border: 1px solid #d5dfed; color: #314b71; font-size: 14px; font-weight: 600; padding: 10px 13px; min-height: 44px; max-width: 170px; }
.pause:hover:not(:disabled) { background: #e8effa; }
.board-state { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 17px; font-size: 14px; color: var(--muted); }
#hold-label { white-space: nowrap; }
.tracking-surface { position: relative; }
.message-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.message-card { position: relative; min-height: 156px; background: #f7f9fd; border: 2px solid #e1e7f1; border-radius: 16px; color: var(--ink); padding: 19px 16px; display: flex; flex-direction: column; align-items: start; justify-content: center; text-align: start; gap: 13px; overflow: hidden; }
.message-card:hover:not(:disabled) { background: #eef3ff; border-color: #9cb6ee; }
.message-icon { width: 40px; height: 40px; border-radius: 12px; background: #e7eefe; color: var(--blue); display: grid; place-items: center; flex-shrink: 0; }
.message-icon svg { width: 23px; height: 23px; stroke-width: 2.2; }
.message-card:first-child .message-icon { background: #e0f2eb; color: #166c50; }
.message-card:nth-child(2) .message-icon { background: #fce8e9; color: #ac3544; }
.message-card:nth-child(5) .message-icon { background: #e8edf7; color: #526685; }
.message-card:nth-child(6) .message-icon { background: #e0f1f5; color: #206479; }
.message-text { font-size: 18px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.card-hint { font-size: 12px; letter-spacing: .4px; color: #52647d; font-weight: 600; }
.message-grid[lang=en] .card-hint { display: none; }
.message-card.hover-target, .confirmation button.hover-target, .pause.hover-target, .output-actions button.hover-target { border-color: #b8860b; box-shadow: inset 0 0 0 2px #ffda79; background: #fff4d7; color: #172641; }
.confirmation { padding: 30px 24px; border: 2px solid #adc2ee; border-radius: 16px; background: #f0f5ff; text-align: center; }
.confirmation .eyebrow { color: #365998; }
.confirmation h3 { font-size: 18px; color: #526785; font-weight: 500; }
#selected-message { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.5; font-weight: 700; color: #173979; overflow-wrap: anywhere; margin: 14px 0; }
.voice-note { font-size: 14px; color: var(--muted); margin: 0 0 22px; }
.confirm-actions { display: flex; justify-content: center; gap: 14px; }
.confirm-actions button { min-height: 54px; padding: 13px 24px; font-size: 17px; font-weight: 650; border-radius: 12px; }
.confirm-button { background: var(--blue); border: 2px solid var(--blue); color: white; }
.cancel-button { background: white; border: 2px solid #bdcde5; color: #314b71; }
.cancel-button:hover { background: #e9f0fd; }
.message-output { margin-top: 18px; padding: 17px 20px; background: #eef3fb; border: 1px solid #dce5f2; border-radius: 14px; }
.output-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.output-label h3 { font-size: 12px; font-weight: 700; color: #4d6383; text-transform: uppercase; letter-spacing: 1px; }
.output-actions { display: flex; gap: 2px; flex-shrink: 0; }
.output-actions button { padding: 8px; font-size: 14px; }
#output { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.5; font-weight: 700; margin: 8px 0; color: #173979; overflow-wrap: anywhere; }
#output.empty { font-size: 20px; font-weight: 400; color: #536782; }
#output-status { font-size: 14px; color: var(--muted); }
.below-board { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.below-board .quiet { padding-inline: 8px; }
.head-pointer { position: fixed; width: 44px; height: 44px; transform: translate(-50%, -50%); pointer-events: none; z-index: 80; filter: drop-shadow(0 1px 3px #0008); }
.head-pointer svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.head-pointer circle { fill: none; stroke: var(--yellow); stroke-width: 4; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; stroke-linecap: round; }
.head-pointer .ring-bg { stroke: #172b4999; stroke-dashoffset: 0; }
.head-pointer > span { position: absolute; left: 17px; top: 17px; width: 10px; height: 10px; background: var(--yellow); border-radius: 50%; border: 2px solid white; }
.draft-open .message-grid { display: none; }
.draft-open .confirmation { min-height: 270px; }
.paused #pointer { opacity: .3; }
footer { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; padding: 22px 0 26px; }
dialog { max-width: 490px; width: calc(100% - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid #cbd8eb; border-radius: 20px; padding: 28px; color: var(--ink); box-shadow: 0 24px 90px #0e24454d; }
dialog::backdrop { background: #14254080; backdrop-filter: blur(3px); }
dialog p { font-size: 16px; color: var(--muted); margin: 13px 0 21px; }
.dialog-heading { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.close { width: 44px; height: 44px; flex-shrink: 0; background: #f2f5fa; border: 0; color: #52647d; font-size: 28px; }
.slider-label { display: flex; justify-content: space-between; gap: 15px; font-size: 15px; font-weight: 600; margin: 19px 0 8px; }
.slider-label output { font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
input[type=range] { width: 100%; height: 32px; accent-color: var(--blue); cursor: pointer; }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; margin-top: 20px; }
.check input { accent-color: var(--blue); width: 20px; height: 20px; flex-shrink: 0; }
dialog .hint { font-size: 14px; }
#settings-done, #save-phrases { width: 100%; margin-top: 6px; }
.calibration-diagram { height: 160px; border: 1px solid var(--line); border-radius: 14px; background: #eff4fc; position: relative; margin: 20px 0; }
.cal-dot { width: 27px; height: 27px; background: var(--blue); border: 5px solid #bacdf8; border-radius: 50%; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); transition: left .3s, top .3s; z-index: 1; }
.cal-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #bdcbe1; font-size: 36px; }
.cal-progress { height: 7px; background: #e6edf8; border-radius: 5px; overflow: hidden; }
.cal-progress span { display: block; background: var(--blue); width: 0%; height: 100%; }
#calibration-dialog button { width: 100%; }
#phrase-fields { display: grid; gap: 14px; }
#phrase-fields label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
#phrase-fields input { width: 100%; min-height: 48px; border: 1px solid #c5d1e2; padding: 11px 12px; border-radius: 10px; font-size: 16px; }
[lang=ur], [lang=ar] { line-height: 1.8; }
/* Keep the board in view while a pointer is being used. */
.control-active main { padding-top: 18px; }
.control-active .intro { margin-bottom: 18px; }
.control-active .intro .eyebrow { display: none; }
.control-active h1 { font-size: 28px; margin-bottom: 4px; }
.control-active .intro p { font-size: 14px; }
.control-active .message-card { min-height: 120px; padding: 14px; gap: 10px; }
.control-active .message-icon { width: 34px; height: 34px; border-radius: 10px; }
.control-active .message-text { font-size: 17px; }
.control-active .communication { padding: 22px; }
.control-active .message-output { margin-top: 14px; padding: 12px 16px; }
.control-active #output { font-size: 24px; margin: 4px 0; }
.control-active #output.empty { font-size: 18px; }
@media (max-width: 1100px) {
  .header-note { display: none; }
  .layout { grid-template-columns: 260px minmax(0, 1fr); gap: 18px; }
  .control-panel { padding: 18px; }
  .communication { padding: 22px; }
  .board-state { flex-wrap: wrap; gap: 4px 12px; }
  .message-card { padding: 16px 12px; }
  .message-text { font-size: 17px; }
  .local-tag { font-size: 11px; }
}
@media (max-width: 900px) {
  main { padding: 24px 20px 0; }
  .layout { grid-template-columns: 1fr; gap: 18px; }
  .communication { order: -1; }
  .control-panel { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px 20px; }
  .control-title { grid-column: 1 / -1; }
  .camera-preview { grid-row: 2 / 5; margin: 0; }
  .tracking-status { margin: 0; min-height: 0; align-self: center; }
  .control-panel > .primary, .camera-actions { grid-column: 2; }
  .camera-actions { grid-template-columns: 1fr 1fr; margin: 0; }
  .control-divider, #practice, .control-panel > .hint, .instructions, .privacy, .board-jump { grid-column: 1 / -1; }
  .control-divider { margin: 5px 0; }
  .control-panel > .hint, .instructions { margin: 0; }
  .privacy { padding-top: 14px; }
  .camera-jump.secondary { display: inline-flex; }
  .board-jump.quiet { display: block; text-decoration: none; text-align: center; }
  .control-active .communication { order: 0; }
  .control-active .control-panel { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 14px; align-items: center; }
  .control-active .control-panel > * { display: none; }
  .control-active .control-panel .tracking-status { display: block; grid-column: 2 / 4; font-size: 14px; }
  .control-active .camera-preview { display: block; grid-row: 1 / 3; grid-column: 1; width: 58px; height: 58px; aspect-ratio: auto; border-radius: 10px; }
  .control-active .camera-state, .control-active #camera-placeholder { display: none; }
  .control-active .control-panel > #start-camera { display: block; grid-column: 2; grid-row: 2; width: auto; justify-self: start; min-height: 40px; padding: 7px 12px; font-size: 14px; }
  .control-active .camera-actions { display: flex; grid-column: 3; grid-row: 2; gap: 8px; }
  .control-active .camera-actions button { font-size: 14px; padding: 7px 10px; min-height: 40px; }
  .control-active .camera-actions { grid-column: 2 / 4; justify-self: end; }
  .control-active #start-camera:disabled { display: none; }
  .control-active .camera-actions button:disabled { display: none; }
  .control-active .wide-label { display: none; }
  .control-active .compact-label { display: inline; }
  .control-active .control-panel:has(#start-camera:not(:disabled)) { grid-template-columns: minmax(0, 1fr) auto; }
  .control-active .control-panel:has(#start-camera:not(:disabled)) .tracking-status { grid-column: 1 / -1; }
  .control-active .control-panel:has(#start-camera:not(:disabled)) .camera-preview { display: none; }
  .control-active .control-panel > #start-camera:not(:disabled) { grid-column: 1; }
  .control-active #start-camera:not(:disabled) ~ .camera-actions { display: none; }
  .control-active .camera-jump.secondary { display: none; }
  .control-active .intro > div:first-child { display: none; }
  .control-active .intro { justify-content: end; margin-bottom: 12px; }
  .control-active .language { display: flex; align-items: center; gap: 12px; width: auto; }
  .control-active .language select { width: 205px; }
  .control-active .layout { gap: 12px; }
}
@media (max-width: 600px) {
  header { min-height: 66px; padding: 10px 16px; gap: 12px; }
  .brand { font-size: 23px; }
  .brand-mark { width: 33px; height: 33px; margin-right: 8px; border-radius: 10px; }
  .brand-mark svg { width: 21px; height: 21px; }
  .prototype { display: none; }
  .header-actions { gap: 0; }
  .settings-button { padding: 8px 4px 8px 8px; }
  main { padding: 22px 14px 0; }
  .intro { display: block; margin-bottom: 18px; }
  h1 { font-size: 30px; }
  .intro p:not(.eyebrow) { font-size: 16px; }
  .intro-tools { margin-top: 18px; width: 100%; gap: 10px; }
  .language { width: auto; flex: 1; min-width: 0; gap: 5px; }
  .camera-jump { flex-shrink: 0; }
  .communication { padding: 18px 14px; border-radius: 18px; }
  .board-heading { align-items: start; gap: 10px; margin-bottom: 14px; }
  .board-heading h2 { font-size: 21px; }
  .board-heading .eyebrow { font-size: 11px; letter-spacing: 1.1px; }
  .pause { max-width: 112px; padding: 9px; font-size: 14px; }
  .pause .wide-label { display: none; }
  .pause .compact-label { display: inline; }
  .board-state { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; font-size: 14px; }
  .message-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .message-card { min-height: 148px; padding: 14px 12px; gap: 10px; border-radius: 13px; }
  .message-text { font-size: 17px; }
  .message-icon { width: 35px; height: 35px; border-radius: 10px; }
  .message-icon svg { width: 21px; height: 21px; }
  .message-output { padding: 14px; }
  .output-label { flex-wrap: wrap; gap: 0 8px; }
  .output-label h3 { font-size: 12px; letter-spacing: .6px; }
  .output-actions { margin-left: auto; }
  #output { font-size: 25px; }
  #output.empty { font-size: 18px; }
  .below-board { flex-wrap: wrap; gap: 0 8px; }
  .below-board .quiet { margin-left: auto; }
  .control-panel { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 18px; border-radius: 18px; }
  .camera-preview { grid-row: 2 / 4; height: 130px; aspect-ratio: auto; }
  #camera-placeholder svg { width: 32px; height: 32px; }
  #camera-placeholder > span { margin-bottom: 5px; }
  #camera-placeholder strong { font-size: 14px; padding: 0 8px; }
  #camera-placeholder p { display: none; }
  .camera-state { padding: 6px; font-size: 11px; }
  .camera-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .tracking-status { font-size: 14px; }
  .control-panel > .primary { padding: 10px; font-size: 14px; }
  .confirmation { padding: 24px 14px; }
  #selected-message { font-size: 26px; }
  .confirm-actions { gap: 10px; }
  .confirm-actions button { font-size: 16px; padding: 12px 15px; }
  dialog { padding: 22px 20px; border-radius: 18px; }
  dialog h2 { font-size: 22px; }
  footer { flex-direction: column; gap: 6px; padding: 20px 4px; }
  .control-active header { min-height: 58px; padding-block: 6px; }
  .control-active main { padding-top: 10px; }
  .control-active .intro { display: flex; margin-bottom: 10px; }
  .control-active .intro-tools { margin-top: 0; }
  .control-active .language { justify-content: space-between; width: 100%; gap: 8px; }
  .control-active .language label { font-size: 14px; }
  .control-active .language select { width: 180px; min-height: 42px; padding-block: 7px; }
  .control-active .control-panel { grid-template-columns: 46px minmax(0, 1fr) auto; padding: 9px 11px; gap: 4px 9px; }
  .control-active .camera-preview { width: 46px; height: 58px; }
  .control-active .tracking-status { font-size: 13px; }
  .control-active .camera-actions button, .control-active .control-panel > #start-camera { font-size: 13px; padding: 6px 9px; min-height: 38px; }
  .control-active .communication { padding: 14px; }
  .control-active .board-heading { margin-bottom: 8px; }
  .control-active .board-heading h2 { font-size: 19px; }
  .control-active .board-heading .eyebrow { display: none; }
  .control-active .board-state { gap: 2px; margin-bottom: 10px; font-size: 13px; }
  .control-active .message-card { min-height: 92px; padding: 11px; gap: 7px; }
  .control-active .message-icon { width: 26px; height: 26px; border-radius: 7px; }
  .control-active .message-icon svg { width: 17px; height: 17px; }
  .control-active .message-text { font-size: 16px; }
  .control-active .card-hint { display: none; }
  .control-active .message-output { padding: 10px 12px; margin-top: 12px; }
  .control-active .output-label h3 { font-size: 11px; letter-spacing: .5px; }
  .control-active .output-actions button { min-height: 38px; padding: 6px; font-size: 13px; }
  .control-active #output { font-size: 22px; margin: 2px 0; }
  .control-active #output.empty { font-size: 16px; }
  .control-active #output-status { font-size: 13px; }
  .control-active .below-board { font-size: 13px; margin-top: 6px; }
  .control-active .below-board .quiet { font-size: 13px; }
  .control-active .confirmation { padding: 20px 14px; }
  .control-active .confirmation .eyebrow { display: block; }
}
@media (max-width: 600px) and (max-height: 720px) {
  .control-active main { padding-top: 6px; }
  .control-active .intro { margin-bottom: 6px; }
  .control-active .language label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .control-active .language { justify-content: end; }
  .control-active .language select { min-height: 38px; }
  .control-active .control-panel { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 8px 10px; }
  .control-active .control-panel .tracking-status { font-size: 12px; flex: 1 1 100%; }
  .control-active .camera-preview { display: none; }
  .control-active .camera-actions { margin-left: auto; }
  .control-active .layout { gap: 8px; }
  .control-active .communication { padding: 10px 12px; }
  .control-active .board-heading h2 { font-size: 17px; }
  .control-active .board-heading { margin-bottom: 5px; }
  .control-active .pause { min-height: 40px; padding: 8px; }
  .control-active .message-icon { display: none; }
  .control-active .message-grid { gap: 8px; }
  .control-active .message-card { min-height: 65px; padding: 8px; }
  .control-active .message-text { font-size: 14px; line-height: 1.35; }
  .control-active .board-state { flex-direction: row; flex-wrap: wrap; gap: 0 8px; font-size: 12px; margin-bottom: 6px; }
  .control-active .message-output { padding: 7px 9px; margin-top: 8px; }
  .control-active .output-label { flex-wrap: nowrap; gap: 4px; }
  .control-active .output-label h3 { font-size: 12px; letter-spacing: .2px; }
  .control-active .output-actions button { font-size: 12px; min-height: 36px; padding: 5px; }
  .control-active #output { font-size: 19px; }
  .control-active #output.empty { font-size: 14px; }
  .control-active #output-status { font-size: 12px; }
  .control-active .below-board { margin-top: 0; }
}
@media (max-height: 540px) and (min-width: 601px) and (max-width: 900px) {
  .control-active header { min-height: 50px; padding-block: 3px; }
  .control-active .intro { display: none; }
  .control-active .control-panel { display: flex; gap: 12px; padding: 8px 12px; }
  .control-active .camera-preview { display: none; }
  .control-active .tracking-status { margin-right: auto; }
  .control-active .communication { padding: 12px 16px; }
  .control-active .board-heading { margin-bottom: 6px; }
  .control-active .board-heading h2 { font-size: 19px; }
  .control-active .board-heading .eyebrow { display: none; }
  .control-active .board-state { margin-bottom: 8px; font-size: 13px; }
  .control-active .message-card { min-height: 67px; padding: 9px 12px; }
  .control-active .message-icon, .control-active .card-hint { display: none; }
  .control-active .message-text { font-size: 16px; }
  .control-active .message-output { margin-top: 10px; }
  .control-active .draft-open .confirmation { min-height: 0; padding: 10px 14px; }
  .control-active .confirmation .eyebrow { display: none; }
  .control-active .confirmation h3 { font-size: 14px; }
  .control-active #selected-message { font-size: 22px; margin: 4px 0; }
  .control-active .voice-note { font-size: 13px; margin: 0 0 8px; }
  .control-active .confirm-actions button { min-height: 44px; padding: 8px 16px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .message-card, .primary, .secondary, .pause, .confirm-button, .cancel-button { border: 2px solid ButtonText; } }
