/* Hearthstone Stormwind board + in-hand / in-play cards */
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@700;900&family=Source+Sans+3:wght@600;700&display=swap");

.hs-game {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  background: #1a120c;
  color: #fff;
  font-size: 1.6vh;
  user-select: none;
  font-family: Cinzel, Palatino, serif;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
body.in-game .hs-game { padding-right: 276px; }
.board-stage {
  position: relative;
  width: min(100%, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  z-index: 1;
}
body.in-game .board-stage {
  width: min(100%, calc(100vh * 16 / 9));
  height: min(100vh, calc((100vw - 276px) * 9 / 16));
}
.board-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 0;
}
.board-overlay { position: absolute; inset: 0; z-index: 1; }
.hs-game .bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  padding: 4px 12px;
  font-size: 14px;
  background: linear-gradient(rgba(0,0,0,.45), transparent);
  pointer-events: none;
}
.hs-game .bar b, .hs-game .bar span, .hs-game .bar button { pointer-events: auto; }
.hs-game .bar .turn-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}
.turn-clock {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  font-family: Cinzel, Palatino, serif;
  font-weight: 700;
  font-size: clamp(14px, 1.35vw, 22px);
  color: #fde68a;
  letter-spacing: .06em;
  min-width: 3.2em;
  text-align: left;
  text-shadow: 0 1px 3px #000, 0 0 8px rgba(0,0,0,.7);
  pointer-events: none;
  white-space: nowrap;
  z-index: 91;
}
.turn-clock.mine { color: #86efac; }
.turn-clock.low { color: #fb7185; }
#btn-concede {
  background: #3a1610;
  color: #fde68a;
  border: 1px solid #8a5a22;
  border-radius: 8px;
  padding: 4px 10px;
  font-family: Cinzel, Palatino, serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .04em;
  cursor: pointer;
}
#btn-concede:hover { border-color: #d4a017; background: #5a1c14; }
#btn-concede.hidden { display: none !important; }

.zone-hand {
  position: absolute;
  left: 22%;
  right: 22%;
  display: flex;
  justify-content: center;
  z-index: 8;
}
.zone-hand.top {
  top: 0.5%;
  height: 11%;
  align-items: flex-start;
  z-index: 6;
}
.zone-hand.bottom {
  bottom: 0.4%;
  height: 16.5%;
  align-items: flex-end;
  z-index: 10;
}
.zone-hand .hs-card, .zone-hand .hs-cardback {
  height: 92%;
  flex: 0 1 auto;
  min-width: 0;
  margin: 0 -8px;
}
.zone-hand.bottom .hs-card:hover { z-index: 80; transform: translateY(-12%); }

.hero-slot {
  position: absolute;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  left: 44.8%;
  width: 10.4%;
  height: 18.5%;
}
.hero-slot.top { top: 7.15%; }
.hero-slot.bottom { top: 71.15%; z-index: 7; }
.hero-slot .hero-wrap {
  width: 100%;
  height: 100%;
}
.hp-slot {
  position: absolute;
  z-index: 7;
  left: 56.2%;
  width: 5.9%;
  height: 10.5%;
}
.hp-slot.top { top: 11.15%; }
.hp-slot.bottom { top: 75.15%; }
.wep-slot {
  position: absolute;
  z-index: 7;
  left: 38.0%;
  width: 5.75%;
  height: 10.2%;
}
.wep-slot.top { top: 11.3%; }
.wep-slot.bottom { top: 75.3%; }
.hp-slot .hero-power, .wep-slot .weapon-wrap {
  width: 100%;
  height: 100%;
}

.zone-field {
  position: absolute;
  left: 21%;
  right: 23%;
  height: 14.5%;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
}
.zone-field.top { top: 27%; }
.zone-field.bottom { top: 44.5%; }

.mana-readout {
  position: absolute;
  left: 19.6%;
  top: 71.8%;
  width: 6.4%;
  height: 8.6%;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.35em;
  color: #2a1a08;
  text-shadow: 0 1px 0 rgba(255,230,150,.6), 0 0 4px #000;
  pointer-events: none;
  letter-spacing: .02em;
}
.deck-count {
  position: absolute;
  z-index: 8;
  left: 81.7%;
  width: 3.5%;
  text-align: center;
  font-weight: 900;
  font-size: 1.45em;
  color: #f3e6c8;
  text-shadow: 0 2px 4px #000, 0 0 8px #000;
  pointer-events: none;
  line-height: 1;
}
.deck-count.opp { top: 23.2%; }
.deck-count.me { top: 69.8%; }

.hs-game.mulliganing .zone-hand {
  visibility: hidden;
  pointer-events: none;
}

.hs-card.playable, .minion.can-attack, .hero-wrap.can-attack, .hero-power.playable {
  cursor: grab;
  touch-action: none;
}
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; }
body.dragging .zone-hand.bottom .hs-card:hover { transform: none; }
body.aiming { cursor: none; user-select: none; }
body.aiming * { user-select: none; }
body.aiming .minion.target, body.aiming .hero-wrap.target, body.aiming .hero-power.target { cursor: pointer; }
.minion.aiming-source, .hero-wrap.aiming-source, .hero-power.aiming-source {
  z-index: 80;
  transform: scale(1.06);
}
body.aiming .minion.target.aimed, body.aiming .hero-wrap.target.aimed, body.aiming .hero-power.target.aimed {
  filter: drop-shadow(0 0 14px rgb(255,180,40));
  transform: scale(1.1);
}

.hs-field {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  position: relative;
}
.hs-field > * { height: 92%; flex: 0 0 auto; }
.hs-field.drop-ready {
  outline: 2px dashed rgba(253, 230, 138, .55);
  outline-offset: -6px;
  background: rgba(253, 230, 138, .08);
  border-radius: 12px;
}

.endTurnButton {
  position: absolute;
  left: 76.0%;
  top: 42.15%;
  width: 7.85%;
  height: 7.35%;
  z-index: 90;
}
.endTurnButton button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  background: #24160f;
  color: #d9c48a;
  border: 0;
  border-radius: 999px;
  font-family: Cinzel, Palatino, serif;
  font-weight: 700;
  font-size: clamp(9px, 0.68vw, 13px);
  line-height: 1.05;
  letter-spacing: .04em;
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(255,255,255,.08), inset 0 -4px 8px rgba(0,0,0,.55);
}
.endTurnButton button:disabled { opacity: .55; cursor: default; color: #8a7a55; box-shadow: none; }
.endTurnButton.playable button {
  background: #c9a227;
  color: #2a1c08;
  box-shadow: 0 0 14px 2px rgb(255, 210, 60), inset 0 1px 0 rgba(255,255,255,.35);
}

#aim-arrow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 130;
  overflow: visible;
}
#aim-arrow.hidden { display: none; }

.layout-bar {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 250;
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(20,14,10,.88);
  border: 1px solid #d4a017;
  border-radius: 8px;
  padding: 8px 10px;
  color: #f3e6c8;
  font-size: 13px;
  max-width: 92%;
}
.layout-bar.hidden { display: none; }
.layout-editing [data-layout] {
  outline: 1px dashed rgba(251, 191, 36, .9);
  outline-offset: 1px;
  cursor: move;
  pointer-events: auto !important;
  z-index: 180;
}
.layout-editing .zone-hand, .layout-editing .zone-field { pointer-events: auto !important; }
.layout-handle {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 12px;
  height: 12px;
  background: #fbbf24;
  border: 1px solid #111;
  cursor: nwse-resize;
  z-index: 220;
  pointer-events: auto;
}
.layout-editing #btn-end { pointer-events: none; }

/* ---- in-hand Hearthstone card ---- */
.hs-card {
  position: relative;
  display: inline-block;
  height: 100%;
  aspect-ratio: 290 / 410;
  z-index: 50;
  cursor: default;
}
.hs-card .visuals {
  position: relative;
  width: 100%;
  height: 100%;
}
.hs-card .visuals img {
  position: absolute;
  pointer-events: none;
}
.hs-card .inhand-minion {
  width: 78%;
  height: auto;
  aspect-ratio: 1;
  top: 6%;
  left: 11%;
  object-fit: cover;
  object-position: center;
  clip-path: ellipse(36% 47% at 50% 50%);
}
.hs-card .inhand-spell {
  width: 70%;
  height: auto;
  aspect-ratio: 1;
  top: 11%;
  left: 14%;
  object-fit: cover;
  object-position: center;
  clip-path: inset(8% 0 4% 0);
}
.hs-card .inhand-weapon {
  width: 67%;
  height: auto;
  aspect-ratio: 1;
  top: 11%;
  left: 17%;
  object-fit: cover;
  object-position: center;
  clip-path: circle(50% at 50% 50%);
}
.hs-card .inhand-base, .hs-card .inhand-legendary {
  height: 100%;
  left: 0;
  top: 0;
  width: 100%;
  object-fit: contain;
}
.hs-card h1 {
  color: #fff;
  position: absolute;
  top: 54.25%;
  font-size: 0.52em;
  text-align: center;
  margin: 0 8%;
  width: 84%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  font-weight: 700;
  pointer-events: none;
}
.hs-card .description {
  position: absolute;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.48em;
  margin: 0;
  text-align: center;
  line-height: 1.05em;
  height: 24%;
  overflow: hidden;
  width: 66%;
  top: 64.5%;
  left: 18%;
  color: #111;
  pointer-events: none;
}
.hs-card .description p {
  width: 100%;
  position: absolute;
  margin: 0;
  top: 50%;
  transform: translate(0, -50%);
}
.hs-card.card-weapon .description { color: #fff; }
.hs-num {
  position: absolute;
  display: block;
  width: 22%;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  text-align: center;
  color: #fff;
  font-size: 1.35em;
  line-height: .95em;
  font-weight: 900;
  text-shadow:
    -2px -2px 0 #000, 2px -2px 0 #000,
    -2px 2px 0 #000, 2px 2px 0 #000,
    0 2px 0 #000, 0 -2px 0 #000,
    2px 0 0 #000, -2px 0 0 #000;
  pointer-events: none;
  z-index: 6;
}
.hs-card .hs-num.cost { top: 11.4%; left: 2%; }
.hs-card.card-spell .hs-num.cost { left: 3.5%; }
.hs-card .hs-num.atk { left: 5%; top: 86.8%; }
.hs-card .hs-num.health, .hs-card .hs-num.durability { left: 76%; top: 86.8%; }
.hs-num.positive { color: #29dd4f; }
.hs-num.negative { color: #dd0000; }
.hs-card.playable { filter: drop-shadow(0 0 8px rgb(0,255,0)); cursor: pointer; }
.hs-card.target, .minion.target, .hero-wrap.target, .hero-power.target { filter: drop-shadow(0 0 8px rgb(255,120,0)); transform: scale(1.05); }

.hs-cardback {
  height: 100%;
  aspect-ratio: 290 / 410;
  position: relative;
}
.hs-cardback img { height: 100%; width: 100%; object-fit: contain; display: block; }

/* collection uses same cards at a fixed size */
.drow img.thumb { width: 44px; }

/* ---- in-play minion ---- */
.minion {
  position: relative;
  display: inline-block;
  height: 100%;
  width: auto;
  aspect-ratio: 300 / 350;
  flex: 0 0 auto;
  z-index: 60;
  cursor: pointer;
}
.minion .visuals { position: relative; width: 100%; height: 100%; overflow: hidden; }
.minion .visuals img { position: absolute; pointer-events: none; }
.minion .inplay-portrait {
  left: 17%;
  top: 13%;
  width: 66%;
  height: 58%;
  object-fit: cover;
  object-position: center 18%;
  clip-path: ellipse(49% 49% at 50% 50%);
}
.minion .inplay-base, .minion .inplay-taunt, .minion .inplay-legendary,
.minion .inplay-divine-shield, .minion .inplay-frozen, .minion .inplay-stealth,
.minion .inplay-silenced, .minion .effect-sleep, .minion .icon-deathrattle,
.minion .icon-poisonous, .minion .icon-trigger {
  height: 100%;
  left: 0;
  top: 0;
  width: 100%;
  object-fit: contain;
}
.minion .inplay-divine-shield { z-index: 65; }
.minion .hs-num.atk { left: 16%; top: 62%; font-size: 1.05em; width: 28%; }
.minion .hs-num.health { left: 56%; top: 62%; font-size: 1.05em; width: 28%; }
.minion.playable { filter: drop-shadow(0 -3px 7px rgb(0,255,0)); }
.minion.can-attack { filter: drop-shadow(0 -3px 7px rgb(0,255,0)); }
.minion.charge .hs-num.atk { color: #fde68a; }

/* hero */
.hero-wrap .visuals { position: relative; width: 100%; height: 100%; overflow: hidden; }
.hero-wrap .visuals img { position: absolute; pointer-events: none; }
.hero-wrap .hero-portrait {
  left: 7%;
  top: 9%;
  width: 80%;
  height: 82%;
  object-fit: cover;
  object-position: center 18%;
  clip-path: polygon(0% 100%, 0 40%, 20% 10%, 30% 3%, 50% 0%, 70% 3%, 80% 10%, 96% 40%, 96% 100%);
}
.hero-wrap .hero-frame, .hero-wrap .hero-attack, .hero-wrap .hero-armor {
  height: 100%;
  left: 0;
  top: 0;
  width: 100%;
  object-fit: contain;
  z-index: 2;
}
.hero-wrap { overflow: visible; }
.hero-wrap .secret {
  position: absolute;
  left: calc(36% + var(--sec-shift, 0%));
  top: -6%;
  width: 28%;
  height: 28%;
  object-fit: cover;
  object-position: center 6%;
  z-index: 12;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px #000);
}
.hero-wrap .secret-count {
  position: absolute;
  left: 36%;
  top: -6%;
  width: 28%;
  height: 28%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  line-height: 1;
  z-index: 14;
  pointer-events: none;
  text-shadow:
    -2px -2px 0 #000, 2px -2px 0 #000,
    -2px 2px 0 #000, 2px 2px 0 #000;
}
.hero-wrap .hs-num.atk { left: 4%; top: 80%; font-size: 1.15em; width: 28%; }
.hero-wrap .hs-num.health { left: 70%; top: 80%; font-size: 1.15em; width: 28%; }
.hero-wrap .hs-num.armor { left: 70%; top: 54%; font-size: 1.05em; width: 28%; }
.hero-wrap { position: relative; cursor: pointer; width: 100%; height: 100%; }

.hero-power { position: relative; width: 100%; height: 100%; }
.hero-power .visuals { position: relative; width: 100%; height: 100%; }
.hero-power .visuals img { position: absolute; pointer-events: none; }
.hero-power .hero-power-portrait {
  height: 55%;
  width: auto;
  aspect-ratio: 1;
  top: 27%;
  left: 23%;
  object-fit: cover;
  object-position: center;
  clip-path: circle(60% at 50% 50%);
}
.hero-power .hero-power-frame { height: 100%; left: 0; top: 0; width: 100%; object-fit: contain; }
.hero-power .hs-num.cost { top: 4%; left: 38%; font-size: 1em; width: 24%; }
.hero-power.playable { filter: drop-shadow(0 -3px 7px rgb(0,255,0)); cursor: pointer; }

.weapon-wrap { position: relative; width: 100%; height: 100%; }
.weapon-wrap .visuals { position: relative; width: 100%; height: 100%; }
.weapon-wrap .visuals img { position: absolute; pointer-events: none; }
.weapon-wrap .hero-weapon-portrait {
  height: 73%;
  width: auto;
  aspect-ratio: 1;
  top: 13%;
  left: 14%;
  object-fit: cover;
  object-position: center;
  clip-path: circle(50% at 50% 50%);
}
.weapon-wrap .hero-weapon-frame { height: 100%; left: 0; top: 0; }
.weapon-wrap .hs-num.atk { top: 61%; left: 8%; font-size: .95em; z-index: 8; }
.weapon-wrap .hs-num.durability { top: 61%; left: 66%; font-size: .95em; z-index: 8; }

.choice-hand { display: flex; justify-content: center; gap: 16px; min-height: 280px; flex-wrap: wrap; }
.choice-hand .hs-card { height: 260px; cursor: pointer; }
#choice { z-index: 400; }
#choice .modal { max-width: min(1100px, 96vw); z-index: 401; position: relative; }
#choice #choice-ok { position: relative; z-index: 402; min-width: 220px; }
.mulligan-card { position: relative; cursor: pointer; }
.mulligan-card.picked .hs-card {
  filter: brightness(0.42) saturate(0.75);
  transform: translateY(-16px);
  outline: 4px solid #fbbf24;
  outline-offset: 2px;
  border-radius: 10px;
}
.mulligan-card.picked::after {
  content: "REPLACE";
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  background: #b91c1c;
  color: #fff;
  font-family: Cinzel, Palatino, serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .06em;
  padding: 8px 14px;
  border-radius: 8px;
  border: 2px solid #fbbf24;
  z-index: 8;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
}

#game-err { position: absolute; bottom: 4px; left: 12px; color: #fca5a5; z-index: 50; }

.drop-placeholder {
  width: 72px;
  min-width: 56px;
  height: 90%;
  border: 2px dashed #fde68a;
  border-radius: 14px;
  background: rgba(253, 230, 138, 0.18);
  box-shadow: 0 0 12px rgba(253, 230, 138, 0.35);
  pointer-events: none;
  flex-shrink: 0;
}
.drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 500;
  margin: 0 !important;
  filter: drop-shadow(0 16px 22px rgba(0,0,0,.65));
  transform: rotate(-7deg) scale(1.06);
}
.source-dragging { opacity: .28 !important; }
.minion.hit-flash {
  filter: brightness(1.85) drop-shadow(0 0 14px #ff3b3b) !important;
}
.float-dmg {
  position: fixed;
  z-index: 450;
  pointer-events: none;
  width: 72px;
  height: 72px;
  margin-left: -36px;
  margin-top: -36px;
  background: url("/joust/images/damage.png") center / contain no-repeat;
  color: #fff;
  font-family: Cinzel, Palatino, serif;
  font-weight: 900;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
  animation: dmg-pop 0.7s ease-out forwards;
}
@keyframes dmg-pop {
  0% { transform: scale(0.4) rotate(-12deg); opacity: 0; }
  25% { transform: scale(1.25) rotate(-8deg); opacity: 1; }
  100% { transform: scale(1) translateY(-18px) rotate(-8deg); opacity: 0; }
}
@keyframes minion-drop {
  0% { transform: scale(0.45) translateY(-28px); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.minion.just-played { animation: minion-drop 0.34s cubic-bezier(.2,1.3,.3,1); }
.hs-card.just-drawn { animation: minion-drop 0.28s ease-out; }

.burn-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 160;
  overflow: visible;
}
.burn-card {
  position: absolute;
  width: min(22%, 210px);
  left: var(--bx, 50%);
  top: var(--by, 50%);
  transform: translate(-50%, -50%) scale(0.28) rotate(var(--rot, 8deg));
  transform-origin: center center;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.7));
  transition: left 0.48s cubic-bezier(.2,.8,.2,1), top 0.48s cubic-bezier(.2,.8,.2,1), transform 0.48s cubic-bezier(.2,.8,.2,1), filter 0.35s;
  z-index: 161;
}
.burn-card canvas {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 290 / 410;
}
.burn-card.reveal {
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}
.burn-card.ignite {
  animation: burn-away 0.9s ease-in forwards;
}
.burn-tag, .burn-name {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  text-shadow: 0 0 8px #c41e3a, 0 2px 4px #000;
  opacity: 0;
}
.burn-tag {
  top: 102%;
  font-family: Cinzel, Palatino, serif;
  font-weight: 800;
  letter-spacing: .14em;
  color: #ffb347;
  font-size: clamp(12px, 1.15vw, 18px);
}
.burn-name {
  top: calc(102% + 1.35em);
  font-family: Cinzel, Palatino, serif;
  font-weight: 700;
  color: #fff6d8;
  font-size: clamp(11px, 1vw, 16px);
  white-space: nowrap;
  max-width: 160%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.burn-card.reveal .burn-tag,
.burn-card.reveal .burn-name { opacity: 1; transition: opacity .25s .3s; }
@keyframes burn-away {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1; filter: drop-shadow(0 0 16px #ff6a00); }
  35% { transform: translate(-50%, -54%) scale(1.06) rotate(-6deg); filter: brightness(1.45) sepia(.35) drop-shadow(0 0 22px #ff9a2a); }
  100% { transform: translate(-50%, -38%) scale(0.28) rotate(16deg); opacity: 0; filter: brightness(2.4) sepia(1) hue-rotate(-25deg); }
}

.match-chat {
  display: flex;
  flex-direction: column;
  width: 260px;
  background: linear-gradient(180deg, rgba(28,18,10,.94), rgba(16,10,6,.96));
  border: 1px solid #d4a017;
  border-radius: 10px;
  color: #f3e6c8;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  z-index: 80;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
#game > .match-chat {
  position: absolute;
  right: 8px;
  top: 36px;
  bottom: 12px;
  width: 260px;
}
body > .match-chat {
  position: fixed;
  right: 12px;
  top: 72px;
  bottom: 16px;
}
body.in-room:not(.in-game) #lobby.wrap { padding-right: 280px; }
.chat-head {
  flex: 0 0 auto;
  padding: 8px 12px;
  font-family: Cinzel, Palatino, serif;
  font-weight: 700;
  letter-spacing: .08em;
  font-size: 13px;
  color: #fde68a;
  border-bottom: 1px solid #5a4630;
  background: rgba(0,0,0,.25);
}
.chat-head.chat-tabs {
  display: flex;
  padding: 0;
  gap: 0;
}
button.chat-tab {
  flex: 1 1 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #c4b59a;
  font-family: Cinzel, Palatino, serif;
  font-weight: 700;
  letter-spacing: .06em;
  font-size: 13px;
  padding: 8px 6px;
  cursor: pointer;
}
button.chat-tab:hover { color: #fde68a; }
button.chat-tab.on {
  color: #fde68a;
  border-bottom-color: #d4a017;
  background: rgba(0,0,0,.28);
}
.chat-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 10px 10px;
  font-size: 13px;
  line-height: 1.35;
  user-select: text;
}
.chat-empty { color: #8a7a55; font-style: italic; }
.chat-line { margin: 0 0 7px; word-wrap: break-word; }
.chat-line b { color: #fde68a; font-weight: 700; }
.chat-msg.mine b { color: #86efac; }
.chat-sys { color: #c4b59a; }
.chat-burn { color: #fb923c; }
.chat-burn b { color: #fdba74; }
.chat-card {
  color: #fde68a;
  font-weight: 700;
  cursor: context-menu;
  border-bottom: 1px dotted rgba(253, 230, 138, .45);
}
.chat-card:hover { color: #fff8d0; }
#chat-form {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid #5a4630;
  background: rgba(0,0,0,.2);
}
#chat-input {
  flex: 1 1 auto;
  min-width: 0;
  background: #2a2118;
  color: #f3e6c8;
  border: 1px solid #5a4630;
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
}
#chat-form button {
  flex: 0 0 auto;
  padding: 6px 10px;
  font-size: 12px;
}
