:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --bg: #04111e;
  --bg-soft: #081a2b;
  --surface: rgba(10, 27, 44, .9);
  --surface-strong: #102b42;
  --surface-soft: #15344d;
  --line: rgba(214, 238, 255, .13);
  --line-strong: rgba(214, 238, 255, .22);
  --text: #f4faff;
  --muted: #91a9bb;
  --muted-strong: #bed0de;
  --primary: #a9e8ff;
  --primary-strong: #6cc9f2;
  --primary-ink: #071725;
  --live: #70e5aa;
  --coral: #ff8b73;
  --blue: #88baff;
  --danger: #ff9f8e;
  --shadow: 0 28px 90px rgba(0, 5, 14, .46);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: max(26px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 4%, rgba(255, 139, 115, .1), transparent 23%),
    radial-gradient(circle at 14% -4%, rgba(108, 201, 242, .13), transparent 30%),
    linear-gradient(180deg, #0a2034 0%, #071724 43%, var(--bg) 100%);
  color: var(--text);
}

.hero,
.trip-context,
.app-shell,
.site-footer { position: relative; z-index: 2; }

button,
input { font: inherit; }

button { border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }

input { min-width: 0; }

:focus-visible {
  outline: 3px solid rgba(169, 232, 255, .4);
  outline-offset: 3px;
}

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

.andes-scene {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.dawn-glow {
  position: absolute;
  top: -170px;
  right: -80px;
  width: min(54vw, 720px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 163, 132, .14), rgba(121, 190, 226, .06) 35%, transparent 68%);
  filter: blur(8px);
}

.andes-ranges {
  position: absolute;
  top: 42px;
  left: 50%;
  width: max(1180px, 116vw);
  height: min(590px, 67vh);
  opacity: .76;
  transform: translateX(-50%);
  filter: drop-shadow(0 25px 50px rgba(0, 5, 14, .22));
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
}

.ridge-far { opacity: .64; }
.ridge-near { opacity: .9; }
.ridge-front { fill: #071827; opacity: .96; }
.snow-cap-far { opacity: .42; }
.snow-cap-near { opacity: .58; }

.mountain-mist {
  position: absolute;
  inset: 34% -10% auto;
  height: 340px;
  background: linear-gradient(180deg, transparent, rgba(4, 17, 30, .44) 45%, var(--bg) 96%);
  filter: blur(8px);
}

.snowfall {
  position: fixed;
  z-index: 1;
  inset: 0;
  contain: strict;
  overflow: hidden;
  pointer-events: none;
  transform: translate3d(0, 0, 0) rotate(0) scale(1);
  transition: transform 170ms cubic-bezier(.2, .72, .24, 1);
}

.snow-layer {
  position: absolute;
  top: -120vh;
  left: -8vw;
  width: 116vw;
  height: 240vh;
  background-repeat: repeat;
  will-change: transform;
}

.snow-layer-far {
  background-image:
    radial-gradient(circle, rgba(238, 249, 255, .7) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(238, 249, 255, .48) 0 .8px, transparent 1.35px),
    radial-gradient(circle, rgba(238, 249, 255, .42) 0 1px, transparent 1.6px);
  background-position: 18px 24px, 76px 112px, 154px 58px;
  background-size: 137px 173px, 211px 247px, 307px 293px;
  opacity: .26;
  animation: snow-fall-far 38s linear infinite;
}

.snow-layer-near {
  background-image:
    radial-gradient(circle, rgba(247, 252, 255, .82) 0 1.8px, transparent 2.4px),
    radial-gradient(circle, rgba(247, 252, 255, .58) 0 1.25px, transparent 2px),
    radial-gradient(circle, rgba(247, 252, 255, .48) 0 1px, transparent 1.7px);
  background-position: 34px 76px, 128px 18px, 214px 148px;
  background-size: 223px 271px, 329px 347px, 419px 389px;
  opacity: .32;
  animation: snow-fall-near 24s linear infinite;
}

.snow-layer-burst,
.snow-layer-swirl {
  display: none;
  opacity: 0;
}

.snow-layer-burst {
  left: -18vw;
  width: 136vw;
  background-image:
    radial-gradient(circle, rgba(250, 254, 255, .96) 0 1.6px, transparent 2.2px),
    radial-gradient(circle, rgba(235, 248, 255, .88) 0 1.2px, transparent 1.9px),
    radial-gradient(circle, rgba(250, 254, 255, .72) 0 2.1px, transparent 2.8px),
    radial-gradient(circle, rgba(220, 241, 252, .72) 0 1px, transparent 1.7px);
  background-position: 8px 14px, 43px 71px, 97px 32px, 121px 104px;
  background-size: 61px 73px, 89px 107px, 137px 151px, 173px 191px;
}

.snow-layer-swirl {
  left: -24vw;
  width: 148vw;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .92) 0 2.5px, transparent 3.2px),
    radial-gradient(circle, rgba(225, 244, 255, .8) 0 1.8px, transparent 2.6px),
    radial-gradient(circle, rgba(249, 253, 255, .76) 0 1.3px, transparent 2px);
  background-position: 24px 48px, 91px 13px, 157px 126px;
  background-size: 149px 167px, 211px 229px, 277px 251px;
}

.snowfall-foreground {
  position: fixed;
  z-index: 3;
  inset: 0;
  contain: strict;
  overflow: hidden;
  pointer-events: none;
  transform: translate3d(0, 0, 0) rotate(0) scale(1);
  transition: transform 125ms cubic-bezier(.2, .72, .24, 1), opacity .16s ease;
}

.snowflake {
  position: absolute;
  top: -12vh;
  left: var(--snow-x);
  width: var(--snow-size);
  height: var(--snow-size);
  border-radius: 50%;
  background: rgba(248, 253, 255, .92);
  box-shadow: 0 0 8px rgba(211, 239, 255, .7);
  opacity: 0;
  animation: snowflake-fall var(--snow-duration) linear var(--snow-delay) infinite;
  will-change: transform, opacity;
}

.snow-crystal {
  width: 1em;
  height: 1em;
  background: transparent;
  color: rgba(244, 251, 255, .86);
  box-shadow: none;
  font-size: calc(var(--snow-size) + 5px);
  font-style: normal;
  line-height: 1;
  text-shadow: 0 0 8px rgba(197, 232, 250, .62);
}

.snow-crystal::before { content: "✦"; }

.hero {
  width: min(100%, 1040px);
  margin: 0 auto 24px;
  padding: 2px 4px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
}

.eyebrow-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 16px;
}

.eyebrow-row .eyebrow { flex: 0 0 auto; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(224, 243, 255, .055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(14px);
}

.brand-mark span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
}

.brand-mark i {
  color: var(--primary);
  font-size: 15px;
  font-style: normal;
}

.rate-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 20, 34, .68);
  color: var(--muted-strong);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(14px);
}

.weather-chip {
  min-height: 24px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 20, 34, .52);
  color: var(--muted-strong);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  backdrop-filter: blur(14px);
  transition: opacity .2s ease;
}

.weather-chip strong { color: var(--text); }
.weather-icon {
  font-size: 11px;
  line-height: 1;
  transition: color .25s ease, text-shadow .25s ease;
}

.weather-chip.is-day .weather-icon {
  color: #ffd36d;
  text-shadow: 0 0 7px rgba(255, 193, 77, .42);
}

.weather-chip.is-night .weather-icon {
  color: #c8dcff;
  text-shadow: 0 0 7px rgba(151, 190, 255, .4);
}
.weather-chip.is-loading { opacity: .68; }
.weather-chip.is-unavailable strong { color: var(--muted); }

.live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 5px rgba(112, 229, 170, .1), 0 0 16px rgba(112, 229, 170, .56);
}

.eyebrow,
.step-label {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.hero h1 {
  max-width: 720px;
  margin: 9px 0 10px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: .98;
  letter-spacing: -.055em;
  text-shadow: 0 15px 46px rgba(2, 10, 20, .34);
}

.hero > p {
  max-width: 620px;
  margin: 0;
  color: var(--muted-strong);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.55;
}

.trip-context {
  width: min(100%, 1040px);
  margin: 0 auto 20px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) minmax(260px, 390px);
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 50%, rgba(169, 232, 255, .1), transparent 28%),
    rgba(6, 22, 36, .78);
  box-shadow: 0 18px 50px rgba(0, 5, 14, .22), inset 0 1px 0 rgba(240, 249, 255, .055);
  backdrop-filter: blur(16px);
}

.trip-context-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(169, 232, 255, .18);
  border-radius: 14px;
  background: rgba(169, 232, 255, .08);
  color: var(--primary);
  font-size: 19px;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, opacity .18s ease;
}

.trip-context-icon:hover {
  border-color: rgba(169, 232, 255, .38);
  background: rgba(169, 232, 255, .14);
  transform: translateY(-1px);
}

.trip-context-icon:active { transform: translateY(1px) scale(.97); }
.trip-context-icon:disabled { cursor: wait; opacity: .72; }
.trip-context-icon.is-locating span { display: block; animation: spin .8s linear infinite; }

.trip-context-copy { min-width: 0; }

.trip-context-copy strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 15px;
}

.trip-context-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.trip-place-field { min-width: 0; }

.trip-place-field > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.trip-place-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  outline: 0;
  padding: 10px 12px;
  background: rgba(2, 13, 24, .58);
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.trip-place-field input:focus {
  border-color: rgba(169, 232, 255, .56);
  background: rgba(5, 20, 34, .84);
  box-shadow: 0 0 0 4px rgba(169, 232, 255, .07);
}

.trip-place-field input:disabled { opacity: .62; cursor: wait; }

.trip-place-field input::placeholder { color: rgba(145, 169, 187, .48); }

.trip-place-field small {
  display: block;
  min-height: 13px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.app-shell {
  width: min(100%, 1040px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(370px, 1.08fr);
  align-items: start;
  gap: 20px;
}

.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 100% 0, rgba(137, 199, 230, .07), transparent 31%),
    linear-gradient(150deg, rgba(15, 37, 57, .94), rgba(5, 18, 31, .96));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(240, 249, 255, .07);
  backdrop-filter: blur(16px);
}

.converter-card,
.summary-card { padding: 25px; }

.summary-card {
  position: sticky;
  top: max(18px, env(safe-area-inset-top));
}

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

.section-heading h2,
.summary-title {
  margin: 6px 0 0;
  font-size: 25px;
  letter-spacing: -.035em;
}

.summary-toggle {
  min-width: 0;
  flex: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.section-heading .summary-title-wrapper {
  min-width: 0;
  flex: 1;
  margin: 0;
  font-size: inherit;
  letter-spacing: normal;
}

.summary-title-wrapper .summary-toggle { width: 100%; font: inherit; }
.summary-toggle:disabled { cursor: default; }
.summary-toggle-copy { min-width: 0; }
.summary-title { display: block; }

.accordion-chevron {
  display: none;
  flex: 0 0 auto;
}

.summary-panel { min-width: 0; }

.swap-button {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid rgba(169, 232, 255, .2);
  border-radius: 16px;
  background: rgba(169, 232, 255, .09);
  color: var(--primary);
  font-size: 24px;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.swap-button:hover {
  border-color: rgba(169, 232, 255, .4);
  background: rgba(169, 232, 255, .16);
  transform: rotate(8deg);
}

label,
.result-box span,
.rate-copy span,
.totals-card > span,
.per-person-result > span,
.split-heading span,
.receipt-total span,
.receipt-division span {
  color: var(--muted);
  font-size: 13px;
}

.amount-wrap {
  min-height: 76px;
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 13px 15px;
  background: rgba(2, 13, 24, .56);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.amount-wrap:focus-within {
  border-color: rgba(169, 232, 255, .56);
  background: rgba(5, 20, 34, .82);
  box-shadow: 0 0 0 4px rgba(169, 232, 255, .07);
}

.amount-wrap > span:first-child {
  color: var(--primary);
  font-size: 24px;
  font-weight: 800;
}

.amount-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: clamp(31px, 5vw, 39px);
  font-weight: 780;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}

.amount-wrap input::placeholder { color: rgba(145, 169, 187, .4); }

.currency-code {
  color: var(--muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .1em;
}

.result-box {
  min-height: 118px;
  margin-top: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(111, 176, 230, .27), transparent 38%),
    linear-gradient(135deg, #f6fbff, #d8edf7);
  color: #092238;
  box-shadow: 0 16px 36px rgba(1, 9, 20, .28), inset 0 1px 0 rgba(255, 255, 255, .82);
}

.result-box span { color: #526f82; }

.result-box strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(31px, 5.4vw, 40px);
  line-height: 1.05;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}

.result-symbol {
  color: rgba(9, 34, 56, .18) !important;
  font-size: 44px !important;
  font-weight: 500;
}

.item-field { margin-top: 18px; }

.item-field label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.item-field label span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.item-field input,
.manual-grid input {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 11px 13px;
  background: rgba(2, 13, 24, .52);
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.item-field input:focus,
.manual-grid input:focus {
  border-color: rgba(169, 232, 255, .5);
  box-shadow: 0 0 0 4px rgba(169, 232, 255, .065);
}

.item-field input::placeholder { color: rgba(145, 169, 187, .48); }

.add-button,
.close-account-button,
.share-button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: var(--primary-ink);
  font-weight: 850;
  box-shadow: 0 12px 32px rgba(108, 201, 242, .2);
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}

.add-button { margin-top: 13px; }
.button-plus { font-size: 20px; }

.add-button:not(:disabled):hover,
.close-account-button:hover,
.share-button:hover { filter: brightness(1.05); transform: translateY(-1px); }

.add-button:not(:disabled):active,
.close-account-button:active,
.share-button:active { transform: translateY(1px) scale(.995); }

.add-button:disabled {
  background: rgba(145, 169, 187, .12);
  color: rgba(190, 208, 222, .42);
  box-shadow: none;
}

.rate-panel {
  margin-top: 20px;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  border-top: 1px solid var(--line);
}

.rate-copy strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.refresh-button,
.secondary-button {
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  transition: background .18s ease, border-color .18s ease;
}

.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.refresh-button:hover,
.secondary-button:hover { background: rgba(255, 255, 255, .08); border-color: var(--line-strong); }
.refresh-button:disabled { opacity: .55; }
.refresh-button:disabled .refresh-icon { animation: spin .9s linear infinite; }

.status {
  min-height: 34px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.rate-settings {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.rate-settings summary {
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 12px;
}

.manual-grid {
  display: grid;
  gap: 9px;
  margin-top: 13px;
}

.manual-grid input { margin-top: 0; }
.manual-grid .secondary-button { width: 100%; }

.title-with-count {
  display: flex;
  align-items: center;
  gap: 10px;
}

.count-badge {
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(169, 232, 255, .13);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.text-button,
.new-account-button {
  min-height: 42px;
  padding: 8px 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.text-button:not(:disabled):hover,
.new-account-button:hover { color: var(--danger); }
.text-button:disabled { opacity: .35; }

.empty-state {
  min-height: 390px;
  padding: 34px 18px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.empty-illustration {
  position: relative;
  width: 106px;
  height: 82px;
  margin-bottom: 19px;
}

.empty-illustration span {
  position: absolute;
  bottom: 9px;
  display: block;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.empty-illustration span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(244, 250, 255, .92) 0 24%, transparent 25%);
}

.empty-illustration span:nth-child(1) {
  left: 0;
  width: 64px;
  height: 46px;
  background: #17374e;
  opacity: .58;
}

.empty-illustration span:nth-child(2) {
  right: 0;
  width: 68px;
  height: 53px;
  background: #1b4058;
  opacity: .78;
}

.empty-illustration span:nth-child(3) {
  left: 24px;
  width: 72px;
  height: 72px;
  background: linear-gradient(145deg, #31566d, #10283b 68%);
}

.empty-illustration i {
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-ink);
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(108, 201, 242, .3);
}

.empty-state strong { font-size: 18px; }
.empty-state p { max-width: 260px; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.summary-content { animation: fade-up .28s ease both; }

.items-list {
  max-height: 310px;
  margin: 0;
  padding: 0 5px 0 0;
  display: grid;
  gap: 9px;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.summary-item {
  min-height: 76px;
  padding: 12px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, .025);
  animation: item-in .25s ease both;
}

.item-index {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(169, 232, 255, .18), rgba(136, 186, 255, .11));
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.item-main { min-width: 0; }

.item-main strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-values {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  margin-top: 5px;
  color: var(--muted-strong);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.item-values i { color: var(--muted); font-style: normal; }

.item-rate {
  display: block;
  margin-top: 4px;
  color: rgba(145, 169, 187, .7);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.edit-item,
.remove-item {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.edit-item {
  color: var(--muted-strong);
  font-size: 16px;
}

.remove-item {
  font-size: 19px;
  transition: color .18s ease, background .18s ease;
}

.edit-item:hover { background: rgba(169, 232, 255, .09); color: var(--primary); }
.remove-item:hover { background: rgba(255, 155, 138, .09); color: var(--danger); }
.edit-item:active,
.remove-item:active { transform: scale(.94); }

.rate-lock-note {
  margin: 12px 2px 14px;
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.rate-lock-note span { color: var(--blue); }

.summary-place,
.receipt-place {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
}

.summary-place {
  margin: -10px 0 16px;
  padding: 9px 11px;
  border: 1px solid rgba(169, 232, 255, .13);
  border-radius: 12px;
  background: rgba(169, 232, 255, .055);
  font-size: 11px;
}

.edit-place-button {
  min-height: 30px;
  margin-left: auto;
  padding: 5px 8px;
  border-radius: 9px;
  background: transparent;
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: color .18s ease, background .18s ease;
}

.edit-place-button:hover {
  background: rgba(169, 232, 255, .08);
  color: var(--primary);
}

.summary-place span,
.receipt-place span { color: var(--muted-strong); }

.summary-place strong,
.receipt-place strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-place strong { flex: 1; }

.receipt-place {
  justify-content: center;
  margin: 7px 0 0;
  font-size: 11px;
}

.totals-card {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(169, 232, 255, .2);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 100%, rgba(169, 232, 255, .11), transparent 40%),
    rgba(169, 232, 255, .06);
}

.total-primary { text-align: right; }

.total-primary strong,
.per-person-result strong,
.receipt-total strong,
.receipt-division strong {
  display: block;
  font-variant-numeric: tabular-nums;
}

.total-primary strong { font-size: 27px; letter-spacing: -.035em; }
.total-primary small { display: block; margin-top: 3px; color: var(--muted-strong); font-size: 12px; }

.split-card {
  margin-top: 12px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(2, 13, 24, .38);
}

.split-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.split-heading strong { display: block; margin-top: 3px; font-size: 13px; }

.people-stepper {
  display: grid;
  grid-template-columns: 38px 44px 38px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, .035);
}

.people-stepper button {
  width: 38px;
  height: 42px;
  background: transparent;
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
}

.people-stepper button:hover { background: rgba(169, 232, 255, .09); }
.people-stepper button:disabled { opacity: .3; }

.people-stepper input {
  width: 44px;
  height: 42px;
  border: 0;
  border-inline: 1px solid var(--line);
  outline: 0;
  background: transparent;
  color: var(--text);
  text-align: center;
  font-weight: 850;
  appearance: textfield;
}

.people-stepper input::-webkit-outer-spin-button,
.people-stepper input::-webkit-inner-spin-button { margin: 0; appearance: none; }

.people-stepper:focus-within {
  border-color: rgba(169, 232, 255, .58);
  box-shadow: 0 0 0 4px rgba(169, 232, 255, .08);
}

.per-person-result {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.per-person-result strong {
  margin-top: 4px;
  color: var(--primary);
  font-size: 29px;
  letter-spacing: -.04em;
}

.per-person-result small { color: var(--muted-strong); font-size: 12px; }

.split-note,
.receipt-note {
  min-height: 15px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.close-account-button {
  min-height: 52px;
  margin-top: 12px;
  justify-content: space-between;
  padding: 0 18px;
}

.mobile-summary-bar { display: none; }

.site-footer {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 28px 8px 2px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
}

.site-footer p { margin: 2px 0; }
.site-footer a {
  color: var(--muted-strong);
  font-weight: 750;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.confirm-dialog {
  width: min(calc(100% - 28px), 410px);
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(255, 155, 138, .26);
  border-radius: 26px;
  background: #091b2c;
  color: var(--text);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .68);
}

.confirm-dialog[open] { animation: confirm-in .2s ease-out both; }

.confirm-dialog::backdrop {
  background: rgba(1, 8, 16, .8);
  backdrop-filter: blur(10px);
  animation: backdrop-in .18s ease-out both;
}

.confirm-sheet {
  padding: 27px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 134, 111, .13), transparent 40%),
    linear-gradient(155deg, rgba(20, 41, 59, .99), rgba(5, 17, 30, .99));
}

.confirm-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 21px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 183, 169, .28);
  border-radius: 17px;
  background: linear-gradient(145deg, #ffac9c, var(--coral));
  color: #35100a;
  box-shadow: 0 13px 32px rgba(255, 134, 111, .2);
  font-size: 24px;
  font-weight: 900;
}

.confirm-sheet .step-label { color: var(--danger); }

.confirm-sheet h2 {
  margin: 7px 0 7px;
  font-size: 29px;
  letter-spacing: -.042em;
}

.confirm-sheet > p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.55;
}

.confirm-actions {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.cancel-button,
.danger-button {
  min-height: 49px;
  padding: 0 15px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 850;
  transition: transform .18s ease, filter .18s ease, border-color .18s ease, background .18s ease;
}

.cancel-button {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
}

.cancel-button:hover {
  border-color: rgba(214, 238, 255, .34);
  background: rgba(255, 255, 255, .08);
}

.danger-button {
  background: linear-gradient(135deg, #ffac9c, #ff7467);
  color: #35100a;
  box-shadow: 0 11px 28px rgba(255, 116, 103, .18);
}

.danger-button:hover { filter: brightness(1.06); }
.cancel-button:hover,
.danger-button:hover { transform: translateY(-1px); }
.cancel-button:active,
.danger-button:active { transform: translateY(1px) scale(.99); }

.edit-item-dialog {
  width: min(calc(100% - 28px), 450px);
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(169, 232, 255, .24);
  border-radius: 28px;
  background: #091b2c;
  color: var(--text);
  box-shadow: 0 36px 110px rgba(0, 0, 0, .68);
}

.edit-item-dialog[open] { animation: confirm-in .2s ease-out both; }

.edit-item-dialog::backdrop {
  background: rgba(1, 8, 16, .8);
  backdrop-filter: blur(11px);
  animation: backdrop-in .18s ease-out both;
}

.edit-item-sheet {
  position: relative;
  padding: 28px;
  background:
    radial-gradient(circle at 0 0, rgba(169, 232, 255, .12), transparent 38%),
    linear-gradient(155deg, rgba(18, 42, 61, .99), rgba(5, 17, 30, .99));
}

.edit-item-sheet > .dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.edit-item-sheet h2 {
  margin: 7px 48px 6px 0;
  font-size: 29px;
  letter-spacing: -.042em;
}

.edit-item-sheet > p {
  margin: 0 42px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.edit-item-field {
  display: block;
  margin-top: 18px;
}

.edit-item-field > span:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-strong);
  font-size: 12px;
}

.edit-item-field > span:first-child small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.edit-item-field > input,
.edit-amount-wrap {
  width: 100%;
  min-height: 49px;
  margin-top: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(2, 13, 24, .58);
}

.edit-item-field > input {
  outline: 0;
  padding: 11px 13px;
  color: var(--text);
}

.edit-item-field > input:focus,
.edit-amount-wrap:focus-within {
  border-color: rgba(169, 232, 255, .56);
  box-shadow: 0 0 0 4px rgba(169, 232, 255, .07);
}

.edit-item-field > input::placeholder { color: rgba(145, 169, 187, .48); }

.edit-amount-wrap {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.edit-amount-wrap b {
  color: var(--primary);
  font-size: 17px;
}

.edit-amount-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 22px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.edit-amount-wrap em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .08em;
}

.edit-item-preview {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(169, 232, 255, .14);
  border-radius: 15px;
  background: rgba(169, 232, 255, .055);
}

.edit-item-preview > span,
.edit-item-preview small { color: var(--muted); font-size: 10px; }

.edit-item-preview strong {
  display: block;
  margin-top: 3px;
  color: var(--primary);
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}

.edit-item-preview small { display: block; margin-top: 5px; }

.edit-item-actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 9px;
}

.save-edit-button {
  min-height: 49px;
  padding: 0 15px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: var(--primary-ink);
  font-size: 12px;
  font-weight: 850;
}

.save-edit-button:disabled { opacity: .38; cursor: not-allowed; }

.receipt-dialog {
  width: min(calc(100% - 28px), 470px);
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  background: #091b2c;
  color: var(--text);
  box-shadow: 0 38px 120px rgba(0, 0, 0, .66);
}

.receipt-dialog::backdrop {
  background: rgba(1, 8, 16, .8);
  backdrop-filter: blur(12px);
}

.receipt-sheet {
  position: relative;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 0, rgba(169, 232, 255, .14), transparent 34%),
    linear-gradient(160deg, rgba(15, 39, 57, .99), rgba(4, 16, 29, .99));
}

.dialog-close-form { position: absolute; top: 17px; right: 17px; margin: 0; }
.dialog-close {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .055);
  color: var(--muted-strong);
  font-size: 23px;
}

.receipt-success {
  width: 54px;
  height: 54px;
  margin-bottom: 21px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 25px;
  font-weight: 900;
  box-shadow: 0 13px 32px rgba(108, 201, 242, .24);
}

.receipt-sheet h2 { margin: 7px 0 5px; font-size: 32px; letter-spacing: -.045em; }
.receipt-sheet > p { margin: 0; color: var(--muted); font-size: 13px; }

.receipt-total {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(169, 232, 255, .22);
  border-radius: 21px;
  background: rgba(169, 232, 255, .07);
}

.receipt-total strong { margin-top: 5px; font-size: 36px; letter-spacing: -.045em; }
.receipt-total small { color: var(--muted-strong); }

.receipt-division {
  margin-top: 12px;
  padding: 18px;
  display: grid;
  grid-template-columns: .65fr 1.35fr;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0, 0, 0, .14);
}

.receipt-division > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.receipt-division strong { margin-top: 5px; font-size: 21px; }
.receipt-division small { color: var(--muted); }

.receipt-actions { display: grid; gap: 9px; margin-top: 22px; }
.share-button { min-height: 52px; }
.receipt-actions .secondary-button { width: 100%; min-height: 48px; }
.new-account-button { width: 100%; }

.receipt-feedback {
  min-height: 18px;
  margin-top: 12px !important;
  color: var(--primary) !important;
  font-size: 11px !important;
  font-weight: 700;
  line-height: 1.45;
}

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  max-width: calc(100% - 36px);
  padding: 12px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(12, 32, 49, .97);
  color: var(--text);
  box-shadow: 0 16px 46px rgba(0, 0, 0, .42);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .2s ease, transform .2s ease;
  backdrop-filter: blur(18px);
}

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

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes item-in { from { opacity: 0; transform: translateY(-5px) scale(.985); } }
@keyframes snow-fall-far {
  from { transform: translate3d(-1.5vw, 0, 0); }
  to { transform: translate3d(1.5vw, 120vh, 0); }
}
@keyframes snow-fall-near {
  from { transform: translate3d(1.8vw, 0, 0); }
  to { transform: translate3d(-1.8vw, 120vh, 0); }
}
@keyframes snowflake-fall {
  0% { opacity: 0; transform: translate3d(0, -10vh, 0) rotate(0deg); }
  8% { opacity: .62; }
  32% { transform: translate3d(var(--snow-drift), 28vh, 0) rotate(45deg); }
  66% { transform: translate3d(0, 70vh, 0) rotate(90deg); }
  92% { opacity: .62; }
  100% { opacity: 0; transform: translate3d(var(--snow-drift), 116vh, 0) rotate(140deg); }
}
@keyframes snowflake-stir-fall {
  0% { opacity: 0; transform: translate3d(0, -10vh, 0) rotate(0deg); }
  6% { opacity: .88; }
  28% { transform: translate3d(calc(var(--snow-drift) + var(--snow-extra-drift)), 24vh, 0) rotate(70deg); }
  54% { transform: translate3d(calc(0px - var(--snow-extra-drift)), 60vh, 0) rotate(155deg); }
  82% { opacity: .78; transform: translate3d(calc(var(--snow-drift) + var(--snow-extra-drift)), 92vh, 0) rotate(245deg); }
  100% { opacity: 0; transform: translate3d(calc(0px - var(--snow-extra-drift)), 118vh, 0) rotate(330deg); }
}
@keyframes snow-globe-live-burst {
  0% { opacity: .05; transform: translate3d(var(--snow-stir-layer-start), -8vh, 0) rotate(-3deg); }
  18% { opacity: calc(.22 + var(--snow-stir-intensity) * .66); }
  48% { transform: translate3d(var(--snow-stir-layer-end), 46vh, 0) rotate(3deg); }
  72% { opacity: calc(.16 + var(--snow-stir-intensity) * .5); transform: translate3d(var(--snow-stir-layer-start), 84vh, 0) rotate(-2deg); }
  100% { opacity: 0; transform: translate3d(var(--snow-stir-layer-end), 138vh, 0) rotate(2deg); }
}
@keyframes snow-globe-live-swirl {
  0% { opacity: 0; transform: translate3d(var(--snow-stir-layer-end), -2vh, 0) rotate(4deg); }
  16% { opacity: calc(.18 + var(--snow-stir-intensity) * .58); }
  38% { transform: translate3d(var(--snow-stir-layer-start), 38vh, 0) rotate(-5deg); }
  66% { transform: translate3d(var(--snow-stir-layer-end), 80vh, 0) rotate(4deg); }
  100% { opacity: 0; transform: translate3d(var(--snow-stir-layer-start), 136vh, 0) rotate(-3deg); }
}
@keyframes snow-globe-burst {
  0% { opacity: 0; transform: translate3d(-8vw, -8vh, 0) rotate(-2deg); }
  1% { opacity: .98; }
  12% { opacity: .88; }
  55% { opacity: .7; transform: translate3d(7vw, 72vh, 0) rotate(2deg); }
  100% { opacity: 0; transform: translate3d(-3vw, 145vh, 0) rotate(-1deg); }
}
@keyframes snow-globe-swirl {
  0% { opacity: 0; transform: translate3d(10vw, -2vh, 0) rotate(2deg); }
  14% { opacity: .72; }
  42% { transform: translate3d(-9vw, 48vh, 0) rotate(-3deg); }
  72% { opacity: .58; transform: translate3d(8vw, 92vh, 0) rotate(2deg); }
  100% { opacity: 0; transform: translate3d(-5vw, 145vh, 0) rotate(-1deg); }
}
@keyframes accordion-in {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes confirm-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes backdrop-in { from { opacity: 0; } }

@media (max-width: 820px), (any-pointer: coarse) and (max-width: 1024px) {
  body.snow-globe-stirring .snowfall-foreground {
    opacity: 1;
  }

  body.snow-globe-stirring .snow-layer-burst,
  body.snow-globe-stirring .snow-layer-swirl { display: block; }

  body.snow-globe-stirring .snow-layer-burst {
    animation: snow-globe-live-burst var(--snow-stir-duration) linear infinite;
  }

  body.snow-globe-stirring .snow-layer-swirl {
    animation: snow-globe-live-swirl calc(var(--snow-stir-duration) * 1.18) linear infinite reverse;
  }

  body.snow-globe-stirring .snow-layer-far {
    display: block;
    opacity: calc(.3 + var(--snow-stir-intensity) * .3);
    animation-duration: calc(18s * var(--snow-stir-speed-scale));
  }

  body.snow-globe-stirring .snow-layer-near {
    opacity: calc(.38 + var(--snow-stir-intensity) * .42);
    animation-duration: calc(12s * var(--snow-stir-speed-scale));
  }

  body.snow-globe-stirring .snowflake {
    display: block;
    animation-name: snowflake-stir-fall;
    animation-duration: calc(var(--snow-duration) * var(--snow-stir-speed-scale));
    filter: brightness(calc(1 + var(--snow-stir-intensity) * .24));
  }

  body.snow-globe-active .snow-layer-burst,
  body.snow-globe-active .snow-layer-swirl { display: block; }

  body.snow-globe-active .snow-layer-burst {
    animation: snow-globe-burst 6.2s cubic-bezier(.16, .68, .22, 1) both;
  }

  body.snow-globe-active .snow-layer-swirl {
    animation: snow-globe-swirl 6.8s cubic-bezier(.2, .64, .2, 1) .08s both;
  }

  body.snow-globe-active .snow-layer-far {
    display: block;
    opacity: .5;
    animation-duration: 10s;
  }

  body.snow-globe-active .snow-layer-near {
    opacity: .68;
    animation-duration: 6.5s;
  }

  body.snow-globe-active .snowfall-foreground { opacity: 1; }

  body.snow-globe-active .snowflake {
    display: block;
    animation-duration: calc(var(--snow-duration) * .38);
    filter: brightness(1.12);
  }
}

@media (max-width: 820px) {
  html,
  body { touch-action: pan-x pan-y; }

  body { padding-inline: 15px; }
  body.has-summary { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }

  .trip-context {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 15px;
  }

  .trip-place-field { grid-column: 1 / -1; }

  .trip-place-field input,
  .item-field input,
  .edit-item-field input,
  .manual-grid input,
  .people-stepper input { font-size: 16px; }

  .hero { margin-bottom: 20px; padding-inline: 3px; }
  .brand-row { margin-bottom: 24px; }
  .hero h1 { font-size: clamp(40px, 12vw, 58px); }

  .app-shell { grid-template-columns: 1fr; }
  .summary-card { position: static; }

  .summary-heading { position: relative; }
  .summary-toggle { width: 100%; }

  .summary-heading > .text-button {
    position: absolute;
    z-index: 2;
    top: calc(100% + 7px);
    right: 2px;
    min-height: 34px;
    padding-block: 4px;
  }

  .summary-toggle:not(:disabled) { cursor: pointer; }

  .accordion-chevron {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(169, 232, 255, .075);
    color: var(--primary);
    transition: transform .22s ease, background .2s ease, border-color .2s ease;
  }

  .accordion-chevron::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
  }

  .summary-toggle:not(:disabled):hover .accordion-chevron {
    border-color: var(--line-strong);
    background: rgba(169, 232, 255, .12);
  }

  .summary-toggle[aria-expanded="true"] .accordion-chevron { transform: rotate(180deg); }
  .summary-card.is-collapsed .summary-heading { margin-bottom: 0; }
  .summary-card.is-collapsed .text-button { display: none; }
  .summary-card.is-collapsed .summary-place { display: none; }
  .summary-card.has-trip-place .summary-place { margin: 42px 0 13px; }
  .summary-card.has-trip-place .summary-panel:not([hidden]) { padding-top: 0; }
  .summary-panel:not([hidden]) {
    padding-top: 34px;
    animation: accordion-in .24s ease-out both;
  }

  .mobile-summary-bar {
    position: fixed;
    z-index: 30;
    left: 15px;
    right: 15px;
    bottom: max(13px, env(safe-area-inset-bottom));
    min-height: 66px;
    padding: 10px 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border: 1px solid rgba(169, 232, 255, .31);
    border-radius: 20px;
    background: rgba(12, 37, 55, .96);
    color: var(--text);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .46);
    backdrop-filter: blur(20px);
    animation: fade-up .25s ease both;
  }

  .mobile-summary-copy { display: grid; text-align: left; }
  .mobile-summary-bar small { margin-top: 2px; color: var(--muted); font-size: 10px; }

  .mobile-summary-totals {
    display: grid;
    justify-items: end;
    text-align: right;
  }

  .mobile-summary-totals > strong {
    color: var(--primary);
    font-size: 20px;
    font-variant-numeric: tabular-nums;
  }

  .mobile-summary-bar .mobile-total-clp {
    display: block;
    color: var(--muted-strong);
    font-variant-numeric: tabular-nums;
  }

  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
}

@media (max-width: 480px) {
  body { padding-top: max(18px, env(safe-area-inset-top)); }

  .andes-ranges {
    top: 112px;
    width: max(900px, 235vw);
    height: 440px;
    opacity: .66;
  }

  .mountain-mist { inset-block-start: 31%; }
  .snow-layer-far { display: none; }
  .snow-layer-near { opacity: .22; }
  .snowfall-foreground { opacity: .78; }
  .snowflake:nth-child(3n) { display: none; }

  .surface { backdrop-filter: blur(10px); }

  .rate-chip {
    max-width: 58%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .weather-chip { padding-inline: 7px; }

  .hero > p { font-size: 14px; }
  .converter-card,
  .summary-card { padding: 20px; border-radius: 25px; }
  .section-heading { margin-bottom: 21px; }
  .section-heading h2,
  .summary-title { font-size: 23px; }

  .amount-wrap { min-height: 70px; padding-inline: 13px; }
  .result-box { min-height: 108px; padding: 17px; }
  .result-symbol { display: none; }

  .rate-panel { align-items: flex-end; }
  .refresh-button span:last-child { display: none; }
  .refresh-button { width: 44px; justify-content: center; }

  .empty-state { min-height: 330px; }
  .items-list { max-height: 360px; }
  .summary-item { grid-template-columns: 34px minmax(0, 1fr) 72px; padding: 11px 9px; gap: 8px; }

  .totals-card { padding: 16px; }
  .total-primary strong { font-size: 24px; }

  .split-heading { align-items: flex-start; }
  .people-stepper { grid-template-columns: 36px 40px 36px; }
  .people-stepper input { width: 40px; }
  .people-stepper button { width: 36px; }

  .receipt-sheet { padding: 24px 20px; }
  .receipt-total strong { font-size: 32px; }

  .edit-item-sheet { padding: 24px 20px 20px; }
  .edit-item-sheet h2 { font-size: 27px; }

  .confirm-sheet { padding: 24px 20px 20px; }
  .confirm-sheet h2 { font-size: 27px; }
}

@media (max-width: 350px) {
  .confirm-actions { grid-template-columns: 1fr; }
  .summary-toggle { gap: 8px; }
  .summary-title { font-size: 21px; }
  .accordion-chevron { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .snowfall-foreground { display: none; }

  .snow-layer-burst,
  .snow-layer-swirl { display: none !important; opacity: 0 !important; }

  .snow-layer {
    animation: none !important;
    opacity: .1;
    transform: translate3d(0, 60vh, 0);
    will-change: auto;
  }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
