:root { color-scheme: light; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #17243a; background: #f3f6fa; }
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
button, a { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
[hidden] { display: none !important; }
.topbar { background: #172333; color: #fff; padding: 1rem max(1.25rem, calc((100% - 1200px) / 2)); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { color: white; font-weight: 750; font-size: 1.15rem; white-space: nowrap; }
.brand > span:last-child, .app-bar strong span { color: #56c5f6; }
.demo-label { color: #c3d1df; letter-spacing: .12em; font-size: .68rem; font-weight: 700; }
.container { width: min(1200px, calc(100% - 2.5rem)); margin: auto; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 2rem; padding: 2.75rem 0 1.5rem; }
.eyebrow, .kicker { color: #0877a6; font-size: .72rem; font-weight: 800; letter-spacing: .12em; margin: 0 0 .45rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.04em; margin-bottom: .65rem; }
.lead { color: #52647a; margin: 0; max-width: 680px; }
.intro-meta { display: flex; flex-wrap: wrap; gap: .5rem; min-width: max-content; }
.intro-meta span, .pill { font-size: .75rem; font-weight: 700; border-radius: 2rem; padding: .35rem .7rem; background: #e4eef5; color: #23536f; }
.notice { background: #fff9eb; color: #664b12; border: 1px solid #f3dda2; padding: .75rem 1rem; border-radius: .5rem; font-size: .86rem; margin-bottom: 1.25rem; }
.player { overflow: hidden; background: white; border: 1px solid #d6e0e9; border-radius: .85rem; box-shadow: 0 18px 45px rgba(28, 54, 75, .1); }
.app-bar { background: #283746; color: #e8f0f7; padding: .85rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.app-bar > span { font-size: .78rem; color: #c5d2dd; }
.player-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 450px; }
.chapters { background: #f6f9fc; border-right: 1px solid #e0e8ef; padding: 1.3rem .8rem; }
.chapters p { font-size: .65rem; color: #6a7c8e; letter-spacing: .1em; font-weight: 800; margin: 0 .7rem .75rem; }
.chapters button { text-align: left; width: 100%; color: #526479; background: transparent; border: 0; border-radius: .4rem; padding: .65rem .7rem; font-size: .83rem; }
.chapters button span { color: #8596a5; font-weight: 700; margin-right: .55rem; }
.chapters button[aria-current="step"] { background: #e2f2fa; color: #075b81; font-weight: 750; }
.stage { padding: 1.8rem 2rem; min-width: 0; }
.scene-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.scene h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); line-height: 1.2; margin-bottom: .4rem; letter-spacing: -.02em; }
.scene h3 { font-size: .95rem; margin-bottom: .35rem; }
.description { color: #617286; font-size: .93rem; margin-bottom: 1.3rem; }
.summary-row, .fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.25rem; }
.summary-row { grid-template-columns: 2fr 1fr; }
.summary-row > div, .fields > div, .field-full, .record-card > div { min-width: 0; }
.summary-row > div { border: 1px solid #dae5ed; border-radius: .5rem; background: #f8fbfd; padding: .75rem .9rem; }
.summary-row span, .fields span, .field-full span, .record-card span, .search-example > span { display: block; font-size: .74rem; color: #607387; margin-bottom: .3rem; }
.summary-row strong, .fields strong, .field-full strong, .record-card strong { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.site-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; }
.site-grid div { color: #7890a0; border: 1px solid #dfe8ef; border-radius: .4rem; padding: .65rem; font-size: .72rem; }
.site-grid b { display: block; color: #293d51; font-size: .84rem; margin-top: .2rem; }
.fields strong, .field-full strong { border: 1px solid #ccd9e3; border-radius: .4rem; padding: .65rem .75rem; background: #fff; }
.fields i { float: right; font-style: normal; color: #65798b; }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info-card { display: flex; gap: .85rem; align-items: flex-start; background: #f3f8fb; border: 1px solid #dcebf3; border-radius: .5rem; padding: 1rem; margin-top: 1rem; }
.info-card p, .result p { margin: 0; color: #596e80; font-size: .88rem; }
.icon { flex: 0 0 2rem; height: 2rem; display: grid; place-items: center; background: #d7effa; color: #006c9c; border-radius: .4rem; font-weight: 800; font-size: .85rem; }
.form-card { border: 1px solid #dce5ec; border-radius: .5rem; padding: 1rem; }
.form-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.status { color: #146748; background: #e7f6ee; border-radius: 2rem; padding: .25rem .6rem; font-size: .72rem; font-weight: 700; }
.fake-button { display: inline-block; background: #0879aa; color: white; padding: .45rem .8rem; border-radius: .35rem; font-size: .8rem; font-weight: 700; margin-top: .9rem; }
.table-wrap { overflow-x: auto; border: 1px solid #dce5ec; border-radius: .5rem; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .82rem; }
th, td { padding: .75rem; white-space: nowrap; border-bottom: 1px solid #e7edf2; }
th { background: #f6f9fb; color: #526679; font-size: .73rem; }
tbody tr:last-child td { border-bottom: 0; }
.record-card { border: 1px solid #dce5ec; border-radius: .5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.record-card > div { padding: .8rem 1rem; border-bottom: 1px solid #e9eef2; }
.search-example > div { display: flex; border: 1px solid #cbd9e3; border-radius: .4rem; overflow: hidden; }
.search-example strong { flex: 1; padding: .6rem .8rem; font-size: .9rem; }
.search-example b { background: #0879aa; color: white; padding: .6rem 1rem; font-size: .85rem; }
.result { margin-top: 1rem; padding: 1rem; border: 1px solid #dce5ec; border-radius: .5rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.result small { color: #718598; font-size: .65rem; font-weight: 800; letter-spacing: .08em; }
.result h3 { margin: .25rem 0; }
.chat { display: grid; gap: .8rem; }
.bubble { max-width: 85%; border-radius: .65rem; padding: .8rem 1rem; font-size: .9rem; }
.bubble small { font-size: .65rem; font-weight: 800; letter-spacing: .08em; }
.bubble p { margin: .3rem 0 0; }
.question { background: #e7f2f8; margin-left: auto; }
.answer { background: #f3f6f8; border: 1px solid #e0e8ee; }
.caption { color: #466176; background: #f5f9fc; border-left: 3px solid #38a9d8; padding: .7rem .9rem; margin: 1.2rem 0 0; font-size: .84rem; }
.player-footer { border-top: 1px solid #e0e8ef; padding: 1rem 1.3rem; }
.progress-label { display: flex; justify-content: space-between; gap: 1rem; color: #546a7c; font-size: .76rem; font-weight: 700; margin-bottom: .5rem; }
.progress-track { height: .35rem; background: #e5edf2; border-radius: 1rem; overflow: hidden; }
#progress-fill { width: 0; height: 100%; background: #138cbf; }
.controls, .control-group { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.controls { justify-content: space-between; margin-top: .9rem; }
.controls > span { color: #677b8d; font-size: .75rem; }
.controls button { border: 1px solid #cbd8e1; color: #314b5d; background: white; border-radius: .4rem; padding: .45rem .8rem; font-size: .8rem; font-weight: 700; }
.controls button.primary { color: white; background: #0879aa; border-color: #0879aa; min-width: 5rem; }
.controls button:disabled { opacity: .45; cursor: default; }
.no-script { color: #9d301d; font-size: .85rem; margin: .8rem 0 0; }
.closing { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 2.4rem 0; }
.closing h2 { margin: 0 0 .2rem; font-size: 1.3rem; }
.closing p { color: #617286; margin: 0; }
.closing a { color: white; text-decoration: none; background: #0879aa; border-radius: .4rem; padding: .7rem 1rem; font-weight: 700; white-space: nowrap; }
footer { color: #6c7f8e; text-align: center; font-size: .75rem; padding: 0 1rem 2rem; }
@media (max-width: 700px) {
  .intro, .closing { align-items: flex-start; flex-direction: column; }
  .intro { padding-top: 2rem; gap: .8rem; }
  .player-body { display: block; }
  .chapters { display: flex; overflow-x: auto; gap: .3rem; padding: .7rem; border-right: 0; border-bottom: 1px solid #e0e8ef; }
  .chapters p { display: none; }
  .chapters button { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .stage { padding: 1.25rem; }
  .site-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields { grid-template-columns: 1fr; }
  .fields.two, .summary-row { grid-template-columns: 1fr; }
  .bubble { max-width: 100%; }
}
@media (max-width: 400px) {
  .demo-label { display: none; }
  .app-bar { align-items: flex-start; flex-direction: column; gap: .2rem; }
  .scene-heading { flex-direction: column; margin-bottom: .7rem; }
  .record-card { grid-template-columns: 1fr; }
}
