:root {
  --ink: #18222c;
  --muted: #667584;
  --line: #dfe5ea;
  --surface: #fff;
  --soft: #f4f7f9;
  --blue: #009cff;
  --orange: #ff542b;
  --green: #16875b;
  --red: #c83737;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--soft); color: var(--ink); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.eyebrow { margin: 0; color: var(--orange); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.public-page { background: #eaf0f4; }
.public-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(340px,1.1fr) minmax(440px,.9fr); }
.public-hero { position: relative; display: flex; flex-direction: column; justify-content: center; padding: clamp(40px,7vw,110px); overflow: hidden; background: #15212b; color: #fff; }
.public-hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -210px; border: 80px solid var(--blue); border-radius: 50%; opacity: .16; }
.booking-brand { width: 120px; margin-bottom: 52px; font-weight: 1000; font-style: italic; line-height: .78; transform: rotate(-3deg); }
.booking-brand span, .booking-brand b { display: block; font-size: 42px; }
.booking-brand strong { display: block; width: max-content; margin: 3px -12px; padding: 7px 12px; background: var(--orange); font-size: 29px; transform: skew(-10deg); }
.public-hero h1 { max-width: 650px; margin: 12px 0 20px; font-size: clamp(44px,6vw,78px); line-height: .98; letter-spacing: -.055em; }
.public-hero > p:not(.eyebrow) { max-width: 570px; color: #c5d0da; font-size: 18px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 24px; color: #dce6ee; }
.hero-points span::first-letter { color: var(--blue); }
.public-card { align-self: center; width: min(520px,calc(100% - 44px)); margin: 30px auto; padding: 34px; border-radius: 22px; background: #fff; box-shadow: 0 30px 70px rgba(18,32,45,.16); }
.public-card h2 { margin: 5px 0 20px; font-size: 30px; }
.public-explainer { margin: -8px 0 18px; color: var(--muted); }
.verified-address { display: grid; gap: 2px; margin: -7px 0 18px; padding: 11px 13px; border: 1px solid #b9e0f7; border-radius: 9px; background: #edf8ff; color: #486678; font-size: 12px; }
.verified-address strong { overflow-wrap: anywhere; color: #075b91; font-size: 14px; }
.access-options { display: grid; gap: 10px; }
.access-options form { margin: 0; }
.access-options button { display: grid; width: 100%; gap: 2px; padding: 14px; border-color: var(--line); text-align: left; }
.access-options button:hover { border-color: var(--blue); background: #f3faff; }
.access-options button span { color: var(--blue); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.access-options button strong { font-size: 16px; }
.access-options button small { color: var(--muted); font-weight: 500; }
.public-restart { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-weight: 800; text-align: center; text-decoration: none; }
.public-restart:hover { border-color: var(--blue); color: var(--blue); }
.booking-form { display: grid; gap: 16px; }
label { display: grid; gap: 6px; color: var(--muted); font-weight: 700; }
input, select, textarea { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(0,156,255,.15); border-color: var(--blue); }
button { min-height: 42px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-weight: 800; }
button.primary, .primary { border-color: var(--orange); background: var(--orange); color: #fff; }
button:disabled { cursor: not-allowed; opacity: .5; }
button.danger { color: var(--red); }
.type-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 10px; background: var(--soft); }
.type-switch label { position: relative; display: block; cursor: pointer; }
.type-switch input { position: absolute; opacity: 0; }
.type-switch span { display: block; padding: 9px; border-radius: 7px; text-align: center; }
.type-switch input:checked + span { background: #fff; color: var(--blue); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.known-access, .privacy { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.known-access summary, .privacy summary { cursor: pointer; font-weight: 800; }
.known-access form { display: grid; gap: 9px; margin-top: 12px; }
.notice { margin-bottom: 16px; padding: 12px 14px; border-left: 4px solid var(--blue); border-radius: 7px; background: var(--soft); }
.notice.success { border-color: var(--green); }
.notice.error { border-color: var(--red); }
.notice.warning { border-color: #d88a0d; }
.inline-resend button { width: 100%; }
.portal-page { display: grid; grid-template-columns: 260px minmax(0,1fr); }
.portal-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; background: #17222c; color: #fff; }
.portal-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 20px; }
.portal-brand span { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 9px 16px 9px 9px; background: var(--orange); font-weight: 1000; }
.portal-org { display: grid; margin: 26px 4px 18px; padding: 15px; border-radius: 10px; background: rgba(255,255,255,.07); }
.portal-org small { color: #93a3b1; text-transform: uppercase; letter-spacing: .08em; }
.portal-org strong { margin: 3px 0 5px; }
.stars { color: #ffbf38; letter-spacing: .06em; }
.portal-sidebar nav { display: grid; gap: 5px; }
.portal-sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; color: #cbd5de; text-decoration: none; }
.portal-sidebar nav a span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: rgba(255,255,255,.08); font-size: 15px; font-weight: 800; }
.portal-sidebar nav a.active { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 3px 0 var(--orange); }
.portal-sidebar nav a.disabled { opacity: .35; pointer-events: none; }
.logout-link { margin-top: auto; color: #aebbc6; }
.portal-main { min-width: 0; }
.portal-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 86px; padding: 16px 28px; border-bottom: 1px solid var(--line); background: #fff; }
.portal-head h1 { margin: 1px 0; font-size: 26px; }
.portal-status { display: grid; text-align: right; font-weight: 800; }
.portal-status small { color: var(--muted); font-weight: 500; }
.portal-content { width: min(1160px,100%); margin: 0 auto; padding: 28px; }
.section-intro { margin-bottom: 18px; padding: 16px 18px; border-left: 4px solid var(--blue); border-radius: 8px; background: #fff; }
.section-intro small { display: block; margin-top: 8px; color: var(--muted); }
.portal-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 28px rgba(20,35,47,.06); }
.portal-card h2 { margin: 10px 0 14px; font-size: 19px; }
.portal-card h2:not(:first-of-type) { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.form-grid .wide, fieldset.wide { grid-column: 1/-1; }
.address-locality { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; }
.address-locality > label { min-width: 0; }
.billing-fields > h2.wide { margin: 0; }
.contract-divider { width: 100%; margin: 2px 0; border: 0; border-top: 1px solid var(--line); }
.contract-information { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.contract-information > div { min-width: 0; overflow-wrap: anywhere; }
.contract-information > div > :first-child { margin-top: 0; }
.contract-information > div > :last-child { margin-bottom: 0; }
@media (max-width: 620px) { .contract-information { grid-template-columns: 1fr; gap: 16px; } }
.billing-fields[hidden] { display: none !important; }
label small { font-weight: 400; }
fieldset { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; }
legend { padding: 0 7px; color: var(--muted); font-weight: 800; }
.checkbox { display: flex; align-items: center; gap: 9px; }
.checkbox input, .choice-grid input, .school-table input[type=checkbox] { width: auto; min-height: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px 15px; }
.choice-grid label { display: flex; flex-direction: row; align-items: flex-start; gap: 7px; font-weight: 500; }
.locked-note { margin-bottom: 18px; padding: 13px 15px; border-radius: 8px; background: #e9f7f1; color: #126744; font-weight: 750; }
.terms-check { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; color: var(--ink); }
.terms-check input { width: 22px; min-height: 22px; }
.terms-check a { color: var(--blue); text-decoration: underline; }
dialog { width: min(900px,calc(100% - 28px)); height: min(850px,calc(100vh - 28px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
dialog::backdrop { background: rgba(9,16,23,.68); }
dialog header, dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
dialog footer { border-top: 1px solid var(--line); border-bottom: 0; }
.terms-dialog[open] { display: flex; flex-direction: column; height: min(865px,calc(100vh - 13px)); height: min(865px,calc(100dvh - 13px)); overflow: hidden; }
.terms-dialog header, .terms-dialog footer { flex: 0 0 auto; }
.terms-dialog iframe { display: block; width: 100%; min-height: 0; flex: 1 1 auto; border: 0; }
.contact-dialog { height: auto; max-width: 680px; }
.dialog-body { padding: 18px; }
.portal-content.hall-content { width: min(1500px,100%); }
.hall-area { margin-bottom: 28px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.hall-title { padding: 14px 17px; background: var(--soft); }
.hall-title h2, .hall-title p { margin: 0; }
.hall-title p { color: var(--muted); }
.hall-scroll { max-width: 100%; overflow: auto; background: #e8edf0; }
.hall-canvas { position: relative; width: 100%; min-width: 680px; margin: 0 auto; background-color: #fff; background-repeat: no-repeat; background-size: 100% 100%; }
.booth { position: absolute; display: grid; place-items: center; gap: 0; padding: 2px; border: 2px solid #fff; border-radius: 3px; background: rgba(0,156,255,.82); color: #fff; font-size: 11px; line-height: 1.05; box-shadow: 0 0 0 1px rgba(0,0,0,.28); }
.booth small { min-width: 0; max-width: 100%; overflow: hidden; font-size: 9px; text-overflow: ellipsis; }
.booth-price { display: flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; }
.booth-price.discount { padding: 1px 3px; border-radius: 4px; background: rgba(255,255,255,.92); color: var(--ink); }
.booth-price.discount del { color: var(--muted); font-size: 8px; }
.booth-price.discount b { color: var(--red); font-size: 10px; }
.booth-company { display: -webkit-box; overflow: hidden; padding: 0 3px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-weight: 750; line-height: 1.05; text-decoration: none; white-space: normal; }
.booth.available .selected-company { display: none; }
.booth.available.selected > strong { display: none; }
.booth.available.selected .booth-price { display: none; }
.booth.available.selected .selected-company { display: -webkit-box; }
.booth-company-only { margin: auto; font-size: clamp(8px,1.05vw,13px); -webkit-line-clamp: 3; }
.booth.available:hover, .booth.selected { z-index: 3; background: var(--orange); transform: scale(1.05); }
.booth.unavailable { background: rgba(86,96,106,.82); }
.booth.corner-left { clip-path: polygon(0 0,100% 0,100% 50%,50% 50%,50% 100%,0 100%); align-content: start; padding-top: 5px; }
.booth.corner-right { clip-path: polygon(0 0,100% 0,100% 100%,50% 100%,50% 50%,0 50%); align-content: start; padding-top: 5px; }
.booth.corner-left::after, .booth.corner-right::after { content: ""; position: absolute; pointer-events: none; top: calc(50% - 2px); width: calc(50% + 2px); height: calc(50% + 2px); border-top: 2px solid #fff; }
.booth.corner-left::after { left: calc(50% - 2px); border-left: 2px solid #fff; }
.booth.corner-right::after { right: calc(50% - 2px); border-right: 2px solid #fff; }
.booking-bar { position: sticky; bottom: 10px; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 14px 16px; border-radius: 11px; background: #17222c; color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.booking-bar small { display: block; color: #acbac6; }
.hold-status { position: sticky; top: 10px; z-index: 12; margin-bottom: 12px; padding: 9px 12px; border-radius: 7px; background: #e5f4ff; color: #075b91; text-align: center; font-weight: 800; }
.hold-status.warning { background: #fff0d5; color: #875509; }
.booked-spaces { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.booked-spaces article { display: grid; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.booked-spaces strong { font-size: 24px; }
.booked-spaces span { color: var(--muted); }
.reserved-summary { padding: 13px 15px; margin-bottom: 16px; border: 1px solid color-mix(in srgb,var(--blue) 35%,var(--line)); border-radius: 10px; background: color-mix(in srgb,var(--blue) 9%,var(--panel)); line-height: 1.5; }
.reserved-summary strong { margin-right: 4px; }
.plan-overview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.plan-overview figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.plan-overview img { display: block; width: 100%; height: 345px; object-fit: contain; }
.plan-overview figcaption { padding: 8px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; }
.subsection-intro { margin: -7px 0 15px; color: var(--muted); line-height: 1.55; }
.card-title .subsection-intro { margin: 3px 0 0; }
.school-table { overflow: auto; margin-bottom: 18px; }
.school-table table { width: 100%; border-collapse: collapse; }
.school-table th, .school-table td { padding: 9px 11px; border: 1px solid var(--line); text-align: left; }
.school-table thead { background: var(--soft); }
.school-table label { display: flex; flex-direction: row; align-items: center; gap: 7px; }
.card-title, .contact-list article, .contact-list article > div:last-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title h2, .card-title p { margin: 0; }
.card-title p { color: var(--muted); }
.contact-list { display: grid; gap: 10px; margin-top: 18px; }
.contact-list article { padding: 13px; border: 1px solid var(--line); border-radius: 9px; }
.contact-list article > div:first-child { display: grid; }
.contact-list article small { width: max-content; padding: 2px 6px; border-radius: 99px; background: #e5f4ff; color: #075b91; }
.contact-list article span { color: var(--muted); }
.contact-list form { display: inline; }
.current-upload { display: block; margin-top: 4px; padding: 7px 9px; border-radius: 7px; background: #e9f7f1; color: #126744; }
.current-upload a { color: inherit; font-weight: 800; }
.download-template { display: inline-flex; width: max-content; margin-top: 7px; padding: 8px 11px; border: 1px solid var(--blue); border-radius: 7px; color: var(--blue); font-weight: 800; text-decoration: none; }
.download-template:hover { background: color-mix(in srgb,var(--blue) 9%,#fff); }
.booking-confirmation { display: grid; gap: 5px; margin-bottom: 18px; padding: 18px 20px; border: 3px solid #20a76b; border-radius: 12px; background: #e8f8f0; color: #0b6840; box-shadow: 0 9px 22px rgba(17,119,73,.14); }
.booking-confirmation strong { font-size: 21px; }
.booking-confirmation span { font-size: 17px; font-weight: 850; }
.booking-confirmation p { margin: 3px 0 0; color: #164f39; }
.booking-confirmation small { margin-top: 5px; color: #75520a; font-weight: 750; }
.summary-media { display: grid; grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); gap: 16px; }
.summary-media figure { display: grid; align-content: center; min-height: 180px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: center; }
.summary-media img { display: block; width: 100%; max-height: 250px; object-fit: contain; }
.summary-media figcaption { margin-top: 8px; color: var(--muted); font-size: 12px; font-weight: 750; }
.booking-summary { display: grid; gap: 22px; }
.booking-summary h3 { margin: 0 0 10px; font-size: 17px; }
.summary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.summary-grid article { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.summary-list { display: grid; gap: 7px; margin: 0; }
.summary-list > div { display: grid; grid-template-columns: minmax(165px,.7fr) minmax(0,1.3fr); gap: 12px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: 750; }
.summary-list .summary-total { padding: 12px; border: 0; border-radius: 8px; background: #e9f7f1; color: #126744; font-size: 18px; }
@media (max-width: 900px) {
  .public-shell { grid-template-columns: 1fr; }
  .public-hero { min-height: 470px; padding: 45px 30px; }
  .booking-brand { margin-bottom: 30px; }
  .portal-page { grid-template-columns: 1fr; }
  .portal-sidebar { position: static; height: auto; }
  .portal-sidebar nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .logout-link { margin-top: 15px; }
}
@media (max-width: 620px) {
  .public-card { width: calc(100% - 24px); padding: 24px 18px; }
  .portal-head { align-items: flex-start; padding: 14px 16px; }
  .portal-status { display: none; }
  .portal-content { padding: 15px 10px; }
  .portal-card { padding: 16px 12px; }
  .form-grid, .choice-grid, .booked-spaces, .summary-grid { grid-template-columns: 1fr; }
  .plan-overview { grid-template-columns: 1fr; }
  .portal-sidebar nav { grid-template-columns: 1fr; }
  .booking-bar { align-items: stretch; flex-direction: column; }
  .booking-bar button { width: 100%; }
  .contact-list article { align-items: flex-start; flex-direction: column; }
}
@media print {
  .portal-sidebar, .portal-head, button, .booking-bar { display: none !important; }
  .portal-page { display: block; }
  .portal-content { width: 100%; padding: 0; }
  .portal-card { border: 0; box-shadow: none; }
  .booking-summary { padding: 0; }
  .booking-summary article { break-inside: avoid; }
  .summary-media { break-inside: avoid; }
  .summary-media figure { min-height: 140px; }
  .summary-media img { max-height: 210px; }
}
/* School summary and A4 printing */
.booking-event-brand { width:min(420px,100%); margin:0 auto 24px; }
.event-logo { display:block; width:100%; height:auto; max-height:250px; object-fit:contain; }
.portal-brand.portal-event-brand { display:block; padding:10px 0 22px; }
.portal-event-brand .event-logo { width:100%; max-height:210px; }
.event-logo-fallback { display:block; text-align:center; font-size:24px; }
.publication-upload-gap, .form-grid label:has(> input[name="logo"]), .form-grid label:has(> input[name="company_image"]) { margin-top:24px; }
.publication-upload-gap h3 { margin:0 0 10px; }
.publication-upload-gap .subsection-intro { margin:0; }
.transfer-value{display:block;padding:10px 0}.form-grid fieldset{min-width:0}.school-table input{max-width:100%;box-sizing:border-box}
@media print{@page{size:A4;margin:12mm}.no-print,[data-record-editor],.portal-sidebar,.portal-topbar,.print-summary-head button{display:none!important}html,body,.portal-main,.portal-content,.booking-summary{width:auto!important;max-width:none!important;min-width:0!important;overflow:visible!important;height:auto!important;background:white!important;color:black!important}.summary-grid{display:block!important}.booking-summary p,.booking-summary dd{overflow-wrap:anywhere;white-space:normal}.booking-summary .summary-list div,.booking-summary table tr{break-inside:avoid}.booking-summary img{max-width:100%;object-fit:contain}.booking-summary h3{break-after:avoid}.booking-summary fieldset{break-inside:avoid}.booking-summary{border:0!important;padding:0!important}}

