/* ==========================================================================
   איסלנד 2026 — משפחת ששון
   Palette drawn from the island itself: black basalt, glacier blue,
   moss green, and the low arctic sun.
   ========================================================================== */

:root {
  --basalt-900: #0d1117;
  --basalt-800: #151b24;
  --basalt-700: #1e2632;
  --basalt-600: #2a3441;
  --basalt-500: #3d4a5c;

  --glacier-400: #7fd4e8;
  --glacier-300: #a5e3f2;
  --glacier-600: #2b9ec4;

  --moss-400: #6fbf8b;
  --moss-600: #3d8f5c;

  --sun-400: #f5b544;
  --sun-500: #e89a1c;

  --lava-400: #f2704f;
  --lava-500: #d94f2b;

  --ink: #e8eef5;
  --ink-dim: #a7b4c4;
  --ink-faint: #6b7a8d;

  --surface: var(--basalt-800);
  --surface-raised: var(--basalt-700);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3);

  --font: 'Heebo', 'Assistant', -apple-system, BlinkMacSystemFont,
          'Segoe UI', 'Arial Hebrew', 'Noto Sans Hebrew', sans-serif;

  --header-h: 62px;
  --nav-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: var(--basalt-900);
  color: var(--ink);
  direction: rtl;
  line-height: 1.65;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Aurora wash behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 15% -5%, rgba(111, 191, 139, 0.16), transparent 60%),
    radial-gradient(ellipse 70% 45% at 85% 0%, rgba(127, 212, 232, 0.14), transparent 60%),
    radial-gradient(ellipse 90% 60% at 50% 105%, rgba(43, 158, 196, 0.08), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--glacier-400); text-decoration: none; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--glacier-400);
  outline-offset: 2px;
  border-radius: 6px;
}

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

/* ============================================================ login gate */

.gate {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.gate-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(160deg, rgba(30, 38, 50, 0.92), rgba(21, 27, 36, 0.96));
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  padding: 40px 30px 34px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.gate-flag { font-size: 46px; line-height: 1; margin-bottom: 14px; }

.gate-card h1 {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--glacier-300), var(--moss-400) 65%, var(--sun-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gate-card .tagline { color: var(--ink-dim); font-size: 15px; margin-top: 6px; }

.gate-dates {
  display: inline-block;
  margin-top: 14px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(127, 212, 232, 0.1);
  border: 1px solid rgba(127, 212, 232, 0.25);
  color: var(--glacier-300);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.gate form { margin-top: 26px; display: grid; gap: 12px; }

.field { text-align: right; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
  margin-bottom: 6px;
}

input[type='text'], input[type='password'], textarea {
  width: 100%;
  padding: 13px 15px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s, box-shadow 0.18s;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--glacier-600);
  box-shadow: 0 0 0 3px rgba(43, 158, 196, 0.18);
}

.code-input {
  text-align: center;
  letter-spacing: 0.18em;
  font-weight: 700;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: transform 0.15s, filter 0.15s, background 0.15s;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--glacier-600), var(--moss-600));
  color: #fff;
  box-shadow: 0 6px 20px rgba(43, 158, 196, 0.3);
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  color: var(--ink-dim);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); }

.error-msg {
  color: var(--lava-400);
  font-size: 14px;
  font-weight: 600;
  min-height: 20px;
}

.gate-hint {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.5;
}

/* ================================================================= shell */

.app { position: relative; z-index: 1; display: none; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.app.active { display: block; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-title { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.topbar-sub { font-size: 11.5px; color: var(--ink-faint); font-weight: 500; }
.topbar-spacer { flex: 1; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px;
  color: #0d1117;
  flex-shrink: 0;
}

.countdown {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(245, 181, 68, 0.12);
  border: 1px solid rgba(245, 181, 68, 0.3);
  color: var(--sun-400);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.countdown.live {
  background: rgba(111, 191, 139, 0.14);
  border-color: rgba(111, 191, 139, 0.35);
  color: var(--moss-400);
}

main { max-width: 780px; margin: 0 auto; padding: 18px 16px 30px; }

/* ============================================================== bottom nav */

.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 60;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
}

.tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 600;
  transition: color 0.18s;
  position: relative;
}
.tabbar button .ico { font-size: 20px; line-height: 1; transition: transform 0.2s; }
.tabbar button.active { color: var(--glacier-400); }
.tabbar button.active .ico { transform: translateY(-2px) scale(1.08); }
.tabbar button.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--glacier-400);
}

/* ================================================================== days */

.day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.day-strip::-webkit-scrollbar { display: none; }

.day-chip {
  flex: 0 0 auto;
  scroll-snap-align: center;
  min-width: 62px;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.18s;
}
.day-chip .dow { font-size: 10.5px; color: var(--ink-faint); font-weight: 600; }
.day-chip .dnum { font-size: 17px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.day-chip .dmon { font-size: 10px; color: var(--ink-faint); }
.day-chip.active {
  background: linear-gradient(150deg, var(--glacier-600), var(--moss-600));
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(43, 158, 196, 0.32);
}
.day-chip.active .dow, .day-chip.active .dmon { color: rgba(255, 255, 255, 0.85); }
.day-chip.today::after {
  content: '';
  display: block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--sun-400);
  margin: 3px auto 0;
}

.day-head {
  padding: 18px 0 14px;
  animation: fade 0.35s;
}
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.day-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--glacier-400);
  letter-spacing: 0.04em;
}
.day-head h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-top: 2px;
  line-height: 1.2;
}
.day-head .sub { color: var(--ink-dim); font-size: 15px; margin-top: 5px; }

.day-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--ink-dim);
  font-weight: 600;
}

/* ------------------------------------------------------------- stay card */

.stay {
  display: block;
  margin: 16px 0 8px;
  padding: 15px 16px;
  border-radius: var(--radius);
  background: linear-gradient(140deg, rgba(111, 191, 139, 0.13), rgba(43, 158, 196, 0.07));
  border: 1px solid rgba(111, 191, 139, 0.24);
}
.stay-top { display: flex; align-items: center; gap: 9px; }
.stay-label { font-size: 12px; font-weight: 700; color: var(--moss-400); }
.stay h3 { font-size: 17px; font-weight: 800; margin-top: 3px; }
.stay .area { font-size: 13px; color: var(--ink-dim); }
.stay-facts {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.fact {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink-dim);
  font-weight: 600;
}
.fact.warn { background: rgba(245, 181, 68, 0.14); color: var(--sun-400); }
.stay-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-dim);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.stay-options { margin-top: 10px; display: grid; gap: 6px; }
.stay-option {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.22);
}
.stay-option .nm { font-weight: 600; }
.stay-option .px { color: var(--ink-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------- place cards */

.places { display: grid; gap: 14px; margin-top: 18px; }

.place {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: fade 0.4s backwards;
}
.place.optional { border-style: dashed; opacity: 0.92; }

.place-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, var(--basalt-600), var(--basalt-700));
  overflow: hidden;
}
/* No opacity transition here on purpose: a fade that starts while the tab is
   hidden can stay stuck at 0 and strand the reader on an invisible photo. The
   gradient on .place-media already covers the moment before an image paints. */
.place-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.place:hover .place-media img { transform: scale(1.04); }

.media-fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 42px;
  opacity: 0.35;
}

.media-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13, 17, 23, 0.9) 0%, rgba(13, 17, 23, 0.15) 45%, transparent 75%);
  pointer-events: none;
}

.media-caption {
  position: absolute;
  bottom: 10px; right: 14px; left: 14px;
  pointer-events: none;
}
.place-media h3 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
.place-media .en {
  font-size: 12px;
  color: rgba(232, 238, 245, 0.75);
  direction: ltr;
  text-align: right;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.img-dots {
  position: absolute;
  bottom: 10px; left: 12px;
  display: flex; gap: 5px;
}
.img-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.2s, width 0.2s;
}
.img-dots span.on { background: #fff; width: 16px; border-radius: 3px; }

.cat-badge {
  position: absolute;
  top: 11px; right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(13, 17, 23, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
}
.opt-badge {
  position: absolute;
  top: 11px; left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(13, 17, 23, 0.7);
  backdrop-filter: blur(8px);
  color: var(--ink-dim);
  border: 1px solid var(--border-strong);
}

.place-body { padding: 14px 16px 16px; }

.time-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sun-400);
  margin-bottom: 8px;
}

.place-desc {
  font-size: 14.5px;
  color: var(--ink-dim);
  white-space: pre-line;
}
.place-desc.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.more-btn {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--glacier-400);
}

.note {
  margin-top: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  border-inline-start: 3px solid;
}
.note.warn {
  background: rgba(242, 112, 79, 0.1);
  border-color: var(--lava-400);
  color: #ffc9ba;
}
.note.folklore {
  background: rgba(165, 227, 242, 0.07);
  border-color: var(--glacier-600);
  color: var(--glacier-300);
  font-style: italic;
}
.note.booking {
  background: rgba(111, 191, 139, 0.1);
  border-color: var(--moss-400);
  color: #b8e6c8;
}
.note.booking.todo {
  background: rgba(245, 181, 68, 0.1);
  border-color: var(--sun-400);
  color: #ffe0a8;
}
.note strong { display: block; margin-bottom: 2px; font-weight: 800; }

.tips { margin-top: 11px; display: grid; gap: 6px; }
.tip {
  display: flex; gap: 8px;
  font-size: 13.5px;
  color: var(--ink-dim);
}
.tip::before { content: '▸'; color: var(--moss-400); flex-shrink: 0; font-weight: 800; }

.place-actions { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }
.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  transition: background 0.16s;
}
.act:hover { background: rgba(255, 255, 255, 0.11); }
.act.map { color: var(--glacier-300); border-color: rgba(127, 212, 232, 0.3); }

.credit {
  margin-top: 10px;
  font-size: 10.5px;
  color: var(--ink-faint);
  direction: ltr;
  text-align: right;
}
.credit a { color: var(--ink-faint); text-decoration: underline; }

/* --------------------------------------------------------------- day map */

.map-card {
  margin-top: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.map-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px;
  gap: 10px;
}
.map-head h3 { font-size: 15px; font-weight: 800; }
.map-frame { aspect-ratio: 4 / 3; background: var(--basalt-700); position: relative; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-offline {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
  padding: 20px;
  color: var(--ink-faint);
  font-size: 13.5px;
}

/* ============================================================== quizzes */

.section-head { padding: 6px 0 16px; }
.section-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.section-head p { color: var(--ink-dim); font-size: 14.5px; margin-top: 4px; }

.quiz-grid { display: grid; gap: 13px; }

.quiz-card {
  text-align: right;
  width: 100%;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.18s, border-color 0.18s;
}
.quiz-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }

.quiz-emoji {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 27px;
  flex-shrink: 0;
}
.quiz-card[data-color='volcano'] .quiz-emoji { background: linear-gradient(140deg, rgba(242,112,79,.25), rgba(217,79,43,.12)); }
.quiz-card[data-color='aurora']  .quiz-emoji { background: linear-gradient(140deg, rgba(111,191,139,.25), rgba(127,212,232,.12)); }
.quiz-card[data-color='ocean']   .quiz-emoji { background: linear-gradient(140deg, rgba(43,158,196,.25), rgba(165,227,242,.12)); }
.quiz-card[data-color='moss']    .quiz-emoji { background: linear-gradient(140deg, rgba(111,191,139,.25), rgba(61,143,92,.12)); }

.quiz-info { flex: 1; min-width: 0; }
.quiz-info h3 { font-size: 16.5px; font-weight: 800; }
.quiz-info p { font-size: 13px; color: var(--ink-dim); margin-top: 2px; }
.quiz-stats { display: flex; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.stat {
  font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-faint);
}
.stat.best { background: rgba(245, 181, 68, 0.15); color: var(--sun-400); }
.stat.perfect { background: rgba(111, 191, 139, 0.18); color: var(--moss-400); }

/* --------------------------------------------------------- quiz runner */

.quiz-runner { animation: fade 0.3s; }

.quiz-progress {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
  margin-bottom: 18px;
}
.quiz-progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--glacier-600), var(--moss-400));
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.q-count { font-size: 12.5px; color: var(--ink-faint); font-weight: 700; }
.q-text { font-size: 21px; font-weight: 800; margin: 8px 0 20px; letter-spacing: -0.015em; line-height: 1.35; }

.options { display: grid; gap: 10px; }
.opt {
  text-align: right;
  padding: 15px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 11px;
}
.opt:not(:disabled):hover { border-color: var(--glacier-600); background: var(--surface-raised); }
.opt .mark {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800;
  flex-shrink: 0;
  transition: all 0.18s;
}
.opt.correct { border-color: var(--moss-400); background: rgba(111, 191, 139, 0.14); }
.opt.correct .mark { border-color: var(--moss-400); background: var(--moss-400); color: #0d1117; }
.opt.wrong { border-color: var(--lava-400); background: rgba(242, 112, 79, 0.12); }
.opt.wrong .mark { border-color: var(--lava-400); background: var(--lava-400); color: #0d1117; }
.opt:disabled { cursor: default; }

.explain {
  margin-top: 16px;
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  background: rgba(127, 212, 232, 0.08);
  border: 1px solid rgba(127, 212, 232, 0.2);
  font-size: 14px;
  color: var(--glacier-300);
  animation: fade 0.3s;
}

.quiz-result { text-align: center; padding: 30px 10px; animation: fade 0.4s; }
.result-score {
  font-size: 62px; font-weight: 900; line-height: 1;
  background: linear-gradient(120deg, var(--glacier-300), var(--moss-400), var(--sun-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.result-of { font-size: 15px; color: var(--ink-faint); font-weight: 700; margin-top: 4px; }
.result-msg { font-size: 18px; font-weight: 700; margin: 16px 0 6px; }
.result-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

.leaderboard { margin-top: 26px; text-align: right; }
.leaderboard h4 { font-size: 13px; color: var(--ink-faint); font-weight: 700; margin-bottom: 8px; }
.lb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  margin-bottom: 6px;
  font-size: 14px;
}
.lb-row .rank { font-size: 12px; color: var(--ink-faint); font-weight: 800; width: 18px; }
.lb-row .nm { flex: 1; font-weight: 600; }
.lb-row .sc { font-weight: 800; color: var(--sun-400); font-variant-numeric: tabular-nums; }

/* =========================================================== agreements */

.agr-intro {
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(245, 181, 68, 0.1), rgba(242, 112, 79, 0.05));
  border: 1px solid rgba(245, 181, 68, 0.22);
  margin-bottom: 18px;
}
.agr-intro p { font-size: 14px; color: var(--ink-dim); }

.agr-list { display: grid; gap: 12px; }

.agr {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  transition: border-color 0.18s;
}
.agr.signed { border-color: rgba(111, 191, 139, 0.35); background: linear-gradient(150deg, rgba(111,191,139,.07), var(--surface)); }

.agr-top { display: flex; gap: 12px; align-items: flex-start; }
.agr-emoji { font-size: 25px; line-height: 1.2; flex-shrink: 0; }
.agr-main { flex: 1; min-width: 0; }
.agr-main h3 { font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; }
.agr-cat {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink-faint);
  margin-top: 4px;
}
.agr-body { font-size: 14px; color: var(--ink-dim); margin-top: 8px; }
.agr-author { font-size: 11.5px; color: var(--ink-faint); margin-top: 7px; }

.agr-foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 13px; padding-top: 13px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.sign-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 700;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-strong);
  transition: all 0.18s;
}
.sign-btn:hover { background: rgba(255, 255, 255, 0.12); }
.sign-btn.on {
  background: rgba(111, 191, 139, 0.2);
  border-color: var(--moss-400);
  color: var(--moss-400);
}

.signers { display: flex; align-items: center; flex: 1; }
.signers .avatar { width: 26px; height: 26px; font-size: 11px; margin-inline-start: -7px; border: 2px solid var(--surface); }
.signers .avatar:first-child { margin-inline-start: 0; }
.signers-count { font-size: 12px; color: var(--ink-faint); font-weight: 600; margin-inline-start: 8px; }

.del-btn { font-size: 12px; color: var(--ink-faint); }
.del-btn:hover { color: var(--lava-400); }

.add-agr {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
}
.add-agr h3 { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.add-agr .row { display: flex; gap: 10px; }
.add-agr .emoji-in { width: 62px; text-align: center; font-size: 20px; }
.add-agr textarea { min-height: 76px; resize: vertical; margin-top: 10px; }
.add-agr .btn { margin-top: 12px; width: 100%; }

/* ================================================================= info */

.info-block {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 13px;
}
.info-block h3 {
  font-size: 15.5px; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.info-block ul { list-style: none; display: grid; gap: 8px; }
.info-block li { font-size: 14px; color: var(--ink-dim); display: flex; gap: 8px; }
.info-block li::before { content: '·'; font-weight: 900; color: var(--moss-400); }

.q-item {
  font-size: 14px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
  margin-bottom: 8px;
}
.q-item .sub { font-size: 12.5px; color: var(--ink-faint); margin-top: 4px; }

.members { display: flex; flex-wrap: wrap; gap: 8px; }
.member {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13.5px; font-weight: 600;
}
.member .avatar { width: 26px; height: 26px; font-size: 11px; }

/* =============================================================== shared */

.loading { text-align: center; padding: 60px 20px; color: var(--ink-faint); }
.spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--glacier-400);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-faint); font-size: 14px; }

.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 100;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--basalt-600);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  font-size: 14px; font-weight: 600;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 700px) {
  .places { grid-template-columns: 1fr 1fr; }
  .place.wide { grid-column: 1 / -1; }
  .quiz-grid { grid-template-columns: 1fr 1fr; }
}

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