/* ============================================================
   工单台 · Ticket Deck — Design tokens & styles
   Character: serious / neutral ops (Linear-like)
   ============================================================ */

:root {
  /* Gray scale 8+ steps (R13) */
  --gray-50:  #FAFAF8;
  --gray-100: #F4F1EC;
  --gray-200: #E8E4DE;
  --gray-300: #D4CFC7;
  --gray-400: #B0AAA0;
  --gray-500: #8A8A8A;
  --gray-600: #5C5C5C;
  --gray-700: #3D3D3D;
  --gray-800: #2A2A2A;
  --gray-900: #1A1A1A;

  /* Teal accent scale (R13) — one brand hue only */
  --teal-50:  #F0FDFA;
  --teal-100: #CCFBF1;
  --teal-200: #99F6E4;
  --teal-300: #5EEAD4;
  --teal-400: #2DD4BF;
  --teal-500: #14B8A6;
  --teal-600: #0F766E;
  --teal-700: #0D5F59;
  --teal-800: #115E59;
  --teal-900: #134E4A;

  /* Status: amber */
  --amber-50:  #FFFBEB;
  --amber-100: #FEF3C7;
  --amber-700: #92400E;
  --amber-800: #78350F;

  /* Status: green — 已交付 */
  --green-50:  #F0FDF4;
  --green-100: #DCFCE7;
  --green-700: #166534;
  --green-800: #14532D;

  /* Status: blue — 已开工, distinct from green 已交付 and amber 验收中 */
  --blue-100: #DBEAFE;
  --blue-600: #2563EB;
  --blue-900: #1E3A8A;

  /* Semantic */
  --bg-page: var(--gray-100);
  --bg-card: #FFFFFF;
  --ink: var(--gray-900);
  --ink-secondary: var(--gray-600);
  --ink-tertiary: var(--gray-500);
  --accent: var(--teal-600);
  --accent-hover: var(--teal-700);
  --accent-press: var(--teal-800);
  --accent-soft: var(--teal-50);
  --accent-ring: rgba(15, 118, 110, 0.28);

  /* Radius */
  --radius-card: 10px;
  --radius-btn: 8px;
  --radius-badge: 6px;
  --radius-sheet: 16px;

  /* Shadow (R19 — prefer over borders) */
  --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.04), 0 1px 3px rgba(26, 26, 26, 0.06);
  --shadow-md: 0 4px 12px rgba(26, 26, 26, 0.06), 0 1px 3px rgba(26, 26, 26, 0.04);
  --shadow-lg: 0 12px 32px rgba(26, 26, 26, 0.10), 0 4px 8px rgba(26, 26, 26, 0.04);
  --shadow-sheet: 0 -8px 40px rgba(26, 26, 26, 0.18);

  /* Type */
  --font: "SF Pro Text", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, -apple-system, "PingFang SC", sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", ui-monospace, monospace;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --dur-page: 280ms;
  --dur-fast: 160ms;
  --dur-med: 240ms;
  --stagger: 50ms;

  /* Layout */
  --list-max: 800px;
  --detail-max: 720px;
  --login-max: 400px;
  --tap: 44px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-page: 1ms;
    --dur-fast: 1ms;
    --dur-med: 1ms;
    --stagger: 0ms;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ticket-card.is-entering {
    transform: none !important;
  }
  .timeline-node {
    transition: opacity 0.01ms !important;
    transform: none !important;
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  padding: 0;
}
a { color: var(--accent); }
[hidden] { display: none !important; }

/* ---------- App / Views ---------- */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background: var(--bg-page);
}

.view {
  min-height: 100vh;
  min-height: 100dvh;
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--dur-page) var(--ease), transform var(--dur-page) var(--ease);
}

.view.is-leaving {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.view.is-entering {
  opacity: 0;
  transform: translateY(10px);
}

.view.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 15px;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.btn-block { width: 100%; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.2);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active,
.btn-primary.is-pressed {
  background: var(--accent-press);
  transform: scale(0.98);
}
.btn-icon { flex-shrink: 0; }

.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 4px 8px;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.btn-text:hover { color: var(--ink); background: var(--gray-200); }
.btn-logout {
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 10px;
}

/* ---------- Login ---------- */
.view-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-card {
  width: 100%;
  max-width: var(--login-max);
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 40px 32px 32px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.brand { margin-bottom: 32px; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}

.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}

.brand-sub {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.brand-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

.passkey-tip {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-secondary);
  text-align: left;
}

#btn-passkey-info {
  margin-top: 12px;
  width: 100%;
}

/* ---------- Passkey sheet ---------- */
.passkey-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.passkey-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.36);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease);
}
.passkey-overlay.is-open .passkey-backdrop { opacity: 1; }

.passkey-sheet {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 12px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow-sheet);
  padding: 8px 24px 24px;
  transform: translateY(24px);
  opacity: 0;
  transition: transform var(--dur-med) var(--ease), opacity var(--dur-med) var(--ease);
}
.passkey-overlay.is-open .passkey-sheet {
  transform: translateY(0);
  opacity: 1;
}

@media (min-width: 640px) {
  .passkey-overlay {
    align-items: center;
  }
  .passkey-sheet {
    margin: 0;
    transform: translateY(12px) scale(0.98);
  }
  .passkey-overlay.is-open .passkey-sheet {
    transform: translateY(0) scale(1);
  }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--gray-300);
  margin: 4px auto 20px;
}

.sheet-icon-wrap {
  display: flex;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 12px;
}

.faceid-icon {
  animation: faceid-pulse 1.8s var(--ease) infinite;
}
@keyframes faceid-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.sheet-title {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.sheet-desc {
  margin: 6px 0 20px;
  font-size: 13px;
  color: var(--ink-secondary);
  text-align: center;
}

.sheet-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: 10px;
  margin-bottom: 20px;
}

.account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  font-size: 15px;
  flex-shrink: 0;
}

.account-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.account-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.account-meta {
  font-size: 12px;
  color: var(--ink-tertiary);
}

.sheet-cancel {
  width: 100%;
  margin-top: 8px;
  min-height: 40px;
}

.sheet-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 32px;
  color: var(--accent);
}
.success-check svg { display: block; }
.check-ring {
  stroke-dasharray: 164;
  stroke-dashoffset: 164;
  animation: draw-ring 0.4s var(--ease) forwards;
}
.check-path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: draw-check 0.35s var(--ease) 0.25s forwards;
}
@keyframes draw-ring {
  to { stroke-dashoffset: 0; }
}
@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}
.success-label {
  margin: 16px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.passkey-overlay.is-closing .passkey-backdrop { opacity: 0; }
.passkey-overlay.is-closing .passkey-sheet {
  opacity: 0;
  transform: translateY(16px) scale(1.02);
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 241, 236, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}

.topbar-inner {
  max-width: var(--list-max);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.topbar-mark {
  display: flex;
  color: var(--accent);
}
.topbar-title {
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.topbar-title.muted {
  color: var(--ink-tertiary);
  font-weight: 500;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 4px;
}
.user-chip {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
  padding: 4px 10px;
  background: var(--gray-200);
  border-radius: 999px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: var(--tap);
  min-width: var(--tap);
  margin-left: -8px;
  padding: 0 8px;
  color: var(--accent);
  font-weight: 500;
  font-size: 15px;
  border-radius: 8px;
}
.btn-back:hover { background: var(--teal-50); }
.topbar-spacer { width: 72px; }

.topbar-detail .topbar-inner {
  max-width: var(--detail-max);
}

/* ---------- List ---------- */
.list-main {
  max-width: var(--list-max);
  margin: 0 auto;
  padding: 20px 20px 48px;
}

.list-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.list-heading {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--gray-200);
  border-radius: 9px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.seg-btn {
  flex: 1 1 auto;
  min-height: 36px;
  min-width: 64px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.seg-btn.is-active {
  background: var(--bg-card);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.seg-btn:not(.is-active):hover {
  color: var(--ink);
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-card {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 16px 16px 16px 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), opacity var(--dur-med) var(--ease);
  opacity: 1;
  transform: translateY(0);
}
.ticket-card:hover {
  box-shadow: var(--shadow-md);
}
.ticket-card:active {
  transform: scale(0.995);
}
.ticket-card.is-entering {
  opacity: 0;
  transform: translateY(8px);
}
.ticket-card.is-filtering-out {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}
.ticket-card.is-lifting {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.ticket-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3.5px;
  background: var(--card-accent, var(--gray-400));
  border-radius: 10px 0 0 10px;
}

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.card-id {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-tertiary);
  letter-spacing: -0.01em;
}

.card-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--ink);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--ink-secondary);
}

.bot-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gray-100);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
}
.bot-chip.is-current {
  background: var(--teal-50);
  color: var(--teal-800);
  box-shadow: inset 0 0 0 1px var(--accent-ring);
}
.bot-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.card-time {
  margin-left: auto;
  color: var(--ink-tertiary);
  font-size: 12px;
}

/* Status badges (R14 + R15) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.5;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
  flex-shrink: 0;
}
.badge-draft {
  background: var(--gray-200);
  color: var(--gray-700);
}
.badge-in_progress {
  background: var(--blue-100);
  color: var(--blue-900);
}
.badge-review {
  background: var(--amber-50);
  color: var(--amber-800);
}
.badge-delivered {
  background: var(--green-50);
  color: var(--green-800);
}
.badge-cancelled {
  background: var(--gray-100);
  color: var(--gray-500);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.badge-cancelled::before {
  opacity: 0.4;
}

/* Status accent bar colors (R16) */
.ticket-card[data-status="draft"] { --card-accent: var(--gray-400); }
.ticket-card[data-status="in_progress"] { --card-accent: var(--blue-600); }
.ticket-card[data-status="review"] { --card-accent: #D97706; }
.ticket-card[data-status="delivered"] { --card-accent: #16A34A; }
.ticket-card[data-status="cancelled"] { --card-accent: var(--gray-300); }

/* Skeleton */
.skeleton-list { pointer-events: none; }
.skeleton-card {
  cursor: default;
  min-height: 88px;
}
.skeleton-card:hover { box-shadow: var(--shadow-sm); }
.skeleton-card::before { background: var(--gray-300); }
.sk-bar, .sk-line {
  background: linear-gradient(90deg, var(--gray-200) 0%, var(--gray-100) 50%, var(--gray-200) 100%);
  background-size: 200% 100%;
  animation: sk-pulse 1.2s ease-in-out infinite;
  border-radius: 4px;
}
.sk-bar {
  width: 72px;
  height: 12px;
  margin-bottom: 10px;
}
.sk-line {
  height: 14px;
  margin-bottom: 8px;
}
.sk-line.w70 { width: 70%; }
.sk-line.w60 { width: 60%; }
.sk-line.w75 { width: 75%; }
.sk-line.w55 { width: 55%; }
.sk-line.w40 { width: 40%; }
.sk-line.w35 { width: 35%; }
.sk-line.w45 { width: 45%; }
.sk-line.w30 { width: 30%; }
@keyframes sk-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty state (R20) */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gray-200);
  color: var(--ink-tertiary);
  margin-bottom: 16px;
}
.empty-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.empty-desc {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

/* ---------- Detail ---------- */
.detail-main {
  max-width: var(--detail-max);
  margin: 0 auto;
  padding: 8px 20px 64px;
}

.detail-hero {
  margin-bottom: 28px;
}

.detail-id {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-tertiary);
  margin-bottom: 8px;
}

.detail-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.section {
  margin-bottom: 28px;
}

.section-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.section-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.section-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.output-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mono-chip {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
  word-break: break-all;
}
.mono-chip .chip-kind {
  flex-shrink: 0;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding-top: 1px;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 28px;
  width: 2px;
  background: var(--gray-200);
  border-radius: 1px;
}
.timeline:has(.timeline-node:only-child)::before {
  display: none;
}

.timeline-node {
  position: relative;
  padding: 0 0 20px 16px;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.timeline-node:last-child { padding-bottom: 0; }
.timeline-node.is-lit {
  opacity: 1;
  transform: scale(1);
}

.timeline-node::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-300);
  box-shadow: 0 0 0 3px var(--bg-page);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.timeline-node.is-lit::before {
  background: var(--gray-500);
}
.timeline-node.is-current::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg-page), 0 0 0 6px var(--accent-ring);
}

.node-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.node-bot {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.timeline-node.is-current .node-bot {
  color: var(--teal-800);
}
.node-time {
  font-size: 12px;
  color: var(--ink-tertiary);
  flex-shrink: 0;
}
.node-action {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .list-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .segmented {
    flex: 0 0 auto;
  }
  .list-heading {
    font-size: 24px;
  }
  .detail-title {
    font-size: 26px;
  }
  .login-card {
    padding: 48px 40px 36px;
  }
}

@media (max-width: 400px) {
  .login-card {
    padding: 32px 24px 28px;
  }
  .list-main, .detail-main {
    padding-left: 16px;
    padding-right: 16px;
  }
  .topbar-inner {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ---------- Production ---------- */
body.is-booting .view { opacity: 0; }

.noscript {
  max-width: 400px;
  margin: 48px auto;
  padding: 0 16px;
  color: var(--ink-secondary);
  text-align: center;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.login-error,
.sheet-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  background: #F8F1F1;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #7F1D1D;
  text-align: left;
}

.sheet-error { margin: 0 0 12px; }

.origin-warn {
  margin: 0 0 16px;
  padding: 10px 12px;
  background: var(--amber-50);
  color: var(--amber-800);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}

#btn-register-extra { width: 100%; }

.list-error {
  text-align: center;
  padding: 28px 16px 8px;
}
.list-error p {
  margin: 0 0 12px;
  color: var(--ink-secondary);
  font-size: 14px;
}

.detail-error {
  padding: 32px 0;
  text-align: center;
  color: var(--ink-secondary);
}

.node-note {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}

.node-artifacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.mono-chip a {
  color: var(--accent);
  text-decoration: none;
}
.mono-chip a:hover { text-decoration: underline; }

.output-empty {
  margin: 0;
  font-size: 13px;
  color: var(--ink-tertiary);
}
