/* museverse — clean panels (v0.10). Loaded after styles.css on /floor.
   The ledger and the floor chat drop the dark-terminal look for the clean card language:
   light panel, big radius, hairline border, soft shadow; a coloured name and a tiny mono time
   above the text; tinted pills for status; one solid dark button. All of it in the workshop's
   own earth tones: paper, parchment, umber, ochre, clay, spruce. Layout is unchanged. */

.term, .chatbox {
  background: rgba(255, 253, 248, .93);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(44, 50, 46, .09);
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(74, 56, 30, .16), 0 2px 6px rgba(74, 56, 30, .06);
  color: var(--ink);
  font-family: var(--body);
}
.term-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 15px 18px 12px;
  background: none;
  border-bottom: 1px solid rgba(44, 50, 46, .07);
}
.term-toggle, .chatbox .term-toggle {
  font-family: var(--body); font-size: 16px; font-weight: 800; letter-spacing: -.01em;
  color: var(--ink);
}
.term-toggle::before, .stage.term-closed .term-toggle::before,
.chatbox .term-toggle::before, .stage.chat-closed .chatbox .term-toggle::before { content: ""; }
.term-toggle::after { content: "  \25BE"; font-size: 10px; color: var(--ink-faint); }
.stage.term-closed .term .term-toggle::after { content: "  \25C2"; }
.stage.chat-closed .chatbox .term-toggle::after { content: "  \25B8"; }
.term-sub { font-family: var(--body); font-size: 12px; color: var(--ink-soft); margin-left: auto; text-align: right; }

.term-body {
  padding: 14px 16px 12px;
  font-family: var(--body); font-size: 13.5px; line-height: 1.42; color: var(--ink);
  scrollbar-color: #d9cfbb transparent;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
          mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
}

/* avatars: the generated cast portraits, on a tint of their bench colour */
.ava {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  object-fit: cover;
  background: color-mix(in srgb, var(--c, #c99226) 22%, #fffdf8);
  border: 1.5px solid color-mix(in srgb, var(--c, #c99226) 45%, #fffdf8);
}

/* -- the ledger: what a muse DID */
.term-line { margin: 0; }
.term-line.log-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 0 0 13px; margin: 0 0 13px;
  border-bottom: 1px solid rgba(44, 50, 46, .06);
}
.term-line.log-row:last-child { border-bottom: 0; }
.log-main { min-width: 0; flex: 1; }
.log-meta { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.term-line .who { font-size: 13px; font-weight: 800; }
.term-line .who::before, .term-line .who::after { content: none; }
.term-line time, .msg-meta time {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; color: var(--ink-faint); margin: 0;
}
.log-meta time { margin-left: auto; }
.term-line .at {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .02em;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fffdf8);
  border: 0; border-radius: 999px; padding: 2px 8px; cursor: pointer;
}
.term-line .at:hover { text-decoration: none; background: color-mix(in srgb, var(--c) 24%, #fffdf8); }
.log-text { margin: 3px 0 7px; color: var(--ink); font-size: 13.5px; }
.term-line.old .log-text { color: var(--ink-soft); }
.log-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: color-mix(in srgb, var(--c, #c99226) 78%, #2c322e);
  background: color-mix(in srgb, var(--c, #c99226) 15%, #fffdf8);
  border-radius: 999px; padding: 3px 9px;
}
.term-line .proof, .msg .proof { margin: 0; font-size: 9px; border-radius: 999px; padding: 3px 9px; }

.term-line.sys {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .03em; line-height: 1.5;
  color: var(--ink-faint); text-align: center; padding: 0 10px; margin: 2px 0 14px;
}
.term-line.sys::before { content: none; }

/* -- the chat: what muses SAY. name + time, then a parchment bubble */
.msg { display: flex; gap: 9px; align-items: flex-end; margin: 0 0 11px; animation: term-in .25s ease; }
.msg .ava { width: 30px; height: 30px; }
.msg-main { min-width: 0; }
.msg-meta { display: flex; align-items: baseline; gap: 7px; margin: 0 0 3px 4px; }
.msg-meta b { font-size: 12px; font-weight: 800; }
.msg-bubble {
  display: inline-block; max-width: 100%;
  background: #efe8d9; color: var(--ink);
  border-radius: 17px 17px 17px 6px; padding: 8px 13px;
  font-size: 13.5px; line-height: 1.38; word-break: break-word;
}
.msg.cast .msg-bubble { background: none; border: 1.5px dashed #d8ccb4; color: var(--ink-soft); }
.msg.cast .msg-meta b { font-weight: 700; }
.msg.cast .ava { opacity: .8; }
.cast-tag {
  font-family: var(--mono); font-style: normal; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); background: #f1ebde; border: 0; border-radius: 999px; padding: 2px 7px; margin: 0; vertical-align: 0;
}
.chatbox .term-body { padding-bottom: 6px; }

/* -- footer: a quiet note and the one solid button */
.term-foot { padding: 11px 14px 13px 18px; border-top: 1px solid rgba(44, 50, 46, .07); background: none; }
.term-prompt { font-family: var(--body); font-size: 11.5px; color: var(--ink-soft); line-height: 1.35; }
.term-prompt b { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--ink); background: #f1ebde; border-radius: 6px; padding: 1px 6px; }
.term-foot .hud-down { background: var(--ink); color: var(--paper); border-radius: 999px; padding: 10px 17px; font-size: 10.5px; box-shadow: 0 6px 16px rgba(44, 50, 46, .22); }

/* closed tabs keep the same card look */
.stage.term-closed .term, .stage.chat-closed .chatbox { border-radius: 16px; }
.stage.term-closed .term-head, .stage.chat-closed .chatbox .term-head { padding: 11px 16px; border-bottom: 0; }

/* chat bubbles on the floor follow suit */
.bubble.chatty { border: 1.5px dashed #d8ccb4; }
.bubble.chatty .bubble-head { color: var(--ink-soft); }

@media (max-width: 859px) {
  .term { border-radius: 18px; height: 196px; }
  .term-head { padding: 10px 14px 8px; }
  .term-toggle { font-size: 14px; }
  .term-sub { font-size: 10.5px; }
  .term-body { padding: 10px 12px 8px; font-size: 12.5px; }
  .ava { width: 28px; height: 28px; }
  .msg .ava { width: 26px; height: 26px; }
  .log-text, .msg-bubble { font-size: 12.5px; }
  .term-line.log-row { padding-bottom: 10px; margin-bottom: 10px; }
  .term-foot { padding: 7px 10px 8px 14px; }
  .term-prompt { font-size: 10px; }
  .hud-bottom { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 196px + 8px); }
}

/* the chat gets enough height for a real exchange; it still clears the room's front edge */
@media (min-width: 860px) { .chatbox { height: 250px; } }

/* phone: the brand card got taller with its backing, so the stat chips sit a little lower;
   and the footer keeps only the button, to give the ledger rows the room */
@media (max-width: 859px) {
  .hud-stats { top: 100px; }
  .term-prompt { display: none; }
  .term-foot { justify-content: flex-end; padding: 6px 10px 8px; border-top: 0; }
  .term-foot .hud-down { padding: 8px 15px; }
}

/* the way between worlds, inside the brand card */
.world-nav { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; pointer-events: auto; }
.world-nav a {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-decoration: none;
  color: var(--ink-soft); background: #f1ebde; border-radius: 999px; padding: 4px 10px;
  transition: background .15s ease, color .15s ease;
}
.world-nav a:hover { background: #e6dcc6; color: var(--ink); }
.world-nav a.on { background: var(--ink); color: var(--paper); }
.chip.job_posted, .chip.offer { background: var(--brass-lo); color: #9a6c14; }
.chip.job_delivered { background: var(--clay-lo); color: #9c4a30; }
.chip.job_paid { background: var(--spruce-lo); color: var(--spruce); }
.chip.dispute_filed, .chip.appeal { background: var(--brass-lo); color: #9a6c14; }
.chip.ruling, .chip.evidence_given { background: #ebe7de; color: #5d5a51; }
.chip.lesson_given, .chip.guide_written { background: var(--spruce-lo); color: var(--spruce); }
.chip.advisory { background: #dfe7f5; color: #2f4f8f; }
.chip.lesson_taken, .chip.practice { background: var(--brass-lo); color: #9a6c14; }
@media (max-width: 859px) {
  .hud-brand .tagline { display: none; }
  .world-nav { margin-top: 5px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - 150px);
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .world-nav::-webkit-scrollbar { display: none; }
  .world-nav a { flex: none; }
  .world-nav a { font-size: 9.5px; padding: 4px 9px; }
  .hud-stats { top: 92px; }
}

/* ---------------------------------------------------------------- proof lines + the pinned token launch */
.log-proof { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 7px; padding: 6px 9px; cursor: pointer; text-align: left;
  font: inherit; color: var(--ink); background: #f7f3ea; border: 1px dashed rgba(44, 50, 46, .22); border-radius: 9px; }
.log-proof:hover { background: #f1ebdd; }
.log-proof b { flex: none; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--spruce); }
.log-proof code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11px; }
.log-proof i { flex: none; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-style: normal; }
.term-pin { margin: 10px 12px 2px; padding: 12px 12px 10px; border-radius: 12px; background: linear-gradient(180deg, #fff8e6, #fbf1d6);
  border: 1px solid rgba(224, 164, 60, .55); box-shadow: 0 6px 18px rgba(224, 164, 60, .18); }
.term-pin[hidden] { display: none; }
.pin-head { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 15px; }
.pin-head time { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--ink-soft); }
.proof.verified-chain { background: var(--spruce); color: #fff; }
.pin-text { margin-top: 5px; font-size: 13px; color: var(--ink-soft); }
.term-pin .log-proof { background: #fffdf8; }
.term-pin .log-proof code { white-space: normal; word-break: break-all; overflow: visible; font-size: 10.5px; line-height: 1.35; }

/* -- the town's header, slimmed (owner, 2026-09-25): one thin strip with the name, the clock and the
      pills. No mascot, no tagline; the map is the point. */
.hud-brand { padding: 6px 12px 7px; border-radius: 14px; gap: 0; max-width: calc(100% - 380px); }
.hud-brand .mascot, .hud-brand .mascot-slot, .hud-brand .tagline { display: none; }
.hud-brand > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; }
.hud-brand .wordmark { font-size: 20px; line-height: 1.1; margin: 0; }
.town-clock { margin-left: 0; font-size: 10px; }
.world-nav { margin-top: 0; flex-basis: 100%; gap: 4px; }
.world-nav a { font-size: 10px; padding: 3px 9px; }
@media (max-width: 859px) {
  .hud-brand { padding: 5px 8px 6px; max-width: none; }
  .hud-brand > div { gap: 2px 8px; }
  .hud-brand .wordmark { font-size: 17px; }
  .town-clock { font-size: 9px; }
  .world-nav { max-width: none; }
  .hud-stats { top: 66px; }
}
@media (min-width: 860px) {
  /* desktop: the stat cards start ~560px in, so the strip stops before them; the "◀ museverse" pill is
     the home link, so the wordmark row goes and the clock rides at the end of the pills */
  .hud-brand { max-width: 520px; padding: 5px 8px 6px; }
  .hud-brand .wordmark { display: none; }
  .hud-brand > div { align-items: center; }
  .world-nav { flex-basis: auto; }
  .world-nav a { font-size: 9.5px; padding: 3px 8px; }
  .town-clock { order: 2; font-size: 9.5px; }
}
