:root {
  color: #242721;
  background: #f3f4ef;
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --muted: #6a6e65;
  --border: #dce0d5;
  --green: #356748;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 340px; }
button, select, input { font: inherit; }
button, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #688e58; outline-offset: 3px; }
button:disabled { cursor: not-allowed; }
.app-shell { max-width: 1144px; margin: 0 auto; padding: 0 32px; }
.site-header { height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.wordmark { display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 650; letter-spacing: 2px; }
.wordmark-divider { color: #a1a797; font-size: 18px; font-weight: 400; margin: 0 3px; }
.brand-mark { width: 27px; height: 26px; display: flex; gap: 4px; align-items: center; }
.brand-mark i { display: block; width: 8px; height: 21px; border: 2px solid #333b2c; border-radius: 6px; transform: rotate(23deg); }
.brand-mark i:last-child { height: 14px; }
.mode-badge { display: flex; gap: 8px; align-items: center; font: 10px/1.3 Consolas, monospace; letter-spacing: 1px; padding: 9px 12px; border: 1px solid #cdd7c4; border-radius: 30px; background: #eaf0e3; color: #46603c; }
.status-dot, .caption-dot { width: 5px; height: 5px; display: inline-block; border-radius: 50%; background: currentColor; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 37px 0 29px; }
.eyebrow, .step-label { font: 10px/1.3 Consolas, monospace; letter-spacing: 1.4px; color: var(--muted); }
.eyebrow { margin: 0 0 10px; }
h1 { font-size: 34px; font-weight: 500; letter-spacing: -1.25px; margin: 0; line-height: 1.25; }
.intro-note { font-size: 12px; line-height: 1.65; color: var(--muted); margin: 0 0 2px; }
.workspace { display: grid; grid-template-columns: minmax(0, 720px) minmax(270px, 1fr); gap: 22px; }
.preview-panel { overflow: hidden; border: 1px solid var(--border); background: #fafbf7; border-radius: 16px; align-self: start; }
.panel-heading { height: 56px; padding: 0 22px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
h2, h3 { margin: 0; }
.panel-heading h2 { font-size: 13px; font-weight: 600; }
.technical-label { font: 9px Consolas, monospace; color: #8b9183; letter-spacing: .5px; }
.device-stage { padding: 10px 24px 23px; background: #eaede5; border-top: 1px solid #e3e7dc; border-bottom: 1px solid #e0e4d9; }
.device-frame { max-width: 614px; margin: 14px auto 0; border: 1px solid #393e37; border-radius: 17px; background: #222620; padding: 17px; box-shadow: 0 9px 20px #363e2623, inset 0 1px #5f6557; }
.g2-display { width: 576px; max-width: 100%; height: 288px; color: #f4f5ef; background: #11130f; border: 1px solid #42463d; border-radius: 2px; display: flex; flex-direction: column; padding: 10px 16px 7px; overflow: hidden; font-family: Consolas, "Courier New", monospace; }
.g2-display:focus-visible { outline: 2px solid #d6e5c5; outline-offset: 5px; }
.display-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid #66695f; min-height: 27px; }
#screen-title { font-size: 15px; line-height: 18px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-weight: 700; }
.display-position { font-size: 10px; color: #b6baad; flex-shrink: 0; }
.display-lines { flex-shrink: 0; margin: 0 0 7px; }
.display-lines p { margin: 0 0 3px; font-size: 11px; line-height: 15px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; color: #c6cabc; }
.g2-display[data-screen="now"] .display-lines p:first-child { font-size: 20px; line-height: 23px; font-weight: 700; color: #f4f5ef; }
.g2-display[data-screen="now"] .display-lines p:nth-child(2) { font-size: 12px; line-height: 17px; }
.g2-display[data-screen="now"] .display-lines p:last-child { font-size: 10px; line-height: 14px; letter-spacing: .25px; margin-top: 4px; }
.display-rows { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #72776a #11130f; overscroll-behavior: contain; }
.display-row { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; border-radius: 0; padding: 4px 8px; min-height: 25px; line-height: 17px; font: 12px/17px Consolas, "Courier New", monospace; color: #e6e8e0; background: transparent; text-align: left; white-space: nowrap; }
.display-row .row-label { overflow: hidden; text-overflow: ellipsis; }
.display-row .row-marker { flex-shrink: 0; width: 8px; color: transparent; }
.display-row[aria-selected="true"] { color: #121410; background: #eff1e7; }
.display-row[aria-selected="true"] .row-marker { color: inherit; }
.display-row[aria-disabled="true"] { opacity: .48; }
.display-row:focus-visible { outline: 1px solid currentColor; outline-offset: -2px; }
.display-footer { margin-top: 6px; padding-top: 6px; min-height: 19px; border-top: 1px solid #505448; font: 8px/11px Consolas, monospace; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; color: #b4b9a9; }
.device-caption { display: flex; justify-content: space-between; padding: 16px 2px 0; max-width: 614px; margin: auto; color: #858c7d; font: 8px Consolas, monospace; letter-spacing: 1px; }
.device-caption > span:first-child { display: flex; align-items: center; gap: 6px; }
.gesture-section { padding: 21px 22px 17px; }
.section-caption { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.section-caption h3 { font-size: 12px; font-weight: 600; }
.section-caption > span { font-size: 10px; color: #8a8f81; }
.gesture-controls { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.gesture-controls button { display: flex; align-items: center; flex-direction: column; gap: 6px; border: 1px solid var(--border); background: #fff; color: #505548; border-radius: 8px; padding: 10px 3px 9px; font-size: 9px; white-space: nowrap; }
.gesture-controls button:hover { border-color: #94a185; background: #f5f7f0; }
.gesture-controls .tap-button { color: #385632; background: #eef2e7; border-color: #c8d4ba; }
.gesture-symbol { font-size: 20px; line-height: 24px; }
.tap-symbol { font-size: 13px; }
kbd { font: 8px Consolas, monospace; min-height: 15px; border: 1px solid #e0e3d9; border-radius: 3px; padding: 1px 4px; color: #8b9281; }
.gesture-note { margin: 13px 0 0; font-size: 10px; line-height: 1.65; color: #838978; }
.tools-panel { display: flex; flex-direction: column; gap: 15px; }
.setup-card, .scenario-card { padding: 22px 21px 18px; border: 1px solid var(--border); border-radius: 14px; background: #fcfdf9; }
.setup-card { background: #e9efdf; border-color: #d8e1ca; }
.step-label { display: block; margin-bottom: 11px; font-size: 9px; letter-spacing: 1.1px; }
.tools-panel h2 { font-size: 17px; font-weight: 500; letter-spacing: -.4px; }
.setup-card > p:not(.micro-note) { margin: 9px 0 15px; font-size: 12px; line-height: 1.6; color: #727a67; }
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #34442d; color: #f5f8ef; border: 1px solid #34442d; border-radius: 7px; padding: 11px 13px; font-size: 11px; font-weight: 500; }
.primary-button:hover { background: #45583b; }
.setup-card .primary-button { width: 100%; }
.micro-note { margin: 10px 0 0; color: #858b7d; font-size: 9px; line-height: 1.6; }
.field-label { display: block; font-size: 10px; margin: 18px 0 7px; color: #767e6e; }
select { width: 100%; min-height: 38px; border: 1px solid #d4dbca; border-radius: 6px; background: #fff; color: #454c3f; padding: 7px 9px; font-size: 11px; }
.scenario-description { margin: 8px 0 15px; min-height: 32px; font-size: 10px; line-height: 1.6; color: #87907c; }
.connection-toggle { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-top: 1px solid #e5e9dd; border-bottom: 1px solid #e5e9dd; font-size: 11px; cursor: pointer; }
.connection-detail { display: block; margin-top: 4px; font-size: 9px; color: #939b89; }
.connection-toggle input { position: absolute; right: 0; width: 30px; height: 22px; opacity: 0; z-index: 1; cursor: pointer; }
.switch-track { width: 29px; height: 16px; background: #c2c8b9; border-radius: 12px; display: block; padding: 3px; }
.switch-track::after { content: ""; display: block; width: 10px; height: 10px; background: #fff; border-radius: 50%; transition: transform .15s; }
.connection-toggle input:checked + .switch-track { background: #5f7850; }
.connection-toggle input:checked + .switch-track::after { transform: translateX(13px); }
.connection-toggle input:focus-visible + .switch-track { outline: 3px solid #688e58; outline-offset: 4px; }
.secondary-actions { display: flex; gap: 7px; margin-top: 14px; }
.secondary-actions button, .dialog-actions > button:not(.primary-button) { border: 1px solid #dce2d3; background: #f7f9f2; color: #68735c; border-radius: 6px; padding: 9px 10px; font-size: 10px; flex: 1; }
.secondary-actions button:hover { background: #eaf0e1; }
.activity-panel { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 21px 0 18px; border-bottom: 1px solid var(--border); }
.activity-status { display: flex; align-items: flex-start; gap: 9px; }
.activity-light { background: #98a98c; display: block; width: 6px; height: 6px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.activity-light[data-busy="true"] { background: #b79346; }
.activity-status h2 { font: 9px/1.5 Consolas, monospace; color: #8c9283; text-transform: uppercase; letter-spacing: .8px; }
#controller-status { margin: 4px 0 0; font-size: 11px; line-height: 1.5; color: #66705b; max-width: 650px; }
.call-details { font-size: 10px; color: #8a927e; min-width: 140px; text-align: right; }
.call-details summary { cursor: pointer; padding: 2px 0; }
#call-count { display: inline-block; margin-left: 4px; font: 9px Consolas, monospace; padding: 1px 4px; border-radius: 3px; background: #e5e9dd; }
#call-log { text-align: left; font: 10px/1.8 Consolas, monospace; margin: 10px 0; padding-left: 24px; }
.call-details p { font-size: 9px; max-width: 180px; }
.site-footer { display: flex; justify-content: space-between; gap: 15px; padding: 14px 0 25px; color: #929889; font-size: 9px; line-height: 1.6; }
.site-footer p { margin: 0; }
dialog { border: 1px solid #d5ddca; background: #fafcf6; color: #35442e; border-radius: 15px; padding: 28px; width: min(420px, calc(100vw - 40px)); box-shadow: 0 20px 70px #17201542; }
dialog::backdrop { background: #10160dbb; backdrop-filter: blur(3px); }
dialog h2 { font-size: 24px; font-weight: 500; letter-spacing: -.5px; }
dialog p { font-size: 13px; line-height: 1.7; color: #79866c; margin: 14px 0 24px; }
.dialog-actions { display: flex; gap: 9px; }
.dialog-actions .primary-button { flex: 1; justify-content: center; }
noscript { display: block; padding: 25px; color: #934e2d; }
@media (max-width: 1050px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .preview-panel { max-width: 720px; width: 100%; margin: 0 auto; }
  .tools-panel { display: grid; grid-template-columns: 1fr 1fr; max-width: 720px; width: 100%; margin: auto; }
  .setup-card { align-self: start; }
  .intro, .activity-panel, .site-footer { max-width: 720px; margin: auto; }
  h1 { font-size: 31px; }
}
@media (max-width: 600px) {
  .app-shell { padding: 0 16px; }
  .site-header { height: 70px; }
  .wordmark { font-size: 12px; gap: 7px; }
  .mode-badge { font-size: 8px; padding: 7px 9px; }
  .intro { padding: 27px 0 22px; }
  h1 { font-size: 27px; letter-spacing: -.9px; }
  .eyebrow { font-size: 8px; }
  .intro-note { display: none; }
  .panel-heading { height: 48px; padding: 0 14px; }
  .technical-label { font-size: 7px; }
  .device-stage { padding: 6px 10px 16px; }
  .device-frame { padding: 9px; border-radius: 12px; }
  .g2-display { padding: 9px 10px 6px; }
  .display-footer { font-size: 7px; }
  .gesture-section { padding: 17px 13px; }
  .gesture-controls { gap: 4px; }
  .gesture-controls button { font-size: 8px; }
  .tools-panel { grid-template-columns: 1fr; }
  .tools-panel > section { padding: 19px; }
  .site-footer { flex-direction: column; gap: 3px; }
  .activity-panel { gap: 10px; }
  .call-details { min-width: 108px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
