/* TapToRate: shared white, boxy design. Used by every page. */

@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --box: #fafafa;
  --line: #ebebeb;
  --line-strong: #d9d9d9;
  --text: #111111;
  --muted: #6b6b6b;
  --star: #f5b400;
  --red: #d92d20;
  --orange: #b54708;
  --green: #067647;
  --r: 18px;
  --r-sm: 12px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body {
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.5;
  background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; touch-action: manipulation; }
[hidden] { display: none !important; }

/* ---------- Icons (inline SVG, rounded strokes) ---------- */
.i {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.i.lg { width: 26px; height: 26px; }
.icon-tile {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line);
}

/* ---------- Layout ---------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)); }
.box { background: var(--box); border: 1px solid var(--line); border-radius: var(--r); }
.box.white { background: var(--bg); }

.top {
  position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { height: 60px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--text); color: var(--star);
  display: grid; place-items: center;
}
.logo-mark svg { width: 17px; height: 17px; fill: currentColor; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--box); color: var(--muted);
  font-size: 0.8125rem; font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 0.9375rem; font-weight: 500; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 9px 14px; cursor: pointer; touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease;
}
.btn .i { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.dark { background: var(--text); border-color: var(--text); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--red); }
.btn.big { font-size: 1rem; padding: 12px 20px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover:not(:disabled) { background: var(--box); border-color: #c4c4c4; }
  .btn.dark:hover:not(:disabled) { background: #2a2a2a; border-color: #2a2a2a; }
  .btn.ghost:hover:not(:disabled) { background: var(--box); border-color: transparent; }
}

/* ---------- Forms ---------- */
label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--muted); margin: 18px 0 6px; }
label:first-of-type { margin-top: 0; }
label small { font-weight: 400; }
.field {
  display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field:focus-within { border-color: var(--text); box-shadow: 0 0 0 3px rgba(17, 17, 17, .08); }
.field > span { color: var(--muted); padding-left: 14px; white-space: nowrap; }
.field input {
  flex: 1; min-width: 0; width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: transparent; border: 0; outline: 0; padding: 12px 14px;
}
.field > span + input { padding-left: 1px; }
.field input:disabled { color: var(--muted); }
.error { color: var(--red); font-size: 0.9375rem; min-height: 1.4em; margin-top: 10px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8125rem; }
.foot .wrap {
  padding-top: 22px; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
}

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