/* AZismクイズ 共通の土台。色は AZism の青が主役・赤は差し色。AZくんのマンガ調に合わせ、太い線と影ずらしで遊び心を出す */
:root {
  color-scheme: light;
  --blue: #1b5fb0;
  --blue-deep: #13438a;
  --navy: #13294b;
  --red: #d7282f;
  --yellow: #ffc940;
  --sky: #2fb5e8;
  --ink: #1a2233;
  --ink-soft: #4b5670;
  --muted: #6b7690;
  --line: #13294b;
  --paper: #ffffff;
  --bg: #eef3fb;
  --bg-dot: rgba(27, 95, 176, 0.09);
  --ok: #138a4a;
  --ok-bg: #e6f6ec;
  --ng: #c2262c;
  --ng-bg: #fdecec;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 4px 4px 0 var(--line);
  --shadow-sm: 3px 3px 0 var(--line);
  --font: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(var(--bg-dot) 1.2px, transparent 1.4px);
  background-size: 14px 14px;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.ic {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.2em;
}

.ic-wrap {
  display: inline-flex;
  align-items: center;
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- ボタン ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 52px;
  padding: 0.7em 1.4em;
  border: 2.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy);
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.15s;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--line);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-accent {
  background: var(--red);
  color: #fff;
}

.btn-yellow {
  background: var(--yellow);
  color: var(--navy);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-lg {
  min-height: 62px;
  font-size: 1.2rem;
}

.btn-ghost {
  border-color: transparent;
  box-shadow: none;
  background: transparent;
  min-height: 48px;
  padding: 0.5em 0.8em;
}

.btn-ghost:active {
  transform: none;
  background: rgba(19, 41, 75, 0.06);
}

/* ---- カード ---- */
.card {
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.15em 0.7em;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--yellow);
  color: var(--navy);
  line-height: 1.5;
}

.badge-kari {
  background: #fff;
  color: var(--muted);
  border-color: #b9c1d3;
  font-weight: 700;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 2px solid var(--ng);
  border-radius: var(--radius-sm);
  background: var(--ng-bg);
  color: #7d1419;
  font-weight: 700;
}

.notice .ic {
  margin-top: 0.2em;
}

.confetti {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
}

.sound-toggle {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--navy);
}

.sound-toggle .ic {
  width: 22px;
  height: 22px;
}

.sound-toggle[aria-pressed='true'] {
  background: var(--yellow);
}

@keyframes pop-in {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  70% {
    transform: scale(1.06);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

@keyframes slide-up {
  from {
    transform: translateY(18px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}

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

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(27, 95, 176, 0.2);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
