/* Pop-ups over the world (client/pop.ts): a leather card in the middle of the screen, the scene dimmed behind it.
   Also the window a page opens in over a scene (client/over.ts) and the scene switch (client/ui.ts). */
.pops { position: fixed; inset: 0; z-index: 58; pointer-events: none; }
.pops[hidden] { display: none; }
.pops > .pop { position: absolute; inset: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 12px; background: rgba(8, 6, 4, .55); pointer-events: auto; animation: fade .12s ease-out; }
.pop-card { --ink: #e2d2b0; --muted: #c4b292; --faint: #ac9a7e; --gold: #e0bd6a; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; max-width: 100%; max-height: 100%; padding: 12px 14px 14px; overflow: hidden; color: var(--ink);
  border: 1px solid #8a6f48; border-radius: 8px; background: linear-gradient(180deg, rgba(56, 42, 30, .985), rgba(32, 24, 17, .985));
  box-shadow: 0 0 0 1px rgba(20, 14, 10, .8), 0 16px 60px rgba(0, 0, 0, .7); font: 500 14.5px/1.25 'Crimson Pro', Georgia, serif; }
.pop-head { display: flex; align-items: center; gap: 10px; min-height: 30px; flex: none; }
.pop-title { font: 700 23px/1 'Cormorant Garamond', Georgia, serif; letter-spacing: .02em; color: #f3e3b4; white-space: nowrap; }
.pop-title .st-lv { font-style: normal; color: #f0c45a; margin-left: 2px; }
.pop-sub { color: var(--muted); font-size: 14px; white-space: nowrap; }
.pop-x { margin-left: auto; width: 32px; height: 32px; flex: none; border: 0; border-radius: 4px; background: none; color: var(--muted); font: 400 24px/1 Georgia, serif; cursor: pointer; }
.pop-x:hover, .pop-x:focus-visible { color: #fff; background: rgba(255, 255, 255, .08); outline: none; }

/* A page as a window over the Kinstead or the Kinhall. */
.over-dim { position: fixed; z-index: 34; background: rgba(8, 6, 4, .55); animation: fade .12s ease-out; }
.app > #page.over { position: fixed; z-index: 35; flex: none; box-sizing: border-box; overflow-y: auto; border: 1px solid #8a6f48; border-radius: 10px; background: var(--bg);
  box-shadow: 0 0 0 1px rgba(20, 14, 10, .8), 0 16px 60px rgba(0, 0, 0, .7); }
.app > #page.over.over-full { border: 0; border-radius: 0; box-shadow: none; }
.over-x { position: fixed; z-index: 36; width: 34px; height: 34px; padding: 0; border: 1px solid #b39a66; border-radius: 50%; background: linear-gradient(180deg, #4a3828, #2a1f16); color: #f3e6c4;
  font: 400 22px/1 Georgia, serif; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.over-x:hover, .over-x:focus-visible { border-color: #fff0bf; color: #fff; outline: none; }

/* The scene switch: the Kinstead, the Kinhall and the Altar grounds, a tap apart. A row of its own above the scene,
   so it never covers a plate. */
.scene-switch { flex: none; display: flex; justify-content: center; align-items: center; gap: 4px; height: 36px; padding: 0 44px; box-sizing: border-box;
  border-bottom: 1px solid #5c4830; background: linear-gradient(180deg, #2c2118, #231a13); box-shadow: 0 1px 0 rgba(0, 0, 0, .5); position: relative; z-index: 31; }
.scene-switch[hidden] { display: none; }
.scene-switch > * { display: inline-flex; align-items: center; gap: 6px; height: 30px; box-sizing: border-box; padding: 0 14px 0 9px; border: 1px solid transparent; border-radius: 5px; background: none; color: #e8d8b4; font: 700 14.5px/1 'Crimson Pro', Georgia, serif; white-space: nowrap; cursor: pointer; }
.scene-switch > button:hover, .scene-switch > button:focus-visible { background: rgba(255, 255, 255, .08); border-color: #7e6440; color: #fff; outline: none; }
.scene-switch > .on { background: linear-gradient(180deg, #f3cf72, #c8962f); border-color: #fff0bf; color: #2a1a08; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
.scene-switch > span.on { cursor: default; }
.scene-switch > [aria-disabled="true"] { opacity: .62; }
.scene-switch .ui-ic { width: 22px; height: 22px; image-rendering: pixelated; }
.scene-switch small { font-weight: 500; opacity: .85; }
.over-x.in-bar { width: 30px; height: 30px; font-size: 20px; }
@media (max-width: 620px) {
  .pops > .pop { padding: 6px; }
  .pop-card { padding: 9px 10px 10px; gap: 8px; }
  .pop-title { font-size: 20px; }
  .scene-switch { height: 40px; gap: 2px; padding: 0 40px; }
  .scene-switch > * { height: 34px; padding: 0 9px 0 5px; font-size: 13.5px; gap: 4px; }
  .scene-switch .ui-ic { width: 20px; height: 20px; }
}

/* The chat window steps aside while a pop-up or a window is up (hover cards and dialogs still open over them). */
body.pop-open .cdock, body.over-open .cdock { visibility: hidden; }

/* Home in the bar: the Kinstead and the Kinhall side by side (client/ui.ts navList). On a laptop they are two picture
   tabs (their names on hover), so Team and Battle keep their places; a wide screen spells them out. */
.nav > a.navq + a.navq { margin-left: -4px; }
@media (max-width: 1679px) {
  .nav > a.navq { padding: 0 7px; }
  .nav > a.navq > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav > a.navq > :is(svg, img.ui-ic) { display: block !important; }
}
/* A phone with a window over a scene: the bottom bar steps aside (the window takes its room; the switch row closes it). */
body.over-open .bnav { visibility: hidden; }
