:root {
  --ink: #17211f;
  --muted: #65716e;
  --faint: #8a9692;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f1f6f4;
  --line: #dce5e1;
  --line-strong: #bdccc6;
  --teal: #11645a;
  --teal-dark: #0b443d;
  --teal-soft: #dcefed;
  --rust: #a54833;
  --rust-soft: #f4e3dc;
  --gold: #bb7a18;
  --gold-soft: #f7ead1;
  --blue: #3568a8;
  --blue-soft: #e2ecf8;
  --green: #287350;
  --green-soft: #e0f1e7;
  --red: #9f3a3a;
  --red-soft: #f4dddd;
  --shadow: 0 16px 42px rgba(23, 33, 31, 0.10);
  --shadow-sm: 0 8px 20px rgba(23, 33, 31, 0.07);
  --radius: 8px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
}

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

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(17, 100, 90, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 100, 90, 0.06) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
}

.app {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(220, 229, 225, 0.9);
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 42%),
    var(--teal);
  box-shadow: var(--shadow-sm);
  flex: 0 0 auto;
}

.brand-mark i {
  font-size: 24px;
}

.brand-title {
  min-width: 0;
}

.brand-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.04;
}

.stats-strip {
  display: flex;
  align-items: stretch;
  gap: 8px;
  justify-self: center;
}

.stat {
  min-width: 86px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: var(--surface);
}

.stat strong {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.member-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.member-pill {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 10px 6px 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  min-width: 0;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--rust);
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}

.role-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 11px;
  font-weight: 800;
}

.shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 22px 52px;
}

.mode-banner,
.pending-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--gold-soft);
  color: #573806;
  font-weight: 700;
}

.pending-banner {
  border-left-color: var(--rust);
  background: var(--rust-soft);
  color: #5b2016;
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.panel,
.auth-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel {
  padding: 14px;
}

.panel h2,
.panel h3,
.view-head h2,
.auth-card h1,
.modal-title {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.05;
}

.panel h2,
.panel h3 {
  font-size: 18px;
}

.side-section {
  display: grid;
  gap: 10px;
}

.side-section + .side-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tabs,
.filter-grid,
.member-switcher {
  display: grid;
  gap: 8px;
}

.tab-btn,
.filter-btn,
.member-btn,
.icon-btn,
.primary-btn,
.ghost-btn,
.vote-btn,
.vote-pick,
.mini-btn,
.link-btn,
.map-btn,
.schedule-chip,
.ticket-chip {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 11px;
  font-weight: 800;
  text-decoration: none;
}

.tab-btn,
.filter-btn,
.member-btn {
  justify-content: flex-start;
  width: 100%;
}

.tab-btn i,
.filter-btn i,
.member-btn i,
.primary-btn i,
.ghost-btn i,
.mini-btn i,
.link-btn i,
.map-btn i {
  font-size: 18px;
  flex: 0 0 auto;
}

.tab-btn.active,
.filter-btn.active,
.member-btn.active {
  border-color: rgba(17, 100, 90, 0.35);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.tab-btn:focus-visible,
.filter-btn:focus-visible,
.member-btn:focus-visible,
.icon-btn:focus-visible,
.primary-btn:focus-visible,
.ghost-btn:focus-visible,
.vote-btn:focus-visible,
.vote-pick:focus-visible,
.mini-btn:focus-visible,
.link-btn:focus-visible,
.map-btn:focus-visible,
.schedule-chip:focus-visible,
.ticket-chip:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(53, 104, 168, 0.24);
  outline-offset: 2px;
}

.primary-btn {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.primary-btn:hover {
  background: var(--teal-dark);
}

.ghost-btn:hover,
.icon-btn:hover,
.mini-btn:hover,
.link-btn:hover,
.map-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.icon-btn {
  width: 38px;
  padding: 0;
}

.icon-btn i {
  font-size: 19px;
}

.member-btn {
  position: relative;
}

.member-btn .role-dot {
  margin-left: auto;
}

.weather-grid {
  display: grid;
  gap: 8px;
}

.weather-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 10px;
  display: grid;
  gap: 6px;
}

.weather-card > span,
.weather-top span,
.weather-note,
.weather-metrics {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.weather-top,
.weather-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.weather-temp {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-dark);
}

.weather-temp i {
  color: var(--gold);
  font-size: 20px;
}

.weather-temp span {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.weather-card p {
  margin: 0;
}

.role-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.role-dot.viewer {
  background: var(--blue);
}

.role-dot.organizer {
  background: var(--rust);
}

.content {
  min-width: 0;
}

.view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.view-head h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.view-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 10px;
  margin-bottom: 14px;
}

.search {
  position: relative;
  min-width: 0;
}

.search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  font-size: 18px;
}

.search input,
.field input,
.field select,
.field textarea,
.toolbar select,
.view-actions select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.search input {
  padding: 0 12px 0 38px;
}

.toolbar select,
.view-actions select {
  min-width: 156px;
  padding: 0 34px 0 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.activity-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.activity-card.top-pick {
  border-top: 4px solid var(--gold);
}

.activity-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.card-meta,
.card-actions,
.vote-row,
.badges,
.slot-meta,
.schedule-actions,
.compact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badges {
  justify-content: space-between;
  gap: 10px;
}

.badge,
.flag,
.score-pill,
.day-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.badge {
  background: var(--surface-2);
  color: var(--muted);
}

.badge.citypass,
.badge.rivercenter {
  color: var(--blue);
  background: var(--blue-soft);
}

.badge.gaming,
.badge.unique,
.badge.themepark,
.badge.austin-active,
.badge.austin-arcade {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.badge.riverpearl,
.badge.nature,
.badge.austin-light {
  color: var(--green);
  background: var(--green-soft);
}

.badge.night,
.badge.oddities,
.badge.austin-food {
  color: var(--rust);
  background: var(--rust-soft);
}

.badge.history,
.badge.austin-indoor {
  color: #6f4b08;
  background: var(--gold-soft);
}

.flag {
  color: var(--muted);
  background: var(--surface-2);
}

.flag.free {
  color: var(--green);
  background: var(--green-soft);
}

.star {
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
}

.activity-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
}

.activity-card p,
.empty p,
.auth-card p {
  margin: 0;
  color: var(--muted);
}

.tag-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.activity-footer {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}

.cost {
  font-weight: 900;
  color: var(--teal-dark);
}

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

.vote-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vote-btn {
  width: 36px;
  height: 34px;
  padding: 0;
}

.vote-btn i,
.vote-pick i {
  font-size: 18px;
}

.vote-pick {
  min-width: 96px;
}

.vote-pick.active {
  border-color: rgba(187, 122, 24, 0.45);
  background: var(--gold-soft);
  color: #80530f;
}

.vote-btn.yes.active {
  border-color: rgba(40, 115, 80, 0.45);
  background: var(--green-soft);
  color: var(--green);
}

.vote-btn.maybe.active {
  border-color: rgba(187, 122, 24, 0.45);
  background: var(--gold-soft);
  color: #80530f;
}

.vote-btn.no.active {
  border-color: rgba(159, 58, 58, 0.45);
  background: var(--red-soft);
  color: var(--red);
}

.score-pill {
  min-width: 42px;
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.card-actions {
  justify-content: space-between;
}

.map-btn {
  width: 38px;
  padding: 0;
}

.schedule-chip,
.ticket-chip {
  flex: 1 1 112px;
}

.ticket-chip.purchased {
  border-color: rgba(53, 104, 168, 0.45);
  background: var(--blue-soft);
  color: var(--blue);
}

.ticket-chip.needed {
  border-color: rgba(187, 122, 24, 0.45);
  background: var(--gold-soft);
  color: #80530f;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.day-column {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.day-head strong {
  display: block;
  font-size: 16px;
}

.day-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.route-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--green-soft);
  color: #17452e;
  font-size: 12px;
  font-weight: 800;
}

.route-summary i {
  font-size: 17px;
}

.day-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.slot-card,
.rank-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.slot-card {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.slot-card.fixed {
  background: linear-gradient(180deg, #fff, #f9fbfa);
}

.slot-card h3,
.rank-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.slot-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.slot-meta i {
  font-size: 16px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.status.idea {
  color: var(--muted);
  background: var(--surface-2);
}

.status.planned {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.status.booked {
  color: var(--blue);
  background: var(--blue-soft);
}

.status.done {
  color: var(--green);
  background: var(--green-soft);
}

.status.travel,
.status.hotel,
.status.flight,
.status.food {
  color: var(--blue);
  background: var(--blue-soft);
}

.status.flight {
  color: var(--red);
  background: var(--red-soft);
}

.status.hotel {
  color: var(--green);
  background: var(--green-soft);
}

.status.food {
  color: var(--rust);
  background: var(--rust-soft);
}

.schedule-actions {
  justify-content: flex-end;
}

.mini-btn {
  min-height: 32px;
  padding: 0 9px;
}

.day-settings {
  display: grid;
  gap: 10px;
}

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

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  padding: 0 11px;
}

.field textarea {
  min-height: 88px;
  padding-top: 10px;
  resize: vertical;
}

.ranking {
  display: grid;
  gap: 10px;
}

.rank-card {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.rank-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.rank-num {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--teal);
  font-weight: 900;
}

.member-votes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vote-token {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
  background: var(--surface-2);
  color: var(--muted);
}

.vote-token.yes {
  color: var(--green);
  background: var(--green-soft);
}

.vote-token.maybe {
  color: #80530f;
  background: var(--gold-soft);
}

.vote-token.no {
  color: var(--red);
  background: var(--red-soft);
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(100%, 460px);
  padding: 24px;
  display: grid;
  gap: 18px;
}

.auth-card h1 {
  font-size: 34px;
}

.oauth-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  font-weight: 900;
}

.oauth-btn i {
  color: var(--blue);
  font-size: 20px;
}

.oauth-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.empty {
  min-height: 150px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.52);
}

.empty strong {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 3px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 33, 31, 0.42);
}

.modal {
  width: min(100%, 560px);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-title {
  font-size: 25px;
}

.modal-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.modal form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  min-height: 40px;
  border-radius: 999px;
  padding: 9px 14px;
  color: #fff;
  background: var(--teal-dark);
  box-shadow: var(--shadow);
  font-weight: 900;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

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

@media (max-width: 1160px) {
  .topbar-inner {
    grid-template-columns: 1fr auto;
  }

  .stats-strip {
    grid-column: 1 / -1;
    justify-self: stretch;
    overflow-x: auto;
  }

  .stat {
    flex: 1 0 110px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    top: 138px;
  }
}

@media (max-width: 860px) {
  .topbar-inner,
  .shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar-inner {
    grid-template-columns: 1fr;
  }

  .member-panel {
    justify-content: flex-start;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: 1fr;
  }

  .tabs,
  .filter-grid,
  .member-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .view-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 13px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .grid,
  .calendar-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .tabs,
  .filter-grid,
  .member-switcher {
    grid-template-columns: 1fr;
  }

  .activity-card h3 {
    font-size: 20px;
  }

  .card-actions {
    display: grid;
    grid-template-columns: 38px 1fr 1fr;
  }

  .modal-backdrop {
    padding: 10px;
  }
}
