/* Piylove — shared tokens & controls */
:root {
  --white: #ffffff;
  --pink: #ffddeb;
  --blue: #dcefff;
  --grey: #777777;

  --ink: #3a3341;          /* soft plum ink for text */
  --ink-soft: #5d5566;
  --pink-deep: #e58fb3;    /* strokes, focus, small accents */
  --blue-deep: #79b3e2;
  --line: #efe8ee;
  --paper: #fdfbfc;
  --ok: #3f8f6b;
  --ok-bg: #e5f5ec;
  --warn: #9a6a12;
  --warn-bg: #fff4dc;
  --err: #b5475f;
  --err-bg: #ffe9ee;

  --r-lg: 26px;
  --r-md: 16px;
  --r-sm: 11px;

  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --airmail: repeating-linear-gradient(
    -45deg,
    var(--pink) 0 10px,
    var(--white) 10px 14px,
    var(--blue) 14px 24px,
    var(--white) 24px 28px
  );
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field > label,
.label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.hint {
  font-size: 0.8125rem;
  color: var(--grey);
  margin: 0;
}

.input,
textarea.input,
select.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  font-size: 1rem; /* ≥16px keeps iOS from zooming */
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea.input {
  resize: vertical;
  min-height: 96px;
  line-height: 1.45;
}

.input::placeholder {
  color: #aaa3ac;
}

.input:hover {
  border-color: #e4d9e2;
}

.input:focus {
  outline: none;
  border-color: var(--pink-deep);
  box-shadow: 0 0 0 4px var(--pink);
}

.btn {
  --bg: var(--ink);
  --fg: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-weight: 650;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  background: #2c2632;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.btn-soft {
  --bg: var(--pink);
  --fg: var(--ink);
}
.btn-soft:hover {
  background: #ffd0e3;
}

.btn-sky {
  --bg: var(--blue);
  --fg: var(--ink);
}
.btn-sky:hover {
  background: #cde6fd;
}

.btn-ghost {
  --bg: transparent;
  --fg: var(--ink-soft);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover {
  background: var(--paper);
}

.btn-small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}

.btn:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: 3px;
}

.notice {
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.notice[hidden] {
  display: none;
}
.notice.error {
  background: var(--err-bg);
  color: var(--err);
}
.notice.info {
  background: var(--blue);
  color: #2f5875;
}
.notice.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

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

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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