/* =========================================================================
   Galoppal — HTML port of the Flutter app. Design tokens mirror
   lib/theme/app_theme.dart.
   ========================================================================= */

:root {
  /* raw palette */
  --tiefgruen: #1f3d2e;
  --waldgruen: #385e46;
  --salbeigruen: #a6b79a;
  --tiefblau: #1d3557;
  --taubenblau: #4c6a80;
  --lichtblau: #bfd6e6;
  --sand: #e8e5d9;
  --steingrau: #d7dadc;
  --warmweiss: #faf8f3;

  /* semantic roles */
  --bg: var(--sand);
  --surface: var(--warmweiss);
  --card: #ffffff;
  --ink: #220c10;
  --green: var(--tiefgruen);
  --green-dark: #16291f;
  --mint: var(--salbeigruen);
  --mint-text: var(--waldgruen);
  --mint-text-strong: var(--tiefgruen);
  --blue: var(--taubenblau);
  --blue-text: var(--tiefblau);
  --danger: #b3261e;

  --r-sm: 9px;
  --r-md: 12px;
  --r-card: 16px;
  --r-lg: 18px;
  --r-xl: 20px;
  --r-sheet: 26px;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;

  --shadow-card: 0 2px 12px rgba(34, 12, 16, 0.06);
  --shadow-soft: 0 2px 6px rgba(34, 12, 16, 0.05);
  --shadow-lg: 0 12px 28px rgba(34, 12, 16, 0.1);

  --frame-w: 448px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

img {
  max-width: 100%;
  display: block;
}

svg {
  display: block;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------- */
/* App frame                                                            */
/* --------------------------------------------------------------------- */

#app {
  width: 100%;
  max-width: var(--frame-w);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--surface);
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 60px rgba(34, 12, 16, 0.08);
}

@media (min-width: 480px) {
  body {
    padding: 0;
  }
}

.boot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(31, 61, 46, 0.2);
  border-top-color: var(--green);
  animation: spin 0.8s linear infinite;
}

.spinner.sm {
  width: 18px;
  height: 18px;
  border-width: 2.2px;
}

.spinner.white {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

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

/* --------------------------------------------------------------------- */
/* Typography helpers                                                   */
/* --------------------------------------------------------------------- */

.serif {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(34, 12, 16, 0.45);
}

.muted {
  color: rgba(34, 12, 16, 0.55);
}

.faint {
  color: rgba(34, 12, 16, 0.42);
}

/* --------------------------------------------------------------------- */
/* Tab scaffold                                                         */
/* --------------------------------------------------------------------- */

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.tab-scroll {
  padding: 8px 22px 120px;
  flex: 1;
}

.page-title {
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
}

.row {
  display: flex;
  align-items: center;
}

.row.between {
  justify-content: space-between;
}

.row.end {
  align-items: flex-end;
}

.stack {
  display: flex;
  flex-direction: column;
}

.gap6 { gap: 6px; }
.gap8 { gap: 8px; }
.gap10 { gap: 10px; }
.gap12 { gap: 12px; }

.mt8 { margin-top: 8px; }
.mt10 { margin-top: 10px; }
.mt12 { margin-top: 12px; }
.mt14 { margin-top: 14px; }
.mt16 { margin-top: 16px; }
.mt18 { margin-top: 18px; }
.mt20 { margin-top: 20px; }
.mt24 { margin-top: 24px; }
.mt26 { margin-top: 26px; }

.grow { flex: 1; min-width: 0; }

.link-btn {
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--green);
  font-size: 12.5px;
  font-weight: 600;
}

/* --------------------------------------------------------------------- */
/* Cards                                                                */
/* --------------------------------------------------------------------- */

.card {
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

.card.pad {
  padding: 15px;
}

.card.softline {
  border: 1px solid rgba(34, 12, 16, 0.06);
}

.outline-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(34, 12, 16, 0.18);
  border-radius: var(--r-card);
}

.placeholder-stripe {
  background-image: repeating-linear-gradient(
    -45deg,
    var(--sand) 0 9px,
    var(--steingrau) 9px 18px
  );
  border-radius: var(--r-md);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  object-fit: cover;
  flex-shrink: 0;
}

.avatar.round {
  border-radius: 50%;
}

/* --------------------------------------------------------------------- */
/* Buttons                                                              */
/* --------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 18px;
  border-radius: 15px;
  font-size: 15px;
  font-weight: 600;
  background: var(--green);
  color: #fff;
  transition: filter 0.15s, opacity 0.15s;
}

.btn:active {
  filter: brightness(0.92);
}

.btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.btn.blue {
  background: var(--blue);
}

.btn.ink {
  background: var(--ink);
}

.btn.danger {
  background: var(--danger);
}

.btn.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(34, 12, 16, 0.15);
  font-size: 14.5px;
}

.btn.secondary.green {
  color: var(--green);
  border-color: rgba(31, 61, 46, 0.35);
}

.btn.secondary.blue {
  color: var(--blue-text);
  border-color: rgba(76, 106, 128, 0.35);
}

.btn.sm {
  padding: 11px 14px;
  font-size: 13px;
  border-radius: var(--r-md);
  width: auto;
}

.btn-inline {
  width: auto;
}

.btn-group {
  display: flex;
  gap: 10px;
}

.btn-group > * {
  flex: 1;
}

.btn-group > .wide {
  flex: 2;
}

/* --------------------------------------------------------------------- */
/* Chips / segmented                                                    */
/* --------------------------------------------------------------------- */

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chips.fill > .chip {
  flex: 1;
}

.chip {
  padding: 11px 14px;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(34, 12, 16, 0.06);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.chip.on {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}

.chip.on.green { background: var(--green); }
.chip.on.blue { background: var(--blue); }
.chip.on.mint { background: var(--mint); color: var(--mint-text-strong); }

.segmented {
  display: flex;
  gap: 0;
  padding: 5px;
  background: rgba(34, 12, 16, 0.06);
  border-radius: 14px;
}

.segmented > button {
  flex: 1;
  padding: 11px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(34, 12, 16, 0.6);
}

.segmented > button.on {
  background: var(--green);
  color: #fff;
}

.segmented > button.on.blue {
  background: var(--blue);
}

/* --------------------------------------------------------------------- */
/* Badges                                                               */
/* --------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge.mint { background: rgba(166, 183, 154, 0.22); color: var(--mint-text); }
.badge.green { background: var(--green); color: #fff; }
.badge.blue { background: rgba(76, 106, 128, 0.18); color: var(--blue-text); }
.badge.grey { background: rgba(34, 12, 16, 0.08); color: rgba(34, 12, 16, 0.55); }

/* --------------------------------------------------------------------- */
/* Slot tile                                                            */
/* --------------------------------------------------------------------- */

.slot-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 15px;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  width: 100%;
  text-align: left;
}

.slot-tile .time-col {
  width: 68px;
  padding-right: 13px;
  border-right: 1px solid rgba(34, 12, 16, 0.09);
  flex-shrink: 0;
}

.slot-tile .time-col .t1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.slot-tile .time-col .t2 {
  font-size: 11.5px;
  color: rgba(34, 12, 16, 0.42);
  margin-top: 2px;
}

.slot-tile .disc {
  font-size: 14.5px;
  font-weight: 600;
}

.slot-tile .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 5px;
  font-size: 11.5px;
  color: rgba(34, 12, 16, 0.5);
}

.slot-tile .meta .mi {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.series-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(76, 106, 128, 0.16);
  color: var(--blue-text);
  font-size: 10px;
  font-weight: 600;
}

/* free-slot grid card (rider booking) */
.free-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.free-card {
  padding: 14px 14px 14px 12px;
  background: var(--card);
  border-radius: var(--r-card);
  border-left: 3px solid var(--blue);
  box-shadow: var(--shadow-card);
  text-align: left;
}

.free-card.d-springen { border-left-color: var(--green); }
.free-card.d-longe { border-left-color: var(--mint-text); }

.free-card .fc-time {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.free-card .fc-sub {
  font-size: 11.5px;
  color: rgba(34, 12, 16, 0.5);
  margin-top: 4px;
}

.free-card .fc-seats {
  font-size: 11px;
  font-weight: 600;
  color: var(--mint-text);
  margin-top: 2px;
}

/* --------------------------------------------------------------------- */
/* Empty state                                                          */
/* --------------------------------------------------------------------- */

.empty {
  width: 100%;
  padding: 26px 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(34, 12, 16, 0.18);
  border-radius: var(--r-card);
}

.empty h4 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.empty p {
  margin-top: 5px;
  font-size: 12.5px;
  color: rgba(34, 12, 16, 0.5);
}

.center-note {
  text-align: center;
  padding: 30px 10px;
  font-size: 12.5px;
  color: rgba(34, 12, 16, 0.5);
}

/* --------------------------------------------------------------------- */
/* Bottom nav + FAB                                                     */
/* --------------------------------------------------------------------- */

.bottom-nav {
  position: sticky;
  bottom: 0;
  display: flex;
  padding: 0 10px;
  padding-bottom: env(safe-area-inset-bottom);
  height: calc(88px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid rgba(34, 12, 16, 0.08);
  z-index: 40;
}

.nav-item {
  flex: 1;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: rgba(34, 12, 16, 0.4);
  font-size: 10.5px;
  font-weight: 600;
}

.nav-item.on {
  color: var(--green);
}

.fab {
  position: fixed;
  width: 58px;
  height: 58px;
  border-radius: var(--r-xl);
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(31, 61, 46, 0.5);
  z-index: 45;
}

/* keep FAB anchored to the app frame, not the viewport edge */
.fab-anchor {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--frame-w);
  pointer-events: none;
  bottom: calc(104px + env(safe-area-inset-bottom));
  z-index: 45;
}

.fab-anchor .fab {
  position: absolute;
  right: 20px;
  pointer-events: auto;
}

/* --------------------------------------------------------------------- */
/* Notification bell                                                    */
/* --------------------------------------------------------------------- */

.bell {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(34, 12, 16, 0.07);
  flex-shrink: 0;
}

.bell .dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--mint);
  border: 2px solid var(--surface);
  color: var(--mint-text-strong);
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* --------------------------------------------------------------------- */
/* Next-lesson hero card                                                */
/* --------------------------------------------------------------------- */

.hero-card {
  padding: 22px;
  border-radius: 22px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 28px rgba(31, 61, 46, 0.35);
  text-align: left;
  width: 100%;
}

.hero-card .hc-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.hero-card .hc-title {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: 8px;
}

.hero-card .hc-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.hero-card .hc-meta .mi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.hero-card .hc-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
  margin: 16px 0;
}

.hero-card .hc-people {
  display: flex;
  align-items: center;
  gap: 11px;
}

.hero-card .hc-people .pic {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.hero-card .hc-people .nm {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-card .hc-people .sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.6);
}

.hero-card .hc-badge {
  padding: 6px 11px;
  border-radius: 9px;
  background: rgba(166, 183, 154, 0.28);
  color: #eaf7ec;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* --------------------------------------------------------------------- */
/* Request card (trainer home)                                          */
/* --------------------------------------------------------------------- */

.request-card {
  padding: 15px;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

.request-card .quote {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(34, 12, 16, 0.6);
  line-height: 1.4;
}

/* --------------------------------------------------------------------- */
/* Calendar                                                             */
/* --------------------------------------------------------------------- */

.cal-card {
  padding: 16px 14px 18px;
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.cal-weekdays,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-weekdays > div {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: rgba(34, 12, 16, 0.35);
}

.cal-grid {
  gap: 4px;
  margin-top: 8px;
}

.cal-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
}

.cal-cell.selected {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}

.cal-cell.today {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.cal-cell.today.selected {
  border: 2px solid #fff;
}

.cal-cell .cdot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
}

.cal-cell.today .cdot,
.cal-cell.selected .cdot {
  background: var(--mint);
}

.cal-cell.empty-cell {
  visibility: hidden;
}

.month-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* week day chips (rider booking) */
.day-chips {
  display: flex;
  gap: 7px;
}

.day-chip {
  flex: 1;
  padding: 11px 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(34, 12, 16, 0.05);
  text-align: center;
}

.day-chip.on {
  background: var(--blue);
  color: #fff;
  box-shadow: none;
}

.day-chip .dc-w {
  font-size: 10px;
  color: rgba(34, 12, 16, 0.45);
}

.day-chip.on .dc-w {
  color: rgba(255, 255, 255, 0.65);
}

.day-chip .dc-d {
  font-size: 15px;
  font-weight: 600;
  margin-top: 3px;
}

.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--blue-text);
  font-size: 12.5px;
  font-weight: 600;
}

.week-nav button {
  color: var(--blue);
  display: grid;
  place-items: center;
  padding: 4px;
}

/* --------------------------------------------------------------------- */
/* Notifications                                                        */
/* --------------------------------------------------------------------- */

.notif {
  display: flex;
  gap: 13px;
  padding: 14px 15px;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  text-align: left;
  width: 100%;
  align-items: flex-start;
}

.notif .ic {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(31, 61, 46, 0.09);
  color: var(--green);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.notif .nt {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}

.notif .unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  flex-shrink: 0;
}

.notif .nb {
  margin-top: 3px;
  font-size: 12.5px;
  color: rgba(34, 12, 16, 0.55);
  line-height: 1.5;
}

.notif .nd {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(34, 12, 16, 0.35);
}

/* --------------------------------------------------------------------- */
/* Settings list / profile                                              */
/* --------------------------------------------------------------------- */

.profile-card {
  padding: 20px;
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.profile-card .pc-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  margin: 0 auto;
  position: relative;
}

.profile-card .pc-avatar .edit-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #fff;
  color: #fff;
  display: grid;
  place-items: center;
}

.setting-list {
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 16px;
  font-size: 14px;
}

.setting-row + .setting-row {
  border-top: 1px solid rgba(34, 12, 16, 0.06);
}

.setting-row .sv {
  font-size: 12.5px;
  color: rgba(34, 12, 16, 0.42);
}

.toggle-card {
  padding: 14px 16px;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 10px;
  align-items: center;
}

/* switch */
.switch {
  --w: 46px;
  --h: 28px;
  width: var(--w);
  height: var(--h);
  border-radius: 999px;
  background: rgba(34, 12, 16, 0.2);
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s;
}

.switch.on {
  background: var(--green);
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(var(--h) - 4px);
  height: calc(var(--h) - 4px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}

.switch.on::after {
  transform: translateX(calc(var(--w) - var(--h)));
}

/* stepper */
.stepper {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

.stepper .sbtn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.stepper .sbtn.minus {
  border: 1px solid rgba(34, 12, 16, 0.12);
}

.stepper .sbtn.plus {
  background: var(--green);
  color: #fff;
}

.stepper .sval {
  flex: 1;
  text-align: center;
}

.stepper .sval .n {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stepper .sval .l {
  font-size: 11px;
  color: rgba(34, 12, 16, 0.5);
  margin-top: 1px;
}

/* --------------------------------------------------------------------- */
/* Feature requests                                                     */
/* --------------------------------------------------------------------- */

.feature-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  align-items: flex-start;
}

.vote-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vote-col button {
  color: rgba(34, 12, 16, 0.35);
  display: grid;
  place-items: center;
}

.vote-col button.up.on { color: var(--green); }
.vote-col button.down.on { color: var(--danger); }

.vote-col .score {
  font-size: 14px;
  font-weight: 700;
}

/* --------------------------------------------------------------------- */
/* Auth screen                                                          */
/* --------------------------------------------------------------------- */

.auth {
  padding: 20px 26px 34px;
}

.auth .hero {
  height: 210px;
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
}

.auth .hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.auth .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0) 50%
  );
}

.auth .hero .wordmark {
  position: absolute;
  top: 16px;
  left: 18px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: -0.01em;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 10px rgba(255, 255, 255, 0.9);
}

.auth h1 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  white-space: pre-line;
}

.auth .sub {
  margin-top: 10px;
  font-size: 13.5px;
  color: rgba(34, 12, 16, 0.6);
  line-height: 1.55;
}

.auth-error {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--danger);
}

.auth-switch {
  text-align: center;
  margin-top: 14px;
  font-size: 12.5px;
  color: rgba(34, 12, 16, 0.5);
}

.auth-switch b {
  color: var(--green);
  font-weight: 600;
}

/* --------------------------------------------------------------------- */
/* Fields                                                               */
/* --------------------------------------------------------------------- */

.field {
  padding: 10px 16px;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
}

.field label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(34, 12, 16, 0.42);
}

.field input {
  width: 100%;
  border: none;
  outline: none;
  background: none;
  font-size: 14.5px;
  padding-top: 3px;
}

.text-input {
  width: 100%;
  padding: 13px 14px;
  background: #fff;
  border: none;
  border-radius: var(--r-md);
  outline: none;
  font-size: 13.5px;
  resize: vertical;
}

.text-input::placeholder {
  color: rgba(34, 12, 16, 0.4);
}

.sheet-label {
  margin-top: 22px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(34, 12, 16, 0.45);
}

.tappable-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  font-weight: 600;
  font-size: 14px;
}

.tappable-field .tf-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(34, 12, 16, 0.42);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  color: rgba(34, 12, 16, 0.4);
}

.search-field input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-size: 13.5px;
  color: var(--ink);
}

.invite-box {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  background: rgba(34, 12, 16, 0.05);
  border-radius: var(--r-md);
}

.invite-box code {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-box .copy {
  background: var(--green);
  color: #fff;
  padding: 8px 13px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
}

/* --------------------------------------------------------------------- */
/* Bottom sheet                                                         */
/* --------------------------------------------------------------------- */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(34, 12, 16, 0.5);
  z-index: 60;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.2s;
}

.scrim.show {
  opacity: 1;
}

.sheet {
  width: 100%;
  max-width: var(--frame-w);
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 14px 22px 30px;
  transform: translateY(100%);
  transition: transform 0.24s cubic-bezier(0.2, 0, 0, 1);
}

.scrim.show .sheet {
  transform: translateY(0);
}

.sheet .grabber {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: rgba(34, 12, 16, 0.16);
  margin: 0 auto 18px;
}

.sheet h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.sheet .sheet-sub {
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(34, 12, 16, 0.55);
  line-height: 1.55;
}

.detail-list {
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.detail-row {
  display: flex;
  gap: 16px;
  padding: 14px 16px;
  font-size: 13.5px;
}

.detail-row + .detail-row {
  border-top: 1px solid rgba(34, 12, 16, 0.06);
}

.detail-row .dl {
  color: rgba(34, 12, 16, 0.5);
  font-weight: 500;
  flex-shrink: 0;
  width: 78px;
}

.detail-row .dv {
  flex: 1;
  font-weight: 600;
  text-align: right;
}

.info-box {
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  line-height: 1.5;
}

.info-box.blue {
  background: rgba(76, 106, 128, 0.1);
  color: var(--blue-text);
}

.info-box.green {
  background: rgba(31, 61, 46, 0.07);
  color: var(--mint-text);
}

.info-box.danger {
  background: rgba(179, 38, 30, 0.08);
  color: var(--danger);
}

.note-tile {
  padding: 12px 14px;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
}

.note-tile .nh {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: rgba(34, 12, 16, 0.4);
}

.note-tile .nbody {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.lesson-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
}

.lesson-row .lr-main {
  flex: 1;
  min-width: 0;
}

.lesson-row button {
  color: var(--green);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 8px;
}

/* wheel time picker */
.picker-list {
  max-height: 200px;
  overflow-y: auto;
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.picker-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 16px;
  font-size: 14px;
}

.picker-list button.on {
  background: rgba(31, 61, 46, 0.08);
  font-weight: 700;
  color: var(--green);
}

/* --------------------------------------------------------------------- */
/* Toast                                                                */
/* --------------------------------------------------------------------- */

.toast-anchor {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(108px + env(safe-area-inset-bottom));
  width: 100%;
  max-width: var(--frame-w);
  padding: 0 22px;
  z-index: 70;
  pointer-events: none;
}

.toast {
  background: var(--ink);
  color: #fff;
  padding: 13px 16px;
  border-radius: 14px;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(34, 12, 16, 0.35);
  animation: toast-in 0.2s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* --------------------------------------------------------------------- */
/* misc                                                                 */
/* --------------------------------------------------------------------- */

.tap {
  cursor: pointer;
}

.spin-center {
  display: grid;
  place-items: center;
  padding: 30px;
}

.hr-soft {
  height: 1px;
  background: rgba(34, 12, 16, 0.07);
  margin: 14px 0;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 12.5px;
  font-weight: 600;
}

.hidden {
  display: none !important;
}
