/* Golos Text is distributed under the SIL OFL in fonts/OFL.txt. */
@font-face {
  font-family: "Golos Text";
  src: url("./fonts/golos-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Golos Text";
  src: url("./fonts/golos-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --sheet: #fff;
  --ink: #17243b;
  --muted: #506078;
  --weak: #5e6f87;
  --line: #dce4ef;
  --accent: #244bd2;
  --accent-dark: #193cae;
  --tint: #eaf0ff;
  --navy: #111f37;
  --navy-hover: #233554;
  --lime: #ddf5a1;
  --warn: #794719;
  --shadow: 0 2px 6px #19305007, 0 12px 30px #19305005;
  --gutter: clamp(24px, 3.2vw, 55px);
  font: 16px/1.53 "Golos Text", "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); min-width: 300px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid #5b7fee; outline-offset: 3px; }
.sidebar :focus-visible, .hero :focus-visible { outline-color: #b7caff; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.14; }
.ico {
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  vertical-align: middle;
}
.small-icon .ico, .badge .ico { width: 16px; height: 16px; }

.app-shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 25px;
  height: 100dvh;
  min-height: 0;
  padding: 28px 17px 20px;
  overflow-y: auto;
  background: var(--navy);
  color: #f3f6ff;
}
.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  align-self: flex-start;
  padding: 0 3px;
  border: 0;
  background: none;
  font-size: 1.4rem;
  font-weight: 760;
  letter-spacing: -.055em;
  text-align: left;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  flex: none;
  border-radius: 12px;
  background: var(--lime);
  color: var(--navy);
}
.brand-icon .ico { width: 22px; height: 22px; }
.trip-block { display: grid; gap: 8px; }
.label { color: #a7b9d1; font-size: .75rem; font-weight: 650; letter-spacing: .035em; }
.trip-block > .label { padding-inline: 5px; }
.trip-select {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  padding: 9px;
  border: 1px solid #344561;
  border-radius: 14px;
  background: #1b2b47;
  text-align: left;
}
.trip-select:hover { background: var(--navy-hover); border-color: #7185a9; }
.trip-text { min-width: 0; flex: 1; }
.trip-text strong, .trip-text small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.trip-text strong { color: #fff; font-size: .9rem; }
.trip-text small { color: #bdcbe0; font-size: .8rem; }
.trip-select > .ico { width: 15px; height: 15px; color: #bdcbe0; }
.trip-thumb {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 8px;
  background: #304568;
  color: var(--lime);
}
.trip-thumb.photo { background: 78% center / cover url("./istanbul.jpg") #253b56; }
.nav { display: grid; gap: 3px; align-content: start; }
.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 43px;
  padding: 8px 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #c6d3e6;
  font-size: .9rem;
  font-weight: 570;
  text-align: left;
}
.nav-button:hover, .nav-button[aria-current="page"] { background: var(--navy-hover); color: #fff; }
.nav-button[aria-current="page"] { font-weight: 720; }
.sidebar .nav-button[aria-current="page"] .ico { color: var(--lime); }
.nav .label { margin: 13px 0 4px 11px; }
.side-footer { margin-top: auto; padding: 13px 5px 0; border-top: 1px solid #344561; }
.side-footer div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dde8f8;
  font-size: .82rem;
  font-weight: 650;
}
.side-footer small { display: block; padding: 3px 0 0 17px; color: #a8bbd5; font-size: .76rem; }
.status-dot { flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.side-footer .text-button { margin-top: 8px; color: var(--lime); }

.workspace { min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1560px;
  min-height: 78px;
  margin: auto;
  padding: 0 var(--gutter);
}
.breadcrumb { min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; }
.breadcrumb button { padding: 0; border: 0; background: none; color: var(--muted); white-space: nowrap; }
.breadcrumb button:hover { color: var(--accent-dark); text-decoration: underline; }
.breadcrumb strong { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb > .ico { width: 13px; height: 13px; }
.topbar .mobile-brand, .mobile-nav { display: none; }
main { max-width: 1560px; margin-inline: auto; padding: 0 var(--gutter) 58px; }

.hero {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  min-height: clamp(240px, 28vw, 340px);
  padding: clamp(25px, 4vw, 55px);
  overflow: hidden;
  border-radius: 25px;
  background:
    radial-gradient(ellipse at 87% 35%, #345681 0, transparent 56%),
    linear-gradient(115deg, #121f36 10%, #1d3759 85%);
  color: #fff;
}
.hero.photo {
  background:
    linear-gradient(90deg, #0c1933e8 0%, #0c193391 38%, transparent 76%),
    linear-gradient(0deg, #0a162b9e, transparent 78%),
    url("./istanbul.jpg") 65% 49% / cover,
    #213852;
}
.hero-copy { min-width: 0; }
.hero h1 {
  font-size: clamp(3rem, 6vw, 5.7rem);
  font-weight: 790;
  line-height: .98;
  letter-spacing: -.073em;
  overflow-wrap: anywhere;
}
.hero-location {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 12px;
  color: var(--lime);
  font-size: .91rem;
  font-weight: 710;
  overflow-wrap: anywhere;
}
.hero-location .ico { width: 17px; height: 17px; }
.hero-details {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 17px;
  align-items: center;
  margin-top: 16px;
  color: #f1f5ff;
  font-size: .94rem;
  font-weight: 550;
}
.hero-details span { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; }
.hero-details .ico { width: 16px; height: 16px; }
.hero-details .hero-demo {
  padding: 2px 8px;
  border: 1px solid #bdcbeb80;
  border-radius: 6px;
  font-size: .77rem;
}
.hero > .btn {
  flex: none;
  border-color: #e2ebfb86;
  background: #10233bba;
  color: #fff;
  backdrop-filter: blur(9px);
}
.hero > .btn:hover { background: #152942; border-color: #f4f8ff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 9px 13px;
  border: 1px solid #ccd7e8;
  border-radius: 10px;
  background: var(--sheet);
  color: var(--ink);
  font-size: .87rem;
  font-weight: 670;
  line-height: 1.25;
  text-decoration: none;
}
.btn:hover { background: var(--tint); border-color: #9fb3e4; color: var(--accent-dark); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.flat { background: var(--tint); color: var(--accent-dark); border-color: transparent; }
.btn.flat:hover { background: #dce6ff; border-color: #b5c5ee; }
.btn.danger { color: #9c2c32; }
.btn.danger:hover { background: #fff1f1; border-color: #dca2a4; }
.btn .ico { width: 17px; height: 17px; }
.btn.icon-only { flex: 0 0 42px; width: 42px; padding: 0; }
.btn.wrap { text-align: left; }
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-size: .87rem;
  font-weight: 690;
  text-decoration: none;
  text-align: left;
}
.text-button:hover { text-decoration: underline; }
.text-button .ico { width: 16px; height: 16px; }
.share-button { flex: none; }
.share-button .ico { color: var(--accent-dark); }
.topbar-actions { display: flex; align-items: center; gap: 7px; min-width: 0; }
.account-button { min-width: 0; max-width: 150px; color: var(--accent-dark); }
.account-button span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(238px, .42fr);
  align-items: start;
  gap: clamp(19px, 2.4vw, 36px);
  margin-top: 29px;
}
.content-dashboard, .expense-dashboard { margin-top: 0; }
.dashboard > *, .stack > *, .day-plan { min-width: 0; }
.stack { display: grid; align-content: start; gap: 14px; }
.section-heading, .page-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}
.section-heading { margin-bottom: 15px; }
.page-heading { margin-bottom: 24px; padding-top: 12px; }
.section-heading > div, .page-heading > div { min-width: 0; }
.section-heading h2, .page-heading h1 {
  color: var(--ink);
  font-weight: 770;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}
.section-heading h2 { font-size: clamp(1.7rem, 3vw, 2.28rem); }
.page-heading h1 { font-size: clamp(2.15rem, 4.7vw, 3.55rem); }
.section-heading p, .page-heading p { color: var(--muted); margin-top: 5px; }
.section-heading .btn, .page-heading .btn { flex: none; }

.days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(78px, 1fr);
  gap: 7px;
  overflow-x: auto;
  margin: 0 0 13px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #eaf0f9;
  scrollbar-width: thin;
}
.day {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--sheet);
  color: var(--weak);
  white-space: nowrap;
}
.day strong { color: var(--ink); font-size: .95rem; font-weight: 730; }
.day small { font-size: .8rem; }
.day:hover { border-color: #97ade4; color: var(--accent-dark); }
.day[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #f3f5ff; }
.day[aria-pressed="true"] strong { color: #fff; }

.timeline {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--sheet);
  box-shadow: var(--shadow);
}
.timeline-card {
  display: grid;
  grid-template-areas: "time icon text toggle";
  grid-template-columns: 81px 43px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 15px 13px;
}
.timeline-card + .timeline-card { border-top: 1px solid var(--line); }
.timeline-card .event-icon { grid-area: icon; }
.event-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 43px;
  height: 43px;
  border-radius: 11px;
  background: #e8eefc;
  color: #304da7;
}
.event-icon.flight, .event-icon.train { background: #e1edff; color: #214f9a; }
.event-icon.stay { background: #efe7ff; color: #624497; }
.event-icon.food, .event-icon.task { background: #fff0dd; color: #864e1c; }
.event-icon.museum { background: #f9e9ef; color: #8b3c58; }
.event-text { grid-area: text; align-self: center; min-width: 0; }
.event-top { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 8px; row-gap: 4px; }
.event-time {
  grid-area: time;
  padding-top: 2px;
  color: var(--ink);
  font-size: .99rem;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}
.event-time.flexible { color: var(--weak); font-size: .83rem; font-weight: 550; line-height: 1.35; }
.event-title {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: 1.08rem;
  font-weight: 760;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.event-title:hover { color: var(--accent-dark); text-decoration: underline; }
.timeline-card.done .event-title, .task-row.done h3 { color: var(--muted); text-decoration: line-through; }
.event-description, .muted, .card p.muted { color: var(--muted); }
.event-description { margin-top: 5px; font-size: .9rem; overflow-wrap: anywhere; }
.event-actions { display: flex; flex-wrap: wrap; gap: 1px 13px; margin-top: 4px; }
.event-actions .text-button { font-size: .84rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--tint);
  color: var(--accent-dark);
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.badge.soft { background: #eef1f6; color: #465871; }
.badge.warning { background: #fff1dc; color: var(--warn); }
.badge.success { background: #e5f6e8; color: #25643a; }
.timeline-card .check { grid-area: toggle; }
.check {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #cbd6e6;
  border-radius: 11px;
  background: #fff;
  color: #566a87;
}
.check:hover { background: var(--tint); border-color: #94ace8; }
.check[aria-pressed="true"] { border-color: #abd0b2; background: #e3f6e7; color: #246135; }
.check .ico { width: 17px; height: 17px; }

.card {
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--sheet);
  box-shadow: var(--shadow);
}
.card h2, .card h3 { overflow-wrap: anywhere; }
.card h2 { font-size: 1rem; font-weight: 730; }
.card h3 { font-size: 1.03rem; font-weight: 730; }
.card p, .card .meta { margin-top: 6px; font-size: .89rem; overflow-wrap: anywhere; }
.card .meta, .card .fine { color: var(--weak); }
.card .fine { font-size: .83rem; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 11px; }
.card-header .btn { min-height: 36px; width: 36px; flex-basis: 36px; margin-block: -3px; }
.card-title { display: flex; align-items: center; gap: 8px; }
.card-title .ico { width: 17px; height: 17px; color: var(--accent-dark); }
.card-row { display: flex; align-items: start; gap: 12px; }
.card-row > div { flex: 1; min-width: 0; }
.card .actions { margin-top: 13px; }
.stack .card > .text-button { margin-top: 7px; }
.progress { height: 7px; margin: 12px 0 7px; overflow: hidden; border-radius: 8px; background: #e8edf7; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.metric { color: var(--ink); font-weight: 740; font-variant-numeric: tabular-nums; }
.summary { background: #e9efff; border-color: #d3defc; }
.summary h3 { font-size: 1.12rem; }
.place-grid, .panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.panel-grid { align-items: start; }
.booking-card .actions { padding-top: 12px; border-top: 1px solid var(--line); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.list-heading { margin: 2px 0 11px; font-size: 1.35rem; letter-spacing: -.035em; }
.empty { padding: 25px 20px; border: 1px dashed #aebed9; border-radius: 15px; background: #fafcff; color: var(--muted); }
.empty p + .btn { margin-top: 12px; }
.task-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 11px; }
.task-row h3 { display: inline; }
.segmented { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.segmented .btn { min-height: 38px; border-radius: 9px; }
.segmented .btn[aria-pressed="true"] { border-color: #a4b8f1; background: var(--tint); color: var(--accent-dark); }
.phrase-text { margin: 7px 0; color: var(--accent-dark); font-size: 1.17rem; font-weight: 700; overflow-wrap: anywhere; }
.quote, .card .quote {
  color: var(--ink);
  font-size: clamp(1.4rem, 3.25vw, 1.92rem);
  font-weight: 790;
  line-height: 1.15;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.notice { padding: 12px 14px; border: 1px solid #dce5fc; border-radius: 11px; background: var(--tint); color: var(--ink); font-size: .9rem; overflow-wrap: anywhere; }
.unavailable { color: var(--muted); font-size: .9rem; }
.attachment-preview { padding: 8px; border-radius: 10px; background: var(--bg); }
.attachment-preview img, .attachment-preview object { display: block; width: 100%; border: 0; }
.attachment-preview img { max-height: 53vh; object-fit: contain; }
.attachment-preview object { height: min(440px, 53vh); }

.expense-list { padding-block: 4px; }
.expense-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.expense-row:last-child, .expense-group-total:last-child { border-bottom: 0; }
.expense-row strong, .expense-row .muted { overflow-wrap: anywhere; }
.expense-row .muted { font-size: .84rem; }
.expense-row b { color: var(--ink); font-size: .94rem; font-variant-numeric: tabular-nums; text-align: right; }
.expense-row .btn { width: 35px; min-height: 36px; }
.expense-group-total { display: flex; justify-content: space-between; gap: 7px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.expense-group-total span, .expense-dashboard .segmented button { min-width: 0; overflow-wrap: anywhere; }
.expense-group-total b { text-align: right; font-variant-numeric: tabular-nums; }
.expense-detail { padding-top: 13px; border-top: 1px solid var(--line); }
.expense-detail .card-header { margin-bottom: 3px; flex-wrap: wrap; }
.cloud-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 12px; }
.access-list { display: grid; gap: 8px; }
.access-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.access-row p { min-width: 0; }
.access-row:last-child { border-bottom: 0; }
.read-only [data-action^="add-"], .read-only [data-action^="edit-"], .read-only [data-action="event-toggle"],
.read-only [data-action="task-toggle"], .read-only [data-action="place-to-event"], .read-only [data-action="change-language"] { display: none; }
.read-only .task-row { grid-template-columns: minmax(0, 1fr); }

dialog {
  width: min(565px, calc(100% - 24px));
  max-height: min(770px, calc(100% - 24px));
  padding: 0;
  border: 1px solid #d8e3f3;
  border-radius: 20px;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 20px 70px #091a3f55;
}
dialog::backdrop { background: #122541a0; backdrop-filter: blur(3px); }
.modal-content { padding: 21px; }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.modal-header h2 { font-size: 1.55rem; font-weight: 770; letter-spacing: -.045em; overflow-wrap: anywhere; }
.modal-header .btn { margin-top: -3px; }
.modal-body { display: grid; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; gap: 5px; min-width: 0; color: var(--ink); font-size: .9rem; font-weight: 660; }
.field.wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #becce0;
  border-radius: 9px;
  background: #fafcff;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 440;
}
.field textarea { min-height: 72px; resize: vertical; }
.field select {
  appearance: none;
  padding-right: 29px;
  background: #fafcff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23364971' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") right 8px center / 16px no-repeat;
}
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 3px; }
.error { color: #9c2c32; font-size: .9rem; }
.pick-trip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafcff;
  color: var(--ink);
  text-align: left;
  font-weight: 690;
}
.pick-trip:hover { background: var(--tint); }
.pick-trip span { min-width: 0; overflow-wrap: anywhere; }
.pick-trip small { display: block; color: var(--muted); font-size: .85rem; font-weight: 420; }
#toast {
  position: fixed;
  z-index: 3;
  inset: auto auto 18px 50%;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 11px 15px;
  transform: translateX(-50%);
  border-radius: 10px;
  background: var(--navy);
  box-shadow: 0 8px 24px #10264840;
  color: #fff;
  font-size: .9rem;
  pointer-events: none;
}
#toast:empty { display: none; }

@media (max-width: 1120px) and (min-width: 901px) {
  :root { --gutter: 23px; }
  .app-shell { grid-template-columns: 195px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .dashboard { grid-template-columns: minmax(0, 1fr) minmax(216px, .57fr); gap: 16px; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar, .breadcrumb { display: none; }
  .topbar { min-height: 67px; }
  .topbar .mobile-brand { display: inline-flex; align-self: auto; font-size: 1.25rem; }
  .mobile-brand > .ico { width: 15px; height: 15px; color: var(--weak); }
  .mobile-brand .brand-icon { width: 35px; height: 35px; border-radius: 10px; background: var(--navy); color: var(--lime); }
  main { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .mobile-nav {
    position: fixed;
    z-index: 2;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 5px max(5px, env(safe-area-inset-right, 0px)) calc(5px + env(safe-area-inset-bottom, 0px)) max(5px, env(safe-area-inset-left, 0px));
    border-top: 1px solid var(--line);
    background: var(--sheet);
    box-shadow: 0 -7px 20px #1930500d;
  }
  .mobile-nav .nav-button {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 50px;
    padding: 3px;
    color: var(--muted);
    font-size: .75rem;
    text-align: center;
  }
  .mobile-nav .nav-button:hover, .mobile-nav .nav-button[aria-current="page"] { background: var(--tint); color: var(--accent-dark); }
  #toast { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 740px), (min-width: 901px) and (max-width: 1120px) {
  .timeline-card {
    grid-template-areas: "icon time toggle" "icon text toggle";
    grid-template-columns: 39px minmax(0, 1fr) auto;
    column-gap: 9px;
    row-gap: 3px;
  }
  .timeline-card .event-icon { width: 39px; height: 39px; }
  .timeline-card .event-time { font-size: .84rem; }
}
@media (max-width: 705px) {
  .dashboard { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575px) {
  :root { --gutter: 13px; }
  .topbar { min-height: 62px; gap: 7px; }
  .topbar .share-button { padding-inline: 9px; gap: 5px; font-size: .79rem; }
  .hero { min-height: 225px; padding: 19px 16px; gap: 8px; border-radius: 16px; }
  .hero.photo {
    background-image:
      linear-gradient(90deg, #0d1a33ad, #0c193338 95%),
      linear-gradient(0deg, #0a162be8, #0a162b31 77%),
      url("./istanbul.jpg");
    background-position: center, center, 69% 50%;
  }
  .hero h1 { font-size: clamp(2.55rem, 11vw, 4rem); }
  .hero-details { column-gap: 8px; row-gap: 5px; margin-top: 11px; font-size: .83rem; }
  .hero-location { margin-bottom: 8px; font-size: .85rem; }
  .hero > .btn { width: 42px; padding: 0; }
  .hero > .btn span { display: none; }
  .dashboard { gap: 18px; margin-top: 22px; }
  .content-dashboard, .expense-dashboard { margin-top: 0; }
  .section-heading, .page-heading { align-items: start; }
  .section-heading p, .page-heading p { font-size: .9rem; }
  .section-heading .btn, .page-heading .btn { max-width: 52%; }
  .place-grid, .panel-grid { grid-template-columns: minmax(0, 1fr); }
  .timeline-card { padding: 12px 9px; }
  .event-actions { gap: 0 9px; }
  .card { padding-inline: 14px; }
  .expense-row { gap: 6px; }
  .modal-content { padding: 16px; }
}
@media (max-width: 370px) {
  .section-heading, .page-heading { flex-wrap: wrap; }
  .section-heading .btn, .page-heading .btn { max-width: 100%; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .event-top { column-gap: 6px; }
  .timeline-card { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .timeline-card .event-icon { width: 34px; height: 34px; }
}
@media (max-width: 440px) {
  .topbar .share-button { width: 40px; padding: 0; }
  .share-button span { display: none; }
  .topbar:has(.invite-button) .account-button { flex: 0 0 40px; width: 40px; padding: 0; }
  .topbar:has(.invite-button) .account-button span { display: none; }
}

.welcome-shell { max-width: 1320px; margin-inline: auto; padding: 0 var(--gutter); }
.welcome-topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.welcome-topbar .brand { color: var(--ink); }
.welcome-topbar .brand-icon { background: var(--navy); color: var(--lime); }
.welcome-shell .welcome-main { padding: clamp(8px, 3.2vw, 40px) 0 48px; }
.welcome-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .86fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  min-height: 480px;
  padding: clamp(24px, 5vw, 68px);
  border: 1px solid #d5e0f7;
  border-radius: 30px;
  background: radial-gradient(ellipse at 16% 12%, #f7fbff, transparent 62%), linear-gradient(135deg, #e1eaff, #edf5e6);
}
.welcome-copy h1 { max-width: 12ch; font-size: clamp(2.4rem, 5.2vw, 5.1rem); line-height: 1; letter-spacing: -.075em; font-weight: 820; }
.welcome-copy p { margin: 18px 0 24px; max-width: 38ch; color: var(--muted); font-size: clamp(1rem, 1.65vw, 1.18rem); }
.welcome-start { min-height: 48px; }
.welcome-guide { display: grid; gap: 11px; padding: 0; margin: 0; list-style: none; }
.welcome-guide li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid #dce5ef;
  border-radius: 16px;
  background: #ffffffeb;
  box-shadow: var(--shadow);
}
.guide-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #e8efff; color: var(--accent-dark); }
.welcome-guide li:nth-child(2) .guide-icon { background: #fff0dc; color: #885714; }
.welcome-guide li:nth-child(3) .guide-icon { background: #e5f5e7; color: #276344; }
.welcome-guide h2 { font-size: .99rem; font-weight: 740; }
.welcome-guide p { color: var(--muted); font-size: .87rem; margin-top: 2px; }

.day-actions, .category-picks { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.next-mobile { display: none; }
.today-dashboard .section-heading .btn { max-width: none; }
.event-transit { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px; margin-top: 6px; color: var(--accent-dark); font-size: .84rem; }
.event-transit .ico { width: 14px; height: 14px; }
.expense-total { margin-bottom: 16px; }
.category-picks .btn { min-height: 34px; padding: 4px 10px; font-size: .83rem; }
.category-picks .btn[aria-pressed="true"], .invite-role:has(input:checked) { background: var(--tint); border-color: #9fb3e4; color: var(--accent-dark); }
.form-details { padding-top: 5px; }
.form-details > summary { cursor: pointer; color: var(--accent-dark); }
.form-details > .form-grid { margin-top: 10px; }
.invite-roles { margin: 0; padding: 0; border: 0; }
.invite-roles legend { margin-bottom: 6px; padding: 0; }
.invite-role { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px; cursor: pointer; }
.invite-role input { flex: 0 0 17px; width: 17px; min-height: 17px; margin: 0; accent-color: var(--accent); }
.invite-role small { display: block; color: var(--muted); font-weight: 450; }

@media (max-width: 720px) {
  .welcome-intro { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .welcome-copy h1 { max-width: 17ch; }
}
@media (max-width: 705px) {
  .today-dashboard .stack .summary { display: none; }
  .next-mobile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 11px;
    margin-bottom: 10px;
    border: 1px solid #c8d7f4;
    border-radius: 12px;
    text-align: left;
    color: var(--accent-dark);
    background: var(--tint);
  }
  .next-mobile small, .next-mobile strong { display: block; overflow-wrap: anywhere; }
  .next-mobile .ico { width: 16px; height: 16px; }
}
@media (max-width: 575px) {
  .welcome-topbar { min-height: 66px; }
  .welcome-intro { padding: 18px; border-radius: 22px; }
  .welcome-copy p { margin: 12px 0 16px; }
  .welcome-guide li { padding: 11px; gap: 10px; }
  .hero { min-height: 126px; align-items: end; padding: 13px 15px; }
  .hero h1 { font-size: clamp(1.9rem, 8.6vw, 2.85rem); }
  .hero-details { margin-top: 6px; }
  .hero-location { margin-bottom: 4px; }
  .today-dashboard { margin-top: 15px; }
  .days { grid-auto-columns: minmax(60px, 1fr); gap: 5px; padding: 5px; }
  .day { padding-inline: 3px; }
  .topbar .invite-button { padding-inline: 8px; font-size: .78rem; }
  .topbar .invite-button > .ico { display: none; }
}
@media (max-width: 370px) {
  .topbar .mobile-brand { font-size: 1.05rem; gap: 5px; }
  .topbar .mobile-brand .brand-icon { width: 30px; height: 30px; }
  .topbar-actions { gap: 4px; }
  .topbar .share-button, .topbar:has(.invite-button) .account-button { flex-basis: 34px; width: 34px; }
}
