.page-demo { background: #edf2f5; }
.demo-site-header .nav-shell { gap: 1.5rem; }
.demo-header-label { margin-left: auto; color: var(--th-navy-muted); font-size: .86rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.demo-back { display: inline-flex; min-height: 44px; align-items: center; color: white; font-weight: 700; }
.demo-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2.5rem; align-items: end; padding-top: 3.4rem; padding-bottom: 2rem; }
.demo-hero h1 { max-width: 12ch; margin: 0 0 .55rem; color: var(--th-navy); font: 700 clamp(3rem, 6vw, 5.5rem)/.92 var(--th-display); letter-spacing: -.02em; }
.demo-hero p { max-width: 62ch; margin: 0; color: var(--th-muted); }
.demo-hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.demo-hero-actions .button { border-radius: 10px; min-height: 48px; cursor: pointer; }
.demo-hero-actions .button-line { border: 2px solid var(--th-teal-dark); color: var(--th-teal-dark); background: transparent; }
#share-status { flex-basis: 100%; min-height: 1.5rem; text-align: right; font-size: .9rem; }
.demo-shell { overflow: hidden; border: 1px solid #bccbd4; border-radius: 18px; background: white; box-shadow: 0 20px 50px rgba(0, 0, 0, .12); }
.demo-topline { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.3rem 1.7rem; background: var(--th-navy); color: white; }
.demo-label { color: var(--th-teal-dark); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.demo-topline .demo-label { color: var(--th-gold); }
.demo-topline h2 { margin: .2rem 0 0; color: white; font: 700 clamp(2rem, 4vw, 2.8rem)/1 var(--th-display); }
.demo-topline p { margin: .15rem 0 0; color: var(--th-navy-muted); font-size: .9rem; }
.demo-reset { flex: 0 0 auto; min-height: 44px; padding: .45rem .8rem; border: 1px solid #8298ac; border-radius: 8px; background: transparent; color: white; font-weight: 700; white-space: nowrap; cursor: pointer; }
.demo-reset:hover { background: #173756; }
.demo-controls { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .9rem 1.7rem; border-bottom: 1px solid var(--th-rule); background: #f8fafb; }
.sport-switch, .view-switch { display: flex; flex-wrap: wrap; gap: .35rem; }
.sport-switch a, .view-switch button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .45rem .9rem; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--th-navy); font-weight: 800; text-decoration: none; cursor: pointer; }
.sport-switch a[aria-current], .view-switch button[aria-pressed="true"] { border-color: #91c7c8; background: var(--th-ice); color: var(--th-teal-dark); }
.demo-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 510px; }
.demo-tabs { display: flex; flex-direction: column; gap: .2rem; padding: 1.2rem .7rem; border-right: 1px solid var(--th-rule); background: #f4f7f8; }
.demo-tabs button { width: 100%; min-height: 49px; padding: .65rem .9rem; border: 0; border-radius: 8px; background: transparent; color: var(--th-ink); font-weight: 750; text-align: left; cursor: pointer; }
.demo-tabs button:hover { background: #e4ecee; }
.demo-tabs button[aria-current="page"] { background: var(--th-teal-dark); color: white; }
.demo-content { min-width: 0; padding: 1.7rem 2rem 2.2rem; }
.demo-panel[hidden], .tour-card[hidden], .sport-form[hidden], #parent-sport-note[hidden] { display: none; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.panel-heading h3 { margin: .15rem 0 0; color: var(--th-navy); font: 700 clamp(2.4rem, 5vw, 3.7rem)/.95 var(--th-display); }
.sample-stamp { border: 1px solid var(--th-teal); border-radius: 5px; padding: .15rem .55rem; color: var(--th-teal-dark); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.event-showcase { display: flex; align-items: center; gap: 1.2rem; border: 1px solid #b7cbd2; border-radius: 12px; padding: 1rem; background: #f5fafb; }
.event-day { display: grid; place-items: center; min-width: 68px; min-height: 74px; border-radius: 8px; background: var(--th-teal-dark); color: white; line-height: 1.1; }
.event-day strong { font: 700 1.6rem/1 var(--th-display); }
.event-day span { font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
.event-showcase h4 { margin: 0; color: var(--th-navy); font: 700 clamp(1.5rem, 4vw, 2.15rem)/1 var(--th-display); }
.event-showcase p { margin: .25rem 0 0; color: var(--th-muted); }
.event-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.25rem 0; }
.event-details div { border-top: 2px solid var(--th-rule); padding-top: .55rem; }
.event-details dt { color: var(--th-muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.event-details dd { margin: .2rem 0 0; color: var(--th-navy); font-weight: 800; }
.demo-footnote { color: var(--th-muted); font-size: .9rem; }
.rsvp-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0; }
.rsvp-actions button { min-height: 46px; padding: .5rem 1.1rem; border: 1px solid #91a9b4; border-radius: 8px; background: white; color: var(--th-navy); font-weight: 800; cursor: pointer; }
.rsvp-actions button[aria-pressed="true"] { border-color: var(--th-teal-dark); background: var(--th-teal-dark); color: white; }
.attendance-line { display: flex; align-items: baseline; gap: .5rem; padding: .9rem 0; border-top: 1px solid var(--th-rule); }
.attendance-line strong { color: var(--th-navy); font: 700 2.3rem/1 var(--th-display); }
.sample-roster { list-style: none; padding: 0; margin: 0; }
.sample-roster li { display: flex; justify-content: space-between; gap: 1rem; padding: .52rem 0; border-top: 1px solid #e2e8eb; }
.sample-roster strong { color: var(--th-teal-dark); }
.chat-messages { display: grid; gap: .75rem; margin: 1rem 0 1.4rem; }
.chat-bubble { max-width: 75ch; border: 1px solid #c9d8dd; border-radius: 10px; padding: .65rem .9rem; background: #f7fafb; }
.chat-bubble strong { color: var(--th-teal-dark); font-size: .85rem; }
.chat-bubble p { margin: .1rem 0 0; }
.chat-form label, .sport-form label { display: block; margin-bottom: .4rem; font-weight: 800; }
.chat-form > div, .sport-form > div { display: flex; gap: .55rem; }
.chat-form input, .sport-form input { min-width: 0; flex: 1; min-height: 46px; border: 1px solid #93aab6; border-radius: 8px; padding: .5rem .7rem; }
.chat-form button, .sport-form button, .stat-readout button { min-height: 46px; border: 0; border-radius: 8px; padding: .5rem 1rem; background: var(--th-teal-dark); color: white; font-weight: 800; cursor: pointer; }
.sport-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1.25rem 0; }
.stat-readout { display: grid; align-content: start; gap: .1rem; border: 1px solid #b7cbd2; border-radius: 10px; padding: 1rem; background: #f5fafb; }
.stat-readout strong { color: var(--th-navy); font: 700 3rem/1 var(--th-display); }
.stat-readout span { color: var(--th-muted); font-size: .82rem; font-weight: 800; text-transform: uppercase; }
.stat-readout button { max-width: 100%; justify-self: start; margin-top: .65rem; overflow-wrap: anywhere; white-space: normal; }
.sport-detail { display: grid; gap: .15rem; margin: 1rem 0; border-top: 1px solid var(--th-rule); padding-top: 1rem; }
.sport-detail span { color: var(--th-muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.sport-detail strong { color: var(--th-navy); }
.tour-card { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 1.2rem; border: 2px solid var(--th-gold); border-radius: 12px; padding: 1rem 1.4rem; background: #fff8d8; }
.tour-card h2 { margin: .1rem 0; color: var(--th-navy); font: 700 1.8rem/1 var(--th-display); }
.tour-card p { margin: .1rem 0; }
.tour-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.tour-actions button { min-height: 44px; border: 1px solid var(--th-navy); border-radius: 8px; padding: .4rem .85rem; background: transparent; color: var(--th-navy); font-weight: 800; cursor: pointer; }
.tour-actions button:last-child { background: var(--th-navy); color: white; }
.demo-after { display: grid; gap: 1.4rem; padding-top: 2.5rem; padding-bottom: 4rem; }
.demo-qr-block { display: flex; align-items: center; gap: 1.5rem; border-top: 1px solid var(--th-rule); padding-top: 1.5rem; }
.demo-qr { display: grid; place-items: center; width: 126px; height: 126px; flex: 0 0 auto; border: 8px solid white; background: white; }
.demo-qr svg { width: 100%; height: 100%; }
.demo-qr-block h2, .demo-interest h2 { margin: 0; color: var(--th-navy); font: 700 2.1rem/1 var(--th-display); }
.demo-qr-block p, .demo-interest p { max-width: 60ch; margin: .35rem 0; }
.demo-qr-block a { display: inline-flex; min-height: 44px; align-items: center; color: var(--th-teal-dark); font-weight: 800; }
#install-guide { border-top: 1px solid var(--th-rule); padding: 1rem 0; }
#install-guide summary { display: flex; min-height: 44px; align-items: center; color: var(--th-navy); font-weight: 850; cursor: pointer; }
.install-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.install-steps p { max-width: 35ch; }
.demo-interest { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; border: 1px solid var(--th-rule); border-radius: 12px; padding: 1.3rem; background: white; }
.demo-interest form { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .7rem; }
.demo-interest label { font-size: .8rem; font-weight: 800; }
.demo-interest input { min-width: 0; min-height: 42px; border: 1px solid var(--th-rule); border-radius: 7px; padding: .5rem; background: #f5f6f7; }
.demo-interest button { grid-column: 1 / -1; min-height: 44px; border: 0; border-radius: 8px; background: #b8c5ca; color: #28404c; font-weight: 800; }
.demo-footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.5rem; }
.page-demo > .site-footer { width: 100%; max-width: none; background: var(--th-navy); }
.demo-footer p { max-width: 50ch; margin: 0; color: #dce8ef; }
@media (max-width: 850px) {
  .demo-hero { grid-template-columns: 1fr; gap: 1rem; }
  .demo-hero-actions { justify-content: flex-start; }
  #share-status { text-align: left; }
  .demo-layout { grid-template-columns: 1fr; }
  .demo-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-width: 0; border-right: 0; border-bottom: 1px solid var(--th-rule); padding: .5rem; }
  .demo-tabs button { min-width: 0; overflow-wrap: anywhere; text-align: center; }
}
@media (max-width: 620px) {
  .demo-header-label { display: none; }
  .demo-hero { padding-top: 2rem; }
  .demo-hero h1 { font-size: clamp(2.9rem, 13vw, 4rem); }
  .demo-hero-actions .button { flex: 1 1 100%; }
  .demo-topline { padding: 1rem; }
  .demo-topline h2 { min-height: 2em; }
  .demo-topline p { min-height: 3.1em; }
  .demo-controls { display: grid; padding: .75rem 1rem; }
  .sport-switch a, .view-switch button { flex: 1; }
  .demo-content { width: 100%; max-width: 100%; min-width: 0; padding: 1.2rem 1rem 1.5rem; }
  .demo-tabs button { padding: .4rem .1rem; font-size: .9rem; }
  .event-details { grid-template-columns: 1fr 1fr; }
  .event-details div:last-child { grid-column: 1 / -1; }
  .panel-heading { flex-wrap: wrap; }
  .chat-form > div, .sport-form > div { flex-direction: column; }
  .tour-card { display: block; }
  .tour-actions { margin-top: .8rem; }
  .tour-actions button { flex: 1; }
  .demo-qr-block { align-items: flex-start; }
  .demo-interest, .install-steps, .sport-stat-grid { grid-template-columns: 1fr; }
  .demo-footer { display: block; }
  .demo-footer p { margin-top: .75rem; }
}
