* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  background: #e9edf2;
  color: #1f2933;
}
.app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: #ffffff;
  position: relative;
  display: flex;
  flex-direction: column;
}
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: background-color .3s;
}
.content {
  flex: 1;
  padding: 32px 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.screen.center .content { justify-content: center; text-align: center; }
h1 { font-size: 22px; margin: 0 0 4px; }
p { margin: 0; line-height: 1.6; }
.sub { color: #52606d; font-size: 14px; }
.btn {
  display: block; width: 100%;
  padding: 15px 16px; border: none; border-radius: 12px;
  font-size: 17px; font-weight: 700; cursor: pointer;
  background: #2563eb; color: #fff;
}
a.btn { text-align: center; text-decoration: none; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.secondary { background: #fff; color: #2563eb; border: 2px solid #2563eb; }
.btn.red { background: #dc2626; }
.btn.green { background: #059669; }
.link { color: #2563eb; text-decoration: underline; cursor: pointer; background: none; border: none; font-size: 15px; padding: 4px 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input {
  font-size: 16px; padding: 12px; border: 1px solid #cbd2d9; border-radius: 10px;
}
.error { color: #dc2626; font-size: 14px; font-weight: 600; min-height: 1em; }
.notice { color: #047857; font-size: 14px; font-weight: 600; }
.qr {
  width: 200px; height: 200px; margin: 8px auto; border: 6px solid #1f2933; border-radius: 8px;
  background:
    linear-gradient(90deg, #1f2933 10%, transparent 10% 20%, #1f2933 20% 30%, transparent 30% 50%, #1f2933 50% 60%, transparent 60% 80%, #1f2933 80% 90%, transparent 90%),
    #fff;
  background-size: 100% 20px;
  opacity: .85;
}
.card { border: 1px solid #e4e7eb; border-radius: 14px; padding: 18px; background: #f8fafc; }
.interpreter { font-size: 26px; font-weight: 800; }
.timer { font-size: 56px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.screen.talking { background: #fee2e2; }
.screen.talking h1 { color: #b91c1c; font-size: 30px; }
.summary-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #e4e7eb; font-size: 18px; }
.summary-row strong { font-size: 22px; }
.spinner {
  width: 48px; height: 48px; margin: 8px auto; border-radius: 50%;
  border: 5px solid #bfdbfe; border-top-color: #2563eb; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* 右下の補助リンク「ログインに戻る」：青い文字リンク（下線なし、押せる範囲は高さ44px以上） */
.corner-link {
  position: absolute; right: 8px; bottom: 44px;
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 12px;
  color: #1F449C; text-decoration: none; font-size: 15px; font-weight: 600; background: transparent;
}
.corner-link:hover, .corner-link:focus-visible { text-decoration: none; opacity: .8; }
.support {
  background: #facc15; color: #1f2933; text-align: center;
  font-weight: 700; font-size: 14px; padding: 10px 8px;
}
.candidates { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 6px; }
.candidates li { padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid #e4e7eb; font-weight: 600; }
.candidates li.accepted { border-color: #059669; background: #ecfdf5; }
.summary-row.total { border-bottom: none; padding-top: 16px; }
.summary-row.total strong { font-size: 26px; }
.summary-row { gap: 12px; align-items: baseline; }
.summary-row > :last-child { white-space: nowrap; text-align: right; }
.candidates li small { display: block; font-size: 13px; font-weight: 400; color: #52606d; }
.notice.warn { color: #b45309; }
/* CHANGE_06：オーソリ画面（確認中・成功・失敗） */
.screen[hidden] { display: none; }
.auth-screen .content { align-items: center; }
.auth-screen .content > * { max-width: 100%; }
.auth-screen .btn { max-width: 320px; }
.auth-icon { width: 72px; height: 72px; margin: 8px auto; border-radius: 50%; position: relative; }
.auth-icon.spinner { border-width: 6px; }
.auth-ok-icon { background: #059669; }
.auth-ok-icon::after {
  content: ""; position: absolute; left: 25px; top: 14px; width: 16px; height: 32px;
  border: solid #fff; border-width: 0 6px 6px 0; transform: rotate(45deg);
}
.auth-fail-icon { background: #dc2626; }
.auth-fail-icon::before, .auth-fail-icon::after {
  content: ""; position: absolute; left: 33px; top: 16px; width: 6px; height: 40px; background: #fff; border-radius: 3px;
}
.auth-fail-icon::before { transform: rotate(45deg); }
.auth-fail-icon::after { transform: rotate(-45deg); }
.error-title { color: #dc2626; }
.auth-line { font-weight: 700; font-size: 17px; }
.explain-box {
  width: 100%; text-align: left; background: #f1f5f9; border: 1px solid #e4e7eb; border-radius: 12px;
  padding: 14px 16px; font-size: 14px; line-height: 1.6; color: #334e68;
}
.alpha-note { color: #92400e; font-weight: 700; font-size: 14px; }
