:root {
  color-scheme: light;
  --paper: #f3f1ea;
  --paper-soft: #faf8f2;
  --paper-deep: #e7e3d8;
  --ink: #27312d;
  --ink-soft: #657069;
  --line: #d6d3c8;
  --moss: #55705a;
  --moss-deep: #344a3b;
  --moss-wash: #dfe9df;
  --mist: #5f7889;
  --mist-wash: #dce7ec;
  --honey: #dea63a;
  --honey-wash: #f6e9c8;
  --coral: #be5b4f;
  --coral-deep: #8d4038;
  --coral-wash: #f4dfda;
  --white: #ffffff;
  --shadow-soft: 0 18px 50px rgba(62, 69, 62, 0.10);
  --shadow-small: 0 8px 24px rgba(62, 69, 62, 0.08);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-round: 999px;
  --font-display: "Avenir Next", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-data: "SFMono-Regular", "Roboto Mono", "Noto Sans Mono CJK SC", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
}

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

button {
  color: inherit;
}

button,
[role="button"],
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--mist) 70%, white);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

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

.eyebrow {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-data);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-height: 32px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-round);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 650;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pill--ok {
  color: var(--moss);
  border-color: color-mix(in srgb, var(--moss) 28%, var(--line));
}

.pill--warn {
  color: var(--coral);
  border-color: color-mix(in srgb, var(--coral) 30%, var(--line));
  background: var(--coral-wash);
}

.button {
  min-height: 48px;
  padding: 0.72rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius-round);
  background: var(--moss-deep);
  color: var(--white);
  font-weight: 720;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-small);
}

.button:active {
  transform: translateY(0);
}

.button--quiet {
  border-color: var(--line);
  background: var(--paper-soft);
  color: var(--ink);
}

.button--danger {
  background: var(--coral);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-soft);
  color: var(--ink);
  cursor: pointer;
}

.field {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
}

.field::placeholder {
  color: #929990;
}

.field-label {
  display: grid;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 680;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 48px));
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--paper-soft);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

dialog::backdrop {
  background: rgba(39, 49, 45, 0.46);
  backdrop-filter: blur(5px);
}

.dialog-body {
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
}

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