/* The bureau is a scene plus one working file. Text always sits on opaque ink. */
.office-shell {
  --office-ink: #111b1c;
  --office-paper: #efe3cb;
  --office-brass: #d8b575;
  --office-muted: #b6bdb6;
  --office-line: #34413d;
  --office-pad: 32px;
  width: min(1280px, 100%);
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1fr);
  align-items: start;
  gap: 0;
  padding: 0;
  border: 1px solid #5b5140;
  border-radius: 16px;
  background: var(--office-ink);
  color: var(--office-paper);
  box-shadow: 0 24px 90px #000b;
  scrollbar-color: #6a674f var(--office-ink);
}
.office-scene {
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100dvh - 34px);
  min-height: 660px;
  max-height: 1060px;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  background: #0e1515;
  border-right: 1px solid #5b5140;
}
.office-shell .office-scene-art {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 61%;
}
.office-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(#071010aa 0%, transparent 37%, transparent 68%, #071010d9 100%);
}
.office-sign {
  position: absolute;
  z-index: 1;
  inset: 42px 24px auto;
  text-align: center;
  color: #f3e5c8;
}
.office-sign p {
  margin: 6px 0 8px;
  font-family: var(--font-file);
  font-size: clamp(40px, 4.2vw, 62px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-shadow: 0 3px 15px #000;
}
.office-sign > span:last-child { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.office-sign-rule { display: block; width: 44px; height: 2px; margin: 0 auto 16px; background: #cbaa69; }
.office-scene-caption {
  position: absolute;
  inset: auto 32px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
}
.office-scene-caption p { margin: 0; font-family: var(--font-file); font-size: 22px; line-height: 1.35; text-shadow: 0 2px 8px #000; }
.office-open-light { width: 7px; height: 7px; flex: 0 0 7px; background: #e6bd77; border-radius: 50%; box-shadow: 0 0 18px #e6bd7766; }
.office-workspace { min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: 28px var(--office-pad) 0; }
.office-shell .muted { color: var(--office-muted); }
.office-shell .menu-head { gap: 12px; }
.office-shell .menu-head h2 { font-size: 30px; line-height: 1.15; letter-spacing: -.03em; }
.office-shell .menu-head p { margin-top: 7px; font-size: 12px; line-height: 1.5; }
.office-shell .menu-mark { background: #d8b57512; border-color: #d8b57540; color: var(--office-brass); }
.office-shell .ermittler {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--office-line);
  border-radius: 0;
  background: transparent;
}
.office-shell .ermittler-bild svg { width: 48px; height: 48px; }
.office-shell .ermittler-portrait { align-self: start; }
.office-shell .ermittler-name { font-size: 16px; }
.office-shell .ermittler-rang { display: inline-flex; margin: 3px 0 0; font-size: 12px; color: var(--office-brass); }
.office-shell .ermittler-naechster { margin: 4px 0 0; font-size: 12px; }
.office-shell .ermittler-leiste { display: none; }
.office-shell .menu-reiter {
  position: static;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: -8px 0 0;
  padding: 0;
  background: transparent;
  border-bottom: 1px solid var(--office-line);
  box-shadow: none;
}
.office-shell .menu-reiter-knopf { padding: 8px 3px; font-size: 13px; color: var(--office-muted); }
.office-shell .menu-reiter-knopf[aria-selected="true"] { color: var(--office-paper); border-bottom-color: var(--office-brass); }
.office-shell .menu-reiter-knopf:focus-visible { outline-color: var(--office-brass); }
.office-shell .menu-tafeln { min-width: 0; }
.office-shell .case-console { display: flex; flex-direction: column; gap: 24px; }
.office-shell .case-console-main { width: 100%; gap: 20px; }
.office-shell .menu-briefing {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  border-left: 2px solid var(--office-brass);
  border-radius: 0;
  background: linear-gradient(90deg, #d8b5750b, transparent);
  padding: 4px 0 4px 18px;
}
.office-shell .menu-briefing-label { margin: 0 0 7px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--office-brass); }
.office-shell .menu-briefing h3 { font-size: 27px; line-height: 1.18; letter-spacing: -.025em; }
.office-shell #menu-briefing-text { margin: 10px 0 14px; font-size: 14px; line-height: 1.65; max-width: 49ch; }
.office-shell .menu-briefing-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.office-shell .menu-briefing-facts > div { padding-top: 8px; border-color: var(--office-line); }
.office-shell .menu-briefing-facts dt { font-size: 11px; }
.office-shell .menu-briefing-facts dd { font-size: 13px; }
.office-shell .menu-briefing-hint { margin: 10px 0 0; font-size: 11px; line-height: 1.5; }
.office-shell .case-console .menu-heading { margin: 0; font-family: var(--font-ui); font-size: 12px; line-height: 1.5; letter-spacing: .11em; text-transform: uppercase; color: var(--office-muted); }
.office-shell .menu-heading::after { background: var(--office-line); }
.office-shell .modi-gitter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; margin-top: 6px; }
.office-shell .case-console .modus-kachel {
  position: relative;
  min-height: 62px;
  gap: 9px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid var(--office-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}
.office-shell .case-console .modus-kachel:last-child { grid-column: auto; }
.office-shell .modus-kachel:hover { background: #ffffff08; }
.office-shell .modus-kachel.is-gewaehlt { background: #d8b57510; border-bottom-color: var(--office-brass); }
.office-shell .modus-kachel.is-gewaehlt::after { content: "✓"; position: absolute; top: 10px; right: 4px; font-size: 12px; color: var(--office-brass); }
.office-shell .modus-kachel.is-gewaehlt .modus-titel { padding-right: 14px; }
.office-shell .modus-icon { color: var(--office-brass); }
.office-shell .modus-titel { font-size: 14px; line-height: 1.4; }
.office-shell .modus-kurz { margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--office-muted); }
.office-shell .modus-erklaerung { margin: 9px 0 0; font-size: 12px; line-height: 1.5; color: var(--office-muted); }
.office-shell .menu-controls { gap: 10px; }
.office-shell .menu-controls .field-label { font-size: 12px; }
.office-shell .select, .office-shell .input { min-height: 44px; color: var(--office-paper); border-color: #526056; background-color: #182321; }
.office-shell .select:focus-visible, .office-shell .input:focus-visible { outline-color: var(--office-brass); }
.office-shell .menu-actions {
  z-index: 3;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0 calc(var(--office-pad) * -1);
  padding: 16px var(--office-pad) 20px;
  border-top: 1px solid var(--office-line);
  background: var(--office-ink);
  box-shadow: 0 -16px 20px -16px #000b;
}
.office-shell .menu-actions .btn { min-height: 48px; border-color: #6a674f; font-size: 14px; }
.office-shell .btn-primary { color: #17201c; background: #d8b575; border-color: #e7c68d; box-shadow: 0 2px 0 #957444; }
.office-shell .btn-primary:hover { background: #e6c58d; }
.office-shell .menu-current-case { font-size: 12px; line-height: 1.5; }
.office-shell .menu-note:empty { display: none; }
.office-shell #tafel-akten .ermittler-zahlen { margin: 14px 0 24px; padding: 12px 0; grid-template-columns: repeat(4, minmax(0, 1fr)); border-color: var(--office-line); }
.office-shell #tafel-akten .ermittler-zahlen dd { color: var(--office-paper); }
.office-shell .avatar-buehne { padding: 18px; border: 1px solid var(--office-line); border-radius: 8px; background: #0d1617; }
.office-shell .avatar-gross { filter: drop-shadow(0 8px 12px #0005); }

/* One shared meeting file, with names and actions kept together. */
#mp-sozial { margin-top: 24px; min-width: 0; }
.mp-sozial-profil, .mp-sozial-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 16px 0; min-width: 0; }
.mp-sozial-profil label, .mp-sozial-form label { flex: 1 1 200px; min-width: 0; }
.mp-sozial-profil input, .mp-sozial-form input { width: 100%; min-width: 0; }
#mp-sozial-code { display: block; flex-basis: 100%; padding: 12px; border: 1px dashed #7b7255; border-radius: 5px; font-family: var(--font-cipher); color: var(--office-brass); overflow-wrap: anywhere; }
.mp-sozial-bereich { margin-top: 24px; }
.mp-sozial-bereich h4 { margin: 0 0 10px; font-size: 16px; }
.mp-sozial-liste { list-style: none; margin: 0; padding: 0; }
.mp-sozial-zeile { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--office-line); }
.mp-sozial-person { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.mp-sozial-person strong, .mp-sozial-person > span { display: block; }
.mp-sozial-person > span { margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--office-muted); }
.mp-sozial-aktionen { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-sozial-aktionen button, .mp-sozial-form button, .mp-sozial-profil button { min-width: 44px; min-height: 44px; white-space: normal; }
#mp-sozial-status { overflow-wrap: anywhere; font-size: 13px; }
#mp-chat { flex: 1 0 100%; min-width: 0; }
#mp-chat:empty { display: none; }
.mp-leiste:has(#mp-chat:not(:empty)) { flex-wrap: wrap; overflow-x: visible; }
.mp-chat-fach { border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); padding: 0 12px 12px; }
.mp-chat-fach:not([open]) { padding-bottom: 0; }
.mp-chat-fach > summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-weight: 600; }
.mp-chat-verlauf { max-height: 10rem; overflow-y: auto; overscroll-behavior: contain; list-style: none; margin: 0 0 10px; padding: 0 4px 0 0; }
.mp-chat-nachricht { margin: 0 0 8px; padding: 9px 12px; border-left: 2px solid #87754d; background: #ffffff06; border-radius: 0 5px 5px 0; overflow-wrap: anywhere; }
.mp-chat-nachricht[data-eigen="true"] { border-left-color: #82a69b; background: #82a69b0a; }
.mp-chat-nachricht strong { font-size: 12px; }
.mp-chat-nachricht time { margin-left: 8px; font-size: 11px; color: var(--muted); }
.mp-chat-nachricht[data-status="fehler"] { border-color: var(--accent-soft); }
.mp-chat-text { margin: 5px 0 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.mp-chat-kurz { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-chat-schnell { flex: 1 1 130px; min-width: 44px; min-height: 44px; padding: 8px; border: 1px solid var(--border); border-radius: 5px; color: var(--text); background: transparent; font: inherit; font-size: 12px; }
#mp-chat-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 10px; }
#mp-chat-form label { flex: 1 1 170px; min-width: 0; font-size: 12px; }
#mp-chat-text { width: 100%; min-width: 0; min-height: 44px; }
#mp-chat-senden { min-width: 44px; min-height: 44px; }
#mp-chat-status { font-size: 12px; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .office-shell { --office-pad: 26px; width: min(900px, 100%); grid-template-columns: minmax(0, 1fr); }
  .office-scene { position: relative; height: 190px; min-height: 0; max-height: none; border-right: 0; border-bottom: 1px solid #5b5140; }
  .office-shell .office-scene-art { object-position: 50% 72%; }
  .office-scene::after { background: linear-gradient(90deg, #071010e8, #0710106b 50%, transparent); }
  .office-sign { inset: 36px auto auto 26px; text-align: left; }
  .office-sign p { font-size: 42px; }
  .office-sign-rule { margin: 0 0 12px; width: 34px; }
  .office-sign > span:last-child { font-size: 10px; }
  .office-scene-caption { display: none; }
  .office-workspace { gap: 18px; padding-top: 24px; }
  .office-shell .menu-head h2 { font-size: 27px; }
  .office-shell .case-console { gap: 20px; }
}
@media (max-width: 560px) {
  .menu:has(.office-shell) { padding: 8px; }
  .office-shell { --office-pad: 18px; border-radius: 12px; }
  .office-scene { height: 150px; }
  .office-sign { inset: 25px auto auto 18px; }
  .office-sign p { font-size: 36px; }
  .office-shell .office-scene-art { object-position: 60% 74%; }
  .office-workspace { padding-top: 20px; gap: 16px; }
  .office-shell .menu-head h2 { font-size: 26px; }
  .office-shell .menu-mark { display: none; }
  .office-shell .ermittler { padding-bottom: 12px; grid-template-columns: 44px minmax(0, 1fr); }
  .office-shell .ermittler-bild svg { width: 44px; height: 44px; }
  .office-shell .ermittler-naechster { display: none; }
  .office-shell .menu-reiter { margin-top: -4px; }
  .office-shell .menu-reiter-knopf { font-size: 12px; }
  .office-shell .menu-briefing { padding-left: 14px; }
  .office-shell .menu-briefing h3 { font-size: 25px; }
  .office-shell #menu-briefing-text { font-size: 14px; }
  .office-shell .menu-briefing-hint { display: none; }
  .office-shell .modi-gitter { gap: 0 10px; }
  .office-shell .modus-icon { display: none; }
  .office-shell .menu-actions { padding-block: 12px; }
}
@media (max-height: 500px) {
  .office-scene { height: 88px; }
  .office-sign { inset: 13px auto auto 20px; }
  .office-sign p { font-size: 30px; margin: 0 0 5px; }
  .office-sign-rule { display: none; }
  .office-workspace { gap: 10px; padding-top: 14px; }
  .office-shell .menu-head { display: none; }
  .office-shell .ermittler { display: none; }
  .office-shell .menu-actions { padding-block: 10px; }
}
/* A tab changes the active file. Keep its controls stationary and readable
   throughout the short reveal; no timer or animation event gates interaction. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes office-file-reveal {
    from { opacity: .76; }
    to { opacity: 1; }
  }
  .office-shell .menu-tafel:not([hidden]) {
    animation: office-file-reveal 180ms ease-out;
  }
}
@media (prefers-reduced-motion: reduce) {
  .office-shell *, .office-shell *::before, .office-shell *::after { animation: none; transition: none; }
}
@media (forced-colors: active) {
  .office-shell { border-color: CanvasText; }
  .office-shell .btn-primary { background: Highlight; color: HighlightText; border-color: Highlight; }
  .office-shell .modus-kachel.is-gewaehlt { outline: 2px solid Highlight; }
  .office-shell .menu-actions { background: Canvas; }
}

.menu-access {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 12px;
  border: 1px solid var(--office-line);
  border-radius: 10px;
  margin-block: 8px 12px;
}
.menu-access p { flex: 1 1 240px; margin: 0; line-height: 1.45; font-size: 14px; }
.menu-access-actions, .account-mode { display: flex; flex-wrap: wrap; gap: 8px; }
.menu-access-actions .btn, .account-mode .btn { min-height: 44px; }
.account-mode [aria-pressed="true"] { outline: 2px solid currentColor; outline-offset: -2px; }
.account-form h3 { margin: 12px 0 0; }
.account-hilfe summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
@media (max-width: 480px) {
  .office-shell #tafel-akten .ermittler-zahlen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-access { padding: 12px; }
  .menu-access-actions .btn:not(.btn-link), .account-mode .btn { flex: 1 1 140px; }
}
@media (max-height: 500px) {
  .menu-access { padding: 0; margin: 0 0 6px; border: 0; gap: 4px 12px; }
  .menu-access p { font-size: 12px; flex-basis: 200px; }
}
