:root {
  color-scheme: light;
  --bg: #ecebea;
  --surface: #ffffff;
  --text: #171717;
  --muted: #696969;
  --border: #d7d5d2;
  --primary: #eb7305;
  --primary-dark: #c96000;
  --brand-red: #9d1630;
  --ink: #050505;
  --ink-soft: #202020;
  --orange-pale: #fff0df;
  --success: #147d4f;
  --danger: #b42318;
  --warning: #9a6700;
  --vip: #fff0d7;
  --normal: #f7f7f6;
  font-family: "Montserrat", "Arial Narrow", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { font-family: "Montserrat", "Arial Narrow", Arial, sans-serif; }
body {
  position: relative;
  margin: 0;
  background-color: #a96436;
  background-image: var(--custom-background-image), repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 2px, transparent 2px 58px), linear-gradient(115deg, #d28b4b, #8d4c2c 48%, #bd703d);
  background-size: var(--custom-background-size), auto, auto;
  background-position: var(--custom-background-position), 0 0, 0 0;
  background-repeat: var(--custom-background-repeat), repeat, repeat;
  background-attachment: var(--custom-background-attachment), fixed, fixed;
  color: var(--text);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .28;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(93, 45, 20, .5) calc(50% - 1px), rgba(93, 45, 20, .5) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 50%, transparent 0 105px, rgba(93, 45, 20, .42) 106px 108px, transparent 109px),
    radial-gradient(ellipse at 8% 50%, transparent 0 170px, rgba(93, 45, 20, .38) 171px 173px, transparent 174px),
    radial-gradient(ellipse at 92% 50%, transparent 0 170px, rgba(93, 45, 20, .38) 171px 173px, transparent 174px),
    linear-gradient(90deg, transparent 14%, rgba(93, 45, 20, .35) 14% 14.2%, transparent 14.2% 85.8%, rgba(93, 45, 20, .35) 85.8% 86%, transparent 86%);
}
body.has-custom-background {
  background-image: var(--custom-background-image);
  background-size: var(--custom-background-size);
  background-position: var(--custom-background-position);
  background-repeat: var(--custom-background-repeat);
  background-attachment: var(--custom-background-attachment);
}
body.has-custom-background::before { display: none; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, .button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: max(.8rem, env(safe-area-inset-top)) max(1rem, calc((100vw - 1180px) / 2), env(safe-area-inset-right)) .8rem max(1rem, calc((100vw - 1180px) / 2), env(safe-area-inset-left));
  border-bottom: 1px solid #353535;
  background: var(--ink);
  color: white;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; color: white; font-weight: 800; letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 2.9rem; height: 2.9rem; object-fit: contain; }
.brand-copy { display: grid; line-height: .83; }
.brand-copy strong { font-size: 1.3rem; letter-spacing: .08em; }
.brand-copy small { margin-top: .25rem; color: var(--primary); font-size: .55rem; letter-spacing: .35em; }
.brand-service { margin-left: .45rem; padding-left: .7rem; border-left: 1px solid #555; color: #c9c9c9; font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; }
.topbar-navigation { display: flex; align-items: center; gap: 1.25rem; }
.topbar-navigation > a { color: #f2f2f2; font-size: .9rem; font-weight: 650; }
.topbar-navigation > a[aria-current="page"] { color: var(--primary); }
.profile-menu { position: relative; }
.profile-button { width: 2.75rem; height: 2.75rem; padding: 0; border-radius: 50%; color: var(--ink); background: var(--primary); font-weight: 800; }
.profile-menu-panel { position: absolute; top: calc(100% + .65rem); right: 0; z-index: 6; display: grid; gap: .15rem; min-width: 11rem; padding: .4rem; border: 1px solid #353535; background: white; box-shadow: 0 10px 28px rgba(0, 0, 0, .22); }
.profile-menu-panel a, .profile-logout { width: 100%; min-height: 2.75rem; justify-content: flex-start; padding: .65rem .75rem; color: var(--text); background: transparent; font-size: .85rem; font-weight: 700; }
.profile-menu-panel a:hover, .profile-logout:hover { background: #f2f1ee; }
.profile-menu-panel a[aria-current="page"] { color: var(--primary-dark); }
.profile-menu-panel form { margin: 0; }
.mobile-nav { display: none; }
.mobile-nav-more { position: relative; display: grid; }
.mobile-more-menu { position: absolute; right: 0; bottom: calc(100% + .5rem); z-index: 6; display: grid; width: min(14rem, calc(100vw - 1.5rem)); padding: .35rem; border: 1px solid var(--border); background: white; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.mobile-more-menu a { display: flex; align-items: center; min-height: 2.75rem; padding: .6rem .7rem; color: var(--text); font-size: .82rem; font-weight: 700; }
.mobile-more-menu a:hover { background: #f2f1ee; }
.mobile-more-menu a[aria-current="page"] { color: var(--primary-dark); background: var(--orange-pale); }
.page { position: relative; z-index: 1; width: min(1180px, calc(100% - 2rem)); margin: 2.5rem auto 4rem; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; padding-left: .9rem; border-left: 6px solid var(--brand-red); }
.page-heading .eyebrow { color: white; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.05; font-family: "Montserrat", "Arial Narrow", Arial, sans-serif; font-weight: 900; text-transform: uppercase; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; margin-top: 1rem; }
.eyebrow { margin: 0 0 .3rem; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .14em; font-size: .68rem; font-weight: 900; }
.season-eyebrow { color: white; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

.panel, .game-card, .auth-card, .empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .07);
}
.panel { padding: 1.25rem; margin-bottom: 1.25rem; }
.panel-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.parking-ticket-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1.1rem; }
.parking-ticket-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 9.5rem; min-height: 15rem; overflow: hidden; border: 1px solid #3b3b3b; border-radius: 7px; color: white; background: linear-gradient(135deg, #202020, #090909); box-shadow: 0 12px 28px rgba(0, 0, 0, .22); }
.parking-ticket-card::before { position: absolute; top: 0; bottom: 0; left: 0; width: .55rem; content: ""; background: var(--primary); }
.parking-ticket-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 1rem; min-width: 0; padding: 1.15rem 1rem 1.1rem 1.55rem; }
.parking-ticket-copy h2 { margin: 0; overflow-wrap: anywhere; font-size: clamp(1.25rem, 2vw, 1.7rem); }
.parking-ticket-copy p { margin: .45rem 0 0; color: #c9c9c9; font-size: .8rem; line-height: 1.45; }
.parking-ticket-mark { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .5rem; border: 1px solid #555; border-radius: 3px; color: #e8e8e8; font-size: .63rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.parking-ticket-qr-wrap { display: grid; align-content: center; justify-items: center; gap: .4rem; padding: .7rem; color: #e9e9e9; background: #f5f3ef; }
.parking-ticket-qr { display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: .4rem; border: 0; border-radius: 4px; background: white; }
.parking-ticket-qr img { display: block; width: 100%; height: 100%; object-fit: contain; }
.parking-ticket-qr-wrap small { color: #555; font-size: .62rem; font-weight: 800; text-align: center; }
.parking-ticket-qr-empty { display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: .5rem; border: 1px dashed #aaa; border-radius: 4px; color: #555; font-size: .72rem; font-weight: 750; text-align: center; }
.share-action { position: relative; flex: 0 0 44px; display: grid; place-items: center; width: 44px; min-width: 44px; min-height: 44px; padding: .55rem; border: 1px solid var(--band-line); border-radius: 0; color: #383532; background: white; }
.share-action:hover, .share-action:focus-visible { border-color: var(--primary); color: var(--primary-dark); }
.share-action svg { display: block; width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.parking-ticket-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; margin-top: auto; }
.parking-share-action { flex: 0 0 44px; margin-left: auto; border-color: #625b53; border-radius: 4px; color: white; background: #292725; }
.parking-share-action:hover, .parking-share-action:focus-visible { border-color: var(--primary); color: var(--primary); }
.parking-ticket-admin-list { display: grid; gap: .85rem; margin-top: 1rem; }
.parking-ticket-admin-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: 1rem; border: 1px solid var(--border); background: #fbfaf8; }
.parking-ticket-admin-preview { display: grid; align-content: start; gap: .45rem; }
.parking-ticket-admin-preview .qr-admin-preview { width: 100%; }
.parking-ticket-admin-preview .qr-admin-preview img { width: 100%; height: 6.3rem; object-fit: contain; }
.parking-ticket-admin-preview-empty { display: grid; place-items: center; min-height: 6.3rem; border: 1px dashed var(--border); color: var(--muted); font-size: .7rem; text-align: center; }
.parking-ticket-edit-form { display: grid; grid-template-columns: minmax(11rem, .8fr) minmax(12rem, 1fr) auto auto; align-items: end; gap: .65rem; }
.parking-ticket-edit-form .file-label { min-width: 0; }
.parking-ticket-admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .7rem; }
.parking-ticket-admin-actions form { margin: 0; }
.parking-ticket-admin-actions .inline-form { gap: .3rem; }
.parking-ticket-create { display: grid; grid-template-columns: minmax(12rem, 1fr) auto; align-items: end; gap: .65rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.parking-ticket-create h3, .parking-ticket-create p { grid-column: 1 / -1; margin: 0; }
.parking-ticket-create h3 { margin-top: .25rem; }
.parking-ticket-empty { margin: 1rem 0 0; padding: 1rem; border: 1px dashed var(--border); color: var(--muted); text-align: center; }
.auth-card { width: min(420px, 100%); margin: 8vh auto; padding: 2rem; }
.auth-divider { display: flex; align-items: center; gap: .8rem; margin: 1rem 0; color: var(--muted); font-size: .8rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.passkey-button { width: 100%; }
.passkey-status { min-height: 1.2em; margin-bottom: 0; }
.account-security { display: grid; gap: 1.2rem; }
.passkey-create { max-width: 420px; }
.passkey-list { display: grid; border-top: 1px solid var(--border); }
.passkey-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.passkey-row > div { display: grid; gap: .2rem; min-width: 0; }
.empty-state { padding: 2rem; text-align: center; }
.panel-summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; list-style: none; cursor: pointer; }
.panel-summary::-webkit-details-marker { display: none; }
.panel-summary > :first-child { min-width: 0; }
.panel-summary-actions { display: inline-flex; align-items: center; gap: .8rem; flex: 0 0 auto; }
.panel-summary .game-chevron { flex: 0 0 auto; color: var(--ink); }
.stack { display: grid; gap: .9rem; }
.compact { gap: .65rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; align-items: end; }
label { display: grid; gap: .3rem; color: var(--muted); font-size: .85rem; font-weight: 650; }
input, select {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .65rem .7rem;
  background: white;
  color: var(--text);
}
input:focus, select:focus { outline: 3px solid rgba(239, 125, 0, .2); border-color: var(--primary); }
button, .button {
  border: 0;
  border-radius: 3px;
  padding: .62rem .78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  text-decoration: none;
}
button:hover, .button:hover { text-decoration: none; filter: brightness(.97); }
.primary { color: var(--ink); background: var(--primary); font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.primary:hover { background: var(--primary-dark); }
.secondary { color: var(--text); background: #e9e8e6; font-weight: 750; }
.danger-button { color: white; background: var(--danger); }
.link-button { padding: 0; color: #f2f2f2; background: transparent; }
.inline-form { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.flash { border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; border: 1px solid; }
.flash.success { color: #075e3b; background: #e6f6ee; border-color: #a9dec4; }
.flash.error { color: #8d1d13; background: #fff0ee; border-color: #f4b9b2; }
.flash.info { color: #194a73; background: #e9f3fc; border-color: #b7d5ef; }
.reservation-banner {
  position: fixed;
  z-index: 30;
  top: calc(4.5rem + env(safe-area-inset-top) + .5rem);
  left: 50%;
  width: max-content;
  max-width: calc(100% - 2rem);
  margin: 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .24);
  transform: translateX(-50%);
}
.stat { display: grid; text-align: right; }
.stat strong { font-size: 1.8rem; }
.stat span { color: var(--muted); font-size: .8rem; }

.game-list { display: grid; gap: 1.2rem; }
.game-card { overflow: hidden; border-top: 5px solid var(--ink); }
.game-card > summary { list-style: none; cursor: pointer; }
.game-card > summary::-webkit-details-marker { display: none; }
.game-card:not([open]) .game-header { border-bottom: 0; }
.game-chevron {
  width: .75rem;
  height: .75rem;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(45deg);
  transition: transform .18s ease;
  color: white;
}
.game-card[open] .game-chevron { transform: rotate(225deg); }
.game-edit-desktop svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.game-edit-mobile, .game-admin-actions { display: none; }
.other-games { margin-top: 1.2rem; }
.other-games > summary { cursor: pointer; }
.other-games > .game-list { margin-top: 1rem; }
.muted-card { opacity: .72; }
.game-header { padding: 1.1rem 1.25rem; display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); background: linear-gradient(105deg, #fff 0 72%, var(--ink) 72%); }
.game-time { margin: 0; color: var(--muted); }
.game-state { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; text-align: right; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: .22rem .55rem; font-size: .72rem; font-weight: 750; white-space: nowrap; }
.success { color: #075e3b; background: #dff5e9; }
.danger { color: #8d1d13; background: #ffe3df; }
.warning { color: #795100; background: #fff1bd; }
.vip-badge { color: #633300; background: #ffbd69; }
.normal-badge { color: #3e5368; background: #e9eef3; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.ticket-cell { display: flex; flex-direction: column; padding: 1rem; background: var(--normal); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ticket-cell.vip { background: var(--vip); border-top: 3px solid var(--primary); }
.ticket-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ticket-meta { min-height: 2.4em; margin: .45rem 0 .8rem; color: var(--muted); font-size: .8rem; }
.reserve-form { display: grid; flex: 1; gap: .45rem; }
.reserve-form > button { margin-top: auto; }
.reservation { display: grid; flex: 1; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto; gap: .35rem .75rem; align-items: start; }
.reservation-summary { display: grid; gap: .25rem; min-width: 0; }
.reservation-summary-centered { align-self: center; padding-left: 1.5rem; }
.reservation-summary-enhanced { padding-left: 1.5rem; font-size: 1.55rem; line-height: 1.15; }
.reservation-summary-enhanced .small { font-size: 1.05rem; }
.reservation-name-large { font-size: 2.45rem; line-height: 1; }
.reservation-name { overflow-wrap: anywhere; }
.reservation-qr { display: flex; align-items: center; justify-content: center; }
.reservation-actions { grid-column: 1 / -1; grid-row: 3; display: grid; justify-items: center; gap: .55rem; margin-top: .25rem; }
.reservation-actions form { width: 100%; }
.reservation-cancel-button { width: 100%; }
.reserve-form > button,
.reservation-cancel-button { min-height: 2.65rem; }
.reserve-form > button,
.reservation-cancel-button { width: 100%; }
.qr-button { min-width: 132px; }
.qr-symbol, .qr-placeholder { display: inline-grid; place-items: center; font-size: 1.35rem; font-weight: 900; line-height: 1; }
.qr-placeholder-button { width: 3.7rem; height: 3.7rem; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: white; }
.qr-placeholder-button:hover { filter: brightness(.97); }
.qr-placeholder { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; opacity: .85; }
.check-row { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: .45rem; color: var(--text); font-weight: 500; }
.check-row input { width: auto; }
.bulk-games { display: grid; gap: .35rem; max-height: 260px; overflow: auto; padding: .7rem; border: 1px solid var(--border); border-radius: 8px; }
.bulk-selection-actions { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.bulk-selection-actions button:disabled { cursor: not-allowed; opacity: .55; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
th, td { padding: .75rem .5rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.card-table thead th { border-bottom: 0; padding-bottom: .55rem; }
.card-row td {
  background: #fff;
  border-top: 1px solid #c8d4df;
  border-bottom: 0;
  vertical-align: middle;
}
.vip-card-row td { background: #fff8df; }
.normal-card-row td { background: #f5f8fb; }
.archived-card-row td {
  background: #f1f3f5;
  color: #697581;
}
.archived-card-row strong { color: #4b5560; }
.archived-badge {
  color: #586572;
  background: #dfe5ea;
}
.card-row td:first-child { border-left: 1px solid #c8d4df; border-radius: 12px 0 0 0; padding-left: .9rem; }
.card-row td:last-child { border-right: 1px solid #c8d4df; border-radius: 0 12px 0 0; padding-right: .9rem; text-align: right; }
.card-row td:last-child .inline-form { justify-content: flex-end; }
.card-details-row td {
  background: #eef3f7;
  border-left: 1px solid #c8d4df;
  border-right: 1px solid #c8d4df;
  border-bottom: 1px solid #c8d4df;
  border-top: 1px dashed #c8d4df;
  border-radius: 0 0 12px 12px;
}
.archived-details-row td {
  background: #e6eaee;
}
.archived-details-row .card-edit-form,
.archived-details-row .qr-upload-form {
  background: rgba(255, 255, 255, .55);
}
.card-spacer td {
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: var(--surface);
}
.card-row strong { font-size: .98rem; }
.card-edit-form,
.qr-upload-form { background: rgba(255, 255, 255, .72); padding: .65rem; border-radius: 8px; }
.card-edit-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .45rem;
  align-items: center;
  margin-bottom: .7rem;
}
.card-edit-form input,
.card-edit-form select,
.card-edit-form button { align-self: center; }
.card-filter-form { margin: .8rem 0 1rem; }
.card-filter-form label { display: inline; }
.qr-upload-form {
  flex: 1 1 700px;
  width: auto;
  align-items: center;
}
.qr-management-row { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.qr-delete-form { margin-top: 0; }
.qr-admin-preview { display: inline-flex; width: 3.7rem; height: 3.7rem; padding: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: white; }
.qr-admin-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.qr-upload-form .file-label {
  display: flex;
  align-items: center;
  gap: .55rem;
  white-space: nowrap;
}
.new-card-section {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: #fbfcfd;
}
.new-card-section h3 { margin-top: 0; }
.new-card-section .form-grid { margin-top: 1rem; }
.new-card-section .primary { white-space: nowrap; font-size: .78rem; letter-spacing: 0; }
.user-list-section h3 { margin-top: 0; }
.user-create-section .form-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, .8fr) auto; margin-top: 1rem; }
.user-create-section .form-grid input, .user-create-section .form-grid select { min-height: 2.75rem; }
.user-create-section .form-grid > button { min-height: 0; height: 2.75rem; align-self: end; white-space: nowrap; }
.user-list-section { padding-top: .35rem; }
.user-edit-form input { min-width: 145px; }
.user-edit-form select { width: 95px; min-width: 95px; }
.user-table { table-layout: fixed; }
.user-table th:nth-child(1) { width: 12%; }
.user-table th:nth-child(2) { width: 88%; }
.user-table td { vertical-align: middle; }
.user-actions-cell {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  white-space: nowrap;
}
.user-edit-form,
.user-password-form,
.user-status-form,
.user-delete-form {
  flex: 0 0 auto;
  align-items: center;
  max-width: 100%;
}
.user-edit-form { order: 1; }
.user-password-form { order: 2; }
.user-status-form { order: 3; }
.user-delete-form { order: 4; }
.user-password-form input { width: 145px; }
.user-table .user-actions-cell { width: 100%; }
.user-table .user-edit-form { flex: 1 1 18rem; min-width: 0; }
.user-table .user-edit-form input { flex: 1 1 8rem; width: 100%; min-width: 0; }
.user-table .user-password-form { flex: 1 1 14rem; min-width: 0; }
.user-table .user-password-form input { flex: 1 1 7rem; min-width: 0; }
.user-table .user-status-form, .user-table .user-delete-form { flex: 0 0 auto; }
.icon-button {
  width: 2.35rem;
  height: 2.35rem;
  padding: .5rem;
}
.icon-button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}
.user-edit-form input:disabled,
.user-edit-form select:disabled {
  color: var(--text);
  background: #eef2f6;
  cursor: not-allowed;
}
.file-label input { max-width: 210px; }
.list { display: grid; gap: .6rem; }
.compact-list { margin-top: 1rem; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.conflict-row { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem; border: 1px solid #f1d681; border-radius: 10px; background: #fffaf0; }
.conflict-row > div:first-child { display: grid; gap: .25rem; }
.conflict-values { font-size: .82rem; }
.conflict-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.override-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin-top: .9rem; }
.override-form { display: grid; gap: .45rem; padding: .8rem; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfd; }
.game-edit-button { margin-top: 0; }
.game-dialog { width: min(900px, calc(100% - 2rem)); max-height: min(90vh, 760px); padding: 1.25rem; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(16, 42, 67, .25); color: var(--text); }
.share-view .page { width: min(1280px, calc(100% - 2rem)); margin: 2.5rem auto 4rem; }
.share-validity { display: flex; align-items: flex-start; gap: .5rem; margin: .8rem 1rem 1rem; padding: .7rem .75rem; border: 1px solid #e7d1b8; color: #674724; background: #fff8ef; font-size: .75rem; line-height: 1.45; }
.share-validity svg { flex: 0 0 1rem; width: 1rem; height: 1rem; margin-top: .05rem; fill: none; stroke: #b45c04; stroke-width: 1.8; }
.shared-page-heading { margin-bottom: 1rem; padding-left: .9rem; border-left: 6px solid var(--brand-red); color: var(--ink); }
.shared-page-heading .eyebrow { color: var(--ink); }
.shared-page-heading h1 { margin-bottom: 0; }
.shared-parking-page .band-scoreboard, .shared-card-page .band-scoreboard { margin-bottom: 1.25rem; }
.shared-parking-page .parking-ticket-grid, .shared-card-page .parking-ticket-grid { grid-template-columns: minmax(0, 1fr); margin-top: 1rem; }
.shared-parking-page .parking-ticket-card, .shared-card-page .parking-ticket-card { grid-template-columns: minmax(0, 1fr) 9.5rem; }
.shared-parking-copy { gap: 1rem; }
.shared-card-copy { gap: 1rem; }
.shared-card-copy .shared-card-seat { overflow-wrap: anywhere; }
.shared-card-copy .shared-card-status { color: #c9c9c9; font-weight: 750; }
.share-expired { max-width: 680px; margin: 3rem auto; padding: 2rem; text-align: center; }
.share-expired-icon { width: 2.2rem; height: 2.2rem; margin: 0 auto 1rem; fill: none; stroke: var(--primary-dark); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.qr-dialog { width: min(480px, calc(100% - 2rem)); padding: 1.25rem; border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); color: var(--text); }
.qr-dialog .qr-display { margin: 0 auto 1rem; }
.qr-dialog .qr-display img { object-fit: contain; }
.qr-dialog [data-qr-description]:empty { display: none; }
.share-link-dialog { width: min(540px, calc(100% - 2rem)); max-height: min(90dvh, 760px); margin: auto; padding: 1.2rem; overflow-y: auto; border: 1px solid var(--border); border-top: 6px solid var(--primary); border-radius: 4px; color: var(--text); background: white; box-shadow: 0 18px 55px rgba(0, 0, 0, .32); }
.share-link-dialog:not([open]) { display: none; }
.share-link-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.share-link-dialog .dialog-header { margin-bottom: .85rem; }
.share-dialog-copy { margin: 0 0 .7rem; line-height: 1.5; }
.share-dialog-game { margin: 0 0 .85rem; padding: .55rem .65rem; color: #37332e; background: #f4f1ed; font-size: .8rem; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; }
.share-link-label { display: block; margin-bottom: .35rem; font-size: .78rem; font-weight: 750; }
.share-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: .5rem; }
.share-link-input { width: 100%; min-width: 0; min-height: 44px; padding: .6rem .7rem; border: 1px solid var(--border); color: #494949; background: #f7f6f4; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .74rem; text-overflow: ellipsis; }
.share-link-row button { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-width: 9.5rem; min-height: 44px; white-space: nowrap; }
.share-link-row button svg { flex: 0 0 1rem; width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; }
.share-link-row button:disabled { opacity: .58; cursor: wait; }
.share-dialog-status { min-height: 1.2rem; margin: .65rem 0 0; color: var(--success); font-size: .78rem; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; }
.share-dialog-expiry { margin: .55rem 0 0; padding-top: .65rem; border-top: 1px solid #e6e3df; color: #5c554e; font-size: .75rem; line-height: 1.45; }
.game-dialog::backdrop { background: rgba(16, 42, 67, .42); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.dialog-header h2 { margin-bottom: 0; }
.game-edit-form { margin-bottom: 0; }
.game-edit-form > .primary { grid-column: 1 / -1; justify-self: end; width: max-content; white-space: nowrap; font-size: .82rem; }
.game-dialog .override-grid { max-height: 42vh; overflow-y: auto; padding: .2rem; }

.refresh-notice {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: .8rem;
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: .6rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
  transform: translateX(-50%);
}

.qr-page { text-align: center; }
.back-link { display: inline-block; margin-bottom: 1rem; }
.qr-display { width: min(600px, 100%); margin: 1.5rem auto; padding: 1.25rem; background: white; border: 1px solid var(--border); border-radius: 16px; }
.qr-display img { display: block; width: 100%; height: auto; image-rendering: auto; }

@media (max-width: 720px) {
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,
  textarea { font-size: 16px; }
  .reservation-banner { top: calc(58px + env(safe-area-inset-top) + .5rem); }
  .band-reserve-dialog {
    max-height: calc(var(--mobile-viewport-height, 100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 1rem);
    padding: .85rem;
    scroll-padding-block: 1rem 6rem;
  }
  .band-reserve-dialog form { gap: .65rem; }
  .band-reserve-dialog .dialog-header { margin-bottom: .35rem; }
  .band-reserve-dialog input:not([type="hidden"]) { font-size: 16px; }
  .band-reserve-dialog-actions {
    position: sticky;
    bottom: -.85rem;
    z-index: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: .65rem 0 .15rem;
    background: white;
    box-shadow: 0 -6px 10px rgba(0, 0, 0, .08);
  }
  .band-reserve-dialog-actions button { min-width: 0; padding-inline: .35rem; white-space: normal; }
  .qr-dialog[open] {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: max(env(safe-area-inset-top), .5rem) .75rem max(env(safe-area-inset-bottom), .5rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }
  .qr-dialog .dialog-header {
    flex: 0 0 2.75rem;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
  }
  .qr-dialog .dialog-header > div { display: none; }
  .qr-dialog .dialog-header [data-close-dialog] { flex: 0 0 2.75rem; width: 2.75rem; height: 2.75rem; }
  .qr-dialog .qr-display {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .qr-dialog .qr-display img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 4rem);
    height: calc(100vw - 1.5rem);
    max-width: none;
    max-height: none;
    object-fit: contain;
    transform: translate(-50%, -50%) rotate(-90deg);
  }
  .qr-dialog [data-qr-description] { display: none; }
  .qr-page .qr-image-viewer {
    position: relative;
    width: calc(100vw - 1.5rem);
    height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 13rem);
    min-height: 12rem;
    padding: 0;
    overflow: hidden;
  }
  .qr-page .qr-image-viewer img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 13rem);
    height: calc(100vw - 1.5rem);
    max-width: none;
    object-fit: contain;
    transform: translate(-50%, -50%) rotate(-90deg);
  }

  body { background-attachment: scroll; }
  body.has-custom-background { background-image: none; }
  body.login-view { min-height: calc(100lvh + 1px); padding-top: calc(58px + env(safe-area-inset-top)); }
  body.login-view.has-custom-background, body.account-view.has-custom-background { background-image: var(--custom-background-image); background-attachment: scroll; }
  body.login-view.has-custom-background::before, body.account-view.has-custom-background::before { display: none; }
  body.has-custom-background::before {
    display: block;
    opacity: 1;
    background-image: var(--custom-background-image);
    background-size: var(--custom-background-size);
    background-position: var(--custom-background-position);
    background-repeat: var(--custom-background-repeat);
  }
  .topbar { min-height: calc(58px + env(safe-area-inset-top)); align-items: center; gap: .45rem; padding: max(7px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 7px max(12px, env(safe-area-inset-left)); }
  .has-mobile-nav .topbar { position: fixed; top: 0; right: 0; left: 0; }
  .login-view .topbar { position: fixed; top: 0; right: 0; left: 0; }
  body.has-mobile-nav.admin-view { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .brand { display: grid; grid-template-columns: 34px auto; grid-template-rows: 18px 8px; align-content: center; align-items: center; gap: 3px .4rem; min-width: 0; min-height: 34px; }
  .brand-logo { grid-column: 1; grid-row: 1 / 3; width: 34px; height: 34px; }
  .brand-copy { display: contents; }
  .brand-copy strong { grid-column: 2; grid-row: 1; align-self: end; font-size: 18px; line-height: 1; letter-spacing: 0; }
  .brand-copy small { display: none; }
  .brand-service { grid-column: 2; grid-row: 2; align-self: start; display: block; margin: 0; padding: 0; border: 0; color: #e9e9e9; font-size: 8px; font-weight: 700; line-height: 1; letter-spacing: 0; }
  .topbar-navigation { gap: .25rem; margin-left: auto; }
  .topbar-navigation > a { display: none; }
  .profile-button { width: 42px; height: 42px; }
  body.has-mobile-nav { --mobile-safe-bottom: min(env(safe-area-inset-bottom, 0px), 12px); display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; padding-top: calc(58px + env(safe-area-inset-top)); padding-bottom: calc(48px + var(--mobile-safe-bottom)); overscroll-behavior-y: none; }
  html:has(body.dashboard-view) { overscroll-behavior-y: none; }
  body.has-mobile-nav.account-view { min-height: calc(100lvh + 1px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  body.my-cards-view { min-height: calc(100lvh + 1px); }
  body.parking-tickets-view { min-height: calc(100lvh + 1px); }
  body.dashboard-view { min-height: calc(100lvh + 1px); }
  .has-mobile-nav .page { display: flex; flex: 1; flex-direction: column; width: min(100% - 1.25rem, 1180px); margin-top: 1.25rem; margin-bottom: 0; }
  .has-mobile-nav .my-cards-dashboard { display: flex; flex: 1; flex-direction: column; margin-bottom: 0; }
  .has-mobile-nav .my-cards-dashboard > .band-register { flex: 1; }
  .bulk-games { gap: .15rem; padding: .35rem; }
  .bulk-games .check-row { min-height: 44px; gap: .35rem; padding: 0 .2rem; }
  .bulk-games .check-row input[type="checkbox"] { width: 1rem; height: 1rem; min-width: 1rem; min-height: 1rem; padding: 0; }
  .mobile-nav { position: fixed; z-index: 5; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, 1fr); height: calc(48px + var(--mobile-safe-bottom, 0px)); min-height: 0; padding-bottom: var(--mobile-safe-bottom, 0px); border-top: 1px solid #d8d2c9; background: white; }
  .account-view .mobile-nav, .admin-view .mobile-nav { display: none; }
  .mobile-nav > a, .mobile-nav-more > button { display: grid; place-items: center; min-width: 0; min-height: 47px; padding: 0; border: 0; border-radius: 0; color: #6a655f; background: transparent; font-size: 12px; font-weight: 700; }
  .mobile-nav [aria-current="page"], .mobile-nav [aria-expanded="true"], .mobile-nav [data-current="page"] { color: #f47721; }
  .mobile-more-menu { right: .35rem; }
  .page-heading, .game-header, .conflict-row, .panel-heading-row { align-items: flex-start; flex-direction: column; }
  .game-header { position: relative; padding: 1rem; background: white; }
  .game-state { position: absolute; top: 1rem; right: 1rem; justify-content: flex-start; text-align: left; }
  .game-state .badge { display: none; }
  .game-card > summary { min-height: 7.25rem; }
  .game-chevron { color: var(--ink); }
  .game-edit-desktop { display: none; }
  .game-admin-actions { display: flex; justify-content: stretch; padding: .75rem 1rem 1rem; background: var(--normal); }
  .game-edit-mobile { display: inline-flex; }
  .game-admin-actions .button { width: 100%; }
  .game-edit-form > .primary { justify-self: stretch; width: 100%; white-space: normal; }
  .card-grid { grid-template-columns: 1fr; gap: .7rem; }
  .ticket-cell { border-right: 0; }
  .band-ticket-list { display: grid; gap: .7rem; border-top: 0; }
  .band-ticket { border: 1px solid var(--band-line); border-radius: 6px; box-shadow: 0 3px 10px rgba(26, 22, 18, .07); }
  button, .button, input, select { min-height: 2.75rem; }
  .qr-upload-form { align-items: stretch; flex-direction: column; }
  .parking-ticket-grid { grid-template-columns: 1fr; }
  .parking-ticket-card { grid-template-columns: minmax(0, 1fr) 7.5rem; min-height: 12.5rem; }
  .parking-ticket-copy { padding: .9rem .7rem .9rem 1.25rem; }
  .parking-ticket-copy h2 { font-size: 1.2rem; }
  .parking-ticket-copy p { font-size: .72rem; }
  .parking-ticket-qr-wrap { padding: .5rem; }
  .parking-ticket-admin-row { grid-template-columns: 5.25rem minmax(0, 1fr); gap: .65rem; padding: .7rem; }
  .parking-ticket-admin-preview .qr-admin-preview img, .parking-ticket-admin-preview-empty { height: 4.8rem; min-height: 4.8rem; }
  .parking-ticket-edit-form { grid-template-columns: 1fr; }
  .parking-ticket-edit-form .button { width: 100%; }
  .parking-ticket-create { grid-template-columns: 1fr; }
  .parking-ticket-create h3, .parking-ticket-create p { grid-column: auto; }
  .user-list-section .table-wrap { overflow: visible; }
  .user-create-section .form-grid { grid-template-columns: minmax(0, 1fr); }
  .user-create-section .form-grid > button { grid-column: 1 / -1; width: 100%; min-height: 2.75rem; height: auto; white-space: normal; }
  .user-table, .user-table tbody { display: block; width: 100%; }
  .user-table thead { display: none; }
  .user-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem .75rem;
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfd;
  }
  .user-table tr + tr { margin-top: .8rem; }
  .user-table tbody tr::before { content: "Benutzer"; grid-column: 1; grid-row: 1; align-self: center; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
  .user-table td { min-width: 0; padding: 0; border: 0; }
  .user-table td:nth-child(1) { grid-column: 2; grid-row: 1; align-self: center; justify-self: end; }
  .user-actions-cell {
    grid-column: 1 / -1;
    display: grid;
    gap: .65rem;
    width: 100%;
    padding-top: .75rem !important;
    border-top: 1px solid var(--border) !important;
    white-space: normal;
  }
  .user-edit-form,
  .user-password-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(7rem, 35%);
    gap: .5rem;
    width: 100%;
  }
  .user-edit-form input[name="name"] { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .user-edit-form select { width: 100%; min-width: 0; }
  .user-edit-button, .user-password-form .button { width: 100%; min-width: 0; }
  .user-password-form input { width: 100%; min-width: 0; }
  .user-status-form { display: block; width: 100%; }
  .user-status-form button { width: 100%; }
  .user-delete-form { justify-self: end; }
  .card-table, .card-table tbody { display: block; }
  .card-table thead { display: none; }
  .card-table .card-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; padding: .7rem; border: 1px solid #c8d4df; border-radius: 8px 8px 0 0; }
  .card-table .card-row td { display: flex; align-items: center; padding: .35rem; border: 0; background: transparent; }
  .card-table .card-row td:nth-child(4) { grid-column: 1 / -1; color: var(--muted); }
  .card-table .card-row td:nth-child(5) { grid-column: 1; }
  .card-table .card-row td:nth-child(6) { grid-column: 2; }
  .card-table .card-row td:nth-child(7) { grid-column: 3; }
  .card-table .card-details-row { display: block; }
  .card-table .card-details-row > td { display: block; border-radius: 0 0 8px 8px; }
  .card-table .card-spacer { display: block; height: 1rem; }
  .card-table .card-spacer td { display: none; }
  .card-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-edit-form button { grid-column: 1 / -1; }
  .new-card-section, .user-create-section { padding: 1rem; }
}

.dashboard-view:not(.has-custom-background) { background: #f3f1ec; }
.dashboard-view:not(.has-custom-background)::before { display: none; }
.dashboard-view .page { width: min(1300px, calc(100% - 2rem)); margin: 1.5rem auto 3rem; }
.color-bands-dashboard { --band-ink: #171817; --band-orange: #f47721; --band-line: #d4cec5; --band-green: #087b58; background: #fff; box-shadow: 0 12px 36px rgba(0, 0, 0, .12); }
.band-game-navigation { display: grid; grid-template-columns: 46px minmax(0, 1fr) 46px; background: white; border-bottom: 1px solid var(--band-line); }
.color-bands-games { min-width: 0; display: flex; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scroll-snap-type: inline proximity; }
.color-bands-games > button { min-width: 178px; min-height: 98px; flex: 1 0 178px; display: grid; align-content: center; justify-items: start; gap: .2rem; padding: .65rem .85rem; border: 0; border-right: 1px solid var(--band-line); border-radius: 0; color: var(--band-ink); background: white; text-align: left; }
.color-bands-games > button[aria-current="true"] { padding-bottom: calc(.65rem + 5px); background: #fff2e8; box-shadow: inset 0 -5px var(--band-orange); }
.color-bands-games time { color: #ad420b; font-size: .7rem; font-weight: 800; }
.color-bands-games strong { max-width: 100%; overflow: hidden; font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif; font-size: 1.05rem; font-stretch: condensed; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.color-bands-games small { color: #58534e; font-size: .7rem; }
.color-bands-games button > span { font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.color-bands-games .game-tab-spacer { display: none; }
.band-game-arrow { min-height: 98px; position: relative; z-index: 1; border: 0; border-radius: 0; color: var(--band-ink); background: #fff; font-size: 1.5rem; }
.band-game-arrow:first-child { border-right: 1px solid var(--band-line); }
.band-game-arrow:last-child { border-left: 1px solid var(--band-line); }
.band-game-arrow:disabled { cursor: default; opacity: .28; }
.band-game-arrow:not(:disabled):hover { background: #fff2e8; }
.band-game-panel[hidden] { display: none; }
.band-scoreboard { min-height: 132px; display: grid; grid-template-columns: minmax(0, 1fr) 170px minmax(0, 1fr); align-items: center; gap: 1rem; padding: 1.2rem 4%; color: white; background: #171817; }
.band-scoreboard > div:not(.band-scoreboard-time) { min-width: 0; display: grid; gap: .25rem; }
.band-scoreboard > div:last-child { justify-items: end; text-align: right; }
.band-scoreboard > div > span { color: #bab5ad; font-size: .7rem; font-weight: 700; letter-spacing: .04em; }
.band-scoreboard > div > strong { overflow-wrap: anywhere; font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif; font-size: 1.8rem; font-stretch: condensed; line-height: 1; text-transform: uppercase; }
.band-scoreboard-time { display: grid; justify-items: center; gap: .25rem; padding: .7rem; border: 1px solid #635d58; text-align: center; }
.band-scoreboard-time strong { color: #ff994b; font-size: 1.95rem; line-height: 1; }
.band-scoreboard-time span { color: #e5dfd8 !important; font-size: .72rem !important; letter-spacing: 0 !important; }
.band-register { padding: 2rem 4% 3rem; background: #f6f5f1; }
.band-register-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.dashboard-view .band-register { padding: 1rem 4% 3rem; }
.dashboard-view .band-register-heading { align-items: center; margin: 0; padding: 1.2rem 4%; border-bottom: 1px solid var(--band-line); background: white; }
.dashboard-view .band-ticket-list { border-top: 0; }
.band-register-heading h2 { margin: .2rem 0 0; font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif; font-size: 2rem; font-stretch: condensed; }
.band-register-heading h1 { margin: .2rem 0 0; font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif; font-size: 2rem; font-stretch: condensed; }
.my-cards-dashboard { margin-bottom: 1.5rem; }
.my-cards-empty { margin-top: 1rem; }
.expired-cards { margin-top: 1.25rem; }
.expired-cards summary { width: fit-content; min-height: 44px; list-style: none; }
.expired-cards summary::-webkit-details-marker { display: none; }
.expired-cards summary::marker { content: ""; }
.expired-cards summary:focus-visible { outline: 3px solid rgba(239, 125, 0, .45); outline-offset: 2px; }
.expired-cards-hide, .expired-cards[open] .expired-cards-show { display: none; }
.expired-cards[open] .expired-cards-hide { display: inline; }
.expired-cards-list { margin-top: .65rem; }
.band-register-tools { display: flex; align-items: center; gap: .8rem; }
.band-edit-game { min-height: 44px; white-space: nowrap; }
.band-edit-game svg { display: none; width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.band-ticket-list { border-top: 1px solid var(--band-line); }
.band-ticket { min-height: 76px; display: grid; grid-template-columns: 10px minmax(90px, .6fr) minmax(140px, 1.3fr) minmax(100px, .55fr) minmax(190px, .85fr); align-items: center; gap: .85rem; padding: .6rem .8rem; border-bottom: 1px solid var(--band-line); background: white; }
.band-ticket.is-free { box-shadow: inset 6px 0 var(--band-green); }
.band-ticket.is-mine { box-shadow: inset 6px 0 var(--band-orange); }
.band-ticket.is-taken, .band-ticket.is-unavailable { box-shadow: inset 6px 0 #84837f; }
.band-dot { width: 9px; height: 9px; border-radius: 50%; background: #84837f; }
.is-free .band-dot { background: var(--band-green); }
.is-mine .band-dot { background: var(--band-orange); }
.band-ticket-name, .band-ticket-seat { min-width: 0; display: grid; gap: .15rem; }
.band-ticket-name strong { font-family: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif; font-size: 1.15rem; font-stretch: condensed; text-transform: uppercase; }
.band-ticket-name small, .band-ticket-seat small { color: #625c55; font-size: .7rem; overflow-wrap: anywhere; }
.band-ticket-seat span { min-width: 0; overflow-wrap: anywhere; font-size: .8rem; }
.band-ticket-status { min-width: 0; overflow-wrap: anywhere; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.band-ticket-actions { min-width: 0; display: flex; align-items: stretch; gap: .4rem; }
.band-ticket-actions button { min-height: 44px; border-radius: 0; font-size: .76rem; font-weight: 800; }
.band-ticket-actions .button { min-height: 44px; border-radius: 0; font-size: .76rem; font-weight: 800; }
.band-ticket-actions form { min-width: 0; flex: 1; }
.band-qr, .band-reserve { color: #171817; background: var(--band-orange); }
.band-qr { min-width: 60px; }
.band-reserve { width: 100%; }
.band-cancel { width: 100%; border: 1px solid #b88d94; color: #8d1d33; background: white; }
.band-owner { flex: 1; align-self: center; padding: .55rem; color: #47433e; border: 1px solid var(--band-line); font-size: .75rem; text-align: center; overflow-wrap: anywhere; }
.my-cards-list .band-qr { flex: 1; width: 100%; min-width: 0; }
.band-reserve-dialog { position: fixed; top: 50vh; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); width: min(480px, calc(100% - 1.5rem)); height: auto; max-height: calc(100vh - 2rem); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 1.25rem; border: 0; border-top: 6px solid var(--primary); border-radius: 4px; color: var(--text); background: white; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); }
@supports (height: 100dvh) {
  .band-reserve-dialog { top: var(--mobile-viewport-center, 50dvh); max-height: calc(var(--mobile-viewport-height, 100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 2rem); }
}
.band-reserve-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.band-reserve-dialog form { display: grid; gap: 1rem; }
.band-reserve-dialog p[data-reserve-description] { margin: 0; }
.band-reserve-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.band-reserve-dialog-actions button { min-height: 44px; }
.band-cancel-dialog { display: grid; gap: 1rem; }
.band-cancel-dialog:not([open]) { display: none; }
.band-cancel-dialog > p { margin: 0; }

@media (max-width: 900px) {
  .band-ticket { grid-template-columns: 10px minmax(75px, .6fr) minmax(120px, 1fr) minmax(82px, .5fr) minmax(170px, .8fr); gap: .5rem; }
}

@media (max-width: 720px) {
  .dashboard-view .page { width: 100%; margin: 0; }
  .dashboard-view .band-game-navigation { position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 4; height: 73px; }
  .dashboard-view .color-bands-games { height: 72px; }
  .dashboard-view .band-scoreboard { position: sticky; top: calc(58px + env(safe-area-inset-top) + 73px); z-index: 3; height: 82px; min-height: 82px; padding: .45rem .6rem; }
  .dashboard-view .band-scoreboard > div > strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .dashboard-view .band-register-heading { position: sticky; top: calc(58px + env(safe-area-inset-top) + 73px + 82px); z-index: 2; margin: 0; padding: .55rem .75rem; border-bottom: 1px solid var(--band-line); background: white; }
  .dashboard-view .band-register-heading h2 { margin: 0; }
  .dashboard-view .band-register { padding: 0 .75rem 2rem; }
  .dashboard-view .band-ticket-list { gap: .7rem; }
  .band-game-navigation { display: block; }
  .band-game-arrow { display: none; }
  .color-bands-games > button { min-width: 145px; min-height: 66px; flex-basis: 145px; padding: .4rem .7rem; }
  .band-scoreboard { min-height: 82px; grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr); gap: .35rem; }
  .band-scoreboard > div > strong { font-size: 1rem; }
  .band-scoreboard > div > span { font-size: .6rem; }
  .band-scoreboard-time { padding: .25rem; }
  .band-scoreboard-time strong { font-size: 1.2rem; }
  .band-scoreboard-time span { font-size: .55rem !important; }
  .band-register { padding: 1.3rem .75rem 2rem; }
  .band-register-heading h2 { font-size: 1.5rem; }
  .band-register-heading > div { min-width: 0; }
  .band-register-heading h1 { font-size: 1.5rem; overflow-wrap: anywhere; }
  .band-register-tools { align-items: end; flex-direction: column; }
  .band-edit-game { width: 44px; min-width: 44px; padding: 0; }
  .band-edit-game svg { display: block; }
  .band-edit-label { display: none; }
  .band-ticket { min-height: 86px; grid-template-columns: 9px minmax(66px, .45fr) minmax(0, 1fr); gap: .35rem .5rem; padding: .55rem .35rem; }
  .band-ticket-name strong { font-size: 1rem; }
  .band-ticket-seat span { font-size: .72rem; }
  .band-ticket-status { grid-column: 2; font-size: .63rem; }
  .band-ticket-actions { grid-column: 3; grid-row: 2; }
  .band-ticket-actions button, .band-ticket-actions .button { font-size: .7rem; }
  .band-qr { min-width: 52px; }
  .band-owner { padding: .35rem; font-size: .68rem; }
}

@media (max-width: 380px) {
  .band-register-heading { flex-wrap: wrap; }
  .band-register-tools { width: 100%; align-items: center; flex-direction: row; justify-content: space-between; }
  .band-ticket-actions:has(.share-action) { grid-column: 2 / 4; grid-row: 3; }
  .band-ticket-actions:has(.share-action) form { flex: 0 0 clamp(6rem, 28vw, 7.5rem); }
}

/* Admin: the prototype's navigation rail, with stable card controls. */
.admin-view .page { width: min(1360px, calc(100% - 2rem)); margin-top: 1.6rem; }
.admin-view .page-heading { align-items: center; padding: 1rem 1.15rem; border-radius: 7px; background: white; box-shadow: 0 8px 24px rgba(26, 22, 18, .08); }
.admin-view .page-heading .eyebrow { color: #a34a00; }
.admin-view .page-heading h1 { margin-bottom: 0; }
.admin-layout { display: grid; grid-template-columns: 215px minmax(0, 1fr); align-items: start; gap: 1.25rem; }
.admin-navigation { position: sticky; top: 5.5rem; z-index: 2; min-width: 0; }
.admin-sidebar { display: grid; gap: .12rem; padding: .55rem; border: 1px solid #373737; border-radius: 7px; background: #171717; box-shadow: 0 10px 25px rgba(0, 0, 0, .13); }
.admin-sidebar-caption { padding: .7rem .65rem .55rem; color: #bcb7b2; font-size: .65rem; font-weight: 850; letter-spacing: .13em; }
.admin-sidebar a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 3rem; padding: .65rem .7rem; border-radius: 3px; color: #f2efea; font-size: .82rem; font-weight: 750; }
.admin-sidebar a:hover { color: white; background: #35312e; text-decoration: none; }
.admin-sidebar a[aria-current="page"] { color: #171717; background: #f47721; }
.admin-sidebar a[aria-current="page"]:hover { color: #171717; background: #ee6e14; }
.admin-sidebar a small { min-width: 1.5rem; padding: .18rem .3rem; border-radius: 3px; color: inherit; background: rgba(255, 255, 255, .15); font-size: .65rem; text-align: center; }
.admin-sidebar a[aria-current="page"] small { background: rgba(0, 0, 0, .12); }
.admin-sidebar a span[aria-hidden] { opacity: .58; }
.admin-menu-toggle { display: none; }
.admin-content { min-width: 0; }
.admin-content .panel { border-radius: 7px; box-shadow: 0 8px 24px rgba(26, 22, 18, .08); }
.admin-content .admin-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }
.admin-layout.is-enhanced [data-admin-section][hidden] { display: none; }
.admin-panel-stack { min-width: 0; }
.admin-create-panel { border-left: 4px solid var(--primary); }
.admin-create-panel h2 { margin-bottom: .45rem; }
.admin-create-panel > p, .admin-create-panel form > p { margin: 0; }
.admin-create-panel .parking-ticket-create { margin: 0; padding: 0; border: 0; }

.admin-card-table { table-layout: fixed; min-width: 900px; }
.admin-card-table th:nth-child(1) { width: 21%; }
.admin-card-table th:nth-child(2) { width: 11%; }
.admin-card-table th:nth-child(3) { width: 22%; }
.admin-card-table th:nth-child(4) { width: 10%; }
.admin-card-table th:nth-child(5) { width: 14%; }
.admin-card-table th:nth-child(6) { width: 22%; }
.admin-card-title .badge { display: inline-flex; margin-right: .45rem; vertical-align: middle; }
.admin-card-title strong { display: inline-block; vertical-align: middle; overflow-wrap: anywhere; }
.admin-card-seat { overflow-wrap: anywhere; color: #494f53; font-size: .82rem; }
.admin-card-qr .qr-admin-preview, .qr-admin-empty { width: 3.7rem; height: 3.7rem; }
.qr-admin-empty { display: inline-grid; place-items: center; border: 1px dashed #b5aaa0; border-radius: 6px; color: #5d5751; background: rgba(255, 255, 255, .55); font-size: .7rem; font-weight: 750; text-align: center; }
.admin-card-order-buttons { flex-wrap: nowrap; gap: .3rem; }
.admin-card-order-buttons .icon-button { flex: 0 0 2.35rem; }
.admin-card-action .inline-form { display: flex; width: 100%; }
.admin-card-action .button { width: 100%; min-height: 2.75rem; white-space: nowrap; }
.admin-card-table .card-row td:last-child { text-align: left; }
.admin-card-table .card-row td:last-child .inline-form { justify-content: stretch; }
.admin-card-table .card-details-row > td { padding: .85rem; }
.admin-card-table .card-edit-form { grid-template-columns: minmax(6rem, .8fr) minmax(8rem, 1.3fr) repeat(3, minmax(5rem, .65fr)) auto; }
.admin-card-table .card-edit-form button { min-height: 2.75rem; white-space: nowrap; }
.admin-card-table .qr-management-row { display: grid; grid-template-columns: minmax(0, 1fr) 6.7rem; align-items: center; gap: .55rem; }
.admin-card-table .qr-upload-form { display: grid; grid-template-columns: minmax(9rem, 1.3fr) auto minmax(7rem, 1fr) minmax(7rem, 1fr) auto; gap: .45rem; width: 100%; min-width: 0; }
.admin-card-table .qr-upload-form > * { min-width: 0; }
.admin-card-table .qr-upload-form .file-label { min-width: 0; white-space: normal; }
.admin-card-table .qr-upload-form .file-label input { max-width: 100%; }
.admin-card-table .qr-delete-form, .qr-delete-placeholder { width: 6.7rem; min-height: 2.75rem; }
.admin-card-table .qr-delete-form .button { width: 100%; min-height: 2.75rem; }

@media (max-width: 1300px) {
  .admin-card-table .card-edit-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-card-table .card-edit-form button { grid-column: 1 / -1; }
  .admin-card-table .qr-management-row { grid-template-columns: minmax(0, 1fr); }
  .admin-card-table .qr-upload-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-card-table .qr-upload-form > button[type="submit"] { grid-column: 1 / -1; }
  .admin-card-table .qr-delete-form, .qr-delete-placeholder { width: auto; }
  .admin-card-table .qr-delete-form .button { width: auto; }
}
@media (max-width: 800px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .admin-navigation { position: sticky; top: calc(58px + env(safe-area-inset-top)); }
  .admin-menu-toggle { display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; min-height: 3rem; padding: .65rem .85rem; border-radius: 5px; color: #fff; background: #171717; text-align: left; font-size: .78rem; }
  .admin-menu-toggle strong { margin-right: auto; color: #f89a50; font-size: .85rem; }
  .admin-layout.is-enhanced .admin-sidebar { display: none; }
  .admin-layout.is-enhanced.menu-open .admin-sidebar { display: grid; position: absolute; top: calc(100% + .25rem); left: 0; right: 0; max-height: min(70dvh, 27rem); overflow-y: auto; }
  .admin-sidebar a { min-height: 3rem; }
  .admin-content .panel { padding: 1rem; }
}
@media (max-width: 720px) {
  .admin-view .page { width: calc(100% - 1.25rem); margin-top: 1.1rem; }
  .admin-view .page-heading { align-items: flex-start; }
  .admin-card-table { min-width: 0; table-layout: auto; }
  .admin-card-table .card-row { grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .6rem; padding: .75rem; }
  .admin-card-table .card-row td.admin-card-title { grid-column: 1; grid-row: 1; align-items: center; flex-wrap: wrap; gap: .2rem; }
  .admin-card-table .card-row td.admin-card-status { grid-column: 2; grid-row: 1; }
  .admin-card-table .card-row td.admin-card-seat { grid-column: 1 / -1; grid-row: 2; }
  .admin-card-table .card-row td.admin-card-qr { grid-column: 1; grid-row: 3; }
  .admin-card-table .card-row td.admin-card-order { grid-column: 2; grid-row: 3; justify-content: flex-end; }
  .admin-card-table .card-row td.admin-card-action { grid-column: 1 / -1; grid-row: 4; padding-top: .65rem; border-top: 1px solid #c8d4df; }
  .admin-card-table .card-row td.admin-card-action .button { width: 100%; }
  .admin-card-table .card-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-card-table .card-edit-form button { grid-column: 1 / -1; width: 100%; }
  .admin-card-table .qr-upload-form { grid-template-columns: minmax(0, 1fr); }
  .admin-card-table .qr-upload-form .button, .admin-card-table .qr-delete-form .button { width: 100%; }
  .admin-card-table .qr-delete-placeholder { display: none; }
}

/* Compact admin registers: actions stay in the row, editing belongs to its item. */
.admin-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.admin-section-heading h2 { margin-bottom: .35rem; }
.admin-section-heading p { margin: 0; }
.admin-item-list { display: grid; gap: .75rem; margin-top: 1rem; }
.admin-item { min-width: 0; border: 1px solid #d8d2c9; border-radius: 7px; overflow: hidden; background: #fff; box-shadow: 0 3px 12px rgba(26, 22, 18, .05); }
.admin-card-item.is-vip { border-left: 4px solid #eb7305; }
.admin-card-item.is-archived { opacity: .82; }
.admin-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 3.7rem 5.1rem minmax(12.5rem, 14.5rem); align-items: center; gap: 1rem; min-height: 6rem; padding: .9rem 1rem; }
.admin-item-identity { display: grid; gap: .4rem; min-width: 0; }
.admin-item-name { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; min-width: 0; }
.admin-item-name strong { overflow-wrap: anywhere; font-size: 1rem; }
.admin-item-name .badge { flex: 0 0 auto; }
.admin-item-meta { color: #5b5752; font-size: .8rem; overflow-wrap: anywhere; }
.admin-item-qr { display: grid; place-items: center; }
.admin-item-qr .qr-admin-preview, .admin-item-qr .qr-admin-empty { width: 3.7rem; height: 3.7rem; }
.admin-item-order { display: grid; justify-items: center; gap: .32rem; }
.admin-item-caption { color: #67615b; font-size: .65rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.admin-order-buttons { display: flex; gap: .3rem; margin: 0; }
.admin-order-buttons .icon-button { flex: 0 0 2.35rem; min-height: 2.35rem; }
.admin-order-buttons .icon-button:disabled { opacity: .42; cursor: not-allowed; }
.admin-item-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; min-width: 0; }
.admin-item-actions form { min-width: 0; margin: 0; }
.admin-item-actions .button { width: 100%; min-height: 2.75rem; padding: .55rem .4rem; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.admin-item-actions [aria-expanded="true"] { color: #171717; background: #ffe0c2; box-shadow: inset 0 -3px #eb7305; }
.admin-edit-panel { padding: 1rem; border-top: 1px solid #d8d2c9; background: #fbfaf7; }
.admin-edit-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.admin-edit-heading h3 { margin: 0; padding-left: .65rem; border-left: 3px solid var(--primary); font-size: .94rem; }
.admin-card-edit-form { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr) repeat(3, minmax(0, .55fr)) auto; align-items: end; gap: .55rem; }
.admin-card-edit-form > *, .admin-qr-form > * { min-width: 0; }
.admin-card-edit-form input, .admin-card-edit-form select, .admin-qr-form input { width: 100%; }
.admin-card-edit-form > button { min-height: 2.75rem; padding-inline: .55rem; white-space: nowrap; font-size: .74rem; }
.admin-qr-edit { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e2dbd2; }
.admin-qr-edit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .6rem; }
.admin-qr-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) auto; align-items: end; gap: .6rem; }
.admin-qr-form > button[type="submit"] { white-space: nowrap; }
.admin-qr-form .file-label input, .admin-parking-edit-form .file-label input { width: 100%; max-width: 100%; }
.admin-qr-delete { display: flex; margin: 0; }
.admin-qr-edit .button { min-height: 2.75rem; }
.admin-parking-editor-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .65rem; }
.admin-parking-edit-form { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto; align-items: end; gap: .65rem; min-width: 0; }
.admin-parking-edit-form > button { min-height: 2.75rem; }
.admin-parking-delete-form { margin: 0; }
.admin-parking-editor-row .button { min-height: 2.75rem; white-space: nowrap; }
.admin-parking-item .admin-item-name strong { font-size: 1rem; }
.admin-content .new-card-section { margin-top: 0; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 7px; background: #fff; }
.admin-content .parking-ticket-create { margin-top: 0; }
.admin-content .parking-ticket-create .primary { white-space: nowrap; }
@media (min-width: 721px) and (max-width: 1050px) {
  .admin-card-edit-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-card-edit-form > button { grid-column: 1 / -1; }
  .user-create-section .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1150px) {
  .admin-item-row { grid-template-columns: minmax(0, 1fr) 3.7rem 5.1rem; }
  .admin-item-actions { grid-column: 1 / -1; width: min(100%, 24rem); }
}
@media (min-width: 721px) and (max-width: 1150px) {
  .admin-parking-item .admin-item-row { grid-template-columns: minmax(0, 1fr) 3.7rem 5.1rem minmax(10rem, 13rem); }
  .admin-parking-item .admin-item-actions { grid-column: auto; width: auto; }
}
@media (max-width: 720px) {
  .admin-section-heading { align-items: flex-start; }
  .admin-item-list { gap: 1rem; }
  .admin-item { border-color: #c8bdb1; box-shadow: 0 5px 14px rgba(26, 22, 18, .1); }
  .admin-item-row { grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; padding: .75rem; }
  .admin-item-identity { grid-column: 1 / -1; }
  .admin-item-qr { grid-column: 1; justify-content: start; }
  .admin-item-order { grid-column: 2; }
  .admin-item-actions { grid-column: 1 / -1; width: 100%; padding-top: .65rem; border-top: 1px solid #e2ddd6; }
  .admin-edit-panel { padding: .8rem; }
  .admin-edit-heading { align-items: flex-start; flex-direction: column; gap: .15rem; }
  .admin-card-edit-form, .admin-qr-form, .admin-parking-edit-form { grid-template-columns: minmax(0, 1fr); }
  .admin-qr-edit { grid-template-columns: minmax(0, 1fr); }
  .admin-card-edit-form label:nth-of-type(2), .admin-parking-edit-form label { grid-column: 1 / -1; }
  .admin-card-edit-form > button, .admin-qr-form > button[type="submit"] { grid-column: 1 / -1; width: 100%; }
  .admin-qr-form label { grid-column: 1 / -1; }
  .admin-qr-delete .button { width: 100%; }
  .admin-parking-editor-row { grid-template-columns: minmax(0, 1fr); }
  .admin-parking-edit-form > button, .admin-parking-delete-form .button { width: 100%; }
}

/* Official BBL standings, results and live ticker */
.basketball-page { padding-bottom: 2rem; }
.basketball-heading { align-items: center; padding: 1.2rem; border-radius: 8px; background: #fff; }
.basketball-heading .eyebrow { color: var(--primary-dark); }
.basketball-heading p:last-child { margin: .4rem 0 0; color: var(--muted); }
.basketball-header-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.basketball-heading .button { flex: 0 0 auto; white-space: nowrap; }
.season-layout { display: grid; grid-template-columns: 215px minmax(0, 1fr); align-items: start; gap: 1.25rem; }
.season-content { grid-column: 2; grid-row: 1; min-width: 0; }
.season-layout.is-enhanced [data-season-section][hidden] { display: none; }
.season-navigation { grid-column: 1; grid-row: 1; position: sticky; top: 5.5rem; z-index: 2; min-width: 0; margin-top: .8rem; }
.season-sidebar { display: grid; gap: .12rem; padding: .55rem; border: 1px solid #373737; border-radius: 7px; background: #171717; box-shadow: 0 10px 25px rgba(0, 0, 0, .13); }
.season-sidebar-caption { padding: .7rem .65rem .55rem; color: #bcb7b2; font-size: .65rem; font-weight: 850; letter-spacing: .13em; }
.season-sidebar a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 3rem; padding: .65rem .7rem; border-radius: 3px; color: #f2efea; font-size: .82rem; font-weight: 750; }
.season-sidebar a:hover { color: white; background: #35312e; text-decoration: none; }
.season-sidebar a[aria-current="page"], .season-sidebar a[aria-current="page"]:hover { color: #171717; background: #f47721; }
.season-sidebar a span[aria-hidden] { opacity: .58; }
.season-menu-toggle { display: none; }
.season-games-overview { margin: .8rem 0 1.2rem; }
.season-games-overview-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .65rem; padding: .8rem 1rem; border-left: 5px solid var(--brand-red); border-radius: 6px; background: #fff; }
.season-games-overview-heading .eyebrow { margin: 0 0 .2rem; }
.season-games-overview-heading h2 { margin: 0; font-size: 1.15rem; }
.season-games-overview-heading > span { flex: none; color: var(--muted); font-size: .76rem; font-weight: 750; }
.season-games-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.season-games-panel { padding: .85rem 1rem; }
.season-games-panel .basketball-panel-heading { margin-bottom: .35rem; }
.season-games-panel .basketball-panel-heading h3 { margin: 0; font-size: 1rem; }
.season-games-list { display: grid; margin: 0; padding: 0; list-style: none; }
.season-game-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: .5rem; row-gap: .25rem; padding: .55rem 0; border-top: 1px solid #e9e5e0; }
.season-game-meta { grid-column: 1 / -1; display: flex; align-items: center; gap: .45rem; min-width: 0; text-align: left; }
.season-game-date, .season-game-time { flex: none; color: var(--muted); font-size: .69rem; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.season-game-info { grid-column: 1; width: 100%; min-width: 0; }
.season-game-competition { min-width: 0; overflow: hidden; color: var(--muted); font-size: .62rem; font-weight: 800; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.season-game-info .basketball-score { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .3rem; margin: 0; font-size: .75rem; }
.season-game-info .basketball-score span:first-child { text-align: left; }
.season-game-info .basketball-score span:last-child { text-align: right; }
.season-game-info .basketball-score strong { justify-self: center; text-align: center; font-size: .86rem; }
.season-game-link { grid-column: 2; grid-row: 2; display: grid; width: 1.5rem; height: 1.5rem; place-items: center; border-radius: 50%; color: var(--primary-dark); font-size: .85rem; font-weight: 900; }
.season-game-link:hover { background: var(--orange-pale); text-decoration: none; }
.season-live .basketball-panel > h3 { margin: 0 0 .8rem; }
.season-live-source { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #d8d2c9; }
.season-live-source h3 { margin: 0 0 .35rem; }
.season-live-source p { margin: 0 0 .45rem; color: var(--muted); font-size: .85rem; }
.basketball-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; color: white; font-size: .82rem; font-weight: 700; }
.basketball-refresh { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.basketball-refresh svg { width: 1.1rem; height: 1.1rem; flex: none; }
.basketball-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(270px, 1fr); grid-template-areas: "table results" "table upcoming"; align-items: start; gap: 1rem; }
.season-table { grid-area: table; }
.season-results { grid-area: results; }
.season-upcoming { grid-area: upcoming; }
.season-competition { min-width: 0; }
.season-section-heading { display: flex; align-items: end; justify-content: space-between; gap: .75rem; margin: .8rem 0 .75rem; padding: .8rem 1rem; border-left: 5px solid var(--brand-red); border-radius: 6px; background: #fff; }
.season-section-heading .eyebrow { margin-bottom: .3rem; }
.season-section-heading h2 { margin: 0; }
.season-section-heading a { font-size: .82rem; font-weight: 800; }
.season-competition-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(270px, 1fr); align-items: start; gap: 1rem; }
.season-competition .basketball-panel-heading h3 { margin: 0; }
.season-cup-note { margin: 0 0 .8rem; }
.season-cup-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.basketball-results.season-cup-games li { min-width: 0; padding: 1rem 1.15rem; border: 1px solid #d8d2c9; border-left: 4px solid var(--brand-red); border-radius: 6px; background: #fbfaf8; }
.season-cup-games .basketball-score { gap: .8rem; }
.basketball-panel, .basketball-message { min-width: 0; padding: 1.2rem; border-radius: 8px; background: white; box-shadow: 0 8px 24px rgba(26, 22, 18, .1); }
.basketball-panel-heading { margin-bottom: .9rem; padding-left: .7rem; border-left: 4px solid var(--brand-red); }
.basketball-panel-heading h2 { margin: 0; }
.basketball-table-wrap { max-width: 100%; overflow-x: auto; }
.basketball-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.basketball-table th, .basketball-table td { padding: .7rem .4rem; border-bottom: 1px solid #e9e5e0; text-align: right; white-space: nowrap; }
.basketball-table th:nth-child(2), .basketball-table td:nth-child(2) { width: 100%; text-align: left; white-space: normal; }
.basketball-table thead { color: #555; background: #f5f3f0; font-size: .78rem; }
.basketball-table tbody th { font-weight: 800; }
.basketball-table .basketball-niners { background: var(--orange-pale); font-weight: 800; }
.basketball-table .basketball-niners th:first-child { box-shadow: inset 4px 0 var(--primary); }
.basketball-legend, .basketball-hint { margin: .9rem 0 0; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.basketball-empty { margin: .5rem 0; color: var(--muted); line-height: 1.5; }
.basketball-message { max-width: 48rem; line-height: 1.6; }
.basketball-message code { overflow-wrap: anywhere; }
.basketball-live-game + .basketball-live-game { padding-top: 1rem; border-top: 1px solid var(--border); }
.basketball-live-label { display: flex; align-items: center; gap: .4rem; color: var(--danger); font-size: .8rem; font-weight: 900; }
.basketball-live-dot { width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.basketball-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .5rem; margin: .55rem 0; font-size: .87rem; }
.basketball-score span { min-width: 0; overflow-wrap: anywhere; }
.basketball-score span:last-child { text-align: right; }
.basketball-score strong { color: var(--ink); font-size: 1.12rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.basketball-results, .basketball-actions { margin: 0; padding: 0; list-style: none; }
.basketball-results li { padding: .7rem 0; border-top: 1px solid #e9e5e0; }
.basketball-results time { color: var(--muted); font-size: .76rem; }
.basketball-actions { max-height: 20rem; overflow-y: auto; }
.basketball-actions li { display: flex; justify-content: space-between; gap: .7rem; padding: .45rem 0; border-top: 1px solid #eee; font-size: .78rem; }
.basketball-actions li span:first-child { color: var(--muted); white-space: nowrap; }
@media (min-width: 721px) and (max-width: 1000px) {
  .topbar { flex-wrap: wrap; }
  .topbar-navigation { width: 100%; justify-content: space-between; gap: .5rem; }
}
@media (max-width: 1050px) {
  .basketball-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "table" "results" "upcoming"; }
  .season-competition-grid { grid-template-columns: minmax(0, 1fr); }
  .season-games-grid { grid-template-columns: minmax(0, 1fr); }
  .season-cup-games { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
  .season-layout { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .season-content { grid-column: 1; grid-row: 2; }
  .season-navigation { grid-column: 1; grid-row: 1; position: sticky; top: calc(58px + env(safe-area-inset-top)); margin-top: 0; }
  .season-menu-toggle { display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; min-height: 3rem; padding: .65rem .85rem; border-radius: 5px; color: #fff; background: #171717; text-align: left; font-size: .78rem; }
  .season-menu-toggle strong { margin-right: auto; color: #f89a50; font-size: .85rem; }
  .season-layout.is-enhanced .season-sidebar { display: none; }
  .season-layout.is-enhanced.menu-open .season-sidebar { display: grid; position: absolute; top: calc(100% + .25rem); left: 0; right: 0; max-height: min(70dvh, 27rem); overflow-y: auto; }
}
@media (max-width: 720px) {
  body.has-mobile-nav.basketball-view { min-height: calc(100lvh + 1px); }
  .basketball-page { padding-bottom: 1.25rem; }
  .basketball-heading { gap: .75rem; }
  .basketball-header-links { width: 100%; justify-content: stretch; }
  .basketball-heading .button { flex: 1 1 11rem; text-align: center; }
  .basketball-toolbar { align-items: center; }
  .basketball-refresh { flex: none; width: 2.75rem; min-height: 2.75rem; padding: .5rem; }
  .basketball-refresh-label { display: none; }
  .basketball-panel, .basketball-message { padding: .9rem; }
  .basketball-table { font-size: .82rem; }
  .basketball-table th, .basketball-table td { padding: .65rem .25rem; }
  .basketball-table th:nth-child(2), .basketball-table td:nth-child(2) { min-width: 8rem; }
  .basketball-score { font-size: .82rem; }
  .season-section-heading { align-items: flex-start; flex-direction: column; }
  .season-games-overview-heading { padding: .7rem .8rem; }
  .season-games-panel { padding: .75rem; }
  .season-game-row { column-gap: .35rem; }
  .season-game-meta { gap: .35rem; }
  .season-game-date, .season-game-time { font-size: .64rem; }
  .season-game-competition { font-size: .6rem; }
  .season-game-info .basketball-score { gap: .2rem; font-size: .7rem; }
  .season-game-info .basketball-score strong { font-size: .79rem; }
}

@media (max-width: 720px) {
  .share-view .page { width: 100%; margin: .8rem auto 2rem; }
  .share-validity { margin: .65rem .6rem .75rem; padding: .65rem; font-size: .7rem; }
  .shared-page-heading { margin: .8rem .75rem 1rem; }
  .shared-page-heading h1 { font-size: 1.4rem; }
  .shared-parking-page .band-scoreboard, .shared-card-page .band-scoreboard { margin: 0; }
  .shared-parking-page .parking-ticket-grid, .shared-card-page .parking-ticket-grid { margin: 1rem .6rem 0; }
  .shared-parking-page .parking-ticket-card, .shared-card-page .parking-ticket-card { grid-template-columns: minmax(0, 1fr) 7.5rem; min-height: 12.5rem; }
  .shared-parking-page .parking-ticket-copy, .shared-card-page .parking-ticket-copy { padding: .9rem .7rem .9rem 1.25rem; }
  .parking-ticket-footer { gap: .45rem; }
  .parking-share-action { flex-basis: 36px; width: 36px; min-width: 36px; min-height: 36px; padding: .4rem; }
  .shared-parking-page .parking-ticket-copy h2, .shared-card-page .parking-ticket-copy h2 { font-size: 1.2rem; }
  .shared-parking-page .parking-ticket-copy p, .shared-card-page .parking-ticket-copy p { font-size: .72rem; }
  .band-ticket-actions { justify-content: flex-end; gap: .3rem; }
  .band-ticket-actions:has(.share-action) { grid-column: 3; grid-row: 2; width: 100%; }
  .band-ticket-actions:has(.share-action) form { flex: 1; }
  .band-ticket-actions:has(.share-action) .band-cancel { width: 100%; padding-inline: .25rem; }
  .band-ticket-actions .band-qr { flex: 0 0 3.25rem; width: 3.25rem; min-width: 3.25rem; padding-inline: .25rem; }
  .band-ticket-actions .share-action { flex: 0 0 2.65rem; width: 2.65rem; min-width: 2.65rem; }
  .share-link-dialog[open] { position: fixed; top: 50%; right: auto; bottom: auto; left: 50%; width: min(500px, calc(100% - 1.5rem)); max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 2rem); margin: 0; padding: .9rem; transform: translate(-50%, -50%); }
  .share-link-dialog .dialog-header { margin-bottom: .75rem; }
  .share-link-row { grid-template-columns: minmax(0, 1fr); }
  .share-link-row button { width: 100%; }
  .share-view .share-expired { margin: 1.5rem .7rem; padding: 1.4rem 1rem; }
}
