body.room-page #chat-opts-panel .sound-level {
  display:grid; grid-template-columns:minmax(0,1fr) 3.2em; align-items:center; gap:2px 8px;
}
.sound-level > span:first-child { grid-column:1/-1; }
.sound-level input { width:100%; margin:0; cursor:pointer; }
.sound-level > span:last-child { text-align:right; font-variant-numeric:tabular-nums; }
.sound-mix { margin-top:8px; padding-top:8px; border-top:1px solid var(--border); }
#opt-test-speech { padding:2px 0; border:0; background:transparent; text-decoration:underline; }
#opt-test-speech:disabled { opacity:.54; }
html[data-theme="lounge"] {
  --bg:#100f15; --bg-panel:#19161e; --bg-card:#221d26; --bg-input:#242029;
  --bg-chat:#110f16; --border:#4e424d; --border-light:#726270; --text:#fff3dd;
  --text-dim:#dbcdc9; --text-muted:#c0aeb4; --accent:#e5c895; --cta:#e5c895;
  --player-idle-text:#fff1da; --player-idle-font:'PixelOperator', monospace;
  --lounge-type:'PixelOperator', monospace;
}
html[data-theme="lounge"] #navbar { background:#100e14; border-color:#342d37; }
html[data-theme="lounge"] #daynight-band { display:none; }
html[data-theme="lounge"] #nav-links > :is(a, button) {
  font:700 19px/1 var(--lounge-type); background:transparent; border:0; color:var(--text); padding:6px 9px;
}
html[data-theme="lounge"] #nav-links [aria-expanded=true] { color:var(--accent); }
html[data-theme="lounge"] :is(#chatheader,#videowrap-header,#bottom-queue,#chatline-wrap) { background:var(--bg-panel); }
html[data-theme="lounge"] :is(#chatheader,#currenttitle,#chatline,#messagebuffer,#plcontrol) { font-family:var(--lounge-type); }
html[data-theme="lounge"] #messagebuffer { font-size:calc(18px * var(--chat-scale,1)); }
html[data-theme="lounge"] :is(#player.no-media,.player-idle) {
  background:#17111d url(/static/img/lounge-theatre.png) center 54% / cover no-repeat; image-rendering:pixelated;
}
html[data-theme="lounge"] #chat-opts-panel {
  color:var(--text); background:#19151d; border:0; border-bottom:1px solid var(--border);
  border-radius:0; box-shadow:none; font:19px/1.12 var(--lounge-type);
}
html[data-theme="lounge"] #chat-opts-panel .cool-modal-header {
  padding:9px 56px 4px 16px; min-height:34px; background:none; border:0;
}
html[data-theme="lounge"] #chat-opts-panel .cool-modal-body { padding:4px 16px 12px; }
html[data-theme="lounge"] #inventory-panel .cool-modal-body { padding:6px 8px 10px; }
html[data-theme="lounge"] #inventory-panel .inventory-views { gap:3px; flex-wrap:wrap; }
html[data-theme="lounge"] #inventory-panel .inventory-views button {
  flex:0 0 auto; min-width:0; width:auto; padding:4px 7px; min-height:38px;
  font:600 14px/1.2 system-ui,sans-serif; white-space:nowrap; border-color:transparent;
  text-decoration:underline; text-underline-offset:3px;
}
html[data-theme="lounge"] #inventory-health { white-space:nowrap; }
html[data-theme="lounge"] #inventory-grid-full .store-item-name { font:700 23px/1.02 var(--lounge-type); }
html[data-theme="lounge"] #inventory-grid-full .store-item-meta { font:14px/1.25 system-ui,sans-serif; color:var(--text-dim); }
html[data-theme="lounge"] #inventory-grid-full .store-item-img { width:52px; height:52px; image-rendering:pixelated; }
html[data-theme="lounge"] #inventory-panel .store-item-actions button { min-width:68px; padding-inline:8px; font:600 14px/1.2 system-ui,sans-serif; }
html[data-theme="lounge"] #inventory-grid-full .store-use-btn[data-weapon="0"] {
  color:var(--bg); background:var(--accent);
}
@media (max-width:640px) {
  html[data-theme="lounge"] #inventory-panel .cool-modal-header.has-you-tabs { padding:0 24px 2px 0; min-height:40px; }
  html[data-theme="lounge"] #inventory-panel .you-tabs { column-gap:0; }
  html[data-theme="lounge"] #inventory-panel .you-tab { padding-inline:6px; min-height:40px; }
  html[data-theme="lounge"] #inventory-panel:not(.hidden).cool-modal {
    inset:auto 0 0; height:auto; max-height:76dvh; padding:10px 10px max(10px,env(safe-area-inset-bottom));
    transform:none; animation-name:cm-pop; resize:none;
  }
}
html[data-theme="lounge"] #chat-opts-panel .cool-modal-title { font:700 29px/1 var(--lounge-type); color:var(--text); }
html[data-theme="lounge"] #chat-opts-panel :is(.opt-row,.cool-check,#opt-test-speech) { font:19px/1.1 var(--lounge-type); color:var(--text); }
html[data-theme="lounge"] #chat-opts-panel .cool-check { min-height:23px; }
html[data-theme="lounge"] :is(input,select) { accent-color:#e5c895; }

@media (min-width:769px) {
  body.room-page:not(.layout-cinema) #mainpage > #main:has(#chat-opts-panel:not(.hidden)) {
    min-height:min(540px, calc(100dvh - 100px));
  }
}
html[data-theme="lounge"] #chat-opts-panel .opts-pages > [data-opts=Sound] { padding:0; }
html[data-theme="lounge"] #chat-opts-panel .sound-level { margin:4px 0 0; }
html[data-theme="lounge"] #chat-opts-panel .sound-mix { margin:6px 0 0; padding:5px 0 0; }

html[data-theme="lounge"] body.room-page #leftcontrols #game-rail :is(#fishing-action,#fishing-journal-open,.job-actions-toggle,#rail-poll):not(.hidden) {
  background:#29232c; border:1px solid #675763; border-bottom:3px solid #50424e;
  color:var(--text); border-radius:2px; box-shadow:none; text-shadow:none; padding-inline:10px;
}
html[data-theme="lounge"] body.room-page #leftcontrols #game-rail :is(#fishing-action,#fishing-journal-open,.job-actions-toggle,#rail-poll) .btn-label {
  font:700 20px/1 var(--lounge-type) !important; color:inherit; text-transform:none; letter-spacing:0;
}
html[data-theme="lounge"] body.room-page #leftcontrols #game-rail :is(button[aria-expanded=true],#fishing-action:not(:disabled)):not(.hidden) {
  background:var(--accent); color:#241b23; border-color:#bba378;
}
html[data-theme="lounge"] body.room-page #leftcontrols #game-rail button:focus-visible { outline:2px solid var(--text); outline-offset:-4px; }
#lounge-inventory { display:none; }
html[data-theme="lounge"] body:not(.mobile-room-queue):not(.layout-cinema) #leftcontrols #game-rail:has(#action-tools-toggle:not(.hidden)) #lounge-inventory {
  display:inline-flex; align-items:center; min-height:var(--room-action-height); padding:0 10px;
  font:700 20px/1 var(--lounge-type); color:var(--text); background:#29232c;
  border:1px solid #675763; border-bottom:3px solid #50424e; border-radius:2px;
}
html[data-theme="lounge"] body:not(.mobile-room-queue):not(.layout-cinema) #action-tools-menu [data-tool="btn-inventory"] { display:none; }
html[data-theme="lounge"] #game-rail :is(#job-actions-menu,#action-tools-menu) {
  background:var(--bg-panel); border:1px solid var(--border-light); border-radius:0;
}
html[data-theme="lounge"] #game-rail :is(.job-action-label,[data-tool] span) { font:700 19px/1.1 var(--lounge-type); }
html[data-theme="lounge"] #game-rail #job-actions-menu .job-action-plate {
  height:auto; min-height:44px; padding:7px 10px; align-items:center; text-align:left;
}
html[data-theme="lounge"] #game-rail #job-actions-menu .job-action-text {
  display:grid; gap:2px; min-width:0; flex:1; text-align:left;
}
html[data-theme="lounge"] #game-rail #job-actions-menu .job-action-label {
  font:700 21px/1 var(--lounge-type); color:var(--text); white-space:normal;
}
html[data-theme="lounge"] #game-rail #job-actions-menu .job-action-plate .job-action-desc {
  display:block; font:16px/1.05 var(--lounge-type); text-align:left;
  color:var(--text-dim); white-space:normal; overflow:visible; overflow-wrap:anywhere;
}
html[data-theme="lounge"] #game-rail #job-actions-menu .job-action-plate:hover,
html[data-theme="lounge"] #game-rail #job-actions-menu .job-action-plate:focus-visible { background:#39303a; }
html[data-theme="lounge"] #leftcontrols.room-action-bar #job-bar { flex:0 0 auto; width:max-content; max-width:100%; }
html[data-theme="lounge"] #leftcontrols.room-action-bar #hp-text { min-width:max-content; flex-shrink:0; }
.lounge-moves-cover { display:none; }
html[data-theme="lounge"] #leftcontrols #game-rail #job-actions-menu {
  --text:#282626; --text-dim:#413831; --text-bright:#121211; --bg-card:#ded3b9; --bg-input:#fff9ea;
  background:#f0e6ce; color:var(--text); padding:0; border:1px solid #5d5040;
}
html[data-theme="lounge"] #job-actions-menu .lounge-moves-cover {
  display:flex; flex-direction:column; align-items:flex-start; justify-content:center; grid-column:1/-1;
  min-height:67px; padding:5px 12px; background:#332938 url(/static/img/lounge-coolsville.png) right 54% / auto 130px repeat-x;
  image-rendering:pixelated; color:#fff5d8; font:700 22px/1 var(--lounge-type);
}
.lounge-moves-cover span,.lounge-moves-cover strong { padding:2px 5px; background:#272128; }
.lounge-moves-cover strong { font-size:26px; }
html[data-theme="lounge"] #leftcontrols #game-rail #job-actions-menu .job-action-plate {
  background:transparent; color:#282626; border:0; box-shadow:none;
}
html[data-theme="lounge"] #leftcontrols #game-rail #job-actions-menu .job-action-plate:is(:focus-visible,:hover) {
  background:#d5c6a4; outline:1px solid #6f5b40; outline-offset:-2px;
}
@media (max-width:640px) {
  html[data-theme="lounge"] body.room-page #leftcontrols #game-rail #job-actions-menu {
    width:calc(100vw - 16px); min-width:0; max-width:calc(100vw - 16px); box-sizing:border-box;
    max-height:min(65dvh,var(--room-control-menu-available,65dvh)); overflow-y:auto;
    padding:0; border:1px solid #5d5040;
  }
  html[data-theme="lounge"] #leftcontrols #game-rail #job-actions-menu .job-action-plate {
    height:auto; min-height:48px; padding:6px 10px; border:0; background:transparent;
  }
  html[data-theme="lounge"] #leftcontrols #game-rail #job-actions-menu .job-action-label {
    font:700 23px/1 var(--lounge-type); font-size:23px !important; color:var(--text);
  }
  html[data-theme="lounge"] #leftcontrols #game-rail #job-actions-menu .job-action-plate .job-action-desc {
    font:16px/1.35 system-ui,sans-serif; font-size:16px !important; color:#413831;
  }
  html[data-theme="lounge"] #leftcontrols #game-rail #job-actions-menu .job-action-plate:is(:focus-visible,:hover) {
    background:#d5c6a4; outline:1px solid #6f5b40; outline-offset:-2px;
  }
}
