/* Curtain Call - Shadow Puppet Theater Game
   Mobile-first layout for 375x812 viewport */

/* === Base Layout === */

/* Override parent container padding for full-height game */
.container:has(.curtain-call) {
    padding: 0;
}

.curtain-call {
    width: 100%;
    height: 100vh;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;

    /* Background provided by SVG layer */
    background: #1A1410;
}

.back-link {
    position: absolute;
    top: 8px;
    left: 12px;
    color: #3D2B1F;
    text-decoration: none;
    font-size: 14px;
    z-index: 100;
    opacity: 0.7;
}

.back-link:hover {
    opacity: 1;
}

/* === SVG Stage Background === */
.stage-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* === Curtain Layer === */
.curtain-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 40;
}

.curtain-left,
.curtain-right {
    position: absolute;
    top: 0;
    width: 200px;
    height: 53%;  /* Matches bright stage proportion (430/812) */
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.curtain-left {
    left: 0;
    transform: translateX(-182px);
}

.curtain-right {
    right: 0;
    transform: translateX(182px);
}

/* Curtain closed state */
.curtain-call.curtain-closing .curtain-left,
.curtain-call.curtain-closed .curtain-left {
    transform: translateX(0px);
}

.curtain-call.curtain-closing .curtain-right,
.curtain-call.curtain-closed .curtain-right {
    transform: translateX(0px);
}

/* Curtain opening state */
.curtain-call.curtain-opening .curtain-left {
    transform: translateX(-182px);
}

.curtain-call.curtain-opening .curtain-right {
    transform: translateX(182px);
}

.curtain-valance {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    pointer-events: none;
    z-index: 41;
}

/* === Title Screen (Milestone 16) === */
.title-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 110;
    background: radial-gradient(ellipse at 50% 40%, rgba(60, 40, 20, 0.6) 0%, rgba(20, 16, 12, 0.95) 70%);
}

.title-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.title-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.title-presents {
    font-family: 'IM Fell English', serif;
    font-style: italic;
    font-size: 14px;
    color: #A08060;
    letter-spacing: 2px;
}

.title-name {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 700;
    color: #F4E4C1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 160, 85, 0.3);
    margin: 0;
    letter-spacing: 2px;
}

.title-subtitle {
    font-family: 'IM Fell English', serif;
    font-size: 16px;
    color: #D4A055;
    letter-spacing: 1px;
}

.title-btn {
    background: linear-gradient(to bottom, #5A4030, #3A2818);
    color: #F4E4C1;
    border: 2px solid #D4A030;
    border-radius: 10px;
    padding: 14px 36px;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    letter-spacing: 1px;
}

.title-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.title-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* === Character Select Screen (Milestone 16) === */
.character-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 110;
    background: radial-gradient(ellipse at 50% 40%, rgba(60, 40, 20, 0.6) 0%, rgba(20, 16, 12, 0.95) 70%);
}

.character-select-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 16px;
    max-height: 100vh;
}

.cs-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: #F5B041;
    margin: 0;
    letter-spacing: 1px;
}

.cs-protagonists {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.cs-card {
    background: rgba(244, 228, 193, 0.1);
    border: 2px solid #8B7030;
    border-radius: 12px;
    padding: 14px 10px;
    width: 155px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.cs-card.selected {
    border-color: #D4A030;
    box-shadow: 0 0 12px rgba(212, 160, 48, 0.4);
}

.cs-card:not(.selected) {
    opacity: 0.5;
}

.cs-card.cs-card-shake {
    animation: cs-shake 0.4s ease;
}

@keyframes cs-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}

.cs-puppet {
    width: 80px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-puppet svg {
    width: 100%;
    height: 100%;
}

.cs-name {
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    font-weight: 600;
    color: #F4E4C1;
}

.cs-desc {
    font-family: 'IM Fell English', serif;
    font-size: 11px;
    color: #A08060;
    line-height: 1.3;
}

.cs-attacks {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    width: 100%;
}

.cs-attack-label {
    font-family: 'Playfair Display', serif;
    font-size: 10px;
    color: #A08060;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cs-attack-option {
    font-family: 'IM Fell English', serif;
    font-size: 11px;
    color: #F4E4C1;
    background: rgba(139, 112, 48, 0.2);
    border: 1px solid #6B5A40;
    border-radius: 10px;
    padding: 4px 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.cs-attack-option.selected {
    border-color: #D4A030;
    background: rgba(212, 160, 48, 0.25);
    color: #F5D060;
}

/* === Game UI Hidden State === */
.curtain-call.game-ui-hidden .enemy-area,
.curtain-call.game-ui-hidden .stage-area,
.curtain-call.game-ui-hidden .hand-area,
.curtain-call.game-ui-hidden .stage-edge,
.curtain-call.game-ui-hidden .controls-area,
.curtain-call.game-ui-hidden .progress-indicator {
    visibility: hidden;
}

/* === Color Variables === */
:root {
    --silhouette-color: #1A1A2E;
    --puppet-stick-color: #3D2B1F;
    --parchment-light: #F4E4C1;
    --parchment-mid: #E8D4A8;
    --parchment-dark: #D4A055;
    --hp-red: #C0392B;
    --hp-red-low: #E74C3C;
    --hp-green: #4CAF50;
    --hp-depleted: #555;
    --block-blue: #3498DB;
    --energy-gold: #F1C40F;
    --card-bg: #FAF0DB;
    --attack-red: #E74C3C;
    --defense-blue: #3498DB;
    --buff-gold: #F5B041;
    --debuff-purple: #8E44AD;
}

/* === Enemy Area === */
.enemy-area {
    flex: 0 1 20%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px;
    position: relative;
    z-index: 42;
}

.enemy-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.enemy-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.enemy-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 48px;
}

.enemy-sidebar-left {
    align-items: flex-end;
}

.enemy-sidebar-right {
    align-items: flex-end;
}

.enemy-intent {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 14px;
    transition: background 0.2s ease, border-color 0.2s ease;
    border: 2px solid;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.enemy-intent.intent-attack {
    background: rgba(30, 20, 20, 0.85);
    border-color: var(--attack-red);
}

.enemy-intent.intent-block {
    background: rgba(20, 30, 40, 0.85);
    border-color: var(--defense-blue);
}

.enemy-intent.intent-heal {
    background: rgba(20, 35, 20, 0.85);
    border-color: var(--hp-green);
}

.enemy-intent.intent-buff {
    background: rgba(40, 35, 20, 0.85);
    border-color: var(--buff-gold);
}

.enemy-intent.intent-debuff {
    background: rgba(35, 20, 40, 0.85);
    border-color: var(--debuff-purple);
}

.intent-icon {
    width: 20px;
    height: 20px;
    transition: filter 0.2s ease;
}

/* Apply color tints to SVG icons via CSS filter */
.enemy-intent.intent-attack .intent-icon {
    filter: brightness(0) saturate(100%) invert(39%) sepia(83%) saturate(2251%) hue-rotate(336deg) brightness(99%) contrast(83%);
}

.enemy-intent.intent-block .intent-icon {
    filter: brightness(0) saturate(100%) invert(51%) sepia(96%) saturate(407%) hue-rotate(165deg) brightness(93%) contrast(88%);
}

.enemy-intent.intent-heal .intent-icon {
    filter: brightness(0) saturate(100%) invert(67%) sepia(69%) saturate(404%) hue-rotate(82deg) brightness(92%) contrast(87%);
}

.enemy-intent.intent-buff .intent-icon {
    filter: brightness(0) saturate(100%) invert(75%) sepia(69%) saturate(487%) hue-rotate(3deg) brightness(103%) contrast(91%);
}

.enemy-intent.intent-debuff .intent-icon {
    filter: brightness(0) saturate(100%) invert(33%) sepia(67%) saturate(1152%) hue-rotate(250deg) brightness(85%) contrast(95%);
}

.intent-value {
    font-size: 16px;
    font-weight: bold;
    transition: color 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.intent-value.intent-attack {
    color: #FF6B5B;
}

.intent-value.intent-block {
    color: #5DADE2;
}

.intent-value.intent-heal {
    color: #6FCF7F;
}

.intent-value.intent-buff {
    color: #F9D56E;
}

.intent-value.intent-debuff {
    color: #BB8FCE;
}

.enemy-puppet {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.enemy-hp-bar {
    width: 90px;
    height: 14px;
    background: #1A1A1A;
    border-radius: 7px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    border: 2px solid #C0392B;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.enemy-hp-bar .hp-fill {
    height: 100%;
    background: linear-gradient(to bottom, #E74C3C 0%, #C0392B 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.enemy-hp-bar .hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px black;
}

/* === Stage Area === */
.stage-area {
    flex: 0 1 24%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 10px;
    position: relative;
    z-index: 1;
}

.hero-puppet {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.macguffin {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* MacGuffin HP — amber/gold to signal permanent per-run resource */
.macguffin-hp-bar {
    width: 70px;
    height: 14px;
    background: #1A1A1A;
    border-radius: 7px;
    margin-top: 6px;
    position: relative;
    overflow: hidden;
    border: 2px solid #D4A030;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 0 6px rgba(212, 160, 48, 0.2);
}

.macguffin-hp-bar .hp-fill {
    height: 100%;
    background: linear-gradient(to bottom, #F5D060 0%, #D4A030 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.macguffin-hp-bar .hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px black;
}

/* Protagonist HP bars — blue tint, per-combat resource */
.hero-hp-bar {
    width: 60px;
    height: 12px;
    background: #1A1A1A;
    border-radius: 6px;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
    border: 2px solid #5DADE2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-hp-bar .hp-fill {
    height: 100%;
    background: linear-gradient(to bottom, #85C1E9 0%, #5DADE2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.hero-hp-bar .hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9px;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px black;
}

/* Knockout state */
/* Protagonist Shield indicator (Milestone 18) */
.hero-shield {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: rgba(20, 40, 60, 0.9);
    padding: 2px 6px;
    border-radius: 8px;
    margin-top: 3px;
    border: 1.5px solid #5DADE2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero-shield .shield-icon {
    font-size: 10px;
    color: #5DADE2;
}

.hero-shield .shield-value {
    font-size: 10px;
    font-weight: bold;
    color: #5DADE2;
    text-shadow: 0 1px 2px black;
}

/* Protagonist Taunt indicator (Milestone 18) */
.hero-taunt {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: rgba(60, 30, 20, 0.9);
    padding: 2px 6px;
    border-radius: 8px;
    margin-top: 2px;
    border: 1.5px solid #E67E22;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero-taunt .taunt-icon {
    font-size: 10px;
    color: #E67E22;
}

.hero-taunt .taunt-value {
    font-size: 10px;
    font-weight: bold;
    color: #E67E22;
    text-shadow: 0 1px 2px black;
}

.hero-puppet.knocked-out {
    opacity: 0.35;
    filter: grayscale(0.7);
    transition: opacity 0.5s ease, filter 0.5s ease;
}

.hero-puppet.knocked-out .hero-hp-bar {
    border-color: #7B2D26;
}

.hero-puppet.knocked-out .hero-hp-bar .hp-fill {
    background: linear-gradient(to bottom, #C0392B 0%, #7B2D26 100%);
}

.hero-puppet .ko-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
    color: #E74C3C;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.6);
    letter-spacing: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.hero-puppet.knocked-out .ko-badge {
    opacity: 1;
}

/* === Status Effects Display (Milestone 13-15) === */
.status-effects {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 4px;
    flex-wrap: wrap;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
}

.status-icon .status-emoji {
    font-size: 11px;
    line-height: 1;
}

.status-icon .status-value {
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
    color: #FFF8E7;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
}

.status-icon.buff {
    background: rgba(245, 176, 65, 0.3);
    color: var(--buff-gold);
    border: 1px solid var(--buff-gold);
}

.status-icon.debuff {
    background: rgba(142, 68, 173, 0.3);
    color: var(--debuff-purple);
    border: 1px solid var(--debuff-purple);
}

.enemy-status {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-start;
}

/* Keyword tags on cards */
.card-keywords {
    display: flex;
    gap: 2px;
    margin-top: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.keyword-tag {
    font-size: 6px;
    padding: 1px 4px;
    border-radius: 4px;
    background: var(--buff-gold);
    color: var(--silhouette-color);
    text-transform: uppercase;
    font-weight: bold;
}

/* MacGuffin Block Indicator (Milestone 3) */
.macguffin-block {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(20, 40, 60, 0.9);
    padding: 4px 10px;
    border-radius: 12px;
    margin-top: 6px;
    border: 2px solid #5DADE2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.macguffin-block .block-icon {
    font-size: 14px;
    color: #5DADE2;
    text-shadow: 0 0 4px rgba(93, 173, 226, 0.5);
}

.macguffin-block .block-value {
    font-size: 14px;
    font-weight: bold;
    color: #5DADE2;
    text-shadow: 0 1px 2px black;
}

/* === SVG Puppet Silhouettes === */
.puppet-svg {
    display: block;
}

/* Enemy SVG - LARGER with more presence */
.enemy-svg {
    width: 100px;
    height: 160px;
}

/* Hero SVGs - LARGER on stage */
.hero-svg {
    width: 75px;
    height: 120px;
}

/* MacGuffin SVG - viewBox 120x120 */
.macguffin-svg {
    width: 50px;
    height: 50px;
}

/* === Hand Area === */
.hand-area {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 46px 8px 2px 8px;
    overflow: hidden;
    z-index: 1;
}

.hand-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 0;
    max-width: 350px;
    overflow: hidden;
    touch-action: none;
}

/* Each column is a vertical stack; cards within a column flow top-to-bottom */
.hand-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* When 7+ cards per column, overlap vertically */
.hand-column.overlap .game-card {
    margin-bottom: -35px;
}

.hand-column.overlap .game-card:last-child {
    margin-bottom: 0;
}

/* === Card Styling - Simplified Ticket Style === */

/* Base card container - ticket aspect ratio ~2.4:1 */
.game-card {
    width: 165px;
    height: 70px;
    position: relative;
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    background: #F5E6C8;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    isolation: isolate;
}

.game-card:active {
    transform: scale(0.98);
}

.game-card.selected {
    box-shadow: 0 0 0 2px #F1C40F, 0 4px 12px rgba(0, 0, 0, 0.4);
}

.game-card.unplayable {
    opacity: 0.5;
}

.game-card.ko-unplayable {
    opacity: 0.35;
    filter: grayscale(0.5);
    pointer-events: none;
}

.game-card.playing {
    animation: card-play 0.3s ease-out forwards;
    pointer-events: none;
}

@keyframes card-play {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: translateY(-30px) scale(1.05); opacity: 0.7; }
    100% { transform: translateY(-50px) scale(0.9); opacity: 0; }
}

/* Rarity borders - absolute positioned */
.card__rarity-top,
.card__rarity-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
}

.card__rarity-top {
    top: 0;
}

.card__rarity-bottom {
    bottom: 0;
}

.rarity-common .card__rarity-top,
.rarity-common .card__rarity-bottom {
    background: #5A4A3A;
}

.rarity-uncommon .card__rarity-top,
.rarity-uncommon .card__rarity-bottom {
    background: linear-gradient(to right, #3A2A18, #8B6914, #3A2A18);
}

.rarity-rare .card__rarity-top,
.rarity-rare .card__rarity-bottom {
    background: linear-gradient(to right, #708090, #C0C8D0, #708090);
}

.rarity-legendary .card__rarity-top,
.rarity-legendary .card__rarity-bottom {
    background: linear-gradient(to right, #8B6914, #F5D060, #8B6914);
}

/* Card content - fills the card */
.card__content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

/* Stub with energy - fills full height */
.card__stub {
    width: 24px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 6px;
    background: rgba(180, 160, 120, 0.5);
    border-right: 1px dashed #A08060;
}

.card__energy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.energy-blip {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.energy-blip--aldric {
    background: radial-gradient(circle at 35% 35%, #FFE0A0, #F5B041, #C07820);
    border: 1px solid #8B6914;
}

.energy-blip--pip {
    background: radial-gradient(circle at 35% 35%, #FFB0A0, #E06050, #A03020);
    border: 1px solid #802018;
}

.energy-blip--neutral,
.energy-blip--macguffin {
    background: radial-gradient(circle at 35% 35%, #D0D0C0, #B0B0A0, #909080);
    border: 1px solid #707060;
}

.card__perforation {
    display: none;
}

/* Card body - vertical layout */
.card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5px 6px 4px 6px;
    min-width: 0;
    gap: 1px;
}

.card__presenting {
    display: none;
}

/* Card name - at top, smaller */
.card__name {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 10px;
    color: #3D2B1F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.card__rule {
    display: none;
}

/* Description - show in small view */
.card__description {
    font-family: 'IM Fell English', serif;
    font-size: 9px;
    color: #4A3520;
    line-height: 1.2;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Type badge - smaller, at bottom */
.card__type-badge {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 6px;
    letter-spacing: 0.5px;
    padding: 1px 4px;
    border-radius: 2px;
    color: #F5E6C8;
    white-space: nowrap;
    margin-top: auto;
}

.card__type-badge.type-attack {
    background: #6B2020;
}

.card__type-badge.type-defense {
    background: #1A3A5A;
}

.card__type-badge.type-action {
    background: #3A2050;
}

.card__type-badge.type-enchantment {
    background: linear-gradient(135deg, #2A4040, #1A5050);
    border: 1px solid #4A8888;
}

/* Aldric edge */
.card-aldric .card__edge {
    width: 12px;
    flex-shrink: 0;
    background: linear-gradient(to bottom, #6B7080, #8890A0, #6B7080);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
}

.card__rivet {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #A0A8B8;
    border: 1px solid #505868;
}

.card__rivet::after {
    display: none;
}

/* Pip torn edge */
.card-pip {
    clip-path: polygon(
        0% 0%, 94% 0%, 95% 6%, 93% 12%, 95% 18%, 93% 24%,
        95% 30%, 93% 36%, 95% 42%, 93% 48%, 95% 54%,
        93% 60%, 95% 66%, 93% 72%, 95% 78%, 93% 84%,
        95% 90%, 94% 100%, 0% 100%
    );
}

.card-neutral .card__body {
    padding-right: 8px;
}

/* === Enchantment Strip (in right enemy sidebar) === */
.enchantment-strip {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.enchantment-token {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-family: 'IM Fell English', serif;
    font-size: 10px;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.15s;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.enchantment-token:active {
    opacity: 1;
    transform: scale(1.15);
}

.enchantment-token.card-aldric {
    background: linear-gradient(135deg, #3A4050, #4A5060);
    color: #C0C8D8;
    border-color: #6B7080;
}

.enchantment-token.card-pip {
    background: linear-gradient(135deg, #2A3A20, #3A4A30);
    color: #B0C8A0;
    border-color: #5A7050;
}

.enchantment-token.card-neutral {
    background: linear-gradient(135deg, #3A3020, #4A4030);
    color: #D4C8A0;
    border-color: #7A6840;
}

.enchantment-token__icon {
    font-size: 12px;
}

.enchantment-token__name {
    display: none;
}

/* === Stage Edge (divider between cards and audience) === */
.stage-edge {
    flex: 0 0 auto;
    height: 18px;
    background: linear-gradient(to bottom,
        #8B7355 0%,
        #A08060 20%,
        #C4A060 50%,
        #A08060 80%,
        #6B5344 100%
    );
    border-top: 2px solid #D4B896;
    border-bottom: 2px solid #4A3828;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

/* Stage lip highlight */
.stage-edge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 100%
    );
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
}

/* === Controls Area (Audience Floor) === */
.controls-area {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 8px;
    min-height: 70px;
    z-index: 1;
}

/* Audience strip - container for absolutely positioned members */
.audience-strip {
    position: relative;
    height: 90px;
    width: 240px;
}

/* Audience member - SVG-based silhouettes */
.audience-member {
    position: absolute;
    /* X and Y set via CSS variables from JS */
    left: var(--pos-x, 0px);
    bottom: var(--pos-y, 0px);
    transform-origin: bottom center;
}

.audience-member .audience-svg {
    width: 32px;
    height: 45px;
    display: block;
}

/* Children are smaller */
.audience-member.child .audience-svg {
    width: 24px;
    height: 34px;
}

/* Back row members are slightly smaller (perspective) */
.audience-member.row-5 .audience-svg {
    width: 26px;
    height: 36px;
}

.audience-member.row-4 .audience-svg {
    width: 28px;
    height: 40px;
}

/* Front row members are slightly larger */
.audience-member.row-1 .audience-svg {
    width: 36px;
    height: 50px;
}

/* === Audience Bob Animations === */

/* Single bob - dignified nod */
@keyframes audience-bob-1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.audience-member.audience-bob-1 {
    animation: audience-bob-1 0.3s ease-in-out;
}

/* Double bob - polite acknowledgment */
@keyframes audience-bob-2 {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-4px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-4px); }
}

.audience-member.audience-bob-2 {
    animation: audience-bob-2 0.5s ease-in-out;
}

/* Triple bob - enthusiastic */
@keyframes audience-bob-3 {
    0%, 100% { transform: translateY(0); }
    16% { transform: translateY(-5px); }
    33% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    66% { transform: translateY(0); }
    83% { transform: translateY(-5px); }
}

.audience-member.audience-bob-3 {
    animation: audience-bob-3 0.7s ease-in-out;
}

/* Quad bob - very excited / headbanger */
@keyframes audience-bob-4 {
    0%, 100% { transform: translateY(0); }
    12% { transform: translateY(-6px); }
    25% { transform: translateY(0); }
    37% { transform: translateY(-6px); }
    50% { transform: translateY(0); }
    62% { transform: translateY(-6px); }
    75% { transform: translateY(0); }
    87% { transform: translateY(-6px); }
}

.audience-member.audience-bob-4 {
    animation: audience-bob-4 0.9s ease-in-out;
}

/* Kids bob even more excitedly (5 bobs) */
@keyframes audience-bob-5 {
    0%, 100% { transform: translateY(0); }
    10% { transform: translateY(-7px); }
    20% { transform: translateY(0); }
    30% { transform: translateY(-7px); }
    40% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
    60% { transform: translateY(0); }
    70% { transform: translateY(-7px); }
    80% { transform: translateY(0); }
    90% { transform: translateY(-7px); }
}

.audience-member.child.audience-bob-4,
.audience-member.child.audience-bob-3 {
    animation: audience-bob-5 1.0s ease-in-out;
}

/* Controls right section - stacked vertically */
.controls-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.energy-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 25, 15, 0.9);
    padding: 6px 14px;
    border-radius: 14px;
    border: 2px solid #F4D03F;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.energy-icon {
    font-size: 18px;
    color: #F9E079;
    text-shadow: 0 0 6px rgba(244, 208, 63, 0.6);
}

.energy-value {
    font-size: 20px;
    font-weight: bold;
    color: #F9E079;
    text-shadow: 0 1px 2px black;
}

.end-turn-btn {
    background: linear-gradient(to bottom, #4A3828, #3A2818);
    color: var(--parchment-light);
    border: 2px solid #8B7030;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.end-turn-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
}

.end-turn-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* === Scene Selection & Progress (Milestone 11) === */

.progress-indicator {
    position: absolute;
    top: 8px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 5;
}

.progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(26, 26, 46, 0.3);
    border: 2px solid var(--silhouette-color);
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: var(--energy-gold);
    border-color: var(--energy-gold);
}

.progress-dot.complete {
    background: var(--hp-green);
    border-color: var(--hp-green);
}

.progress-dot.boss {
    width: 14px;
    height: 14px;
}

.scene-select-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 100px;
    background: rgba(26, 26, 46, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fade-in 0.3s ease-out;
}

.scene-select-content {
    text-align: center;
    color: var(--parchment-light);
    padding: 20px;
}

.scene-title {
    font-size: 24px;
    margin: 0 0 8px 0;
    color: var(--energy-gold);
}

.scene-subtitle {
    font-size: 14px;
    margin: 0 0 24px 0;
    opacity: 0.8;
}

.enemy-choices {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.enemy-choice {
    background: var(--parchment-light);
    border-radius: 12px;
    padding: 16px;
    width: 140px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    color: var(--silhouette-color);
}

.enemy-choice:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.enemy-choice:active {
    transform: translateY(-2px);
}

.enemy-choice-silhouette {
    width: 60px;
    height: 80px;
    margin: 0 auto 12px;
    background: var(--silhouette-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enemy-choice-silhouette img {
    width: 50px;
    height: 70px;
    filter: brightness(0) invert(1);
}

.enemy-choice-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
}

.enemy-choice-hp {
    font-size: 12px;
    color: var(--hp-red);
    margin-bottom: 6px;
}

.enemy-choice-gimmick {
    font-size: 10px;
    opacity: 0.7;
    font-style: italic;
}

/* === Card Rewards Screen (Milestone 10) === */

.rewards-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 100px;
    background: rgba(26, 26, 46, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rewards-content {
    background: var(--parchment-light);
    border-radius: 12px;
    padding: 20px 16px;
    max-width: 95%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
}

.rewards-title {
    font-size: 20px;
    color: var(--silhouette-color);
    margin: 0;
    text-align: center;
}

.rewards-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

/* Reward cards - show full details */
.reward-card.game-card {
    width: 280px;
    max-width: 85vw;
    height: 140px;
    flex-direction: row;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.reward-card.game-card:hover {
    transform: translateY(-4px);
}

.reward-card.game-card.selected {
    transform: translateY(-6px);
    box-shadow: 0 0 0 3px #F1C40F, 0 8px 20px rgba(0, 0, 0, 0.4);
}

.reward-card .card__rarity-top,
.reward-card .card__rarity-bottom {
    height: 5px;
}

.reward-card .card__stub {
    width: 40px;
    padding-top: 10px;
    border-right: 2px dashed #A08060;
}

.reward-card .card__body {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 5px 12px 8px 12px;
    gap: 0;
}

.reward-card .card__presenting {
    display: block;
    font-family: 'Special Elite', monospace;
    font-size: 7px;
    color: #8B6914;
    letter-spacing: 2px;
    margin-bottom: 1px;
}

.reward-card .card__name {
    font-size: 14px;
    white-space: normal;
    text-align: center;
    margin-bottom: 2px;
}

.reward-card .card__rule {
    display: block;
    width: 80%;
    height: 1px;
    background: #8B6914;
    margin: 3px 0;
    position: relative;
    flex-shrink: 0;
}

.reward-card .card__rule::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #F5E6C8;
    border: 1px solid #8B6914;
}

.reward-card .card__description {
    display: block;
    font-family: 'IM Fell English', serif;
    font-size: 12px;
    color: #4A3520;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
}

.reward-card .card__type-badge {
    font-size: 8px;
    padding: 3px 10px;
    margin-top: auto;
}

.reward-card .card__edge {
    width: 20px;
}

.reward-card .energy-blip {
    width: 16px;
    height: 16px;
}

.rewards-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.rewards-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    border: none;
}

.rewards-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.rewards-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.confirm-btn {
    background: var(--energy-gold);
    color: var(--silhouette-color);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.confirm-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.skip-btn {
    background: transparent;
    color: var(--silhouette-color);
    border: 2px solid var(--silhouette-color);
}

.skip-btn:hover {
    background: rgba(26, 26, 46, 0.1);
}

.refresh-btn {
    background: transparent;
    color: #4A6A6A;
    border: 2px solid #4A6A6A;
    font-size: 12px;
    padding: 6px 12px;
}

.refresh-btn:hover:not(:disabled) {
    background: rgba(74, 106, 106, 0.1);
}

.refresh-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Reward card refresh animation */
.rewards-cards.refreshing {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.rewards-cards.refresh-enter {
    animation: refreshSlideIn 0.35s ease forwards;
}

@keyframes refreshSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Speech Bubbles (Milestone 5) === */

.speech-bubble-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    overflow: visible;
}

.speech-bubble {
    position: absolute;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    transform-origin: center bottom;
    animation: bubble-pop 1.5s ease-out forwards;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 51;
}

/* Bubble types */
.speech-bubble.damage {
    background: #FFFEF5;
    border: 2px solid var(--attack-red);
    color: var(--attack-red);
}

.speech-bubble.block {
    background: #FFFEF5;
    border: 2px solid var(--defense-blue);
    color: var(--defense-blue);
}

.speech-bubble.heal {
    background: #FFFEF5;
    border: 2px solid var(--hp-green);
    color: var(--hp-green);
}

.speech-bubble.buff {
    background: #FFFEF5;
    border: 2px solid var(--buff-gold);
    color: var(--buff-gold);
}

.speech-bubble.debuff {
    background: #FFFEF5;
    border: 2px solid var(--debuff-purple);
    color: var(--debuff-purple);
}

/* Attack burst style - jagged edges via clip-path */
.speech-bubble.attack-burst {
    background: #FFFEF5;
    border: 3px solid var(--attack-red);
    color: var(--attack-red);
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 14px;
}

/* Character speech - rounded with tail */
.speech-bubble.character {
    background: #FFFEF5;
    border: 2px solid var(--silhouette-color);
    color: var(--silhouette-color);
    font-size: 12px;
    border-radius: 12px;
}

.speech-bubble.character::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid var(--silhouette-color);
}

/* Animation */
@keyframes bubble-pop {
    0% {
        transform: scale(0) translateY(0);
        opacity: 0;
    }
    15% {
        transform: scale(1.2) translateY(-5px);
        opacity: 1;
    }
    25% {
        transform: scale(1) translateY(-10px);
        opacity: 1;
    }
    70% {
        transform: scale(1) translateY(-15px);
        opacity: 1;
    }
    100% {
        transform: scale(0.8) translateY(-25px);
        opacity: 0;
    }
}

/* Stagger offset for multiple bubbles */
.speech-bubble.offset-1 {
    animation-delay: 0.1s;
}

.speech-bubble.offset-2 {
    animation-delay: 0.2s;
}

.speech-bubble.offset-3 {
    animation-delay: 0.3s;
}

/* === Animations === */
/* Character-specific animations are in puppet-animations.css */
/* Idle desync delays are baked into the idle animation shorthands */

/* MacGuffin glow effect enhancement */
.macguffin {
    filter: drop-shadow(0 0 4px var(--buff-gold));
}

/* === Card Zoom Overlay === */

/* === Drag-to-Play === */

.card-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.9;
    transform: scale(1.05) rotate(-2deg);
    transition: none;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}

.game-card.dragging-source {
    opacity: 0.3;
}

.drop-zone-valid {
    outline: 2px dashed var(--buff-gold);
    outline-offset: -2px;
}

.drop-target-active {
    outline: 2px solid var(--buff-gold);
    outline-offset: -2px;
    background: rgba(245, 176, 65, 0.15) !important;
}

/* === Card Zoom === */

.card-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fade-in 0.2s ease-out;
}

/* Zoomed card - full ticket style with all details */
.game-card.zoomed {
    width: 320px;
    max-width: 90vw;
    height: 180px;
    flex-direction: row;
    animation: card-zoom-in 0.2s ease-out;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@keyframes card-zoom-in {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Rarity borders in zoomed - thicker */
.game-card.zoomed .card__rarity-top,
.game-card.zoomed .card__rarity-bottom {
    height: 6px;
}

/* Stub fills full height */
.game-card.zoomed .card__stub {
    width: 50px;
    padding-top: 12px;
    border-right: 2px dashed #A08060;
}

.game-card.zoomed .card__energy {
    gap: 5px;
}

.game-card.zoomed .energy-blip {
    width: 20px;
    height: 20px;
}

.game-card.zoomed .card__body {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 16px 10px 16px;
    gap: 0;
}

/* Presenting - smaller, at top */
.game-card.zoomed .card__presenting {
    display: block;
    font-family: 'Special Elite', monospace;
    font-size: 8px;
    color: #8B6914;
    letter-spacing: 2px;
    margin-bottom: 1px;
}

/* Name - smaller */
.game-card.zoomed .card__name {
    font-size: 16px;
    font-weight: 700;
    white-space: normal;
    text-align: center;
    margin-bottom: 2px;
}

.game-card.zoomed .card__rule {
    display: block;
    width: 85%;
    height: 1px;
    background: #8B6914;
    margin: 4px 0;
    position: relative;
    flex-shrink: 0;
}

.game-card.zoomed .card__rule::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #F5E6C8;
    border: 1px solid #8B6914;
}

/* Description takes middle space */
.game-card.zoomed .card__description {
    display: block;
    font-family: 'IM Fell English', serif;
    font-size: 14px;
    color: #4A3520;
    text-align: center;
    line-height: 1.25;
    flex: 1;
    display: flex;
    align-items: center;
}

/* Type badge at very bottom */
.game-card.zoomed .card__type-badge {
    font-size: 10px;
    padding: 4px 12px;
    margin-top: auto;
}

.game-card.zoomed .card__edge {
    width: 28px;
}

.game-card.zoomed .card__rivet {
    width: 6px;
    height: 6px;
}

.game-card.zoomed.card-pip {
    clip-path: polygon(
        0% 0%, 94% 0%, 95% 5%, 93% 10%, 95% 15%, 93% 20%,
        95% 25%, 93% 30%, 95% 35%, 93% 40%, 95% 45%,
        93% 50%, 95% 55%, 93% 60%, 95% 65%, 93% 70%,
        95% 75%, 93% 80%, 95% 85%, 93% 90%, 95% 95%,
        94% 100%, 0% 100%
    );
}

/* === Prop Zoom Detail Card === */
.prop-zoom-detail {
    width: 280px;
    max-width: 85vw;
    background: linear-gradient(135deg, #F5E6C8, #E8D4A8);
    border: 3px solid #8B6914;
    border-radius: 12px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: card-zoom-in 0.2s ease-out;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.prop-zoom-detail__icon {
    font-size: 48px;
    line-height: 1;
}

.prop-zoom-detail__name {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: #3A2A18;
    text-align: center;
}

.prop-zoom-detail__rule {
    width: 60%;
    height: 1px;
    background: #8B6914;
    position: relative;
}

.prop-zoom-detail__rule::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #F5E6C8;
    border: 1px solid #8B6914;
}

.prop-zoom-detail__desc {
    font-family: 'IM Fell English', serif;
    font-size: 15px;
    color: #4A3520;
    text-align: center;
    line-height: 1.4;
}

.prop-zoom-detail__badge {
    font-family: 'Special Elite', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8B6914;
    margin-top: 4px;
}

/* === Audience Bubbles (Keyword Explanations) === */

.audience-bubble {
    position: absolute;
    background: #FFFEF5;
    border: 2px solid var(--silhouette-color);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', system-ui, sans-serif;
    color: var(--silhouette-color);
    max-width: 200px;
    min-width: 120px;
    text-align: center;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 150;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.audience-bubble.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Speech bubble tail pointing down */
.audience-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid var(--silhouette-color);
}

.audience-bubble::before {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #FFFEF5;
    z-index: 1;
}

/* Tutorial hint style - slightly different appearance */
.audience-bubble.tutorial-hint {
    background: linear-gradient(to bottom, #FFF9E6 0%, #FFFEF5 100%);
    border-color: var(--buff-gold);
    font-style: italic;
}

.audience-bubble.tutorial-hint::after {
    border-top-color: var(--buff-gold);
}

.audience-bubble.tutorial-hint::before {
    border-top-color: #FFF9E6;
}

/* Keyword list bubble (card zoom explanations) */
.keyword-list-bubble {
    max-width: 280px;
    min-width: 180px;
    text-align: left;
    padding: 8px 12px;
}

.keyword-list-bubble .keyword-row {
    padding: 4px 0;
    line-height: 1.35;
}

.keyword-list-bubble .keyword-row + .keyword-row {
    border-top: 1px dashed rgba(26, 26, 46, 0.15);
}

/* === Status Icons - Clickable === */

.status-icon {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.status-icon:hover {
    transform: scale(1.1);
}

.status-icon:active {
    transform: scale(0.95);
}

/* === Responsive Adjustments === */

/* Small height screens */
@media (max-height: 700px) {
    .enemy-area { flex: 0 0 18%; }
    .stage-area { flex: 0 0 20%; }
    .stage-edge { height: 12px; }

    .game-card {
        width: 150px;
        height: 62px;
    }

    .card__stub {
        width: 20px;
        padding-top: 5px;
    }

    .energy-blip {
        width: 8px;
        height: 8px;
    }

    .card__name {
        font-size: 9px;
    }

    .card__description {
        font-size: 8px;
    }

    .card__type-badge {
        font-size: 5px;
    }
}

/* Wider screens */
@media (min-width: 420px) {
    .hand-cards {
        max-width: 374px;
        gap: 12px;
    }

    .game-card {
        width: 175px;
        height: 74px;
    }

    .card__stub {
        width: 26px;
    }

    .card__name {
        font-size: 11px;
    }

    .card__description {
        font-size: 10px;
    }
}

@media (min-width: 500px) {
    .hand-cards {
        max-width: 404px;
        gap: 14px;
    }

    .enemy-svg {
        width: 120px;
        height: 180px;
    }

    .hero-svg {
        width: 85px;
        height: 130px;
    }

    .macguffin-svg {
        width: 65px;
        height: 65px;
    }

    .game-card {
        width: 190px;
        height: 80px;
    }

    .card__stub {
        width: 28px;
    }

    .card__name {
        font-size: 12px;
    }

    .card__description {
        font-size: 11px;
    }

    .card__type-badge {
        font-size: 7px;
    }
}

/* === Ovation Meter === */
.ovation-meter {
    display: flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 25, 15, 0.85);
    padding: 3px 8px;
    border-radius: 10px;
    border: 1.5px solid #8B6914;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 2;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ovation-meter.ovation-active {
    border-color: #D4A030;
    box-shadow: 0 2px 6px rgba(212, 160, 48, 0.3);
}

.ovation-meter.ovation-max {
    border-color: #F5D060;
    box-shadow: 0 2px 8px rgba(245, 208, 96, 0.5);
}

.ovation-label {
    font-size: 12px;
}

.ovation-bar {
    width: 50px;
    height: 8px;
    background: #2A2018;
    border-radius: 4px;
    overflow: hidden;
}

.ovation-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #D4A030, #F5D060);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.ovation-meter.ovation-max .ovation-fill {
    background: linear-gradient(to right, #F5D060, #FFE880);
}

.ovation-value {
    font-size: 10px;
    font-weight: bold;
    color: #D4A030;
    min-width: 10px;
    text-align: center;
}

.ovation-meter.ovation-max .ovation-value {
    color: #F5D060;
}

/* === Deck Count Indicator === */
.controls-top-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.deck-count-indicator {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(30, 25, 15, 0.9);
    padding: 6px 10px;
    border-radius: 14px;
    border: 2px solid #8B7030;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: border-color 0.2s ease;
    font-size: 14px;
    font-weight: bold;
}

.deck-count-indicator:hover {
    border-color: #D4A030;
}

.deck-count-draw {
    color: #F4E4C1;
}

.deck-count-separator {
    color: #8B7030;
    font-size: 12px;
}

.deck-count-discard {
    color: #A08060;
}

/* === Deck List Overlay === */
.deck-list-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 120;
    animation: fade-in 0.2s ease-out;
}

.deck-list-content {
    background: var(--parchment-light);
    border-radius: 12px;
    padding: 16px;
    width: 95%;
    max-width: 380px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.deck-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.deck-list-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--silhouette-color);
    margin: 0;
}

.deck-list-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--silhouette-color);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.deck-list-close:hover {
    opacity: 1;
}

.deck-list-cards {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}

/* Deck list card entry */
.deck-list-entry {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(244, 228, 193, 0.6);
    border: 1.5px solid #D4C0A0;
    border-radius: 8px;
    cursor: default;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.deck-list-entry.removable {
    cursor: pointer;
}

.deck-list-entry.removable:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--attack-red);
}

.deck-list-entry.removal-selected {
    background: rgba(231, 76, 60, 0.15);
    border-color: var(--attack-red);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3);
}

.deck-list-entry-cost {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    min-width: 20px;
}

.deck-list-entry-cost .energy-blip {
    width: 8px;
    height: 8px;
}

.deck-list-entry-info {
    flex: 1;
    min-width: 0;
}

.deck-list-entry-name {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    font-weight: 600;
    color: #3D2B1F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deck-list-entry-desc {
    font-family: 'IM Fell English', serif;
    font-size: 10px;
    color: #6B5A40;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deck-list-entry-owner {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deck-list-entry-owner.owner-aldric {
    background: rgba(245, 176, 65, 0.2);
    color: #C07820;
    border: 1px solid #C07820;
}

.deck-list-entry-owner.owner-pip {
    background: rgba(231, 76, 60, 0.15);
    color: #A03020;
    border: 1px solid #A03020;
}

.deck-list-entry-owner.owner-macguffin {
    background: rgba(140, 140, 130, 0.15);
    color: #707060;
    border: 1px solid #707060;
}

.deck-list-entry-location {
    font-size: 8px;
    color: #A08060;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deck-list-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    min-height: 40px;
    flex-wrap: wrap;
}

.deck-list-footer .rewards-btn {
    padding: 8px 16px;
    font-size: 13px;
}

.deck-list-count {
    width: 100%;
    text-align: center;
    font-size: 11px;
    color: #8B7030;
    margin-top: 4px;
}

/* Remove card button on reward screen */
.remove-btn {
    background: transparent;
    color: var(--attack-red);
    border: 2px solid var(--attack-red);
    transition: background 0.15s ease;
}

.remove-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Group headers in deck list */
.deck-list-group {
    font-family: 'Playfair Display', serif;
    font-size: 11px;
    font-weight: 600;
    color: #8B7030;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 0 2px 4px;
    border-bottom: 1px solid #D4C0A0;
    margin-top: 4px;
}

.deck-list-group:first-child {
    margin-top: 0;
}

/* === Protagonist Debuffs === */
.protagonist-debuffs {
    margin-top: 2px;
    max-width: 80px;
}

.protagonist-debuffs .status-icon {
    font-size: 10px;
    padding: 1px 3px;
}

/* === MacGuffin Debuffs === */
.macguffin-debuffs {
    margin-top: 2px;
}

.macguffin-debuffs .status-icon {
    font-size: 10px;
    padding: 1px 3px;
}

/* === Enemy Passive Label === */

/* === Enemy Choice Passive === */
/* === Progress Indicator Act Labels === */
.progress-act-label {
    font-size: 8px;
    font-weight: bold;
    color: #A08060;
    width: 10px;
    text-align: center;
    line-height: 14px;
}

/* === Stage Prop Strip (in left enemy sidebar) === */
/* Layout handled by .enemy-sidebar parent */

.stage-prop-token {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3A2A18, #5A4030);
    border: 1px solid #8B7355;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.stage-prop-token:active {
    opacity: 1;
    transform: scale(1.15);
}

.stage-prop-token__icon {
    font-size: 14px;
}

/* === Stage Prop Choice (Boss Reward Selection) === */
.stage-prop-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 12px;
    background: linear-gradient(135deg, #3A2A18, #4A3828);
    border: 2px solid #6B5344;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    text-align: center;
    min-width: 90px;
}

.stage-prop-choice:active {
    transform: scale(0.97);
}

.stage-prop-choice.selected {
    border-color: #D4A030;
    box-shadow: 0 0 12px rgba(212, 160, 48, 0.4);
    background: linear-gradient(135deg, #4A3828, #5A4838);
}

.stage-prop-choice__icon {
    font-size: 28px;
}

.stage-prop-choice__name {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    font-weight: 600;
    color: #D4C8A0;
}

.stage-prop-choice__desc {
    font-family: 'IM Fell English', serif;
    font-size: 10px;
    color: #A09070;
    line-height: 1.3;
}

/* === Gold Indicator === */
.gold-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(30, 25, 15, 0.9);
    padding: 6px 10px;
    border-radius: 14px;
    border: 2px solid #D4A030;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    font-size: 14px;
    font-weight: bold;
}

.gold-icon {
    font-size: 14px;
}

.gold-value {
    color: #F5D060;
    min-width: 16px;
    text-align: center;
}

/* === Progress Dot Variants === */
.progress-dot.event {
    border-radius: 2px;
    width: 8px;
    height: 8px;
}

.progress-dot.merchant {
    border-radius: 2px;
    width: 8px;
    height: 8px;
    border-color: #D4A030;
}

.progress-dot.merchant.complete {
    border-color: var(--hp-green);
}

.progress-dot.merchant.active {
    border-color: #F5D060;
}

/* === Narrative Event — Stage-Based Display === */

/* Hide combat-only UI when an event is active */
.curtain-call.event-active .enemy-area > * {
    visibility: hidden;
}
.curtain-call.event-active .hand-cards {
    display: none;
}
.curtain-call.event-active .ovation-meter {
    visibility: hidden;
}
/* enchantment-strip and stage-prop-strip are now inside .enemy-area,
   so .event-active .enemy-area > * { visibility: hidden } covers them */
.curtain-call.event-active .controls-right {
    visibility: hidden;
}

/* Event title — positioned over the enemy area */
.event-stage-title {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: #F5D060;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    z-index: 35;
    animation: event-title-in 0.5s ease-out;
    pointer-events: none;
}

@keyframes event-title-in {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Persistent speech bubbles — override auto-dismiss animation */
.speech-bubble.event-persistent {
    animation: event-bubble-in 0.4s ease-out forwards;
    white-space: normal;
    max-width: 160px;
    text-align: center;
    font-size: 11px;
    line-height: 1.3;
    z-index: 52;
}

@keyframes event-bubble-in {
    0% { opacity: 0; transform: translateX(-50%) scale(0.8); }
    100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

/* Event choice buttons — in the hand area */
.event-stage-choices {
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    animation: event-choices-in 0.4s ease-out;
}

@keyframes event-choices-in {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

.event-stage-choice {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    border: 2px solid;
    border-radius: 10px;
    font-family: 'IM Fell English', serif;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    text-align: center;
    min-height: 70px;
}

.event-stage-choice:active {
    transform: scale(0.97);
}

.event-stage-choice:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

.event-stage-choice.choice-aldric {
    background: rgba(245, 176, 65, 0.15);
    border-color: #C07820;
    color: #F5D060;
}

.event-stage-choice.choice-aldric:hover:not(:disabled) {
    background: rgba(245, 176, 65, 0.3);
    box-shadow: 0 0 12px rgba(245, 176, 65, 0.2);
}

.event-stage-choice.choice-pip {
    background: rgba(231, 76, 60, 0.15);
    border-color: #A03020;
    color: #E8A090;
}

.event-stage-choice.choice-pip:hover:not(:disabled) {
    background: rgba(231, 76, 60, 0.3);
    box-shadow: 0 0 12px rgba(231, 76, 60, 0.2);
}

.event-choice-label {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 15px;
    display: block;
    margin-bottom: 4px;
}

.event-choice-desc {
    font-size: 11px;
    opacity: 0.8;
    line-height: 1.3;
}

/* === Merchant Overlay === */
.merchant-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 100px;
    background: rgba(26, 26, 46, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fade-in 0.3s ease-out;
}

.merchant-content {
    background: var(--parchment-light);
    border-radius: 12px;
    padding: 16px;
    width: 95%;
    max-width: 360px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
}

.merchant-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--silhouette-color);
    margin: 0 0 4px 0;
}

.merchant-greeting {
    font-family: 'IM Fell English', serif;
    font-size: 13px;
    font-style: italic;
    color: #6B5A40;
    margin: 0 0 10px 0;
    text-align: center;
}

.merchant-gold {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: bold;
    color: #D4A030;
    margin-bottom: 12px;
}

.merchant-gold .gold-icon {
    font-size: 16px;
}

.merchant-items {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.merchant-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(244, 228, 193, 0.6);
    border: 1.5px solid #D4C0A0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.merchant-item:hover:not(.sold):not(.unaffordable) {
    background: rgba(212, 160, 48, 0.15);
    border-color: #D4A030;
}

.merchant-item:active:not(.sold):not(.unaffordable) {
    transform: scale(0.98);
}

.merchant-item.sold {
    opacity: 0.4;
    cursor: default;
    text-decoration: line-through;
}

.merchant-item.unaffordable {
    opacity: 0.5;
    cursor: default;
}

.merchant-item-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.merchant-item-info {
    flex: 1;
    min-width: 0;
}

.merchant-item-name {
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    font-weight: 600;
    color: #3D2B1F;
}

.merchant-item-desc {
    font-family: 'IM Fell English', serif;
    font-size: 10px;
    color: #6B5A40;
}

.merchant-item-price {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 14px;
    font-weight: bold;
    color: #D4A030;
    flex-shrink: 0;
}

.merchant-item-price .gold-icon {
    font-size: 12px;
}

.merchant-item.sold .merchant-item-price {
    text-decoration: line-through;
}

.merchant-leave-btn {
    margin-top: 4px;
    font-size: 14px;
    padding: 10px 24px;
}

/* === M7 Title Screen Tickets & Backstage Button === */

/* Title screen login */
.title-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.title-username-input {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    padding: 10px 16px;
    border: 2px solid #8B7030;
    border-radius: 8px;
    background: rgba(30, 20, 10, 0.8);
    color: #F5E6D0;
    text-align: center;
    width: 200px;
    outline: none;
}

.title-username-input::placeholder {
    color: #8B7355;
}

.title-username-input:focus {
    border-color: #D4A030;
    box-shadow: 0 0 8px rgba(212, 160, 48, 0.3);
}

.title-welcome {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    color: #C4A882;
    margin-bottom: 4px;
}

.title-btn-tertiary {
    background: transparent;
    border: 1px solid #5A4A3A;
    color: #8B7355;
    font-size: 12px;
    padding: 6px 16px;
    margin-top: 4px;
}

.title-btn-tertiary:hover {
    color: #C4A882;
    border-color: #8B7030;
}

.title-tickets {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: #D4A030;
    margin-bottom: 8px;
}

.ticket-icon {
    margin-right: 4px;
}

.title-btn-secondary {
    background: rgba(60, 40, 20, 0.6);
    border: 1px solid #8B7030;
    color: #D4A030;
    font-size: 14px;
    padding: 8px 20px;
}

.title-btn-secondary:hover {
    background: rgba(80, 60, 30, 0.8);
}

/* === M7 Character Select: MacGuffin Picker === */

.cs-macguffin-section {
    margin: 10px 0;
    text-align: center;
}

.cs-macguffin-label {
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    color: #8B7A5A;
    margin-bottom: 6px;
}

.cs-macguffin-options {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.cs-macguffin-option {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border: 1px solid #8B7030;
    border-radius: 6px;
    background: rgba(60, 40, 20, 0.4);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.cs-macguffin-option:hover {
    background: rgba(80, 60, 30, 0.6);
}

.cs-macguffin-option.selected {
    background: rgba(212, 160, 48, 0.2);
    border-color: #D4A030;
    box-shadow: 0 0 6px rgba(212, 160, 48, 0.3);
}

.cs-macguffin-icon {
    font-size: 18px;
}

.cs-macguffin-name {
    font-family: 'Playfair Display', serif;
    color: #E8D4A8;
    font-size: 11px;
}

/* === M7 Difficulty Badge === */

.cs-difficulty-badge {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    color: #D4A030;
    text-align: center;
    margin: 6px 0;
    padding: 4px 12px;
    background: rgba(212, 160, 48, 0.1);
    border-radius: 12px;
    display: inline-block;
}

/* === M7 Run Summary Overlay === */

.run-summary-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fade-in 0.3s ease-out;
}

.run-summary-content {
    width: 90%;
    max-width: 340px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    padding: 20px;
}

.run-summary-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    margin-bottom: 16px;
}

.run-summary-title.victory {
    color: #D4A030;
}

.run-summary-title.defeat {
    color: #C44;
}

.run-summary-stats {
    margin-bottom: 16px;
}

.run-stat {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-family: 'IM Fell English', serif;
    font-size: 13px;
    color: #E8D4A8;
    border-bottom: 1px solid rgba(139, 112, 48, 0.2);
}

.run-summary-tickets {
    margin: 16px 0;
    padding: 12px;
    background: rgba(212, 160, 48, 0.1);
    border: 1px solid rgba(212, 160, 48, 0.3);
    border-radius: 8px;
}

.ticket-heading {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    color: #D4A030;
    margin-bottom: 8px;
}

.ticket-line {
    display: flex;
    justify-content: space-between;
    font-family: 'IM Fell English', serif;
    font-size: 12px;
    color: #E8D4A8;
    padding: 2px 0;
}

.ticket-line.achievement {
    color: #9BE89B;
}

.ticket-total {
    display: flex;
    justify-content: space-between;
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 600;
    color: #D4A030;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(212, 160, 48, 0.3);
}

.run-summary-achievements {
    margin: 12px 0;
}

.achievement-heading {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    color: #9BE89B;
    margin-bottom: 6px;
}

.achievement-entry {
    font-family: 'IM Fell English', serif;
    font-size: 13px;
    color: #E8D4A8;
    padding: 4px 0;
}

.achievement-tickets {
    color: #D4A030;
    font-size: 11px;
}

.run-summary-btn {
    margin-top: 16px;
}

/* === M7 Backstage Overlay === */

.backstage-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.97);
    display: flex;
    flex-direction: column;
    z-index: 200;
    animation: fade-in 0.3s ease-out;
}

.backstage-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px;
}

.backstage-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.backstage-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: #D4A030;
    margin: 0;
    flex: 1;
}

.backstage-tickets {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    color: #D4A030;
}

.backstage-close {
    background: none;
    border: none;
    color: #E8D4A8;
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
}

.backstage-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 8px;
}

.backstage-tab {
    flex: 1;
    padding: 8px 4px;
    font-family: 'Playfair Display', serif;
    font-size: 11px;
    background: rgba(60, 40, 20, 0.4);
    border: 1px solid #5A4A30;
    color: #8B7A5A;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px 4px 0 0;
}

.backstage-tab.active {
    background: rgba(212, 160, 48, 0.15);
    border-color: #D4A030;
    color: #D4A030;
}

.backstage-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

/* Unlock tracks */
.unlock-track {
    margin-bottom: 16px;
}

.unlock-track-header {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    color: #D4A030;
    margin-bottom: 2px;
}

.unlock-track-desc {
    font-family: 'IM Fell English', serif;
    font-size: 11px;
    color: #8B7A5A;
    margin-bottom: 6px;
}

.unlock-track-tiers {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.unlock-tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    font-family: 'IM Fell English', serif;
    font-size: 12px;
    transition: all 0.2s;
}

.unlock-tier.unlocked {
    background: rgba(155, 232, 155, 0.1);
    border: 1px solid rgba(155, 232, 155, 0.3);
}

.unlock-tier-name {
    color: #E8D4A8;
}

.unlock-tier.unlocked .unlock-tier-name {
    color: #9BE89B;
}

.unlock-tier-status {
    color: #9BE89B;
    font-size: 11px;
}

.unlock-tier.available {
    background: rgba(212, 160, 48, 0.1);
    border: 1px solid rgba(212, 160, 48, 0.4);
    cursor: pointer;
}

.unlock-tier.available:hover {
    background: rgba(212, 160, 48, 0.2);
}

.unlock-tier.locked {
    background: rgba(60, 40, 20, 0.3);
    border: 1px solid rgba(90, 74, 48, 0.3);
    opacity: 0.6;
}

.unlock-tier-cost {
    color: #D4A030;
    font-weight: bold;
    font-size: 12px;
}

/* Achievements */
.achievement-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid rgba(139, 112, 48, 0.15);
}

.achievement-row.earned {
    background: rgba(155, 232, 155, 0.05);
}

.achievement-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    color: #E8D4A8;
}

.achievement-row.earned .achievement-name {
    color: #9BE89B;
}

.achievement-desc {
    font-family: 'IM Fell English', serif;
    font-size: 11px;
    color: #8B7A5A;
}

.achievement-reward {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    color: #D4A030;
    white-space: nowrap;
}

.achievement-row.earned .achievement-reward {
    color: #9BE89B;
}

/* History */
.history-empty {
    text-align: center;
    padding: 40px 20px;
    font-family: 'IM Fell English', serif;
    font-size: 14px;
    color: #8B7A5A;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-entry {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(60, 40, 20, 0.3);
}

.history-entry.victory {
    border-left: 3px solid #D4A030;
}

.history-entry.defeat {
    border-left: 3px solid #C44;
}

.history-result {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    font-weight: 600;
    width: 50px;
}

.history-entry.victory .history-result {
    color: #D4A030;
}

.history-entry.defeat .history-result {
    color: #C44;
}

.history-details {
    flex: 1;
    display: flex;
    gap: 8px;
    font-family: 'IM Fell English', serif;
    font-size: 11px;
    color: #8B7A5A;
}

.history-tickets {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    color: #D4A030;
}

/* Difficulty select */
.difficulty-description {
    font-family: 'IM Fell English', serif;
    font-size: 12px;
    color: #8B7A5A;
    text-align: center;
    margin-bottom: 12px;
}

.difficulty-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 6px;
    border-radius: 8px;
    background: rgba(60, 40, 20, 0.3);
    border: 1px solid rgba(90, 74, 48, 0.3);
    cursor: pointer;
    transition: all 0.2s;
}

.difficulty-option:hover:not(.locked) {
    background: rgba(80, 60, 30, 0.5);
}

.difficulty-option.selected {
    background: rgba(212, 160, 48, 0.15);
    border-color: #D4A030;
}

.difficulty-option.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.difficulty-icon {
    font-size: 24px;
    width: 32px;
    text-align: center;
}

.difficulty-info {
    flex: 1;
}

.difficulty-name {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    color: #E8D4A8;
}

.difficulty-option.selected .difficulty-name {
    color: #D4A030;
}

.difficulty-desc {
    font-family: 'IM Fell English', serif;
    font-size: 11px;
    color: #8B7A5A;
}

.difficulty-lock {
    font-family: 'IM Fell English', serif;
    font-size: 11px;
    color: #8B7A5A;
    white-space: nowrap;
}

/* Unremovable card in deck list */
.deck-list-entry.unremovable {
    opacity: 0.5;
    cursor: not-allowed;
}
