:root {
  --red: #d7262d;
  --red-bright: #e52d34;
  --red-deep: #a3181f;
  --red-dark: #7c151a;
  --red-tint: #fbe9e5;
  --cream: #f7eddd;
  --cream-deep: #efe0c9;
  --paper: #fffdf8;
  --ink: #241b17;
  --ink-soft: #6f6259;
  --ink-faint: #6f6156;
  --line: rgba(36, 27, 23, 0.13);
  --line-strong: rgba(36, 27, 23, 0.26);
  --amber: #f3b73c;
  --green: #2f6b4f;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC",
    "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI",
    "Noto Color Emoji", sans-serif;
  --font-mono: "SFMono-Regular", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --shadow-chunk: 0 3px 0 var(--red-deep), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --shadow-float: 0 18px 44px -18px rgba(36, 27, 23, 0.42);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
dd,
dt,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
  caret-color: var(--red);
}

button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(215, 38, 45, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--red);
  color: #fff;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(14px, 4vw, 32px);
}

.hidden,
[hidden] {
  display: none !important;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.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;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 500;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

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

.no-scroll {
  overflow: hidden;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.btn:active {
  transform: translateY(2px);
}

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

.btn--red {
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow-chunk);
}

.btn--red:hover {
  background: var(--red-bright);
}

.btn--red:active {
  box-shadow: 0 1px 0 var(--red-deep);
}

.btn--ink {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 3px 0 #000;
}

.btn--paper {
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn--line {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
}

.btn--line:hover {
  border-color: var(--ink);
}

.btn--sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

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

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--ink);
}

.icon-btn:active {
  transform: scale(0.94);
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  color: var(--red-deep);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 4px;
}

/* ---------- forms ---------- */
.field {
  display: block;
  margin-top: 15px;
}

.field__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.field__label small {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-faint);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  font-size: 16px;
  line-height: 1.4;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-faint);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(215, 38, 45, 0.12);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--red);
  background: #fff8f6;
}

.form-error {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--red-tint);
  color: var(--red-deep);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

/* ---------- motion ---------- */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sheet-up {
  from {
    transform: translateY(28px);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
