* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --bg: #17221a;
  --rail: #19241b;
  --surface: #232e26;
  --raised: #29352c;
  --line: #39463b;
  --line-strong: #465347;
  --ink: #f1edde;
  --muted: #b9c6aa;
  --soft: #a2af9e;
  --accent: #edab81;
  --accent-glow: rgb(237 171 129 / 15%);
  --good: #a8d69b;
  --warn: #f3bb84;
  --bad: #f49d96;
  --info: #b9c6aa;
  --radius: 14px;
  --silk: linear-gradient(180deg, #1d2a1f, #141e16 60%, #0d130f);
  --ui-font: "Segoe UI", Roboto, system-ui, sans-serif;
  --heading: var(--ui-font);
  font: 16px/1.5 var(--ui-font);
}
body {
  margin: 0;
  background: var(--silk) fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4, .brand, .sign-brand { font-family: var(--heading); }
h1 { font-size: clamp(1.65rem, 3.5vw, 2.1rem); line-height: 1.18; letter-spacing: -.018em; font-weight: 650; }
h2 { font-size: 1.15rem; line-height: 1.3; font-weight: 650; }
h3 { font-size: 0.98rem; font-weight: 650; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .56; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--rail); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--soft); }

input:not([type="checkbox"]), select {
  min-height: 40px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: .5rem .75rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:not([type="checkbox"]):focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}
input::placeholder { color: var(--soft); }
input[type="checkbox"] { accent-color: var(--accent); width: 17px; height: 17px; cursor: pointer; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 38px;
  padding: .45rem .85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--raised);
  color: var(--ink);
  text-decoration: none;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  font-weight: 600;
  font-size: .88rem;
  transition: all .15s ease;
}
.button:not(:disabled):hover {
  border-color: var(--soft);
  background: rgba(162, 204, 172, 0.12);

}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #26201a;
}
.button.primary:not(:disabled):hover {
  background: #f3cda1;
  color: #211c17;
}
.button.ghost { background: transparent; }
.button.ghost:not(:disabled):hover { background: rgba(162, 204, 172, 0.08); }
.button.danger { color: var(--bad); }
.button.danger:not(:disabled):hover { background: rgba(248, 113, 113, 0.12); border-color: var(--bad); }

.symbol {
  display: inline-block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex: none;
}
.brand-mark {
  display: inline-block;
  width: 44px;
  height: 44px;
  flex: none;
  background: url("../brand/piyola.svg") center / contain no-repeat;
}

.notice {
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--good);
  background: rgba(74, 222, 128, 0.06);
  overflow-wrap: anywhere;
}
.notice[data-error="true"], .form-error {
  color: var(--bad);
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.3);
}
code {
  font: .86em ui-monospace, "Cascadia Code", Consolas, monospace;
  overflow-wrap: anywhere;
  background: rgba(0, 0, 0, 0.28);
  padding: .15rem .35rem;
  border-radius: 4px;
  border: 1px solid var(--line);
}
label { display: grid; gap: .3rem; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
@media (max-width: 620px) {
  input:not([type="checkbox"]), select { font-size: 16px; }
}
