.touch-page { overflow: auto; padding: var(--app-safe-top) var(--app-safe-right) var(--app-safe-bottom) var(--app-safe-left); }
.touch-main { max-width: 640px; margin: auto; padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.touch-main[hidden], .touch-session[hidden] { display: none; }
.touch-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.touch-brand { padding: 12px 0; color: var(--txt); text-decoration: none; font-weight: 750; }
.touch-topbar span { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.touch-intro, .touch-history { padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); }
.touch-intro h1 { font-size: clamp(26px, 6vw, 36px); margin: 8px 0 16px; }
.touch-intro p, .touch-help, .touch-history > p { color: var(--muted); line-height: 1.7; font-size: 14px; }
.touch-intro .touch-eyebrow { margin: 0; color: var(--accent); letter-spacing: .12em; font-size: 11px; }
.touch-instructions { margin: 24px 0; }
#touchStart { width: 100%; }
.touch-intro .touch-local-hint { margin-bottom: 0; font-size: 12px; }
.touch-history summary { cursor: pointer; font-weight: 750; }
.touch-stats { display: flex; gap: 24px; padding: 12px 0 20px; }
.touch-stats div { display: flex; flex: 1; flex-direction: column; gap: 6px; }
.touch-stats span { color: var(--muted); font-size: 12px; }
.touch-stats strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.touch-record-list { list-style: none; margin: 0; padding: 0; }
.touch-record-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.touch-record-list strong { font: 750 23px Consolas, monospace; }
.touch-record-list span { color: var(--muted); font-size: 12px; text-align: right; }
.touch-help summary { cursor: pointer; padding: 8px 0; }
.touch-page.touch-focused { overflow: hidden; padding: 0; background: #05090e; }
.touch-session { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh; display: flex; flex-direction: column; z-index: 70; background: #05090e; color: #eff8ff; padding: var(--app-safe-top) var(--app-safe-right) var(--app-safe-bottom) var(--app-safe-left); }
.touch-session-header { flex: none; height: 56px; display: flex; align-items: center; justify-content: center; }
.lucian-ui #touchBack { min-height: 44px; padding: 10px 20px; background: #101b26; color: #c6d8e8; border: 1px solid #23384a; border-radius: 12px; box-shadow: none; }
.touch-locked #touchBack { visibility: hidden; pointer-events: none; }
.touch-arena { position: relative; display: flex; flex: 1; min-height: 0; isolation: isolate; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.lucian-ui .touch-pad { position: relative; flex: 1; min-width: 0; min-height: 0; border: 0; border-radius: 0; padding: 0; box-shadow: none; background: #05090e; color: #687f95; touch-action: none; user-select: none; -webkit-user-select: none; transition: none; }
.lucian-ui .touch-pad::before { display: none; }
.lucian-ui .touch-pad + .touch-pad { border-left: 1px solid #132231; }
.lucian-ui .touch-pad:active { transform: none !important; }
.touch-pad-hint { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; pointer-events: none; }
.touch-hand { display: block; font-style: normal; font-size: clamp(44px, 8vw, 64px); line-height: 1.2; }
#touchLeft .touch-hand { transform: scaleX(-1); }
.touch-pad-hint b { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; }
.lucian-ui .touch-pad[aria-pressed="true"] { background: #0c2131; box-shadow: inset 0 -4px #32baf0; color: #32baf0; }
.lucian-ui .touch-arena[data-phase="ready"] .touch-pad { background: #09271c; box-shadow: inset 0 -4px #4cff99; color: #4cff99; }
.touch-clock { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 24px 64px; text-align: center; container-type: size; }
#touchTime { font-family: Consolas, 'SFMono-Regular', monospace; font-size: min(calc(145vw / var(--digits, 4)), 55vh); line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
@supports (font-size: 1cqb) { #touchTime { font-size: min(calc(145cqi / var(--digits, 4)), 65cqb); } }
#touchStatus { margin: 24px 0 0; max-width: 90%; font-size: clamp(13px, 2.4vw, 20px); line-height: 1.5; color: #9bb2c5; }
#touchSaveStatus { margin: 8px 0 0; max-width: 90%; font-size: 13px; line-height: 1.5; color: #9bb2c5; }
#touchSaveStatus:empty { display: none; }
#touchSaveStatus.err { color: #ff9d9d; }
.touch-arena[data-phase="running"] #touchStatus, .touch-arena[data-phase="running"] #touchSaveStatus, .touch-arena[data-phase="running"] .touch-pad span { display: none; }
.touch-arena[data-phase="running"] .touch-clock { padding: 24px; }
.touch-arena[data-phase="ready"] #touchTime { color: #4cff99; }
.touch-arena[data-phase="running"] #touchTime { color: #32baf0; }
.touch-arena[data-phase="stopped"] #touchTime { color: #ffcf79; }
.touch-session .lucian-ripple { display: none; }
@media (orientation: landscape) and (max-height: 520px) {
  .touch-session-header { height: 48px; }
  .touch-clock { padding: 12px 24px 44px; }
  #touchStatus { margin-top: 14px; }
  .touch-pad-hint { bottom: 12px; }
  .touch-hand { font-size: 44px; }
  .touch-pad-hint b { font-size: 12px; }
  #touchSaveStatus { font-size: 12px; }
}
