:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #66717e;
  --soft: #89939f;
  --line: #dce2e7;
  --line-strong: #c9d2da;
  --paper: #ffffff;
  --canvas: #f3f5f6;
  --canvas-blue: #edf3f5;
  --primary: #186b78;
  --primary-dark: #10545f;
  --primary-soft: #dfeff1;
  --price: #bd5964;
  --danger: #b23f4d;
  --danger-soft: #fff0f1;
  --success: #217557;
  --success-soft: #e6f4ed;
  --shadow: 0 20px 60px rgb(33 54 61 / 8%);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --z-sticky: 20;
  --z-modal: 60;
  --z-toast: 80;
  font-family:
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

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

button,
input,
select {
  font: inherit;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  padding: 8px 11px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(24 107 120 / 13%);
}

input:disabled {
  color: var(--muted);
  background: #f0f2f3;
}

input::placeholder {
  color: #9aa4ac;
  opacity: 1;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgb(24 107 120 / 24%);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(calc(100% - 32px), 1120px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
}

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

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

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 16px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

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

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

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

.button-secondary:hover:not(:disabled) {
  background: #f7f9f9;
  border-color: #aeb9c1;
}

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

.button-danger:hover:not(:disabled) {
  background: #94313d;
}

.button-large {
  min-height: 50px;
  padding-inline: 24px;
}

.text-button {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 8px;
}

.text-button:hover {
  color: var(--ink);
}

.form-message {
  border: 1px solid #e7b8be;
  border-radius: 10px;
  background: var(--danger-soft);
  color: #842d38;
  padding: 10px 13px;
}

.state-panel {
  min-height: 220px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--muted);
  text-align: center;
}

.state-panel.compact {
  min-height: 160px;
}

.state-panel.is-error {
  color: var(--danger);
  border-color: #ecc4c9;
  background: #fffafa;
}

.loader {
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  transform: rotate(35deg);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px 12px 12px 3px;
  background: var(--primary);
  color: white;
  font-family: "Songti SC", "STSong", serif;
  font-size: 22px;
  font-weight: 700;
}

.plain-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.plain-card {
  width: min(100%, 520px);
  display: grid;
  justify-items: start;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 40px;
}

@media (max-width: 600px) {
  input,
  select {
    min-height: 46px;
    font-size: 16px;
  }

  .button {
    min-height: 44px;
  }
}

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