:root {
  color-scheme: dark;
  --bg: #080a10;
  --bar: #10141d;
  --panel: #0d1118;
  --panel-2: #131925;
  --panel-3: #182233;
  --line: #283246;
  --line-strong: #40516f;
  --text: #f2f5fb;
  --muted: #99a7bc;
  --soft: #738197;
  --blue: #a9c9f5;
  --blue-2: #6da9ff;
  --gold: #d6bd7e;
  --green: #90d7c0;
  --red: #d18686;
  --violet: #c596d8;
  --shadow: rgba(0, 0, 0, 0.34);
  --radius: 8px;
}
* { box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; overflow: hidden; }
body {
  margin: 0;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.42;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.app {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
  background: var(--bg);
  border: 1px solid var(--line-strong);
}
.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bar);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-orb {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 35% 32%, #f3fbff 0 8%, #c3d4ef 30%, #6e7f9c 62%, #263145 100%);
  box-shadow: 0 0 16px rgba(169, 201, 245, 0.55);
}
.brand-title { font-family: Georgia, "Times New Roman", serif; font-size: 1.02rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.controls { display: flex; align-items: center; justify-content: end; gap: 10px; min-width: 0; }
.segmented, .icon-button {
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; background: #0b0f17; padding: 3px;
}
.segmented button, .icon-button {
  color: var(--muted); background: transparent; border: 0; border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 700;
}
.segmented button.active { color: #07101b; background: var(--blue); }
.segmented button:disabled { opacity: .44; cursor: not-allowed; }
.icon-button { border-color: var(--line); color: var(--text); }
.icon-button.active { background: var(--blue); color: #07101b; }
.main-grid { display: grid; grid-template-columns: 56px minmax(0, var(--sidebar-width, 200px)) minmax(420px, 1fr) minmax(0, var(--right-rail-width, 262px)); min-height: 0; overflow: hidden; }
.realm-rail, .sidebar, .right-rail { border-color: var(--line); background: var(--panel); min-width: 0; }
.realm-rail { border-right: 1px solid var(--line); background: #070a10; padding: 10px 8px; overflow: visible; position: relative; z-index: 4; }
.realm-list { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.server-button { appearance: none; width: 40px; height: 40px; border: 1px solid transparent; border-radius: 15px; background: #151922; color: var(--text); display: grid; place-items: center; font-size: 11px; font-weight: 850; letter-spacing: .02em; position: relative; padding: 0; }
.server-button.active { border-color: var(--blue); background: var(--blue); color: #07101b; border-radius: 13px; }
.server-button.locked { color: var(--muted); background: #10141d; cursor: not-allowed; opacity: .74; }
.server-button::after { content: attr(data-server-label); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%) translateX(-4px); background: #111722; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text); font-size: 12px; font-weight: 700; letter-spacing: 0; line-height: 1; padding: 7px 9px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s ease, transform .12s ease; box-shadow: 0 10px 24px rgba(0,0,0,.34); z-index: 20; }
.server-button:hover::after, .server-button:focus-visible::after { opacity: 1; transform: translateY(-50%) translateX(0); }
.server-lock { position: absolute; right: -2px; bottom: -2px; width: 15px; height: 12px; border: 1px solid var(--line-strong); border-radius: 3px; background: #080c13; box-shadow: 0 0 0 1px #070a10; }
.server-lock::before { content: ""; position: absolute; left: 3px; top: -7px; width: 7px; height: 7px; border: 2px solid var(--muted); border-bottom: 0; border-radius: 7px 7px 0 0; }
.sidebar { border-right: 1px solid var(--line); overflow: visible; position: relative; min-height: 0; }
.sidebar-content { height: 100%; min-height: 0; overflow: hidden; padding: 14px 12px; display: flex; flex-direction: column; }
.sidebar-resizer { appearance: none; position: absolute; right: -6px; top: 0; bottom: 0; z-index: 6; width: 12px; border: 0; padding: 0; background: transparent; cursor: ew-resize; }
.sidebar-resizer::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 2px; border-radius: 999px; background: var(--line-strong); opacity: .35; transition: opacity .12s ease, background .12s ease; }
.sidebar-resizer:hover::before, .sidebar-resizer:focus-visible::before, .resizing-sidebar .sidebar-resizer::before { background: var(--blue); opacity: .9; }
.right-rail { border-left: 1px solid var(--line); overflow: visible; position: relative; min-height: 0; }
.right-rail-content { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 10px 10px 8px 14px; }
.rail-resizer { appearance: none; position: absolute; left: -6px; top: 0; bottom: 0; z-index: 6; width: 12px; border: 0; padding: 0; background: transparent; cursor: ew-resize; }
.rail-resizer::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 2px; border-radius: 999px; background: var(--line-strong); opacity: .35; transition: opacity .12s ease, background .12s ease; }
.rail-resizer:hover::before, .rail-resizer:focus-visible::before, .resizing-rail .rail-resizer::before { background: var(--blue); opacity: .9; }
.right-rail.collapsed { border-left-color: transparent; }
.right-rail.collapsed .right-rail-content { visibility: hidden; pointer-events: none; padding: 0; }
.right-rail.collapsed .rail-resizer { left: -14px; width: 18px; }
.side-title, .nav-group-label { color: var(--blue); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; margin: 0 0 9px; }
.nav-group-label { margin-top: 14px; }
.search-box { width: 100%; border: 1px solid var(--line); border-radius: 999px; background: #0a0e15; color: var(--text); padding: 8px 10px; outline: none; margin-bottom: 14px; }
.character-list { display: grid; align-content: start; gap: 5px; flex: 1 1 auto; min-height: 0; overflow: auto; padding-right: 2px; }
.character-list::-webkit-scrollbar, .location-list::-webkit-scrollbar { width: 6px; }
.character-list::-webkit-scrollbar-thumb, .location-list::-webkit-scrollbar-thumb { background: #5f6876; border-radius: 999px; }
.character-button {
  width: 100%; min-height: 40px; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: center;
  color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 5px 6px; text-align: left;
}
.character-button.active { background: var(--panel-3); border-color: var(--line-strong); }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #1d2740; color: var(--blue); font-weight: 800; font-size: 12px; }
.avatar.ranni { background: radial-gradient(circle at 34% 30%, #eef4ff, #a8bce9 42%, #586a91 100%); color: #111827; }
.avatar.player { background: #25324d; color: var(--gold); }
.avatar.has-image { overflow: hidden; color: transparent; background: #0b0f17; border: 1px solid rgba(169,201,245,.3); }
.avatar.has-image img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.name { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { display: none; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.show-flags .status { display: block; }
.location-map-panel { flex: 0 0 clamp(168px, 25vh, 238px); min-height: 0; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.location-map-header { display: flex; align-items: center; justify-content: space-between; color: var(--blue); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 850; }
.location-expand { appearance: none; border: 1px solid var(--line); border-radius: 5px; background: #0b0f17; color: var(--muted); width: 24px; height: 22px; display: grid; place-items: center; padding: 0; }
.location-expand svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.current-location-card { border: 1px solid rgba(144,215,192,.42); border-radius: 6px; background: #0b0f17; padding: 6px 7px; min-width: 0; }
.current-location-name { color: var(--text); font-size: 11px; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.current-location-detail { color: var(--muted); font-size: 9.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-list { display: grid; align-content: start; gap: 3px; min-height: 0; overflow: auto; scrollbar-width: thin; padding-right: 2px; }
.location-region { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; padding: 5px 2px 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-row { appearance: none; width: 100%; border: 1px solid rgba(52,63,82,.72); border-radius: 5px; background: #0b0f17; color: var(--text); padding: 4px 6px; text-align: left; min-width: 0; cursor: pointer; }
.location-row.current { border-color: rgba(144,215,192,.7); background: #101923; }
.location-row.inspected { border-color: rgba(164,198,255,.78); background: #101827; box-shadow: inset 3px 0 0 rgba(164,198,255,.62); }
.location-row.locked { color: var(--soft); cursor: not-allowed; opacity: .66; }
.location-row:hover:not(.locked), .location-row:focus-visible:not(.locked) { border-color: rgba(164,198,255,.72); outline: 0; }
.location-name { display: block; font-size: 10.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-detail { display: block; color: var(--muted); font-size: 9.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; overflow: hidden; }
.channel-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); background: #0b0f17; }
.channel-title { display: flex; gap: 12px; align-items: baseline; min-width: 0; }
.hash { color: var(--blue-2); font-weight: 800; }
.route-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-counter { display: none; color: var(--blue); font-size: 12px; }
.show-dev-details .step-counter { display: block; }
.timeline { overflow: auto; padding: 18px 20px 28px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--blue); font-size: 12px; margin: 18px 0 12px; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.divider-label { display: none; color: var(--muted); overflow-wrap: anywhere; }
.show-flags .divider-label { display: inline; }
@keyframes message-whoop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.message { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; max-width: 720px; margin: 10px 0; animation: message-whoop .16s cubic-bezier(.2,.86,.22,1); }
.message.player { grid-template-columns: minmax(0, 1fr) 36px; margin-left: auto; }
.message.player .message-body { order: 1; align-items: end; }
.message.player .avatar { order: 2; }
.message-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.message-meta { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 12px; min-width: 0; }
.message-meta strong { color: var(--text); font-size: 13px; flex: 0 0 auto; }
.meta-node { display: none; color: var(--muted); overflow-wrap: anywhere; }
.show-flags .meta-node { display: inline; }
.flag-summary { display: none; position: relative; max-width: min(300px, 44vw); border: 1px solid rgba(214,189,126,.42); border-radius: 999px; color: var(--gold); background: rgba(214,189,126,.08); padding: 2px 7px; line-height: 1.2; font-size: 10px; min-width: 0; }
.show-flags .flag-summary { display: inline-flex; align-items: center; }
.flag-summary-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag-summary::after { content: attr(data-tooltip); position: absolute; left: 0; top: calc(100% + 7px); min-width: 220px; max-width: min(420px, 70vw); white-space: pre-wrap; background: #111722; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text); font-size: 11px; line-height: 1.35; padding: 8px 9px; box-shadow: 0 14px 30px rgba(0,0,0,.38); opacity: 0; pointer-events: none; transform: translateY(-3px); transition: opacity .12s ease, transform .12s ease; z-index: 30; }
.flag-summary:hover::after, .flag-summary:focus-visible::after { opacity: 1; transform: translateY(0); }
.bubble {
  width: fit-content; max-width: min(100%, 620px); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  box-shadow: 0 8px 22px rgba(0,0,0,.18); overflow-wrap: anywhere;
}
.player .bubble { background: #1b2942; border-color: #4a5f84; }
.choice .bubble { border-color: #55709b; }
.card-lines { display: grid; gap: 7px; }
.card-line { white-space: pre-wrap; }
.route-event { max-width: 640px; margin: 12px auto; border: 1px solid rgba(164,198,255,.35); border-radius: 8px; background: rgba(12, 18, 29, .92); padding: 9px 12px; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: message-whoop .16s cubic-bezier(.2,.86,.22,1); }
.route-event.world-action { border-color: rgba(144,215,192,.42); }
.route-event.curation-warning { border-color: rgba(214,189,126,.5); }
.route-event.route-stall { border-color: rgba(209,134,134,.48); }
.route-event.scene-break { max-width: none; margin: 16px 0 8px; border: 0; border-radius: 0; background: transparent; padding: 0; box-shadow: none; display: flex; align-items: center; gap: 12px; }
.route-event.scene-break::before, .route-event.scene-break::after { content: ""; height: 1px; background: var(--line); flex: 1; min-width: 30px; }
.route-event.scene-break .route-event-kicker, .route-event.scene-break .route-event-title, .route-event.scene-break .route-event-detail { display: none; }
.route-event-kicker { color: var(--blue); text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 800; }
.route-event-location { color: var(--gold); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; margin-top: 3px; }
.route-event.scene-break .route-event-location { margin: 0; color: var(--blue); font-size: 10.5px; max-width: min(430px, 62vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-event-title { color: var(--text); font-weight: 800; margin-top: 2px; }
.route-event-detail { color: var(--muted); font-size: 12px; margin-top: 3px; }
.scene-emote { max-width: 660px; margin: 0 auto 14px; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: 13px; font-style: italic; line-height: 1.45; text-align: center; animation: message-whoop .16s cubic-bezier(.2,.86,.22,1); }
.scene-emote-detail { color: var(--soft); font-size: 11.5px; margin-top: 2px; }
.response-tray { border-top: 1px solid var(--line); background: #0b0f17; padding: 8px 20px 10px; min-height: 58px; }
.response-kicker { color: var(--blue); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 800; margin-bottom: 5px; }
.response-options { display: grid; gap: 5px; }
.response-selection { margin-bottom: 8px; }
.response-selection .response-kicker { color: var(--green); }
.response-choice { appearance: none; width: 100%; min-height: 34px; border: 1px solid var(--line); border-radius: 6px; background: #101620; color: var(--text); padding: 5px 8px; text-align: left; font-weight: 750; display: flex; align-items: center; gap: 8px; line-height: 1.15; }
.response-choice:hover, .response-choice:focus-visible { border-color: var(--blue); outline: 0; }
.response-choice.locked { color: var(--soft); border-color: rgba(214,189,126,.38); cursor: pointer; }
.response-choice.location-action, .response-choice.world-action, .response-choice.rest-action, .response-choice.review-action { border-color: rgba(144,215,192,.42); background: #0d171c; }
.response-choice.continue-action { border-style: dashed; color: var(--blue); max-width: 160px; justify-content: center; }
.response-choice-kicker-small { display: inline-flex; flex: 0 0 auto; color: var(--gold); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.response-choice-label { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.response-choice-reason { display: block; color: var(--muted); font-size: 10.5px; font-weight: 600; margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guidance-card { border: 1px solid rgba(214,189,126,.42); border-radius: 7px; background: rgba(214,189,126,.08); color: var(--text); padding: 8px 10px; margin-bottom: 8px; }
.guidance-kicker { color: var(--gold); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.guidance-detail { color: var(--muted); font-size: 12px; margin-top: 3px; }
.guidance-choice-list { display: grid; gap: 5px; margin-top: 7px; }
.guidance-choice { appearance: none; width: 100%; border: 1px solid rgba(214,189,126,.38); border-radius: 6px; background: rgba(214,189,126,.08); color: var(--text); text-align: left; padding: 6px 8px; cursor: pointer; }
.guidance-choice-label { display: block; font-size: 12px; font-weight: 800; }
.guidance-choice-reason { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.flag-panel { display: none; width: fit-content; max-width: 100%; border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--muted); padding: 7px 9px; font-size: 11px; background: #0a0e15; }
.show-flags .flag-panel { display: block; }
.flag-panel code { color: var(--blue); overflow-wrap: anywhere; }
.rail-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; flex: 0 0 auto; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.rail-tab { appearance: none; border: 1px solid var(--line); border-radius: 6px; background: #0b0f17; color: var(--muted); font-size: 10.5px; font-weight: 800; line-height: 1; padding: 7px 4px; text-align: center; }
.rail-tab.active { background: var(--blue); border-color: var(--blue); color: #07101b; }
.rail-tab-panel { display: none; min-height: 0; flex: 1 1 auto; overflow: hidden; }
.rail-tab-panel.active { display: flex; flex-direction: column; }
.rail-section { border-bottom: 1px solid var(--line); padding: 8px 0; margin: 0; min-height: 0; display: flex; flex-direction: column; flex: 1 1 0; }
.rail-section:last-child { border-bottom: 0; }
.rail-section.static-data-section { flex: 0 0 auto; padding-bottom: 0; }
.rail-header { color: var(--blue); font-family: Georgia, "Times New Roman", serif; font-size: .95rem; font-weight: 700; margin: 0 0 6px; }
.fact-list { display: grid; align-content: start; gap: 3px; flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-gutter: stable; padding-right: 2px; }
.fact-current { display: grid; gap: 3px; }
.fact-chip { appearance: none; display: block; width: 100%; max-width: 100%; border: 1px solid rgba(144,215,192,.42); border-radius: 5px; background: #0b0f17; color: var(--text); cursor: pointer; font: inherit; font-size: 10.5px; font-weight: 750; padding: 4px 6px; line-height: 1.1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact-chip:hover { border-color: rgba(164,198,255,.72); color: var(--blue); }
.fact-diagnostics { display: none; color: var(--muted); font-size: 10px; margin-left: 4px; }
.show-flags .fact-diagnostics { display: inline; }
.message.jump-highlight .bubble { box-shadow: 0 0 0 2px rgba(164,198,255,.7), 0 0 24px rgba(164,198,255,.24); }
.message-menu[hidden], .copy-toast[hidden] { display: none; }
.message-menu { position: fixed; z-index: 60; min-width: 154px; border: 1px solid var(--line-strong); border-radius: 7px; background: #111722; box-shadow: 0 16px 34px rgba(0,0,0,.42); padding: 4px; }
.message-menu button { appearance: none; width: 100%; border: 0; border-radius: 5px; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; padding: 7px 9px; text-align: left; }
.message-menu button:hover, .message-menu button:focus-visible { background: var(--panel-3); outline: 0; }
.message-menu button:disabled { color: var(--soft); cursor: not-allowed; opacity: .58; }
.message-menu-separator { height: 1px; margin: 4px; background: var(--line); }
.copy-toast { position: fixed; left: 50%; bottom: 18px; z-index: 70; transform: translateX(-50%); border: 1px solid rgba(144,215,192,.5); border-radius: 999px; background: #111722; color: var(--text); box-shadow: 0 14px 30px rgba(0,0,0,.34); padding: 7px 12px; font-size: 12px; font-weight: 750; }
.point-list, .contact-list, .action-list, .chain-list, .check-list { display: grid; align-content: start; gap: 3px; flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; padding-right: 2px; }
.fact-list::-webkit-scrollbar, .contact-list::-webkit-scrollbar, .point-list::-webkit-scrollbar, .action-list::-webkit-scrollbar, .chain-list::-webkit-scrollbar, .check-list::-webkit-scrollbar { width: 6px; }
.fact-list::-webkit-scrollbar-thumb, .contact-list::-webkit-scrollbar-thumb, .point-list::-webkit-scrollbar-thumb, .action-list::-webkit-scrollbar-thumb, .chain-list::-webkit-scrollbar-thumb, .check-list::-webkit-scrollbar-thumb { background: #5f6876; border-radius: 999px; }
.point, .contact, .action, .chain, .check, .report-row {
  border: 1px solid rgba(52,63,82,.72); border-radius: 5px; background: #0b0f17; padding: 4px 6px; min-width: 0;
}
.point { padding: 3px 6px; }
.point-name, .contact-name, .action-name, .chain-name, .check-name { color: var(--text); font-weight: 750; font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact-detail, .point-detail, .contact-detail, .action-detail, .chain-detail, .check-detail { color: var(--muted); font-size: 9.5px; margin-top: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.point .point-detail, .action .action-detail, .chain .chain-detail { display: none; }
.show-dev-details .point .point-detail, .show-dev-details .action .action-detail, .show-dev-details .chain .chain-detail { display: block; }
.readiness-panel { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.readiness-summary { border: 1px solid rgba(164,198,255,.35); border-radius: 5px; background: #0b0f17; padding: 4px 6px; }
.readiness-title { color: var(--text); font-weight: 800; font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.readiness-detail { color: var(--muted); font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check.complete { border-color: rgba(144,215,192,.38); }
.check.deferred { border-color: rgba(214,189,126,.42); }
.point.jumpable, .contact.jumpable, .action.jumpable, .chain.jumpable, .check.jumpable { cursor: pointer; }
.point.jumpable:hover, .contact.jumpable:hover, .action.jumpable:hover, .chain.jumpable:hover, .check.jumpable:hover { border-color: rgba(164,198,255,.72); }
.rail-dev-details { display: none; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 2px; min-width: 0; }
.show-dev-details .rail-dev-details { display: flex; }
.rail-raw-id { color: var(--soft); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.badge { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 9px; padding: 0 5px; margin: 0; }
.badge.good { color: var(--green); border-color: rgba(144,215,192,.5); }
.badge.warn { color: var(--gold); border-color: rgba(214,189,126,.5); }
.footer { color: var(--soft); font-size: 11px; padding-top: 8px; }
.mist-dialog[hidden] { display: none; }
.mist-dialog { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(3, 6, 12, .68); }
.mist-card { width: min(380px, 100%); border: 1px solid var(--line-strong); border-radius: 8px; background: #111722; box-shadow: 0 24px 56px rgba(0,0,0,.48); padding: 16px; }
.mist-card h2 { color: var(--text); font-family: Georgia, "Times New Roman", serif; font-size: 1rem; margin: 0 0 8px; }
.mist-card p { color: var(--muted); margin: 0 0 14px; font-size: 13px; }
.mist-actions { display: flex; justify-content: end; gap: 8px; }
.mist-actions button { border: 1px solid var(--line); border-radius: 999px; background: #0b0f17; color: var(--text); font-weight: 750; padding: 7px 12px; }
.mist-actions button.primary { border-color: var(--blue); background: var(--blue); color: #07101b; }
.report-page { max-width: 1040px; margin: 0 auto; padding: 18px; }
.report-page main { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid var(--line); padding: 8px 9px; vertical-align: top; text-align: left; }
th { background: var(--panel-2); color: var(--text); }
td { color: var(--muted); }
@media (max-width: 980px) {
  .app { height: 100vh; height: 100dvh; min-height: 0; }
  .topbar { grid-template-columns: 1fr; height: auto; padding: 10px 12px; position: relative; }
  .controls { justify-content: start; overflow-x: auto; padding-bottom: 2px; }
  .main-grid { grid-template-columns: 54px minmax(0, 1fr); grid-template-rows: minmax(96px, 132px) minmax(0, 1fr) minmax(104px, 168px); overflow: hidden; }
  .realm-rail { grid-column: 1; grid-row: 1 / span 3; border-right: 1px solid var(--line); padding: 8px 7px; }
  .server-button { width: 38px; height: 38px; border-radius: 14px; }
  .server-button::after { display: none; }
  .sidebar { grid-column: 2; grid-row: 1; border: 0; border-bottom: 1px solid var(--line); overflow: hidden; }
  .sidebar-content { padding: 10px 12px; overflow: auto; display: block; }
  .sidebar-resizer { display: none; }
  .chat-shell { grid-column: 2; grid-row: 2; }
  .right-rail { grid-column: 2; grid-row: 3; border: 0; border-top: 1px solid var(--line); border-bottom: 0; overflow: hidden; padding: 0; }
  .right-rail-content { padding: 8px 10px; }
  .rail-resizer { display: none; }
  .rail-tabs { padding-bottom: 6px; }
  .rail-tab { padding: 6px 4px; }
  .rail-section { padding: 6px 0; }
  .rail-header { font-size: .9rem; }
  .character-list { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); overflow: visible; }
  .location-map-panel { display: none; }
  .channel-header { padding: 12px; }
  .timeline { padding: 14px 12px 24px; overflow: auto; }
  .response-tray { padding: 8px 12px 10px; min-height: 74px; }
  .message, .message.player { max-width: 100%; grid-template-columns: 32px minmax(0, 1fr); margin-left: 0; }
  .message.player .message-body, .message.player .avatar { order: initial; }
  .message.player .message-body { align-items: stretch; }
  .bubble { width: 100%; max-width: 100%; }
}
