:root {
  --line-green: #06c755;
  --line-green-pressed: #05a847;
  --bg: #f5f6f7;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #5c6166;
  --border: #dfe3e6;
  --notice-bg: #fff7e0;
  --notice-text: #6b4e00;
  --focus: #1a73e8;
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111314;
    --card: #1c1f21;
    --text: #f1f3f4;
    --muted: #a8afb5;
    --border: #33383c;
    --notice-bg: #3a3000;
    --notice-text: #ffe38a;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 22px;
  text-align: center;
}

.title {
  font-size: 1.3rem;
  line-height: 1.4;
  margin: 0 0 12px;
  outline: none;
}

.message {
  margin: 0 0 16px;
  line-height: 1.7;
  color: var(--text);
}

.notice {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--notice-bg);
  color: var(--notice-text);
  line-height: 1.6;
  font-size: 0.95rem;
}

.hint,
.code,
.status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.status:empty {
  display: none;
}

.detail {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}

.problems {
  text-align: left;
  margin: 0 0 16px;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn-primary {
  background: var(--line-green);
  color: #ffffff;
}

.btn-primary:active {
  background: var(--line-green-pressed);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-link {
  min-height: 44px;
  background: transparent;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.95rem;
  text-decoration: underline;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  display: block;
  background: var(--border);
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 4px auto 16px;
  border-radius: 50%;
  border: 4px solid var(--border);
  border-top-color: var(--line-green);
  animation: spin 0.9s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2.4s;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.noscript {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0;
  padding: 12px;
  background: var(--notice-bg);
  color: var(--notice-text);
  text-align: center;
}
