  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  body.warning { animation: flash 0.5s ease-in-out infinite alternate; }
  @keyframes flash {
    from { background: #1a1a2e; }
    to { background: #8b0000; }
  }

  /* Top bar: gear left, title center */
  #top-bar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
  }
  #controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
  }
  #nav-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: #c0c0d0;
    text-transform: uppercase;
    pointer-events: none;
  }
  #settings-btn, #stats-btn {
    background: #16213e;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
  }
  #settings-btn svg, #stats-btn svg { width: 16px; height: 16px; vertical-align: -2px; }
  #settings-btn:hover, #stats-btn:hover { background: #1a2744; border-color: #555; }

  /* Stats modal */
  #stats-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 200;
    align-items: center;
    justify-content: center;
  }
  #stats-modal.open { display: flex; }
  #stats-modal-inner {
    background: #16213e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px 24px 24px;
    width: 380px;
    max-width: 94vw;
    max-height: 85vh;
    overflow-y: auto;
  }
  #stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }
  #stats-header h2 {
    font-weight: 500;
    font-size: 1.1rem;
  }
  #stats-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
  }
  #stats-close svg { width: 18px; height: 18px; }
  #stats-close:hover { color: #e0e0e0; background: rgba(255,255,255,0.06); }
  #week-chart, #day-timeline {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
  }
  .stats-legend {
    display: flex;
    gap: 16px;
    margin: 8px 0 12px;
    font-size: 0.78rem;
  }
  .stats-legend-sit   { color: #4caf50; }
  .stats-legend-break { color: #6b6b9a; }
  #stats-summary, #stats-day-summary {
    font-size: 0.82rem;
    color: #888;
    margin: 8px 0 0;
    line-height: 1.4;
  }
  #day-timeline { margin-bottom: 4px; border: 1px solid #2a2a4a; }
  #stats-day-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .stats-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.82rem;
  }
  .stats-row-sit   { background: rgba(76,175,80,0.08); }
  .stats-row-break { background: rgba(74,74,106,0.15); }
  .stats-row-sit.session-highlighted   { background: rgba(76,175,80,0.28); outline: 1px solid rgba(76,175,80,0.5); }
  .stats-row-break.session-highlighted { background: rgba(74,74,106,0.40); outline: 1px solid rgba(140,140,200,0.4); }
  .stats-row-label { width: 72px; flex-shrink: 0; }
  .stats-row-sit .stats-row-label   { color: #4caf50; }
  .stats-row-break .stats-row-label { color: #6b6b9a; }
  .stats-row-time { flex: 1; color: #aaa; font-variant-numeric: tabular-nums; }
  .stats-row-dur  { color: #666; font-variant-numeric: tabular-nums; }

  /* App wrapper — constrains layout to 70vw, centered */
  #app-wrapper {
    width: 70vw;
    min-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  /* Main section: top half (camera + timer) and bottom half (session list) */
  #main-section {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
    min-height: 0;
  }
  /* Top half: camera (70%) + timer (30%) */
  #main-row {
    display: flex;
    align-items: stretch;
    flex: 1;
    min-height: 0;
  }
  #camera-col {
    width: 70%;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 16px 10px;
    min-height: 0;
  }
  #timer-col {
    width: 30%;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 16px 10px;
    min-height: 0;
  }

  /* Bottom half: today stats / session list */
  #today-stats {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    padding: 0 16px 10px;
  }
  .today-stats-inner {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding: 4px 0 6px;
  }
  .today-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #444;
    margin-bottom: 8px;
  }
  .today-stats-summary {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: #4a9a6a;
    text-transform: none;
  }
  #today-timeline {
    display: block;
    width: 100%;
    height: 50px;
    border-radius: 4px;
    border: 1px solid #2a2a4a;
    margin-bottom: 6px;
  }
  #today-session-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 10px;
  }

  #camera-wrap {
    flex: 1;
    min-height: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  #camera-container {
    position: relative;
    flex: 1;
    min-height: 0;
  }
  #camera-preview {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    border: 2px solid #333;
    object-fit: cover;
    background: #000;
    display: block;
    transform: scaleX(-1);
  }
  #camera-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    pointer-events: none;
    z-index: 1;
  }
  #hand-fx {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    pointer-events: none;
    z-index: 2;
  }

  /* FX bar below camera */
  #fx-bar {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    width: 100%;
  }
  #fx-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #556;
    text-transform: uppercase;
    margin-right: 2px;
  }
  #fx-prev, #fx-next, #fx-gear {
    background: #1a2744;
    border: 1px solid #3a3a5a;
    color: #99a;
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
  }
  #fx-prev svg, #fx-next svg, #fx-gear svg { width: 12px; height: 12px; }
  #fx-prev:hover, #fx-next:hover, #fx-gear:hover { border-color: #6a6a8a; color: #e0e0e0; }
  #fx-name {
    flex: 1;
    font-size: 0.68rem;
    color: #9090b0;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.03em;
    min-width: 0;
  }

  /* Video FX modal — reuses alarm-sound-modal styles */
  #videofx-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 200;
    align-items: center;
    justify-content: center;
  }
  #videofx-modal.open { display: flex; }
  #videofx-modal-inner {
    background: #16213e;
    border: 1px solid #333;
    border-radius: 12px;
    width: 380px;
    max-width: 94vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #videofx-header {
    flex-shrink: 0;
    padding: 24px 24px 12px;
  }
  #videofx-header h2 { margin-bottom: 12px; font-weight: 500; font-size: 1.2rem; }
  #videofx-preview {
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #333;
    background: #000;
    margin: 0 auto;
  }
  #videofx-list { flex: 1; overflow-y: auto; padding: 0 24px; display: flex; flex-direction: column; gap: 4px; }
  #videofx-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px;
  }
  #videofx-close {
    background: #1a2744;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 8px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
  }
  #videofx-close:hover { border-color: #555; }

  #timer-section {
    text-align: center;
  }
  #status {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 2px;
  }
  #status.sitting { color: #4caf50; }
  #status.away { color: #ff6b6b; }
  #status.warn { color: #ff1744; font-weight: bold; }
  #status.stopped { color: #666; }
  #timer {
    font-size: 2.4rem;
    font-weight: 200;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    line-height: 1;
    transition: color 0.3s;
  }
  #timer.away { color: #ff6b6b; }
  #timer.warn { color: #ff1744; }
  #timer.sitting { color: #e0e0e0; }
  #timer.stopped { color: #666; }
  #threshold-display {
    font-size: 0.75rem;
    color: #555;
    margin-top: 2px;
  }

  #start-btn {
    background: #16213e;
    border: 1px solid #4caf50;
    color: #4caf50;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: background 0.2s, border-color 0.2s;
  }
  #start-btn svg { width: 16px; height: 16px; }
  #start-btn:hover { background: #1a2744; border-color: #66bb6a; }
  #start-btn.active { border-color: #ff5252; color: #ff5252; }
  #start-btn.active:hover { border-color: #ff7070; }
  #dismiss-btn {
    background: #16213e;
    border: 1px solid #ff9800;
    color: #ff9800;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: background 0.2s, border-color 0.2s;
  }
  #dismiss-btn svg { width: 16px; height: 16px; }
  #dismiss-btn:hover { background: #1a2744; border-color: #ffb74d; }

  /* Settings panel */
  #settings-panel {
    display: none;
    position: fixed;
    top: 52px;
    right: 16px;
    background: #16213e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px 0;
    z-index: 20;
    min-width: 240px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  #settings-panel.open { display: block; }

  .settings-group { padding: 10px 14px; }
  .settings-group + .settings-group { border-top: 1px solid #222; }
  .settings-group-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #556;
    margin-bottom: 8px;
    font-weight: 600;
  }
  .settings-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: #aaa; }
  #threshold-range { width: 100%; margin-bottom: 12px; }
  #threshold-val { font-weight: bold; color: #e0e0e0; }
  .quick-presets { display: flex; gap: 6px; }
  .quick-presets button {
    flex: 1;
    background: #1a2744;
    border: 1px solid #333;
    color: #aaa;
    padding: 6px 0;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
  }
  .quick-presets button:hover { border-color: #555; color: #e0e0e0; }
  .quick-presets button.selected { border-color: #4caf50; color: #4caf50; }
  .settings-actions { display: flex; gap: 8px; }
  .settings-actions button {
    flex: 1;
    background: #1a2744;
    border: 1px solid #333;
    color: #aaa;
    padding: 8px 0;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }
  .settings-actions button:hover { border-color: #555; color: #e0e0e0; }
  .settings-actions button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
  }
  .settings-actions button:disabled:hover { border-color: #333; color: #aaa; }
  .settings-actions button svg { width: 14px; height: 14px; }
  #mute-btn.muted { border-color: #ff9800; color: #ff9800; }

  /* Alarm sound modal */
  #alarm-sound-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 200;
    align-items: center;
    justify-content: center;
  }
  #alarm-sound-modal.open { display: flex; }
  #alarm-sound-modal-inner {
    background: #16213e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 24px;
    width: 380px;
    max-width: 94vw;
    max-height: 85vh;
    overflow-y: auto;
  }
  #alarm-sound-modal-inner h2 { margin-bottom: 4px; font-weight: 500; font-size: 1.2rem; }
  #alarm-sound-modal-inner p { color: #888; font-size: 0.85rem; margin-bottom: 16px; }
  #alarm-sound-list { display: flex; flex-direction: column; gap: 4px; }
  .alarm-sound-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
  }
  .alarm-sound-item:hover { background: #1a2744; }
  .alarm-sound-item.selected { border-color: #4caf50; background: #112; }
  .alarm-sound-item .sound-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid #444;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
  }
  .alarm-sound-item.selected .sound-dot { border-color: #4caf50; background: #4caf50; }
  .alarm-sound-item .sound-name { flex: 1; font-size: 0.88rem; color: #ccc; }
  .alarm-sound-item.selected .sound-name { color: #e0e0e0; }
  .alarm-sound-preview {
    background: none;
    border: 1px solid #333;
    color: #777;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
  }
  .alarm-sound-preview:hover { border-color: #555; color: #bbb; }
  .alarm-sound-preview svg { width: 11px; height: 11px; }
  #alarm-sound-close {
    background: #1a2744;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 8px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
  }
  #alarm-sound-close:hover { border-color: #555; }

  /* Breath section — hidden by default, shown over main content */
  #breath-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  #breath-overlay canvas { display: block; width: min(60vw, 60vh); height: min(60vw, 60vh); }
  #breath-label {
    text-align: center;
    font-size: 1rem;
    color: #556;
    margin-top: 8px;
    line-height: 1.8;
  }
  #breath-placeholder {
    color: #333;
    font-size: 0.9rem;
  }

  /* Breath picker modal */
  #breath-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 200;
    align-items: center;
    justify-content: center;
  }
  #breath-modal.open { display: flex; }
  #breath-modal-inner {
    background: #16213e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 24px;
    width: 96vw;
    max-width: 96vw;
    height: 94vh;
    max-height: 94vh;
    overflow-y: auto;
  }
  #breath-modal-inner h2 { margin-bottom: 4px; font-weight: 500; font-size: 1.2rem; }
  #breath-modal-inner p { color: #888; font-size: 0.85rem; margin-bottom: 16px; }
  .breath-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  .breath-card {
    background: #1a1a2e;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s;
  }
  .breath-card:hover { border-color: #555; }
  .breath-card.selected { border-color: #4caf50; }
  .breath-card canvas { display: block; margin: 0 auto 6px; border-radius: 4px; }
  .breath-card .label { font-size: 0.75rem; color: #aaa; }
  #breath-close {
    margin-top: 16px;
    background: #1a2744;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 8px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
  }
  #breath-close:hover { border-color: #555; }

  /* Hand FX picker modal */
  #handfx-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 200;
    align-items: center;
    justify-content: center;
  }
  #handfx-modal.open { display: flex; }
  #handfx-modal-inner {
    background: #16213e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 24px;
    width: 90vw;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
  }
  #handfx-modal-inner h2 { margin-bottom: 4px; font-weight: 500; font-size: 1.2rem; }
  #handfx-modal-inner p { color: #888; font-size: 0.85rem; margin-bottom: 16px; }
  .handfx-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
  }
  .handfx-card {
    background: #1a1a2e;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s;
  }
  .handfx-card:hover { border-color: #555; }
  .handfx-card.selected { border-color: #4caf50; }
  .handfx-card canvas { display: block; margin: 0 auto 6px; border-radius: 4px; background: #0a0a15; }
  .handfx-card .label { font-size: 0.75rem; color: #aaa; }
  #handfx-close {
    background: #1a2744;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 8px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
  }
  #handfx-close:hover { border-color: #555; }
  #breath-none {
    margin-top: 16px;
    margin-right: 8px;
    background: none;
    border: 1px solid #555;
    color: #888;
    padding: 8px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
  }
  #breath-none:hover { color: #e0e0e0; }

  /* Landing page */
  #landing {
    background: #1a1a2e;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
  }
  .landing-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    width: 100%;
    padding: 64px 24px 80px;
    margin: auto;
  }
  .landing-tag {
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #4caf50;
    margin-bottom: 22px;
    font-weight: 600;
  }
  .landing-headline {
    font-size: 2.4rem;
    font-weight: 300;
    color: #f0f0f0;
    text-align: center;
    line-height: 1.25;
    margin-bottom: 18px;
  }
  .landing-sub {
    font-size: 0.95rem;
    color: #7878a0;
    text-align: center;
    line-height: 1.75;
    max-width: 520px;
    margin-bottom: 28px;
  }
  .landing-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    margin-bottom: 52px;
  }
  .feature-card {
    background: #16213e;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 24px 18px;
    text-align: center;
  }
  .feature-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
    display: block;
  }
  .feature-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #d0d0e0;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
  }
  .feature-desc {
    font-size: 0.78rem;
    color: #7070a0;
    line-height: 1.65;
  }
  .landing-trust-row {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 32px;
  }
  .landing-trust-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.75rem;
    color: #9090b0;
    margin-bottom: 28px;
  }
  .trust-sep {
    color: #3a3a58;
  }
  #landing-cta {
    display: inline-block;
    text-decoration: none;
    background: #4caf50;
    border: 1px solid #4caf50;
    color: #1a1a2e;
    padding: 13px 44px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    letter-spacing: 0.05em;
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s;
    margin-bottom: 12px;
  }
  #landing-cta:hover { background: #43a047; border-color: #43a047; }
  .back-app {
    color: #555;
    text-decoration: none;
    font-size: 0.8rem;
    padding: 12px 8px;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    transition: color 0.2s;
  }
  .back-app:hover { color: #888; }
  /* Showcase bento grid */
  .landing-showcase {
    display: grid;
    grid-template-columns: 1fr 0.5fr;
    gap: 10px;
    width: min(900px, 92vw);
    margin-bottom: 36px;
    align-items: stretch;
  }
  .showcase-stats-row {
    grid-column: 1 / -1;
  }
  .showcase-stats-row .showcase-side-frame {
    height: 170px;
    flex: none;
  }
  .showcase-panel {
    background: #0b1022;
    border: 1px solid #1c2040;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .showcase-panel.side {
    flex: 1;
  }
  .showcase-side-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .showcase-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
  }
  .showcase-panel-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9898c8;
  }
  .showcase-panel-desc {
    font-size: 0.73rem;
    color: #8080a8;
    line-height: 1.6;
    flex-shrink: 0;
    height: calc(0.73rem * 1.6 * 2);
    overflow: hidden;
  }
  .showcase-panel-badge {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #4caf50;
    background: #0d1f12;
    border: 1px solid #1e3d24;
    padding: 2px 8px;
    border-radius: 10px;
  }
  /* Main FX preview frame */
  .showcase-main-frame {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #06090f;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
  }
  .showcase-main-frame::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px dashed #141830;
    border-radius: 4px;
    pointer-events: none;
    z-index: 0;
  }
  .showcase-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    z-index: 1;
    transition: opacity 0.2s;
  }
  .showcase-fx-name {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(6, 9, 20, 0.72);
    color: #9090b8;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
  }
  /* FX grid (video + gesture) */
  .showcase-fx-grid {
    display: grid;
    gap: 6px;
    flex: 1;
    width: 100%;
    align-content: start;
  }
  .gesture-fx-grid {
    grid-template-rows: repeat(2, 1fr);
  }
  .gesture-fx-grid .fx-grid-item {
    height: 100%;
  }
  .gesture-fx-grid .fx-grid-frame {
    aspect-ratio: auto;
    flex: 1;
    min-height: 0;
  }
  .video-fx-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px 12px;
  }
  .gesture-fx-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hand-fx-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 6px;
    flex: none;
    margin-top: auto;
  }
  .hand-fx-grid .fx-grid-item {
    gap: 0;
  }
  .fx-grid-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .fx-grid-frame {
    aspect-ratio: 4 / 3;
    background: #06090f;
    border: 1px solid #1c2040;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
  }
  .fx-grid-frame::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px dashed #111628;
    border-radius: 3px;
    pointer-events: none;
  }
  .fx-grid-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .fx-grid-item span {
    font-size: 0.58rem;
    color: #8080a8;
    text-align: center;
    letter-spacing: 0.03em;
    line-height: 1;
  }
  /* Side frames (gesture + stats) — fill remaining space */
  .showcase-side-frame {
    flex: 1;
    min-height: 0;
    position: relative;
    background: #06090f;
    border-radius: 8px;
    overflow: hidden;
  }
  .showcase-side-frame::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px dashed #141830;
    border-radius: 4px;
    pointer-events: none;
    z-index: 0;
  }
  .showcase-side-frame .showcase-img {
    border-radius: 8px;
  }

  @media (max-width: 640px) {
    .landing-headline { font-size: 1.8rem; }
    .landing-inner { padding: 48px 20px 60px; }
    .landing-showcase { grid-template-columns: 1fr; }
    .video-fx-grid { grid-template-columns: repeat(2, 1fr); }
    .gesture-fx-grid { grid-template-columns: repeat(3, 1fr); }
    .showcase-stats-row .showcase-side-frame {
      height: auto;
    }
    .showcase-stats-row .showcase-side-frame .showcase-img {
      position: relative;
      height: auto;
      object-fit: contain;
    }

    /* App responsive */
    #app-wrapper {
      width: 100%;
      min-width: 0;
    }
    #main-row {
      flex-direction: column;
    }
    #camera-col {
      width: 100%;
      flex: 1;
      min-height: 0;
      padding: 8px 12px 6px;
    }
    #timer-col {
      width: 100%;
      flex: none;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
      padding: 8px 16px 10px;
      gap: 16px;
    }
    #timer-section {
      flex: 1;
      text-align: left;
    }
    #timer {
      font-size: 1.8rem;
    }
    #start-btn, #dismiss-btn {
      width: auto;
      flex-shrink: 0;
      padding: 10px 20px;
    }
  }

  #loading {
    position: fixed;
    inset: 0;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
  }
  #loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 260px;
  }
  #loading-text {
    font-size: 0.95rem;
    color: #888;
    letter-spacing: 0.04em;
  }
  #loading-track {
    width: 100%;
    height: 3px;
    background: #222;
    border-radius: 2px;
    overflow: hidden;
  }
  #loading-bar {
    height: 100%;
    width: 0%;
    background: #4caf50;
    border-radius: 2px;
    transition: width 0.15s ease-out;
  }

  .landing-how {
    width: 100%;
    max-width: 520px;
    margin-bottom: 36px;
    text-align: left;
  }
  .landing-how-title {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #7070a0;
    margin-bottom: 14px;
    font-weight: 600;
  }
  .landing-steps {
    list-style: none;
    counter-reset: steps;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .landing-steps li {
    counter-increment: steps;
    display: flex;
    gap: 12px;
    font-size: 0.82rem;
    color: #7878a0;
    line-height: 1.6;
  }
  .landing-steps li::before {
    content: counter(steps);
    background: #16213e;
    border: 1px solid #252545;
    color: #4caf50;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
  }
  .landing-steps li strong { color: #9090b8; font-weight: 600; }

#app-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 4px 12px;
  font-size: 0.65rem;
  color: #555;
  z-index: 55;
}
#app-footer a {
  color: #555;
  text-decoration: none;
  padding: 8px 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
#app-footer a:hover {
  color: #999;
}
#app-footer .sep {
  margin: 0 4px;
}
