:root {
  color-scheme: dark;
  --bg: #050706;
  --bg-soft: #0b1110;
  --surface: rgba(18, 24, 23, 0.72);
  --surface-strong: rgba(25, 32, 31, 0.88);
  --surface-glass: rgba(255, 255, 255, 0.08);
  --ink: #f7fff9;
  --muted: #9aa7a1;
  --line: rgba(255, 255, 255, 0.13);
  --primary: #31f58a;
  --primary-strong: #0bd46f;
  --accent: #ff7a2f;
  --accent-soft: rgba(255, 122, 47, 0.18);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  --glass-blur: blur(22px);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(49, 245, 138, 0.13), transparent 28rem),
    radial-gradient(circle at 84% 8%, rgba(255, 122, 47, 0.13), transparent 24rem),
    linear-gradient(135deg, #030404 0%, #08100e 45%, #120b08 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body.splash-lock {
  height: 100vh;
  overflow: hidden;
}

.brand-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000000;
  opacity: 1;
  pointer-events: all;
  animation: splashFadeIn 500ms ease both;
  transition: opacity 600ms ease, visibility 0s linear 600ms;
}

.brand-loader.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.brand-loader img {
  width: min(48vw, 680px);
  max-width: 90vw;
  max-height: 82vh;
  height: auto;
  object-fit: contain;
  object-position: center center;
  animation: splashBreath 4000ms ease-in-out both;
}

.brand-logo-button {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  min-height: 76px;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.brand-logo-button img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
}

@keyframes splashFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes splashBreath {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

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

button {
  min-height: 46px;
  border: 1px solid rgba(49, 245, 138, 0.3);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #03110a;
  cursor: pointer;
  font-weight: 850;
  padding: 0 20px;
  box-shadow: 0 14px 32px rgba(49, 245, 138, 0.2);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(49, 245, 138, 0.28);
}

button.secondary {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  box-shadow: none;
}

button.secondary:hover,
.ghost-button:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.13);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  outline: none;
  padding: 13px 14px;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(49, 245, 138, 0.65);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 0 0 4px rgba(49, 245, 138, 0.1);
}

select option {
  background: #101514;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
}

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

h1 {
  max-width: 860px;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  letter-spacing: 0;
  line-height: 0.9;
}

h2 {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

a {
  color: var(--primary);
}

main,
.topbar {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.splash-view {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 28px;
  align-items: center;
  overflow: hidden;
  padding: 36px clamp(18px, 5vw, 74px);
}

.splash-view::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 6, 0.98), rgba(5, 7, 6, 0.78), rgba(5, 7, 6, 0.96)),
    radial-gradient(circle at 74% 26%, rgba(49, 245, 138, 0.18), transparent 24rem),
    radial-gradient(circle at 88% 78%, rgba(255, 122, 47, 0.14), transparent 20rem);
  opacity: 1;
}

.splash-view::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% 34%;
  height: 44%;
  background: radial-gradient(circle, rgba(49, 245, 138, 0.18), transparent 68%);
  filter: blur(12px);
}

.splash-copy,
.splash-visual {
  position: relative;
  z-index: 1;
}

.splash-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.splash-kicker span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 24px var(--primary);
}

.splash-kicker {
  gap: 0;
  color: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.splash-copy h1 {
  text-wrap: balance;
}

.splash-subheadline {
  max-width: 680px;
  margin-top: 18px;
  color: #cfdad5;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.splash-actions,
.owner-actions,
.card-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.splash-actions {
  margin-top: 24px;
}

.owner-metrics div {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-glass);
  backdrop-filter: var(--glass-blur);
  padding: 16px;
  box-shadow: var(--shadow);
}

.owner-metrics strong {
  display: block;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
}

.owner-metrics span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.splash-visual {
  min-width: 0;
}

.marketplace-preview {
  display: grid;
  gap: 12px;
  width: min(650px, 100%);
  max-height: min(78vh, 760px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045)),
    rgba(5, 7, 6, 0.72);
  padding: 14px;
  box-shadow: var(--shadow), inset 0 0 80px rgba(49, 245, 138, 0.05);
  backdrop-filter: var(--glass-blur);
}

.marketplace-preview::-webkit-scrollbar {
  width: 8px;
}

.marketplace-preview::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.marketplace-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(8, 12, 11, 0.78);
  padding: 14px 16px;
  backdrop-filter: var(--glass-blur);
}

.marketplace-header span,
.marketplace-header small,
.instagram,
.next-stop {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.marketplace-header strong {
  display: block;
  margin-top: 3px;
  font-size: 1.1rem;
}

.marketplace-header small {
  border: 1px solid rgba(49, 245, 138, 0.28);
  border-radius: 999px;
  background: rgba(49, 245, 138, 0.11);
  color: #9dffc8;
  padding: 7px 10px;
  white-space: nowrap;
}

.market-truck-card {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 13px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.115);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(49, 245, 138, 0.1), transparent 15rem),
    rgba(255, 255, 255, 0.065);
  padding: 12px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.market-truck-card:hover {
  transform: translateY(-4px);
  border-color: rgba(49, 245, 138, 0.34);
  background:
    radial-gradient(circle at top left, rgba(49, 245, 138, 0.16), transparent 15rem),
    rgba(255, 255, 255, 0.095);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.36), 0 0 36px rgba(49, 245, 138, 0.08);
}

.market-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(6, 11, 10, 0.86);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 950;
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.05);
}

.market-logo span {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(6, 11, 10, 0.9);
  font-size: 0.9rem;
}

.market-truck-main {
  min-width: 0;
}

.market-truck-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.market-truck-title strong {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-truck-title span {
  color: #ffcc7a;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.market-truck-main p {
  margin-top: 4px;
  color: #dce8e2;
  font-size: 0.86rem;
}

.market-truck-main .next-stop {
  color: #9dffc8;
}

.instagram {
  display: inline-block;
  margin-top: 7px;
}

.market-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.market-actions button {
  min-height: 30px;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.075);
  color: var(--ink);
  font-size: 0.7rem;
  padding: 0 9px;
  box-shadow: none;
}

.market-actions button:hover {
  border-color: rgba(49, 245, 138, 0.34);
  background: rgba(49, 245, 138, 0.13);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #dce8e2;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 7px 10px;
  white-space: nowrap;
}

.status-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 16px currentColor;
}

.status-chip.open {
  border-color: rgba(49, 245, 138, 0.38);
  color: #9dffc8;
}

.status-chip.booking {
  border-color: rgba(255, 122, 47, 0.4);
  color: #ffc09a;
}

.status-chip.soon {
  border-color: rgba(255, 230, 109, 0.45);
  color: #ffe66d;
}

.status-chip.closed {
  color: #b9c4bf;
}

.topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0 8px;
}

.topbar h1 {
  font-size: clamp(1.85rem, 3.35vw, 3rem);
  max-width: 680px;
}

.subheadline {
  max-width: 680px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.25;
}

.ghost-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  white-space: nowrap;
  box-shadow: none;
}

.view {
  display: none;
  padding-bottom: 36px;
}

.view.active {
  display: block;
}

.panel,
.owner-callout,
.truck-profile,
.modal-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.panel {
  padding: 12px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(180px, 0.62fr) minmax(0, 2.38fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 8px;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 0.85fr) minmax(130px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.calendar-shell,
.schedule-panel {
  margin-top: 8px;
}

.calendar-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.event-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045));
  padding: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.event-card:hover {
  transform: translateY(-5px);
  border-color: rgba(49, 245, 138, 0.32);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.listing-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(6, 11, 10, 0.86);
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.05), 0 0 28px rgba(49, 245, 138, 0.08);
}

.truck-logo-image {
  width: 100%;
  height: 100%;
  padding: 7px;
  border-radius: 50%;
  object-fit: contain;
  object-position: center center;
}

.logo-initials {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 950;
  letter-spacing: 0;
}

.request-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.request-logo {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(6, 11, 10, 0.86);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.05);
}

.request-logo .logo-initials {
  font-size: 0.86rem;
}

.media-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: 8px;
  text-align: center;
}

.media-placeholder strong,
.media-placeholder span {
  display: block;
}

.media-placeholder strong {
  font-size: 1.1rem;
}

.media-placeholder span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.15;
}

.cuisine-icon {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  background: rgba(6, 11, 10, 0.92);
  font-size: 0.94rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
}

.listing-body {
  min-width: 0;
}

.event-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.event-card h3 {
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-card time,
.muted {
  color: var(--muted);
}

.listing-meta {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  color: #dce8e2;
  font-size: 0.78rem;
  line-height: 1.25;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  color: #dce8e2;
  font-weight: 900;
}

.status-dot i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.status-dot.open {
  color: #9dffc8;
}

.status-dot.later {
  color: #ffc09a;
}

.status-dot.soon {
  color: #ffe66d;
}

.status-dot.closed {
  color: #aeb9b4;
}

.pill {
  align-self: start;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 7px 10px;
  white-space: nowrap;
}

.pill.open {
  border-color: rgba(49, 245, 138, 0.45);
  background: rgba(49, 245, 138, 0.16);
  color: #9dffc8;
}

.pill.later {
  border-color: rgba(255, 122, 47, 0.45);
  background: rgba(255, 122, 47, 0.15);
  color: #ffc09a;
}

.pill.soon {
  border-color: rgba(255, 230, 109, 0.45);
  background: rgba(255, 230, 109, 0.15);
  color: #ffe66d;
}

.pill.closed {
  background: rgba(255, 255, 255, 0.08);
  color: #c6cfca;
}

.card-actions {
  align-items: center;
  margin-top: 8px;
}

.card-actions a,
.button-link,
.card-actions button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  text-decoration: none;
}

.card-actions a:not(.button-link) {
  color: #dfe9e4;
}

.card-actions button {
  padding: 0 11px;
}

.button-link {
  background: linear-gradient(135deg, var(--accent), #ffad48);
  color: #190b04;
  padding: 0 15px;
  box-shadow: 0 14px 32px rgba(255, 122, 47, 0.18);
}

.owner-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 24px;
}

.owner-callout p {
  margin-top: 6px;
  color: var(--muted);
}

.owner-view {
  padding-top: 4px;
}

.back-button {
  margin-bottom: 14px;
}

.dashboard-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: var(--glass-blur);
  margin-bottom: 14px;
}

.dashboard-tabs button {
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  white-space: nowrap;
}

.dashboard-tabs .tab-active {
  background: rgba(49, 245, 138, 0.15);
  color: var(--primary);
}

.owner-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  gap: 18px;
}

.stacked-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

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

.upload-grid label {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
}

.upload-grid input {
  padding: 10px;
}

.upload-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.3;
}

.media-preview {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

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

.media-preview-item {
  display: grid;
  gap: 8px;
}

.media-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  object-fit: cover;
}

.media-preview button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.two-col,
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.event-table {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.event-row,
.profile-schedule-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  padding: 14px;
}

.row-actions button {
  min-height: 38px;
  padding: 0 12px;
}

.truck-profile {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 1.05fr);
  gap: 0;
  overflow: hidden;
}

.profile-media {
  position: relative;
  min-height: 560px;
}

.profile-media > div:first-child,
#profileMediaContent > img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

.profile-media-stack {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 560px;
  overflow: hidden;
}

.profile-cover-image,
.profile-truck-image {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

.profile-cover-image {
  position: absolute;
  inset: 0;
}

.profile-truck-image.has-cover {
  position: absolute;
  inset: 24px 24px 128px;
  width: calc(100% - 48px);
  height: calc(100% - 152px);
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.profile-placeholder strong {
  font-size: clamp(3rem, 10vw, 7rem);
}

.profile-placeholder span {
  font-size: 1rem;
}

.profile-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.72));
}

.profile-avatar {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #06100b;
  font-size: 1.35rem;
  font-weight: 950;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-details {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: clamp(22px, 4vw, 34px);
}

.profile-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.profile-heading h2 {
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.92;
}

.rating {
  margin-top: 10px;
  color: #ffcc7a;
  font-weight: 850;
}

.profile-section {
  display: grid;
  gap: 8px;
}

.profile-section h3 {
  margin: 0;
}

.profile-schedule {
  display: grid;
  gap: 10px;
}

.mobile-profile-nav,
.mobile-profile-section,
.mobile-overview-action,
.profile-description,
.mobile-app-bar,
.mobile-bottom-nav,
.mobile-card-action {
  display: none;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  padding: 22px;
  text-align: center;
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.68);
  padding: 20px;
  z-index: 10;
}

.modal.hidden {
  display: none;
}

.modal-card {
  position: relative;
  width: min(430px, 100%);
  padding: 26px;
}

.menu-modal {
  z-index: 30;
  padding: 0;
}

.menu-viewer {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  width: 100vw;
  height: 100vh;
  padding: 24px;
  background: rgba(2, 5, 5, 0.96);
}

.menu-image-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 0;
}

.menu-image-scroll {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.menu-image-scroll img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: contain;
  object-position: center center;
}

.menu-nav {
  align-self: center;
}

.menu-viewer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  border: 1px solid rgba(49, 245, 138, 0.32);
  border-radius: 999px;
  background: rgba(8, 12, 11, 0.9);
  color: var(--ink);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  font-weight: 850;
}

.icon-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  box-shadow: none;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@media (max-width: 900px) {
  .splash-view {
    grid-template-columns: 1fr;
  }

  .splash-visual {
    order: -1;
  }

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

@media (max-width: 780px) {
  main,
  .topbar {
    width: min(100% - 24px, 1180px);
  }

  .topbar,
  .filters,
  .dashboard-grid,
  .truck-profile,
  .owner-metrics {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    align-items: stretch;
  }

  .brand-logo-button {
    width: 64px;
    height: 64px;
    min-height: 64px;
    margin-bottom: 18px;
  }

  .brand-logo-button img {
    width: 64px;
    height: 64px;
  }

  .brand-loader img {
    width: min(72vw, 560px);
    max-height: 78vh;
  }

  .filter-grid,
  .two-col,
  .actions,
  .event-card,
  .event-row,
  .upload-grid,
  .profile-schedule-row {
    grid-template-columns: 1fr;
  }

  .calendar-list {
    grid-template-columns: 1fr;
  }

  .marketplace-preview {
    max-height: none;
  }

  .market-truck-card {
    grid-template-columns: 64px 1fr;
  }

  .market-logo {
    width: 64px;
    height: 64px;
  }

  .status-chip {
    grid-column: 2;
    justify-self: start;
  }

  .owner-callout {
    align-items: stretch;
    flex-direction: column;
  }

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

  .profile-media,
  .profile-media > div:first-child,
  .profile-media img {
    min-height: 320px;
  }

  .profile-heading {
    display: grid;
  }

  .menu-viewer {
    padding: 14px;
  }

  .menu-image-wrap {
    grid-template-columns: 1fr;
  }

  .menu-nav {
    justify-self: center;
  }

  .menu-viewer-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .splash-view {
    padding: 20px 14px;
  }

  .marketplace-header,
  .market-truck-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .market-truck-card {
    grid-template-columns: 1fr;
  }

  .market-logo {
    width: 64px;
    height: 64px;
  }

  .brand-logo-button {
    width: 56px;
    height: 56px;
    min-height: 56px;
    margin-bottom: 16px;
  }

  .brand-logo-button img {
    width: 56px;
    height: 56px;
  }

  .status-chip {
    grid-column: auto;
  }

  .panel,
  .owner-callout,
  .truck-profile,
  .modal-card {
    border-radius: 22px;
  }
}

/* Mobile application shell and compact screen system. */
@media (max-width: 767px) {
  :root {
    --mobile-page-padding: 16px;
    --mobile-card-radius: 18px;
    --mobile-nav-height: 72px;
  }

  html {
    scroll-padding-top: 72px;
  }

  body {
    min-height: 100dvh;
    font-size: 16px;
  }

  body.splash-lock {
    min-height: 100dvh;
  }

  .topbar {
    display: none !important;
  }

  .mobile-app-bar:not(.hidden) {
    position: sticky;
    top: 0;
    z-index: 24;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: calc(58px + env(safe-area-inset-top));
    margin: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 9, 7, 0.96);
    padding: max(8px, env(safe-area-inset-top)) var(--mobile-page-padding) 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
  }

  .mobile-app-brand {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: #050706;
    padding: 0;
    box-shadow: none;
  }

  .mobile-app-brand img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: contain;
  }

  .mobile-app-title {
    display: grid;
    min-width: 0;
    line-height: 1.1;
  }

  .mobile-app-title span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
  }

  .mobile-app-title strong {
    overflow: hidden;
    font-size: 1.12rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-context-action {
    width: auto;
    min-width: 64px;
    min-height: 44px;
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    padding: 0 12px;
    box-shadow: none;
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .mobile-bottom-nav.mobile-bottom-nav--active:not(.hidden) {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 28;
    display: grid;
    grid-template-columns: repeat(var(--mobile-nav-count, 5), minmax(0, 1fr));
    min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(5, 9, 7, 0.97);
    padding: 6px 6px max(6px, env(safe-area-inset-bottom));
    box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(20px);
  }

  .mobile-bottom-nav button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 52px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    padding: 4px 2px;
    box-shadow: none;
    font-size: 0.7rem;
    line-height: 1;
  }

  .mobile-bottom-nav button svg {
    width: 22px;
    height: 22px;
  }

  .mobile-bottom-nav button span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav button.mobile-nav-active {
    background: rgba(49, 245, 138, 0.13);
    color: var(--primary);
  }

  main {
    width: 100%;
    margin: 0;
    padding: 10px var(--mobile-page-padding) 0;
  }

  .view {
    padding-bottom: calc(var(--mobile-nav-height) + 34px + env(safe-area-inset-bottom));
  }

  .site-footer {
    width: calc(100% - (var(--mobile-page-padding) * 2));
    margin: 14px auto 0;
    padding-bottom: calc(var(--mobile-nav-height) + 24px + env(safe-area-inset-bottom));
  }

  .splash-view {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 14px;
    padding: max(12px, env(safe-area-inset-top)) var(--mobile-page-padding) max(20px, env(safe-area-inset-bottom));
  }

  .splash-copy {
    max-width: none;
  }

  .splash-kicker .brand-logo-button,
  .splash-kicker .brand-logo-button img {
    width: 46px;
    height: 46px;
    min-height: 46px;
    margin-bottom: 0;
  }

  .splash-copy h1 {
    max-width: 10ch;
    margin-top: 6px;
    font-size: clamp(2.05rem, 10.5vw, 2.8rem);
    line-height: 0.9;
  }

  .splash-subheadline {
    max-width: 34rem;
    margin-top: 10px;
    font-size: 1rem;
    line-height: 1.38;
  }

  .splash-actions {
    gap: 8px;
    margin-top: 12px;
  }

  .splash-actions button {
    padding-inline: 10px;
    font-size: 0.9rem;
  }

  .splash-visual {
    max-height: 280px;
    overflow: hidden;
  }

  .marketplace-preview {
    max-height: 280px;
    border-radius: var(--mobile-card-radius);
    padding: 10px;
  }

  .marketplace-preview .market-truck-card ~ .market-truck-card {
    display: none;
  }

  .marketplace-header small {
    display: none;
  }

  .panel,
  .owner-callout,
  .truck-profile,
  .event-card,
  .event-row,
  .profile-schedule-row {
    border-radius: var(--mobile-card-radius);
  }

  .panel {
    padding: 16px;
  }

  .filters {
    gap: 12px;
    margin-bottom: 14px;
  }

  .filters h2 {
    font-size: 1.45rem;
  }

  .filters .muted {
    margin-top: 3px;
  }

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

  .filter-grid label {
    min-width: 0;
  }

  .filter-grid button {
    align-self: end;
  }

  input,
  select,
  textarea {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 1rem;
  }

  .calendar-list {
    gap: 14px;
  }

  .event-card {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .listing-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
  }

  .listing-logo img,
  .truck-logo-image {
    object-fit: contain;
  }

  .event-card h3 {
    font-size: 1.18rem;
  }

  .listing-meta {
    font-size: 1rem;
  }

  .event-card .card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-card .card-actions > :first-child {
    grid-column: 1 / -1;
  }

  .event-card .card-actions button,
  .event-card .card-actions a {
    min-height: 44px;
  }

  .owner-view > .back-button,
  .owner-view > .dashboard-tabs {
    display: none;
  }

  .owner-view {
    padding-top: 0;
  }

  #dashboardTabContent {
    margin-bottom: 12px;
  }

  #dashboardTabContent > h2 {
    margin-bottom: 4px;
    font-size: 1.55rem;
  }

  #dashboardTabContent .event-table {
    gap: 12px;
    margin-top: 12px;
  }

  .mobile-dashboard-card {
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }

  .mobile-dashboard-card > div {
    min-width: 0;
  }

  .mobile-dashboard-card strong {
    font-size: 1.08rem;
  }

  .mobile-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
  }

  .owner-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  .owner-metrics div {
    min-width: 0;
    border-radius: 16px;
    padding: 12px 8px;
  }

  .owner-metrics strong {
    font-size: 1.45rem;
  }

  .owner-metrics span {
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .dashboard-grid {
    gap: 14px;
  }

  .stacked-form,
  .upload-grid,
  .two-col,
  .actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stacked-form {
    margin-top: 12px;
  }

  .upload-grid label {
    border-radius: 16px;
    padding: 14px;
  }

  .event-row,
  .profile-schedule-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
  }

  .request-card-main {
    align-items: start;
    gap: 10px;
  }

  .request-logo {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
  }

  .request-logo img {
    object-fit: contain;
  }

  .profile-schedule-row > .row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-schedule-row > .row-actions > .pill {
    display: none;
  }

  .row-actions button {
    min-height: 44px;
  }

  .profile-view > .back-button {
    width: 100%;
    margin-bottom: 8px;
  }

  .mobile-profile-nav {
    top: calc(58px + env(safe-area-inset-top));
  }

  .truck-profile {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .profile-media,
  .profile-media > div:first-child,
  #profileMediaContent,
  #profileMediaContent > img,
  .profile-media-stack,
  .profile-cover-image,
  .profile-truck-image {
    height: clamp(180px, 52vw, 220px);
    max-height: 220px;
    border-radius: var(--mobile-card-radius);
  }

  .profile-media {
    overflow: hidden;
    aspect-ratio: 16 / 9;
  }

  .profile-truck-image,
  .profile-cover-image {
    object-fit: cover;
    object-position: center;
  }

  .profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #050706;
  }

  .profile-avatar img {
    padding: 3px;
    border-radius: 50%;
    object-fit: contain;
  }

  .profile-details {
    gap: 16px;
    padding: 14px 0 0;
  }

  .profile-heading,
  .profile-section,
  .mobile-profile-section {
    border: 1px solid var(--line);
    border-radius: var(--mobile-card-radius);
    background: var(--surface);
    padding: 16px;
  }

  .profile-heading h2 {
    max-width: 100%;
    font-size: clamp(1.8rem, 8.5vw, 2.25rem);
  }

  .profile-description,
  .mobile-overview-action {
    margin-right: 16px;
    margin-left: 16px;
  }

  .profile-menu-preview {
    max-height: 210px;
  }

  .profile-menu-preview img {
    height: min(52vw, 210px);
  }

  .modal {
    place-items: start center;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: max(10px, env(safe-area-inset-top)) 10px max(18px, env(safe-area-inset-bottom));
  }

  .modal-card {
    width: 100%;
    max-height: none;
    margin: auto 0;
    overflow: visible;
    border-radius: 18px;
    padding: 14px 16px max(20px, env(safe-area-inset-bottom));
  }

  .modal-card .icon-button {
    position: sticky;
    top: 0;
    z-index: 3;
    float: right;
    width: 44px;
    min-height: 44px;
    margin: -2px -2px 2px 8px;
    background: rgba(20, 27, 25, 0.96);
  }

  .modal-card h2 {
    font-size: 1.7rem;
  }

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

  .beta-notice {
    margin: 12px 0;
  }

  .toast {
    bottom: calc(var(--mobile-nav-height) + 12px + env(safe-area-inset-bottom));
  }

  .legal-content {
    border-radius: var(--mobile-card-radius);
    padding: 20px var(--mobile-page-padding);
  }

  .legal-content h1 {
    font-size: clamp(2rem, 9vw, 2.45rem);
  }

  .legal-section h2 {
    font-size: 1.35rem;
  }

  .legal-section p,
  .legal-section li {
    font-size: 1rem;
    line-height: 1.62;
  }

  .legal-footer {
    padding-bottom: max(28px, calc(18px + env(safe-area-inset-bottom)));
  }
}

@media (max-width: 360px) {
  .mobile-app-title span {
    display: none;
  }

  .mobile-context-action {
    min-width: 58px;
    padding-inline: 9px;
  }

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

  .owner-metrics {
    grid-template-columns: 1fr;
  }

  .mobile-bottom-nav button {
    font-size: 0.64rem;
  }
}

.beta-notice {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(87, 255, 84, 0.34);
  border-radius: 16px;
  background: rgba(87, 255, 84, 0.08);
  color: #f4fff3;
}

.beta-notice strong,
.site-footer-beta strong {
  color: #76ff73;
}

.beta-notice p,
.site-footer-beta p {
  margin: 7px 0 0;
  line-height: 1.55;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 32px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(9, 12, 10, 0.9);
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
}

.site-footer-beta {
  max-width: 820px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 16px;
}

.legal-links a,
.legal-back-link {
  color: #76ff73;
  font-weight: 700;
  text-decoration: none;
}

.legal-links a:hover,
.legal-links a:focus-visible,
.legal-back-link:hover,
.legal-back-link:focus-visible {
  text-decoration: underline;
}

.legal-page {
  min-height: 100vh;
  background: #050806;
  color: #f6fff5;
}

.legal-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
}

.legal-brand img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
}

.legal-content {
  margin-bottom: 28px;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: rgba(12, 16, 13, 0.96);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
}

.legal-content h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.legal-updated {
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.62);
}

.legal-section {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-section + .legal-section {
  margin-top: 24px;
}

.legal-section h2 {
  margin: 0 0 10px;
  color: #76ff73;
  font-size: 1.25rem;
}

.legal-section p,
.legal-section li {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.legal-section ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.legal-footer {
  margin-bottom: 32px;
  padding: 20px 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

.legal-footer .legal-links {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .site-footer {
    width: min(100% - 20px, 1180px);
    margin-bottom: 20px;
    padding: 18px;
    border-radius: 16px;
  }

  .legal-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-content {
    padding: 24px 20px;
    border-radius: 20px;
  }
}

/* Mobile-only layout refinements. Desktop rules above remain unchanged. */
@media (max-width: 780px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 16px;
  }

  body.splash-lock {
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
  }

  button,
  .button-link,
  .card-actions a {
    min-height: 44px;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 1rem;
  }

  label {
    gap: 6px;
    font-size: 0.95rem;
  }

  main,
  .topbar {
    width: min(100% - 20px, 1180px);
  }

  .splash-view {
    min-height: 100dvh;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    align-items: start;
    gap: 16px;
    overflow: visible;
    padding: 14px 12px max(24px, env(safe-area-inset-bottom));
  }

  .splash-copy {
    order: 1;
  }

  .splash-visual {
    order: 2;
  }

  .splash-kicker,
  .eyebrow {
    margin-bottom: 6px;
  }

  .splash-kicker .brand-logo-button {
    width: 50px;
    height: 50px;
    min-height: 50px;
    margin-bottom: 6px;
  }

  .splash-kicker .brand-logo-button img {
    width: 50px;
    height: 50px;
  }

  .splash-copy h1 {
    max-width: 12ch;
    font-size: clamp(2.45rem, 13vw, 3.8rem);
    line-height: 0.88;
  }

  .splash-subheadline {
    margin-top: 10px;
    font-size: 1rem;
    line-height: 1.42;
  }

  .splash-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
  }

  .splash-actions button {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
  }

  .marketplace-preview {
    width: 100%;
    max-height: 260px;
    gap: 8px;
    overflow-y: auto;
    border-radius: 20px;
    padding: 10px;
  }

  .marketplace-header {
    gap: 8px;
  }

  .market-truck-card {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    border-radius: 18px;
    padding: 10px;
  }

  .market-logo {
    width: 52px;
    height: 52px;
  }

  .market-truck-title {
    align-items: flex-start;
  }

  .market-truck-title strong {
    font-size: 1rem;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .market-truck-main p {
    margin-top: 3px;
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .market-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 8px;
  }

  .market-actions button {
    width: 100%;
    min-height: 44px;
    padding: 0 8px;
    font-size: 0.82rem;
  }

  .status-chip {
    grid-column: 2;
    justify-self: start;
    min-height: 32px;
    font-size: 0.82rem;
  }

  .topbar {
    gap: 10px;
    padding: 10px 0 6px;
  }

  .topbar .brand-logo-button {
    width: 52px;
    height: 52px;
    min-height: 52px;
    margin-bottom: 8px;
  }

  .topbar .brand-logo-button img {
    width: 52px;
    height: 52px;
  }

  .topbar h1 {
    max-width: none;
    font-size: clamp(1.7rem, 8vw, 2.2rem);
    line-height: 1.04;
  }

  .subheadline {
    margin-top: 5px;
    font-size: 1rem;
    line-height: 1.4;
  }

  .topbar .owner-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .topbar .owner-actions button {
    width: 100%;
  }

  .view {
    padding-bottom: max(72px, calc(44px + env(safe-area-inset-bottom)));
  }

  .panel,
  .owner-callout,
  .truck-profile,
  .modal-card {
    border-radius: 18px;
  }

  .panel {
    padding: 10px;
  }

  .filters {
    gap: 10px;
    margin-bottom: 8px;
  }

  .filter-grid {
    gap: 8px;
  }

  .filter-grid button {
    width: 100%;
    min-height: 44px;
  }

  .calendar-shell,
  .schedule-panel {
    margin-top: 8px;
  }

  .calendar-list {
    gap: 10px;
  }

  .event-card {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    border-radius: 18px;
    padding: 10px;
  }

  .listing-logo {
    width: 54px;
    height: 54px;
  }

  .event-card header {
    flex-wrap: wrap;
    gap: 7px;
  }

  .event-card h3 {
    font-size: 1.05rem;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .listing-meta {
    gap: 4px;
    margin-top: 5px;
    font-size: 0.95rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .pill,
  .status-dot {
    font-size: 0.86rem;
  }

  .card-actions {
    gap: 8px;
  }

  .event-card .card-actions,
  .truck-profile .card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-actions button,
  .card-actions a,
  .button-link {
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
    font-size: 0.88rem;
    text-align: center;
    white-space: normal;
  }

  .owner-callout {
    gap: 12px;
    margin-top: 12px;
    padding: 16px;
  }

  .owner-callout .owner-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .owner-callout button {
    width: 100%;
  }

  .dashboard-tabs {
    max-width: 100%;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    border-radius: 18px;
    padding: 6px;
  }

  .dashboard-tabs button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 14px;
    scroll-snap-align: start;
  }

  .owner-metrics,
  .dashboard-grid {
    gap: 10px;
  }

  .owner-metrics div {
    padding: 14px;
  }

  .stacked-form {
    gap: 12px;
    margin-top: 12px;
  }

  .upload-grid label,
  .event-row,
  .profile-schedule-row {
    border-radius: 16px;
    padding: 12px;
  }

  .event-row,
  .profile-schedule-row {
    gap: 10px;
  }

  .event-row > *,
  .profile-schedule-row > *,
  .request-card-main,
  .listing-body {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .row-actions {
    gap: 8px;
  }

  .row-actions button {
    width: 100%;
    min-height: 44px;
  }

  .truck-profile {
    overflow: hidden;
  }

  .profile-media,
  .profile-media > div:first-child,
  #profileMediaContent,
  #profileMediaContent > img,
  .profile-media-stack,
  .profile-cover-image,
  .profile-truck-image {
    width: 100%;
    height: clamp(220px, 62vw, 300px);
    min-height: 0;
    max-height: 300px;
  }

  .profile-media {
    aspect-ratio: 16 / 10;
  }

  .profile-cover-image,
  .profile-truck-image {
    object-fit: cover;
    object-position: center;
  }

  .profile-truck-image.has-cover {
    inset: 12px 12px 76px;
    width: calc(100% - 24px);
    height: calc(100% - 88px);
    min-height: 0;
    border-radius: 16px;
  }

  .profile-avatar {
    left: 14px;
    bottom: 14px;
    width: 60px;
    height: 60px;
    border-radius: 17px;
    font-size: 1rem;
  }

  .profile-details {
    gap: 16px;
    padding: 18px;
  }

  .profile-heading {
    gap: 10px;
  }

  .profile-heading h2 {
    font-size: clamp(1.75rem, 8vw, 2.4rem);
    line-height: 1.04;
    overflow-wrap: anywhere;
  }

  .profile-heading .pill {
    justify-self: start;
  }

  .profile-section,
  .profile-schedule {
    gap: 8px;
  }

  .modal {
    align-items: center;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  }

  .modal-card {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 20px;
  }

  .icon-button {
    width: 44px;
    min-height: 44px;
  }

  .beta-notice {
    margin: 14px 0;
    padding: 12px;
  }

  .beta-notice p,
  .site-footer-beta p,
  .legal-section p,
  .legal-section li {
    font-size: 1rem;
  }

  .site-footer {
    width: min(100% - 20px, 1180px);
    margin: 16px auto 0;
    padding: 16px 16px max(28px, calc(18px + env(safe-area-inset-bottom)));
  }

  .legal-links {
    gap: 8px 16px;
  }

  .legal-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .legal-shell {
    width: min(100% - 20px, 920px);
  }

  .legal-header {
    gap: 10px;
    padding: 14px 0;
  }

  .legal-brand img {
    width: 44px;
    height: 44px;
  }

  .legal-back-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .legal-content {
    margin-bottom: 16px;
    padding: 22px 18px;
  }

  .legal-content h1 {
    font-size: clamp(2rem, 10vw, 2.7rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .legal-updated {
    margin-bottom: 22px;
  }

  .legal-section {
    padding-top: 18px;
  }

  .legal-section + .legal-section {
    margin-top: 18px;
  }

  .legal-footer {
    margin-bottom: 0;
    padding: 16px 0 max(30px, calc(18px + env(safe-area-inset-bottom)));
  }

  .toast {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    border-radius: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  main,
  .topbar {
    width: min(100% - 16px, 1180px);
  }

  .splash-view {
    padding-right: 10px;
    padding-left: 10px;
  }

  .splash-copy h1 {
    font-size: clamp(2.3rem, 13vw, 3.35rem);
  }

  .splash-actions,
  .marketplace-header,
  .market-truck-title {
    align-items: stretch;
  }

  .marketplace-header {
    flex-direction: row;
  }

  .market-truck-title {
    flex-direction: column;
    gap: 3px;
  }

  .market-truck-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .market-logo {
    width: 48px;
    height: 48px;
  }

  .status-chip {
    grid-column: 2;
  }

  .event-card {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .listing-logo {
    width: 48px;
    height: 48px;
  }

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

  .profile-media,
  .profile-media > div:first-child,
  #profileMediaContent,
  #profileMediaContent > img,
  .profile-media-stack,
  .profile-cover-image,
  .profile-truck-image {
    height: clamp(210px, 62vw, 270px);
    max-height: 270px;
  }

  .profile-details {
    padding: 16px;
  }

  .modal-card {
    padding: 18px 14px;
  }

  .site-footer,
  .legal-shell {
    width: min(100% - 16px, 920px);
  }

  .legal-content {
    padding: 20px 16px;
  }
}

@media (max-width: 360px) {
  .splash-copy h1 {
    font-size: 2.25rem;
  }

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

  .market-actions,
  .event-card .card-actions,
  .truck-profile .card-actions {
    grid-template-columns: 1fr;
  }

  .profile-media,
  .profile-media > div:first-child,
  #profileMediaContent,
  #profileMediaContent > img,
  .profile-media-stack,
  .profile-cover-image,
  .profile-truck-image {
    height: 210px;
    max-height: 210px;
  }

  .profile-details,
  .legal-content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .legal-links {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Mobile public-profile information architecture. */
@media (max-width: 780px) {
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 68px;
  }

  body.profile-view-active .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 6px 0;
  }

  body.profile-view-active .topbar > div:first-child {
    display: block;
  }

  body.profile-view-active .topbar h1,
  body.profile-view-active .topbar .subheadline {
    display: none;
  }

  body.profile-view-active .topbar .brand-logo-button,
  body.profile-view-active .topbar .brand-logo-button img {
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
  }

  body.profile-view-active .topbar .owner-actions {
    display: flex;
    justify-content: flex-end;
    width: auto;
  }

  body.profile-view-active .topbar .owner-actions button {
    width: auto;
    min-width: 0;
    padding-inline: 14px;
  }

  .profile-view .back-button {
    margin-bottom: 8px;
  }

  .mobile-profile-nav {
    position: sticky;
    top: max(0px, env(safe-area-inset-top));
    z-index: 12;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(8, 14, 11, 0.96);
    padding: 5px;
    box-shadow: var(--shadow);
    backdrop-filter: var(--glass-blur);
  }

  .mobile-profile-nav a {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 44px;
    border-radius: 11px;
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 850;
    text-align: center;
    text-decoration: none;
  }

  .mobile-profile-nav a:hover,
  .mobile-profile-nav a:focus-visible {
    background: rgba(49, 245, 138, 0.14);
    color: var(--primary);
  }

  .mobile-profile-nav a.hidden {
    display: none;
  }

  #profileOverview,
  #profileScheduleSection,
  #profileMenuSection,
  #profileBookSection {
    scroll-margin-top: 68px;
  }

  .profile-media,
  .profile-media > div:first-child,
  #profileMediaContent,
  #profileMediaContent > img,
  .profile-media-stack,
  .profile-cover-image,
  .profile-truck-image {
    height: clamp(170px, 48vw, 210px);
    min-height: 0;
    max-height: 210px;
  }

  .profile-media {
    aspect-ratio: 16 / 8;
  }

  .profile-avatar {
    left: 12px;
    bottom: 12px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
  }

  .profile-details {
    gap: 14px;
    padding: 16px;
  }

  .profile-description {
    display: block;
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.45;
  }

  .mobile-overview-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
  }

  .mobile-profile-section {
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
  }

  .mobile-profile-section.hidden {
    display: none;
  }

  .mobile-profile-section-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
  }

  .mobile-profile-section p {
    font-size: 1rem;
    line-height: 1.4;
  }

  .profile-menu-preview {
    display: block;
    width: 100%;
    min-height: 160px;
    max-height: 220px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #050806;
    padding: 0;
  }

  .profile-menu-preview img {
    display: block;
    width: 100%;
    height: clamp(160px, 50vw, 220px);
    object-fit: contain;
  }

  #profileBookSection > button {
    width: 100%;
    min-height: 44px;
  }

  .profile-details > #profileActions {
    display: grid;
  }

  #profileActions [data-action="request"],
  #profileActions [data-action="menu"] {
    display: none;
  }

  #profileSchedule .profile-schedule-row {
    gap: 6px;
    padding: 10px 12px;
  }

  #profileSchedule .profile-schedule-row p {
    font-size: 1rem;
    line-height: 1.35;
  }
}

@media (max-width: 480px) {
  .profile-media,
  .profile-media > div:first-child,
  #profileMediaContent,
  #profileMediaContent > img,
  .profile-media-stack,
  .profile-cover-image,
  .profile-truck-image {
    height: clamp(160px, 50vw, 200px);
    max-height: 200px;
  }
}

/* Final mobile-polish layer. Keep this last so earlier responsive rules cannot
   reintroduce desktop spacing below the mobile breakpoint. */
@media (max-width: 767px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  main {
    padding: 8px var(--mobile-page-padding) 0;
  }

  .splash-view {
    min-height: 100dvh;
    align-content: center;
    gap: 8px;
    padding: max(8px, env(safe-area-inset-top)) 10px max(18px, env(safe-area-inset-bottom));
  }

  .splash-visual {
    display: none;
  }

  .splash-kicker,
  .eyebrow {
    margin-bottom: 2px;
  }

  .splash-kicker .brand-logo-button,
  .splash-kicker .brand-logo-button img {
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin-bottom: 0;
  }

  .splash-copy h1 {
    max-width: 10ch;
    margin-top: 2px;
    font-size: clamp(1.9rem, 9.4vw, 2.45rem);
    line-height: 0.88;
  }

  .splash-subheadline {
    margin-top: 6px;
    font-size: 1rem;
    line-height: 1.3;
  }

  .splash-actions {
    gap: 7px;
    margin-top: 8px;
  }

  .splash-visual,
  .marketplace-preview {
    max-height: 242px;
  }

  .marketplace-preview {
    gap: 6px;
    border-radius: 16px;
    padding: 8px;
  }

  .marketplace-header {
    gap: 5px;
  }

  .market-truck-card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 7px;
    border-radius: 15px;
    padding: 8px;
  }

  .market-logo {
    width: 48px;
    height: 48px;
  }

  .market-truck-main p {
    margin-top: 2px;
    line-height: 1.22;
  }

  .market-actions {
    gap: 6px;
    margin-top: 6px;
  }

  .panel {
    padding: 10px;
  }

  .filters {
    gap: 8px;
    margin-bottom: 6px;
  }

  .filter-grid {
    gap: 7px;
  }

  .calendar-list {
    gap: 8px;
  }

  .event-card {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .listing-logo {
    width: 50px;
    height: 50px;
  }

  .event-card header,
  .listing-meta {
    gap: 4px;
  }

  .event-card .card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .event-card .card-actions > :first-child {
    grid-column: auto;
  }

  .profile-view > .back-button {
    margin-bottom: 5px;
  }

  .mobile-profile-nav {
    margin-bottom: 8px;
  }

  .profile-media,
  .profile-media > div:first-child,
  #profileMediaContent,
  #profileMediaContent > img,
  .profile-media-stack,
  .profile-cover-image,
  .profile-truck-image,
  .profile-media img {
    height: clamp(160px, 46vw, 185px);
    min-height: 0;
    max-height: 185px;
  }

  .profile-media {
    aspect-ratio: 16 / 8;
    border-radius: 16px;
  }

  .profile-truck-image,
  .profile-cover-image {
    object-fit: cover;
    object-position: center;
  }

  .profile-avatar {
    left: 12px;
    bottom: 10px;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #050706;
  }

  .profile-avatar img {
    width: 100%;
    height: 100%;
    padding: 3px;
    border-radius: 50%;
    object-fit: contain;
    object-position: center;
  }

  .profile-details {
    gap: 10px;
    padding: 10px 0 0;
  }

  .profile-heading,
  .profile-section,
  .mobile-profile-section {
    gap: 8px;
    padding: 12px;
  }

  .profile-heading h2 {
    font-size: clamp(1.65rem, 7.2vw, 2rem);
    line-height: 1;
  }

  .profile-description,
  .mobile-overview-action {
    margin-right: 12px;
    margin-left: 12px;
  }

  #profileSchedule .profile-schedule-row {
    gap: 4px;
    padding: 8px 10px;
  }

  .profile-menu-preview,
  .profile-menu-preview img {
    min-height: 150px;
    max-height: 190px;
  }

  .modal {
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  }

  .modal-card {
    gap: 8px;
    max-height: calc(100dvh - 16px);
    margin: auto 0;
    overflow-y: auto;
    border-radius: 16px;
    padding: 12px 14px max(14px, env(safe-area-inset-bottom));
  }

  .modal-card h2 {
    font-size: 1.5rem;
    line-height: 1.08;
  }

  .modal-card p {
    line-height: 1.35;
  }

  .modal-card .icon-button {
    margin-bottom: 0;
  }

  .beta-notice {
    margin: 8px 0;
    padding: 10px;
  }

  .modal-card label {
    gap: 4px;
  }

  #dashboardTabContent {
    margin-bottom: 8px;
  }

  #dashboardTabContent .event-table {
    gap: 8px;
    margin-top: 8px;
  }

  .dashboard-grid {
    gap: 10px;
  }

  .mobile-dashboard-card,
  .event-row,
  .profile-schedule-row {
    gap: 8px;
    padding: 11px 12px;
  }

  .owner-metrics {
    gap: 7px;
    margin-bottom: 9px;
  }

  .owner-metrics div {
    border-radius: 14px;
    padding: 10px 6px;
  }

  button,
  .button-link,
  .card-actions a,
  input,
  select {
    min-height: 44px;
  }

  .view,
  .site-footer {
    padding-bottom: calc(var(--mobile-nav-height) + 24px + env(safe-area-inset-bottom));
  }
}
