:root {
  --cream: #fffaf0;
  --paper: #fffdf9;
  --navy: #0c3970;
  --ink: #16243a;
  --muted: #738097;
  --line: #eadfce;
  --pink: #ffc9ce;
  --lav: #d9d0ff;
  --mint: #cdeedc;
  --yellow: #ffe193;
  --green: #dff4dd;
  --danger: #ef4646;
  --shadow: 0 12px 32px rgba(44, 48, 57, 0.08);
}
* {
  box-sizing: border-box;
}
html,
body,
#app {
  margin: 0;
  min-height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  max-width: 100%;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
body.landing-screen { overflow: hidden; }

.start-trip-page {
  min-height: 100%;
  padding: 24px 18px 56px;
  background: var(--cream);
}
html.start-trip-open,
html.start-trip-open body,
body.start-trip-open,
body.start-trip-open #app {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}
body.start-trip-open .start-trip-page { min-height: 0 !important; }
.start-trip-form {
  position: relative;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 28px;
  background: var(--cream);
}
.start-trip-form input,
.start-trip-form select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #dcd4c7;
  background: #fff;
  border-radius: 13px;
  padding: 13px;
  margin-top: 6px;
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}
.start-trip-form input[type="hidden"] { display: none; }
.start-trip-form > .btn {
  width: 100%;
  margin-top: 12px;
}
.start-date-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
  padding: 13px;
  border: 1px solid #dcd4c7;
  border-radius: 13px;
  background: #fff;
  color: #9097a0;
  font: 700 16px/1.35 "Nunito", system-ui, sans-serif;
  text-align: left;
}
.start-date-button.has-value { color: var(--ink); }
.start-trip-calendar {
  margin: 4px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.calendar-head {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  margin-bottom: 8px;
  text-align: center;
}
.calendar-head button {
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 28px;
  line-height: 1;
}
.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.calendar-weekdays { margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 800; }
.calendar-day,
.calendar-blank { aspect-ratio: 1; }
.calendar-day {
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: 700 14px/1 "Nunito", system-ui, sans-serif;
}
.calendar-day.selected { background: #6ca5ef; color: #fff; }
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  touch-action: manipulation;
}
img {
  display: block;
  max-width: 100%;
}
.page {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, #fff 0, transparent 33%), var(--cream);
}
.wide-shell {
  width: min(1420px, 100%);
  margin: auto;
  padding: 32px 56px 48px;
}
.landing-shell {
  width: min(1180px, 100%);
  margin: auto;
  padding: 24px 44px;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.landing-shell > .brand {
  justify-content: center;
}
.hand {
  font-family: "Patrick Hand", cursive;
}
.mobile-only,
.mobile-wordmark,
.mobile-footer,
.mobile-tripbar,
.mobile-add,
.mobile-trip-art,
.mobile-trip-actions,
.mobile-trip-footer-art {
  display: none;
}
.ui-icon {
  width: 21px;
  height: 21px;
  vertical-align: middle;
  flex: 0 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: #101c2d;
  padding: 0;
  font-family: "Patrick Hand", cursive;
  font-size: 44px;
  line-height: 1;
}
.brand img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}
.brand i {
  font: normal 29px Nunito;
  color: #f5bb14;
}
.brand.compact {
  font-size: 36px;
}
.brand.compact img {
  width: 54px;
  height: 54px;
}
.brand.compact i {
  font-size: 23px;
}
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-actions {
  display: flex;
  gap: 28px;
  align-items: center;
}
.currency-pill,
.profile-pill {
  border: 1px solid #e7e3db;
  background: rgba(255, 255, 255, 0.75);
  color: var(--navy);
  height: 53px;
  border-radius: 999px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
}
.currency-pill b { font-size: 13px; margin-left: 2px; }
.profile-pill {
  background: transparent;
  border: 0;
  padding: 0;
}
.profile-pill .avatar {
  width: 50px;
  height: 50px;
  font-size: 20px;
}
.profile-wrap {
  position: relative;
}
.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fffdf7;
  box-shadow: var(--shadow);
  z-index: 30;
}
.profile-menu button {
  width: 100%;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--navy);
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  font: inherit;
  font-weight: 800;
  text-align: left;
}
.profile-menu button:hover {
  background: #eef5ff;
}
.btn {
  border: 0;
  border-radius: 18px;
  padding: 15px 22px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 0 rgba(6, 39, 80, 0.12);
}
.outline {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.danger-btn {
  background: var(--danger);
  color: #fff;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  color: #233552;
}
.pink {
  background: var(--pink);
}
.lav {
  background: var(--lav);
}
.mint {
  background: var(--mint);
}
.yellow {
  background: var(--yellow);
}
.people {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.traveler-pill {
  min-width: 0;
  max-width: 170px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 5px;
  border: 1px solid #e8ddcc;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.traveler-pill .avatar {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  font-size: 12px;
}
.traveler-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.landing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - 105px);
  gap: 0;
  text-align: center;
}
.landing-visual {
  position: relative;
  min-height: 300px;
  width: min(700px, 100%);
  display: grid;
  place-items: center;
}
.landing-visual picture {
  display: contents;
}
.landing-bg {
  position: absolute;
  width: 112%;
  height: 315px;
  object-fit: contain;
  opacity: 0.95;
  bottom: 0;
  left: -6%;
  filter: saturate(0.95);
}
.landing-chester {
  position: relative;
  width: 340px;
  height: 340px;
  object-fit: contain;
  z-index: 1;
}
.landing-copy {
  width: min(560px, 100%);
}
.landing-copy h1 {
  font-size: clamp(42px, 4vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  color: var(--navy);
  margin: 6px 0 14px;
  font-weight: 900;
}
.landing-copy p {
  font-size: 17px;
  line-height: 1.45;
  color: #667080;
  margin: 0 0 20px;
}
.hero-note span {
  display: inline-block;
  font-size: 34px;
  margin-left: 10px;
  transform: rotate(-12deg);
  color: #e7aa00;
}
.landing-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.landing-actions .btn {
  min-width: 230px;
}
.trips-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 58px 25px 35px;
}
.trips-intro h1 {
  font-size: 76px;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--navy);
  margin: 0 0 11px;
}
.prompt {
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #6f7c8e;
  margin: 0;
}
.trips-cheer {
  display: flex;
  align-items: center;
  gap: 38px;
}
.trips-cheer img {
  width: 190px;
  height: 150px;
  object-fit: contain;
  object-position: center top;
}
.trips-cheer p {
  font-size: 31px;
  color: var(--navy);
  line-height: 1.05;
  transform: rotate(-5deg);
  text-align: center;
  margin: 0;
}
.trip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.trip-card,
.start-card {
  border: 1px solid var(--line);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.82);
  padding: 13px;
  box-shadow: 0 3px 0 rgba(233, 222, 203, 0.55);
  text-align: left;
  position: relative;
  min-width: 0;
}
.trip-card {
  cursor: pointer;
}
.trip-card:focus,
.trip-card:hover {
  outline: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.trip-art {
  height: 225px;
  background: #eaf7ff;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.trip-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trip-art picture {
  display: block;
  width: 100%;
  height: 100%;
}
.trip-card-copy {
  padding: 10px 3px 3px;
}
.trip-name-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.trip-name-line h2 {
  margin: 0;
  font-size: 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trip-name-line button {
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 22px;
}
.trip-card p {
  margin: 2px 0;
  color: var(--muted);
  font-size: 16px;
}
.trip-card .people {
  margin-top: 12px;
}
.mobile-chevron {
  display: none;
}
.start-card {
  border: 2px dashed #9ab2cc;
  background: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: var(--navy);
}
.start-card .big-plus {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e1f2ff;
  font-size: 75px;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 18px;
}
.start-card b {
  font-size: 23px;
}
.start-card small {
  color: var(--muted);
  font-size: 17px;
  margin-top: 4px;
}
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 42px;
  padding: 20px 2px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.site-footer p,
.site-footer small {
  margin: 0;
}
.site-footer a {
  color: var(--navy);
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.noscript-note {
  margin: 12px;
  text-align: center;
  font-weight: 700;
}
.legal-page {
  min-height: 100vh;
  padding: 30px 18px 56px;
}
.legal-shell {
  width: min(820px, 100%);
  margin: 0 auto;
}
.legal-shell .brand {
  width: max-content;
  text-decoration: none;
}
.legal-card {
  margin-top: 24px;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}
.legal-card h1 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: clamp(34px, 6vw, 48px);
}
.legal-card h2 {
  margin: 28px 0 8px;
  color: var(--navy);
  font-size: 21px;
}
.legal-card p,
.legal-card li {
  font-size: 16px;
  line-height: 1.65;
}
.legal-card .legal-date { color: var(--muted); }
.legal-card a { color: var(--navy); font-weight: 800; }
.trip-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  max-width: 1080px;
  margin: 30px auto;
}
.trip-main,
.side-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 27px;
  box-shadow: var(--shadow);
}
.trip-main {
  padding: 22px;
}
.trip-heading {
  display: flex;
  align-items: center;
  gap: 22px;
  position: relative;
}
.trip-heading > img {
  width: 210px;
  height: 130px;
  object-fit: contain;
}
.trip-heading h1 {
  font-size: 38px;
  color: var(--navy);
  margin: 0;
}
.trip-heading p {
  color: var(--muted);
  margin: 2px 0 8px;
}
.desktop-more {
  position: absolute;
  right: 0;
  top: 0;
  border: 0;
  background: transparent;
  font-weight: 900;
  color: var(--navy);
  font-size: 22px;
}
.recovery-reminder {
  display: block;
  width: 100%;
  border: 2px dashed #ff7676;
  background: #fffafa;
  color: #df5050;
  border-radius: 14px;
  padding: 11px;
  font-weight: 800;
  margin-top: 15px;
}
.recovery-reminder.recovered {
  color: #31734a;
  border-color: #b9dfc3;
  background: #effaf1;
}
.delete-warning {
  color: var(--danger) !important;
  background: #fff0f0;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
}
.saved-status {
  width: max-content;
  margin: 10px auto;
  background: var(--green);
  color: #407852;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
}
.summary-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 100px;
  gap: 16px;
  align-items: center;
  background: #fff5dc;
  border-radius: 20px;
  padding: 17px 15px;
  min-height: 115px;
  margin: 18px 0 24px;
}
.summary-card span,
.summary-card small {
  display: block;
  color: #627086;
  font-size: 13px;
}
.summary-card strong {
  display: block;
  color: var(--navy);
  font-size: 21px;
}
.summary-card .total strong {
  font-size: 34px;
  line-height: 1.15;
}
.summary-card .stat {
  border-left: 1px solid #e6d9bd;
  padding-left: 15px;
}
.summary-card > img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  align-self: end;
}
.expense-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
}
.expense-section {
  position: relative;
}
.expense-title-row h2 {
  font-size: 21px;
  margin: 0;
}
.add-expense-main {
  position: static;
  padding: 11px 18px;
  border-radius: 14px;
}
.date-group {
  border-top: 1px solid #eee7da;
}
.date-label {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 10px 3px;
  border: 0;
  background: transparent;
  text-align: left;
  color: #68758a;
  font-size: 13px;
  font-weight: 800;
}
.date-expenses {
  display: block;
}
.date-group.collapsed .date-expenses {
  display: none;
}
.date-group.collapsed .date-label span {
  transform: rotate(180deg);
}
.expense-row {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr) auto 15px;
  align-items: center;
  gap: 11px;
  padding: 10px 6px;
  border-top: 1px solid #f0eadf;
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  border-radius: 0;
  transition: background .15s ease, transform .15s ease;
}
.expense-row:hover { background: #fffaf0; }
.expense-row:active { transform: scale(.995); }
.expense-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: #fff4d7;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.expense-icon .category-illustration {
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.expense-copy strong,
.expense-copy small {
  display: block;
}
.expense-copy small,
.expense-amount small {
  font-size: 12px;
  color: var(--muted);
}
.expense-copy em {
  font-style: normal;
  font-size: 10px;
  color: #3a8351;
  background: var(--green);
  padding: 3px 7px;
  border-radius: 999px;
}
.expense-amount {
  text-align: right;
}
.expense-amount strong {
  display: block;
  color: var(--navy);
}
.row-arrow {
  font-size: 23px;
  color: var(--navy);
}
.is-settled {
  background: #f8fff7;
  border: 1px solid #b9dfbc;
  border-radius: 14px;
  margin: 5px 0;
}
.empty-state {
  text-align: center;
  padding: 35px;
  color: var(--muted);
}
.side-panel {
  padding: 18px;
  height: max-content;
}
.side-panel button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 17px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 15px;
  font-weight: 800;
  margin-bottom: 10px;
  text-align: left;
}
.side-panel > img {
  width: 180px;
  margin: 22px auto -18px;
}
.form-shell,
.sub-shell {
  width: min(760px, 100%);
  padding: 20px;
  margin: auto;
}
.screen-bar {
  height: 54px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.screen-bar > b {
  font-size: 18px;
}
.screen-bar button {
  border: 0;
  background: transparent;
  color: var(--navy);
  padding: 9px;
  justify-self: start;
}
.screen-bar button:last-child {
  justify-self: end;
  font-size: 26px;
}
.expense-form,
.report-card,
.settle-card,
.settled-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 25px;
  box-shadow: var(--shadow);
  padding: 25px;
}
.expense-form label,
.expense-form legend,
.start-dialog label {
  display: block;
  border: 0;
  font-size: 14px;
  font-weight: 800;
  font-family: "Nunito", system-ui, sans-serif;
  line-height: 1.3;
}
.expense-form > label,
.expense-form > .form-row > label,
.expense-form fieldset > legend,
.expense-dialog > label,
.expense-dialog .form-row > label,
.expense-dialog fieldset > legend {
  font-family: "Patrick Hand", cursive;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.15;
  color: #245a91;
}
.expense-form > label,
.expense-form > .form-row > label,
.expense-form fieldset > legend {
  font-size: 22px;
}
.expense-form label > span:not(.receipt-box),
.expense-form legend > span,
.receipt-label > span:not(.receipt-box) {
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
}
.expense-form > label,
.expense-form > .form-row,
.expense-form > textarea {
  margin-bottom: 18px;
}
.expense-form input,
.expense-form select,
.expense-form textarea,
.dialog input,
.dialog select {
  display: block;
  width: 100%;
  border: 1px solid #dcd4c7;
  background: #fff;
  border-radius: 13px;
  padding: 13px;
  margin-top: 6px;
  color: var(--ink);
}
.expense-form input,
.expense-form select,
.expense-form textarea,
.expense-dialog input,
.expense-dialog select,
.expense-dialog textarea {
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 7px;
}
.category {
  border: 2px solid #ead6a4;
  background: #fffdf6;
  border-radius: 45% 55% 48% 52% / 54% 46% 55% 45%;
  padding: 12px 5px;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
}
.category:nth-child(2n) { transform: rotate(1deg); }
.category:nth-child(3n) { transform: rotate(-1deg); }
.category .category-illustration {
  width: 88%;
  height: 88%;
  max-width: 145px;
  max-height: 145px;
  object-fit: contain;
  margin: auto;
}
.category.selected {
  border: 2px solid var(--navy);
  background: #fff9df;
  box-shadow: 3px 4px 0 #f2cb62;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.form-row label,
.amount-input,
.amount-input input,
.amount-input select { min-width: 0; max-width: 100%; }
.form-row > * {
  min-width: 0;
}
.form-row input[type="date"] {
  min-width: 0;
  max-width: 100%;
}
.start-dialog .trip-date-row input[type="date"] {
  box-sizing: border-box;
  height: 52px;
  min-height: 52px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 52px;
  font-size: 15px;
}
.start-dialog .trip-date-row input[type="date"]::-webkit-date-and-time-value {
  min-height: 52px;
  line-height: 52px;
  text-align: left;
}
.start-dialog input[aria-invalid="true"] {
  border-color: #d65b52;
  box-shadow: 0 0 0 3px rgba(214, 91, 82, .12);
}
.form-error {
  margin: -4px 0 16px;
  padding: 11px 13px;
  border: 1px solid #e6a39d;
  border-radius: 12px;
  background: #fff1ef;
  color: #8f2f29;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}
.form-error[hidden] { display: none; }
.amount-input {
  display: grid;
  grid-template-columns: 1fr 100px;
}
.amount-input input {
  border-radius: 13px 0 0 13px;
}
.amount-input select {
  border-radius: 0 13px 13px 0;
  border-left: 0;
}
.expense-date-input {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 49px;
  margin-top: 6px;
  overflow: hidden;
  border: 1px solid #dcd4c7;
  border-radius: 13px;
  background: #fff;
  position: relative;
}
.expense-date-input input[type="date"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100% !important;
  height: 100% !important;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.expense-date-input > span {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 0 12px;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  pointer-events: none;
}
.person-selectors {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.person-selector {
  width: auto;
  max-width: 220px;
  min-height: 48px;
  border: 1px solid #e8ddcc;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 13px 6px 6px;
  position: relative;
}
.person-selector .avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}
.person-selector > span {
  min-width: 0;
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}
.person-selector i {
  display: none;
  position: absolute;
  right: -3px;
  top: -5px;
  font-style: normal;
  font-size: 10px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  width: 17px;
  height: 17px;
  place-items: center;
}
.person-selector.selected {
  background: #eef5ff;
  border-color: var(--navy);
}
.person-selector.selected .avatar {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px var(--navy);
}
.person-selector.selected i {
  display: grid;
}
.note-toggle {
  border: 0;
  background: transparent;
  color: #2c5c95;
  font-weight: 800;
  padding: 0;
  margin-bottom: 14px;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 15px;
}
.receipt-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.receipt-box {
  display: flex !important;
  align-items: center;
  gap: 13px;
  border: 1px dashed #c8b9a4;
  border-radius: 14px;
  padding: 13px;
  margin-top: 7px;
  font-size: 22px;
  font-family: "Nunito", system-ui, sans-serif;
}
.receipt-box span {
  display: block;
}
.receipt-box b,
.receipt-box small {
  display: block;
  font-family: "Nunito", system-ui, sans-serif;
}
.receipt-box b {
  font-size: 14px;
  line-height: 1.3;
}
.receipt-box small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.receipt-box.has-file {
  border-color: #8bc79a;
  background: #f1fbf2;
}
.save-expense {
  width: 100%;
  margin-top: 3px;
}
.sub-shell {
  max-width: 680px;
}
.view-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 6px 0 14px;
}
.view-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 800;
}
.view-tabs .active {
  background: var(--navy);
  color: #fff;
}
.report-heading {
  display: flex;
  align-items: center;
  gap: 15px;
}
.report-heading img {
  width: 130px;
  height: 90px;
  object-fit: contain;
}
.report-heading h2 {
  margin: 0;
  color: var(--navy);
}
.report-heading p {
  margin: 2px 0;
  color: var(--muted);
}
.report-total {
  position: relative;
  background: #fff5dc;
  border-radius: 18px;
  padding: 16px;
  margin: 17px 0;
}
.report-total span,
.report-total strong {
  display: block;
}
.report-chester {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px auto 0;
  color: var(--navy);
}
.report-chester img {
  width: 120px;
  height: 105px;
  object-fit: contain;
}
.report-chester p {
  margin: 0;
  font-size: 22px;
  transform: rotate(-3deg);
}
.modal-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  margin: 15px 0 2px;
}
.modal-divider::before,
.modal-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.text-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--navy);
  margin-top: 12px;
  font-weight: 800;
  text-decoration: underline;
}
.report-total span {
  font-size: 13px;
  color: var(--muted);
}
.report-total strong {
  font-size: 29px;
  color: var(--navy);
}
.report-card h3 {
  font-size: 15px;
}
.report-explainer {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.report-explainer b {
  color: var(--navy);
}
.person-report {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #eee7dc;
  padding: 12px 3px;
}
.report-person {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.report-status {
  display: inline-flex;
  width: max-content;
  margin: 0 0 0 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff2d8;
  color: #8a5a17;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}
.report-status.settled {
  background: #e8f5e5;
  color: #3e7a45;
}
.person-report small,
.person-report strong {
  display: block;
}
.person-report small {
  color: var(--muted);
  font-size: 11px;
}
.person-report strong {
  color: var(--navy);
  font-size: 14px;
}
.settle-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px;
  color: var(--navy);
  margin-top: 18px;
}
.settle-link .avatar {
  width: 29px;
  height: 29px;
  margin-right: 7px;
}
.settle-card h1 {
  font-size: 19px;
}
.balance-card,
.individual {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 16px;
  background: #fff;
}
.balance-card small {
  font-style: italic;
}
.settlement-route {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.balance-card .settlement-route {
  margin-top: 6px;
}
.settlement-route i {
  color: var(--navy);
  font-size: 17px;
  font-style: normal;
  font-weight: 900;
}
.balance-card > strong {
  font-size: 22px;
  color: var(--navy);
}
.settle-all {
  width: 100%;
  margin: 14px 0;
}
.or {
  height: 30px;
  border-bottom: 1px solid #d6cbb8;
  text-align: center;
  margin-bottom: 23px;
}
.or span {
  position: relative;
  top: 18px;
  background: #fff;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}
.individual > div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.individual .individual-payment {
  display: grid;
  gap: 7px;
}
.individual-payment > b {
  color: var(--navy);
}
.individual button {
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 13px;
}
.settle-cheer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 -25px;
}
.settle-cheer img {
  width: 210px;
}
.settle-cheer p {
  font-size: 25px;
  color: var(--navy);
}
.settled-card {
  text-align: center;
}
.celebrate {
  width: 260px;
  margin: 0 auto -5px;
}
.even-banner {
  background: #e9f8e8;
  border: 1px solid #cce8ca;
  border-radius: 20px;
  padding: 16px;
}
.even-banner i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  margin: auto;
  background: #14a850;
  color: #fff;
  border-radius: 50%;
  font-style: normal;
}
.even-banner h1 {
  font-size: 23px;
  margin: 8px 0 2px;
}
.even-banner p {
  color: #52667a;
  margin: 0;
  font-size: 13px;
}
.settled-card h3 {
  text-align: left;
}
.settlement-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 1px solid #d6ead5;
  border-radius: 15px;
  padding: 12px;
  background: #fbfff9;
}
.settlement-row > div {
  display: flex;
  align-items: center;
}
.settlement-row .avatar {
  width: 29px;
  height: 29px;
}
.settlement-row span {
  font-size: 12px;
}
.settlement-row em {
  font-size: 11px;
  font-style: normal;
  background: var(--green);
  color: #408251;
  padding: 5px 9px;
  border-radius: 999px;
}
.back-trip {
  width: 100%;
  margin-top: 18px;
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(25, 28, 31, 0.62);
  display: grid;
  place-items: center;
  padding: 22px;
  z-index: 20;
}
.more-menu,
.dialog {
  width: min(430px, 100%);
  background: #fff;
  border-radius: 24px;
  padding: 17px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  position: relative;
}
.more-menu > img {
  width: 92px;
  height: 82px;
  object-fit: contain;
  margin: 0 auto 2px;
}
.more-menu > button:not(.close) {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 17px;
  margin-top: 9px;
  color: var(--navy);
  font-weight: 800;
}
.more-menu .danger {
  color: var(--danger) !important;
}
.close {
  position: absolute;
  right: 13px;
  top: 8px;
  border: 0 !important;
  background: transparent !important;
  font-size: 26px !important;
  width: auto !important;
  padding: 5px !important;
  color: var(--ink) !important;
}
.dialog {
  text-align: center;
  padding: 28px;
  max-height: calc(100dvh - 30px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dialog h2 {
  margin: 5px 0;
}
.dialog p {
  color: var(--muted);
}
.dialog .btn {
  width: 100%;
  margin-top: 12px;
}
.expense-dialog { text-align: left; width: min(560px, 100%); }
.expense-dialog h2 { text-align: center; margin-bottom: 20px; }
.expense-dialog > label { display: block; margin: 14px 0; font-weight: 400; font-size: 21px; }
.expense-dialog fieldset { text-align: left; }
.expense-dialog legend { font-weight: 400; font-size: 21px; }
.expense-dialog input,
.expense-dialog select,
.expense-dialog textarea { width: 100%; min-width: 0; max-width: 100%; }
.expense-dialog .person-selector { width: auto; }
.delete-expense-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--danger);
  font-weight: 800;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.receipt-view-button {
  width: 100%;
  border: 1px solid #acd5b5;
  border-radius: 14px;
  background: #eff9f0;
  color: var(--navy);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: left;
}
.receipt-view-button .ui-icon { color: #337346; }
.receipt-view-button span,
.receipt-view-button b,
.receipt-view-button small { display: block; }
.receipt-view-button small { color: var(--muted); font-size: 12px; font-weight: 600; }
.currency-dialog label { display: block; text-align: left; font-weight: 800; margin-top: 18px; }
.currency-dialog select { width: 100%; font-size: 16px; }
.dialog-icon {
  font-size: 31px;
  color: var(--navy);
}
.danger-icon {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffe4e4;
  color: var(--danger);
  margin: auto;
}
.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.start-dialog {
  text-align: left;
  width: min(560px, 100%);
  background: var(--cream);
}
.start-dialog h2 {
  text-align: center;
  color: var(--navy);
  font-size: 32px;
  line-height: 1.1;
  margin: 2px 0 16px;
}
.start-dialog label {
  margin: 9px 0;
}
.start-dialog > label,
.start-dialog .trip-date-row > label,
.start-dialog .traveler-input-row label span,
.start-dialog .traveler-builder legend {
  font-family: "Patrick Hand", cursive;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.15;
  color: #245a91;
}
.start-dialog input,
.start-dialog select {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 700;
}
.traveler-builder legend {
  padding: 0 6px;
  color: var(--ink);
}
.current-travelers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.current-travelers .avatar {
  width: 32px;
  height: 32px;
}
.traveler-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.edit-travelers,
.share-trip {
  border: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  padding: 6px 0;
  line-height: 1.2;
}
.traveler-help {
  font-size: 13px;
  line-height: 1.4;
  margin: -3px 0 8px;
}
.traveler-help.centered {
  text-align: center;
  margin: 0 0 14px;
}
.traveler-fields {
  display: grid;
  gap: 9px;
}
.traveler-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: end;
  gap: 8px;
}
.traveler-input-row label {
  margin: 0;
}
.traveler-input-row > button {
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: #fff0ed;
  color: #d95c4f;
  font-size: 22px;
}
.add-person-link {
  border: 0;
  background: transparent;
  color: #b76b26;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 800;
  padding: 7px 0;
}
.share-trip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.share-trip .ui-icon { width: 18px; height: 18px; }
.field-note {
  display: block;
  color: #7b6b58;
  margin: -8px 0 8px;
  font-size: 13px;
  line-height: 1.35;
}
.rate-note {
  display: block;
  color: #7b6b58;
  margin: -2px 0 12px;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.35;
}
.traveler-input-row:has(> label:only-child) {
  grid-template-columns: 1fr;
}
.traveler-builder {
  position: relative;
  z-index: 0;
  border: 1px solid #f0d274;
  border-radius: 16px;
  padding: 14px;
  margin: 16px 0;
  background: #fff9e7;
}
.traveler-builder p {
  font-size: 13px;
  margin: 0 0 10px;
}
.traveler-builder input {
  scroll-margin-bottom: 0;
}
.join-people {
  display: grid;
  gap: 8px;
  margin: 15px 0;
}
.join-dialog {
  width: min(520px, 100%);
  padding: 0 24px 24px;
  overflow: hidden;
}
.join-hero {
  margin: 0 -24px 22px;
  padding: 22px 30px 18px;
  min-height: 155px;
  background: #fff3c9;
  display: grid;
  grid-template-columns: 125px 1fr;
  align-items: center;
  text-align: left;
}
.join-hero img { width: 125px; height: 125px; object-fit: contain; align-self: end; }
.join-hero small { color: #9b651f; font-weight: 800; }
.join-hero h2 { color: var(--navy); margin: 2px 0; font-size: 30px; }
.join-hero p { margin: 0; color: #5f6f82; }
.join-dialog h3 { text-align: left; margin: 0; color: var(--navy); }
.join-privacy-note {
  display: grid;
  gap: 2px;
  margin: -5px 0 18px;
  padding: 11px 13px;
  border: 1px solid #bdd7ee;
  border-radius: 13px;
  background: #f1f8ff;
  color: #244d78;
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
}
.join-privacy-note b { color: var(--navy); }
.join-person-card {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px 14px;
  background: #fff;
  color: var(--navy);
  text-align: left;
  font-weight: 900;
}
.join-person-card:hover { background: #fffaf0; border-color: #e8c56e; }
.join-person-card:disabled {
  cursor: default;
  opacity: .62;
  background: #f4f3f0;
  border-color: #e5e0d8;
}
.join-person-card .avatar { width: 44px; height: 44px; }
.join-person-card > span { display: grid; gap: 1px; }
.join-person-card > span b { font: inherit; }
.join-person-card > span small { color: var(--muted); font-size: 11px; font-weight: 700; }
.join-person-card i { font-style: normal; font-size: 27px; }
.join-note { font-size: 12px; margin: 4px 0 0; }
.friend-email-dialog { text-align: center; }
.friend-email-dialog > img {
  display: block;
  width: 112px;
  height: 105px;
  object-fit: contain;
  margin: -8px auto 2px;
}
.friend-email-dialog h2 { margin-top: 0; }
.friend-email-dialog > p { margin: 4px 0 18px; }
.friend-email-dialog label { text-align: left; }
.friend-email-note {
  display: block;
  margin: 7px 0 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}
.profile-dialog { text-align: center; }
.profile-avatar-large {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 2px auto 10px;
  border-radius: 50%;
  background: #ffc6ce;
  color: var(--ink);
  font-size: 27px;
  font-weight: 900;
}
.profile-dialog h2 { margin: 0; }
.profile-dialog > p { margin: 5px 0 18px; }
.profile-dialog label { text-align: left; }
.profile-email {
  display: block;
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}
.message-dialog {
  background: #fff8dc;
  border: 3px solid #f2c94c;
}
.message-dialog.error {
  background: #fff1ed;
  border-color: #f19883;
}
.message-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #f2c94c;
  color: #5d4610;
  font-size: 25px;
  font-weight: 900;
}
.message-dialog.error .message-mark {
  background: #f19883;
  color: #6d2119;
}
.message-button {
  background: #dc7a52;
  color: white;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #f5c84c;
  color: #523e0d;
  padding: 13px 19px;
  border-radius: 999px;
  z-index: 50;
  box-shadow: var(--shadow);
}
@media (min-width: 641px) {
  .landing-shell {
    height: 100svh;
    min-height: 620px;
    padding-top: 18px;
    padding-bottom: 18px;
  }
  .landing-shell > .brand {
    justify-content: flex-start;
    margin-bottom: 0;
  }
  .landing-content {
    display: grid;
    grid-template-columns: minmax(390px, 0.9fr) minmax(460px, 1.1fr);
    min-height: calc(100svh - 92px);
    text-align: left;
    align-items: center;
  }
  .landing-copy {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    padding-bottom: 28px;
  }
  .landing-visual {
    grid-column: 2;
    grid-row: 1;
    min-height: 510px;
    width: 100%;
  }
  .landing-chester {
    width: min(460px, 78%);
    height: 470px;
  }
  .landing-bg {
    width: 125%;
    height: 430px;
    left: -15%;
    bottom: 35px;
  }
  .landing-copy h1 {
    font-size: clamp(52px, 5vw, 76px);
  }
  .landing-copy .hero-note {
    position: relative;
    width: max-content;
    font-size: 25px;
    line-height: 1.1;
    color: #52627a;
    transform: rotate(-2deg);
    margin: 18px 0 20px;
  }
  .landing-actions {
    justify-content: flex-start;
  }
  .landing-actions .btn {
    min-width: 195px;
  }
}
@media (max-width: 950px) {
  .wide-shell {
    padding: 25px;
  }
  .trip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .trip-layout {
    grid-template-columns: 1fr 250px;
  }
  .summary-card {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
  .summary-card > img {
    display: none;
  }
}
@media (max-width: 760px) {
  .start-trip-page {
    min-height: 0;
    padding: 24px 18px 64px;
    overflow: visible;
  }
  .start-trip-form {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .overlay {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .dialog {
    flex: 0 0 auto;
    width: 100%;
    max-width: 520px;
    max-height: none;
    overflow: visible;
    margin: max(10px, env(safe-area-inset-top)) auto max(16px, env(safe-area-inset-bottom));
  }
  .start-dialog .form-row,
  .dialog .form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dialog input,
  .dialog select,
  .dialog textarea,
  .expense-form input,
  .expense-form select,
  .expense-form textarea {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    font-size: 16px;
  }
  input[type="date"] {
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .start-dialog,
  .expense-dialog { min-width: 0; }
}
@media (max-width: 640px) {
  body.landing-screen {
    position: fixed;
    inset: 0;
    width: 100%;
  }
  body.landing-screen,
  body.landing-screen #app,
  body.landing-screen .landing.page,
  body.landing-screen .landing-shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }
  body.landing-screen .landing-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding-top: max(28px, calc(env(safe-area-inset-top) + 14px));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  body.landing-screen .landing-content {
    min-height: 0;
    height: 100%;
    justify-content: flex-start;
    overflow: hidden;
    padding-top: 0;
  }
  body.landing-screen .site-footer {
    margin-top: 4px;
    padding: 8px 4px max(3px, env(safe-area-inset-bottom));
  }
  .page {
    background: var(--cream);
  }
  .wide-shell,
  .landing-shell {
    padding: 15px 15px 28px;
    max-width: 430px;
    width: 100%;
    overflow-x: hidden;
  }
  .mobile-only,
  .mobile-footer,
  .mobile-tripbar,
  .mobile-add {
    display: flex;
  }
  .mobile-trip-art {
    display: block;
    height: 132px;
    margin: 8px 0 10px;
    border: 1px solid #efdcae;
    border-radius: 22px;
    background: #dff0ff;
    overflow: visible;
    position: relative;
    box-shadow: 0 5px 0 rgba(229, 183, 62, 0.13);
  }
  .mobile-destination {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .mobile-art-chester {
    position: absolute;
    right: 8px;
    bottom: -7px;
    width: 96px;
    height: 102px;
    object-fit: contain;
    filter: drop-shadow(0 3px 0 rgba(255,255,255,.85));
  }
  .app-header {
    padding: 0 4px;
  }
  .brand.compact {
    font-size: 25px;
    gap: 5px;
  }
  .brand.compact img {
    width: 36px;
    height: 36px;
  }
  .brand.compact i {
    display: none;
  }
  .header-actions {
    gap: 5px;
  }
  .currency-pill {
    display: none;
  }
  .profile-pill {
    font-size: 0;
  }
  .profile-pill .avatar {
    width: 37px;
    height: 37px;
    font-size: 15px;
  }
  .profile-menu {
    right: -2px;
    width: 175px;
  }
  .landing-shell > .brand {
    justify-content: center;
    font-size: 35px;
    flex: 0 0 auto;
    display: flex !important;
    position: relative;
    z-index: 5;
    min-height: 40px;
    margin: 0 auto 4px;
    visibility: visible;
    opacity: 1;
  }
  body.landing-screen .landing-shell > .brand {
    display: flex !important;
  }
  .mobile-wordmark {
    display: block;
    flex: 0 0 auto;
    order: -1;
    margin: 0 auto 3px;
    color: #101c2d;
    font-size: 35px;
    line-height: 1.1;
    text-align: center;
  }
  .mobile-wordmark i {
    color: #f5bb14;
    font-family: "Nunito", system-ui, sans-serif;
    font-size: 22px;
    font-style: normal;
  }
  .landing-shell > .brand img {
    display: none;
  }
  .landing-shell > .brand i {
    font-size: 23px;
  }
  .landing-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: auto;
  }
  .landing-visual {
    min-height: 0;
    height: clamp(180px, 29dvh, 230px);
    width: 100%;
    order: 0;
    overflow: hidden;
  }
  .landing-bg {
    width: 112%;
    height: 100%;
    bottom: 0;
    left: -6%;
    opacity: 0.98;
  }
  .landing-chester {
    width: min(250px, 56vw);
    height: 100%;
  }
  .landing-copy {
    order: 1;
    text-align: center;
    width: 100%;
  }
  .landing-copy h1 {
    font-size: clamp(28px, 4.8dvh, 35px);
    line-height: 1.08;
    margin: 0 0 10px;
    letter-spacing: -0.035em;
  }
  .landing-copy p {
    font-size: 15px;
    margin-bottom: 14px;
  }
  .landing-copy .hero-note {
    width: auto;
    margin: 6px auto 14px;
    font-size: clamp(15px, 2.2dvh, 17px);
    line-height: 1.25;
    transform: none;
  }
  .hero-note span {
    display: inline-block;
    font-size: 25px;
    margin-left: 7px;
    vertical-align: -2px;
  }
  .landing-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .landing-actions .btn {
    width: 100%;
    padding: clamp(10px, 1.8dvh, 13px);
  }
  .trips-intro {
    margin: 15px 4px 12px;
    align-items: flex-start;
  }
  .hello {
    font-size: 18px;
    margin: 0 0 2px;
  }
  .trips-intro h1 {
    font-size: 42px;
  }
  .prompt {
    font-size: 18px;
  }
  .trips-cheer {
    display: none;
  }
  .trip-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .trip-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    padding: 9px;
    border-radius: 18px;
    min-height: 120px;
  }
  .trip-art {
    height: 102px;
    border-radius: 13px;
  }
  .trip-card-copy {
    padding: 2px 6px;
    position: relative;
  }
  .trip-name-line h2 {
    font-size: 17px;
  }
  .trip-name-line button {
    display: none;
  }
  .trip-card p {
    font-size: 12px;
  }
  .trip-card .people {
    margin-top: 6px;
    gap: 5px;
  }
  .trip-card .traveler-pill {
    min-height: 29px;
    padding: 2px 7px 2px 3px;
    gap: 4px;
    max-width: 112px;
    font-size: 10px;
  }
  .trip-card .traveler-pill .avatar {
    width: 23px;
    height: 23px;
    flex-basis: 23px;
    font-size: 10px;
  }
  .mobile-chevron {
    display: block;
    position: absolute;
    right: 0;
    top: 39%;
    font-size: 29px;
  }
  .start-card {
    min-height: 52px;
    padding: 10px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    border-radius: 15px;
  }
  .start-card .big-plus {
    width: 31px;
    height: 31px;
    font-size: 28px;
    margin: 0;
    background: transparent;
  }
  .start-card b {
    font-size: 17px;
  }
  .start-card small {
    display: none;
  }
  .mobile-footer {
    justify-content: space-between;
    border-top: 1px solid var(--line);
    margin-top: 12px;
    padding: 12px 4px 0;
  }
  .site-footer {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    padding: 15px 8px calc(24px + env(safe-area-inset-bottom));
    text-align: center;
    font-size: 12px;
  }
  .site-footer nav { gap: 18px; }
  .mobile-footer button {
    border: 0;
    background: transparent;
    color: #6d7581;
    font-size: 12px;
  }
  .app-header + .mobile-tripbar {
    margin-top: 9px;
  }
  .mobile-tripbar {
    display: grid;
    grid-template-columns: 35px 1fr 35px;
    align-items: center;
    text-align: center;
  }
  .mobile-tripbar button {
    border: 0;
    background: transparent;
    color: var(--navy);
    font-weight: 900;
  }
  .mobile-tripbar div b,
  .mobile-tripbar div small {
    display: block;
  }
  .mobile-tripbar div b {
    color: var(--navy);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.15;
  }
  .mobile-tripbar div small {
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
  }
  .trip-layout {
    display: block;
    margin: 7px auto;
  }
  .trip-main {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .trip-heading {
    display: none;
  }
  .recovery-reminder {
    font-size: 11px;
    margin-top: 8px;
    padding: 8px;
  }
  .saved-status {
    margin: 8px auto;
    font-size: 11px;
    padding: 5px 12px;
  }
  .summary-card {
    display: block;
    padding: 16px;
    min-height: 138px;
    margin: 10px 0 10px;
    position: relative;
    overflow: hidden;
  }
  .summary-card .total {
    padding-right: 104px;
  }
  .summary-card .total strong {
    font-size: 32px;
  }
  .summary-card .stat {
    display: none;
  }
  .summary-card .stat strong {
    font-size: 15px;
  }
  .summary-card > img {
    display: block;
    position: absolute;
    right: 7px;
    bottom: -4px;
    top: auto;
    width: 108px;
    height: 116px;
    object-fit: contain;
  }
  .mobile-trip-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0 0 14px;
  }
  .mobile-trip-actions button {
    border: 1px solid #e8d8bd;
    border-radius: 14px;
    background: #fff;
    color: var(--navy);
    min-height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 900;
  }
  .mobile-trip-actions button:last-child {
    background: #fff2c8;
    border-color: #e8c75f;
  }
  .mobile-trip-footer-art {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    min-height: 125px;
    margin: 14px 0 54px;
    overflow: hidden;
  }
  .mobile-trip-footer-art img {
    width: 108px;
    height: 112px;
    object-fit: contain;
    align-self: flex-end;
  }
  .mobile-trip-footer-art p {
    color: var(--navy);
    font-size: 19px;
    line-height: 1;
    transform: rotate(-4deg);
    margin: 0 0 27px -7px;
  }
  .expense-title-row {
    margin: 13px 0 5px;
    align-items: center;
    gap: 8px;
  }
  .expense-title-row h2 {
    font-size: 15px;
  }
  .add-expense-main {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: auto;
    margin: 0;
    padding: 13px;
    white-space: nowrap;
    z-index: 12;
    border-radius: 16px;
  }
  .expense-section {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }
  .expense-row {
    grid-template-columns: 50px minmax(0, 1fr) auto 10px;
    padding: 9px 3px;
    gap: 8px;
  }
  .expense-icon {
    width: 47px;
    height: 47px;
  }
  .expense-icon .category-illustration {
    width: 43px;
    height: 43px;
  }
  .expense-copy strong {
    font-size: 13px;
  }
  .expense-copy small {
    font-size: 11px;
  }
  .expense-amount strong {
    font-size: 12px;
  }
  .date-label {
    font-size: 11px;
  }
  .side-panel {
    display: none;
  }
  .form-shell,
  .sub-shell {
    padding: 8px 14px 24px;
    max-width: 430px;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }
  .screen-bar {
    height: 48px;
  }
  .expense-form,
  .report-card,
  .settle-card,
  .settled-card {
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
  }
  .category-grid {
    gap: 5px;
  }
  .category {
    padding: 3px;
  }
  .category .category-illustration {
    width: 88%;
    height: 88%;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .expense-form > .expense-entry-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
    gap: 10px;
  }
  .expense-entry-row > label,
  .expense-entry-row .amount-input,
  .expense-entry-row .expense-date-input,
  .expense-form > label > input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .expense-entry-row .amount-input {
    display: flex;
    align-items: stretch;
    width: 100% !important;
  }
  .expense-entry-row .amount-input input {
    flex: 1 1 0;
    width: 0 !important;
  }
  .expense-entry-row .amount-input select {
    flex: 0 0 90px;
    width: 90px !important;
  }
  .expense-form > label > input,
  .expense-entry-row .amount-input input,
  .expense-entry-row .amount-input select,
  .expense-entry-row .expense-date-input {
    height: 52px;
    min-height: 52px;
  }
  .expense-entry-row .amount-input select {
    padding-left: 8px;
    padding-right: 6px;
  }
  .expense-entry-row .amount-input input,
  .expense-entry-row .amount-input select,
  .expense-entry-row .expense-date-input {
    box-sizing: border-box;
    height: 52px;
    min-height: 52px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 52px;
  }
  .expense-entry-row input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
  }
  .trip-detail-page .site-footer {
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }
  .expense-form > label,
  .expense-form > .form-row {
    margin-bottom: 10px;
  }
  .expense-form input,
  .expense-form select,
  .expense-form textarea {
    padding: 11px;
    font-size: 16px;
  }
  .person-selectors {
    justify-content: flex-start;
    gap: 7px;
  }
  .person-selector {
    width: auto;
    min-width: 88px;
    min-height: 40px;
    border-color: #eadfce;
    background: rgba(255,255,255,.7);
    flex-direction: row;
    padding: 5px 9px;
    border-radius: 999px;
    justify-content: flex-start;
  }
  .person-selector .avatar {
    width: 28px;
    height: 28px;
    margin: 0;
  }
  .person-selector > span { font-size: 12px; }
  .person-selector i { right: 2px; top: -5px; }
  .receipt-box {
    padding: 10px;
  }
  .view-tabs {
    margin-top: 4px;
  }
  .view-tabs button {
    padding: 6px 14px;
    font-size: 12px;
  }
  .report-heading img {
    width: 102px;
    height: 78px;
  }
  .report-heading h2 {
    font-size: 17px;
  }
  .report-heading p {
    font-size: 11px;
  }
  .report-total {
    padding: 13px;
  }
  .report-total strong {
    font-size: 23px;
  }
  .person-report {
    grid-template-columns: 1.35fr .85fr .85fr;
    padding: 10px 2px;
  }
  .person-report .traveler-pill {
    max-width: 125px;
    min-height: 34px;
    font-size: 11px;
  }
  .person-report strong {
    font-size: 12px;
  }
  .person-report small {
    line-height: 1.12;
  }
  .report-explainer {
    font-size: 12px;
  }
  .settle-card h1 {
    font-size: 15px;
  }
  .settle-cheer img {
    width: 145px;
  }
  .settle-cheer p {
    font-size: 21px;
  }
  .celebrate {
    width: 230px;
  }
  .settled-card h3 {
    font-size: 14px;
  }
  .settlement-row {
    grid-template-columns: auto 1fr auto;
  }
  .more-menu { margin-top: 0; }
  .dialog {
    max-width: 390px;
    padding: 23px 18px;
    max-height: none;
    overflow: visible;
  }
  .dialog .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .overlay {
    padding: max(58px, calc(env(safe-area-inset-top) + 44px)) 10px max(10px, env(safe-area-inset-bottom));
    align-items: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .start-dialog {
    width: 100%;
    margin: 0 auto;
  }
  .start-dialog .traveler-builder {
    border: 1px solid #f0d274;
    border-radius: 16px;
    margin: 18px 0 12px;
    padding: 11px 12px 10px;
    background: #fff9e7;
  }
  .start-dialog .traveler-builder p {
    margin-bottom: 6px;
  }
  .start-dialog .traveler-builder legend {
    padding: 0 6px;
  }
  .start-trip-overlay {
    display: block;
    inset: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--cream);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .start-trip-overlay .start-dialog {
    width: 100%;
    max-width: none;
    min-height: 100%;
    margin: 0;
    padding: max(24px, env(safe-area-inset-top)) 18px calc(38px + env(safe-area-inset-bottom));
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    background: var(--cream);
  }
  .start-trip-overlay .start-dialog h2 {
    margin-top: 0;
  }
  .start-dialog input,
  .start-dialog select { width: 100%; min-width: 0; max-width: 100%; }
  .expense-dialog .person-selectors { justify-content: flex-start; gap: 6px; }
  .expense-dialog .person-selector { width: auto; max-width: calc(50% - 3px); }
  .join-dialog { padding: 0 15px 18px; }
  .join-hero { margin: 0 -15px 18px; padding: 18px 20px 14px; grid-template-columns: 95px 1fr; min-height: 125px; }
  .join-hero img { width: 92px; height: 105px; }
  .join-hero h2 { font-size: 24px; }
  .toast {
    width: max-content;
    max-width: 90%;
    font-size: 13px;
    text-align: center;
  }
}
@media (max-width: 365px) {
  .wide-shell {
    padding-left: 10px;
    padding-right: 10px;
  }
  .landing-visual {
    min-height: 168px;
  }
  .landing-chester {
    width: 215px;
  }
  .landing-copy h1 {
    font-size: 33px;
  }
  .category .category-illustration {
    width: 88%;
    height: 88%;
  }
  .summary-card .total strong {
    font-size: 25px;
  }
}

@media (max-width: 760px) {
  .start-dialog .trip-date-row {
    display: flex;
    grid-template-columns: none;
    gap: 10px;
    width: 100%;
  }
  .start-dialog .trip-date-row > label {
    flex: 1 1 0;
    min-width: 0;
    width: calc(50% - 5px);
    max-width: calc(50% - 5px);
    overflow: hidden;
  }
  .start-dialog .trip-date-row input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    inline-size: 100% !important;
    width: 100% !important;
    min-inline-size: 0 !important;
    max-inline-size: 100% !important;
    height: 50px !important;
    min-height: 50px !important;
    line-height: 50px;
    padding: 0 10px;
    font-size: 14px;
    overflow: hidden;
  }
  .start-dialog .trip-date-row input[type="date"]::-webkit-date-and-time-value {
    min-width: 0;
    width: 100%;
    margin: 0;
    line-height: 50px;
    text-align: left;
  }
}
