/** ManaBase のデザイントークン、リセット、全体基礎。 */
:root {
  color-scheme: light;
  --ink: #253447;
  --ink-soft: #556474;
  --canvas: #f5f5f1;
  --paper: #fff;
  --surface: var(--paper);
  --surface-soft: #eef1f2;
  --line: #d2d9dd;
  --line-strong: #a9b3bb;
  --brand: #263c52;
  --brand-deep: #1c2d40;
  --brand-soft: #e9eff2;
  --accent: #b44832;
  --accent-deep: #8f3425;
  --accent-soft: #f9ece6;
  --blue: #23658a;
  --blue-soft: #e4f2f8;
  --gold: #8a6215;
  --gold-soft: #f6efd5;
  --coral: #a9473a;
  --coral-soft: #fae2dd;
  --marker-yellow: rgba(236, 204, 109, 0.45);
  --subject-accent: var(--brand);
  --subject-soft: var(--brand-soft);
  --subject-ink: var(--brand-deep);
  --correct: #2f7450;
  --correct-soft: #e2f1e7;
  --danger: #a43f34;
  --danger-soft: #fae5e1;
  --focus: #1e6c9c;
  --shadow: 0 16px 48px rgba(28, 45, 64, 0.14);
  --radius-sm: 3px;
  --radius-md: 6px;
  --header-height: 76px;
  --font-sans: "BIZ UDPGothic", "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  --font-heading: "Yu Mincho", "Hiragino Mincho ProN", "Georgia", serif;
  --font-math: "Cambria Math", "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

mark {
  padding-inline: 0.08em;
  color: inherit;
  background: linear-gradient(transparent 54%, var(--marker-yellow) 54% 91%, transparent 91%);
  font-weight: 850;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

button,
input,
select,
textarea { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

img,
svg { display: block; max-width: 100%; }

var { font-family: var(--font-math); font-style: italic; }

h1,
h2,
h3,
p { overflow-wrap: anywhere; }

h1,
h2,
h3 { line-height: 1.35; }

fieldset { min-width: 0; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

::selection { color: var(--brand-deep); background: #e2eaf0; }

.ui-icon { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.startup-error {
  position: relative;
  z-index: 100;
  margin: 0;
  padding: 12px 20px;
  border-bottom: 1px solid #e8b8ae;
  color: #6c251c;
  background: var(--danger-soft);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
