.slot.filled.selected {
  border-color:#ad771f;
  box-shadow:0 0 0 2px #dca840, 0 0 24px 4px #e3a52e83, var(--shadow);
  z-index:2;
}
.warehouse-launch { min-height:64px; }
.warehouse-launch:empty { display:none; }
.warehouse-launch-actions {
  position:fixed; z-index:6; right:max(24px,calc((100vw - 1168px) / 2));
  bottom:max(24px,env(safe-area-inset-bottom)); display:flex; gap:8px;
}
.warehouse-launch [data-action="investigate"] { min-width:148px; }
.warehouse-launch .button { box-shadow:0 5px 21px #0007; }
[data-view="warehouse"] .toast { bottom:79px; }
@media (max-width:700px) {
  .warehouse-launch-actions { right:14px; bottom:max(14px,env(safe-area-inset-bottom)); }
}
.warehouse-launch .button:disabled, .slot-delete:disabled { cursor:not-allowed; }
.room-picks { display:grid; gap:7px; margin:10px 0 17px; padding:12px; border:1px solid var(--line); }
.room-picks label { display:flex; align-items:center; gap:7px; min-height:32px; }
.room-picks small { font-size:.8rem; color:var(--muted); }
.module-check-rules { grid-template-columns:repeat(auto-fit,minmax(min(170px,100%),1fr)); }
.module-scenes,.module-scene-list,.module-image-list { display:grid; gap:9px; }
.module-scene-group { border:1px solid var(--line); padding:8px 10px; min-width:0; }
.module-scene-group > summary { cursor:pointer; font-weight:650; }
.module-scene-group > :is(.button,.field,.module-scene-list,.module-image-list,.module-image-form) { margin-top:9px; }
.module-scene-entry { display:grid; gap:6px; border-top:1px solid var(--line); padding-block:8px; min-width:0; }
.module-npc-stat-heading,.module-npc-toggle { display:flex; gap:7px; align-items:center; min-height:30px; }
.module-npc-disclosure {
  display:grid; place-items:center; inline-size:32px; block-size:32px; padding:0; flex:none;
  border:0; background:transparent; color:var(--ink);
}
.module-npc-disclosure::before {
  content:""; border:5px solid transparent; border-left:7px solid currentColor; border-right:0;
}
.module-npc-disclosure[aria-expanded="true"]::before { transform:rotate(90deg); }
.module-npc-disclosure:disabled { opacity:.42; }
.module-npc-disclosure:focus-visible,.module-npc-portrait:focus-within { outline:2px solid #c59759; outline-offset:2px; }
.module-npc-values { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(118px,100%),1fr)); gap:8px;
  max-height:260px; overflow:auto; padding:6px; border:1px solid var(--line); }
.module-npc-values[data-npc-values="attributes"] { max-height:none; }
.module-npc-vitals { grid-column:1/-1; width:min(100%,280px); display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.module-scene-heading { display:flex; align-items:end; gap:8px; min-width:0; }
.module-scene-heading .field { flex:1; }
.module-scene-heading :is(input,select) { min-width:0; }
.module-scene-heading .button { flex:none; white-space:nowrap; }
.module-clue-media { display:flex; gap:8px; align-items:end; }
.module-clue-media .field { flex:1; }
.module-clue-media .button { flex:none; }
.module-clue-entry [data-clue-image] { display:block; max-width:100%; max-height:200px; object-fit:contain; }
.module-npc-portrait {
  position:relative; display:grid; place-items:center; flex:none; width:44px; height:44px;
  border:1px solid var(--line); font-size:.73rem; white-space:nowrap;
}
.module-npc-portrait img { display:block; width:100%; height:100%; object-fit:cover; }
.module-npc-portrait input[type=file] { position:absolute; inset:0; width:100%; height:100%; min-height:0; opacity:0; cursor:pointer; }
.module-image-form { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.25fr) auto; align-items:end; gap:8px; }
.module-image-form input[type=file] { padding:6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.field > .module-music-picker {
  position:relative; display:flex; align-items:center; gap:6px;
  min-height:43px; padding:5px 6px; border:1px solid #bdb3a0; border-radius:2px;
  background:var(--field); color:var(--ink); font-size:.83rem; font-weight:400;
}
.module-music-picker input { position:absolute; inset:0; height:100%; opacity:0; cursor:pointer; }
.module-music-picker:has(input:focus-visible) { outline:2px solid #c59759; outline-offset:2px; }
.module-music-picker-button { flex:none; padding:3px 5px; border-radius:2px; background:#565858; color:#fffdf6; }
.module-music-picker [data-music-selection] { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.module-image-entry { display:flex; align-items:center; gap:8px; justify-content:space-between; min-width:0; }
.module-image-entry a { display:flex; align-items:center; gap:8px; color:inherit; min-width:0; overflow-wrap:anywhere; }
.module-image-entry img { flex:none; object-fit:cover; }
@media (max-width:550px) {
  .module-scene-heading { gap:5px; }
  .module-scene-heading .button { padding-inline:6px; font-size:.75rem; }
  .module-scene-heading .field > span { font-size:.76rem; white-space:nowrap; }
  .module-scene-heading input:not([type=file]),.module-scene-heading select { padding-inline-start:6px; }
  .module-scene-heading select { padding-inline-end:19px; background-position:calc(100% - 11px) 53%,calc(100% - 6px) 53%,center; }
  .module-image-form { grid-template-columns:minmax(0,1fr) auto; }
  .module-image-form > :first-child { grid-column:1/-1; }
}
.room-archives { margin-top:15px; }
[data-view="room-entry"] h1 { margin:16px 0; }
[data-entry-history] { margin-top:25px; }

[data-view="room"] {
  color-scheme:dark;
  background:#131517;
  color:#edeae3;
}
[data-view="room"] .page {
  --room-page-inset:20px;
  width:min(1376px,calc(100% - 40px));
  padding:var(--room-page-inset) 0;
  min-height:0;
}
[data-view="room"] .page-foot { display:none; }
[data-view="room"] :focus-visible { outline:2px solid #dabb82; outline-offset:2px; }
.room-shell :is(button,input,textarea,select,dialog) { border-radius:0; }
.room-shell {
  --room-muted:#b7b8b7;
  --room-line:#3b3d3e;
  --room-gold:#dbc196;
  position:relative;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  height:calc(100vh - 2 * var(--room-page-inset));
  height:calc(100dvh - 2 * var(--room-page-inset));
  min-height:365px;
  border:1px solid var(--room-line);
  background:#1d1f21;
  box-shadow:0 19px 58px #0006;
}
.room-top {
  --room-top-side:100px;
  display:grid; grid-template-columns:minmax(var(--room-top-side),1fr) minmax(0,max-content) minmax(var(--room-top-side),1fr);
  align-items:center; gap:13px; padding:12px 20px; border-bottom:1px solid var(--room-line);
}
.room-heading { min-width:0; text-align:center; }
.room-heading h1 { font-family:var(--serif); font-size:clamp(1.15rem,2.4vw,1.75rem); letter-spacing:.035em; overflow-wrap:anywhere; }
.room-meta {
  display:flex; justify-content:center; align-items:baseline; gap:.35em; max-width:min(64vw,480px);
  margin:4px auto 0; color:var(--room-muted); font-size:clamp(.66rem,2.8vw,.77rem); white-space:nowrap;
}
.room-meta :is([data-r-day],[data-r-status]) { flex:none; }
.room-meta :is([data-r-day],.room-location) { color:var(--room-gold); }
.room-meta .room-location { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.room-meta [data-r-day]::after,.room-meta .room-location:not([hidden])+[data-r-status]::before { content:"·"; color:var(--room-muted); }
.room-meta [data-r-day]::after { margin-inline-start:.35em; }
.room-meta .room-location:not([hidden])+[data-r-status]::before { margin-inline-end:.35em; }
.room-top-start,.room-top-buttons { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.room-top-buttons { justify-content:flex-end; }
.room-top-icon-button {
  display:grid; place-items:center; flex:none; width:36px; height:36px;
  padding:0; border:0; background:transparent; color:var(--plate-bone,var(--room-gold)); cursor:pointer;
}
.room-top-icon-button:hover { filter:brightness(1.1); }
.room-top-icon {
  grid-area:1/1; width:24px; height:24px; background:currentColor;
  mask:var(--room-icon) center / contain no-repeat;
}
.room-back-icon { --room-icon:url('/ui-art/room-back.png'); }
.room-music-icon { --room-icon:url('/ui-art/room-volume-on.png'); }
.room-music-icon--muted { --room-icon:url('/ui-art/room-volume-off.png'); }
.room-clues-icon { --room-icon:url('/ui-art/room-clues.png'); }
.room-members-icon { --room-icon:url('/ui-art/room-members.png'); }
.room-music-toggle[aria-pressed="true"] .room-music-icon--muted,
.room-music-toggle[aria-pressed="false"] .room-music-icon:not(.room-music-icon--muted) { opacity:0; }
.room-body { position:relative; min-height:0; display:grid; grid-template-columns:minmax(0,1fr) minmax(245px,25%); }
.room-divider { display:none; }
.room-chat { position:relative; display:flex; flex-direction:column; min-height:0; min-width:0; }
.room-transcript {
  position:relative; flex:1; min-height:0; min-width:0;
  display:grid; grid-template-rows:minmax(0,1fr);
}
.room-scene-backdrop { position:absolute; inset:0; overflow:hidden; background:#181a1c; pointer-events:none; }
.room-scene-image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.room-scene-image[data-default] { object-position:right center; }
.room-feed {
  position:relative;
  overflow:auto;
  min-height:0;
  overscroll-behavior:contain;
  padding:18px clamp(14px,3.4vw,48px) 22px;
  background:linear-gradient(90deg,#1b1d20bc,#1c1f2252);
}
.room-older { margin:0 auto 12px; display:block; }
.room-log,.room-members { list-style:none; padding:0; margin:0; }
.room-log:empty { min-height:1px; }
.room-chat-row { display:flex; align-items:flex-start; gap:10px; margin:13px 0; }
.room-chat-row.from-self { flex-direction:row-reverse; }
.room-line { min-width:0; max-width:min(83%,760px); display:grid; justify-items:start; }
.from-self .room-line { justify-items:end; }
.room-message-meta { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 7px; min-width:0; font-size:.84rem; padding:0 4px 3px; }
.from-self .room-message-meta { justify-content:flex-end; }
.room-message-meta strong { overflow-wrap:anywhere; }
.room-message-meta time { color:var(--room-muted); font: .69rem var(--mono); white-space:nowrap; }
.room-avatar {
  flex:none; display:grid; place-items:center; width:39px; height:39px; padding:0;
  overflow:hidden; border:1px solid #667380;
  background:#353d48; color:#e5e3d8; font:700 .9rem var(--sans);
}
.room-avatar:is(.kp,.room-npc-avatar) { background:#38463c; border-color:#6c7964; font-family:var(--mono); }
.room-avatar.room-npc-avatar { color:#fae8bf; }
.from-self:not(.from-kp) .room-avatar { background:#633a39; border-color:#916463; }
.room-avatar img { width:100%; height:100%; object-fit:cover; }
.room-avatar.is-mad .room-avatar-face::after {
  content:''; position:absolute; inset:0; box-shadow:inset 0 0 8px 4px #bf3539e8; pointer-events:none;
}
.room-avatar-madness {
  position:absolute; z-index:3; top:66.666%; inset-inline:0; transform:translateY(-50%);
  color:#fff1e5; background:#451317d9; text-align:center; font:700 8px/1.2 var(--sans);
  white-space:nowrap; text-overflow:ellipsis; overflow:hidden; pointer-events:none;
}
.room-bubble {
  --plate-color:var(--plate-slate);
  position:relative; isolation:isolate; display:block;
  min-width:44px; padding:9px 14px; color:#f6f2ed;
  overflow-wrap:anywhere; white-space:pre-wrap;
}
.room-bubble.ooc { color:#c9cdcf; }
.room-action-text { color:#c2d1e2; }
.room-notice {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px 12px;
  min-height:40px; margin:10px auto; padding:7px 14px;
  background:linear-gradient(to right,#11121400,#111214df 12%,#111214 24%,#111214 76%,#111214df 88%,#11121400);
  color:#f7f5f1; text-align:center; font-size:.87rem; overflow-wrap:anywhere;
}
.room-notice-announcement { white-space:pre-line; }
.room-notice.room-request { justify-content:space-between; text-align:left; border:1px solid #534c40; background:#282622; }
.room-check-result { position:relative; flex-direction:column; }
.room-result-content { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:6px 12px; }
.room-result-amended .room-result-content { opacity:.66; text-decoration:line-through; }
.room-result-revision { font-size:.86rem; }
.room-clue-message { flex-direction:column; align-items:center; }
.room-clue-message p,.room-clue-preview p { white-space:pre-wrap; overflow-wrap:anywhere; }
.room-clue-message img { display:block; max-width:min(100%,480px); max-height:280px; object-fit:contain; }
.room-clue-message a { max-width:100%; }
.room-clue-list { list-style:none; display:grid; gap:6px; margin:0; padding:0; }
.room-clue-list .room-button { width:100%; justify-content:flex-start; text-align:left; overflow-wrap:anywhere; }
.room-clue-preview { display:grid; gap:9px; }
.room-clue-preview img { max-width:100%; max-height:420px; object-fit:contain; }
.room-published-clues { display:grid; gap:8px; }
.room-published-clues summary { padding:6px 0; cursor:pointer; overflow-wrap:anywhere; }
.room-published-clues .room-clue-preview { padding:5px 0 10px; }
.room-published-clues img { display:block; }
.room-private-label { color:#dac1f2; }
.room-subtle { color:#c0bcb2; font-size:.77rem; }
.room-request .room-subtle { margin-left:9px; }
.room-request-tools { display:flex; align-items:center; gap:6px; font-size:.78rem; flex-wrap:wrap; }
.room-success { color:#a3d7a7; }
.room-failure { color:#f3a09c; }
.room-compose {
  --send-size:62.4px;
  --compose-button-width:50px;
  --compose-button-height:34px;
  --compose-tools-height:40px;
  flex:none;
  padding:4px 13px 5px; background:#222426; border-top:1px solid var(--room-line);
}
.room-compose-tools,.room-compose-actions,.room-input,.room-mode { display:flex; align-items:center; }
.room-compose-tools,.room-input { gap:8px; }
.room-compose-tools { height:var(--compose-tools-height); justify-content:space-between; margin-bottom:4px; }
.room-compose-actions { gap:8px; padding-inline-end:calc((var(--send-size) - var(--compose-button-width)) / 2); }
.room-input { position:relative; align-items:stretch; }
.room-input textarea {
  flex:1; min-width:0; padding:7px 10px;
  height:max(var(--send-size), var(--draft-content-height,0px));
  resize:none; overflow-y:auto; min-height:44px;
  border:1px solid #505254; background:#151719; color:#fffdf9;
}
.room-input textarea.room-draft-measure {
  position:absolute; inset:0 auto auto 0; visibility:hidden; pointer-events:none;
  height:0; min-height:0; overflow:hidden;
}
.room-ooc-mode textarea { color:#c9cdcf; }
.room-mode { flex:none; gap:4px; }
.room-mode [aria-pressed="true"] { background:#3b3732; border-color:#8d7756; color:#ffecd1; }
.room-button {
  display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:32px;
  padding:4px 10px; border:1px solid #5b5c5d;
  background:#282b2e; color:#edeae3; font-size:.83rem; text-decoration:none;
}
.room-button:hover { background:#383c40; }
.room-button:disabled { cursor:not-allowed; }
.room-button.room-primary { background:#65413b; border-color:#a47562; color:#fff6ee; }
.room-button.room-primary:hover { background:#7c4b42; }
.room-dice-tools,.room-npc-tools { position:relative; }
.room-npc-current { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--room-gold); font-size:.78rem; }
.room-dice-menu,.room-npc-menu {
  position:absolute; bottom:calc(100% + 10px); right:0; z-index:3; width:max-content; max-width:calc(100vw - 38px);
  display:grid; gap:6px; padding:9px; border:1px solid #74706a; background:#282726; box-shadow:0 7px 24px #0008;
}
.room-npc-menu { left:-22px; right:auto; width:clamp(136px,45vw,260px); max-height:min(250px,35vh); overflow:auto; }
.room-npc-menu .room-button { width:100%; justify-content:flex-start; text-align:left; overflow-wrap:anywhere; }
.room-dice-menu p { font-size:.83rem; color:#e1dbd0; }
.room-readonly { padding:11px 14px; border-top:1px solid var(--room-line); text-align:center; color:var(--room-muted); font-size:.84rem; }
.room-error { padding:7px 13px; color:#ffd3ce; background:#532f33; overflow-wrap:anywhere; font-size:.86rem; }
.room-sidebar {
  display:flex; flex-direction:column; min-width:0; min-height:0;
  padding:15px; border-left:1px solid var(--room-line); background:#212325;
}
.room-roster {
  display:grid; min-width:0; min-height:0;
  grid-template-rows:minmax(0,1fr) 8px clamp(84px,var(--room-npc-height,calc((100% - 8px) / 2)),max(84px,calc(100% - 96px)));
}
.room-member-roster,.room-npc-roster { display:flex; flex-direction:column; min-width:0; min-height:0; padding:12px; }
.room-roster > [data-room-divider="npc-height"] {
  display:block; position:relative; cursor:row-resize; touch-action:none;
}
.room-roster > [data-room-divider="npc-height"]::before {
  content:""; position:absolute; inset:3px 0; background:var(--room-line);
}
.room-roster > [data-room-divider="npc-height"]:is(:hover,:focus-visible)::before { background:var(--room-gold); }
.room-sidebar-head { display:flex; flex:none; justify-content:space-between; align-items:center; margin-bottom:11px; }
.room-sidebar-head h2,.room-check-panel h2,.room-control-panel h2 { font-size:1.04rem; letter-spacing:.045em; }
.room-sidebar-head h2:focus { outline:0; }
.room-roster-body { flex:0 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; padding:0 3px 3px; }
.room-members { margin-top:11px; }
.room-members li {
  display:grid; grid-template-columns:36px minmax(0,1fr); align-items:center; gap:8px;
  min-height:55px; padding:8px 4px 10px; border-bottom:1px solid #454646;
}
.room-members li.on-turn { background:#393329; box-shadow:inset 3px 0 #d1ac73; }
.room-members .room-avatar { width:34px; height:34px; }
.room-npc-roster h2 { flex:none; margin:0 0 5px; font-family:var(--chalk-face,var(--serif)); font-size:.9rem; }
.room-npcs {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; column-gap:8px;
  list-style:none; min-height:0; overflow:auto; padding:0 2px; margin:0;
}
.room-npcs li {
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center;
  min-height:34px; gap:4px; padding:3px 0; border-bottom:1px solid #454646;
}
.room-npcs .room-avatar { flex:none; width:26px; height:26px; font-size:.73rem; }
.room-npc-name {
  min-width:0; font-size:.8rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.room-npc-status,.room-avatar-death {
  position:absolute; z-index:2; bottom:0; inset-inline:0; background:#101012dd;
  color:#fff5db; text-align:center; font-size:8px; line-height:1.2; white-space:nowrap; pointer-events:none;
}
.room-avatar-death { background:#6a2829f2; color:#fff4ef; font-size:9px; font-weight:700; }
.room-npc-stats {
  display:grid; grid-template-columns:repeat(2,3ch); gap:2px; margin:0;
  color:#e2d8c4; font:650 .68rem/1.15 var(--mono); white-space:nowrap; font-variant-numeric:tabular-nums;
}
.room-npc-stats div { text-align:center; }
.room-npc-stats dt { color:var(--room-muted); font-size:.57rem; font-weight:500; }
.room-npc-stats dd { margin:0; }
.room-npcs .room-npc-empty { grid-column:1/-1; color:var(--room-muted); font-size:.8rem; }
.room-member-heading { min-width:0; display:flex; align-items:baseline; justify-content:space-between; gap:6px; }
.room-member-names { flex:1; min-width:0; display:flex; align-items:baseline; gap:6px; }
.room-member-names strong,.room-member-names small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.room-member-names strong { min-width:0; max-width:68%; color:#f7f2e9; font-size:.96rem; }
.room-member-names small { min-width:0; color:var(--room-muted); font-size:.78rem; }
.room-gauges {
  display:flex; flex-wrap:wrap; grid-column:1/-1; gap:4px;
  margin:0; font-family:var(--mono);
}
.room-gauges > div {
  flex:1 0 0; min-inline-size:max-content; display:flex; align-items:baseline; justify-content:center;
  gap:3px; padding:3px 1px; color:#fff;
}
.room-gauges dt { font-size:.74rem; line-height:1.15; white-space:nowrap; }
.room-gauges dd {
  min-inline-size:2ch; margin:0; text-align:center;
  font-size:1.17rem; font-weight:700; line-height:1.1; font-variant-numeric:tabular-nums;
}
.room-presence { flex:none; white-space:nowrap; color:var(--room-muted); font-size:.73rem; }
.room-presence::before { content:''; display:inline-block; margin-right:4px; width:6px; height:6px; vertical-align:2px; background:#85888a; }
.room-presence.online { color:#bde5bd; }
.room-presence.online::before { background:#8bce97; }
.room-kp-controls,.room-dialog-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.room-kp-controls { flex:none; margin-bottom:12px; padding-inline:3px; }
.room-shell:not(.room-shell--kp) .room-kp-controls:empty { display:none; }
.room-inventory {
  display:flex; flex:none; flex-direction:column;
  height:calc(100vh / 3); height:calc(var(--room-viewport-height,100dvh) / 3);
  max-height:60%; min-height:0;
  margin-top:auto; border-top:1px solid var(--room-line); padding-top:10px;
}
.room-inventory-head { flex:none; margin-bottom:10px; }
.room-inventory-head h2 { font-family:var(--chalk-face,var(--serif)); font-size:1.04rem; }
.room-inventory-money {
  display:grid; flex:none; grid-template-columns:auto minmax(0,1fr); gap:10px;
  margin:0 0 7px; font-size:.87rem;
}
.room-inventory-money dt,.room-inventory-body p { color:var(--room-muted); }
.room-inventory-money dd {
  margin:0; color:var(--room-gold); font-weight:650; text-align:end; overflow-wrap:anywhere;
}
.room-inventory-body { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; font-size:.88rem; }
.room-inventory-body ul { margin:0; padding:0; list-style:none; }
.room-inventory-body li { display:flex; gap:6px; align-items:center; padding:4px 0; overflow-wrap:anywhere; }
.room-inventory-choice {
  flex:1; min-width:0; text-align:left; background:none; color:inherit; border:0; cursor:pointer; padding:2px 0;
  overflow-wrap:anywhere;
}
.room-inventory-choice[aria-pressed="true"] { color:var(--room-gold); }
.room-inventory-body li .room-button { flex:none; padding-inline:5px; }
.room-inventory-body p { padding:5px 0; }
.room-roster-toggle,.room-scrim { display:none; }
.room-member-actions {
  position:fixed; top:0; left:0; z-index:8; display:grid; gap:5px;
  width:74px; pointer-events:none;
}
.room-member-actions .room-button { width:100%; pointer-events:auto; padding-inline:3px; box-shadow:0 3px 9px #0008; }
.room-dialog {
  max-width:min(560px,calc(100vw - 28px)); width:100%; max-height:calc(100dvh - 38px);
  padding:17px; border:1px solid #80725d; background:#222426; color:#f4efe7;
}
.room-dialog::backdrop { background:#08090bcc; }
.room-dialog-head { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:12px; }
.room-dialog-head h2 { font-size:1.25rem; overflow-wrap:anywhere; }
.room-module-info { display:grid; gap:12px; overflow-wrap:anywhere; }
.room-module-info p { white-space:pre-wrap; }
.room-module-info section { border-top:1px solid var(--room-line); padding-top:8px; }
.room-module-info section ul { margin:4px 0 0; padding-left:20px; }
.room-module-info section li + li { margin-top:6px; }
.room-module-info section li p { font-size:.86rem; color:var(--room-muted); }
.room-card-dialog {
  position:fixed; inset:0; z-index:9; margin:auto;
  width:var(--dialog-width,min(700px,calc(var(--room-viewport-width,100vw) - 24px)));
  height:var(--dialog-height,fit-content); max-width:var(--room-viewport-width,100vw);
  max-height:var(--room-viewport-height,100dvh);
  padding:0; overflow:hidden; box-shadow:0 6px 26px #0007;
}
.room-card-dialog[open] { display:flex; flex-direction:column; }
.room-card-dialog[data-dragged] { inset:auto; top:var(--dialog-y); left:var(--dialog-x); margin:0; }
.room-profile-resize { position:absolute; z-index:1; touch-action:none; }
.room-profile-resize:is([data-edge="n"],[data-edge="s"]) { height:7px; inset-inline:14px; cursor:ns-resize; }
.room-profile-resize:is([data-edge="e"],[data-edge="w"]) { width:7px; inset-block:14px; cursor:ew-resize; }
.room-profile-resize:is([data-edge="nw"],[data-edge="ne"],[data-edge="sw"],[data-edge="se"]) { width:14px; height:14px; }
.room-profile-resize:is([data-edge="n"],[data-edge="nw"],[data-edge="ne"]) { top:0; }
.room-profile-resize:is([data-edge="s"],[data-edge="sw"],[data-edge="se"]) { bottom:0; }
.room-profile-resize:is([data-edge="w"],[data-edge="nw"],[data-edge="sw"]) { left:0; }
.room-profile-resize:is([data-edge="e"],[data-edge="ne"],[data-edge="se"]) { right:0; }
.room-profile-resize:is([data-edge="nw"],[data-edge="se"]) { cursor:nwse-resize; }
.room-profile-resize:is([data-edge="ne"],[data-edge="sw"]) { cursor:nesw-resize; }
.room-profile-resize[data-edge="se"] {
  background:linear-gradient(135deg,transparent 52%,#b19c7a 53% 57%,transparent 58% 70%,#b19c7a 71% 75%,transparent 76%);
}
.room-card-dialog .room-dialog-head {
  flex:none; align-items:center; margin:0; padding:3px 10px; cursor:move; touch-action:none; user-select:none;
  border-bottom:1px solid #54514b; background:#2a2c2d;
}
.room-card-heading { display:flex; align-items:baseline; gap:8px; min-width:0; }
.room-card-heading :is(h2,.room-card-occupation) { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.room-card-occupation { margin:0; color:var(--room-muted); font-size:.8rem; }
.room-profile-gauges,.room-profile-gauges div { display:flex; align-items:baseline; }
.room-profile-gauges { flex:none; gap:8px; margin:0; font:650 .75rem var(--mono); }
.room-profile-gauges div { gap:3px; }
.room-profile-gauges dt { color:var(--room-muted); }
.room-profile-gauges dd { margin:0; }
.room-card-scroll {
  flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable;
  padding:10px 14px 14px;
}
.room-card-scroll:focus-visible { outline-offset:-2px; }
.room-card-section + .room-card-section { margin-top:10px; }
.room-npc-notes p { margin:5px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.room-inventory-editor fieldset,[data-room-form="give-item"] fieldset { min-width:0; padding:0; margin:0; border:0; }
.room-card-scroll .room-inventory-empty { color:var(--room-muted); font-size:.88rem; }
.room-give-items { display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.room-give-row { display:grid; grid-template-columns:minmax(0,1fr) 56px; align-items:center; gap:8px; }
.room-give-choice {
  display:flex; justify-content:space-between; gap:8px; align-items:center; min-height:36px; min-width:0; padding:4px 8px;
  border:1px solid transparent; background:#2a2c2d; color:#f5ede0; text-align:left; cursor:pointer;
}
.room-give-choice[aria-pressed="true"] { border-color:#ad9168; background:#3b342a; }
.room-give-choice span:first-child { overflow-wrap:anywhere; }
.room-give-choice span:last-child { flex:none; color:var(--room-gold); font-family:var(--mono); }
.room-give-quantity { display:grid; gap:7px; margin-top:12px; padding:9px; border:1px solid var(--room-line); }
.room-give-quantity div { display:flex; gap:10px; align-items:center; }
.room-give-quantity input[type="range"] { flex:1; min-height:24px; padding:0; border:0; background:transparent; accent-color:#bd986f; }
.room-give-quantity output { min-width:3ch; text-align:center; font-family:var(--mono); }
.room-give-quantity button { justify-self:start; }
.room-inventory-rows { display:grid; gap:8px; }
.room-inventory-row { display:grid; grid-template-columns:minmax(0,1fr) 64px auto; gap:7px; align-items:end; }
.room-inventory-row label { display:grid; gap:3px; min-width:0; font-size:.82rem; }
.room-inventory-row input {
  width:100%; min-height:34px; padding:4px 6px; color:#f5eee3; background:#17191b; border:1px solid #656565;
}
.room-card-section h3 { color:var(--room-gold); font-size:.83rem; }
.room-card-section dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 14px; margin:3px 0 0; }
.room-card-section[data-card-group="gauges"] dl { grid-template-columns:repeat(4,minmax(0,1fr)); }
.room-card-section dl > div {
  display:flex; align-items:baseline; justify-content:space-between; gap:4px;
  min-width:0; padding:3px 2px; border-bottom:1px solid #414344; font-size:.83rem; line-height:1.35;
}
.room-card-section dt { min-width:0; overflow-wrap:anywhere; color:#dedad2; }
.room-card-section dd { flex:none; margin:0; color:#fffdf8; font-family:var(--mono); font-weight:700; }
@media (max-width:520px) {
  .room-card-scroll { padding-inline:10px; }
  .room-card-scroll { padding-bottom:10px; }
  .room-card-section + .room-card-section { margin-top:8px; }
  .room-card-section dl { column-gap:8px; }
  .room-card-section dl > div { padding-block:2px; line-height:1.2; }
  .room-card-section[data-card-group="skills"] dl { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.room-tools {
  display:grid; flex:none; min-width:0; min-height:0;
  grid-template-rows:auto minmax(340px,42vh); margin-top:16px;
}
.room-control-panel,.room-check-panel {
  display:flex; flex-direction:column; min-width:0; min-height:0; overflow:hidden;
  padding:10px 3px 3px; border-top:1px solid var(--room-line);
}
.room-control-panel h2,.room-check-panel h2 { flex:none; margin-bottom:6px; }
.room-control-body { min-height:0; overflow:auto; padding:2px; overscroll-behavior:contain; }
.room-control-body form { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:2px 6px; margin-bottom:6px; }
.room-control-body label { grid-column:1/-1; font-size:.8rem; color:var(--room-muted); }
.room-control-body select { min-width:0; min-height:32px; padding:4px; appearance:auto; background:#17191b; color:#f5eee3; border:1px solid #656565; }
.room-scene-feedback { color:#ffd3ce; font-size:.82rem; overflow-wrap:anywhere; }
.room-check-panel form,.room-check-fields { display:flex; flex:1; flex-direction:column; min-width:0; min-height:0; }
.room-check-fields { padding:0; margin:0; border:0; }
.room-check-form-body { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:3px; }
.room-check-footer { display:flex; flex:none; align-items:center; gap:8px; padding:4px 3px 0; }
.room-check-footer button { flex:none; }
.room-check-panel select,[data-room-form="proposal"] select { appearance:auto; }
.room-check-form-body > .room-form-grid:has([data-check-target][hidden]) > label:first-child { grid-column:1/-1; }
.room-check-panel label { display:grid; gap:4px; font-size:.85rem; }
.room-check-extra { display:grid; gap:8px; }
.room-check-extra:not(:empty) { margin-top:8px; }
.room-extra-fields { min-width:0; padding:6px; margin:0; border:1px solid var(--room-line); }
.room-extra-fields legend,.room-check-hint { font-size:.8rem; color:var(--room-muted); }
.room-extra-fields > .room-form-grid + .room-form-grid,.room-extra-fields > .room-extra-fields { margin-top:5px; }
.room-check-panel .room-dice-fields { grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; }
.room-extra-fields > label select,.room-check-extra > label select {
  min-height:35px; padding:4px; border:1px solid #656565; background:#17191b; color:#f5eee3;
}
.room-san-prompt { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px; width:100%; }
.room-san-prompt span { color:var(--room-gold); font-size:.83rem; }
.room-check-panel .room-picks { min-width:0; margin:10px 0; padding:0; border:0; }
.room-check-panel legend { padding:0; color:var(--room-muted); font-size:.8rem; }
.room-check-people {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px;
  max-height:112px; overflow:auto; padding:3px;
}
.room-check-panel .room-check-people label {
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; min-width:0;
  padding:2px 5px; border:1px solid var(--room-line); cursor:pointer;
}
.room-check-people label:has(input:checked) { border-color:#9d8055; background:#3c352b; }
.room-check-people input { margin:0; accent-color:#dabb82; }
.room-check-people strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.85rem; }
.room-check-people [data-order] { color:var(--room-gold); font:.82rem var(--mono); }
.room-check-feedback {
  flex:1; min-width:0; max-height:34px; overflow:auto; overscroll-behavior:contain;
  color:var(--room-muted); font-size:.83rem; line-height:1.25; overflow-wrap:anywhere;
}
.room-check-feedback[data-error] { color:#ffd3ce; }
.room-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.room-form-grid label { display:grid; gap:4px; font-size:.85rem; }
.room-form-grid input,.room-form-grid select { width:100%; min-height:35px; padding:4px; border:1px solid #656565; background:#17191b; color:#f5eee3; }
.room-dialog .room-error { margin-top:10px; }
.room-review { padding-left:22px; }
.room-dice-stage {
  --room-dice-width:min(43vw,230px);
  position:absolute; inset:0; z-index:2; overflow:hidden; pointer-events:none;
  display:grid; place-items:center;
}
.room-dice-stage::before {
  content:''; position:absolute; left:50%; top:50%;
  width:var(--room-dice-backdrop,min(58vw,270px)); aspect-ratio:1; transform:translate(-50%,-50%);
  background:#050506b3; backdrop-filter:blur(4px);
  mask-image:radial-gradient(circle,#000 47%,#000c 55%,transparent 72%);
}
.room-dice-stage canvas {
  position:relative; display:block; width:var(--room-dice-width); height:auto;
  filter:drop-shadow(0 4px 6px #000a);
}
.room-dice-stage output {
  position:absolute; left:50%; top:calc(50% + var(--room-dice-width) * var(--room-result-offset) + 6px);
  transform:translateX(-50%); text-align:center;
  color:#fff5dc; font:750 clamp(1.2rem,3vw,1.65rem)/1 var(--mono);
  text-shadow:0 0 8px #000,0 2px 4px #000;
}
@media (min-width:701px) and (orientation:landscape) and (pointer:fine) {
  [data-view="room"] .page:has(> .room-shell--kp) { width:calc(100% - 24px); }
  .room-body {
    grid-template-columns:minmax(0,1fr) 8px clamp(160px,var(--room-members-width,25%),50%);
    grid-template-areas:"chat members-divider members";
  }
  .room-shell--kp .room-body:has(.room-tools:not([hidden])) {
    grid-template-columns:clamp(186px,var(--room-tools-width,23%),34%) 8px minmax(0,1fr) 8px clamp(160px,var(--room-members-width,22%),34%);
    grid-template-areas:"tools tools-divider chat members-divider members";
  }
  .room-chat { grid-area:chat; }
  .room-sidebar { grid-area:members; border-left:0; }
  .room-shell--kp .room-sidebar { display:contents; }
  .room-shell--kp .room-roster { grid-area:members; background:var(--board,#212325); }
  .room-tools {
    grid-area:tools; margin:0;
    grid-template-rows:clamp(110px,var(--room-control-height,48%),calc(100% - 131px)) 8px minmax(0,1fr);
    background:var(--board,#212325);
  }
  .room-tools :is(.room-control-panel,.room-check-panel) { padding:12px; border:0; }
  .room-divider { display:block; position:relative; min-width:0; min-height:0; cursor:col-resize; touch-action:none; }
  .room-divider[data-room-divider="tools"] { grid-area:tools-divider; }
  .room-divider[data-room-divider="members"] { grid-area:members-divider; }
  .room-divider[data-room-divider="height"] { cursor:row-resize; }
  .room-body:not(:has(.room-tools:not([hidden]))) [data-room-divider="tools"] { display:none; }
  .room-divider::before { content:""; position:absolute; inset:0 3px; background:var(--room-line); }
  .room-divider[data-room-divider="height"]::before { inset:3px 0; }
  .room-divider:is(:hover,:focus-visible)::before { background:var(--room-gold); }
  .room-shell[data-room-resizing] { user-select:none; }
  .room-shell[data-room-resizing="width"] { cursor:col-resize; }
  .room-shell[data-room-resizing="height"] { cursor:row-resize; }
}
@media (max-width:700px), (pointer:coarse) {
  html:has(> body[data-view="room"]), body[data-view="room"] { overflow:hidden; overscroll-behavior:none; }
  body[data-view="room"] { min-height:0; }
  [data-view="room"] .page { --room-page-inset:0px; width:100%; }
  .room-shell {
    position:fixed; inset:var(--room-viewport-top,0px) 0 auto;
    height:100vh; height:var(--room-viewport-height,100dvh);
    min-height:0;
  }
}
.room-shell--kp .room-sidebar { overflow:auto; }
@media (max-width:700px), (pointer:coarse) {
  .room-shell { border-inline:0; border-top:0; }
  .room-top { --room-top-side:72px; padding:8px 10px; gap:7px; }
  .room-top-start,.room-top-buttons { column-gap:4px; }
  .room-top-icon-button { width:34px; height:34px; }
  .room-body { grid-template-columns:minmax(0,1fr); overflow:hidden; }
  .room-roster-toggle { display:grid; }
  .room-sidebar {
    position:absolute; inset:0 0 0 auto; width:min(310px,calc(100% - 76px)); z-index:7;
    transform:translateX(101%); visibility:hidden;
    transition:transform .18s ease,visibility 0s .18s;
    box-shadow:-10px 0 34px #0009;
  }
  .drawer-open .room-sidebar { transform:translateX(0); visibility:visible; transition-delay:0s; }
  .room-shell--kp .room-sidebar { padding:0 8px 12px; }
  .room-shell--kp .room-roster { flex:none; height:clamp(220px,75dvh,620px); }
  .room-shell--kp :is(.room-member-roster,.room-npc-roster) { padding-inline:6px; }
  .room-npcs { column-gap:6px; }
  .room-npcs li { gap:3px; }
  .room-scrim { display:block; position:absolute; inset:0; z-index:6; border:0; background:#0008; }
  .room-feed { padding:11px 10px 14px; }
  .room-compose { padding:4px 8px calc(5px + env(safe-area-inset-bottom)); }
  .room-shell:not(.room-shell--kp) .room-compose-tools { gap:4px; }
  .room-shell:not(.room-shell--kp) .room-compose { --compose-button-width:42px; }
  .room-npc-menu { max-height:min(230px,calc(var(--room-viewport-height,100dvh) - 150px)); }
  .room-avatar { width:33px; height:33px; }
  .room-chat-row { gap:7px; }
  .room-line { max-width:86%; }
}
@media (prefers-reduced-motion:reduce) {
  .room-sidebar,.slot { transition:none; }
}

