/* shell.css — 兩版共用的最外層。各版自己的樣式放 a.css（.skin-a 底下）和 b.css（.skin-b 底下）。 */
html, body { margin: 0; padding: 0; height: 100%; }
body { -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
#root { min-height: 100dvh; }
*, *::before, *::after { box-sizing: border-box; }
button, input, textarea, select { font: inherit; }
img, video { max-width: 100%; }

.shell-crash {
  min-height: 100dvh; padding: 24px 16px; display: flex; flex-direction: column; gap: 12px;
  background: #1c1c1c; color: #f2f2f2;
  font-family: "Noto Sans TC", system-ui, sans-serif; font-size: 14px; line-height: 22px;
}
.shell-crash pre { margin: 0; white-space: pre-wrap; color: #b8b8b8; font-size: 12px; }
.shell-crash button {
  align-self: flex-start; min-height: 44px; padding: 0 16px; border-radius: 10px;
  border: 1px solid #5a5a5a; background: transparent; color: #f2f2f2;
}

/* ---------- 登入、用邀請連結設密碼（auth.js）。A 版是淺色，B 版是深色。 ---------- */
.auth {
  --auth-bg: #f6f5f2; --auth-card: #ffffff; --auth-ink: #1f1d1a; --auth-ink-2: #6b665f; --auth-line: #d9d5ce;
  --auth-pri: #1f1d1a; --auth-pri-ink: #ffffff; --auth-err: #a3341f; --auth-focus: #1f1d1a;
  min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: var(--auth-bg); color: var(--auth-ink);
  font-family: "Noto Sans TC", system-ui, sans-serif; font-size: 14px; line-height: 22px;
}
.auth[data-skin="b"] {
  --auth-bg: #141414; --auth-card: #1c1c1c; --auth-ink: #f2f2f2; --auth-ink-2: #a3a3a3; --auth-line: #3a3a3a;
  --auth-pri: #f2f2f2; --auth-pri-ink: #141414; --auth-err: #ff9d8a; --auth-focus: #f2f2f2;
}
.auth-box { width: 100%; max-width: 360px; padding: 28px 24px; background: var(--auth-card); border: 1px solid var(--auth-line); border-radius: 14px; }
.auth-brand { margin: 0 0 20px; font-size: 12px; line-height: 18px; letter-spacing: 0.08em; color: var(--auth-ink-2); }
.auth-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 500; }
.auth-lead { margin: 8px 0 0; color: var(--auth-ink-2); }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-label { font-size: 13px; line-height: 20px; color: var(--auth-ink-2); }
.auth-input {
  width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--auth-line);
  background: transparent; color: inherit; font-size: 16px; line-height: 24px;   /* 16px：iPhone 點下去才不會自己放大 */
}
.auth-input:focus-visible, .auth-btn:focus-visible, .auth-link:focus-visible { outline: 2px solid var(--auth-focus); outline-offset: 2px; }
.auth-hint { margin: 0; font-size: 12px; line-height: 18px; color: var(--auth-ink-2); }
.auth-link { padding: 0; border: 0; background: none; color: var(--auth-ink-2); font-size: 12px; line-height: 20px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth-error { margin: 0; color: var(--auth-err); }
.auth-btn {
  min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--auth-pri);
  background: var(--auth-pri); color: var(--auth-pri-ink); font-size: 15px; font-weight: 500; cursor: pointer;
}
.auth-btn:disabled { opacity: 0.45; cursor: default; }
.auth-btn.is-quiet { margin-top: 20px; width: 100%; background: transparent; color: var(--auth-ink); border-color: var(--auth-line); }
.auth-foot { margin: 20px 0 0; font-size: 12px; line-height: 18px; color: var(--auth-ink-2); }
