/* voice-sheet.html */
html, body.voice-sheet {
  margin: 0;
  block-size: 100%;
  background: var(--panel-subtle);
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
}
.voice-sheet main {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  block-size: 100%;
  overflow-y: auto;
  padding: var(--space-md) var(--page-gutter) var(--space-r4);
}
.voice-sheet-handle {
  flex: none;
  align-self: center;
  width: 40px;
  height: var(--space-xs);
  border-radius: var(--radius-pill);
  background: var(--muted);
  opacity: 0.5;
}
.voice-sheet-status {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  font-size: var(--text-item);
  color: var(--muted);
}
.voice-sheet-status[data-kind="error"] { color: var(--ink); font-weight: 600; }
.voice-sheet-mic {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-pill);
  background: var(--muted);
}
.voice-sheet-mic[data-state="listening"] { background: var(--accent); }
.voice-sheet-mic[data-state="working"] { background: var(--accent); opacity: 0.6; }
.voice-sheet-transcript,
.voice-sheet-reply {
  margin: 0;
  overflow-y: auto;
  overflow-wrap: anywhere;
}
.voice-sheet-transcript { flex: none; max-height: 30%; font-size: var(--text-detail-title); }
.voice-sheet-reply { flex: 1 1 auto; min-height: 0; font-size: var(--text-detail-body); }
.voice-sheet-open {
  flex: none;
  align-self: flex-start;
  padding: var(--space-lg) var(--side-gutter);
  border: 0;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
}
.voice-sheet-open[hidden] { display: none; }
.voice-sheet-undo {
  flex: none;
  align-self: flex-start;
  padding: var(--space-lg) var(--side-gutter);
  border: 1px solid var(--muted);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}
.voice-sheet-undo[hidden] { display: none; }
.voice-sheet-undo:disabled { opacity: 0.6; }

/* pair.html */
html, body.pair-page { margin: 0; min-height: 100%; background: transparent; color: var(--ink); font-family: var(--font-body); }
.pair-surface {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}
.pair-surface p { margin: 0; }
.pair-surface p:empty { display: none; }
body[data-route="install"][data-install="card"] .pair-surface,
body[data-route="install"][data-install="card"] #pair-have-code,
body[data-route="install"][data-install="card"] .pair-brand,
body[data-route="install"][data-install="store"] #pair-have-code { display: none; }
.pair-alt { display: flex; flex-direction: column; gap: var(--space-md); }
.pair-form { display: flex; flex-direction: column; gap: var(--space-sm); }
.pair-form .pair-actions { margin-top: var(--space-sm); }
#pair-code-steps, #pair-approve-steps { text-wrap: balance; text-align: center; }
.pair-share-icon { width: 1.25em; height: 1.25em; vertical-align: -0.25em; }
#pair-code-view:not([hidden]) { display: flex; flex-direction: column; gap: var(--space-r3); }
#pair-code-view { order: 1; }
#pair-status { order: 2; }
#pair-scan-again { order: 3; }
.pair-user-code {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: var(--text-page-title);
  letter-spacing: 0.12em;
  text-align: center;
  user-select: all;
  overflow-wrap: anywhere;
}
.pair-code-line { margin: 0; text-align: center; }
.pair-actions { display: flex; flex-wrap: wrap; gap: var(--space-xl); }
.pair-scan-video { width: 100%; border-radius: var(--radius-nested); background: var(--qr-ground); }
#pair-root[data-state="waiting"] #pair-status::before,
#pair-root[data-state="checking"] #pair-status::before {
  content: "";
  display: inline-block;
  box-sizing: border-box;
  width: 1em;
  height: 1em;
  margin-right: var(--space-r2);
  vertical-align: middle;
  border: 0.125em solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: pair-spin 0.9s linear infinite;
}
@keyframes pair-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  #pair-root[data-state="waiting"] #pair-status::before,
  #pair-root[data-state="checking"] #pair-status::before { animation: none; }
}

/* restore.html and restore-unlock.html */
html, body.restore-page {
  margin: 0;
  min-height: 100%;
  background: var(--panel-subtle);
  color: var(--ink);
  font-family: var(--font-body);
}
.restore-page main {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-r4) * 1.5);
  max-width: 28rem;
  margin: 0 auto;
  padding: max(var(--space-r4), var(--safe-top)) max(var(--space-r4), var(--safe-right)) max(calc(var(--space-r4) * 1.5), var(--safe-bottom)) max(var(--space-r4), var(--safe-left));
}
.restore-header { display: flex; flex-direction: column; gap: var(--space-md); }
.restore-header h1 { margin: 0; font-size: var(--text-page-title); font-weight: var(--w-title); line-height: 1.15; }
.restore-surface {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding: var(--space-r4);
  background: var(--panel-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
}
.restore-surface p { margin: 0; }
.restore-form { display: flex; flex-direction: column; gap: var(--space-sm); }
#restore-choose.app-actions { flex-direction: column; gap: var(--space-sm); }
.restore-form .restore-actions { margin-top: var(--space-sm); }
.restore-page .app-field { box-sizing: border-box; width: 100%; min-height: 48px; font-size: max(1rem, calc(1rem * var(--text-scale))); }
.restore-page button, .restore-page .app-primary-button, .restore-page .app-quiet-button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  text-decoration: none;
}
.restore-actions { display: flex; flex-wrap: wrap; gap: var(--space-xl); }
.restore-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; overflow-wrap: anywhere; resize: none; line-height: 1.4; }
.restore-video { box-sizing: border-box; width: 100%; border-radius: var(--radius-nested); }
#restore-root[data-step="restoring"] #restore-status::before {
  content: "";
  display: inline-block;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  margin-right: var(--space-md);
  vertical-align: middle;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: restore-spin 0.9s linear infinite;
}
@keyframes restore-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  #restore-root[data-step="restoring"] #restore-status::before { animation: none; }
}

/* The read-only lock-screen session: the normal app with no navigation or composer. */
html.lock-session #dock-nav,
html.lock-session #command-bar,
html.lock-session .page-settings-button { display: none; }
.lock-open {
  padding: var(--page-gutter) max(var(--page-gutter), var(--safe-right)) max(var(--page-gutter), var(--safe-bottom)) max(var(--page-gutter), var(--safe-left));
}
.lock-open .app-primary-button { width: 100%; }
