:root {
    --ink: #1a0f2e;
    --parchment: #f5ecd7;
    --gold: #c9a84c;
    --gold-light: #e8c870;
    --loyalist: #3a6fa8;
    --dissident: #a8ddf0;
    --agent: #aa4040;
    --tyrant: #cc2020;
    --diplomat: #2eab7a;
    --token-size: 104px;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  @keyframes grain {
    0%,100% { transform: translate(0,0); }
    10% { transform: translate(-1%,-1%); }
    20% { transform: translate(1%,0); }
    30% { transform: translate(0,1%); }
    40% { transform: translate(-1%,0); }
    50% { transform: translate(1%,1%); }
    60% { transform: translate(0,-1%); }
    70% { transform: translate(-1%,1%); }
    80% { transform: translate(1%,-1%); }
    90% { transform: translate(0,0); }
  }

  body {
    min-height: 100vh;
    background: var(--ink);
    background-image:
      radial-gradient(ellipse at 18% 15%, #2d1448 0%, transparent 55%),
      radial-gradient(ellipse at 82% 82%, #1a2248 0%, transparent 55%),
      radial-gradient(ellipse at 50% 50%, #170a2a 0%, transparent 80%);
    display: flex; flex-direction: column; align-items: center;
    font-family: 'Cormorant Garamond', serif;
    padding: 2rem 1rem 4rem;
    overflow-x: hidden;
  }
  body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    animation: grain 8s steps(1) infinite;
  }

  .stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
  .star {
    position: absolute; width: 2px; height: 2px; border-radius: 50%; background: white;
    animation: twinkle var(--dur,3s) ease-in-out infinite var(--delay,0s);
  }
  @keyframes twinkle {
    0%,100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.5); }
  }

  .container {
    position: relative; z-index: 1;
    width: 100%; max-width: 1400px;
    display: flex; flex-direction: column; align-items: center; gap: 1.8rem;
  }

  .header { text-align: center; padding: 0.5rem 0; }
  .header-crest {
    display: flex; align-items: center; justify-content: center; gap: 0.9rem;
    margin-bottom: 0.7rem;
  }
  .header-crest-line {
    flex: 1; max-width: 120px; height: 1px;
    background: linear-gradient(to var(--dir, right), transparent, rgba(201,168,76,0.55));
  }
  .header-crest-line:last-child { --dir: left; }
  .header-crest-symbol {
    font-size: 1.25rem; color: var(--gold);
    text-shadow: 0 0 18px rgba(201,168,76,0.6), 0 0 36px rgba(201,168,76,0.25);
    letter-spacing: 0;
  }
  .title {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(1.6rem, 4vw, 1.5rem);
    color: var(--gold);
    text-shadow: 0 0 40px rgba(201,168,76,0.55), 0 0 80px rgba(201,168,76,0.2), 0 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 0.08em; line-height: 1.25;
  }
  .subtitle { font-size: 1rem; color: rgba(245,236,215,0.6); font-style: italic; margin-top: 0.5rem; letter-spacing: 0.18em; }
  .ornament {
    color: var(--gold); opacity: 0.65; font-size: 1rem; letter-spacing: 0.55em;
    margin-top: 0.7rem; display: flex; align-items: center; justify-content: center; gap: 0.3rem;
  }

  .panel {
    width: 100%;
    background: linear-gradient(160deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.015) 100%);
    border: 1px solid rgba(201,168,76,0.2);
    border-radius: 3px;
    padding: 1.4rem 1.8rem;
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
    position: relative;
    box-shadow: 0 2px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
    backdrop-filter: blur(2px);
  }
  .panel::before, .panel::after {
    content: ''; position: absolute;
    width: 10px; height: 10px;
    border-color: rgba(201,168,76,0.5);
    border-style: solid;
  }
  .panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
  .panel::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
  .panel-label {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1rem; letter-spacing: 0.28em;
    color: rgba(232,200,112,0.9); text-transform: uppercase; align-self: flex-start;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(201,168,76,0.15);
    width: 100%;
    cursor: pointer; user-select: none;
    display: flex; justify-content: space-between; align-items: center;
  }
  .panel-label::after {
    content: '▾'; font-size: 0.75rem; opacity: 0.6;
    transition: transform 0.2s; display: inline-block;
    letter-spacing: 0;
  }
  .panel.collapsed .panel-label::after { transform: rotate(-90deg); }
  .panel.collapsed > *:not(.panel-label) { display: none !important; }

  .count-buttons { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }

  .players-panel { display: none; }
  .players-panel.open { display: flex; }
  .players-grid {
    width: 100%; display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
  }
  .player-input-wrap { display: flex; flex-direction: column; gap: 0.25rem; }
  .player-input-label {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: #e8c870;
  }
  .player-input {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(201,168,76,0.2);
    border-radius: 2px; padding: 0.5rem 0.75rem;
    font-family: 'Cormorant Garamond', serif; font-size: 1.5rem;
    color: rgba(245,236,215,0.8); outline: none; width: 100%;
    transition: border-color 0.2s ease; letter-spacing: 0.04em;
  }
  .player-input::placeholder { color: rgba(245,236,215,0.2); font-style: italic; }
  .player-input:focus { border-color: rgba(201,168,76,0.5); }

  .count-btn {
    background: transparent;
    border: 1px solid rgba(201,168,76,0.25);
    color: rgba(232,200,112,0.75);
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.5rem; width: 60px; height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
  }
  .count-btn::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at center, rgba(201,168,76,0.15), transparent 70%);
    opacity: 0; transition: opacity 0.25s ease;
  }
  .count-btn:hover { border-color: rgba(201,168,76,0.7); color: var(--gold); box-shadow: 0 0 16px rgba(201,168,76,0.2); }
  .count-btn:hover::before { opacity: 1; }
  .count-btn.active {
    background: radial-gradient(circle at center, rgba(201,168,76,0.18), rgba(201,168,76,0.06) 70%);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 24px rgba(201,168,76,0.3), inset 0 0 12px rgba(201,168,76,0.08);
  }r

  /* ── Bag / picker panel ── */
  .picker-panel { display: none; }
  .picker-panel.open { display: flex; }

  /* Role pin chips */
  .bag-role-groups { width: 100%; display: flex; flex-direction: column; gap: 1.1rem; }
  .bag-role-group { display: flex; flex-direction: column; gap: 0.45rem; }
  .bag-role-group-hdr { display: flex; align-items: baseline; gap: 0.55rem; }
  .bag-role-group-name {
    font-family: 'Cinzel Decorative', serif; font-size: 1.5rem; letter-spacing: 0.25em;
    text-transform: uppercase; padding-bottom: 0.2rem;
  }
  .grp-tl  .bag-role-group-name { color: #7ab8e8; }
  .grp-td  .bag-role-group-name { color: #a8ddf0; }
  .grp-ta  .bag-role-group-name { color: #ee9999; }
  .grp-tdi .bag-role-group-name { color: #ff9999; }
  .grp-tdip .bag-role-group-name { color: #6eddb0; }
  .bag-role-group-slots {
    font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-style: italic;
    color: rgba(245,236,215,0.52); letter-spacing: 0.02em;
  }

  .bag-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .chip {
    padding: 0.38rem 1rem; border-radius: 30px;
    font-size: 1.5rem; letter-spacing: 0.04em; cursor: pointer; border: 1px solid;
    background: transparent; font-family: 'Cormorant Garamond', serif;
    transition: all 0.2s ease; user-select: none;
    color: rgba(245,236,215,0.55); border-color: rgba(245,236,215,0.16);
    position: relative;
  }
  .chip:hover { border-color: rgba(245,236,215,0.45); color: rgba(245,236,215,0.9); background: rgba(255,255,255,0.04); }
  .chip-ability-tip {
    display: none; position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%);
    background: #0e0820; border: 1px solid rgba(201,168,76,0.35);
    color: rgba(245,236,215,0.85); font-family: 'Cormorant Garamond', serif;
    font-size: 1rem; font-style: italic; letter-spacing: 0.02em; line-height: 1.5;
    padding: 0.55rem 0.9rem; border-radius: 4px; white-space: normal;
    width: 260px; text-align: center; z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    pointer-events: none;
  }
  .chip-ability-tip::after {
    content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: rgba(201,168,76,0.35);
  }
  .chip:hover .chip-ability-tip { display: block; }
  .grp-tl  .chip.selected { background: rgba(58,111,168,0.2);  border-color: var(--loyalist); color: #b0cef0; box-shadow: 0 0 10px rgba(58,111,168,0.25); }
  .grp-td  .chip.selected { background: rgba(168,221,240,0.2); border-color: var(--dissident); color: #c0eaf8; box-shadow: 0 0 10px rgba(168,221,240,0.2); }
  .grp-ta  .chip.selected { background: rgba(170,64,64,0.2);   border-color: var(--agent);    color: #f0aaaa; box-shadow: 0 0 10px rgba(170,64,64,0.25); }
  .grp-tdi .chip.selected { background: rgba(180,30,30,0.2);   border-color: var(--tyrant); color: #ffaaaa; box-shadow: 0 0 10px rgba(204,32,32,0.3); }
  .grp-tdip .chip.selected { background: rgba(46,171,122,0.2); border-color: var(--diplomat); color: #9ef0cf; box-shadow: 0 0 10px rgba(46,171,122,0.3); }

  .grimoire.reveal-mode .card-tokens { visibility: hidden !important; display: none !important; }
  .role-card.square-token { border-radius: 8px !important; }
  .role-card.square-token .rc-clip,
  .role-card.square-token .rc-icon { border-radius: 8px !important; }
  .role-card.square-token .rc-scrim { border-radius: 0 0 8px 8px !important; }
  .role-card.square-token .rc-termlock-overlay,
  .role-card.square-token .rc-ja-overlay,
  .role-card.square-token .reveal-overlay { border-radius: 8px !important; }
  
  .grp-tl  .chip.chip-blank.selected,
  .grp-td  .chip.chip-blank.selected,
  .grp-ta  .chip.chip-blank.selected,
  .grp-tdi .chip.chip-blank.selected { background: rgba(245,236,215,0.06); border-color: rgba(245,236,215,0.45); color: rgba(245,236,215,0.82); }
  .grp-tdip .chip.chip-blank.selected { background: rgba(245,236,215,0.06); border-color: rgba(245,236,215,0.45); color: rgba(245,236,215,0.82); }
  .divider { width: 100%; height: 1px; background: linear-gradient(to right, transparent, rgba(201,168,76,0.15), transparent); margin-top: 0.3rem; }

  .card-wrapper {
    opacity: 0; transform: translateY(14px) scale(0.98);
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: flex; flex-direction: column; align-items: center; gap: 0;
  }
  .card-wrapper.visible { opacity: 1; transform: translateY(0) scale(1); }

  .role-card {
    position: relative;
    width: var(--token-size); height: var(--token-size);
    border-radius: 50%;
    flex-shrink: 0;
    cursor: default;
    transition: transform 0.22s ease;
    background: radial-gradient(circle at 42% 38%, #241840 0%, #100c20 60%, #08061a 100%);
    outline: 3px solid #0a0716;
    overflow: visible;
  }
  .role-card:hover { transform: scale(1.07); z-index: 100; }

  .role-card.team-loyalist  { box-shadow: 0 0 0 8px var(--loyalist),  0 0 0 9px rgba(58,111,168,0.25), 0 8px 30px rgba(0,0,0,0.75); }
  .role-card.team-dissident { box-shadow: 0 0 0 8px var(--dissident), 0 0 0 9px rgba(168,221,240,0.2), 0 8px 30px rgba(0,0,0,0.75); }
  .role-card.team-agent     { box-shadow: 0 0 0 8px var(--agent),     0 0 0 9px rgba(170,64,64,0.25),  0 8px 30px rgba(0,0,0,0.75); }
  .role-card.team-tyrant  { box-shadow: 0 0 0 8px var(--tyrant),  0 0 0 9px rgba(204,32,32,0.25),  0 8px 30px rgba(0,0,0,0.75); }
  .role-card.team-diplomat  { box-shadow: 0 0 0 8px var(--diplomat),  0 0 0 9px rgba(46,171,122,0.25), 0 8px 30px rgba(0,0,0,0.75); }

  .role-card.pinned.team-loyalist  { box-shadow: 0 0 0 8px var(--loyalist),  0 0 0 11px rgba(201,168,76,0.7), 0 8px 30px rgba(0,0,0,0.75); }
  .role-card.pinned.team-dissident { box-shadow: 0 0 0 8px var(--dissident), 0 0 0 11px rgba(201,168,76,0.7), 0 8px 30px rgba(0,0,0,0.75); }
  .role-card.pinned.team-agent     { box-shadow: 0 0 0 8px var(--agent),     0 0 0 11px rgba(201,168,76,0.7), 0 8px 30px rgba(0,0,0,0.75); }
  .role-card.pinned.team-tyrant  { box-shadow: 0 0 0 8px var(--tyrant),  0 0 0 11px rgba(201,168,76,0.7), 0 8px 30px rgba(0,0,0,0.75); }
  .role-card.pinned.team-diplomat  { box-shadow: 0 0 0 8px var(--diplomat),  0 0 0 11px rgba(201,168,76,0.7), 0 8px 30px rgba(0,0,0,0.75); }

  .rc-icon {
    width: var(--token-size); height: var(--token-size);
    border-radius: 50%;
    object-fit: cover; object-position: center 15%;
    display: block;
    position: relative; z-index: 1;
  }

  .rc-scrim {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 45%; border-radius: 0 0 50% 50%;
    background: linear-gradient(to bottom, transparent 0%, rgba(4,2,14,0.88) 100%);
    z-index: 2; pointer-events: none;
  }

  .rc-name-arc {
    position: absolute;
    bottom: -3px; left: 50%;
    transform: translateX(-50%);
    width: var(--token-size);
    height: var(--token-size);
    pointer-events: none; z-index: 4;
    overflow: visible;
  }

  .rc-ability-tooltip {
    position: absolute; bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%);
    background: #0a0518; border: 1px solid rgba(201,168,76,0.4);
    color: rgba(245,236,215,0.95); font-family: 'Cormorant Garamond', serif;
    font-size: 1rem; line-height: 1.5; font-style: italic;
    padding: 0.6rem 0.9rem; border-radius: 4px; width: 225px;
    box-shadow: 0 4px 22px rgba(0,0,0,0.75);
    pointer-events: none; opacity: 0; transition: opacity 0.18s ease;
    z-index: 3000; text-align: center; white-space: normal;
  }
  .rc-ability-tooltip .tip-role {
    font-family: 'Cinzel Decorative', serif; font-size: 0.75rem;
    letter-spacing: 0.08em; display: block; margin-bottom: 0.3rem;
    font-style: normal; color: var(--parchment);
  }
  .rc-ability-tooltip::after {
    content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: rgba(201,168,76,0.4);
  }
  .role-card:hover .rc-ability-tooltip { opacity: 1; }

  .rc-termlock-overlay {
    display: none; position: absolute; inset: 0; border-radius: 50%;
    background: rgba(8,4,18,0.86);
    align-items: center; justify-content: center; z-index: 10; cursor: pointer;
  }
  .role-card.termlocked .rc-termlock-overlay { display: flex; }

  .rc-ja-overlay {
    display: none; position: absolute; inset: 0; border-radius: 50%;
    background: rgba(30,80,30,0.82);
    align-items: center; justify-content: center; z-index: 11; cursor: pointer;
    flex-direction: column; gap: 0.1rem;
  }
  .role-card.voted-ja .rc-ja-overlay { display: flex; }
  .rc-ja-icon  { font-size: 1.5rem; line-height: 1; }
  .rc-ja-label {
    font-family: 'Cinzel Decorative', serif; font-size: 0.5rem;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: rgba(150,240,150,0.9); text-align: center;
  }
  .rc-termlock-label {
    font-family: 'Cinzel Decorative', serif; font-size: 0.5rem;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: rgba(201,168,76,0.85); text-align: center; line-height: 1.7;
  }

  .rc-expand-btn {
    position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(16,10,30,0.95); border: 1px solid rgba(201,168,76,0.5);
    color: rgba(201,168,76,0.8); font-size: 1rem; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    z-index: 20; transition: all 0.15s ease; font-family: sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
  }
  .rc-expand-btn:hover { background: rgba(201,168,76,0.2); color: var(--gold); border-color: var(--gold); }
  .rc-expand-btn.open { background: rgba(201,168,76,0.18); color: var(--gold); border-color: var(--gold); }

  .rc-player-label {
    margin-top: 10px;
    font-family: 'Cormorant Garamond', serif; font-size: 1rem; font-weight: 600;
    color: rgba(245,236,215,0.95); letter-spacing: 0.04em;
    text-align: center; line-height: 1.2;
    text-shadow: 0 1px 6px rgba(0,0,0,0.9);
    cursor: text; min-height: 1.15em;
    max-width: calc(var(--token-size) + 24px);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .rc-player-label.placeholder { color: rgba(245,236,215,0.2); font-style: italic; font-weight: 400; }

  .rc-player-input {
    display: none; margin-top: 10px;
    width: calc(var(--token-size) + 16px); text-align: center;
    background: rgba(8,4,18,0.85); border: none;
    border-bottom: 1px solid rgba(201,168,76,0.5);
    font-family: 'Cormorant Garamond', serif; font-size: 1rem; font-weight: 600;
    color: rgba(245,236,215,0.9); outline: none; letter-spacing: 0.04em;
    padding: 0.1rem 0.25rem;
  }
  .rc-player-input.editing { display: block; }
  .rc-player-label.editing { display: none; }

  .card-wrapper.dead   .role-card { filter: grayscale(1) brightness(0.5); }
  .card-wrapper.exiled .role-card { filter: grayscale(0.6) brightness(0.7); }
  .card-wrapper.rumors .role-card {
    box-shadow: 0 0 0 8px #3b82f6, 0 0 0 9px rgba(59,130,246,0.2), 0 8px 30px rgba(0,0,0,0.75) !important;
  }
  .role-card.is-marked-target {
    box-shadow: 0 0 0 8px rgba(168,221,240,0.9), 0 0 0 11px rgba(168,221,240,0.2),
                0 0 28px rgba(168,221,240,0.35), 0 8px 30px rgba(0,0,0,0.75) !important;
  }
  .role-card.token-target {
    cursor: crosshair !important;
    box-shadow: 0 0 0 8px rgba(201,168,76,0.9), 0 0 0 11px rgba(201,168,76,0.2),
                0 0 32px rgba(201,168,76,0.4), 0 8px 30px rgba(0,0,0,0.75) !important;
    animation: tokenTargetPulse 0.9s ease-in-out infinite;
  }
  @keyframes tokenTargetPulse {
    0%,100% { filter: brightness(1); }
    50% { filter: brightness(1.18); }
  }

  .rc-controls {
    display: none; flex-direction: column; align-items: center; gap: 0.28rem;
    margin-top: 0.25rem; width: 100%;
  }
  .rc-controls.open { display: flex; }

  .seat-pill {
    background: rgba(0,0,0,0.55); border-radius: 3px;
    font-family: 'Cinzel Decorative', serif; font-size: 0.5rem;
    color: rgba(245,236,215,0.62); letter-spacing: 0.12em;
    padding: 0.15rem 0.55rem; display: inline-block;
  }
  .rc-status-btns { display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: center; }
  .status-btn {
    background: transparent; border: 1px solid rgba(245,236,215,0.15);
    color: rgba(245,236,215,0.58); font-family: 'Cinzel Decorative', serif;
    font-size: 0.5rem; letter-spacing: 0.05em; padding: 0.16rem 0.45rem;
    cursor: pointer; border-radius: 2px; text-transform: uppercase;
    transition: all 0.2s ease;
  }
  .status-btn:hover { border-color: rgba(245,236,215,0.65); color: rgba(245,236,215,0.88); }
  .status-btn.active { background: rgba(245,236,215,0.1); border-color: var(--gold); color: var(--gold); }

  .rc-mark-btn {
    background: transparent; border: 1px solid rgba(168,221,240,0.35);
    color: rgba(160,184,238,0.68); font-family: 'Cinzel Decorative', serif;
    font-size: 0.5rem; letter-spacing: 0.12em; padding: 0.16rem 0.5rem;
    cursor: pointer; border-radius: 2px; text-transform: uppercase;
    transition: all 0.2s ease; display: block; width: 100%; text-align: center;
  }
  .rc-mark-btn:hover { border-color: var(--dissident); color: #a8ddf0; background: rgba(168,221,240,0.18); }
  .rc-mark-btn.active { border-color: var(--dissident); color: #a8ddf0; background: rgba(168,221,240,0.3); }

  .rumorist-tag {
    display: block; text-align: center; padding: 0.12rem 0.45rem;
    background: rgba(168,221,240,0.2); border: 1px solid rgba(168,221,240,0.7);
    border-radius: 2px; font-family: 'Cinzel Decorative', serif;
    font-size: 0.5rem; letter-spacing: 0.16em; color: #a8ddf0; text-transform: uppercase;
  }

  .card-tokens { position: absolute; pointer-events: none; z-index: 200; }
  .card-token-badge {
    position: absolute;
    width: 76px; height: 76px; border-radius: 50%;
    border: 3px solid rgba(201,168,76,0.6);
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    cursor: pointer; pointer-events: all;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    background: radial-gradient(circle at 45% 35%, #2a2235 0%, #18102e 55%, #0e0820 100%);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.6), inset 0 1px 3px rgba(255,255,255,0.08), inset 0 -2px 4px rgba(0,0,0,0.4), 0 3px 10px rgba(0,0,0,0.6);
  }
  .card-token-badge:hover { transform: scale(1.15); z-index: 999; }
  .token-badge-icon {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
    flex-shrink: 0; margin-top: 7px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
  }
  .card-token-badge .token-inner-text {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.55);
    color: #ffffff;
    font-size: 0.5rem; font-family: 'DM Sans', sans-serif;
    font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
    text-align: center; line-height: 1.15;
    padding: 2px 3px 3px;
  }
  .card-token-badge.no-icon {
    justify-content: center;
  }
  .card-token-badge.no-icon .token-inner-text {
    position: static; background: none;
    color: #ffffff;
    font-size: 0.5rem; padding: 4px 5px; line-height: 1.25;
  }
  .card-token-badge .token-badge-x {
    display: none; position: absolute; top: 2px; right: 2px;
    width: 16px; height: 16px; border-radius: 50%;
    background: rgba(10,5,20,0.88); border: 1px solid rgba(245,236,215,0.6);
    color: #fff; font-size: 0.75rem; line-height: 16px;
    text-align: center; cursor: pointer; font-family: sans-serif; z-index: 10;
  }
  .card-token-badge:hover .token-badge-x { display: block; }

  .note-token-icon {
    font-size: 1.25rem; margin-top: 7px; flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
    line-height: 1;
  }

  .add-token-btn {
    background: transparent; border: 1px dashed rgba(201,168,76,0.28);
    color: rgba(201,168,76,0.65); font-family: 'Cinzel Decorative', serif;
    font-size: 0.5rem; letter-spacing: 0.12em; padding: 0.16rem 0.45rem;
    cursor: pointer; border-radius: 2px; text-transform: uppercase;
    transition: all 0.2s ease; position: relative; width: 100%; text-align: center;
  }
  .add-token-btn:hover { border-color: rgba(201,168,76,0.6); color: rgba(201,168,76,0.8); border-style: solid; }

  .termlock-btn {
    background: transparent; border: 1px solid rgba(201,168,76,0.2);
    color: rgba(201,168,76,0.62); font-family: 'Cinzel Decorative', serif;
    font-size: 0.5rem; letter-spacing: 0.14em; padding: 0.16rem 0.5rem;
    cursor: pointer; border-radius: 2px; text-transform: uppercase;
    transition: all 0.2s ease; width: 100%; text-align: center;
  }
  .termlock-btn:hover { border-color: rgba(201,168,76,0.5); color: rgba(201,168,76,0.7); }
  .termlock-btn.active { border-color: rgba(201,168,76,0.6); color: rgba(201,168,76,0.9); background: rgba(201,168,76,0.08); }

  .ghost-vote-btn {
    background: transparent; border: 1px dashed rgba(245,236,215,0.2);
    color: rgba(245,236,215,0.52); font-family: 'Cinzel Decorative', serif;
    font-size: 0.5rem; letter-spacing: 0.1em; padding: 0.16rem 0.45rem;
    cursor: pointer; border-radius: 2px; text-transform: uppercase;
    transition: all 0.2s ease; width: 100%; text-align: center; display: none;
  }
  .ghost-vote-btn.visible { display: block; }
  .ghost-vote-btn.used { border-color: rgba(238,119,119,0.4); color: rgba(238,119,119,0.5); border-style: solid; }
  .ghost-vote-btn:hover:not(.used) { border-color: rgba(245,236,215,0.65); color: rgba(245,236,215,0.85); border-style: solid; }

  .token-ctx-menu {
    position: fixed; background: #0e0720; border: 1px solid rgba(201,168,76,0.4);
    border-radius: 6px; z-index: 2000; min-width: 420px;
    box-shadow: 0 6px 28px rgba(0,0,0,0.85); overflow: hidden;
  }
  .token-ctx-header {
    padding: 1rem 1.6rem 0.65rem;
    font-family: 'Cinzel Decorative', serif; font-size: 1rem;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: rgba(201,168,76,0.92); border-bottom: 1px solid rgba(201,168,76,0.15);
  }
  .token-ctx-item {
    padding: 0.85rem 1.6rem; font-family: 'Cinzel Decorative', serif;
    font-size: 1rem; letter-spacing: 0.1em; text-transform: uppercase;
    cursor: pointer; color: rgba(245,236,215,0.85);
    transition: background 0.15s, color 0.15s;
    display: flex; align-items: center; gap: 0.85rem;
  }
  .token-ctx-item:hover { background: rgba(201,168,76,0.12); color: rgba(245,236,215,0.95); }
  .token-ctx-item.danger { color: rgba(238,119,119,0.85); }
  .token-ctx-item.danger:hover { background: rgba(200,50,50,0.15); color: #ee9999; }
  .token-ctx-item.active-item { color: var(--gold); }
  .token-ctx-sep { height: 1px; background: rgba(201,168,76,0.12); margin: 0.15rem 0; }

  .token-swap-grid {
    display: none; padding: 0.5rem 0.7rem; gap: 0.4rem;
    flex-wrap: wrap; border-top: 1px solid rgba(201,168,76,0.12);
    max-height: 260px; overflow-y: auto;
  }
  .token-swap-grid.open { display: flex; }
  .swap-chip {
    display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    cursor: pointer; padding: 0.3rem; border-radius: 3px;
    transition: background 0.15s;
  }
  .swap-chip:hover { background: rgba(201,168,76,0.12); }
  .swap-chip-img {
    width: 62px; height: 62px; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
  }
  .swap-chip-placeholder {
    width: 62px; height: 62px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Cinzel Decorative', serif; font-size: 0.75rem;
    color: rgba(245,236,215,0.4); border: 2px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
  }
  .swap-chip-label {
    font-family: 'Cinzel Decorative', serif; font-size: 0.75rem;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: rgba(245,236,215,0.78); text-align: center; max-width: 80px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .swap-chip.team-loyalist .swap-chip-img  { border-color: var(--loyalist); }
  .swap-chip.team-dissident .swap-chip-img { border-color: var(--dissident); }
  .swap-chip.team-agent .swap-chip-img     { border-color: var(--agent); }
  .swap-chip.team-tyrant .swap-chip-img  { border-color: var(--tyrant); }
  .swap-chip.team-diplomat .swap-chip-img  { border-color: var(--diplomat); }

  .note-token-icon {
    font-size: 1.5rem; margin-top: 7px; flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
    line-height: 1;
  }

  .ctx-note-input {
    width: 100%; background: rgba(255,255,255,0.04);
    border: none; border-bottom: 1px solid rgba(201,168,76,0.35);
    color: rgba(245,236,215,0.85); font-family: 'Cormorant Garamond', serif;
    font-size: 1rem; padding: 0.3rem 0.5rem; outline: none;
    letter-spacing: 0.03em;
  }
  .ctx-note-input::placeholder { color: rgba(245,236,215,0.25); font-style: italic; }
  .ctx-note-row { padding: 0.4rem 0.9rem; display: flex; gap: 0.4rem; align-items: center; }
  .ctx-note-add {
    background: transparent; border: 1px solid rgba(201,168,76,0.4);
    color: rgba(201,168,76,0.7); font-family: 'Cinzel Decorative', serif;
    font-size: 0.42rem; letter-spacing: 0.1em; padding: 0.2rem 0.5rem;
    cursor: pointer; border-radius: 2px; white-space: nowrap;
    transition: all 0.15s;
  }
  .ctx-note-add:hover { background: rgba(201,168,76,0.15); color: var(--gold); }

  .token-dropdown {
    background: #0e0720; border: 1px solid rgba(201,168,76,0.35);
    border-radius: 3px; z-index: 500; min-width: 260px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.8); overflow: hidden;
  }
  .token-dropdown-item {
    padding: 0.8rem 1.3rem; font-family: 'Cinzel Decorative', serif;
    font-size: 0.95rem; letter-spacing: 0.1em; text-transform: uppercase;
    cursor: pointer; transition: background 0.15s; white-space: nowrap;
  }
  .token-dropdown-item:hover { background: rgba(201,168,76,0.12); }
  .badge-loyalist   { border-color: #4a7ab8; }
  .badge-dissident  { border-color: #3a9ab8; }
  .badge-agent      { border-color: #bb3333; }
  .badge-tyrant   { border-color: #991111; }
  .badge-diplomat   { border-color: #1a8a5a; }
  .badge-neutral    { border-color: #8b6914; }
  .badge-storyteller{ background: rgba(85,102,170,0.22);  border-color: rgba(120,140,220,0.55);  color: #aabbee; }
  .token-dropdown-item.badge-loyalist    { background: transparent; color: #8ab8e8; }
  .token-dropdown-item.badge-dissident   { background: transparent; color: #a8ddf0; }
  .token-dropdown-item.badge-agent       { background: transparent; color: #ee9999; }
  .token-dropdown-item.badge-diplomat    { background: transparent; color: #6eddb0; }
  .token-dropdown-item.badge-neutral     { background: transparent; color: rgba(245,236,215,0.55); }
  .token-dropdown-item.badge-storyteller { background: transparent; color: #aabbee; }
  .token-dropdown-item:hover { background: rgba(201,168,76,0.12) !important; }

  .grimoire-wrap {
    width: 100%; display: flex; justify-content: flex-start; padding: 0; position: relative; align-items: flex-start;
  }
  .grimoire {
    position: relative; width: min(1000px, 96vw); aspect-ratio: 1;
    flex-shrink: 1; min-width: 0; margin-left: 10px;
  }

  /* Nomination clock hands */
  #nominationSvg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 20; overflow: visible;
  }

  /* Clock hand: absolutely positioned, pivot = its left edge at hub center */
  .nom-hand-wrap {
    position: absolute;
    pointer-events: none;
    z-index: 20;
    height: 4px;
    transform-origin: left center;
    /* translateY(-50%) centers vertically on the pivot point */
  }
  .nom-hand-line {
    height: 3px; border-radius: 3px;
    position: absolute; inset: 0;
    top: 50%; transform: translateY(-50%);
  }
  .nom-hand-dot {
    width: 14px; height: 14px; border-radius: 50%;
    position: absolute; right: -7px; top: 50%; transform: translateY(-50%);
  }
  .nom-hand-wrap.president .nom-hand-line { background: #c9a84c; height: 3px; }
  .nom-hand-wrap.president .nom-hand-dot  { background: #c9a84c; box-shadow: 0 0 8px rgba(201,168,76,0.9); }
  .nom-hand-wrap.chancellor .nom-hand-line {
    background: repeating-linear-gradient(90deg, #9bbce0 0px, #9bbce0 8px, transparent 8px, transparent 13px);
    height: 2.5px;
  }
  .nom-hand-wrap.chancellor .nom-hand-dot { background: #9bbce0; box-shadow: 0 0 8px rgba(155,188,224,0.9); }
  /* Chancellor sweeps clockwise */
  .nom-hand-wrap.chancellor { transition: transform 0.7s cubic-bezier(0.4,0,0.2,1); }
  .nom-hand-wrap.president  { transition: transform 0.2s ease; }

  /* Current voter highlight */
  .grim-slot.vote-current .role-card {
    outline: 3px solid rgba(255,255,255,0.85) !important;
    outline-offset: 4px;
    filter: brightness(1.25) !important;
  }

  /* Vote bar — now contains Start Vote button */
  .nom-vote-bar {
    display: none; align-items: center; justify-content: center; gap: 0.8rem;
    width: 100%; margin-top: -1.5rem;
    flex-wrap: wrap;
  }
  .nom-vote-bar.visible { display: flex; }

  .vote-log-entry {
    display: flex; align-items: center; gap: 0.6rem;
    font-family: 'DM Sans', sans-serif; font-size: 0.65rem;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 3px; padding: 0.35rem 0.7rem;
    color: rgba(245,236,215,0.75);
  }
  .vote-log-entry .vle-num  { color: rgba(201,168,76,0.5); font-size: 0.55rem; min-width: 1rem; text-align: right; }
  .vote-log-entry .vle-names { flex: 1; }
  .vote-log-entry .vle-pres  { color: #c9a84c; }
  .vote-log-entry .vle-chanc { color: #9bbce0; }
  .vote-log-entry .vle-sep   { color: rgba(245,236,215,0.3); }
  .vote-log-entry .vle-result { font-family: 'Cinzel Decorative', serif; font-size: 0.55rem; letter-spacing: 0.08em; white-space: nowrap; }
  .vote-log-entry .vle-result.passed { color: #7ac47a; }
  .vote-log-entry .vle-result.failed { color: #ee7777; }
  .vote-log-entry .vle-tally { color: rgba(245,236,215,0.45); font-size: 0.6rem; white-space: nowrap; }
  .nom-controls {
    display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    width: 100%; margin-top: 0.15rem;
  }
  .nom-row { display: flex; gap: 0.3rem; align-items: center; width: 100%; justify-content: center; }
  .nom-btn {
    font-family: 'Cinzel Decorative', serif; font-size: 0.48rem; letter-spacing: 0.1em;
    text-transform: uppercase; border-radius: 2px; cursor: pointer;
    padding: 0.25rem 0.55rem; border: 1px solid; transition: all 0.15s;
    white-space: nowrap;
  }
  .nom-btn.president  { color: #c9a84c; border-color: rgba(201,168,76,0.45); background: rgba(201,168,76,0.07); }
  .nom-btn.chancellor { color: #9bbce0; border-color: rgba(100,160,220,0.45); background: rgba(100,160,220,0.07); }
  .nom-btn.active.president  { background: rgba(201,168,76,0.2); border-color: #c9a84c; box-shadow: 0 0 8px rgba(201,168,76,0.3); }
  .nom-btn.active.chancellor { background: rgba(100,160,220,0.2); border-color: #9bbce0; box-shadow: 0 0 8px rgba(100,160,220,0.3); }
  .nom-btn.clear { color: rgba(245,236,215,0.45); border-color: rgba(245,236,215,0.15); background: transparent; font-size: 0.42rem; padding: 0.2rem 0.45rem; }
  .nom-btn.clear:hover { color: rgba(245,236,215,0.8); border-color: rgba(245,236,215,0.4); }
  .nom-label { font-family: 'Cinzel Decorative', serif; font-size: 0.42rem; letter-spacing: 0.1em; text-transform: uppercase; }
  .nom-label.president  { color: rgba(201,168,76,0.75); }
  .nom-label.chancellor { color: rgba(155,188,224,0.75); }
  .nom-name {
    font-family: 'Cormorant Garamond', serif; font-size: 0.78rem; font-style: italic;
    letter-spacing: 0.04em; line-height: 1.1; text-align: center;
    max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .nom-name.president  { color: #e8c870; }
  .nom-name.chancellor { color: #b8d4f0; }
  .nom-name.empty { color: rgba(245,236,215,0.25); font-style: italic; }

  /* Pulse ring when nomination mode is active */
  @keyframes nom-pulse { 0%,100%{opacity:0.55} 50%{opacity:1} }
  .nom-mode-pres  .grim-slot .role-card { cursor: crosshair !important; }
  .nom-mode-chanc .grim-slot .role-card { cursor: crosshair !important; }

  .grim-slot {
    position: absolute; display: flex; flex-direction: column; align-items: center;
    width: 150px; transform: translate(-50%, -50%); gap: 0;
  }
  .grim-slot:hover { z-index: 9999; }

  .deck-order-badge {
    position: absolute; width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'DM Sans', sans-serif; font-size: 0.72rem; font-weight: 700;
    top: 50%; transform: translateY(-50%);
    pointer-events: none; z-index: 50;
    box-shadow: 0 1px 4px rgba(0,0,0,0.6);
    line-height: 1;
  }
  .deck-order-badge.first-deck  { background: #c0231b; color: #fff; left:  -4px; border: 2px solid rgba(255,100,80,0.5); }
  .deck-order-badge.other-decks { background: #1a5fa8; color: #fff; right: -4px; border: 2px solid rgba(80,150,255,0.5); }
  .grim-center {
    position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%);
    width: var(--hub-size, 240px); height: var(--hub-size, 240px); border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #200d3e 0%, #0e0720 60%, #070415 100%);
    border: 1px solid rgba(201,168,76,0.3);
    box-shadow: 0 0 50px rgba(0,0,0,0.9), inset 0 0 40px rgba(0,0,0,0.6),
                0 0 0 1px rgba(201,168,76,0.08), 0 0 60px rgba(201,168,76,0.06);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.2rem; padding: 0.7rem; z-index: 10; text-align: center; overflow: hidden;
  }
  .grim-stats { display: flex; flex-direction: column; gap: 0.35rem; align-items: center; width: 100%; }
  .grim-stat-row { display: flex; gap: 0.7rem; align-items: center; justify-content: center; flex-wrap: wrap; }
  .grim-stat { font-family: 'Cinzel Decorative', serif; font-size: 0.52rem; letter-spacing: 0.1em; color: rgba(245,236,215,0.78); display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
  .grim-stat-val { font-size: 1.35rem; color: rgba(245,236,215,0.9); font-family: 'Cormorant Garamond', serif; line-height: 1; }
  .grim-stat-val.votes-val { color: #c9a84c; }
  .grim-stat-val.votes-zero { color: #ee7777; }
  .grim-divider { width: 80%; height: 1px; background: rgba(201,168,76,0.15); margin: 0.1rem 0; }
  .grim-team-row { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
  .grim-team-pip { font-family: 'Cinzel Decorative', serif; font-size: 0.7rem; letter-spacing: 0.06em; padding: 0.18rem 0.5rem; border-radius: 2px; border: 1px solid; }
  .grim-pip-l  { color: #7ab0e8; border-color: rgba(58,111,168,0.5);  background: rgba(30,70,130,0.2); }
  .grim-pip-d  { color: #a8ddf0; border-color: rgba(168,221,240,0.5); background: rgba(168,221,240,0.1); }
  .grim-pip-a  { color: #dd8888; border-color: rgba(170,64,64,0.5);   background: rgba(122,32,32,0.2); }
  .grim-pip-di { color: #ee7777; border-color: rgba(180,30,30,0.5);   background: rgba(80,0,0,0.3); }
  .grim-pip-dip{ color: #6eddb0; border-color: rgba(46,171,122,0.5); background: rgba(20,80,55,0.25); }
  .grim-votes-row { display: flex; gap: 0.25rem; flex-wrap: wrap; justify-content: center; margin-top: 0.1rem; }
  .ghost-vote-pip { width: 8px; height: 8px; border-radius: 50%; background: rgba(245,236,215,0.4); border: 1px solid rgba(245,236,215,0.3); transition: all 0.2s; }
  .ghost-vote-pip.used { background: rgba(238,119,119,0.3); border-color: rgba(238,119,119,0.5); }

  .bluffs-section {
    background: rgba(255,255,255,0.025); border: 1px solid rgba(201,168,76,0.22);
    border-radius: 4px; padding: 1rem 1rem; flex-shrink: 0;
    overflow: visible;
  }
  .bluffs-label { font-family: 'Cinzel Decorative', serif; font-size: 0.85rem; letter-spacing: 0.25em; text-transform: uppercase; color: #e8c870; margin-bottom: 0.9rem; }
  .bluffs-chips { display: flex; flex-direction: column; gap: 1.6rem; align-items: center; overflow: visible; }

  .bluff-chip {
    position: relative; width: var(--token-size); height: var(--token-size);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; transition: transform 0.22s ease;
    background: radial-gradient(circle at 42% 38%, #241840 0%, #100c20 60%, #08061a 100%);
    outline: 3px solid #0a0716; overflow: visible;
  }
  .bluff-chip:hover { transform: scale(1.07); }
  .bluff-chip.team-loyalist  { box-shadow: 0 0 0 8px var(--loyalist),  0 0 0 9px rgba(58,111,168,0.25),  0 8px 30px rgba(0,0,0,0.75); }
  .bluff-chip.team-dissident { box-shadow: 0 0 0 8px var(--dissident), 0 0 0 9px rgba(168,221,240,0.2),  0 8px 30px rgba(0,0,0,0.75); }
  .bluff-chip.bluff-chip-blank { box-shadow: 0 0 0 8px rgba(245,236,215,0.12), 0 0 0 9px rgba(245,236,215,0.05), 0 8px 30px rgba(0,0,0,0.75); }
  .swap-chip.swap-chip-blank { border-color: rgba(245,236,215,0.15); }
  .bluff-chip .bc-icon { width: var(--token-size); height: var(--token-size); border-radius: 50%; object-fit: cover; object-position: center 15%; display: block; position: relative; z-index: 1; }
  .bluff-chip .bc-scrim { position: absolute; bottom: 0; left: 0; right: 0; height: 45%; border-radius: 0 0 50% 50%; background: linear-gradient(to bottom, transparent 0%, rgba(4,2,14,0.88) 100%); z-index: 2; pointer-events: none; }
  .bluff-chip .bc-name-arc { position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%); width: var(--token-size); height: var(--token-size); pointer-events: none; z-index: 4; overflow: visible; }
  .bluff-chip .bc-icon-placeholder { width: var(--token-size); height: var(--token-size); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Cinzel Decorative', serif; font-size: 0.65rem; color: rgba(245,236,215,0.4); }
  .bluff-chip .bc-tooltip {
    position: absolute;
    top: 50%;
    left: calc(100% + 18px);
    transform: translateY(-50%) translateX(6px);
    background: linear-gradient(160deg, #130928 0%, #0c0620 100%);
    border: 1px solid rgba(201,168,76,0.65);
    color: rgba(245,236,215,0.96); font-family: 'Cormorant Garamond', serif;
    font-size: 0.92rem; line-height: 1.6; font-style: italic;
    padding: 0.85rem 1.1rem; border-radius: 4px; width: 250px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.85), 0 0 0 1px rgba(201,168,76,0.12);
    pointer-events: none; opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 3000; text-align: center;
  }
  .bluff-chip .bc-tooltip-name {
    font-family: 'Cinzel Decorative', serif; font-size: 0.78rem; letter-spacing: 0.08em;
    display: block; margin-bottom: 0.3rem; font-style: normal;
    color: var(--gold); text-shadow: 0 0 12px rgba(201,168,76,0.4);
  }
  .bluff-chip .bc-tooltip-team {
    font-size: 0.58rem; letter-spacing: 0.22em; text-transform: uppercase;
    display: block; margin-bottom: 0.4rem; font-style: normal;
    color: rgba(245,236,215,0.5);
    border-bottom: 1px solid rgba(201,168,76,0.2); padding-bottom: 0.4rem;
  }
  .bluff-chip .bc-tooltip::after {
    content: ''; position: absolute;
    top: 50%; right: 100%; transform: translateY(-50%);
    border: 7px solid transparent; border-right-color: rgba(201,168,76,0.65);
  }
  .bluff-chip:hover .bc-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  .bluff-name-label { margin-top: 12px; font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; color: rgba(245,236,215,0.75); text-align: center; font-style: italic; }

  @keyframes shimmer {
    0% { transform: translateX(-100%) skewX(-15deg); }
    100% { transform: translateX(250%) skewX(-15deg); }
  }
  @keyframes pulse-glow {
    0%,100% { box-shadow: 0 0 20px rgba(201,168,76,0.15), 0 0 40px rgba(201,168,76,0.05); }
    50% { box-shadow: 0 0 30px rgba(201,168,76,0.3), 0 0 60px rgba(201,168,76,0.12); }
  }

  .btn {
    position: relative; background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold); font-family: 'Cinzel Decorative', serif;
    font-size: 0.8rem; letter-spacing: 0.22em; padding: 1rem 2.8rem;
    cursor: pointer; overflow: hidden;
    transition: color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-transform: uppercase;
  }
  .btn::before { content: ''; position: absolute; inset: 0; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease; z-index: 0; }
  .btn::after {
    content: ''; position: absolute; top: 0; left: 0;
    width: 40%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: translateX(-100%) skewX(-15deg);
    z-index: 1;
  }
  .btn span, .btn { position: relative; }
  .btn:not(:disabled):hover { color: var(--ink); box-shadow: 0 0 30px rgba(201,168,76,0.35); }
  .btn:not(:disabled):hover::before { transform: scaleX(1); }
  .btn:not(:disabled):hover::after { animation: shimmer 0.65s ease forwards; }
  .btn:active { transform: scale(0.97); }
  .btn:not(:disabled):not(.btn-ghost) { animation: pulse-glow 3s ease-in-out infinite; }
  .btn:disabled { opacity: 0.25; cursor: not-allowed; animation: none; }
  .btn:disabled::before { display: none; }
  .btn:disabled:hover { color: var(--gold); box-shadow: none; }
  .btn-ghost {
    border-color: rgba(201,168,76,0.38); color: rgba(232,200,112,0.8);
    font-size: 0.72rem; padding: 0.75rem 1.6rem;
    animation: none !important;
  }
  .btn-ghost::before { background: rgba(201,168,76,0.35); }
  .btn-ghost:not(:disabled):hover { color: var(--ink); }
  .actions { display: flex; gap: 0.9rem; flex-wrap: wrap; justify-content: center; }

  .script-selector { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
  .script-btn {
    background: transparent; border: 1px solid rgba(201,168,76,0.22);
    color: rgba(232,200,112,0.65); font-family: 'Cinzel Decorative', serif;
    font-size: 1rem; padding: 0.65rem 1.5rem; letter-spacing: 0.14em;
    border-radius: 30px; cursor: pointer; transition: all 0.22s ease; text-transform: uppercase;
    position: relative; overflow: hidden;
  }
  .script-btn:hover { border-color: rgba(201,168,76,0.6); color: var(--gold); box-shadow: 0 0 14px rgba(201,168,76,0.15); }
  .script-btn.active { background: rgba(201,168,76,0.12); border-color: var(--gold); color: var(--gold); box-shadow: 0 0 22px rgba(201,168,76,0.22); }

  .chip-warn-icon {
    font-size: 0.85em; opacity: 0.7; margin-left: 0.35em; vertical-align: middle;
  }
  .chip-warn-icon {
    font-size: 0.85em; opacity: 0.7; margin-left: 0.35em; vertical-align: middle;
  }
  .chip-nobag-icon {
    font-size: 0.85em; opacity: 0.7; margin-left: 0.35em; vertical-align: middle;
  }
  .chip.chip-modifier { border-style: dashed; border-color: rgba(240,192,64,0.35); }
  .chip.chip-modifier.selected .chip-warn-icon { opacity: 1; color: #f0c040; }
  .chip.chip-modifier.selected {
    box-shadow: 0 0 14px rgba(240,192,64,0.35);
    border-style: dashed; border-color: #f0c040;
    background: rgba(240,192,64,0.1) !important;
  }
  .chip.chip-nobag {
    border-style: dotted; border-color: rgba(200,100,100,0.4);
    color: rgba(245,236,215,0.55);
  }
  .chip.chip-nobag:hover { border-color: rgba(200,100,100,0.7); color: rgba(245,236,215,0.9); background: rgba(200,80,80,0.06); }

  .chip-count-badge {
    display: inline-block; font-family: 'DM Sans', sans-serif; font-size: 0.75em;
    font-weight: 700; color: var(--gold); margin-left: 0.25em; vertical-align: middle;
  }
  .chip-adj-btns {
    display: inline-flex; align-items: center; gap: 0.15em;
    margin-left: 0.45em; vertical-align: middle;
  }
  .chip-adj-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    border: 1px solid rgba(201,168,76,0.5); background: rgba(201,168,76,0.1);
    color: rgba(201,168,76,0.9); font-size: 0.75em; font-family: sans-serif;
    cursor: pointer; line-height: 1; transition: all 0.15s;
    font-style: normal;
  }
  .chip-adj-btn:hover { background: rgba(201,168,76,0.3); border-color: var(--gold); color: var(--gold); }
  .warning-bar {
    width: 100%; padding: 0.8rem 1.4rem; border-radius: 3px;
    border: 1px solid rgba(240,192,64,0.65); background: rgba(140,80,0,0.25);
    color: rgba(255,225,130,1); font-size: 0.88rem; font-style: italic;
    text-align: center; letter-spacing: 0.04em; display: none;
    box-shadow: 0 0 20px rgba(200,140,20,0.25), inset 0 0 30px rgba(200,140,20,0.05);
  }
  .warning-bar.visible { display: block; }

  #refDrawer { position: fixed; top: 0; right: 0; height: 100vh; z-index: 1000; display: flex; flex-direction: row; }
  #refTab { width: 44px; background: rgba(201,168,76,0.08); border-left: 1px solid rgba(201,168,76,0.25); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s; }
  #refTab:hover { background: rgba(201,168,76,0.18); }
  #refPanel { width: 0; overflow: hidden; transition: width 0.3s ease; background: #faf6ef; border-left: 1px solid rgba(201,168,76,0.25); }
  .ref-inner-scroll { width: 1100px; height: 100vh; overflow-y: auto; padding: 1.6rem 2.6rem; box-sizing: border-box; background: #faf6ef; color: #1a1008; display: flex; flex-direction: column; }
  .ref-page-header { margin-bottom: 0.8rem; display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
  .ref-page-title { font-family: 'Source Serif 4', serif; font-size: 1.5rem; color: #1a0f2e; font-weight: 700; }
  .ref-collapse { border-bottom: 1px solid #e8e0d0; }
  .ref-collapse-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: none; cursor: pointer; padding: 0.6rem 0; font-family: 'DM Sans', sans-serif; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #5a3e1b; }
  .ref-collapse-btn:hover { color: #2a1a08; }
  .ref-collapse-caret { font-size: 0.7rem; transition: transform 0.2s; color: #9a7a4a; }
  .ref-collapse-btn.open .ref-collapse-caret { transform: rotate(180deg); }
  .ref-collapse-body { padding-bottom: 0.5rem; }
  .ref-section { margin-bottom: 0.2rem; }
  .ref-section-rule { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; margin-top: 0.7rem; }
  .ref-section-rule-label { font-family: 'DM Sans', sans-serif; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; flex-shrink: 0; }
  .ref-loyalists  .ref-section-rule-label { color: #2a5a96; }
  .ref-dissidents .ref-section-rule-label { color: #1a7a9a; }
  .ref-agents     .ref-section-rule-label { color: #7a2020; }
  .ref-tyrants  .ref-section-rule-label { color: #8a0000; }
  .ref-section-rule-line { flex: 1; height: 1px; }
  .ref-loyalists  .ref-section-rule-line { background: #2a5a96; }
  .ref-dissidents .ref-section-rule-line { background: #1a7a9a; }
  .ref-agents     .ref-section-rule-line { background: #7a2020; }
  .ref-tyrants  .ref-section-rule-line { background: #8a0000; }
  .ref-role-grid { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row; gap: 0.35rem 1.6rem; }
  .ref-entry { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.45rem 0; }
  .ref-entry-icon { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
  .ref-entry-icon.square { border-radius: 8px !important; }
  .ref-entry-text { flex: 1; min-width: 0; padding-top: 0.05rem; }
  .ref-entry-name { font-family: 'Source Serif 4', serif; font-size: 0.97rem; font-weight: 700; margin-bottom: 0.1rem; line-height: 1.2; }
  .ref-loyalists  .ref-entry-name { color: #2a5a96; }
  .ref-dissidents .ref-entry-name { color: #1a7a9a; }
  .ref-agents     .ref-entry-name { color: #7a2020; }
  .ref-tyrants  .ref-entry-name { color: #8a0000; }
  .ref-diplomats  .ref-section-rule-label { color: #1a7a50; }
  .ref-diplomats  .ref-section-rule-line  { background: #1a7a50; }
  .ref-diplomats  .ref-entry-name { color: #1a7a50; }
  .ref-entry-ability { font-family: 'Source Serif 4', serif; font-size: 0.87rem; line-height: 1.52; color: #333; }
  .ref-entry-ability .bracket-note { font-weight: 700; font-style: normal; color: #1a1008; }
  .ref-counts-section { margin-top: 0.7rem; padding-top: 0.6rem; border-top: 1px solid rgba(26,15,46,0.15); }
  .ref-counts-title { font-family: 'DM Sans', sans-serif; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #444; margin-bottom: 0.35rem; }
  .rules-section { margin-bottom: 1.1rem; }
  .rules-section-heading { font-family: 'Source Serif 4', serif; font-size: 1rem; font-weight: 700; color: #2a1a4e; margin-bottom: 0.4rem; letter-spacing: 0.01em; }
  .rules-section-body { font-family: 'Source Serif 4', serif; font-size: 0.88rem; color: rgba(26,15,46,0.82); line-height: 1.65; }
  .rules-section-body p { margin-bottom: 0.55rem; }
  .rules-section-body p:last-child { margin-bottom: 0; }
  .rules-section ol { margin: 0.3rem 0 0 1.2rem; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
  .rules-section ol li { font-family: 'Source Serif 4', serif; font-size: 0.88rem; color: rgba(26,15,46,0.82); line-height: 1.6; }
  .rules-section ol li::marker { font-weight: 700; color: #2a1a4e; }
  .rules-placeholder { font-family: 'Cormorant Garamond', serif; font-size: 0.88rem; font-style: italic; color: rgba(26,15,46,0.38); padding: 0.6rem 0; }
  .ref-counts-table { border-collapse: collapse; font-family: 'Source Serif 4', serif; font-size: 0.88rem; width: auto; }
  .ref-counts-table th, .ref-counts-table td { padding: 0.25rem 0.65rem; text-align: center; border: 1px solid rgba(26,15,46,0.12); }
  .ref-counts-table th { font-family: 'DM Sans', sans-serif; font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(26,15,46,0.04); color: rgba(26,15,46,0.7); }
  .ref-counts-table td:first-child { font-weight: 600; color: rgba(26,15,46,0.75); }
  .ref-count-l { color: #2a5a96; font-weight: 600; } .ref-count-d { color: #1a7a9a; font-weight: 600; }
  .ref-count-a { color: #7a2020; font-weight: 600; } .ref-count-di { color: #8a0000; font-weight: 600; }
  .deck-order-header { margin-bottom: 1rem; }
  .deck-order-rule { display: flex; align-items: center; gap: 0.8rem; margin: 0.5rem 0 1rem; }
  .deck-order-rule-line { flex: 1; height: 1px; background: #ccc; }
  .deck-order-rule-text { font-family: 'DM Sans', sans-serif; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: #777; white-space: nowrap; }
  .order-entry { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(26,15,46,0.07); }
  .order-entry:last-child { border-bottom: none; }
  .order-entry-icon-wrap { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
  .order-entry-icon { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
  .order-entry-icon.square { border-radius: 8px !important; }
  .order-entry-icon-placeholder { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
  .order-entry-text { flex: 1; min-width: 0; }
  .order-entry-name { font-family: 'Source Serif 4', serif; font-size: 1.05rem; font-weight: 700; line-height: 1.2; margin-bottom: 0.15rem; }
  .order-name-loyalist { color: #2a5a96; } .order-name-dissident { color: #1a7a9a; }
  .order-name-agent { color: #7a2020; } .order-name-tyrant { color: #8a0000; }
  .order-name-system { color: #1a0f2e; }
  .order-entry-instruction { font-family: 'Source Serif 4', serif; font-size: 0.92rem; line-height: 1.5; color: #333; }
  .order-entry-instruction strong { font-family: 'DM Sans', sans-serif; font-weight: 700; text-transform: uppercase; font-size: 1rem; letter-spacing: 0.04em; }

  .reveal-overlay {
    position: absolute; inset: 0; border-radius: 50%; z-index: 50;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 42% 38%, #1e1040 0%, #0c0820 60%, #060412 100%);
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1), opacity 0.35s ease;
    transform-style: preserve-3d; will-change: transform, opacity;
  }
  .reveal-overlay::after {
    content: '✦'; font-size: 2.5rem;
    color: rgba(201,168,76,0.45);
    text-shadow: 0 0 24px rgba(201,168,76,0.3);
    font-family: serif;
  }
  .reveal-overlay:hover::after { color: rgba(201,168,76,0.75); text-shadow: 0 0 32px rgba(201,168,76,0.5); }
  .reveal-overlay:hover { filter: brightness(1.15); }

  .role-card:has(.reveal-overlay) {
    box-shadow: 0 0 0 8px rgba(38,28,58,0.95), 0 0 0 9px rgba(20,15,35,0.4), 0 8px 30px rgba(0,0,0,0.75) !important;
  }
  .role-card:has(.reveal-overlay) .deck-order-badge { display: none; }
  .reveal-overlay.flipping {
    transform: rotateY(90deg) scale(0.92);
    opacity: 0; pointer-events: none;
  }

  .reveal-bar {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(8,4,18,0.97);
    border-top: 1px solid rgba(201,168,76,0.35);
    padding: 0.75rem 1.6rem;
    z-index: 800;
    align-items: center; justify-content: space-between; gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.7);
  }
  .reveal-bar.active { display: flex; }
  .reveal-bar-left { display: flex; align-items: center; gap: 1.2rem; }
  .reveal-bar-title {
    font-family: 'Cinzel Decorative', serif; font-size: 0.6rem;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: rgba(201,168,76,0.9);
  }
  .reveal-bar-hint {
    font-family: 'Cormorant Garamond', serif; font-size: 0.9rem;
    color: rgba(245,236,215,0.62); font-style: italic;
  }
  .reveal-progress {
    font-family: 'Cormorant Garamond', serif; font-size: 1.05rem;
    color: rgba(245,236,215,0.78); letter-spacing: 0.06em;
    min-width: 90px; text-align: center;
  }
  .reveal-progress .rp-done { color: var(--gold); font-weight: 600; }
  .reveal-bar-actions { display: flex; gap: 0.6rem; align-items: center; }
  .reveal-action-btn {
    background: transparent; border: 1px solid rgba(201,168,76,0.4);
    color: rgba(201,168,76,0.9); font-family: 'Cinzel Decorative', serif;
    font-size: 0.5rem; letter-spacing: 0.15em; text-transform: uppercase;
    padding: 0.45rem 1rem; cursor: pointer; border-radius: 2px;
    transition: all 0.2s ease;
  }
  .reveal-action-btn:hover { background: rgba(201,168,76,0.12); color: var(--gold); border-color: var(--gold); }
  .reveal-action-btn.danger { border-color: rgba(238,119,119,0.55); color: rgba(238,119,119,0.85); }
  .reveal-action-btn.danger:hover { background: rgba(200,50,50,0.12); color: #ee9999; border-color: rgba(238,119,119,0.6); }

  .seat-adj-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(201,168,76,0.3);
    color: rgba(232,200,112,0.7);
    font-size: 1.25rem; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
    font-family: sans-serif;
  }
  .seat-adj-btn:hover {
    border-color: rgba(201,168,76,0.7);
    color: var(--gold);
    background: rgba(201,168,76,0.1);
    box-shadow: 0 0 12px rgba(201,168,76,0.2);
  }

  /* ── Policy Deck ── */
  .policy-deck-panel { perspective: 1000px; }

  .policy-track {
    width: 100%; display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center;
    margin-bottom: 0.4rem;
  }
  .policy-pip {
    width: 28px; height: 36px; border-radius: 3px; border: 1px solid;
    transition: all 0.35s ease; position: relative; overflow: hidden;
  }
  .policy-pip.liberal-enacted { background: rgba(58,111,168,0.35); border-color: #3a6fa8; box-shadow: 0 0 8px rgba(58,111,168,0.3); }
  .policy-pip.fascist-enacted  { background: rgba(180,30,30,0.35);  border-color: #c02020; box-shadow: 0 0 8px rgba(180,30,30,0.35); }
  .policy-pip.empty { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
  .policy-pip-label {
    position: absolute; bottom: 2px; left: 0; right: 0;
    font-family: 'Cinzel Decorative', serif; font-size: 0.5rem; letter-spacing: 0.08em;
    text-align: center; text-transform: uppercase;
  }
  .policy-pip.liberal-enacted .policy-pip-label { color: #9ac4f0; }
  .policy-pip.fascist-enacted  .policy-pip-label { color: #ee9999; }

  .policy-track-section { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
  .policy-track-title { font-family: 'Cinzel Decorative', serif; font-size: 0.55rem; letter-spacing: 0.2em; text-transform: uppercase; }
  .policy-track-title.loy { color: #7ab8e8; }
  .policy-track-title.fas { color: #ee7777; }

  .policy-piles {
    display: flex; gap: 2rem; justify-content: center; align-items: flex-end; margin: 0.6rem 0;
    flex-wrap: wrap;
  }
  .policy-pile { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
  .policy-pile-label {
    font-family: 'Cinzel Decorative', serif; font-size: 0.58rem; letter-spacing: 0.18em;
    text-transform: uppercase; color: rgba(245,236,215,0.55);
  }
  .policy-pile-count {
    font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 600;
    color: rgba(245,236,215,0.9); line-height: 1;
    text-shadow: 0 0 20px rgba(201,168,76,0.2);
    min-width: 2ch; text-align: center;
  }
  .policy-pile-stack {
    width: 52px; height: 68px; position: relative; cursor: default;
  }
  .policy-pile-card {
    position: absolute; width: 48px; height: 64px; border-radius: 4px;
    background: linear-gradient(145deg, #1e1040 0%, #100820 100%);
    border: 1px solid rgba(201,168,76,0.3);
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
  }
  .policy-pile-card:nth-child(1) { bottom: 0; left: 0; transform: rotate(-2deg); }
  .policy-pile-card:nth-child(2) { bottom: 3px; left: 1px; transform: rotate(0.5deg); }
  .policy-pile-card:nth-child(3) { bottom: 6px; left: 2px; transform: rotate(1.5deg); }
  .policy-pile-card::after { content: '✦'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 1.2rem; color: rgba(201,168,76,0.2); }

  .policy-draw-area {
    display: flex; gap: 0.9rem; justify-content: center; align-items: flex-end;
    min-height: 110px; flex-wrap: wrap; margin: 0.5rem 0;
  }

  /* The card itself */
  .pol-card {
    width: 80px; height: 110px; border-radius: 8px;
    position: relative; cursor: pointer; flex-shrink: 0;
    transition: transform 0.2s ease, opacity 0.3s ease, box-shadow 0.2s ease;
  }
  .pol-card.enacted-anim { transform: translateY(-20px) scale(1.1); opacity: 0; transition: all 0.4s ease; }
  .pol-card:not([data-state="discarded"]):hover { transform: translateY(-6px); box-shadow: 0 8px 28px rgba(201,168,76,0.35); }
  .pol-card[data-state="discarded"] { opacity: 0.2; cursor: default; transform: scale(0.92); }
  .pol-card[data-state="discarded"]:hover { transform: scale(0.92) !important; box-shadow: none !important; }

  .pol-card-face {
    position: absolute; inset: 0; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 0.35rem;
  }
  .pol-card-face.liberal {
    background: linear-gradient(160deg, #1c4080 0%, #0d2050 100%);
    border: 2px solid #5a9fe0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8), 0 0 20px rgba(58,111,168,0.4);
  }
  .pol-card-face.fascist {
    background: linear-gradient(160deg, #6e1010 0%, #380606 100%);
    border: 2px solid #e03030;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8), 0 0 20px rgba(200,30,30,0.5);
  }
  .pol-card-icon { font-size: 2.2rem; line-height: 1; }
  .pol-card-face.liberal .pol-card-icon { filter: drop-shadow(0 0 8px rgba(100,160,255,0.8)); }
  .pol-card-face.fascist  .pol-card-icon { filter: drop-shadow(0 0 8px rgba(255,60,60,0.8)); }
  .pol-card-type {
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.5rem;
    letter-spacing: 0.12em; text-transform: uppercase; text-align: center;
    line-height: 1.3; padding: 0 6px; font-weight: 700;
  }
  .pol-card-face.liberal .pol-card-type { color: #c8e4ff; text-shadow: 0 0 10px rgba(100,160,255,0.6); }
  .pol-card-face.fascist  .pol-card-type { color: #ffcccc; text-shadow: 0 0 10px rgba(255,80,80,0.6); }

  .pol-card-hint {
    font-family: 'Cormorant Garamond', serif; font-size: 0.72rem; font-style: italic;
    color: rgba(245,236,215,0.45); text-align: center; margin-top: 0.2rem;
    min-height: 1.1em;
  }

  .policy-phase-label {
    font-family: 'Cinzel Decorative', serif; font-size: 0.75rem; letter-spacing: 0.22em;
    text-transform: uppercase; color: rgba(232,200,112,0.8);
    text-align: center; min-height: 1.4em;
  }
  .policy-divider { width: 100%; height: 1px; background: linear-gradient(to right, transparent, rgba(201,168,76,0.15), transparent); }

  @keyframes pol-reshuffle {
    0%   { transform: rotate(0deg) scale(1); opacity: 1; }
    40%  { transform: rotate(8deg) scale(0.9); opacity: 0.6; }
    70%  { transform: rotate(-4deg) scale(1.05); opacity: 0.8; }
    100% { transform: rotate(0deg) scale(1); opacity: 1; }
  }
  .pol-reshuffle-anim { animation: pol-reshuffle 0.6s ease forwards; }

  /* Keep drawn cards on one row in the right-column policy deck */
  #policyDeckPanel .policy-draw-area { flex-wrap: nowrap; overflow-x: auto; }
  #policyDeckPanel .policy-track { flex-wrap: nowrap; overflow-x: auto; }

  @keyframes pol-card-in {
    from { opacity: 0; transform: translateY(-20px) scale(0.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  .pol-card-entering { animation: pol-card-in 0.35s ease forwards; }
</style>