
@import url("mobile.css?v=1.3.7");

/* ==========================================================================
   DESKTOP HYBRID LAYOUT OVERRIDES (Width >= 1024px)
   ========================================================================== */

@media (min-width: 1024px) {
    :root {
        --arena-card-scale: calc(26 / 17);
        --card-w: 60px;
        --card-h: 84px;
        --card-land-w: 84px;
        --card-land-h: 60px;
        --command-row-h: 76px;
        --arena-row-h: 140px;
        --hand-p1-h: 28px;
        --hand-p2-h: 40px;
        --divider-h: 24px;
        --choices-min-h: 80px;
        --choices-max-h: 220px;
        --half-zone-w: 130px;
        --card-font-size: 9px;
    }

    body {
        overflow: hidden;
        touch-action: auto; /* Allow normal mouse interactions */
        -webkit-touch-callout: default;
        -webkit-user-select: text;
        -khtml-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }

    #hybrid-layout-container {
        display: flex;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
        background-color: #030712;
    }

    #main-content {
        flex-grow: 1;
        height: 100%;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        /* Same darkened look as background-blend-mode: multiply over a 50% black, but as a
           flat gradient layer. A blend mode makes the element its own blending context,
           which pushes the whole board off the fast paint path and re-blends this
           full-screen image on repaint. Stacked background layers are plain compositing. */
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                          url(/img/hyperspace_bg.jpg);
        background-size: cover;
        padding: 0 40px 16px 16px;
        box-sizing: border-box;
        background-position: center;
    }

    #app-container {
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100%;
        padding: 0;
        display: flex !important;
        justify-content: center !important;
        align-items: flex-start !important;
    }

    #game-wrapper {
        width: 100% !important;
        max-width: none !important;
        height: 100% !important;
        max-height: none !important;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    /* CARD HOVER MICRO-ANIMATIONS */
    .card {
        cursor: pointer;
    }

    .card:hover {
        transform: translateY(-6px) scale(1.05);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5), 0 0 12px rgba(59, 130, 246, 0.4);
        border-color: rgba(59, 130, 246, 0.6) !important;
        z-index: 100 !important;
    }

    .card.exhausted:hover {
        transform: translateY(-6px) rotate(var(--exhausted-rot, 30deg)) scale(1.05);
    }

    .arena-zone .card:hover,
    .arena-zone .card-container > .card:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 10px rgba(16, 185, 129, 0.4);
        border-color: rgba(16, 185, 129, 0.6) !important;
    }

    .arena-zone .card.exhausted:hover,
    .arena-zone .card-container > .card.exhausted:hover {
        transform: rotate(var(--exhausted-rot, 30deg)) scale(1.05) !important;
    }

    /* DESKTOP SIDEBAR STYLING (Right Sidebar Only) */
    .desktop-sidebar {
        width: 360px;
        height: 100%;
        flex-shrink: 0;
        /* Was rgba(...,0.55) + backdrop-filter: blur(24px). That is a live 360px-wide,
           full-height blur of the board behind it: the compositor has to re-run it
           whenever anything back there repaints — i.e. on every card hover, every
           animation frame, every log update. A near-opaque panel reads the same over a
           dark board and takes the whole surface out of the per-frame budget. */
        background: rgba(17, 24, 39, 0.94);
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        flex-direction: column;
        z-index: 90;
        overflow: visible !important;
        box-sizing: border-box;
        position: relative; /* Contain the absolute overlay panel */
        transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar-collapsed .desktop-sidebar {
        margin-right: -360px;
    }

    .sidebar-toggle-btn {
        position: absolute;
        left: -20px;
        top: 16px;
        width: 20px;
        height: 72px;
        background: rgba(17, 24, 39, 0.92);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-right: none;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
        color: rgba(255, 255, 255, 0.7);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 100;
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.3);
        transition: background-color 0.2s, color 0.2s, transform 0.3s;
        padding: 0;
    }

    .sidebar-toggle-btn:hover {
        background: rgba(31, 41, 55, 0.9);
        color: white;
    }

    .sidebar-toggle-btn svg {
        transition: transform 0.3s ease;
    }

    .sidebar-collapsed .sidebar-toggle-btn svg {
        transform: rotate(180deg);
    }

    /* Sidebar sections container */
    #sidebar-sections-container {
        display: flex;
        flex-direction: column;
        flex: 1;
        overflow: hidden;
        min-height: 0;
    }

    .sidebar-section {
        display: flex;
        flex-direction: column;
        min-height: 36px;
        overflow: hidden;
        flex: 1 1 0;
        min-width: 0;
    }

    .sidebar-section.section-collapsed {
        flex: 0 0 36px !important;
    }

    .section-header {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 0 12px;
        height: 36px;
        min-height: 36px;
        cursor: pointer;
        user-select: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(255, 255, 255, 0.02);
        flex-shrink: 0;
        transition: background 0.15s ease;
    }

    .section-header:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .section-chevron {
        font-size: 8px;
        color: #6b7280;
        transition: transform 0.2s ease;
        display: inline-block;
    }

    .sidebar-section.section-collapsed .section-chevron {
        transform: rotate(-90deg);
    }

    .section-title {
        font-family: 'Outfit', sans-serif;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        color: #9ca3af;
        font-weight: 600;
    }

    .section-body {
        flex: 1;
        overflow-y: auto;
        padding: 10px 12px;
    }

    .sidebar-section.section-collapsed .section-body {
        display: none;
    }

    /* Resize handle between sections */
    .sidebar-resize-handle {
        height: 4px;
        min-height: 4px;
        cursor: ns-resize;
        background: rgba(255, 255, 255, 0.04);
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        flex-shrink: 0;
        transition: background 0.15s ease;
    }

    .sidebar-resize-handle:hover,
    .sidebar-resize-handle.dragging {
        background: rgba(59, 130, 246, 0.3);
    }

    /* Legacy panel styles kept for preview overlay */
    .panel-header h4 {
        font-family: 'Outfit', sans-serif;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        color: #9ca3af;
        margin: 0 0 6px 0;
        font-weight: 600;
    }

    .panel-body {
        display: flex;
        flex-direction: column;
        gap: 8px;
        height: 100%;
    }

    .scrollable-panel-body {
        overflow-y: auto;
        flex-grow: 1;
        padding-right: 4px;
        height: 100%;
    }

    /* Custom scrollbars for sidebar */
    .scrollable-panel-body::-webkit-scrollbar,
    .action-log-list::-webkit-scrollbar {
        width: 4px;
    }
    .scrollable-panel-body::-webkit-scrollbar-track,
    .action-log-list::-webkit-scrollbar-track {
        background: transparent;
    }
    .scrollable-panel-body::-webkit-scrollbar-thumb,
    .action-log-list::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }
    .scrollable-panel-body::-webkit-scrollbar-thumb:hover,
    .action-log-list::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    /* Action Log Sidebar overrides */
    .desktop-sidebar .action-log-list {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding-bottom: 26px;   /* breathing room so the last capsule clears the Dev Tools header */
    }

    .desktop-sidebar .action-log-item {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 6px;
        padding: 8px 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        transition: background-color var(--ui-hover-dur) ease-out,
                    border-color var(--ui-hover-dur) ease-out;
        font-size: 11px;
    }

    .desktop-sidebar .action-log-item:hover {
        background: rgba(59, 130, 246, 0.1);
        border-color: rgba(59, 130, 246, 0.3);
    }

    .desktop-sidebar .action-log-item.active-turn {
        background: rgba(59, 130, 246, 0.25);
        border-color: rgba(59, 130, 246, 0.5);
        font-weight: 600;
        box-shadow: 0 0 8px rgba(59, 130, 246, 0.15);
    }

    /* HOVER PREVIEW OVERLAY PANEL */
    .preview-overlay-panel {
        position: fixed;
        top: 0;
        right: 0;
        width: 480px;
        height: auto; /* Shrink vertically to only fit content */
        max-height: 100%;
        /* No backdrop blur here either — this panel appears on EVERY card hover, so its
           blur cost landed directly on the interaction it was meant to decorate. */
        z-index: 110;
        display: flex;
        flex-direction: column;
        padding: 16px;
        box-sizing: border-box;
        
        /* Hidden by default, faded in/out via JS */
        opacity: 0;
        pointer-events: none;
        transition: opacity 90ms ease-out;
    }

    .preview-overlay-panel .panel-body {
        display: flex;
        flex-direction: column;
        gap: 12px;
        height: auto;
        justify-content: flex-start;
    }

    /* Card Preview image container styling (Fixed widths) */
    .desktop-preview-img-container {
        position: relative; /* anchor for the top-right stat overlay */
        width: 390px; /* Fixed width for portrait */
        height: 540px; /* Fixed height for portrait (ratio 62/44) */
        background-image: url('/img/card_back_large.jpg');
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        border-radius: 3.6%;
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
        /* No transition on background-image: it is a DISCRETE property, so it never
           cross-faded — the browser just held the old art until 50% of the duration and
           then swapped. That was a flat 100ms of dead time on every single hover. */
        margin: 0 auto;
    }

    .desktop-preview-img-container.landscape-preview {
        width: 390px; /* Displayed smaller for landscape */
        height: 277px; /* Fixed height (ratio 44/62) */
    }

    .desktop-preview-stats-container {
        max-width: 390px;
        width: 100%;
        margin: -40px auto;
        background: rgba(0, 0, 0, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        padding: 6px;
        color: #e5e7eb;
        font-size: 11px;
        min-height: 60px;
        box-sizing: border-box;
        display: none;
        z-index: 0;
    }

    .no-preview-stats {
        color: #9ca3af;
        text-align: center;
        font-style: italic;
        font-size: 11px;
        line-height: 36px;
    }


    /* Hide redundant action log modal trigger on desktop since log is persistent */
    #log-btn {
        display: none !important;
    }

    /* Horizontal wrapping layout for choices on desktop */
    #choices-zone {
        height: var(--choices-max-h) !important;
        display: flex !important;
        flex-direction: column !important;
        background: #0f172a !important;
    }

    #choices {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        align-content: flex-start !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        gap: 6px !important;
        padding: 4px !important;
        height: auto !important;
        min-height: 0 !important;
        flex-grow: 1 !important;
    }

    /* Row layout: a full basis is what breaks the wrapping line before/after a group. */
    #choices .choice-group-heading,
    #choices .choice-group-divider {
        flex: 0 0 100% !important;
    }

    #choices .choice.btn {
        min-width: 125px !important;
        max-width: 100% !important;
        text-align: left !important;
        margin: 0 !important;
        padding: 5px 10px !important;
        font-size: 11px !important;
    }

    #choices .choice.btn:hover {
        background: rgba(59, 130, 246, 0.15) !important;
        border-color: #3b82f6 !important;
        color: #fff !important;
    }

    /* Base Zone (sits between ground & space arenas) */
    .base-zone {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 76px !important;
        flex-shrink: 0 !important;
        height: 100% !important;
        gap: 6px !important;
        box-sizing: border-box !important;
        background: rgba(30, 41, 59, 0.25) !important;
        border: 1px dashed rgba(255, 255, 255, 0.12) !important;
        border-radius: 8px !important;
        overflow: visible !important;
    }

    #p1_base_zone {
        justify-content: flex-end !important;
        padding-bottom: 4px !important;
    }

    #p2_base_zone {
        justify-content: flex-start !important;
        padding-top: 4px !important;
    }

    /* Landscape Mode for Leaders and Bases */
    .base, .leader,
    .base .card, .leader .card,
    .card.leader, .card.base {
        position: relative !important;
        width: calc(var(--card-land-w) * 0.8) !important;
        height: calc(var(--card-land-h) * 0.8) !important;
        aspect-ratio: 62 / 44 !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        border: 1px solid rgba(226, 232, 240, 0.3) !important;
        border-radius: 4px !important;
        flex-shrink: 0 !important;
    }

    /* Reset hand zones to integrate inside center command zone */
    #p1_hand_zone, #p2_hand_zone {
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 4px !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        overflow: visible !important;
        z-index: 25 !important; /* Render behind choices-zone (z-index 35) and top-bar (z-index 40) */
    }

    #p1_hand_zone .zone-cards, #p2_hand_zone .zone-cards {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100% !important;
        width: 100% !important;
        overflow: visible !important;
    }

    /* Hand cards 50% larger and appropriately spaced (30% overlap) */
    #p1_hand_zone .card, #p2_hand_zone .card {
        width: calc(var(--card-w) * 1.5) !important;
        height: calc(var(--card-h) * 1.5) !important;
        box-sizing: border-box;
        background-size: calc(var(--card-w) * 1.5) calc(var(--card-h) * 1.5);
        background-position: right center;
    }
    #p1_hand_zone .card:last-child, #p2_hand_zone .card:last-child {
        margin-right: 0 !important;
    }
    #p1_hand_zone .card .card-overlay, #p2_hand_zone .card .card-overlay {
        font-size: calc(var(--card-font-size) * 1.5) !important;
    }

    #p2_hand_zone .zone-cards {
        transform: translateY(45px) !important;
    }

    #p1_hand_zone .zone-cards {
        transform: translateY(-38px) !important;
    }

    /* Allow hand cards to hover pop up above top-bar/choices-zone and enlarge */
    #p2_hand .card:hover {
        transform: translateY(-20px) scale(1.15) !important;
        z-index: 100 !important;
    }
    #p1_hand .card:hover {
        transform: translateY(20px) scale(1.15) !important;
        z-index: 100 !important;
    }

    /* Prevent clipping of hand cards and other absolute/translated elements */
    #game-board,
    .playarea,
    #p1_playarea,
    #p2_playarea,
    .command-row,
    .center-zone,
    #p1_hand_zone,
    #p2_hand_zone,
    #p1_hand,
    #p2_hand {
        overflow: visible !important;
    }

    #top-bar {
        margin-bottom: 0 !important;
    }

    #game-board {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    #p1_playarea {
        padding-top: 0 !important;
        margin-top: 0 !important;
        border-top: none !important;
    }

    #p1_playarea > .command-row {
        margin-top: 0 !important;
    }

    /* Initiative slot sits in the base zone (above/below the leader), centered in
       the column, matching the mobile layout. */
    .init-slot {
        position: relative !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        width: 30px !important;
        height: 30px !important;
        flex-shrink: 0 !important;
        margin: 2px 0 !important;
        z-index: 45 !important;
    }

    /* Flex container for resources to prevent overlap */
    .resource-zone-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: visible !important;
    }

    /* Counter on the outside of each zone (left for P1, right for P2) */
    #p1_res_zone {
        flex-direction: row !important;
    }

    #p2_res_zone {
        flex-direction: row-reverse !important;
    }

    /* Make resource count labels relative flex items */
    .res-count-label {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        flex-shrink: 0 !important;
        z-index: 20 !important;
    }

    #p1_res_label {
        margin-right: 8px !important;
        margin-left: 0 !important;
    }

    #p2_res_label {
        margin-left: 8px !important;
        margin-right: 0 !important;
    }

    /* Fixed size for resources stack in the flex container */
    .resource-stack {
        width: calc(var(--card-land-h) * 0.8) !important;
        height: 100% !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: visible !important;
    }

    /* Increase width of zone viewer modal on desktop to fit 5 cards per row */
    #zone-view-modal {
        max-width: 600px !important;
    }
    #zone-view-modal .zone-view-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    /* Reveal / search modal: a proper 5-card-wide layout on desktop (not the mobile size). */
    #reveal-modal.modal-card, #search-modal.modal-card {
        max-width: 720px !important;
        width: 720px !important;
    }
    #reveal-modal .reveal-card-grid, #search-modal .reveal-card-grid {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        justify-content: initial !important;
    }
    #reveal-modal .reveal-card-img, #search-modal .reveal-card-img {
        width: 100% !important;
        max-width: none !important;
    }

    /* Desktop active deck configuration modal overrides. 520 rather than 480: the row now
       carries a stacking button as well as the edit one, and at 480 the edit button was
       pushed past the modal's edge. */
    #decks-modal.modal-card {
        max-width: 520px !important;
    }

    .active-deck-player {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 16px !important;
        padding: 14px 18px !important;
    }

    .active-deck-player .deck-meta {
        max-width: 220px !important;
        /* A flex item defaults to min-width:auto, i.e. "never shrink below my content",
           and that minimum WINS over max-width. So a long enough deck name blew straight
           past the 220px cap and pushed the buttons out of the modal — .deck-name's
           ellipsis never engaged because the column was never actually constrained.
           min-width:0 lets it shrink, which is what makes the truncation work. */
        min-width: 0 !important;
    }

    .active-deck-player .deck-mini-cards {
        width: auto !important;
        /* The leader/base thumbnails and the two buttons are fixed-size and always
           reachable; the name column is the part that gives. */
        flex-shrink: 0 !important;
    }

    .active-deck-player .deck-edit-btn {
        margin-left: 0 !important;
    }
}

/* ==========================================================================
   MOBILE FALLBACKS & LAYOUT ADJUSTMENTS (Width < 1024px)
   ========================================================================== */

@media (max-width: 1023px) {
    .desktop-sidebar {
        display: none !important;
    }

    #hybrid-layout-container {
        display: block;
        width: 100%;
        height: 100dvh;
    }

    #main-content {
        width: 100%;
        height: 100%;
        padding: 0;
        /* Gradient layer instead of a blend mode — see the desktop rule above. */
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                          url(/img/hyperspace_bg.jpg);
        background-size: cover;
        background-position: center;
    }

    #app-container {
        padding: 0px 6px calc(6px + env(safe-area-inset-bottom, 0px)) 6px;
    }
}


/* Section headings in the grouped choice list (drill-down level 1 and the dev-overlay flat
   list), plus the probability on each button. Sizing note: #choices is a wrapping flex ROW
   on desktop but a flex COLUMN on mobile, so `flex-basis` means WIDTH there and HEIGHT here
   — a 100% basis is a line-break on desktop and a panel-tall blank on mobile. Keep the base
   rule axis-neutral and give the row-breaking basis to the desktop block only. */
.choice-group-heading {
    width: 100%;
    flex: 0 0 auto;
    /* Indent with padding, not margin: #choices scrolls, and width:100% + a left margin is
       2px wider than its content box — enough overflow to raise a full-width horizontal
       scrollbar under the list. */
    margin: 4px 0 0 0;
    padding-left: 2px;
    font-size: 9px;
    font-weight: bold;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.choice-group-heading:first-child {
    margin-top: 0;
}

/* Unlabelled break before the groups that are a single move (Take initiative / Pass) and
   any unclassified action, so they don't read as more rows of the group above them. */
.choice-group-divider {
    width: 100%;
    flex: 0 0 1px;
    height: 1px;
    margin: 5px 0 2px;
    background: rgba(255, 255, 255, 0.18);
}

.choice-policy {
    color: #93c5fd;
    margin-left: 4px;
    font-variant-numeric: tabular-nums;
}

/* ── "Divided as you choose" assignment panel (see distRender in hybrid.js) ──
   #choices is a wrapping flex row on desktop and a column on mobile, so the panel takes
   the full basis on both axes and lays itself out. */
.assign-panel {
    width: 100%;
    flex: 0 1 auto;
    max-height: 100%;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.assign-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 11px;
    color: #cbd5e1;
}
.assign-total { font-variant-numeric: tabular-nums; font-size: 13px; }
.assign-total b { font-size: 16px; color: #fff; }
.assign-total.assign-done b { color: #4ade80; }
.assign-total.assign-over b { color: #f87171; }
.assign-hint { opacity: 0.6; }
.assign-hint-over { color: #f87171; opacity: 0.95; }

.assign-actions { display: flex; gap: 6px; }
.assign-actions .btn { flex: 1 1 0; font-size: 12px; padding: 5px 8px; }

/* ── The per-card steppers ──
   One overlay pinned to #game-board, with each stepper placed under its card from live
   coordinates (see distPaintBoard). It has to live outside the zones: an arena is a
   scrolling grid barely taller than one card, so a stepper anchored below a card in there
   would be clipped away by the zone's own overflow. */
#assign-layer {
    position: absolute;
    inset: 0;
    z-index: 60;
    pointer-events: none;     /* only the steppers themselves take clicks */
}

.assign-stepper {
    position: absolute;
    transform: translateX(-50%);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(9, 13, 22, 0.94);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55);
}
.assign-step {
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}
.assign-step:disabled { opacity: 0.3; cursor: default; }
.assign-input {
    width: 34px;
    height: 22px;
    padding: 0;
    text-align: center;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
/* Chrome/Safari put spinners inside the field; the +/- buttons are the control here. */
.assign-input::-webkit-outer-spin-button,
.assign-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.assign-input { -moz-appearance: textfield; }


.arena-zone {
    background: rgb(73 189 255 / 10%) !important;
}

/* Action log entry layout + coloring (applies to desktop sidebar and mobile modal). */
.action-log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-log-choice {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.action-log-meta {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Color each entry by whose turn it is: red for AI, blue for player. */
.action-log-item.log-ai {
    border-left: 3px solid rgba(248, 113, 113, 0.85);
    background: rgba(248, 113, 113, 0.06);
}

.action-log-item.log-player {
    border-left: 3px solid rgba(96, 165, 250, 0.85);
    background: rgba(96, 165, 250, 0.06);
}

.action-log-diff {
    font-size: 10px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.action-log-diff-up { color: #4ade80; }
.action-log-diff-down { color: #f87171; }
.action-log-diff-flat { color: rgba(255, 255, 255, 0.4); }

/* ── Granular action log: capsules, lines, segments, dividers ──────────────── */
/* A capsule groups one whole TURN (an action + all its resolution across decisions),
   coloured by who acted. */
.log-capsule {
    border-left: 3px solid rgba(255, 255, 255, 0.25);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.03);
    margin: 2px 0;
    padding: 3px 6px;
    cursor: pointer;
    transition: background 0.12s ease, box-shadow 0.12s ease;
}
.log-capsule:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    transform: translateX(1px);
}
.log-capsule.cap-player {           /* the human (p2) acted */
    border-left-color: rgba(96, 165, 250, 0.85);
    background: rgba(96, 165, 250, 0.06);
}
.log-capsule.cap-ai {               /* the AI (p1) acted */
    border-left-color: rgba(248, 113, 113, 0.85);
    background: rgba(248, 113, 113, 0.06);
}
/* Current state we're viewing in the timeline. */
.log-capsule.cap-current {
    box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.85), 0 0 8px rgba(253, 224, 71, 0.35);
    background: rgba(253, 224, 71, 0.08);
}

/* One action line — multi-line allowed (no truncation). */
.log-line {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
    padding: 1px 0;
    font-size: 12px;
    color: #d1d5db;
}
.log-line.log-nested { opacity: 0.9; font-size: 11px; }
.log-line.log-nested::before { content: "↳ "; opacity: 0.5; }
/* Small gap between the distinct sub-actions (decision steps) within one turn's capsule. */
.log-line.log-substep { margin-top: 6px; }

/* Per-kind line colouring — the base tint tells you WHAT happened. */
.log-kind-attack    { color: #fb923c; }
.log-kind-damage    { color: #f87171; }
.log-kind-defeat    { color: #ef4444; font-weight: 600; }
.log-kind-heal      { color: #4ade80; }
.log-kind-ability   { color: #fcd34d; }
.log-kind-play      { color: #86efac; }
.log-kind-draw      { color: #7dd3fc; }
.log-kind-resource  { color: #9ca3af; }
.log-kind-reveal    { color: #c4b5fd; }
.log-kind-look      { color: #67e8f9; }
.log-kind-pass      { color: #9ca3af; }
.log-kind-take_init { color: #fbbf24; }
.log-kind-mulligan  { color: #a5b4fc; }

/* Highlighted parameters within a line. Card names and numbers pop; the actor label
   (You/AI) inherits the action's colour — the capsule border already shows who acted. */
.seg-card    { font-weight: 700; color: #f8fafc; }
.seg-num     { font-weight: 700; color: #fde68a; }
.seg-ability { font-weight: 600; }
.seg-you, .seg-ai { color: inherit; font-weight: inherit; }
/* The (cid) tag after a card name — the engine card index, matching the board's cid.
   Dim and monospaced so it reads as an identifier without competing with the name. */
.seg-cid     { font-family: monospace; font-size: 0.85em; opacity: 0.55; font-weight: 600; }

/* Round / phase timeline divider — a spaced label ("Round 1 — Action"). */
.log-divider {
    margin: 12px 0 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}
.log-divider:first-child { margin-top: 2px; border-top: none; }

.log-reveal-btn {
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid rgba(250, 204, 21, 0.5);
    color: #facc15;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1;
    padding: 1px 5px;
    margin-left: 6px;
    cursor: pointer;
    vertical-align: middle;
}
.log-reveal-btn:hover { background: rgba(250, 204, 21, 0.3); }

/* Reveal modal — hidden cards the human got to see */
.reveal-modal-body { display: flex; flex-direction: column; gap: 16px; }
.reveal-caption { font-size: 13px; opacity: 0.85; margin-bottom: 6px; }
.reveal-card-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.reveal-card-img {
    width: 120px;
    max-width: 32vw;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: block;
}

/* Search modal — the top-N pool: eligible cards are pickable, the rest are dimmed. */
.search-card { position: relative; border-radius: 8px; transition: transform 0.1s ease; }
.search-card.eligible { cursor: pointer; }
.search-card.eligible:hover { transform: translateY(-4px); }
.search-card.eligible .reveal-card-img { outline: 2px solid rgba(74, 222, 128, 0.9); }
.search-card.ineligible { opacity: 0.4; filter: grayscale(0.6); cursor: default; }
/* Already picked earlier in this (multi-select) search — chosen, not selectable-again. */
.search-card.chosen { cursor: default; }
.search-card.chosen .reveal-card-img { outline: 3px solid rgba(253, 224, 71, 0.95); box-shadow: 0 0 12px rgba(253, 224, 71, 0.4); }
.search-card.chosen::after {
    content: "✓";
    position: absolute;
    top: 4px; right: 6px;
    color: #0b0b0b;
    background: rgba(253, 224, 71, 0.95);
    border-radius: 50%;
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}

/* Mobile: a taller Action Log modal — but not so tall that the backdrop, which is how
   you dismiss it, has no room left to tap. */
@media (max-width: 1023px) {
    #log-modal.modal-card {
        display: flex;
        flex-direction: column;
        height: 76dvh;
        max-height: 76dvh;
    }
    #log-modal .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;   /* override .scrollable-modal-content's cap so the log fills the modal */
        overflow: hidden;   /* the list below is the scroller, so ITS padding bounds the entries */
        padding: 8px 8px;
    }
    /* The list scrolls (not the modal body) so its own padding rides along with the
       content — otherwise the body's bottom padding is outside the scrolled area and
       the final entry sits flush against, and clipped by, the modal's edge. */
    #log-modal #action-log-container {
        height: 100%;
        max-height: none;
        overflow-y: auto;
        padding: 4px 8px 14px;
    }

    /* Reveal / search modals: a big reveal (a 7-card deck peek) would otherwise grow to
       nearly the full viewport, leaving no backdrop to tap and no obvious way out on a
       phone. Cap the card itself and let its body scroll, so there is always a strip of
       backdrop above and below. */
    #reveal-modal.modal-card, #search-modal.modal-card {
        max-height: 72dvh;
    }
    #reveal-modal .modal-body, #search-modal .modal-body {
        max-height: none;   /* the .modal-card cap above is the real bound now */
        /* min-height:0 is what actually lets a flex item shrink past its content and
           scroll; without it the body keeps its full height and the cap does nothing. */
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
    }
}

/* ── Deck stacking picker ────────────────────────────────────────────────── */

.deck-stack-btn {
    position: relative;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 0;
    transition: color 0.15s ease;
}
.deck-stack-btn:hover { color: #fde047; }
.deck-stack-btn.has-stack { color: #fde047; }

/* Count of cards currently stacked, so the decks modal shows at a glance that this
   game will not be dealt from a clean shuffle. */
.deck-stack-badge {
    position: absolute;
    top: -3px; right: -3px;
    min-width: 13px; height: 13px;
    padding: 0 3px;
    border-radius: 999px;
    background: #fde047;
    color: #0b0b0b;
    font-size: 9px;
    font-weight: 700;
    line-height: 13px;
    text-align: center;
}
.deck-stack-badge[hidden] { display: none; }

.deck-stack-hint {
    margin: 0 0 10px;
    font-size: 11px;
    line-height: 1.5;
    color: #94a3b8;
}

.deck-stack-counter {
    float: right;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 11px;
    white-space: nowrap;
}
.deck-stack-counter.at-max { background: rgba(253, 224, 71, 0.22); color: #fde047; }

.deck-stack-grid {
    display: grid;
    /* Column COUNT is fixed per breakpoint and the cards scale to fit, rather than the
       reverse. A minmax/auto-fill track would reflow to a different number of columns as
       the modal resizes, and a decklist reads much better when a row is a stable width. */
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 46dvh;
    overflow-y: auto;
    padding: 2px;
}

.deck-stack-card {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.12s ease, filter 0.12s ease;
}
.deck-stack-card img { display: block; width: 100%; }
.deck-stack-card:hover { border-color: rgba(253, 224, 71, 0.55); }
.deck-stack-card.chosen { border-color: #fde047; }
/* Not a hard block — tapping a maxed-out card still cycles it back to 0, which is how
   you make room. This only signals "adding more isn't available right now". */
.deck-stack-card.budget-full:not(.chosen) { filter: brightness(0.5); }

.deck-stack-count {
    position: absolute;
    top: 3px; right: 3px;
    min-width: 19px;
    padding: 1px 4px;
    border-radius: 999px;
    background: #fde047;
    color: #0b0b0b;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.deck-stack-copies {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1px 0;
    background: rgba(3, 7, 18, 0.82);
    color: #94a3b8;
    font-size: 9px;
    text-align: center;
}

.deck-stack-empty {
    grid-column: 1 / -1;
    padding: 20px 0;
    text-align: center;
    color: #64748b;
    font-size: 12px;
}

/* All three actions on one line. Equal flex basis with min-width:0 so the labels shrink
   together rather than one wrapping first on a narrow phone. */
.deck-stack-button-row {
    display: flex;
    gap: 8px;
}
.deck-stack-button-row .btn {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
}

/* Share sits among the settings buttons, so it needs the icon+label centred the way the
   plain text buttons around it are. */
.share-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

/* ── Share ───────────────────────────────────────────────────────────────── */

.share-hint { margin: 0 0 10px; font-size: 12px; color: #94a3b8; }

.share-link-row { display: flex; gap: 8px; align-items: stretch; }

#share-link-input {
    flex: 1 1 auto;
    min-width: 0;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 7px 10px;
    color: #e2e8f0;
    font-size: 11px;
    font-family: monospace;
}

#share-copy-btn { flex: 0 0 auto; }

.share-note {
    margin: 12px 0 0;
    font-size: 10.5px;
    line-height: 1.55;
    color: #64748b;
}

@media (max-width: 1023px) {
    #deck-stack-modal.modal-card, #share-modal.modal-card { max-height: 80dvh; }
    .deck-stack-grid { grid-template-columns: repeat(3, 1fr); max-height: 42dvh; }
}

/* Desktop: the stacking picker is a browsing surface — you are scanning a whole decklist
   for the few cards you want — so it takes more width than a normal modal (the .modal-card
   base caps everything at 360px, hence the !important). Five columns, with the width
   chosen to suit them: enough that the art is readable without the cards ballooning. */
@media (min-width: 1024px) {
    #deck-stack-modal.modal-card {
        width: min(92vw, 720px) !important;
        max-width: min(92vw, 720px) !important;
        max-height: 86vh;
    }
    .deck-stack-grid {
        grid-template-columns: repeat(5, 1fr);
        max-height: 58vh;
        gap: 10px;
    }
    #share-modal.modal-card { max-width: 560px !important; }
}

@keyframes prismatic-rainbow-bg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.winner-highlight {
    position: relative !important;
}

.winner-highlight::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(120deg, rgba(255,0,0,0.24), rgba(255,127,0,0.24), rgba(255,255,0,0.24), rgba(0,255,0,0.24), rgba(0,0,255,0.24), rgba(75,0,130,0.24), rgba(148,0,211,0.24), rgba(255,0,0,0.24));
    background-size: 400% 400%;
    animation: prismatic-rainbow-bg 5s linear infinite !important;
    pointer-events: none;
    z-index: 1 !important;
    border-radius: 12px;
}

/* Ensure cards and active elements stay on top of the transparent overlay */
.winner-highlight .card-container,
.winner-highlight .card,
.winner-highlight .res-count-label,
.winner-highlight .init-slot,
.winner-highlight #probability-bar-container,
.winner-highlight .deck,
.winner-highlight .discard-pile,
.winner-highlight .zone-cards {
    position: relative;
    z-index: 2 !important;
}

/* Modal POP animation */
@keyframes pop-in {
    0% {
        transform: scale(0.8) translateY(30px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

#game-over-modal {
    animation: pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

#game-over-title {
    font-family: 'StarJedi';
    font-size: 2.25rem !important;
    font-weight: 800 !important;
    text-align: center;
    width: 100%;
    margin: 10px 0;
    background: linear-gradient(to right, #ff3333, #3333ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(51, 51, 255, 0.3);
}

/* Vertical stacked buttons for Game Over modal */
#game-over-modal .modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
}

#game-over-modal .modal-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important; /* gap between buttons */
    width: 100% !important;
    margin-top: 0px !important;
    box-sizing: border-box;
}

#game-over-modal .modal-buttons button {
    display: block !important;
    width: 100% !important;
    font-size: 0.9rem !important; /* larger text */
    padding: 12px 20px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    box-sizing: border-box;
    text-align: center;
}

/* Don't darken the play area when the game over modal is active */
#modal-overlay:has(#game-over-modal:not(.hidden)) {
    background-color: transparent !important;
}

/* Bug Report Modal */
.bug-report-notice {
    font-size: 12px;
    color: var(--text-muted, #9ca3af);
    margin-bottom: 12px;
    font-style: italic;
}

.bug-report-field {
    margin-bottom: 12px;
}

.bug-report-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-secondary, #d1d5db);
}

.bug-report-select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #374151);
    background: var(--input-bg, #1f2937);
    color: var(--text-primary, #f9fafb);
    font-size: 13px;
    outline: none;
}

.bug-report-select:focus {
    border-color: var(--accent-color, #3b82f6);
}

.bug-report-textarea {
    width: 100%;
    height: 140px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #374151);
    background: var(--input-bg, #1f2937);
    color: var(--text-primary, #f9fafb);
    font-size: 13px;
    resize: vertical;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}

.bug-report-textarea:focus {
    border-color: var(--accent-color, #3b82f6);
}

.bug-report-error.hidden,
.bug-report-success.hidden {
    display: none;
}

.bug-report-error {
    font-size: 12px;
    color: #f87171;
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.bug-report-success {
    font-size: 12px;
    color: #4ade80;
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

#bug-report-modal .modal-buttons {
    display: flex;
    gap: 8px;
}

/* ============================================================================
   Card preview — stat chips overlaid on the art (top-right), with the
   Upgrades and Granted lists below. Shared by the mobile overlay (#card_preview)
   and the desktop sidebar panel (.desktop-preview-img-container / -stats).
   ============================================================================ */

/* Small stat chips stacked in the top-right corner of the card art. */
.preview-stats-overlay {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
    pointer-events: none;
    padding: 8px;
    background-color: #000f;
    border-radius: 8px;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 34px;
    padding: 2px 6px;
    border-radius: 5px;
    font-family: 'Outfit', 'Inter', sans-serif;
    line-height: 1;
    background: rgba(10, 14, 24, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.stat-chip .chip-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.9;
}

.stat-chip .chip-value {
    font-size: 18px;
    font-weight: 800;
    margin-left: auto;
    color: #fff;
}

.stat-chip.power  { border-color: rgba(239, 68, 68, 0.9); }
.stat-chip.power  .chip-label { color: #fca5a5; }
.stat-chip.hp     { border-color: rgba(59, 130, 246, 0.9); }
.stat-chip.hp     .chip-label { color: #93c5fd; }
.stat-chip.damage { border-color: rgba(220, 38, 38, 0.95); background: rgba(80, 12, 12, 0.85); }
.stat-chip.damage .chip-label { color: #fca5a5; }
.stat-chip.damage .chip-value { color: #ffd7d7; }
.stat-chip.shield { border-color: rgba(6, 182, 212, 0.9); }
.stat-chip.shield .chip-label { color: #67e8f9; }
.stat-chip.exp    { border-color: rgba(16, 185, 129, 0.9); }
.stat-chip.exp    .chip-label { color: #6ee7b7; }

/* Upgrades / Granted lists (below the art). */
.preview-upgrades-section,
.preview-granted-section {
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    z-index: 0;
}
.preview-granted-section { margin-top: 0px; }

.upgrades-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
    margin: 0 0 6px 0;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.upgrade-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 5px 9px;
    margin-bottom: 4px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
}
.upgrade-row:last-child { margin-bottom: 0; }

.upgrade-name { color: #ffffff; font-weight: 600; }
.upgrade-mods {
    color: #38bdf8;
    font-weight: 700;
    font-family: monospace;
    font-size: 13px;
}

/* A granted ability / modifier: the effect on the left, the granting card on the right. */
.granted-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 4px;
    padding: 5px 9px;
    margin-bottom: 4px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
}
.granted-row:last-child { margin-bottom: 0; }

/* Source on the LEFT (attribution, dim — truncates if long so it never crowds the value);
   modifier on the RIGHT, right-aligned to line up with the upgrade mods column above. */
.granted-source {
    color: #94a3b8;
    font-size: 11px;
    font-style: italic;
    text-align: left;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.granted-label {
    color: #e5e7eb;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Mobile full-screen preview overlay (only shown on narrow viewports). Ported so the
   card art + stat overlay render correctly; the desktop panel has its own container rules. */
#card_preview {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 285px;
    height: 399px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    border-radius: 12px;
    display: none;
}
#card_preview.landscape-preview {
    width: 320px;
    height: 229px;
}
