:root {
  --forest-1: #2a3326;
  --forest-2: #161b13;
  --stone: #2b2b29;
  --stone-rim: #7c6a3c;
  --plate-bg: #15140f;
  --plate-border: #6f5f33;
  --table-1: #6b5a30;
  --table-2: #3d3318;
  --gold: #e8b84b;
  --good: #3fa34d;
  --evil: #b53b3b;
  --offline: #e8736b;
  --ink: #ece4cf;
  --ink-dim: #b8ad90;
}

* { box-sizing: border-box; }

/* The HTML `hidden` attribute must always win, even over class display rules
   (e.g. .modal-backdrop{display:grid}); otherwise toggling hidden does nothing. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(10,12,8,0.5), rgba(10,12,8,0.72)),
    url('/img/sfondo.png') center / cover no-repeat;
  background-attachment: fixed;
  background-color: var(--forest-2);
}

h1, h2, .title, .panel-title, .modal-title, .eyebrow {
  font-family: 'Cinzel', 'Times New Roman', serif;
  letter-spacing: 0.04em;
}

/* ---------- buttons ---------- */
.btn {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--stone-rim);
  border-radius: 8px;
  padding: 0.7em 1.4em;
  cursor: pointer;
  color: var(--ink);
  background: linear-gradient(180deg, #3a3a32, #23231e);
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:hover:not(:disabled) { filter: brightness(1.15); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(180deg, #c79a39, #9c7521);
  border-color: #e8c870;
  color: #1a1408;
  font-weight: 700;
}
.btn-ghost { background: transparent; }
.btn-seat-sit { background: linear-gradient(180deg, #4f7a45, #355a2d); border-color: #6fae5e; }
.btn-seat-stand { background: linear-gradient(180deg, #9c5050, #6f3434); border-color: #c97a7a; }

/* ---------- landing ---------- */
.landing { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; }
.landing-card {
  width: min(440px, 100%);
  text-align: center;
  background: rgba(12, 14, 9, 0.55);
  border: 1px solid rgba(124,106,60,0.4);
  border-radius: 16px;
  padding: 2.4rem 2rem;
  backdrop-filter: blur(3px);
}
.eyebrow { color: var(--gold); text-transform: uppercase; font-size: 0.8rem; margin: 0 0 0.2rem; }
.title { font-size: 3.6rem; margin: 0; line-height: 1; }
.subtitle { color: var(--ink-dim); margin: 0.8rem 0 2rem; font-size: 1.05rem; }
.landing-actions { display: grid; gap: 1rem; }
.btn-primary.btn { width: 100%; }
.divider { display: flex; align-items: center; gap: 0.8rem; color: var(--ink-dim); font-size: 0.85rem; }
.divider::before, .divider::after { content: ''; height: 1px; flex: 1; background: rgba(124,106,60,0.4); }
.join-row { display: flex; gap: 0.6rem; }
.pin-field, .name-field {
  flex: 1;
  background: var(--plate-bg);
  border: 1px solid var(--plate-border);
  border-radius: 8px;
  color: var(--ink);
  padding: 0.7em 0.9em;
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  letter-spacing: 0.15em;
}
.pin-field:focus, .name-field:focus { outline: 2px solid var(--gold); }
.error-text { color: var(--offline); font-size: 0.9rem; margin: 0.2rem 0 0; }

/* ---------- room: topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: center; gap: 0.8rem;
  padding: 0.9rem 1rem; flex-wrap: wrap;
}
.link-btn {
  background: none; border: none; color: var(--ink);
  font-family: 'Cinzel', serif; letter-spacing: 0.05em; font-size: 0.9rem;
  text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
.link-btn:hover { color: var(--gold); }
.topbar-sep { color: var(--ink-dim); }
#pin-label { color: var(--gold); }

/* ---------- room: stage & table ---------- */
.stage {
  position: relative;
  width: min(92vw, 78vh);
  aspect-ratio: 1 / 1;
  margin: 0.5rem auto 2rem;
}
.table {
  position: absolute; inset: 13%;
  background: url('/img/tavolo2.png') center / contain no-repeat;
  filter: drop-shadow(0 10px 26px rgba(0,0,0,0.6));
}
.seats { position: absolute; inset: 0; }

.seat {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  width: 9.5rem;
}
.token {
  width: 7rem; height: 7rem; border-radius: 50%; overflow: hidden;
  background: #1a1a17 center / cover no-repeat;
  border: 3px solid var(--stone-rim);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.4);
}
.seat-me .token { border-color: var(--gold); box-shadow: 0 0 14px rgba(232,184,75,0.4), inset 0 2px 6px rgba(0,0,0,0.6); }
.token-offline { opacity: 0.5; }
.chain { position: absolute; top: 0; right: 1rem; color: var(--offline); font-size: 1.5rem; text-shadow: 0 1px 2px #000; }
.plate {
  background: var(--plate-bg); border: 1px solid var(--plate-border);
  border-radius: 6px; padding: 0.25rem 0.7rem; font-size: 0.95rem;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: center;
}
.kick-btn {
  margin-top: 0.1rem; font-family: 'Cinzel', serif; font-size: 0.75rem;
  background: linear-gradient(180deg, #b35454, #8a3a3a); color: #fff;
  border: none; border-radius: 5px; padding: 0.2rem 0.8rem; cursor: pointer;
}
.kick-btn:hover { filter: brightness(1.1); }

.center-controls {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; gap: 0.6rem;
}

/* ---------- host panel ---------- */
.host-panel {
  position: fixed; left: 1rem; bottom: 1rem;
  width: min(260px, 80vw);
  background: rgba(12,14,9,0.8);
  border: 1px solid rgba(124,106,60,0.45);
  border-radius: 12px; padding: 1rem 1.1rem;
  display: grid; gap: 0.55rem;
}
.panel-title { font-size: 1rem; margin: 0 0 0.2rem; color: var(--gold); }
.check { display: flex; align-items: center; gap: 0.55rem; font-size: 1rem; cursor: pointer; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--gold); }
.hint { color: var(--ink-dim); font-size: 0.82rem; margin: 0.1rem 0 0; }
#start-btn { margin-top: 0.3rem; }

/* ---------- modal & toast ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: grid; place-items: center; z-index: 50; padding: 1rem;
}
.modal {
  width: min(360px, 100%); text-align: center;
  background: linear-gradient(160deg, #23271d, #14160f);
  border: 1px solid rgba(124,106,60,0.5); border-radius: 14px; padding: 1.8rem;
  display: grid; gap: 1rem;
}
.modal-title { margin: 0; font-size: 1.4rem; }
.toast {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  background: rgba(12,14,9,0.95); border: 1px solid var(--stone-rim);
  color: var(--ink); padding: 0.7rem 1.2rem; border-radius: 10px;
  font-size: 0.95rem; z-index: 60; max-width: 90vw; text-align: center;
}

@media (max-width: 560px) {
  .stage { width: 94vw; }
  .seat { width: 7rem; }
  .token { width: 5rem; height: 5rem; }
  .plate { font-size: 0.82rem; padding: 0.2rem 0.5rem; }
  .crown { width: 2rem; height: 1.7rem; top: -1rem; left: 50%; transform: translateX(-50%); }
  .host-panel { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* ---------- game board ---------- */
.board {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; gap: 0.8rem; justify-items: center; width: 70%;
}
.mission-row { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.mission {
  position: relative;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Cinzel', serif; font-size: 1.1rem; color: var(--ink);
  background: rgba(0,0,0,0.3); border: 2px solid var(--stone-rim);
}
.mission-success, .mission-fail {
  color: transparent; border-color: transparent; background: transparent;
  background-repeat: no-repeat; background-position: center; background-size: 118% 118%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.mission-success { background-image: url('/img/missione-ok.png'); }
.mission-fail { background-image: url('/img/missione-ko.png'); }
.two-fail {
  position: absolute; top: -6px; right: -6px;
  background: var(--evil); color: #fff; font-size: 0.65rem;
  width: 1.1rem; height: 1.1rem; border-radius: 50%; display: grid; place-items: center;
}
.fail-badge {
  position: absolute; top: -8px; right: -8px;
  background: #d23b3b; color: #fff; font-family: 'Cinzel', serif; font-weight: 700;
  font-size: 0.8rem; min-width: 1.35rem; height: 1.35rem; padding: 0 0.2rem;
  border-radius: 50%; display: grid; place-items: center;
  border: 2px solid #ffd9d9; box-shadow: 0 0 10px rgba(210,59,59,0.8);
  animation: failpop 0.3s ease;
}
@keyframes failpop { from { transform: scale(0.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.track-row { display: flex; align-items: center; gap: 0.5rem; }
.bag { font-size: 1.5rem; }
.track-dots { display: flex; gap: 0.35rem; }
.dot {
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.75rem; color: var(--ink-dim);
  border: 1px solid var(--stone-rim); background: rgba(0,0,0,0.25);
}
.dot-on { color: var(--ink); border-color: var(--gold); box-shadow: 0 0 6px rgba(232,184,75,0.5); }
.dot-forced { border-color: var(--evil); color: #e0a0a0; }
.board-status { display: flex; gap: 1rem; align-items: center; font-size: 0.95rem; }
.score .good { color: var(--good); font-weight: 700; }
.score .evil { color: var(--evil); font-weight: 700; }

/* ---------- crown & seat highlights ---------- */
.crown {
  position: absolute; top: -1.3rem; left: 50%; transform: translateX(-50%);
  width: 2.6rem; height: 2.2rem; z-index: 7;
  background: url('/img/corona.png') center / contain no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.6));
}
.token.mark-evil { border-color: var(--evil); box-shadow: 0 0 12px rgba(181,59,59,0.6); }
.token.mark-good { border-color: var(--good); box-shadow: 0 0 12px rgba(63,163,77,0.5); }
.token.mark-mm { border-color: var(--gold); box-shadow: 0 0 12px rgba(232,184,75,0.6); }

/* ---------- role card ---------- */
.role-card {
  position: fixed; bottom: 1rem; right: 1rem;
  display: flex; align-items: center; gap: 0.8rem;
  background: rgba(12,14,9,0.92); border: 1px solid var(--stone-rim);
  border-radius: 12px; padding: 0.7rem 1rem; max-width: min(340px, 60vw); z-index: 40;
}
.role-emblem {
  width: 2.8rem; height: 2.8rem; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: #1a1a17 center / cover no-repeat;
  border: 2px solid var(--stone-rim);
}
.emblem-good { border-color: var(--good); }
.emblem-evil { border-color: var(--evil); }
.role-text { display: grid; gap: 0.1rem; min-width: 0; }
.role-name { font-family: 'Cinzel', serif; font-size: 1rem; }
.role-power { color: var(--ink-dim); font-size: 0.85rem; }
.role-toggle { padding: 0.4em 0.9em; font-size: 0.8rem; flex-shrink: 0; }
.role-hidden .role-power { display: none; }

@media (max-width: 560px) {
  .mission { width: 2rem; height: 2rem; font-size: 0.9rem; }
  .dot { width: 1.2rem; height: 1.2rem; font-size: 0.65rem; }
  .role-power { font-size: 0.78rem; }
}

/* ---------- restart link ---------- */
.restart-link { color: var(--gold); }
.restart-link:hover { color: #fff; }

/* ---------- roles-in-game side tab ---------- */
.roles-tab {
  position: fixed; top: 50%; left: 0; transform: translateY(-50%);
  z-index: 30; display: flex; align-items: center;
}
.roles-handle {
  writing-mode: vertical-rl;
  font-family: 'Cinzel', serif; letter-spacing: 0.12em; font-size: 0.85rem;
  background: linear-gradient(180deg, #c79a39, #9c7521); color: #1a1408;
  border: none; border-radius: 0 10px 10px 0; padding: 1rem 0.45rem; cursor: pointer;
}
.roles-handle:hover { filter: brightness(1.1); }
.roles-panel {
  max-width: 0; padding: 0; overflow: hidden;
  background: rgba(12,14,9,0.96); border: none;
  border-radius: 0 10px 10px 0;
  transition: max-width 0.25s ease, padding 0.25s ease;
}
.roles-tab.open .roles-panel {
  max-width: 260px; padding: 0.9rem 1rem;
  border: 1px solid var(--stone-rim); border-left: none;
}
.roles-list { display: grid; gap: 0.25rem; width: 210px; }
.role-row { display: flex; align-items: center; gap: 0.6rem; }
.role-face {
  width: 2.2rem; height: 2.2rem; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: #1a1a17 center / cover no-repeat; border: 1px solid var(--stone-rim);
}
.role-row-name { font-size: 0.92rem; white-space: nowrap; }

@media (max-width: 560px) {
  .roles-tab.open .roles-panel { max-width: 200px; }
  .roles-list { width: 160px; }
}

/* ---------- phase action bar ---------- */
.action-bar {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 0.6rem; align-items: center;
  background: rgba(12,14,9,0.94); border: 1px solid var(--stone-rim);
  border-radius: 12px; padding: 0.8rem 1.1rem; max-width: 92vw; text-align: center; z-index: 45;
}
.action-msg { font-size: 1.02rem; }
.action-buttons { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.btn-approve { background: linear-gradient(180deg, #4f7a45, #355a2d); border-color: #6fae5e; }
.btn-reject  { background: linear-gradient(180deg, #9c5050, #6f3434); border-color: #c97a7a; }

/* dim players we are still waiting on (to vote / react) */
.token.token-pending { opacity: 0.32; filter: grayscale(0.4); }

/* private persistent spy rings (Veggente / Strega / Duchessa) */
.token.spy-green  { border-color: #5fcf6e !important; box-shadow: 0 0 0 4px rgba(63,163,77,0.85), 0 0 14px rgba(63,163,77,0.7) !important; }
.token.spy-red    { border-color: #ff5b5b !important; box-shadow: 0 0 0 4px rgba(210,59,59,0.85), 0 0 14px rgba(210,59,59,0.7) !important; }
.token.spy-yellow { border-color: #f0c34a !important; box-shadow: 0 0 0 4px rgba(232,184,75,0.9), 0 0 14px rgba(232,184,75,0.75) !important; }

/* ---------- clickable tokens (selection / targeting) ---------- */
.token.clickable { cursor: pointer; }
.token.clickable:hover { border-color: var(--gold); box-shadow: 0 0 16px rgba(232,184,75,0.7); }

/* ---------- seat icons ---------- */
.icon-sword, .icon-shield, .icon-vote, .icon-crosshair, .icon-shot {
  position: absolute; pointer-events: none; background-position: center;
  background-repeat: no-repeat; background-size: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}
.icon-sword  { top: 1.2rem; left: -0.7rem;  width: 2.6rem; height: 2.6rem; background-image: url('/img/spada.png'); transform: rotate(-8deg); }
.icon-shield { top: 1.2rem; right: -0.7rem; width: 2.1rem; height: 2.6rem; background-image: url('/img/scudo.png'); }
.icon-vote   { top: 1.2rem; left: 50%; transform: translateX(-50%); width: 2.8rem; height: 2.8rem; }
.vote-badge {
  position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 1.2rem;
  background: rgba(8,10,6,0.92); z-index: 6;
}
.vote-badge.vote-approve { color: #6fdc7a; border: 3px solid #3fa34d; box-shadow: 0 0 10px rgba(63,163,77,0.8); }
.vote-badge.vote-reject  { color: #ff7d7d; border: 3px solid #d23b3b; box-shadow: 0 0 10px rgba(210,59,59,0.85); }
.icon-crosshair { top: 0; left: 50%; transform: translateX(-50%); width: 7rem; height: 7rem; background-image: url('/img/spara.png'); }
.icon-shot   { top: -0.3rem; left: 50%; transform: translateX(-50%); width: 7.6rem; height: 7.6rem; background-image: url('/img/sparato.png'); }

/* ---------- endgame banner (centered over the board, never over rim tokens) ---------- */
.endgame {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(8,10,6,0.92); border: 1px solid var(--gold); border-radius: 14px;
  padding: 0.7rem 1rem; text-align: center; z-index: 55;
  width: min(60%, 22rem); backdrop-filter: blur(2px);
  box-shadow: 0 0 28px rgba(0,0,0,0.75);
}
.eg-title {
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.25rem; letter-spacing: 0.04em;
  animation: egpop 0.5s ease both, egglow 2.2s ease-in-out infinite;
}
.eg-title.good { color: #8fd28f; text-shadow: 0 0 10px rgba(63,163,77,0.6); }
.eg-title.evil { color: #e08a8a; text-shadow: 0 0 10px rgba(181,59,59,0.6); }
@keyframes egpop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes egglow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
.eg-sub { color: var(--ink-dim); font-size: 0.82rem; margin-top: 0.35rem; }

@media (max-width: 560px) {
  .topbar { gap: 0.45rem; padding: 0.6rem 0.6rem; }
  .link-btn { font-size: 0.78rem; }
  .action-bar { bottom: 0.6rem; max-width: 96vw; padding: 0.6rem 0.8rem; }
  .action-msg { font-size: 0.9rem; }
  .endgame { width: 74%; padding: 0.6rem 0.7rem; }
  .eg-title { font-size: 1.05rem; }
  .icon-crosshair { width: 4.6rem; height: 4.6rem; }
  .icon-shot { width: 5rem; height: 5rem; }
}

/* ---------- auth modal ---------- */
.modal-hint { color: var(--ink-dim); font-size: 0.88rem; margin: -0.3rem 0 0.3rem; }
.auth-buttons { display: flex; gap: 0.6rem; }
.auth-buttons .btn { flex: 1; }

/* ---------- history ---------- */
.history-btn {
  position: fixed; top: 0.8rem; right: 0.9rem; z-index: 46;
  font-family: 'Cinzel', serif; font-size: 0.82rem; letter-spacing: 0.05em;
  background: rgba(12,14,9,0.85); color: var(--ink);
  border: 1px solid var(--stone-rim); border-radius: 8px; padding: 0.45rem 0.9rem; cursor: pointer;
}
.history-btn:hover { color: var(--gold); }
.modal-wide { width: min(560px, 94vw); max-width: 94vw; text-align: left; }
.history-list { max-height: 60vh; overflow-y: auto; display: grid; gap: 0.5rem; margin: 0.3rem 0 0.4rem; }
.hist-row {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(124,106,60,0.35);
  border-radius: 8px; padding: 0.55rem 0.8rem; font-size: 0.92rem; line-height: 1.35;
}
.hist-ok { color: var(--good); }
.hist-no { color: var(--evil); }
.hist-empty { color: var(--ink-dim); text-align: center; padding: 1rem; }

/* ---------- timer options ---------- */
.panel-rule { border: none; border-top: 1px solid rgba(124,106,60,0.4); margin: 0.6rem 0; }
.timer-extra { display: grid; gap: 0.5rem; margin: 0.1rem 0 0.4rem 0.4rem; }
.timer-min { font-size: 0.9rem; color: var(--ink); display: flex; align-items: center; gap: 0.5rem; }
.timer-min input {
  width: 3.4rem; background: rgba(0,0,0,0.4); color: var(--ink);
  border: 1px solid var(--stone-rim); border-radius: 6px; padding: 0.25rem 0.4rem; font-size: 0.95rem;
}

/* ---------- Ginevra public red ring (no role art) ---------- */
.token.mark-ginevra {
  border-color: #ff4d4d !important;
  box-shadow: 0 0 0 4px rgba(210,59,59,0.85), 0 0 16px rgba(210,59,59,0.8) !important;
}

/* ---------- modded power button ---------- */
.btn-power {
  background: linear-gradient(180deg, #6b4aa0, #3f2a66);
  border-color: #b79be6; color: #f3ecff;
}

/* ---------- host panel: modded roles section ---------- */
.modded-handle {
  width: 100%; text-align: left; background: rgba(120,90,170,0.18);
  border: 1px solid rgba(183,155,230,0.5); color: #e9dcff;
  padding: 0.5rem 0.7rem; border-radius: 9px; cursor: pointer;
  font-family: 'Cinzel', serif; font-size: 0.92rem;
}
.modded-extra { display: flex; flex-direction: column; gap: 0.15rem; margin: 0.4rem 0 0.2rem; padding-left: 0.3rem; }
.modded-extra small { color: var(--ink-dim); }

/* ---------- visual history ---------- */
.hist-head { font-size: 0.92rem; margin-bottom: 0.35rem; }
.hist-leader { color: var(--ink-dim); font-size: 0.82rem; }
.hist-ok { color: var(--good); }
.hist-no { color: var(--evil); }
.hist-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hist-chip { display: flex; flex-direction: column; align-items: center; width: 3rem; }
.hist-ava {
  position: relative; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center; font-family: 'Cinzel', serif; font-weight: 700;
  color: var(--ink); background: radial-gradient(circle at 35% 30%, #6a5836, #3a2f1c);
  border: 2px solid var(--stone-rim);
}
.hist-vote {
  position: absolute; bottom: -5px; right: -5px;
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.78rem; font-weight: 800;
  background: rgba(8,10,6,0.95);
}
.hist-vote.v-ok { color: #6fdc7a; border: 2px solid #3fa34d; }
.hist-vote.v-no { color: #ff7d7d; border: 2px solid #d23b3b; }
.hist-sword {
  position: absolute; top: -6px; left: -8px; width: 1.3rem; height: 1.3rem;
  background: url('/img/spada.png') center/contain no-repeat; transform: rotate(-12deg);
}
.hist-shield {
  position: absolute; top: -6px; right: -8px; width: 1.1rem; height: 1.3rem;
  background: url('/img/scudo.png') center/contain no-repeat;
}
.hist-chip-name {
  font-size: 0.62rem; color: var(--ink-dim); margin-top: 0.35rem;
  max-width: 3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center;
}

/* ---------- Discord link in the topbar ---------- */
.discord-top { color: #b9a7e8 !important; text-decoration: none; }
.discord-top:hover { color: #fff !important; }

/* ---------- role-hunt setup (host panel) ---------- */
.rolehunt-extra { margin: 0.3rem 0 0.2rem; padding-left: 0.3rem; }
.rolehunt-hint { font-size: 0.8rem; color: var(--ink-dim); margin: 0.2rem 0 0.4rem; }
.rolehunt-list { display: flex; flex-direction: column; gap: 0.1rem; }
