body[data-room-module] {
  --room-shell-dark: #281b2a;
  --room-shell-paper: #fff9f2;
  --room-shell-gold: #dfbe95;
}
#research-room-bar {
  position: relative;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-inline: max(16px, calc((100% - 1350px)/2));
  min-height: 47px;
  background: var(--room-shell-dark);
  color: var(--room-shell-paper);
  border-bottom: 1px solid #765665;
  font: 500 14px/1.4 system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}
#research-room-bar a, #research-room-bar button, #research-room-bar summary {
  color: inherit;
  font: inherit;
  white-space: nowrap;
  text-decoration: none;
}
#research-room-bar :is(summary,button,a):focus-visible {
  outline: 2px solid var(--room-shell-gold);
  outline-offset: 1px;
}
#research-room-bar .room-home {
  display: inline-flex;
  align-items: center;
  gap:7px;
  min-height:44px;
}
#research-room-bar .room-home:hover { text-decoration: underline; text-underline-offset:.25em; }
#research-room-bar .room-home img {display:block; width:23px; height:23px}
#research-room-bar .room-tools { display:flex; align-items:center; gap:6px 15px; }
#research-room-bar .room-projects { position:relative; }
#research-room-bar .room-projects summary {
  display:flex; align-items:center; gap:.42em; list-style:none; min-height:44px; cursor:pointer;
}
#research-room-bar summary::-webkit-details-marker { display:none; }
#research-room-bar .room-projects summary::after { content:""; width:6px; height:6px; border:solid currentColor; border-width:0 1px 1px 0; transform: translateY(-1px) rotate(45deg); }
#research-room-bar .room-projects[open] summary::after { transform:translateY(2px) rotate(225deg); }
#research-room-bar .room-projects nav {
  position:absolute; top:100%; right:0; width:max-content; min-width:16rem;
  display:grid; gap:0; background:var(--room-shell-paper); color:#2e1d2b;
  border:1px solid #a58b91; padding:5px; box-shadow:0 8px 22px #2b162d32;
}
#research-room-bar .room-projects nav a { display:flex; align-items:center; gap:8px; min-height:41px; padding:6px 9px; }
#research-room-bar .room-projects nav a:is(:hover,[aria-current="page"]) { background:#eadfe6; }
#research-room-bar .room-projects nav a span { color:#6c4a26; font-size:12px; margin-left:auto; }
#research-room-bar button {
  background:transparent; border:1px solid #ac8c9d; border-radius:3px; padding:.35em .65em;
  min-width:6.5em; margin:0; min-height:33px; cursor:pointer; 
  transition:background-color .16s ease, color .16s ease, transform .16s ease;
}
#research-room-bar button:hover { color:var(--room-shell-dark); background:var(--room-shell-gold); }
#research-room-bar button:active { transform:translateY(1px); }
#research-room-bar button[hidden] { display:none !important; }
#research-room-bar summary:hover { color:var(--room-shell-gold); }
body.presentation #research-room-bar { display:none; }
body[data-room-module] :is(button,input,select,textarea,a,summary):focus-visible {
  outline:2px solid #9d6134;
  outline-offset:3px;
}
body[data-room-module] :is(.table-wrap,.table-box,.table-overflow,.plot-scroll) { overscroll-behavior-inline: contain; }
body[data-room-module] .room-retry { margin-inline-start:.4em; }
body[data-room-module] .room-skip {
  position:absolute; top:0; left:.5em; z-index:50; transform:translateY(-130%);
  background:#fff9f2; color:#281b2a; padding:.6em .85em; border:1px solid;
}
body[data-room-module] .room-skip:focus { transform:none; }
@media (max-width:640px) {
  #research-room-bar { gap:6px; padding-inline:10px; }
  #research-room-bar .room-tools { gap:8px; }
  #research-room-bar .room-home img { width:19px; height:19px; }
  #research-room-bar button { min-height:40px; }
  body[data-room-module] :is(input:not([type="checkbox"]):not([type="range"]),select,textarea) { font-size: max(16px, 1em); }
}
@media (max-width:363px) {
  #research-room-bar { font-size:13px; }
  #research-room-bar .room-home img { display:none; }
}
@media (prefers-reduced-motion: reduce) {
  #research-room-bar *, #research-room-bar *::before, #research-room-bar *::after {
    animation:none !important; transition:none !important; scroll-behavior:auto !important;
  }
}
body[data-room-module] [data-portal-duplicate] { display:none !important; }
.room-case-form { display:grid !important; grid-template-columns:minmax(0,1fr) auto auto; align-items:end; gap:8px; }
.room-case-form label { min-width:0; display:grid; gap:4px; }
.room-case-form label span { font-size:14px; }
.room-case-form :is(input,select,button) { min-width:0; min-height:44px; }
.room-case-form select { padding-inline:.55em; }
.room-case-links { display:flex; flex-wrap:wrap; gap:8px 18px; margin-block:10px 0; }
#archive-results .result { transition:background-color .16s ease; }
#archive-results .result:is(:hover,:focus-within) { background:#eee5f1; }
#archive-results .result > a { min-height:44px; display:inline-flex; align-items:center; }
@media (max-width:500px) {
  .room-case-form { grid-template-columns:minmax(0,1fr) auto; }
  .room-case-form .query-field { grid-column:1/-1; }
  .room-case-form select { width:100%; }
  #archive-results .result { gap:9px; }
  #archive-results .result > a { font-size:13px; white-space:nowrap; }
}
@media (prefers-reduced-motion:reduce) {
  #archive-results .result { transition:none; }
}
body[data-room-module] .room-lookup-feedback {
  margin-block: 8px;
  padding:8px 12px;
  border-inline-start:3px solid #9f744d;
  background:#f9ead8;
  color:#443120;
  font-size:15px;
}
@media (max-width:640px) {
  #research-room-bar button { min-height:44px; }
}
