.watch-page {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.arrive-btn { user-select: none; }
.watch-url {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 16px;
}
.watch-url-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px;
  -webkit-tap-highlight-color: transparent;
}
.watch-url-summary::-webkit-details-marker { display: none; }
.watch-url-summary .kicker { margin: 0; }
.watch-url-summary .summary-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.watch-url-summary .summary-title::after {
  content: "▾";
  margin-left: 6px;
  display: inline-block;
  transition: transform .15s ease;
}
.watch-url[open] .watch-url-summary .summary-title::after { transform: rotate(180deg); }
.watch-url-body { padding: 0 20px 20px; }
.watch-url-body h1 { font-size: 22px; margin: 2px 0 10px; }
.watch-url .muted { margin: 0 0 14px; }
.url-all { margin: 0 0 18px; }
.url-all-code {
  margin: 0 0 10px;
  padding: 14px 16px;
  background: #f3eee4;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink);
  white-space: pre;
  overflow-x: auto;
  user-select: all;
}
.copy-all-btn {
  display: block;
  width: 100%;
  text-align: center;
}
.url-label {
  display: block;
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.url-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.url-row code {
  flex: 1 1 220px;
  display: block;
  background: #f3eee4;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  user-select: all;
  overflow-wrap: anywhere;
}
.copy-btn {
  appearance: none;
  border: 0;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.copy-btn.ok { background: var(--accent); }
.watch-qr {
  display: block;
  width: 168px;
  height: 168px;
  margin: 16px 0 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.watch-shell {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  flex: 1;
}
.watch-face {
  background: #101412;
  color: #f3f6f3;
  border-radius: 28px;
  padding: 36px 24px 28px;
  text-align: center;
  box-shadow: 0 16px 36px rgba(20, 30, 24, .14);
}
.watch-kicker {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: .08em;
  font-weight: 700;
  color: #8fd4b8;
}
.arrive-btn {
  appearance: none;
  border: 0;
  width: min(72vw, 280px);
  height: min(72vw, 280px);
  max-width: 280px;
  max-height: 280px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #2bd39a 0%, #0f8a66 42%, #0b5c46 100%);
  color: #fff;
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 800;
  letter-spacing: -.04em;
  cursor: pointer;
  box-shadow:
    0 12px 28px rgba(10, 70, 50, .35),
    inset 0 2px 0 rgba(255,255,255,.22);
  transition: transform .12s ease, filter .12s ease;
}
.arrive-btn:active,
.arrive-btn.pressed {
  transform: scale(.96);
  filter: brightness(.95);
}
.arrive-btn:disabled {
  cursor: default;
  filter: saturate(.85);
}
.arrive-btn.ok {
  background:
    radial-gradient(circle at 32% 28%, #7ee0b2 0%, #17885c 48%, #0d4d38 100%);
}
.mode-welcome .arrive-btn {
  background:
    radial-gradient(circle at 32% 28%, #ffd36a 0%, #d4891a 42%, #8a4d0c 100%);
}
.mode-welcome .arrive-btn.ok {
  background:
    radial-gradient(circle at 32% 28%, #ffe39a 0%, #e39a1f 48%, #7a430b 100%);
}
.mode-welcome .watch-kicker,
.mode-welcome .watch-status.ok { color: #f3d48a; }
.mode-walk .arrive-btn {
  background:
    radial-gradient(circle at 32% 28%, #7ec8ff 0%, #1e6fb3 42%, #0c3f6e 100%);
}
.mode-walk .arrive-btn.ok {
  background:
    radial-gradient(circle at 32% 28%, #b5deff 0%, #2a86d1 48%, #0d4a80 100%);
}
.mode-walk .watch-kicker,
.mode-walk .watch-status.ok { color: #9fd0f5; }
.watch-embed {
  background: #0b0e0c;
  min-height: 100dvh;
  min-height: 100vh;
}
.watch-embed .watch-shell {
  padding: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100dvh;
  min-height: 100vh;
}
.watch-embed .watch-face {
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 8px 12px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.watch-embed .arrive-btn {
  width: min(58vw, 58vh);
  height: min(58vw, 58vh);
  font-size: clamp(18px, 6.4vw, 32px);
}
.watch-status {
  margin: 18px 0 0;
  min-height: 1.4em;
  color: #c8d4cc;
  font-size: 15px;
}
.watch-status.ok { color: #8fd4b8; font-weight: 700; }
.watch-status.err { color: #f0b4a8; }
.watch-history {
  margin-top: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 12px;
}
.watch-history h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.arrive-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.arrive-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.arrive-list li:last-child { border-bottom: 0; }
.arrive-list time { color: var(--muted); font-size: 13px; white-space: nowrap; }

.watch-preview {
  margin-top: 16px;
}
.preview-title {
  margin: 0 4px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
}
.preview-title .dim {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  opacity: .7;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.mode-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  border-radius: 22px;
  padding: 18px 20px;
  color: #fff;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  filter: grayscale(1) saturate(0);
  transition: transform .15s ease, box-shadow .2s ease, filter .35s ease;
}
.mode-card.on {
  filter: grayscale(0) saturate(1);
}
.mode-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 45%);
  pointer-events: none;
}
.mode-card:active {
  transform: scale(.96);
}
.mode-card:not(.on):active {
  filter: grayscale(1) saturate(0) brightness(.94);
}
.mode-card.on:active {
  filter: grayscale(0) saturate(1) brightness(.95);
}
.mode-icon {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.28));
}
.mode-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.mode-label {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.mode-value-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .01em;
  opacity: .82;
}
.mode-value-row .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.7);
  flex: none;
}
.mode-card.on .mode-value-row .dot {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,.28);
}
.mode-card.on .mode-value-row {
  opacity: 1;
}
.mode-card.mode-home {
  background: radial-gradient(120% 140% at 22% 14%, #35e0a6 0%, #0f8a66 55%, #0b5c46 100%);
  box-shadow: 0 10px 22px rgba(15,138,102,.28);
}
.mode-card.mode-home.on {
  box-shadow: 0 14px 30px rgba(15,138,102,.42), inset 0 0 0 2px rgba(255,255,255,.32);
}
.mode-card.mode-welcome {
  background: radial-gradient(120% 140% at 22% 14%, #ffd97a 0%, #d4891a 55%, #8a4d0c 100%);
  box-shadow: 0 10px 22px rgba(212,137,26,.28);
}
.mode-card.mode-welcome.on {
  box-shadow: 0 14px 30px rgba(212,137,26,.42), inset 0 0 0 2px rgba(255,255,255,.32);
}
.mode-card.mode-walk {
  background: radial-gradient(120% 140% at 22% 14%, #8ed2ff 0%, #1e6fb3 55%, #0c3f6e 100%);
  box-shadow: 0 10px 22px rgba(30,111,179,.28);
}
.mode-card.mode-walk.on {
  box-shadow: 0 14px 30px rgba(30,111,179,.42), inset 0 0 0 2px rgba(255,255,255,.32);
}

@media (max-width: 420px) {
  .watch-page .site-header,
  .watch-page .site-footer {
    display: none;
  }
  .watch-page {
    background:
      radial-gradient(120% 60% at 20% -10%, rgba(255,255,255,.07), transparent 60%),
      #0b0e0c;
    min-height: 100dvh;
    min-height: 100vh;
  }
  .watch-shell {
    padding: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100dvh;
    min-height: 100vh;
  }
  .watch-face {
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 8px 12px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .watch-kicker { font-size: 12px; margin-bottom: 10px; }
  .arrive-btn {
    width: min(58vw, 58vh);
    height: min(58vw, 58vh);
    font-size: clamp(22px, 7vw, 34px);
  }
  .watch-status { font-size: 12px; margin-top: 12px; }
  .watch-history,
  .watch-url { display: none; }

  .watch-preview {
    flex: 1;
    display: flex;
    margin-top: 0;
    padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  }
  .preview-title { display: none; }
  .preview-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .mode-card {
    flex: 1;
    padding: 0 24px;
    border-radius: 26px;
  }
  .mode-icon { font-size: 36px; }
  .mode-label { font-size: 19px; }
  .mode-value-row { font-size: 13.5px; }
}
