/* room5.css — Room 5 · build and test the prototype. Bright scrolling page (same family as Room 2),
   big buttons, a plan canvas of Building 2, results cards. */
.r5 { position: fixed; inset: 0; z-index: 50; overflow-y: auto; overflow-x: hidden; background: linear-gradient(180deg, #FFEFE3 0, #FFF8F2 340px, #FFFCFA 100%); color: #1E2452; font-family: var(--f-body); -webkit-overflow-scrolling: touch; }
.r5.hidden { display: none; }
html.in-room5 #hud { display: none; }
.r5 button { cursor: pointer; font-family: var(--f-head); }
.r5 button:disabled { opacity: .5; cursor: not-allowed; }
.r5 :focus-visible { outline: 3px solid #F07A3C; outline-offset: 2px; border-radius: 12px; }
.r5 h1, .r5 h2, .r5 h3 { color: #1E2452; margin: 0; }
.r5 h3 { font-family: var(--f-head); font-size: 1.05rem; margin-bottom: 8px; }
.r5 .flip { display: inline-flex; transform: scaleX(-1); }
.r5 .small { font-size: .85rem; } .r5 .muted { color: #6B6890; }
.r5 textarea, .r5 input[type=text], .r5 select { width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: 14px; border: 2px solid #EADFD6; background: #fff; color: #1E2452; }

.r5-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t, 0px)) 16px 10px; background: rgba(255, 255, 255, .93); backdrop-filter: blur(10px); box-shadow: 0 6px 24px -14px rgba(30, 36, 82, .4); }
.r5-head .ttl { flex: 1; display: grid; text-align: center; }
.r5-head .ttl b { font-family: var(--f-head); font-weight: 600; font-size: 1.12rem; }
.r5-head .ttl span { font-size: .85rem; color: #6B6890; }
.r5-nav { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 2px solid #F3D9C6; background: #fff; color: #1E2452; font-size: 1rem; }
.r5-nav.next { background: #F07A3C; border-color: #F07A3C; color: #fff; }
.r5-wrap { max-width: 1180px; margin: 0 auto; padding: 18px 16px 130px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.r5-wrap > *, .r5-sec > * { min-width: 0; }
.r5-sec { grid-template-columns: minmax(0, 1fr); }

.r5-banner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
.r5-mission, .r5-group, .r5-card { background: #fff; border-radius: 22px; padding: 16px 18px; box-shadow: 0 14px 40px -26px rgba(30, 36, 82, .55); }
.r5-mission .kick, .r5-group .kick { font-family: var(--f-head); font-size: .85rem; color: #F07A3C; }
.r5-mission h1 { font-family: var(--f-head); font-size: 1.45rem; margin: 4px 0 6px; }
.r5-mission p { margin: 4px 0; line-height: 1.55; }
.r5-group b { display: block; margin: 4px 0; }
.r5-totest { background: #FFF5D6; border-radius: 14px; padding: 8px 12px; margin-top: 8px; }
.r5-totest ul { margin: 4px 0 0; padding-left: 18px; }
.r5-progress { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 12px 0 0; }
.r5-progress a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px 0 6px; border-radius: 999px; background: #F6F1EC; color: #1E2452; text-decoration: none; font-size: .92rem; }
.r5-progress .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; font-weight: 700; }
.r5-progress li.done a { background: #DDF5E7; } .r5-progress li.done .n { background: #45C486; color: #fff; }

.r5-sec { display: grid; gap: 12px; scroll-margin-top: 80px; }
.r5-sechead { display: flex; gap: 12px; align-items: center; }
.r5-sechead .n { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: #F07A3C; color: #fff; font: 700 1.3rem var(--f-head); }
.r5-sechead.done .n { background: #45C486; }
.r5-sechead h2 { font-family: var(--f-head); font-size: 1.3rem; }
.r5-sechead p { margin: 2px 0 0; color: #5D5A86; }
.r5-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.r5-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.r5-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 2px solid #F07A3C; background: #F07A3C; color: #fff; font-size: 1rem; }
.r5-btn.ghost { background: #fff; color: #1E2452; border-color: #F3D9C6; }
.r5-btn.gold { background: #FFE7A8; border-color: #E8B54A; color: #5A3D00; }
.r5-chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid #EADFD6; background: #fff; color: #1E2452; font-size: .95rem; }
.r5-chip.on { background: #1E2452; color: #fff; border-color: #1E2452; }
.r5-x { border: 0; background: #FDE3E3; color: #B42323; border-radius: 50%; width: 32px; height: 32px; margin-left: 6px; }
.r5-warn { background: #FFF1E6; border: 2px solid #F7C9A6; border-radius: 14px; padding: 10px 12px; margin-top: 10px; }
.r5-hint { background: #EEF4FF; border-radius: 14px; padding: 10px 12px; margin-top: 10px; font-size: .92rem; }
.r5-err { color: #C62E2E; min-height: 1.2em; font-size: .92rem; }

/* program */
.r5-boxes { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.r5-box { display: grid; gap: 2px; padding: 8px 12px; border-radius: 12px; background: #F2FBF5; border-left: 5px solid #45C486; }
.r5-box.unk { background: #FFF6E5; border-left-color: #E8B54A; }
.r5-box .lab { font-weight: 600; }
.r5-box .read { font-size: .88rem; color: #4A4872; }
.r5-edit summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-family: var(--f-head); color: #F07A3C; }
.r5-editor { margin-top: 8px; }

/* place */
.r5-budget { display: grid; gap: 4px; margin-bottom: 10px; }
.r5-budget .bar { height: 12px; border-radius: 999px; background: #F3ECE6; overflow: hidden; }
.r5-budget .bar i { display: block; height: 100%; background: linear-gradient(90deg, #45C486, #F2B33D); }
.r5-route { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.r5-route b { min-width: 48px; }
.r5-mine ul { padding-left: 4px; list-style: none; margin: 6px 0 0; display: grid; gap: 4px; }
.r5-mine li { display: flex; align-items: center; justify-content: space-between; font-size: .9rem; }
.r5-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .82rem; }
.r5-legend span { display: inline-flex; align-items: center; gap: 4px; }
.r5-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid rgba(0,0,0,.1); }
.r5-effs { display: grid; gap: 6px; margin-top: 10px; }
.r5-eff { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; border: 2px solid #EFE6DE; cursor: pointer; }
.r5-eff small { display: block; color: #6B6890; }

/* test */
.r5-nova { display: flex; gap: 12px; align-items: flex-start; }
.r5-nova .nova-face { flex: none; width: 52px; height: 52px; }
.r5-nova ul { margin: 6px 0; padding-left: 18px; display: grid; gap: 4px; }
.r5-nova li small, .r5-tiplist li small { display: block; color: #4A4872; }
.r5-nova li.bad, .r5-tiplist li.bad { color: #B42323; }
.r5-tiplist { padding-left: 18px; display: grid; gap: 8px; }
.r5-events { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; max-height: 320px; overflow: auto; font-size: .9rem; }
.r5-events li { padding: 5px 10px; border-radius: 10px; background: #F7F5FB; }
.r5-events li.bad { background: #FDE8E8; } .r5-events li.alert { background: #FFF4D6; } .r5-events li.sys { background: #EAF1FF; }
.r5-res { display: grid; gap: 12px; }
.r5-ver { font-size: .9rem; color: #5D5A86; }
.r5-tablewrap { overflow-x: auto; }
.r5-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.r5-table th, .r5-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #F0E9E2; white-space: nowrap; }
.r5-table th { font-family: var(--f-head); font-weight: 600; background: #FBF6F1; }
.r5-table td.bad { color: #B42323; }
.r5-table tr.best td { background: #EAF8F0; }
.r5-nova.after .good ul, .r5-nova.after .bad ul { list-style: none; padding-left: 0; }
.r5-nova.after .next ol { padding-left: 20px; }
.r5-nova.after .cmp { font-weight: 600; margin: 4px 0; }
.r5-checks { display: flex; flex-wrap: wrap; gap: 10px; }
.r5-checks span { padding: 8px 12px; border-radius: 999px; background: #fff; border: 2px solid #EFE6DE; }
.r5-checks span.ok { border-color: #45C486; background: #EAF8F0; }
.r5-spark { background: #F0FAF2; border-radius: 18px; padding: 12px 14px; }
.r5-spark p { margin: 4px 0 8px; }
.r5-submit { display: grid; gap: 10px; }
.r5-submit label { display: grid; gap: 6px; }
.r5-done { background: #EAF8F0; }

.r5-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.r5-teacher { border: 0; background: none; color: #6B6890; text-decoration: underline; min-height: 44px; }
.r5-fab { position: fixed; right: 16px; bottom: calc(16px + var(--safe-b, 0px)); z-index: 4; display: flex; align-items: center; gap: 8px; padding: 6px 16px 6px 6px; border-radius: 999px; border: 0; background: #1E2452; color: #fff; box-shadow: 0 12px 30px -12px rgba(30, 36, 82, .8); text-align: left; }
.r5-fab .nova-face { width: 44px; height: 44px; }
.r5-fab small { display: block; font-family: var(--f-body); font-size: .75rem; opacity: .8; }

@media (max-width: 860px) {
  .r5-banner, .r5-cols { grid-template-columns: minmax(0, 1fr); }
  .r5-detail details { min-width: 0; overflow: hidden; }
  .r5-head .ttl b { font-size: 1rem; }
  .r5-nav { padding: 0 12px; }
  .r5-nav .tx { display: none; }
  .r5-head .ttl span { display: none; }
}

/* ---------- simulator stage ---------- */
.r5 .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.r5-stage { position: relative; height: clamp(420px, calc(100vh - 150px), 820px); border-radius: 24px; overflow: hidden; background: #DDEFFF; box-shadow: 0 18px 50px -28px rgba(30, 36, 82, .7); }
.r5-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.r5-ov { position: absolute; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.r5-ov > * { pointer-events: auto; }
.r5-ov.tl { top: 12px; left: 12px; flex-direction: column; align-items: flex-start; }
.r5-ov.tr { top: 12px; right: 12px; justify-content: flex-end; max-width: 60%; }
.r5-ov.tc { top: 64px; left: 50%; transform: translateX(-50%); max-width: 80%; }
.r5-ov.bl { bottom: 12px; left: 12px; max-width: 58%; flex-direction: column; align-items: flex-start; gap: 4px; }
.r5-ov.br { bottom: 12px; right: 12px; align-items: flex-end; }
.r5-hintov:not(:empty) { background: rgba(30, 36, 82, .85); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: .92rem; text-align: center; }
.r5-ovg { display: flex; gap: 4px; background: rgba(255, 255, 255, .9); padding: 4px; border-radius: 999px; box-shadow: 0 6px 18px -10px rgba(30, 36, 82, .6); }
.r5-ovb { min-height: 40px; min-width: 40px; padding: 0 12px; border-radius: 999px; border: 0; background: transparent; color: #1E2452; font-size: .95rem; }
.r5-ovb.on { background: #1E2452; color: #fff; }
.r5-pill { background: rgba(255, 255, 255, .92); border-radius: 999px; padding: 6px 12px; font-family: var(--f-head); font-size: .92rem; box-shadow: 0 6px 18px -10px rgba(30, 36, 82, .6); }
.r5-pill.big { font-size: 1.15rem; background: #1E2452; color: #fff; }
.r5-pill.alert { background: #FFC93C; } .r5-pill.bad { background: #E04848; color: #fff; } .r5-pill.sys { background: #DDE6FF; }
.r5-strip small { background: rgba(255, 255, 255, .9); border-radius: 999px; padding: 2px 10px; }
.r5-stripbox { display: flex; flex-wrap: wrap; gap: 4px; }
.r5-node { background: rgba(255, 255, 255, .88); border-radius: 10px; padding: 4px 8px; font-size: .82rem; border: 2px solid transparent; }
.r5-node.q { border-color: #C9BBFF; }
.r5-node.did { background: #DDF5E7; } .r5-node.unk { border-color: #E8B54A; border-style: dashed; }
.r5-node.now { background: #FFC93C; border-color: #E8A21B; transform: scale(1.08); box-shadow: 0 0 0 4px rgba(255, 201, 60, .4); }
.r5-run { border: 0; border-radius: 999px; background: linear-gradient(135deg, #F07A3C, #E04848); color: #fff; min-height: 56px; padding: 0 24px; font-size: 1.1rem; box-shadow: 0 12px 26px -12px rgba(224, 72, 72, .9); }
.r5-run.big { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 24px 8px 12px; min-height: 64px; }
.r5-run.big .em { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .25); font-size: 1.3rem; }
.r5-run.big b { display: block; font-size: 1.15rem; } .r5-run.big small { display: block; font-family: var(--f-body); font-size: .82rem; opacity: .95; }

/* result over the scene */
.r5-resov { position: absolute; inset: auto 12px 12px 12px; z-index: 3; display: flex; justify-content: center; pointer-events: none; }
.r5-resov.hidden { display: none; }
.r5-rescard { box-sizing: border-box; min-width: 0; pointer-events: auto; position: relative; width: min(760px, 100%); max-height: calc(100% - 80px); overflow: auto; background: rgba(255, 255, 255, .97); border-radius: 22px; padding: 14px 16px; box-shadow: 0 20px 50px -20px rgba(30, 36, 82, .8); display: grid; gap: 10px; border-top: 6px solid #F2B33D; }
.r5-rescard.good { border-top-color: #1FAE68; } .r5-rescard.bad { border-top-color: #E04848; }
.r5-x.close { position: absolute; top: 8px; right: 8px; }
.r5-reshead { display: flex; gap: 12px; align-items: center; }
.r5-score { display: grid; place-items: center; min-width: 110px; padding: 6px 10px; border-radius: 18px; background: #FFF1D0; }
.r5-rescard.good .r5-score { background: #DDF5E7; } .r5-rescard.bad .r5-score { background: #FDE3E3; }
.r5-score .face { font-size: 1.8rem; } .r5-score b { font: 700 2.2rem var(--f-head); line-height: 1; } .r5-score small { font-size: .8rem; }
.r5-kpis { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.r5-kpis .kpi.big { display: none; }
.kpi { background: #F7F5FB; border-radius: 14px; padding: 8px 10px; display: grid; gap: 2px; }
.kpi small { font-size: .78rem; color: #5D5A86; } .kpi b { font: 700 1.25rem var(--f-head); }
.r5-rcs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.r5-rc { display: grid; gap: 2px; padding: 8px 10px; border-radius: 14px; background: #FFF6E0; font-size: .86rem; }
.r5-rc.ok { background: #EAF8F0; } .r5-rc.bad { background: #FDE8E8; }
.r5-rc b { font-family: var(--f-head); } .r5-rc .big { font-weight: 700; font-size: .95rem; }
.r5-nova.after > div { min-width: 0; }
.r5-nova.after { background: #F4F1FF; border-radius: 14px; padding: 8px 10px; }
.r5-nova.after ul { list-style: none; padding: 0; margin: 2px 0; }
.r5-nova.after .next1 { font-weight: 600; margin: 4px 0 0; }
.r5-nova.after .nova-face { width: 44px; height: 44px; }
.r5-replay { display: flex; align-items: center; gap: 8px; }
.r5-replay input[type=range] { flex: 1; accent-color: #F07A3C; }

/* dock under the scene */
.r5-dock { display: grid; gap: 10px; background: #fff; border-radius: 22px; padding: 12px 14px; box-shadow: 0 14px 40px -26px rgba(30, 36, 82, .55); }
.r5-dockrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.r5-dockrow .lbl { font-family: var(--f-head); }
.r5-budget { min-width: 170px; margin: 0; }
.r5-tools { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.r5-tool { display: grid; justify-items: center; gap: 0; min-width: 92px; min-height: 76px; padding: 6px 8px; border-radius: 16px; border: 2px solid #EFE6DE; background: #fff; color: #1E2452; text-align: center; }
.r5-tool .em { font-size: 1.7rem; line-height: 1.1; }
.r5-tool b { font-size: .82rem; line-height: 1.2; }
.r5-tool small { font-family: var(--f-body); font-size: .74rem; color: #6B6890; }
.r5-tool.on { border-color: #F07A3C; background: #FFF1E6; box-shadow: 0 0 0 3px rgba(240, 122, 60, .25); }
.r5-route { margin: 0; }
.r5-scens { display: flex; gap: 8px; flex-wrap: wrap; }
.r5-scen { display: grid; justify-items: center; gap: 2px; min-width: 120px; flex: 1; padding: 10px 8px; border-radius: 18px; border: 2px solid #EFE6DE; background: #fff; color: #1E2452; text-align: center; }
.r5-scen .em { font-size: 1.8rem; }
.r5-scen small { display: none; }
.r5-scen.on { border-color: #1E2452; background: #F1F0FA; box-shadow: 0 0 0 3px rgba(30, 36, 82, .15); }
.r5-scen.on small { display: block; font-family: var(--f-body); font-size: .76rem; color: #5D5A86; }
.r5-scen.tried b::after { content: ' ✓'; color: #1FAE68; }
.r5-tips .r5-nova { background: #fff; border-radius: 18px; padding: 10px 12px; align-items: center; box-shadow: 0 10px 30px -24px rgba(30, 36, 82, .6); }
.r5-tips small { display: block; color: #5D5A86; }
.r5-link { border: 0; background: none; color: #F07A3C; text-decoration: underline; min-height: 36px; padding: 0; font-size: .9rem; }
.r5-detail summary { cursor: pointer; font-family: var(--f-head); min-height: 40px; }

@media (max-width: 760px) {
  .r5-stage { height: clamp(360px, 62vh, 560px); border-radius: 18px; }
  .r5-ov.tr { max-width: 70%; } .r5-pill { font-size: .8rem; padding: 4px 8px; }
  .r5-ov.bl { display: none; }
  .r5-hintov small { display: none; }
  .r5-ov.tc { top: 104px; font-size: .85rem; }
  .r5-ovb { min-height: 36px; min-width: 36px; padding: 0 8px; font-size: .85rem; }
  .r5-run.big { min-height: 54px; padding: 6px 16px 6px 8px; } .r5-run.big .em { width: 38px; height: 38px; }
  .r5-resov { inset: 8px; align-items: flex-end; }
  .r5-rescard { max-height: 100%; padding: 12px; }
  .r5-reshead { flex-direction: column; align-items: stretch; }
  .r5-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .r5-rcs { grid-template-columns: 1fr; }
  .r5-rc { grid-template-columns: 1fr 1fr; }
  .r5-ov.tl { gap: 4px; } .r5-ov.tr { gap: 4px; }
  .r5-pill.sys, .r5-pill.alert, .r5-pill.bad { font-size: .72rem; }
  .r5-score { flex-direction: row; display: flex; gap: 8px; justify-content: center; }
  .r5-score b { font-size: 1.8rem; }
  .r5-tool { min-width: 74px; min-height: 70px; }
  .r5-dockrow { flex-direction: column; align-items: stretch; }
  .r5-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .r5-scen { min-width: 90px; }
}

/* group: members, reactions, talk */
.r5-members { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.r5-members > b { font-family: var(--f-head); margin-right: 4px; }
.r5-members > small { color: #6B6890; flex-basis: 100%; }
.r5-mem { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: #F3F0FB; font-size: .9rem; }
.r5-mem i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #7A5CF0; color: #fff; font-style: normal; font-weight: 700; font-size: .85rem; }
.r5-mem.me { background: #FFF1E6; } .r5-mem.me i { background: #F07A3C; }
.r5-mem.bot i { background: #45A6C4; }
.r5-ov.bc { bottom: 86px; left: 50%; transform: translateX(-50%); }
.r5-reactbar { background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 2px 4px; gap: 0; box-shadow: 0 6px 18px -10px rgba(30, 36, 82, .6); }
.r5-reactbar .r5-ovb { font-size: 1.2rem; min-width: 40px; padding: 0 6px; }
.r5-floats { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.r5-float { position: absolute; bottom: 90px; display: grid; justify-items: center; animation: r5up 2.6s ease-out forwards; }
.r5-float .e { font-size: 2.2rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,.2)); }
.r5-float small { background: rgba(30, 36, 82, .8); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .75rem; }
@keyframes r5up { 0% { transform: translateY(20px) scale(.6); opacity: 0; } 15% { transform: translateY(0) scale(1.1); opacity: 1; } 100% { transform: translateY(-260px) scale(1); opacity: 0; } }
.r5-by { color: #5D5A86; padding-right: 36px; }
.r5-chat { display: grid; gap: 8px; }
.r5-chatlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-height: 280px; overflow: auto; }
.r5-chatlist li { flex: none; }
.r5-chatlist li { padding: 6px 10px; border-radius: 12px; background: #F7F5FB; max-width: 88%; font-size: .93rem; }
.r5-chatlist li.me { align-self: flex-end; background: #FFF1E6; }
.r5-chatlist li.nova { background: #EEF4FF; max-width: 100%; }
.r5-chatlist li.nova.result { background: #FFF6D8; }
.r5-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.r5-quick .r5-chip { font-size: .85rem; min-height: 36px; }
.r5-chatin { display: flex; gap: 8px; }
.r5-chatin input { flex: 1; }
@media (max-width: 760px) { .r5-ov.bc { bottom: 76px; } .r5-reactbar .r5-ovb { min-width: 34px; font-size: 1.05rem; } }

/* ---------- Room 5 in the 3D world ---------- */
.r5-world { background: #CFC5F0; cursor: crosshair; overflow: hidden; }
.r5-world > canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; touch-action: none; }
.r5-stage.walking .r5-world { cursor: pointer; }
.r5-pop3d { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.r5-pop { position: absolute; left: 0; top: 0; padding: 6px 13px; border-radius: 999px; color: #fff; font: 600 15px "Mitr", "Noto Sans Thai", sans-serif; white-space: nowrap; background: #3C5BD8; box-shadow: 0 8px 18px -10px rgba(0,0,0,.6); }
.r5-pop.bad { background: #E04848; } .r5-pop.good { background: #1FAE68; } .r5-pop.alert { background: #F2A31B; }
.r5-modeb { padding-inline: 12px; white-space: nowrap; }
.r5-modeb.on { background: #6B4FD8; color: #fff; }
