:root {
  --bg: #000000;
  --bg-header: #080808;
  --panel: #0e0e0e;
  --panel2: #121212;
  --line: #262626;
  --line-strong: #3a3a3a;
  --line-soft: #1c1c1c;
  --text: #ffffff;
  --muted: #8f8f8f;
  --gold: #ffffff;
  --gold-bright: #ffffff;
  --gold-ink: #000000;
  --neon: #ffffff;
  --neon-dim: #8f8f8f;
  --mine: oklch(0.80 0.17 150);
  --other: oklch(0.72 0.19 300);
  --cream: #e6e6e6;
  --available: #ffffff;
  --reserved: oklch(0.72 0.19 300);
  --listed: oklch(0.72 0.20 25);
  --danger-bg: #141414;
  --danger-text: oklch(0.72 0.20 25);
  --tap: 50px;
  --radius: 2px;
  --font: "Manrope", system-ui, sans-serif;
  --font-display: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body { min-height: 100dvh; }

body.app {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: calc(16px + env(safe-area-inset-top)) 16px 13px;
  background: var(--bg-header);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: inset 0 -1px 0 var(--line);
}

body.app .topbar {
  position: relative;
  flex-shrink: 0;
  top: auto;
}

.topbar-logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
}

.topbar-logo img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

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

.topbar-name {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text);
  line-height: 1.15;
  text-transform: uppercase;
}

.topbar-me {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px 0 6px;
  border-radius: var(--radius);
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}

.topbar-initial {
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #000000;
  font-size: 11px;
  font-weight: 800;
}

.brand-logo {
  display: block;
  height: 104px;
  width: 104px;
  object-fit: contain;
}

.brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.36em;
  color: var(--muted);
  text-transform: uppercase;
}

.brand span {
  color: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.muted { color: var(--muted); font-size: 13px; }

.center {
  text-align: center;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.center span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.ghost, .back {
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 10px;
  font-weight: 700;
  min-height: var(--tap);
  min-width: var(--tap);
}

.back { font-size: 32px; line-height: 1; }

.page {
  padding: 22px 16px calc(90px + env(safe-area-inset-bottom));
  max-width: 620px;
  margin: auto;
}

body.app .page {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 28px;
}

.page-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
}

h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  margin: 6px 0 22px;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-transform: uppercase;
}

.map-page h1 {
  margin: 0;
  font-size: 24px;
}

.page-sub {
  margin: -14px 0 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.event-date-line {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.card-list { display: grid; gap: 12px; }

.card-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}

.card {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 72px;
  text-align: left;
}

.booking-group.live .card {
  border-color: var(--line-strong);
  background: linear-gradient(160deg, #131313 0%, #121212 100%);
}

.booking-group.past .card,
.booking-group.past .card-body strong {
  opacity: 0.9;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.card-body strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--cream);
}

.card-body span,
.card-body small {
  color: var(--muted);
  font-size: 13px;
}

.card-body small { font-size: 12px; }

.card-go {
  font-size: 24px;
  color: var(--text);
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
}

.card-media { flex-shrink: 0; }

.event-date {
  width: 50px;
  min-height: 50px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  background: #000000;
  color: var(--text);
  border: 1px solid var(--line-strong);
  line-height: 1.05;
}

.event-date b {
  font-size: 18px;
  font-weight: 800;
}

.event-date span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: inherit;
}

.event-date.is-today,
.booking-group.live .event-date {
  width: 58px;
  min-height: 58px;
  color: var(--mine);
  border-color: var(--mine);
}

.event-date b { font-size: 17px; font-weight: 800; }
.booking-group.live .event-date b { font-size: 20px; }

.date-label { position: relative; }

.date-field {
  width: 100%;
  text-align: left;
  background: #000000;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 13px;
  min-height: var(--tap);
  font-weight: 700;
}

.date-field:focus,
.date-field[aria-expanded="true"] {
  border-color: var(--line-strong);
}

.cal-pop {
  margin-top: 8px;
  background: var(--panel2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px 12px 12px;
  box-shadow: 0 12px 32px #00000088;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cal-head strong {
  color: var(--gold);
  font-size: 15px;
  text-transform: capitalize;
}

.cal-nav {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--panel);
  color: var(--gold);
  font-size: 24px;
  line-height: 1;
}

.cal-week,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.cal-week {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.cal-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  font-weight: 700;
  min-height: 38px;
}

.cal-day.out { color: #5c564c; }

.cal-day.today {
  box-shadow: inset 0 0 0 1px var(--gold);
  color: var(--gold);
}

.cal-day.selected {
  background: #ffffff;
  color: #000000;
  box-shadow: none;
}

.cal-day:active { transform: scale(0.96); }

.bottom-link {
  display: block;
  text-align: center;
  margin-top: 24px;
  color: var(--gold);
  font-weight: 700;
  min-height: var(--tap);
  padding-top: 12px;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 12%, #1a1a1a 0%, transparent 60%),
    #000000;
}

.login-card {
  width: min(100%, 420px);
  background: #0e0e0e;
  border: 1px solid #2e2e2e;
  border-radius: var(--radius);
  padding: 34px 24px 28px;
}

.login-card .brand { margin-top: 16px; }

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.36em;
  margin: 0 0 30px;
}

.login-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.login-foot a {
  font-weight: 800;
  color: var(--text);
}

.login-card form, .reserve-form { display: grid; gap: 14px; }

label {
  display: grid;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

input, textarea, select {
  width: 100%;
  background: #000000;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 13px;
  outline: none;
  min-height: var(--tap);
  font-size: 16px;
  font-weight: 600;
}

textarea { min-height: 84px; resize: vertical; }

input:disabled {
  color: var(--muted);
  opacity: 0.8;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--line-strong);
}

.primary {
  border: 0;
  border-radius: var(--radius);
  padding: 15px;
  min-height: 54px;
  background: #ffffff;
  color: #000000;
  font-weight: 800;
  font-size: 16px;
}

.primary:disabled { opacity: 0.6; }

.list-save-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 15px;
  min-height: 52px;
  background: var(--panel2);
  color: var(--text);
  font-weight: 800;
}

.demo { font-size: 11px; color: var(--muted); text-align: center; }

.error {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--danger-bg);
  color: var(--danger-text);
  font-size: 12px;
  margin-bottom: 12px;
}

.hidden { display: none !important; }

.map-page .legend,
.map-page .floor-tabs,
.map-page .floor-maps {
  padding-left: 0;
  padding-right: 0;
}

.map-page .table-list {
  padding: 0;
  max-width: none;
}

.floor-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px 12px;
}

.floor-tab {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel2);
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
}

.floor-tab.active {
  color: #000000;
  background: #ffffff;
  border-color: #ffffff;
}

.floor-maps { padding: 0 16px 16px; }

.floor-map {
  margin: 0;
  background: #0b0b0b;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

.floor-map-hint {
  margin: 10px 2px 0;
  font-size: 11px;
  font-weight: 700;
  color: #6e6e6e;
}

.map-placeholder {
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px 16px;
  text-align: center;
}

.map-placeholder span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e6e6e6;
}

.map-placeholder small {
  font-size: 12px;
  font-weight: 700;
  color: #6e6e6e;
}

.map-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.live-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--mine);
  white-space: nowrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel2);
}

.stat-card b {
  display: block;
  font-size: 24px;
  color: var(--text);
}

.stat-card b.mine { color: var(--mine); }

.stat-card span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.floor-map img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.legend {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  padding: 14px 16px 12px;
  overflow-x: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--cream);
}

.legend span {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  background: #0b0b0b;
  border: 1px solid var(--line);
  border-radius: 1px;
  padding: 7px 11px;
}

.dot {
  width: 14px;
  height: 9px;
  border-radius: 0;
  display: inline-block;
  background: var(--state);
}

.dot.available { background: #000; border: 1px solid #fff; }
.dot.mine { background: var(--mine); }
.dot.reserved { background: #1a1a1a; border: 1px solid var(--other); }
.dot.listed { background: var(--listed); }

.available { --state: var(--available); }
.reserved { --state: var(--reserved); }
.mine { --state: var(--mine); }
.listed { --state: var(--listed); }

.table-list {
  padding: 0 14px calc(96px + env(safe-area-inset-bottom));
  display: grid;
  gap: 22px;
  max-width: 720px;
  margin: auto;
}

body.app .table-list {
  padding-bottom: 8px;
}

.table-section {
  background: #0b0b0b;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.table-section h2 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-section h2 small {
  color: #6e6e6e;
  letter-spacing: 0;
  font-size: 11px;
  text-transform: none;
  font-weight: 700;
}

.table-section.prive,
.table-section.premium,
.table-section.omaggio {
  box-shadow: none;
  border-color: var(--line);
}

.omaggio-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel2);
  color: var(--text);
  text-align: left;
}

.omaggio-count {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #000000;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.omaggio-card-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.omaggio-card-text strong {
  color: var(--text);
  font-size: 15px;
}

.omaggio-card-text small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.omaggio-add { margin-bottom: 16px; }
.omaggio-list { margin-top: 4px; }

.table-grid {
  display: grid;
  gap: 8px;
}

.table-btn {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left: 3px solid var(--state, var(--available));
  background: #0b0b0b;
  color: var(--text);
  font-weight: 800;
  text-align: left;
  position: relative;
}

.table-btn.available { --state: var(--available); }
.table-btn.reserved { --state: var(--reserved); background: #0b0b0b; }
.table-btn.mine { --state: var(--mine); background: #161616; }

.table-btn:active { transform: none; }

.table-btn .num {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  border: 1px solid var(--state, var(--available));
  color: var(--state, var(--available));
  background: #000000;
}

.table-btn.mine .num {
  background: var(--mine);
  color: #000000;
}

.table-btn .who,
.table-btn-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
  text-align: left;
}

.table-btn-copy b {
  font-size: 14px;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-btn-copy span,
.table-btn .who {
  font-size: 11px;
  font-weight: 700;
  color: #6e6e6e;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-btn.reserved .table-btn-copy span,
.table-btn.mine .table-btn-copy span {
  color: var(--state);
}

.list-badge {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: var(--radius);
  background: #141414;
  border: 1px solid var(--listed);
  font-size: 10px;
  font-weight: 800;
  color: var(--listed);
}

.guest-list-read {
  width: 100%;
  margin-top: 16px;
  text-align: left;
}

.guest-list-read span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #e23d4a;
  margin-bottom: 8px;
}

.guest-list-read ol {
  margin: 0;
  padding-left: 20px;
  color: var(--cream);
  font-size: 14px;
  line-height: 1.5;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: #000000b8;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}

.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: #0e0e0e;
  border-top: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 12px 18px calc(22px + env(safe-area-inset-bottom));
  max-height: 92dvh;
  overflow: auto;
  transform: translateY(105%);
  transition: 0.25s;
}

.sheet.open { transform: none; }

.menu-layer {
  position: fixed !important;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  pointer-events: auto;
}

.menu-layer[hidden] {
  display: none !important;
}

.menu-layer .sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 1;
  pointer-events: auto;
  border: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000000b8;
}

.menu-layer .menu-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  transform: none !important;
  pointer-events: auto;
  max-height: 92dvh;
}

.menu-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.menu-list .ghost-btn { margin-top: 6px; }

.handle {
  width: 42px;
  height: 4px;
  border-radius: 4px;
  background: var(--line-strong);
  margin: 0 auto 14px;
}

.close {
  position: absolute;
  right: 18px;
  top: 22px;
  border: 0;
  background: #1a1a1a;
  color: #bdbdbd;
  border-radius: var(--radius);
  width: 44px;
  height: 44px;
  font-size: 22px;
}

.sheet h2 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: left;
}

.sheet h2::after { display: none; }

.sheet-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--text);
  text-transform: uppercase;
}

.sheet-kicker.mine { color: var(--mine); }
.sheet-kicker.other { color: var(--other); }

.sheet .ghost-btn { margin-top: 12px; }

.menu-sheet .menu-link {
  min-height: 56px;
  padding: 0 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b0b0b;
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin: 0 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 800;
  background: var(--panel2);
}

.list-cta.hidden { display: none !important; }

.list-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  padding: 16px 18px;
  min-height: 80px;
  border-radius: var(--radius);
  border: 1px solid var(--neon);
  background: color-mix(in srgb, var(--neon) 18%, var(--panel));
  box-shadow: 0 0 24px color-mix(in srgb, var(--neon) 32%, transparent);
  color: var(--neon);
}

.list-banner-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--neon);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 14px color-mix(in srgb, var(--neon) 55%, transparent);
}

.list-banner-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.list-banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.list-banner-text strong {
  font-size: 17px;
  color: #fff;
}

.list-banner-text small {
  color: color-mix(in srgb, var(--neon) 75%, #fff);
  font-size: 12px;
  font-weight: 700;
}

.list-banner .card-go { color: var(--neon); }

.name-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.name-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}

.name-toggle-form { display: flex; min-width: 0; }

.name-toggle {
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #0b0b0b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
  text-align: left;
}

.name-toggle > span:first-child {
  display: grid;
  gap: 3px;
}

.name-toggle strong { font-size: 15px; }

.name-toggle span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.name-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  border: 1px solid currentColor;
}

.name-item.out .name-toggle {
  border: 1px solid var(--line);
  border-left: 3px solid #ffffff;
  color: #ffffff;
  background: #0b0b0b;
}

.name-item.in .name-toggle {
  border: 1px solid var(--line);
  border-left: 3px solid var(--mine);
  color: var(--mine);
  background: #161616;
}

.name-item.in .name-mark {
  background: var(--mine);
  color: #000000;
  border-color: var(--mine);
}

.name-item .booking-delete {
  min-width: 52px;
  min-height: 60px;
  height: auto;
  padding: 0;
  font-size: 18px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fancy-select { position: relative; }

.occupied-client {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.select-field {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  background: #000000;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 13px;
  min-height: var(--tap);
  font-size: 14px;
  font-weight: 700;
}

.select-option.is-selected {
  background: #ffffff;
  color: #000000;
  box-shadow: none;
}

.select-field:focus,
.select-field[aria-expanded="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent);
}

.select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-caret {
  color: var(--gold);
  font-size: 11px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.select-field[aria-expanded="true"] .select-caret { transform: rotate(180deg); }

.select-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 26;
  min-width: 100%;
  width: max(100%, 220px);
  background: var(--panel2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: 0 16px 36px #00000099;
}

.select-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--cream);
  font-weight: 700;
  text-align: left;
}

.select-option::before {
  content: "";
  width: 16px;
  flex-shrink: 0;
  font-size: 13px;
  color: #fff;
}

.select-option:active { background: var(--panel); }

.select-option.is-selected {
  background: #ffffff;
  color: #000000;
  box-shadow: none;
}

.select-option.is-selected::before { content: "✓"; }

.occupied-info {
  padding: 16px 16px 14px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.occupied-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.occupied-hero .profile-avatar {
  width: 72px;
  height: 72px;
  margin: 0 0 10px;
  font-size: 36px;
}

.occupied-user {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--cream);
}

.occupied-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin: 0;
}

.occupied-facts dt {
  margin: 0 0 3px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 800;
}

.occupied-facts dd {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1.35;
  word-break: break-word;
}

.occupied-facts .occupied-name,
.occupied-facts .occupied-notes {
  grid-column: 1 / -1;
}

.occupied-facts .occupied-notes dd {
  font-weight: 500;
  color: var(--text);
  white-space: pre-wrap;
}

.booking-delete-form { display: flex; }

.booking-delete {
  height: 100%;
  min-height: 72px;
  padding: 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #0a0a0a;
  color: #6e6e6e;
  font-weight: 800;
  font-size: 11px;
}

.booking-group { margin-bottom: 24px; --accent: var(--muted); }
.booking-group.live { --accent: var(--mine); }
.booking-group.recent { --accent: var(--muted); }
.booking-group.past { --accent: var(--muted); opacity: 0.92; }

.booking-group h2 {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.booking-group h2 small {
  letter-spacing: 0;
  text-transform: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.booking-number {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--mine);
  color: #000000;
  border: 1px solid var(--mine);
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.booking-group.past .booking-number {
  background: #000;
  color: var(--muted);
  border-color: var(--line-strong);
}

.booking-hero {
  margin-top: 8px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, #131313 0%, #0d0d0d 100%);
  text-align: center;
}

.back-page {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 8px;
  padding: 0;
}

.booking-number-lg {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  font-size: 24px;
  background: #000;
  color: #fff;
  border: 2px solid #fff;
}


.bottombar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: #080808;
  border-top: 1px solid var(--line-soft);
  padding: 9px 6px 12px;
  padding-bottom: calc(12px + min(10px, env(safe-area-inset-bottom, 0px)));
}

body.app .bottombar {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  flex-shrink: 0;
}

.bottombar.super { grid-template-columns: repeat(4, 1fr); }
.bottombar.super .bottombar-item { font-size: 10px; }

.bottombar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 46px;
  border: 0;
  background: transparent;
  color: #5c5c5c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.bottombar-item svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottombar-item.active {
  color: #ffffff;
}

.bottombar-item.active svg { filter: none; }

.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  margin-bottom: 20px;
}

.profile-user {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  font-style: normal;
  color: var(--text);
  text-transform: uppercase;
}

.profile-role {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  margin: 0;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: #000000;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
}

.profile-avatar.emoji {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.pr-avatar {
  width: 42px;
  height: 42px;
  font-size: 15px;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.card.profile-stat {
  display: block;
  min-height: 0;
  text-align: center;
  padding: 16px;
}

.card.profile-stat { text-align: left; background: var(--panel2); }

.profile-stat .cut-line {
  display: block;
  margin-top: 8px;
  color: var(--mine);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.money-chart {
  margin: 0 0 22px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.money-chart {
  background: #0b0b0b;
}

.money-chart h2 {
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
}

.money-chart .muted { margin: 0 0 12px; }

.money-svg {
  display: block;
  width: 100%;
  height: auto;
}

.money-svg .chart-max,
.money-svg .chart-date {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.money-svg .chart-draw { pointer-events: none; }
.money-svg .chart-dot { pointer-events: none; }
.money-svg .chart-hit { fill: transparent; cursor: pointer; }

.chart-tip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--panel2);
  border: 1px solid var(--line);
}

.chart-tip-name {
  color: var(--cream);
  font-size: 15px;
  font-weight: 800;
}

.chart-tip-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chart-tip-row {
  color: var(--mine);
  font-size: 16px;
  font-weight: 800;
}

.chart-tip-row b { font-weight: 800; }

.chart-tip-delta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chart-tip-delta.is-on { color: var(--gold); }

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

.profile-actions .settings-link { margin-bottom: 0; }

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.ranking-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.ranking-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ranking-sub {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ranking-row:first-child { border-top: 0; }

.ranking-pos {
  color: var(--muted);
  font-weight: 800;
  font-size: 11px;
  text-align: center;
}

.ranking-row.top-1 .ranking-pos { color: var(--gold-bright); }
.ranking-row.top-2 .ranking-pos { color: #c8c8d0; }
.ranking-row.top-3 .ranking-pos { color: var(--neon); }

.ranking-avatar {
  font-size: 14px;
  line-height: 1;
  text-align: center;
}

.ranking-name {
  font-weight: 700;
  color: var(--cream);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-meta {
  color: var(--gold);
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
}

.ranking-row.is-me,
.ranking-row.top-1 {
  background: #161616;
  border: 1px solid var(--line-strong);
}

.ranking-row.is-me .ranking-name { color: var(--gold-bright); }

.ranking-empty {
  padding: 14px 12px;
  list-style: none;
}

.profile-stat b {
  display: block;
  color: var(--text);
  font-size: 26px;
  margin-bottom: 4px;
}

.profile-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ok {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: #1a2a18;
  color: #c9e8b8;
  font-size: 12px;
  margin-bottom: 12px;
}

.profile-logout { margin-top: 18px; }

.ghost-btn {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel2);
  color: var(--text);
  font-weight: 800;
}

.ghost-btn.quiet {
  background: transparent;
  border-color: var(--line-soft);
  color: var(--muted);
}

.danger-btn {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--listed);
  border-radius: var(--radius);
  background: #141414;
  color: var(--listed);
  font-weight: 800;
}

a.ghost-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.settings-page h1 { margin-bottom: 14px; }

.settings-block {
  margin-bottom: 14px;
}

.settings-block h2 {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.settings-block .muted,
.settings-rank .muted {
  margin: 0 0 12px;
  font-size: 12px;
}

.percent-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.percent-input input { flex: 1; }

.percent-input span {
  color: var(--gold);
  font-weight: 800;
  font-size: 18px;
  min-width: 1.2em;
}

.percent-preview {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--panel2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
}

.settings-rank h2 {
  margin: 8px 0 4px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.price-tag {
  color: var(--gold);
  font-weight: 800;
  flex-shrink: 0;
}

.inline-link { color: var(--text); font-weight: 800; font-size: 12px; }

.public-body {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, #161616 0%, transparent 62%),
    #000000;
  scroll-behavior: smooth;
}

.public-header {
  padding: calc(28px + env(safe-area-inset-top)) 20px 8px;
  text-align: center;
}

.public-header .brand-logo {
  height: 88px;
  width: 88px;
  margin: 0 auto;
}

.public-header .eyebrow {
  margin: 18px 0 8px;
  letter-spacing: 0.38em;
  font-size: 10px;
}

.public-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.public-title::after {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  margin: 16px auto 0;
  background: var(--line-strong);
}

.carta-nav {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 20px;
  background: #000;
  border-bottom: 1px solid var(--line-soft);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.carta-nav::-webkit-scrollbar { display: none; }

.carta-nav a {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0a0a0a;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.carta-nav a.is-active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.public-page { padding: 10px 20px 48px; }

.carta-section {
  margin: 0 0 32px;
  scroll-margin-top: 62px;
}

.carta-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.carta-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text);
}

.carta-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.carta-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.carta-row:last-child { border-bottom: 0; }

.carta-row strong {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
}

.carta-row .price-tag {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.carta-row.is-special strong { color: var(--text); }

.public-back { margin-top: 4px; }

.create-panel {
  display: grid;
  gap: 10px;
  margin: 16px 0 22px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: #0a0a0a;
}

.counts-bar {
  display: flex;
  gap: 10px;
  padding: 14px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #0b0b0b;
}

.counts-bar > div { flex: 1; text-align: center; }
.counts-bar b { display: block; font-size: 22px; }
.counts-bar b.mine { color: var(--mine); }
.counts-bar span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.counts-bar .split { width: 1px; flex: 0 0 1px; background: var(--line-soft); }

.percent-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.percent-stepper button {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel2);
  color: var(--text);
  font-weight: 800;
  font-size: 20px;
}

.percent-stepper b {
  flex: 1;
  text-align: center;
  font-size: 30px;
  color: var(--text);
}

.inline-add {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px;
  margin-bottom: 16px;
}

.inline-add.omaggio {
  grid-template-columns: minmax(0,1fr) 92px auto;
}

.add-mini {
  min-height: 50px;
  min-width: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  background: #fff;
  color: #000;
  font-weight: 800;
  font-size: 14px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-size: 14px;
  font-weight: 700;
  min-height: var(--tap);
}

.check-row input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  accent-color: var(--neon);
}

.special-badge {
  flex-shrink: 0;
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-ink);
  background: var(--neon);
  border-radius: 999px;
  padding: 3px 7px;
}

.price-tag.special { color: var(--neon); }

.price-dots {
  flex: 1;
  border-bottom: 1px dotted var(--line-strong);
  min-width: 16px;
}
