:root {
  color-scheme: light;
  --ink: #1e2826;
  --ink-soft: #53605c;
  --muted: #78827f;
  --paper: #f8f6f1;
  --surface: #ffffff;
  --surface-2: #f2f0ea;
  --line: #e5e2da;
  --line-strong: #d5d1c7;
  --coral: #e85f4c;
  --coral-deep: #c94839;
  --coral-soft: #fff0eb;
  --teal: #2f7c73;
  --gold: #d59b31;
  --purple: #755b8f;
  --green: #347a62;
  --danger: #b84236;
  --shadow-sm: 0 1px 2px rgba(22, 31, 29, 0.05), 0 6px 20px rgba(22, 31, 29, 0.05);
  --shadow-md: 0 18px 50px rgba(22, 31, 29, 0.11);
  --shadow-lg: 0 30px 80px rgba(11, 19, 18, 0.24);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --day-color: var(--coral);
  --day-tint: var(--coral-soft);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  width: 100%;
  overflow: clip;
}

.topbar {
  position: sticky;
  z-index: 100;
  top: 0;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
  align-items: center;
  min-height: 76px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(229, 226, 218, 0.9);
  background: rgba(248, 246, 241, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: var(--coral);
  color: white;
  box-shadow: 0 8px 20px rgba(232, 95, 76, 0.24);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-mark > span {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: #ffd166;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(27, 38, 35, 0.08);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 9px;
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.sync-state span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4d9a78;
  box-shadow: 0 0 0 4px rgba(77, 154, 120, 0.12);
}

.sync-state.is-saving span {
  background: var(--gold);
  animation: pulse 1s infinite;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.icon-button:hover {
  background: var(--surface-2);
}

.icon-button:active,
.button:active {
  transform: translateY(1px);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.icon-button--border {
  border: 1px solid var(--line);
  background: var(--surface);
}

.icon-button--glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.icon-button--glass:hover {
  background: rgba(255, 255, 255, 0.28);
}

.avatar-stack {
  display: flex;
  align-items: center;
  padding: 0 4px;
  background: transparent;
  cursor: pointer;
}

.avatar-stack span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: #dfe9e5;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.avatar-stack span + span {
  margin-left: -10px;
  background: #fde4de;
  color: var(--coral-deep);
}

.hero {
  position: relative;
  display: flex;
  min-height: 430px;
  max-width: 1520px;
  margin: 20px auto 0;
  align-items: flex-end;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #1d2d37;
  box-shadow: var(--shadow-lg);
}

.hero-image,
.hero-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center 50%;
}

.hero-scrim {
  background:
    linear-gradient(90deg, rgba(8, 18, 20, 0.76) 0%, rgba(8, 18, 20, 0.38) 42%, rgba(8, 18, 20, 0.08) 70%),
    linear-gradient(0deg, rgba(6, 14, 16, 0.56) 0%, transparent 58%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 56px 58px;
  color: #fff;
}

.hero-kicker,
.confirmed-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffca68;
  box-shadow: 0 0 0 4px rgba(255, 202, 104, 0.16);
}

.hero h1 {
  max-width: 650px;
  margin: 14px 0 12px;
  font-family: var(--serif);
  font-size: clamp(48px, 5.4vw, 76px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.93;
  text-wrap: balance;
}

.hero-content > p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(19, 30, 31, 0.34);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 700;
}

.hero-meta svg {
  width: 14px;
  height: 14px;
}

.concert-card {
  position: absolute;
  z-index: 2;
  right: 30px;
  bottom: 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  width: min(390px, calc(100% - 60px));
  align-items: center;
  gap: 16px;
  padding: 15px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(12, 23, 25, 0.68);
  color: #fff;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.concert-date {
  display: flex;
  width: 58px;
  height: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--coral);
  line-height: 1;
}

.concert-date span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.concert-date strong {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 27px;
}

.concert-card h2 {
  margin: 4px 0 1px;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1;
}

.concert-card p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.confirmed-label {
  color: #a9e5c8;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.confirmed-label svg {
  width: 12px;
  height: 12px;
}

.confirmed-label--ink {
  color: var(--teal);
}

.trip-strip {
  display: grid;
  max-width: 1280px;
  margin: 18px auto 0;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.trip-strip-item {
  display: grid;
  min-width: 0;
  min-height: 78px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-left: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

button.trip-strip-item {
  border-left: 0;
  cursor: pointer;
}

.trip-strip-item:first-child {
  border-left: 0;
}

.trip-strip-item--attention {
  border-radius: 21px 0 0 21px;
  background: #fffaf6;
}

.trip-strip-item--attention:hover {
  background: var(--coral-soft);
}

.trip-strip-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--ink-soft);
}

.trip-strip-item--attention .trip-strip-icon {
  background: #ffe1d7;
  color: var(--coral-deep);
}

.trip-strip-item--weather .trip-strip-icon {
  background: #fff1cc;
  color: #a87417;
}

.trip-strip-item > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.trip-strip-item small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.trip-strip-item strong {
  overflow: hidden;
  margin-top: 3px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-strip-chevron {
  width: 16px;
  color: var(--muted);
}

.planner,
.details-section {
  max-width: 1520px;
  margin: 0 auto;
  padding: 88px 0 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto 28px;
}

.section-heading--compact {
  margin-bottom: 24px;
}

.eyebrow {
  display: block;
  color: var(--coral);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-heading h2,
.modal-header h2 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: clamp(34px, 3.2vw, 48px);
  letter-spacing: -0.045em;
  line-height: 1;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.section-actions {
  display: flex;
  gap: 8px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transition: background 150ms ease, border 150ms ease, transform 150ms ease;
}

.button svg {
  width: 16px;
  height: 16px;
}

.button--quiet {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

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

.button--dark {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px rgba(30, 40, 38, 0.15);
}

.button--dark:hover {
  background: #0e1715;
}

.button--coral {
  background: var(--coral);
  color: #fff;
}

.button--coral:hover {
  background: var(--coral-deep);
}

.button--danger {
  border-color: rgba(184, 66, 54, 0.18);
  background: rgba(184, 66, 54, 0.08);
  color: var(--danger);
}

.day-tabs-wrap {
  max-width: 1280px;
  margin: 0 auto 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.day-tabs-wrap::-webkit-scrollbar {
  display: none;
}

.day-tabs {
  display: grid;
  min-width: 780px;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.day-tab {
  position: relative;
  display: grid;
  min-height: 87px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  text-align: left;
  transition: border 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.day-tab:hover {
  transform: translateY(-1px);
  border-color: var(--day-tab-color);
  box-shadow: var(--shadow-sm);
}

.day-tab.is-active {
  border-color: transparent;
  background: var(--day-tab-tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--day-tab-color) 30%, transparent);
}

.day-tab.is-active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--day-tab-color);
  content: "";
}

.day-tab-date {
  display: flex;
  width: 48px;
  height: 54px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 5px 13px rgba(26, 36, 34, 0.07);
  line-height: 1;
}

.day-tab.is-active .day-tab-date {
  background: var(--day-tab-color);
  color: #fff;
}

.day-tab-date small {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.day-tab-date strong {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 22px;
}

.day-tab-copy {
  min-width: 0;
}

.day-tab-copy small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.day-tab-copy strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-tab-count {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: rgba(30, 40, 38, 0.07);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 900;
}

.planner-grid {
  display: grid;
  min-height: 720px;
  grid-template-columns: minmax(470px, 0.86fr) minmax(560px, 1.14fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.itinerary-panel {
  min-width: 0;
  padding: 26px 26px 30px;
  border-right: 1px solid var(--line);
}

.day-overview {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 18px;
  padding: 4px 2px 20px;
}

.day-overview h3 {
  margin: 4px 0 5px;
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: -0.035em;
  line-height: 1;
}

.day-overview p {
  max-width: 500px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.pace-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--day-tint);
  color: var(--day-color);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pace-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.itinerary-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.search-field {
  display: flex;
  height: 40px;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--muted);
}

.search-field:focus-within {
  border-color: color-mix(in srgb, var(--day-color) 55%, var(--line));
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--day-color) 11%, transparent);
}

.search-field svg {
  width: 16px;
  height: 16px;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.search-field input::placeholder {
  color: #929a97;
}

.filter-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.filter-button svg {
  width: 15px;
  height: 15px;
}

.filter-button[aria-pressed="true"] {
  border-color: #f0a99e;
  background: var(--coral-soft);
  color: var(--coral-deep);
}

.filter-button[aria-pressed="true"] svg {
  fill: currentColor;
}

.itinerary-list {
  display: flex;
  flex-direction: column;
}

.activity-row {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
}

.activity-row::before {
  position: absolute;
  top: 48px;
  bottom: -18px;
  left: 27px;
  width: 1px;
  background: var(--line);
  content: "";
}

.activity-row:last-child::before,
.activity-row.is-filtered-tail::before {
  display: none;
}

.activity-time {
  display: flex;
  min-height: 46px;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15px;
  color: var(--ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.activity-time::after {
  position: absolute;
  z-index: 1;
  top: 19px;
  left: 22px;
  width: 10px;
  height: 10px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--day-color);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--day-color) 30%, var(--line));
  content: "";
}

.activity-card {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  margin-bottom: 8px;
  padding: 14px 12px;
  border: 1px solid transparent;
  border-radius: 17px;
  background: transparent;
  cursor: pointer;
  transition: border 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  animation: card-rise 320ms both;
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.activity-card:hover {
  background: #faf9f6;
}

.activity-card.is-selected {
  border-color: color-mix(in srgb, var(--day-color) 28%, var(--line));
  background: var(--day-tint);
  box-shadow: 0 7px 18px color-mix(in srgb, var(--day-color) 10%, transparent);
}

.activity-card.is-completed {
  opacity: 0.62;
}

.activity-card.is-completed .activity-title {
  text-decoration: line-through;
}

.activity-card.is-dragging {
  z-index: 5;
  opacity: 0.45;
  transform: scale(0.99);
}

.activity-card.is-drop-target {
  border-color: var(--day-color);
  border-style: dashed;
}

.activity-category {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 17px;
}

.activity-card.category-food .activity-category, .activity-card.category-shop .activity-category { background-image: linear-gradient(rgba(17,25,24,.2),rgba(17,25,24,.2)),url("./assets/london-category-moments.png"); background-size:200% 200%; background-position:0 0; color:#fff; }
.activity-card.category-history .activity-category, .activity-card.category-art .activity-category { background-image: linear-gradient(rgba(17,25,24,.2),rgba(17,25,24,.2)),url("./assets/london-category-moments.png"); background-size:200% 200%; background-position:100% 0; color:#fff; }
.activity-card.category-view .activity-category, .activity-card.category-wander .activity-category, .activity-card.category-transit .activity-category { background-image: linear-gradient(rgba(17,25,24,.2),rgba(17,25,24,.2)),url("./assets/london-category-moments.png"); background-size:200% 200%; background-position:0 100%; color:#fff; }
.activity-card.category-concert .activity-category, .activity-card.category-show .activity-category { background-image: linear-gradient(rgba(17,25,24,.2),rgba(17,25,24,.2)),url("./assets/london-category-moments.png"); background-size:200% 200%; background-position:100% 100%; color:#fff; }

.activity-card.is-selected .activity-category {
  background-color: var(--surface);
  color: #fff;
}

.activity-copy {
  min-width: 0;
}

.activity-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.activity-title {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-title-line .mini-heart {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: var(--coral);
  color: var(--coral);
}

.activity-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.activity-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.activity-meta svg {
  width: 11px;
  height: 11px;
}

.activity-note {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.activity-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.status-badge,
.cost-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.place-actions {
  display: none;
}

.status-badge--book {
  background: #fff1d2;
  color: #936315;
}

.status-badge--confirmed {
  background: #ddf2e9;
  color: #276950;
}

.status-badge--free {
  background: #e7f1f7;
  color: #37697e;
}

.status-badge--flex {
  background: var(--surface-2);
  color: var(--ink-soft);
}

.cost-badge {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
}

.activity-actions {
  display: flex;
  align-items: flex-start;
  gap: 2px;
}

.activity-actions button {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.activity-actions button:hover {
  background: rgba(30, 40, 38, 0.07);
  color: var(--ink);
}

.activity-actions svg {
  width: 14px;
  height: 14px;
}

.activity-actions .favorite-button.is-active {
  color: var(--coral);
}

.activity-actions .favorite-button.is-active svg {
  fill: currentColor;
}

.travel-leg {
  display: grid;
  min-height: 29px;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  margin: -2px 0 2px;
  color: var(--muted);
}

.travel-leg-line {
  position: relative;
}

.travel-leg-line::before {
  position: absolute;
  top: -8px;
  bottom: -9px;
  left: 27px;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--line-strong) 0 3px, transparent 3px 6px);
  content: "";
}

.travel-leg-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 3px;
  font-size: 9px;
  font-weight: 750;
}

.travel-leg-copy svg {
  width: 12px;
  height: 12px;
}

.travel-leg-copy em {
  font-style: normal;
  font-weight: 500;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 32px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
}

.empty-state p {
  margin: 4px 0 0;
  font-size: 11px;
}

.add-inline {
  display: flex;
  width: calc(100% - 70px);
  min-height: 48px;
  align-items: center;
  gap: 11px;
  margin: 8px 0 0 70px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.add-inline:hover {
  border-color: var(--day-color);
  background: var(--day-tint);
  color: var(--day-color);
}

.add-inline span {
  display: grid;
  width: 29px;
  height: 29px;
  margin-left: 10px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
}

.add-inline svg {
  width: 14px;
  height: 14px;
}

.map-panel {
  position: sticky;
  top: 92px;
  display: grid;
  height: calc(100vh - 112px);
  min-height: 690px;
  max-height: 920px;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: #edf0ed;
}

.map-toolbar {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.map-toolbar > div:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.map-toolbar-kicker {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--day-color);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.map-toolbar-kicker svg {
  width: 13px;
  height: 13px;
}

.map-toolbar strong {
  overflow: hidden;
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmented-control {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.segmented-control button {
  padding: 6px 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
}

.segmented-control button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(28, 39, 36, 0.08);
}

.map-wrap {
  position: relative;
  min-height: 420px;
  overflow: hidden;
}

.map-canvas {
  position: absolute;
  inset: 0;
}

.map-loading,
.map-error {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background:
    radial-gradient(circle at 20% 20%, rgba(232, 95, 76, 0.08), transparent 28%),
    linear-gradient(135deg, #eef0ed, #e4e8e5);
  color: var(--ink-soft);
}

.map-loading.is-hidden {
  pointer-events: none;
  opacity: 0;
  transition: opacity 350ms ease;
}

.map-loading strong,
.map-error strong {
  margin-top: 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
}

.map-loading small,
.map-error span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.map-spinner {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(47, 124, 115, 0.16);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.map-error[hidden] {
  display: none;
}

.map-error svg {
  width: 36px;
  height: 36px;
  color: var(--coral);
}

.map-error .button {
  margin-top: 16px;
}

.map-legend {
  position: absolute;
  z-index: 3;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--legend-color, var(--day-color));
}

.map-recalculate {
  position: absolute;
  z-index: 3;
  right: 14px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 150px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  text-align: left;
  backdrop-filter: blur(14px);
}

.map-recalculate > svg {
  width: 18px;
  height: 18px;
  color: var(--day-color);
}

.map-recalculate span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.map-recalculate strong {
  font-size: 10px;
}

.map-recalculate small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.map-quick-actions {
  display: flex;
  gap: 8px;
  padding: 10px 12px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.map-quick-action {
  display: inline-flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 6px;
  padding: 10px 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.map-quick-action:hover,
.map-quick-action:focus-visible {
  border-color: color-mix(in srgb, var(--day-color) 45%, var(--line));
  background: var(--day-tint);
  transform: translateY(-1px);
}

.map-quick-action svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--day-color);
}

.map-quick-action .map-quick-action-external {
  width: 12px;
  height: 12px;
  margin-left: auto;
  color: var(--muted);
}

.route-summary {
  display: grid;
  min-height: 72px;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.route-stat {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.route-stat-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--day-tint);
  color: var(--day-color);
}

.route-stat-icon svg {
  width: 15px;
  height: 15px;
}

.route-stat span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.route-stat small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.route-stat strong {
  overflow: hidden;
  margin-top: 3px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-summary > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--day-color);
  font-size: 9px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.route-summary > a svg {
  width: 12px;
  height: 12px;
}

.map-marker {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 7px;
  background: var(--marker-color, var(--day-color));
  color: #fff;
  box-shadow: 0 6px 18px rgba(17, 28, 25, 0.28);
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  transform: rotate(-45deg);
  transition: width 150ms ease, height 150ms ease, box-shadow 150ms ease;
}

.map-marker span {
  transform: rotate(45deg);
}

.map-marker.is-selected {
  width: 39px;
  height: 39px;
  z-index: 10;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--marker-color) 23%, transparent), 0 9px 22px rgba(17, 28, 25, 0.3);
}

.map-marker.is-completed {
  filter: grayscale(0.7);
  opacity: 0.68;
}

.maplibregl-popup-content {
  min-width: 210px;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 16px !important;
  box-shadow: 0 18px 44px rgba(18, 28, 25, 0.2) !important;
}

.maplibregl-popup-close-button {
  top: 8px !important;
  right: 8px !important;
  display: grid !important;
  width: 25px !important;
  height: 25px !important;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88) !important;
  color: var(--ink) !important;
  font-size: 18px !important;
}

.map-popup {
  padding: 15px;
  font-family: var(--sans);
}

.map-popup small {
  color: var(--day-color);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.map-popup strong {
  display: block;
  margin-top: 4px;
  padding-right: 18px;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.15;
}

.map-popup span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.map-popup button {
  margin-top: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--day-tint);
  color: var(--day-color);
  cursor: pointer;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.maplibregl-ctrl-group {
  overflow: hidden;
  border-radius: 12px !important;
  box-shadow: var(--shadow-sm) !important;
}

.maplibregl-ctrl-attrib {
  font-size: 9px !important;
}

.details-section {
  padding-bottom: 88px;
}

.details-grid {
  display: grid;
  max-width: 1280px;
  margin: 0 auto;
  grid-template-columns: 0.9fr 1.2fr 0.9fr;
  gap: 16px;
}

.detail-card {
  min-width: 0;
  min-height: 330px;
  padding: 23px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.detail-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-card-header h3,
.concert-detail-copy h3 {
  margin: 3px 0 0;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: -0.025em;
}

.detail-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
}

.detail-icon svg {
  width: 19px;
  height: 19px;
}

.detail-icon--coral {
  background: var(--coral-soft);
  color: var(--coral);
}

.detail-icon--teal {
  background: #e5f2ee;
  color: var(--teal);
}

.reminders-list,
.resources-list {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}

.reminder-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.reminder-item:first-child {
  border-top: 0;
}

.reminder-check {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: transparent;
  cursor: pointer;
}

.reminder-check svg {
  width: 13px;
  height: 13px;
}

.reminder-item.is-done .reminder-check {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.reminder-item.is-done .reminder-copy {
  opacity: 0.55;
  text-decoration: line-through;
}

.reminder-copy {
  min-width: 0;
}

.reminder-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-copy small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-date {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.concert-detail-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  padding: 14px;
  background: #eff0ea;
}

.concert-poster {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 210, 95, 0.55) 0 2px, transparent 3px),
    radial-gradient(circle at 20% 35%, rgba(255, 255, 255, 0.4) 0 1px, transparent 2px),
    linear-gradient(145deg, #e85f4c 0%, #d4473a 48%, #1d2c2a 48.2%, #121d1b 100%);
  color: #fff;
  box-shadow: 0 15px 28px rgba(30, 40, 38, 0.18);
}

.poster-kicker,
.poster-venue {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.17em;
}

.concert-poster strong {
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 58px);
  letter-spacing: -0.065em;
  line-height: 0.78;
}

.concert-detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px 12px 0;
}

.concert-detail-copy ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 16px 0 18px;
  padding: 0;
  color: var(--ink-soft);
  font-size: 10px;
  list-style: none;
}

.concert-detail-copy li {
  position: relative;
  padding-left: 14px;
}

.concert-detail-copy li::before {
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
  content: "";
}

.concert-detail-copy a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--coral-deep);
  font-size: 9px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.concert-detail-copy a svg {
  width: 12px;
  height: 12px;
}

.resource-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.resource-item:first-child {
  border-top: 0;
}

.resource-badge {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--teal);
}

.resource-badge svg {
  width: 14px;
  height: 14px;
}

.resource-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.resource-copy strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resource-item > svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.resource-item:hover .resource-copy strong {
  color: var(--teal);
}

.resource-note {
  display: flex;
  gap: 7px;
  margin: 13px 0 0;
  padding: 10px;
  border-radius: 11px;
  background: #eef6f3;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.45;
}

.resource-note svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: var(--teal);
}

.footer {
  display: flex;
  max-width: 1280px;
  min-height: 110px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.brand--footer {
  cursor: default;
}

.footer p {
  color: var(--muted);
  font-size: 10px;
}

.text-button {
  padding: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.text-button:hover {
  color: var(--danger);
}

.mobile-tabbar {
  display: none;
}

.modal {
  width: min(720px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 40px));
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(14, 25, 22, 0.3);
}

.modal--small {
  width: min(560px, calc(100vw - 32px));
}

.modal::backdrop {
  background: rgba(18, 27, 25, 0.5);
  backdrop-filter: blur(6px);
}

.modal > form,
.modal > div:not(.modal-header):not(.export-options),
.modal > .modal-header,
.modal > .export-options {
  margin: 0;
}

.modal form {
  padding: 0 26px 24px;
}

.modal > .modal-header {
  padding: 24px 26px 16px;
}

.modal > .export-options {
  padding: 0 26px 26px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 18px;
}

.modal-header h2 {
  font-size: 32px;
}

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

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field > span {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #faf9f6;
  font-size: 12px;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--coral);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(232, 95, 76, 0.1);
}

.modal-map-tip,
.confirmed-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 9px;
}

.modal-map-tip svg,
.confirmed-box > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--teal);
}

.confirmed-box span {
  display: flex;
  flex-direction: column;
}

.confirmed-box small {
  color: var(--teal);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.confirmed-box strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 11px;
}

.modal-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}

.export-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.export-options > button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}

.export-options > button:hover {
  border-color: var(--coral);
  background: var(--coral-soft);
}

.export-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--coral);
}

.export-icon svg {
  width: 18px;
  height: 18px;
}

.export-options > button > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.export-options strong {
  font-size: 12px;
}

.export-options small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.export-options > button > svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.context-menu {
  position: fixed;
  z-index: 400;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.context-menu[hidden] {
  display: none;
}

.context-menu button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.context-menu button:hover {
  background: var(--surface-2);
}

.context-menu svg {
  width: 14px;
  height: 14px;
}

.toast-region {
  position: fixed;
  z-index: 1000;
  right: 22px;
  bottom: 22px;
  display: flex;
  width: min(330px, calc(100vw - 44px));
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  background: rgba(24, 35, 32, 0.95);
  color: #fff;
  box-shadow: var(--shadow-md);
  animation: toast-in 220ms ease both;
  backdrop-filter: blur(14px);
}

.toast.is-leaving {
  animation: toast-out 180ms ease both;
}

.toast-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #a9e5c8;
}

.toast-icon svg {
  width: 15px;
  height: 15px;
}

.toast strong {
  display: block;
  font-size: 10px;
}

.toast span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 9px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(6px) scale(0.98); }
}

@media (max-width: 1580px) {
  .hero,
  .planner,
  .details-section {
    margin-right: 28px;
    margin-left: 28px;
  }

  .hero {
    max-width: none;
  }

  .section-heading,
  .day-tabs-wrap,
  .trip-strip,
  .details-grid,
  .footer {
    max-width: none;
    margin-right: 28px;
    margin-left: 28px;
  }

  .planner .section-heading,
  .planner .day-tabs-wrap,
  .details-section .section-heading,
  .details-section .details-grid {
    margin-right: 0;
    margin-left: 0;
  }

  .planner-grid {
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 26px;
  }

  .desktop-nav {
    display: none;
  }

  .hero {
    min-height: 410px;
  }

  .hero-content {
    padding: 46px 40px;
  }

  .hero h1 {
    font-size: clamp(48px, 7vw, 70px);
  }

  .concert-card {
    right: 22px;
    bottom: 22px;
    width: 350px;
  }

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

  .trip-strip-item:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .trip-strip-item:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .trip-strip-item--attention {
    border-radius: 21px 0 0 0;
  }

  .planner-grid {
    grid-template-columns: minmax(420px, 0.9fr) minmax(430px, 1.1fr);
  }

  .itinerary-panel {
    padding: 22px 18px 26px;
  }

  .map-panel {
    min-height: 650px;
  }

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

  .concert-detail-card {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 76px;
  }

  .topbar {
    min-height: 66px;
    padding: 0 18px;
  }

  .sync-state {
    display: none;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .brand-copy small {
    font-size: 8px;
  }

  .hero,
  .planner,
  .details-section {
    margin-right: 16px;
    margin-left: 16px;
  }

  .hero {
    min-height: 470px;
    margin-top: 12px;
    border-radius: 26px;
  }

  .hero-image {
    object-position: 62% center;
  }

  .hero-scrim {
    background: linear-gradient(0deg, rgba(7, 16, 17, 0.84) 0%, rgba(7, 16, 17, 0.12) 82%);
  }

  .hero-content {
    align-self: flex-start;
    padding: 40px 32px;
  }

  .hero-content > p {
    max-width: 420px;
  }

  .concert-card {
    right: 18px;
    bottom: 18px;
    left: 18px;
    width: auto;
  }

  .trip-strip {
    margin-right: 16px;
    margin-left: 16px;
  }

  .planner,
  .details-section {
    padding-top: 68px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .planner-grid {
    display: flex;
    flex-direction: column;
    border-radius: 24px;
  }

  .itinerary-panel {
    order: 2;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .map-panel {
    position: relative;
    top: auto;
    order: 1;
    height: 540px;
    min-height: 540px;
    border-radius: 24px 24px 0 0;
  }

  .map-wrap {
    min-height: 390px;
  }

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

  .concert-detail-card {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .topbar {
    position: relative;
  }

  .topbar-actions > .icon-button {
    display: none;
  }

  .avatar-stack span {
    width: 31px;
    height: 31px;
    border-width: 2px;
  }

  .hero {
    min-height: 520px;
    margin-right: 10px;
    margin-left: 10px;
    border-radius: 24px;
  }

  .hero-content {
    padding: 30px 22px;
  }

  .hero h1 {
    font-size: 45px;
  }

  .hero-content > p {
    font-size: 13px;
  }

  .hero-meta span {
    padding: 6px 8px;
    font-size: 9px;
  }

  .concert-card {
    right: 10px;
    bottom: 10px;
    left: 10px;
    grid-template-columns: auto 1fr;
    gap: 12px;
  }

  .concert-card > .icon-button {
    display: none;
  }

  .concert-card h2 {
    font-size: 20px;
  }

  .trip-strip {
    display: flex;
    margin: 10px 10px 0;
    overflow-x: auto;
    border-radius: 18px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .trip-strip::-webkit-scrollbar {
    display: none;
  }

  .trip-strip-item {
    min-width: 245px;
    min-height: 70px;
    flex: 0 0 auto;
    border-top: 0 !important;
    border-left: 1px solid var(--line) !important;
    scroll-snap-align: start;
  }

  .trip-strip-item:first-child {
    border-left: 0 !important;
  }

  .trip-strip-item--attention {
    border-radius: 17px 0 0 17px;
  }

  .planner,
  .details-section {
    margin-right: 10px;
    margin-left: 10px;
    padding-top: 56px;
  }

  .section-heading {
    display: block;
    margin-bottom: 20px;
    padding: 0 6px;
  }

  .section-heading h2 {
    font-size: 36px;
  }

  .section-heading p {
    font-size: 12px;
  }

  .section-actions {
    margin-top: 15px;
  }

  .section-actions .button--quiet {
    display: none;
  }

  .day-tabs-wrap {
    margin-bottom: 12px;
  }

  .day-tabs {
    display: flex;
    min-width: 0;
    gap: 8px;
  }

  .day-tab {
    min-width: 168px;
    min-height: 76px;
    flex: 0 0 auto;
    grid-template-columns: auto 1fr;
    padding: 10px 12px;
    border-radius: 17px;
  }

  .day-tab-date {
    width: 43px;
    height: 48px;
  }

  .day-tab-count {
    display: none;
  }

  .day-tab-copy strong {
    font-size: 14px;
  }

  .planner-grid {
    border-radius: 20px;
  }

  .itinerary-panel {
    order: 1;
  }

  .map-panel {
    order: 2;
    height: calc(100svh - 150px);
    min-height: 520px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-radius: 20px 20px 0 0;
  }

  .map-quick-actions {
    position: absolute;
    z-index: 7;
    top: 66px;
    right: 9px;
    left: 9px;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .map-quick-action {
    min-height: 42px;
    padding: 8px;
    font-size: 9px;
  }

  .map-toolbar {
    min-height: 65px;
    padding: 10px 12px;
  }

  .map-toolbar strong {
    font-size: 16px;
  }

  .segmented-control {
    display: none;
  }

  .map-legend {
    display: none;
  }

  .route-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 9px 10px;
  }

  .route-summary > a {
    display: none;
  }

  .route-summary-osm {
    display: none !important;
  }

  .route-stat {
    gap: 5px;
  }

  .route-stat-icon {
    width: 25px;
    height: 25px;
  }

  .route-stat small {
    font-size: 7px;
  }

  .route-stat strong {
    font-size: 9px;
  }

  .itinerary-panel {
    padding: 18px 10px 24px;
  }

  .day-overview {
    padding: 2px 5px 17px;
  }

  .day-overview h3 {
    font-size: 26px;
  }

  .day-overview p {
    font-size: 10px;
  }

  .itinerary-toolbar {
    padding: 0 3px;
  }

  .activity-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 6px;
  }

  .activity-row::before,
  .travel-leg-line::before {
    left: 58px;
  }

  .activity-time {
    padding-top: 3px;
    font-size: 11px;
    font-weight: 850;
  }

  .activity-time::after {
    left: 54px;
    width: 11px;
    height: 11px;
  }

  .activity-card {
    gap: 8px;
    padding: 14px 10px;
    border-color: rgba(30, 40, 38, 0.05);
    background: rgba(255, 255, 255, 0.48);
  }

  .activity-card.is-selected {
    box-shadow: 0 10px 24px color-mix(in srgb, var(--day-color) 14%, transparent);
  }

  .activity-category {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    font-size: 16px;
  }

  .activity-title {
    font-size: 16px;
  }

  .activity-note {
    font-size: 11px;
    line-height: 1.5;
  }

  .place-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 10px;
  }

  .place-actions a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid color-mix(in srgb, var(--day-color) 18%, var(--line));
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.025em;
    text-decoration: none;
    text-transform: uppercase;
  }

  .place-actions a:first-child {
    border-color: color-mix(in srgb, var(--day-color) 35%, var(--line));
    background: color-mix(in srgb, var(--day-tint) 72%, white);
    color: var(--day-color);
  }

  .place-actions svg {
    width: 11px;
    height: 11px;
  }

  .place-actions svg:last-child {
    width: 9px;
    height: 9px;
    opacity: 0.66;
  }

  .activity-actions button:not(.favorite-button) {
    display: none;
  }

  .travel-leg {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 6px;
  }

  .add-inline {
    width: calc(100% - 70px);
    margin-left: 70px;
  }

  .details-section {
    padding-bottom: 40px;
  }

  .detail-card {
    min-height: 0;
    padding: 18px;
    border-radius: 20px;
  }

  .concert-detail-card {
    display: block;
    padding: 10px;
  }

  .concert-poster {
    min-height: 260px;
  }

  .concert-detail-copy {
    padding: 20px 12px 14px;
  }

  .footer {
    display: grid;
    margin: 0 16px;
    padding: 25px 0;
  }

  .footer p {
    margin: 0;
  }

  .mobile-tabbar {
    position: fixed;
    z-index: 200;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 8px;
    display: grid;
    height: 62px;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 21px;
    background: linear-gradient(115deg, rgba(20, 39, 42, 0.97), rgba(37, 57, 52, 0.94));
    box-shadow: 0 16px 40px rgba(13, 23, 20, 0.3);
    backdrop-filter: blur(16px);
  }

  .mobile-tabbar button {
    display: flex;
    height: 50px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font-size: 8px;
    font-weight: 800;
  }

  .mobile-tabbar button.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
  }

  .mobile-tabbar svg {
    width: 18px;
    height: 18px;
  }

  .mobile-add {
    display: grid;
    width: 35px;
    height: 35px;
    margin-top: -20px;
    place-items: center;
    border: 3px solid rgba(24, 35, 32, 0.94);
    border-radius: 50%;
    background: var(--coral);
    color: #fff;
    box-shadow: 0 8px 20px rgba(232, 95, 76, 0.35);
  }

  .mobile-add svg {
    width: 17px;
    height: 17px;
  }

  body.mobile-map-view .itinerary-panel,
  body.mobile-map-view .section-heading,
  body.mobile-map-view .details-section,
  body.mobile-map-view .trip-strip,
  body.mobile-map-view .hero {
    display: none;
  }

  body.mobile-map-view .planner {
    margin: 0;
    padding: 0;
  }

  body.mobile-map-view .day-tabs-wrap {
    margin: 10px;
  }

  body.mobile-map-view .planner-grid {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.mobile-map-view .map-panel {
    height: calc(100svh - 145px);
    border-radius: 0;
  }

  .modal {
    width: calc(100vw - 16px);
    max-height: calc(100svh - 16px);
    border-radius: 22px;
  }

  .modal form {
    padding: 0 16px 18px;
  }

  .modal > .modal-header {
    padding: 20px 16px 13px;
  }

  .modal > .export-options {
    padding: 0 16px 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .field--wide {
    grid-column: auto;
  }

  .modal-actions {
    grid-template-columns: 1fr 1fr;
  }

  .modal-actions > span {
    display: none;
  }

  .modal-actions .button--danger {
    grid-column: 1 / -1;
  }

  .toast-region {
    right: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.print-sheet {
  display: none;
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  body {
    padding: 0;
    background: #fff;
    font-size: 10pt;
  }

  body > *:not(.print-sheet) {
    display: none !important;
  }

  .print-sheet {
    display: block;
    color: #172c2c;
    font-family: Arial, sans-serif;
  }

  .print-sheet > header {
    padding: 0 0 8mm;
    border-bottom: 2px solid #103f43;
  }

  .print-sheet > header span,
  .print-day h2 span {
    display: block;
    margin-bottom: 2mm;
    color: #b54d34;
    font-size: 8pt;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .print-sheet h1 {
    margin: 0 0 1mm;
    font-family: Georgia, serif;
    font-size: 26pt;
    line-height: 1;
  }

  .print-sheet header p,
  .print-day > p {
    margin: 0;
    color: #5f6e6c;
    line-height: 1.45;
  }

  .print-day {
    break-before: page;
    padding-top: 2mm;
  }

  .print-day:first-of-type {
    break-before: auto;
  }

  .print-day h2 {
    margin: 0 0 1mm;
    font-family: Georgia, serif;
    font-size: 19pt;
  }

  .print-day ol {
    margin: 5mm 0 0;
    padding: 0;
    list-style: none;
  }

  .print-day li {
    display: grid;
    grid-template-columns: 17mm 1fr;
    gap: 3mm;
    break-inside: avoid;
    padding: 2.2mm 0;
    border-top: 0.3mm solid #dfe4df;
  }

  .print-day time {
    color: #b54d34;
    font-size: 9pt;
    font-weight: 800;
  }

  .print-day li div,
  .print-day li span {
    display: block;
  }

  .print-day li strong {
    font-size: 9.5pt;
  }

  .print-day li span {
    margin-top: 0.6mm;
    color: #647270;
    font-size: 8pt;
  }
}
