* {
  box-sizing: border-box;
}

:root {
  --bg: #eafaf3;
  --bg-strong: #f7fdf9;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: rgba(255, 255, 255, 0.97);
  --line: rgba(13, 90, 90, 0.12);
  --line-strong: rgba(13, 90, 90, 0.2);
  --text: #0e3b3e;
  --muted: #5e8783;
  --primary: #0fa3a3;
  --primary-dark: #0a6e6e;
  --primary-soft: #e3f7f4;
  --success: #2f9e6e;
  --danger: #e0654f;
  --accent: #ffb648;
  --accent-dark: #f08c2b;
  --shadow: 0 30px 80px rgba(10, 70, 75, 0.14);
  --shadow-soft: 0 18px 40px rgba(10, 70, 75, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(15, 163, 163, 0.18), transparent 26%),
    radial-gradient(circle at 100% 0%, rgba(255, 182, 72, 0.16), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(47, 158, 110, 0.14), transparent 30%),
    linear-gradient(180deg, #f7fdf9 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.42), transparent 35%),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.45), transparent 26%);
}

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

a {
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(22, 99, 218, 0.4);
  box-shadow: 0 0 0 4px rgba(22, 99, 218, 0.1);
}

textarea {
  resize: vertical;
}

.page-shell {
  position: relative;
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 20px 56px;
}

.glass {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 26px;
  margin-bottom: 18px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--primary), var(--accent));
  color: white;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(15, 163, 163, 0.25);
}

.brand-block strong,
.brand-link {
  display: block;
  text-decoration: none;
  font-weight: 800;
}

.brand-block p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-links a,
.code-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.9);
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 700;
}

.code-chip strong {
  margin-left: 6px;
}

.landing-hero,
.trip-hero {
  border-radius: 32px;
  overflow: hidden;
  margin-bottom: 22px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 0;
}

.landing-copy,
.trip-hero-copy {
  padding: 34px;
  position: relative;
  z-index: 1;
}

.landing-copy {
  background:
    radial-gradient(circle at top right, rgba(255, 214, 140, 0.35), transparent 35%),
    linear-gradient(145deg, rgba(8, 100, 100, 0.96), rgba(15, 163, 163, 0.86));
  color: white;
}

.trip-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
}

.trip-hero-copy {
  background:
    radial-gradient(circle at top left, rgba(255, 214, 140, 0.2), transparent 30%),
    linear-gradient(145deg, rgba(10, 90, 90, 0.94), rgba(15, 163, 163, 0.88));
  color: white;
}

.trip-hero-side {
  min-height: 280px;
}

.trip-hero-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.eyebrow.light,
.hero-text.light,
.hero-tag,
.landing-copy h1,
.trip-hero-copy h1 {
  color: white;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Fredoka", "Inter", sans-serif;
  letter-spacing: -0.01em;
}

.landing-copy h1,
.trip-hero-copy h1 {
  margin-bottom: 14px;
  font-size: clamp(2.25rem, 4vw, 4.2rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.trip-hero-copy h1 {
  font-size: clamp(2rem, 3.2vw, 3.5rem);
}

.hero-text {
  max-width: 64ch;
  line-height: 1.7;
  margin-bottom: 22px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.landing-visuals {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(190px, 0.72fr);
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 251, 255, 0.88));
}

.showcase-main,
.showcase-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 180px;
  box-shadow: var(--shadow-soft);
}

.showcase-main.tall {
  min-height: 100%;
}

.showcase-main::after,
.showcase-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(10, 27, 52, 0.72) 100%);
}

.showcase-main img,
.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.showcase-side {
  display: grid;
  gap: 14px;
}

.showcase-overlay,
.showcase-copy {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  color: white;
}

.showcase-label {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  font-weight: 800;
}

.landing-main,
.trip-main {
  display: grid;
  gap: 20px;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
}

.feature-card {
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #f4f9ff);
  border-radius: 22px;
  border: 1px solid var(--line);
}

.feature-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.feature-card p,
.section-intro,
.photo-copy p,
.expense-card p,
.member-left p {
  color: var(--muted);
  line-height: 1.6;
}

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

.auth-card,
.panel,
.photo-card {
  padding: 24px;
  border-radius: 30px;
}

.field-label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field-label span {
  font-weight: 700;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 15px;
  font-weight: 800;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 24px rgba(15, 163, 163, 0.25);
}

.secondary-btn {
  color: var(--text);
  background: white;
  border: 1px solid var(--line-strong);
}

.secondary-btn.dark-btn {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: white;
}

.ghost-btn {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.block-btn {
  width: 100%;
}

.alert-box,
.empty-box {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.alert-box {
  color: var(--danger);
}

.empty-box.slim {
  padding: 14px 16px;
}

.control-bar {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 26px;
  margin-bottom: 20px;
}

.member-switcher {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.member-switcher label {
  flex: 1;
  min-width: 220px;
  display: grid;
  gap: 8px;
}

.member-switcher span {
  font-weight: 700;
}

.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  background: rgba(237, 244, 255, 0.88);
  border: 1px solid var(--line);
}

.tab-nav a.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
}

.soft-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(247, 251, 255, 0.9), rgba(241, 247, 255, 0.92));
  border: 1px solid var(--line);
}

.nested-form {
  margin-top: 14px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

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

.form-grid.four {
  grid-template-columns: 0.55fr 0.9fr 1.5fr auto;
}

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

.section-head.compact {
  margin-bottom: 12px;
}

.day-date {
  margin-bottom: 6px;
  color: var(--primary);
  font-weight: 800;
}

.activity-list,
.stack-list,
.people-grid {
  display: grid;
  gap: 12px;
}

.activity-card,
.settlement-card,
.expense-card,
.member-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.activity-card.is-done {
  opacity: 0.72;
}

.activity-copy {
  flex: 1;
}

.activity-copy p {
  margin: 6px 0 0;
  color: var(--muted);
}

.inline-action {
  margin: 0;
}

.check-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  font-weight: 800;
}

.small-btn {
  min-height: auto;
  padding: 10px 12px;
}

.gallery-grid-php {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.photo-card {
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 18px;
}

.photo-copy {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.expense-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
}

.expense-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 6px;
}

.money {
  color: var(--primary-dark);
  font-weight: 800;
}

.split-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-check {
  position: relative;
}

.pill-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-check span {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(235, 243, 255, 0.9);
  border: 1px solid var(--line);
  font-weight: 700;
}

.pill-check input:checked + span {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
}

.member-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}

.trip-actions {
  align-items: center;
}

@media (max-width: 1080px) {
  .landing-hero,
  .trip-hero,
  .expense-layout,
  .form-grid-landing,
  .feature-strip,
  .landing-visuals {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .page-shell {
    padding: 14px 12px 34px;
  }

  .topbar,
  .brand-block,
  .section-head,
  .member-switcher,
  .expense-top,
  .activity-card,
  .settlement-card,
  .expense-card,
  .member-card {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-links,
  .tab-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .topbar-links a,
  .tab-nav a,
  .code-chip {
    text-align: center;
  }

  .landing-copy,
  .trip-hero-copy,
  .auth-card,
  .panel,
  .photo-card {
    padding: 18px;
  }

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

  .showcase-side {
    grid-template-columns: 1fr;
  }

  .landing-copy h1,
  .trip-hero-copy h1 {
    font-size: clamp(2rem, 11vw, 2.8rem);
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding: 10px 10px 28px;
  }

  .topbar,
  .auth-card,
  .panel,
  .photo-card,
  .landing-hero,
  .trip-hero,
  .control-bar {
    border-radius: 22px;
  }

  .topbar-links,
  .tab-nav {
    grid-template-columns: 1fr;
  }

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