:root {
  color-scheme: light;
  --color-bg: #fffaf2;
  --color-surface: #ffffff;
  --color-text: #253047;
  --color-heading: #102d59;
  --color-muted: #6f7787;
  --color-primary: #2f77c9;
  --color-primary-strong: #235fa5;
  --color-primary-soft: #eaf2fc;
  --color-border: #e8e2d8;
  --color-focus: #f0a83a;
  --radius-card: 24px;
  --radius-control: 14px;
  --shadow-card: 0 8px 30px rgba(37, 48, 71, 0.09);
  --shadow-control: 0 4px 14px rgba(37, 48, 71, 0.1);
  --font-rounded: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, -apple-system, sans-serif;
}

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

html {
  min-width: 320px;
  background: var(--color-bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: var(--font-rounded);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 4px solid color-mix(in srgb, var(--color-focus) 82%, white);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  color: white;
  background: var(--color-heading);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  font-size: 1.05rem;
  font-weight: 760;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: var(--shadow-control);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(37, 48, 71, 0.14);
}

.button:disabled {
  color: #969ca8;
  background: #f1f0ed;
  border-color: #e8e5df;
  box-shadow: none;
  cursor: not-allowed;
}

.button-primary {
  color: white;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.button-primary:hover:not(:disabled) {
  background: var(--color-primary-strong);
}

.button-secondary,
.button-quiet {
  color: var(--color-heading);
  background: var(--color-surface);
}

.button-quiet {
  box-shadow: none;
}

.button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loading-state,
.message-panel {
  width: min(100%, 560px);
  margin: 48px auto;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.loading-state {
  color: var(--color-muted);
  font-size: 1.05rem;
}

.message-panel h1,
.message-panel h2 {
  margin: 0 0 10px;
  color: var(--color-heading);
}

.message-panel p {
  margin: 0 0 22px;
  color: var(--color-muted);
  line-height: 1.65;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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