/* =====================================================================
   THE OVERLOOK HOTEL · Concierge line
   ===================================================================== */

:root {
  --void: #0b0a07;
  --soot: #13100c;
  --soot-2: #1b1611;
  --ember: #b4291f;
  --glow: #e3452f;
  --bone: #e6dcc6;
  --bone-dim: #9b927f;
  --bone-faint: rgba(230, 220, 198, .14);
  --brass: #b8955c;
  --brass-hi: #e0c48b;
  --brass-lo: #5e4526;
  --paper: #ebe2cb;
  --paper-edge: #cdbf9f;
  --ink: #2a1b12;
  --ink-soft: #6a5847;
  --ink-red: #8e1c14;

  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --text: 'Cormorant Garamond', 'Garamond', Georgia, serif;

  --topbar-h: 58px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 1px solid var(--brass-hi); outline-offset: 3px; }

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--bone-faint);
  background: linear-gradient(var(--void), rgba(11, 10, 7, .92));
}
.wordmark {
  font-family: var(--display); font-size: 13px; letter-spacing: .42em;
  text-transform: uppercase; color: var(--bone);
}
.top-actions { display: flex; align-items: center; gap: 18px; }
body[data-view="door"] .leave-btn { display: none; }

.text-btn {
  background: none; border: 0; padding: 6px 0;
  font-family: var(--display); font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--bone-dim);
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.text-btn:hover { color: var(--bone); border-bottom-color: var(--ember); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  background: none; border: 0; color: var(--bone-dim);
  border-radius: 50%;
  transition: color .2s, background .2s;
}
.icon-btn:hover { color: var(--bone); background: rgba(230, 220, 198, .06); }
.icon-btn svg { width: 22px; height: 22px; }
.sound-toggle .mute { display: none; }
.sound-toggle[aria-pressed="false"] .wave { display: none; }
.sound-toggle[aria-pressed="false"] .mute { display: inline; }

.view { position: fixed; inset: var(--topbar-h) 0 0 0; }

/* ================================================================ DOOR */
#door-view {
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(180, 41, 31, .22), transparent 70%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(180, 41, 31, .08), transparent 70%),
    var(--void);
  overflow: hidden;
}
/* faint wallpaper stripes */
#door-view::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(90deg, rgba(230, 220, 198, .018) 0 1px, transparent 1px 44px);
  -webkit-mask-image: linear-gradient(transparent, #000 20%, #000 70%, transparent);
          mask-image: linear-gradient(transparent, #000 20%, #000 70%, transparent);
}

.hall {
  --dh: min(58vh, 560px, 118vw);
  margin: auto; padding: 28px 0 36px;
  --dw: calc(var(--dh) * .56);
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(14px, 3vh, 28px);
  transition: transform 1.3s cubic-bezier(.6, 0, .8, .4), opacity 1.1s ease-in;
  transform-origin: 50% 32%;
}
.hall.entering { transform: scale(3.2); opacity: 0; }

.door-scene { position: relative; }
.doorway {
  position: relative;
  width: calc(var(--dw) + 26px); height: calc(var(--dh) + 13px);
  padding: 13px 13px 0;
  background: linear-gradient(90deg, #120c08, #231610 12%, #1a110c 88%, #0f0a07);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 30px 80px rgba(0, 0, 0, .8);
  perspective: 1400px;
}
.door-light {
  position: absolute; inset: 13px 13px 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, #ff6a3d 0%, #c22a1c 35%, #4a0c07 75%, #1a0503 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .7);
  animation: flicker 3.2s infinite steps(1);
}
@keyframes flicker {
  0%, 100% { filter: brightness(1); } 47% { filter: brightness(.86); } 49% { filter: brightness(1.05); } 73% { filter: brightness(.93); }
}

.door {
  position: relative; width: 100%; height: 100%;
  transform-origin: 0 50%;
  transition: transform 1.5s cubic-bezier(.55, 0, .25, 1);
  background:
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, .16) 0 1px, transparent 1px 7px,
      rgba(255, 230, 200, .018) 7px 8px, transparent 8px 19px,
      rgba(0, 0, 0, .1) 19px 21px, transparent 21px 31px),
    linear-gradient(180deg, #3d2217 0%, #2c180f 45%, #22120b 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .55), inset 0 0 40px rgba(0, 0, 0, .55);
}
.door.knock { animation: knock .9s ease-out; }
@keyframes knock {
  0%, 33%, 66%, 100% { transform: translateX(0); }
  8%, 41%, 74% { transform: translateX(1.5px) scale(.998); }
}
.door.open { transform: rotateY(-104deg); }
.door.open .handle { opacity: .6; }

.panel {
  position: absolute;
  border: 1px solid rgba(0, 0, 0, .5);
  background:
    linear-gradient(180deg, rgba(255, 220, 190, .04), rgba(0, 0, 0, .12));
  box-shadow:
    inset 3px 3px 0 rgba(255, 225, 195, .05),
    inset -3px -3px 6px rgba(0, 0, 0, .45),
    0 0 0 5px rgba(0, 0, 0, .12),
    0 1px 0 6px rgba(255, 220, 190, .03);
}
.panel-top { left: 11%; right: 11%; top: 7%; height: 27%; display: grid; place-items: center; }
.panel-l { left: 11%; width: 35%; top: 41%; bottom: 7%; }
.panel-r { right: 11%; width: 35%; top: 41%; bottom: 7%; }

.plaque {
  position: absolute; left: 50%; top: 36.2%; transform: translate(-50%, -50%);
  padding: .35em 1.1em .3em;
  font-family: var(--display); font-weight: 600; letter-spacing: .32em; text-transform: uppercase;
  font-size: calc(var(--dh) * .018); color: #3a2a14;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 45%, #8a6a3a);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
  border-radius: 1px;
  white-space: nowrap;
}
.handle {
  position: absolute; right: 7.5%; top: 55%;
  width: calc(var(--dw) * .075); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3dfae, var(--brass) 45%, var(--brass-lo) 100%);
  box-shadow: 0 3px 6px rgba(0, 0, 0, .7), 0 0 0 3px rgba(0, 0, 0, .25);
  transition: opacity 1s;
}

/* the speakeasy slot */
.peep {
  position: relative;
  width: 80%; height: 44%;
  border-radius: 2px;
  padding: 5px;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 40%, var(--brass-lo));
  box-shadow: 0 2px 5px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .4);
  overflow: hidden;
}
.peep::before, .peep::after { /* screws */
  content: ""; position: absolute; top: 50%; width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0dcaa, #5a4020);
  transform: translateY(-50%);
}
.peep::before { left: 3px; } .peep::after { right: 3px; }
.peep-void {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  background: radial-gradient(ellipse 60% 90% at 50% 55%, #2a120b 0%, #0c0503 60%, #000 100%);
  box-shadow: inset 0 4px 10px #000;
}
.eyes {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity .6s .35s;
}
.peep.open .eyes { opacity: 1; }
.eye { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .12s ease; }
.eyes.blink .eye { transform: scaleY(.08); }
.eyes.squint .eye { transform: scaleY(.42); transition-duration: .25s; }
.iris { transition: transform .45s cubic-bezier(.3, .7, .3, 1); }

.peep-cover {
  position: absolute; inset: 5px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 6px),
    linear-gradient(180deg, #4a2a1b, #2e1a10);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6), 2px 0 6px rgba(0, 0, 0, .6);
  transition: transform .55s cubic-bezier(.7, 0, .3, 1);
}
.peep-cover span { /* little brass knob */
  position: absolute; right: 9%; top: 50%; width: 8px; height: 8px; border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle at 35% 35%, #f0dcaa, var(--brass-lo));
}
.peep.open .peep-cover { transform: translateX(-92%); }
.peep.slam .peep-cover { transition-duration: .16s; }
.peep.rattle { animation: rattle .35s; }
@keyframes rattle { 25% { transform: translateX(-2px); } 50% { transform: translateX(2px); } 75% { transform: translateX(-1px); } }

.floor-glow {
  position: absolute; left: -30%; right: -30%; bottom: -34px; height: 34px;
  background: radial-gradient(ellipse 50% 100% at 50% 0%, rgba(227, 69, 47, .0), transparent);
  transition: background 1s;
}
.hall.opening .floor-glow { background: radial-gradient(ellipse 45% 100% at 50% 0%, rgba(227, 69, 47, .35), transparent); }

.door-ui {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  width: min(420px, calc(100vw - 2 * var(--gutter)));
  min-height: 118px;
}
.voice {
  margin: 0; min-height: 1.5em;
  font-style: italic; font-size: clamp(20px, 2.6vh, 24px); color: var(--bone);
  text-align: center;
  transition: opacity .35s;
}
.voice.fade { opacity: 0; }
.voice.warn { color: var(--glow); }

.knock-btn, .pw-form button {
  font-family: var(--display); font-size: 13px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--bone);
  background: transparent;
  border: 1px solid rgba(184, 149, 92, .55);
  padding: 13px 30px 12px 34px;
  transition: background .25s, border-color .25s, color .25s;
}
.knock-btn:hover, .pw-form button:hover { background: rgba(180, 41, 31, .18); border-color: var(--ember); }
.knock-btn:disabled, .pw-form button:disabled { opacity: .45; cursor: default; }

.pw-form {
  display: flex; width: 100%; gap: 0;
  animation: rise .5s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.pw-form input {
  flex: 1; min-width: 0;
  background: rgba(230, 220, 198, .04);
  border: 1px solid rgba(184, 149, 92, .55); border-right: 0;
  padding: 11px 16px;
  font-size: 20px; letter-spacing: .08em;
  color: var(--bone);
  outline: none;
}
.pw-form input::placeholder { color: var(--bone-dim); font-style: italic; letter-spacing: .02em; }
.pw-form input:focus { border-color: var(--brass-hi); background: rgba(230, 220, 198, .07); }
.pw-form button { padding-left: 18px; padding-right: 14px; letter-spacing: .24em; font-size: 11.5px; white-space: nowrap; }

/* ================================================================ SHARED CHAT PIECES */
.who h1 {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: 17px; letter-spacing: .3em; text-transform: uppercase; color: var(--bone);
}
.status { margin: 2px 0 0; font-style: italic; font-size: 16px; color: var(--bone-dim); min-height: 1.2em; }
.status.live { color: var(--brass-hi); }
.status.live::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin: 0 8px 2px 0; vertical-align: middle;
  background: var(--glow); box-shadow: 0 0 8px var(--glow);
}

.keytag {
  position: relative; flex: none;
  width: 58px; height: 74px;
  display: grid; place-items: end center;
  padding-bottom: 12px;
  background: linear-gradient(170deg, var(--brass-hi), var(--brass) 40%, #7c5d31);
  clip-path: polygon(50% 0, 100% 16%, 100% 100%, 0 100%, 0 16%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
  transform: rotate(4deg);
}
.keytag .hole {
  position: absolute; top: 12px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px;
  border-radius: 50%; background: var(--void); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .8);
}
.keytag .num {
  font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .04em;
  color: #3a2810; text-shadow: 0 1px 0 rgba(255, 240, 200, .45);
}
.keytag.small { width: 44px; height: 56px; padding-bottom: 8px; }
.keytag.small .hole { top: 9px; width: 7px; height: 7px; margin-left: -3.5px; }
.keytag.small .num { font-size: 15px; }

.log {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 28px var(--gutter) 20px;
  display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin; scrollbar-color: rgba(230, 220, 198, .18) transparent;
}
.log > :first-child { margin-top: auto; }

.day {
  align-self: center; margin: 12px 0 2px;
  font-family: var(--display); font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--bone-dim);
}
.away {
  display: flex; align-items: center; gap: 14px; margin: 10px 0 2px;
  font-style: italic; font-size: 16px; color: var(--glow);
}
.away::before, .away::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--ember), transparent); }

.msg { display: flex; flex-direction: column; max-width: min(540px, 86%); }
.msg time { font-size: 14px; font-style: italic; }

/* the concierge writes on hotel notepaper */
.note {
  position: relative;
  padding: 16px 22px 18px;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, .35), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(150, 110, 60, .16), transparent 60%),
    var(--paper);
  border-radius: 1px;
  box-shadow: 0 1px 0 var(--paper-edge), 0 10px 26px rgba(0, 0, 0, .55);
}
.note header {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  margin-bottom: 12px; padding-bottom: 7px;
  border-bottom: 3px double rgba(142, 28, 20, .38); /* letterhead rule */
}
.note .from { font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-red); }
.note time { color: var(--ink-soft); }
.note .body { margin: 0; font-size: 20px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }

.bubble {
  padding: 12px 18px 10px;
  background: rgba(230, 220, 198, .05);
  border: 1px solid var(--bone-faint);
  border-radius: 1px;
}
.bubble .who-label { display: block; margin-bottom: 4px; font-family: var(--display); font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--brass); }
.bubble .body { margin: 0; font-size: 20px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--bone); }
.bubble time { display: block; margin-top: 4px; color: var(--bone-dim); text-align: right; }

.msg.fresh { animation: arrive .55s cubic-bezier(.2, .8, .2, 1); }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } }

/* guest view: concierge left, guest right */
#guest-log .msg.concierge { align-self: flex-start; }
#guest-log .msg.guest { align-self: flex-end; }
#guest-log .bubble { border-right: 2px solid var(--ember); }
/* desk view: guest left, concierge (you) right */
#desk-log .msg.guest { align-self: flex-start; }
#desk-log .msg.concierge { align-self: flex-end; }
#desk-log .bubble { border-left: 2px solid var(--ember); }
.receipt { align-self: flex-end; margin-top: -6px; font-style: italic; font-size: 14px; color: var(--bone-dim); }

/* the concierge is writing */
.writing { align-self: flex-start; }
#desk-log .writing { align-self: flex-start; }
.writing .note { padding: 14px 22px 16px; }
.writing .note .body { font-style: italic; font-size: 18px; color: var(--ink-soft); display: flex; align-items: baseline; gap: 2px; }
.writing.as-bubble .bubble .body { font-style: italic; font-size: 18px; color: var(--bone-dim); display: flex; gap: 2px; }
.dots i { display: inline-block; width: 4px; height: 4px; margin-left: 3px; border-radius: 50%; background: currentColor; animation: ink 1.3s infinite; }
.dots i:nth-child(2) { animation-delay: .18s; } .dots i:nth-child(3) { animation-delay: .36s; }
@keyframes ink { 0%, 60%, 100% { opacity: .2; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }

.composer {
  flex: none;
  display: flex; align-items: flex-end; gap: 14px;
  padding: 14px var(--gutter) calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--bone-faint);
  background: linear-gradient(rgba(19, 16, 12, .6), var(--soot));
}
.composer textarea {
  flex: 1; resize: none; max-height: 160px;
  background: transparent; border: 0; border-bottom: 1px solid rgba(184, 149, 92, .45);
  padding: 10px 2px 8px;
  font-size: 20px; line-height: 1.4; color: var(--bone);
  outline: none;
}
.composer textarea::placeholder { color: var(--bone-dim); font-style: italic; }
.composer textarea:focus { border-bottom-color: var(--brass-hi); }
.bell-btn {
  flex: none; width: 52px; height: 52px; padding: 7px;
  border: 1px solid rgba(184, 149, 92, .5); border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, rgba(224, 196, 139, .16), transparent 70%);
  color: var(--brass);
  transition: color .2s, border-color .2s, background .2s;
}
.bell-btn:hover { color: var(--brass-hi); border-color: var(--brass-hi); }
.bell-btn:disabled { opacity: .4; cursor: default; }
.bell-btn svg { width: 100%; height: 100%; transform-origin: 50% 20%; }
.bell-btn.ring svg { animation: ring .6s; }
@keyframes ring { 20% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 70% { transform: rotate(-5deg); } }

/* ================================================================ GUEST CHAT */
#chat-view { display: flex; justify-content: center; background:
  radial-gradient(ellipse 60% 40% at 50% 0%, rgba(180, 41, 31, .12), transparent 70%), var(--void); }
.chat-shell {
  width: min(820px, 100%); height: 100%;
  display: flex; flex-direction: column;
  border-left: 1px solid rgba(230, 220, 198, .06); border-right: 1px solid rgba(230, 220, 198, .06);
}
.chat-head {
  flex: none; display: flex; align-items: center; gap: 18px;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--bone-faint);
}
.seal {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 50% 30%;
  box-shadow: 0 0 0 1px rgba(184, 149, 92, .5), 0 0 0 4px var(--void), 0 0 0 5px rgba(184, 149, 92, .25);
}
.chat-head .who { flex: 1; min-width: 0; }

/* ================================================================ DESK */
#desk-view { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; background: var(--void); }
.ledger { border-right: 1px solid var(--bone-faint); background: var(--soot); overflow-y: auto; }
.ledger h2 {
  margin: 0; padding: 22px 22px 14px;
  font-family: var(--display); font-weight: 400; font-size: 12px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--bone-dim);
  border-bottom: 1px solid var(--bone-faint);
}
.ledger-list { list-style: none; margin: 0; padding: 0; }
.ledger-item {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 16px 20px 16px 22px; text-align: left;
  background: none; border: 0; border-bottom: 1px solid rgba(230, 220, 198, .07);
  border-left: 2px solid transparent;
  transition: background .2s;
}
.ledger-item:hover { background: rgba(230, 220, 198, .035); }
.ledger-item[aria-current="true"] { background: rgba(180, 41, 31, .1); border-left-color: var(--ember); }
.ledger-item .keytag { transform: rotate(-3deg); }
.ledger-item .info { flex: 1; min-width: 0; }
.ledger-item .name { display: flex; justify-content: space-between; gap: 8px; font-size: 19px; font-weight: 600; }
.ledger-item .name time { font-weight: 400; font-style: italic; font-size: 14px; color: var(--bone-dim); white-space: nowrap; }
.ledger-item .preview { display: block; font-size: 16px; color: var(--bone-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger-item .presence { display: block; font-size: 14px; font-style: italic; color: var(--bone-dim); }
.ledger-item .presence.live { color: var(--brass-hi); }
.ledger-item.has-unread .preview { color: var(--bone); }
.badge {
  flex: none; min-width: 30px; height: 30px; padding: 0 6px;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 16px; color: #fff3ea;
  background: radial-gradient(circle at 40% 35%, var(--glow), var(--ember) 70%);
  border-radius: 15px;
  box-shadow: 0 0 14px rgba(227, 69, 47, .55);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 22px rgba(227, 69, 47, .85); } }

.desk-convo { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.convo-head {
  flex: none; display: flex; align-items: center; gap: 16px;
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--bone-faint);
  min-height: 86px;
}
.convo-head .who { flex: 1; min-width: 0; }
.convo-head .keytag { transform: rotate(3deg); }
.convo-head:not(.chosen) .keytag { visibility: hidden; }
.back-btn { display: none; }
.clear-btn { font-size: 10.5px; }
.clear-btn:hover { border-bottom-color: var(--ember); color: var(--glow); }
.empty-desk { align-self: center; margin: auto; max-width: 28ch; text-align: center; font-style: italic; font-size: 20px; color: var(--bone-dim); }

/* ================================================================ misc */
.demo-flag {
  position: fixed; left: 12px; bottom: 12px; z-index: 30; margin: 0;
  max-width: 330px; padding: 8px 12px;
  font-size: 14px; line-height: 1.35; font-style: italic; color: var(--bone-dim);
  background: rgba(19, 16, 12, .92); border: 1px dashed rgba(184, 149, 92, .4);
}
body:not([data-view="door"]) .demo-flag { display: none; }

.toast {
  position: fixed; left: 50%; top: calc(var(--topbar-h) + 12px); transform: translateX(-50%); z-index: 40;
  padding: 8px 16px; font-style: italic; font-size: 16px;
  background: var(--soot-2); border: 1px solid var(--ember); color: var(--bone);
}

/* ================================================================ small screens */
@media (max-width: 720px) {
  :root { --topbar-h: 52px; }
  .wordmark { font-size: 11px; letter-spacing: .3em; }
  .chat-head { gap: 14px; padding: 12px var(--gutter); }
  .seal { width: 48px; height: 48px; }
  .keytag { width: 46px; height: 58px; padding-bottom: 9px; }
  .keytag .hole { top: 9px; width: 7px; height: 7px; margin-left: -3.5px; }
  .keytag .num { font-size: 16px; }
  .who h1 { font-size: 14px; letter-spacing: .24em; }
  .status { font-size: 15px; }
  .msg { max-width: 92%; }
  .note { padding: 14px 16px 16px; }
  .note .body, .bubble .body, .composer textarea { font-size: 19px; }
  .hall { --dh: min(50vh, 440px, 110vw); padding-top: 18px; }
  .demo-flag { left: 12px; right: 12px; bottom: auto; top: calc(var(--topbar-h) + 8px); max-width: none; font-size: 13px; }
  .pw-form { flex-direction: column; gap: 10px; }
  .pw-form input { border-right: 1px solid rgba(184, 149, 92, .55); text-align: center; }
  .pw-form button { padding: 13px; }

  #desk-view { grid-template-columns: 1fr; }
  #desk-view[data-pane="list"] .desk-convo { display: none; }
  #desk-view[data-pane="convo"] .ledger { display: none; }
  .back-btn { display: inline-grid; margin-left: -8px; }
  .convo-head { gap: 10px; min-height: 76px; }
  .clear-btn { letter-spacing: .16em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .door, .hall, .peep-cover { transition-duration: .2s !important; }
}
