/* 用 Google 登入 → 選一台電腦 → 確認數字 (P10). 墨 Mono, phone first. */

/* ── Sign-in ────────────────────────────────────────────────── */
.gs {
  gap: var(--space-8);
  overflow-y: auto;
  padding: calc(var(--safe-top) + var(--space-10)) var(--space-6)
    calc(max(var(--safe-bottom), var(--space-4)) + var(--space-2));
}

.gs-hero {
  display: flex;
  flex-direction: column;
}

.gs-hero .wordmark {
  margin-bottom: var(--space-10);
}

.gs-art {
  width: min(232px, 64vw);
  height: auto;
  margin: 0 0 var(--space-8) -6px;
  overflow: visible;
}

.gs-line,
.gs-faint,
.gs-dash,
.gs-lock {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gs-line {
  stroke: var(--c-ink);
  stroke-width: 2;
}

.gs-faint {
  stroke: var(--c-ink-faint);
  stroke-width: 2;
}

.gs-dash {
  stroke: var(--c-ink-muted);
  stroke-width: 1.5;
  stroke-dasharray: 2 5;
  animation: gs-flow 1.6s linear infinite;
}

.gs-seal {
  fill: var(--c-inverse);
}

.gs-lock {
  stroke: var(--c-inverse-ink);
  stroke-width: 1.6;
}

@keyframes gs-flow {
  to {
    stroke-dashoffset: -14;
  }
}

.gs-title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-tight);
}

.gs-sub {
  margin: 0;
  max-width: 34ch;
  color: var(--c-ink-muted);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  text-wrap: pretty;
}

.gs-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
}

/* Google draws its own button (an iframe) inside this slot; it stays centred and full width up to 400 px. */
.gs-button {
  display: flex;
  justify-content: center;
  min-height: 44px;
  color-scheme: normal;
}

.gs-redirect {
  align-self: center;
  color: var(--c-ink-faint);
  font-size: var(--text-xs);
}

.gs-or {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-2) 0;
  color: var(--c-ink-faint);
  font-size: var(--text-xs);
}

.gs-or::before,
.gs-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--c-line);
}

.pair-google {
  align-self: center;
  color: var(--c-ink-muted);
}

/* ── 選一台電腦 ─────────────────────────────────────────────── */
.gs .pc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: calc(var(--space-6) * -1) 0 0 calc(var(--space-3) * -1);
}

.pc-account {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: 72%;
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
}

.pc-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-inverse);
  color: var(--c-inverse-ink);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.pc-email {
  overflow: hidden;
  color: var(--c-ink-muted);
  font-size: var(--text-sm);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pc-head .gs-title {
  margin-bottom: var(--space-2);
}

.pc-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pc-list[aria-busy="true"]::before {
  content: "";
  height: 76px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--c-surface) 0%, var(--c-surface-raised) 50%, var(--c-surface) 100%);
  background-size: 200% 100%;
  animation: pc-shimmer 1.2s linear infinite;
}

@keyframes pc-shimmer {
  to {
    background-position: -200% 0;
  }
}

.pc-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  min-height: 76px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--radius-lg);
  background: var(--c-surface-raised);
  color: var(--c-ink);
  text-align: left;
  transition:
    transform var(--dur-fast) var(--ease-out),
    background-color var(--dur-base) var(--ease-out);
}

.pc-item:active {
  background: var(--c-active);
  transform: scale(0.985);
}

.pc-item[data-online="false"] {
  border-color: var(--c-line);
  background: transparent;
}

.pc-item > svg:last-child {
  flex: none;
  color: var(--c-ink-faint);
}

.pc-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--c-surface-sunken);
}

.pc-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.pc-text b {
  overflow: hidden;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pc-state {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--c-ink-muted);
  font-size: var(--text-sm);
}

.pc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-ink-faint);
}

.pc-item[data-online="true"] .pc-dot {
  background: var(--c-success);
  box-shadow: 0 0 0 3px var(--c-success-soft);
}

.pc-note {
  margin: 0;
  color: var(--c-ink-faint);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.pc-note.pc-error {
  color: var(--c-danger);
}

.pc-empty {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--c-ink);
  font-weight: var(--weight-medium);
}

.pc-refresh {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-2);
  margin: calc(var(--space-4) * -1) 0 0 calc(var(--space-3) * -1);
  color: var(--c-ink-muted);
}

/* ── 確認數字 ───────────────────────────────────────────────── */
.sas {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto 0;
  text-align: center;
  animation: rise var(--dur-slow) var(--ease-spring);
}

.sas-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-5);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
  color: var(--c-ink-muted);
  font-size: var(--text-sm);
}

.sas-title {
  margin-bottom: var(--space-8);
}

.sas-frame {
  width: 100%;
  margin-bottom: var(--space-6);
  padding: var(--space-5) var(--space-4) var(--space-6);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--radius-xl);
  background: var(--c-surface-raised);
}

.sas-label {
  margin: 0 0 var(--space-3);
  color: var(--c-ink-faint);
  font-size: var(--text-xs);
  letter-spacing: 0.24em;
  text-indent: 0.24em;
}

.sas-num {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(40px, 13vw, 56px);
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  line-height: 1.1;
  white-space: nowrap;
  transition: opacity var(--dur-base) var(--ease-out);
}

.sas-num.sas-dim {
  opacity: 0.3;
}

.sas-sub {
  margin: 0 auto var(--space-6);
  font-size: var(--text-sm);
  /* Short centred lines: break at punctuation, never inside 「允許」. */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.sas-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  color: var(--c-ink-muted);
  font-size: var(--text-sm);
}

.sas-dots {
  display: inline-block;
  width: 26px;
  height: 6px;
  background: radial-gradient(circle, currentColor 2.5px, transparent 3px) 0 50% / 9px 6px repeat-x;
  animation: sas-breathe 1.4s var(--ease-in-out) infinite;
}

@keyframes sas-breathe {
  50% {
    opacity: 0.3;
  }
}

.sas-fail {
  color: var(--c-danger);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.sas-cancel {
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .gs-dash,
  .sas-dots,
  .pc-list[aria-busy="true"]::before {
    animation: none;
  }
}

/* P12: the code shown on the phone, and /computer-signin. */
.sas-left {
  margin: var(--space-2) 0 0;
  color: var(--c-ink-faint);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

.sas-again {
  margin-bottom: var(--space-3);
}

.sas-again[hidden] {
  display: none;
}

/* Opened in the computer's browser: a centred column, not a phone-wide one. */
.cs {
  box-sizing: border-box;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.cs .gs-hero {
  align-items: center;
  text-align: center;
}

.cs .gs-sub {
  margin-inline: auto;
}

.cs-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: var(--space-6) auto var(--space-4);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--radius-lg);
  color: var(--c-ink-muted);
}

.cs-go {
  justify-content: center;
  text-decoration: none;
}

.cs-again {
  display: block;
  margin-top: var(--space-6);
  text-align: center;
}

/* ── Google 按鈕（依 Google 品牌規範的標準樣式） ─────────────────── */
.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  align-self: center;
  width: 100%;
  max-width: 400px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #8e918f;
  background: #131314;
  color: #e3e3e3;
  font:
    500 15px / 20px "Roboto",
    system-ui,
    -apple-system,
    "PingFang TC",
    sans-serif;
  letter-spacing: 0.25px;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.g-btn:active {
  background: #2a2b2c;
}
.g-btn:focus-visible {
  outline: 2px solid var(--c-ink);
  outline-offset: 2px;
}
.g-btn .g-mark {
  flex: none;
  width: 18px;
  height: 18px;
}
[data-theme="light"] .g-btn {
  background: #fff;
  border-color: #747775;
  color: #1f1f1f;
}
[data-theme="light"] .g-btn:active {
  background: #f2f2f2;
}
