:root {
    --cell-width: 4.75%;
    --clr-g-bkg: #003300;
    --clr-g-text: white;
    --clr-g-link: #cccc00;
    --clr-hex-border: #000000;
    --clr-p-a: #ffcc00;
    --clr-p-b: #0055d4;
    --clr-p-c: #444444;
    --clr-p-d: #cccccc;
    --clr-p-e: #aa00aa;

    --fx-hex-transparency: 10%;
    --fx-loc-transparency: 15%;
}

html{
    background-image: url("/assets/green-felt-3e609176.jpg");
    background-size: cover;
    background-color: var(--clr-g-bkg);
    color: var(--clr-g-text);
}

body.game-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

#game-area {
    display: grid;
    grid-template-areas:
        "main players-area game-log";
    grid-template-columns: 5fr 2fr 2fr;
    grid-template-rows: 1fr;
    flex: 1;
    min-height: 0;
}

main {
    grid-area: main;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#board-viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
    cursor: grab;
}

#board-viewport.grabbing {
    cursor: grabbing;
}

section#log {
    grid-area: game-log;
    overflow-y: auto;
    height: 100%;
}

#log .move {
    margin: 1px;
    padding: 1px;
    &.a { background-color: oklch(from var(--clr-p-a) l c h / 30%); }
    &.b { background-color: oklch(from var(--clr-p-b) l c h / 30%); }
    &.c { background-color: oklch(from var(--clr-p-c) l c h / 30%); }
    &.d { background-color: oklch(from var(--clr-p-d) l c h / 30%); }
    &.e { background-color: oklch(from var(--clr-p-e) l c h / 30%); }
}

.game-section {
    background-color: var(--clr-g-bkg);
    border: 0;
    margin: 2px;
    padding: 1px 2px;
    border-radius: 8px;
}

.mandatory-count {
    display: none;
}

#goals ul,#tasks ul {
    padding: inherit;
    margin: inherit;
}

#board {
    display: grid;
    grid-template-columns: 10fr 10fr 1fr;
    height: 60vw;
    margin-left: 5px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform-origin: 0 0;
    will-change: transform;
}

.quadrant {
    display: grid;
    grid-template-columns: repeat(21, 1fr);
    grid-template-rows: repeat(10, 1fr);
}

.quadrant.right {
    margin-left: -14px;
}

.quadrant.bottom {
    margin-top: 3px;
}

.hex, .marker {
    grid-column: span 2;
    position: relative;
}

.hex {
    --cell-padding: calc(var(--cell-width) * 2.0 / sqrt(3));
    border-radius: 15%;
    position: relative;
    border: 1px solid #0004;
    margin: 0.25px;
}

.hex > .hex-outline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

svg {
    width: 100%;
    height: 102%;
}

ul li .hex:hover {
    background-color: #fd005f;
}

#board .selectable {
    cursor: pointer;
    width: 95%;
    height: 95%;
    margin: auto;
}

#board .selectable:hover {
    box-shadow: 0 0 10px 5px white;
}

#board .selected {
    transform: scale(1.25);
    box-shadow: 0 0 0 2px #f0c040, 0 0 14px 4px rgba(240, 192, 64, 0.7);
    z-index: 10;
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}

@property --angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

.selectable::after {
    --angle: 0deg;
    content: "";
    position: absolute;
    border-radius: 5px;
    height: 100%;
    width: 100%;
    background-image: conic-gradient(from var(--angle), black, white, black, white, black);
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    z-index: -1;
    padding: 3px;
    animation: 5s spin linear infinite;
}

@keyframes spin {
    from {
        --angle: 0deg;
    }
    to {
        --angle: 360deg;
    }
}

.tile {
    background-repeat: no-repeat;
    background-size: 300% 400%;
}

.tile-container {
    height: 100%;
    width: 100%;
    position: relative;
}

.hex .tile-container {
    position: absolute;
}

.tile-container .tile {
    height: 100%;
    width: 100%;
    position: absolute;
}

.tile-container div:nth-child(1) {
    z-index: 1;
}

.tile-container div:nth-child(2) {
    z-index: 2;
}

.tile-container div:nth-child(3) {
    left: -3px;
    top: -3px;
    z-index: 3;
}

.tile.location-barn {
    background-position: 15% 15%;
}

.tile.location-farm {
    background-position: 50% 0;
}

.tile.location-harbor {
    background-position: 15% 15%;
}

.tile.location-oasis {
    background-position: 0 66.667%;
}

.tile.location-oracle {
    background-position: 15% 15%;
}

.tile.location-paddock {
    background-position: 100% 33.333%;
}

.tile.location-tavern {
    background-position: 100% 0;
}

.tile.location-tower {
    background-position: 15% 15%;
}

.tile-counter {
    position: absolute;
    top: 0;
    right: 0;
    width: 48%;
    height: 48%;
    background: #cc1100;
    clip-path: polygon(100% 0, 100% 100%, 0 0);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 4% 6% 0 0;
    color: white;
    font-size: 0.75em;
    font-weight: 900;
    line-height: 1;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

#end-game-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.tile-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #0d1f0d;
    border: 1px solid var(--clr-g-link);
    box-shadow: 0 0 12px rgba(204, 204, 0, 0.25), 0 4px 16px rgba(0,0,0,0.7);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.75em;
    color: #ddd;
    width: 160px;
    z-index: 200;
    pointer-events: none;
    will-change: transform, opacity;
    animation: goal-tooltip-in 0.12s ease-out;
}

.hex:hover .tile-tooltip {
    display: block;
}

.hex.left .tile-tooltip {
    left: 0;
    transform: none;
    animation: tile-tooltip-in-left 0.12s ease-out;
}

.hex.right .tile-tooltip {
    left: auto;
    right: 0;
    transform: none;
    animation: tile-tooltip-in-left 0.12s ease-out;
}

.hex.top-row .tile-tooltip {
    bottom: auto;
    top: calc(100% + 6px);
}

@keyframes tile-tooltip-in-left {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Terrains suitable for building */
/* canyon */
.hex.terrain-c {
    background-color: color-mix(in srgb, #a52a2a, transparent var(--fx-hex-transparency));
}

/* desert */
.hex.terrain-d {
    background-color: color-mix(in srgb, #ffd700, transparent var(--fx-hex-transparency));
}

/* flower field */
.hex.terrain-f {
    background-color: color-mix(in srgb, darkorchid, transparent var(--fx-hex-transparency));
}

/* grassland */
.hex.terrain-g {
    background-color: color-mix(in srgb, rgb(0,255,5), transparent var(--fx-hex-transparency));
}

/* timberland (forest) */
.hex.terrain-t {
    background-color: color-mix(in srgb, forestgreen, transparent var(--fx-hex-transparency));
}

/* Terrains normally not suitable for building */
/* mountain */
.hex.terrain-m {
    background-color: color-mix(in srgb, #444, transparent var(--fx-hex-transparency));
}

/* water */
.hex.terrain-w {
    background-color: color-mix(in srgb, royalblue, transparent var(--fx-hex-transparency));
}

/* Special terrains */
.hex.terrain-l, .hex.terrain-s {
    width: 95%;
    height: 95%;
    margin: auto;
}

/* location (tiles, nomads) */
.hex.terrain-l {
    background-color: color-mix(in srgb, goldenrod, transparent var(--fx-loc-transparency));
}

/* silver (castle, palace, etc) */
.hex.terrain-s {
    background-color: color-mix(in srgb, silver, transparent var(--fx-loc-transparency));
}

.hex.terrain-s:before, .hex.terrain-l:before {
    content: "";
    position: absolute;
    border-radius: 5px;
    height: 100%;
    width: 100%;
    background-image: conic-gradient(from var(--angle), black, white, black, white, black);
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    padding: 3px;
    z-index: -1;
}

.hex .terrain-castlehex {
    height: inherit;
    width: inherit;
    background-image: url("/assets/silver/castle-5a03f4a7.svg");
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: 1px 3px;
}

.hex .terrain-nomad {
    height: inherit;
    width: inherit;
    background-image: url("/assets/silver/nomad-050604bb.svg");
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: 1px 3px;
}

.tile-container.barn {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/barn-12f32ed5.svg");
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.farm {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/farm-43a1c958.svg");
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.harbor {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/harbor-187b6cc6.svg");
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.oasis {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/oasis-9c1bd449.svg");
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.oracle {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/oracle-47226be7.svg");
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.paddock {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/paddock-12aa3b12.svg");
    background-size: 81%;
    background-repeat: no-repeat;
    background-position: center 65%;
}

.tile-container.tavern {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/tavern-44f29f02.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.tower {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/tower-e5245793.svg");
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.mandatory {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/mandatory-5a03f4a7.svg");
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.caravan {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/caravan-efae6af4.svg");
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.garden {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/garden-98fbce4a.svg");
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.quarry {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/quarry-85e9e057.svg");
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.village {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/village-61129cf7.svg");
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.barracks {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/barracks-ca0d1224.svg");
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.cityhall {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/cityhall-9db5700d.svg");
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.crossroads {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/crossroads-475dfb44.svg");
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.foresterslodge {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/foresterslodge-975c3a83.svg");
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.fort {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/fort-9a1438ae.svg");
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.lighthouse {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/lighthouse-93098d76.svg");
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.monastery {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/monastery-98945127.svg");
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.wagon {
    height: 100%;
    width: 100%;
    background-image: url("/assets/gold/wagon-e7641b30.svg");
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center 75%;
}


.tile-container.outpost,
.tile-container.resettlement,
.tile-container.sword,
.tile-container.treasure,
.tile-container.donationcanyon,
.tile-container.donationdesert,
.tile-container.donationflower,
.tile-container.donationgrass,
.tile-container.donationmountain,
.tile-container.donationtimber,
.tile-container.donationwater {
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.tile-container.outpost      { background-image: url("/assets/nomad/outpost-83f2c50d.svg"); }
.tile-container.resettlement { background-image: url("/assets/nomad/resettlement-16cd9bfa.svg"); }
.tile-container.sword        { background-image: url("/assets/nomad/sword-3d81425c.svg"); }
.tile-container.treasure     { background-image: url("/assets/nomad/treasure-1eac9776.svg"); }

.tile-container.donationcanyon   { background-image: url("/assets/nomad/donationcanyon-704f7b5d.svg"); }
.tile-container.donationdesert   { background-image: url("/assets/nomad/donationdesert-f90746fe.svg"); }
.tile-container.donationflower   { background-image: url("/assets/nomad/donationflower-b9d650d5.svg"); }
.tile-container.donationgrass    { background-image: url("/assets/nomad/donationgrass-adfbe89a.svg"); }
.tile-container.donationmountain { background-image: url("/assets/nomad/donationmountain-c62ee759.svg"); }
.tile-container.donationtimber   { background-image: url("/assets/nomad/donationtimber-3ec5662b.svg"); }
.tile-container.donationwater    { background-image: url("/assets/nomad/donationwater-adee8e02.svg"); }

.hex .tile-container.donationcanyon,
.hex .tile-container.donationdesert,
.hex .tile-container.donationflower,
.hex .tile-container.donationgrass,
.hex .tile-container.donationmountain,
.hex .tile-container.donationtimber,
.hex .tile-container.donationwater,
.hex .tile-container.outpost,
.hex .tile-container.resettlement {
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center 75%;
}

.hex .tile-container.donationcanyon   { background-image: url("/assets/nomad/donationcanyon-704f7b5d.svg"); }
.hex .tile-container.donationdesert   { background-image: url("/assets/nomad/donationdesert-f90746fe.svg"); }
.hex .tile-container.donationflower   { background-image: url("/assets/nomad/donationflower-b9d650d5.svg"); }
.hex .tile-container.donationgrass    { background-image: url("/assets/nomad/donationgrass-adfbe89a.svg"); }
.hex .tile-container.donationmountain { background-image: url("/assets/nomad/donationmountain-c62ee759.svg"); }
.hex .tile-container.donationtimber   { background-image: url("/assets/nomad/donationtimber-3ec5662b.svg"); }
.hex .tile-container.donationwater    { background-image: url("/assets/nomad/donationwater-adee8e02.svg"); }
.hex .tile-container.outpost    { background-image: url("/assets/nomad/outpost-83f2c50d.svg"); }
.hex .tile-container.resettlement { background-image: url("/assets/nomad/resettlement-16cd9bfa.svg"); }

.hex-map-image {
    background-size: 300% 450%;
    content: "";
    display: block;
    height: 0;
    margin-top: 0;
}

.castle-hex {
    background-position: 0 0;
}

.tavern-hex {
    background-position: 0 25%;
}

.paddock-hex {
    background-position: 0 50%;
}

.oasis-hex {
    background-position: 50% 48%;
}

.farm-hex {
    background-position: 100% 0;
}

.map-cell-content.castle {
    background-position: 0 0;
}

.map-cell-content.tavern {
    background-position: 0 20%;
}

.map-cell-content.paddock {
    background-position: 0 40%;
}

.map-cell-content.oasis {
    background-position: 33.33% 40%;
}

.map-cell-content.farm {
    background-position: 66.67% 0;
}

.li {
    list-style: none;
}

.hex-settlement {
    position: absolute;
    top: 14%;
    left: 21%;
    width: 66%;
    height: 66%;
}

.city-hall-settlement {
    filter: drop-shadow(0 0 5px gold) drop-shadow(0 0 2px #b8860b);
}

.city-hall-bg {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    pointer-events: none;
}

.hex.city-hall-preview::after {
    --angle: 0deg;
    content: "";
    position: absolute;
    border-radius: 5px;
    height: 100%;
    width: 100%;
    background-image: conic-gradient(from var(--angle), #5a3a00, gold, #ffd700, gold, #5a3a00);
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    z-index: -1;
    padding: 3px;
    animation: 3s spin linear infinite;
}

.hex-wall {
    background-image: url("/assets/wall-32589393.svg");
    background-repeat: no-repeat;
    background-size: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hex-mystery {
    background-image: url("/assets/mystery-56c087b5.svg");
    background-repeat: no-repeat;
    background-size: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


#scoring {
    background-color: black;
    position: relative;
}

#scoring ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.goals-label {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.goal-item {
    position: relative;
    cursor: default;
}

.goal-name {
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: color 0.15s;
}

.goal-signifier {
    font-size: 0.75em;
}

.goal-item:hover .goal-name {
    color: var(--clr-g-link);
}

.goal-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: #0d1f0d;
    border: 1px solid var(--clr-g-link);
    box-shadow: 0 0 12px rgba(204, 204, 0, 0.25), 0 4px 16px rgba(0,0,0,0.7);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.8em;
    color: #ddd;
    width: 200px;
    z-index: 100;
    pointer-events: none;
    animation: goal-tooltip-in 0.12s ease-out;
}

.goal-item:hover .goal-tooltip {
    display: block;
}

@keyframes goal-tooltip-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

#turn-state-bar {
    background-color: black;
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    height: 2.5em;
}

#dashboard-link-area {
    padding-left: 0.75em;
}

#sound-controls {
    display: flex;
    align-items: center;
    gap: 0.4em;
    padding-left: 1.25em;
}

#audio-unlock-prompt {
    font-size: 0.75em;
    color: #aaa;
    white-space: nowrap;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 0.1em 0.35em;
    animation: sound-prompt-pulse 1.5s ease-in-out infinite;
}

@keyframes sound-prompt-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

#mute-btn {
    background: none;
    border: 1px solid #555;
    border-radius: 3px;
    color: inherit;
    cursor: pointer;
    font-size: 1em;
    line-height: 1;
    padding: 0.1em 0.3em;
}

#mute-btn.muted {
    background: rgba(220, 60, 60, 0.35);
    border-color: #cc4444;
    color: #ff9090;
}

#volume-slider {
    width: 5em;
}

#turn-state {
    text-align: center;
}

#end-turn-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5em;
    height: 100%;
}

#end-turn-area button, #end-turn-area [type="submit"] {
    font-size: 0.85em;
    padding: 0.2em 0.75em;
}

#players-area {
    display: flex;
    flex-direction: column;
    gap: 1em;
    font-family: monospace;
    font-weight: 600;
    margin: 8px;
    height: calc(100vh - 2.5em - 16px);
}


.player-area {
    background-color: #4a7a4a;
    color: #111;
    padding: 4px;
    flex: 1 0 auto;
    border-left: 3px solid transparent;
}

.player-area:has(.player-spinner) {
    background-color: #5a8f5a;
    border-left-color: var(--clr-g-link);
}

.player-info-zone {
    padding: 2px 2px 4px;
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.player-header form {
    display: contents;
}

.player-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}

.supply-display {
    display: flex;
    align-items: center;
    gap: 4px;
}

.supply-settlements {
    border: 2px solid #0008;
    border-radius: 8px;
    padding: 2px 6px;
}

.player-action-zone {
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    padding-top: 4px;
    margin-top: 2px;
}

.undo-btn {
    font-size: 0.7em;
    padding: 3px 9px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    color: #ddd;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}

.undo-btn:not([disabled]):hover {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

.undo-btn[disabled] {
    opacity: 0.4;
    cursor: default;
}

.player-tiles {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.player-tile-popup {
    position: relative;
    display: inline-block;
    color: var(--clr-g-text);
}

.player-tile {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background-color: #1c1508;
    transition: opacity 0.2s, filter 0.2s, box-shadow 0.2s;
}

.player-tile .tile-container {
    filter: invert(1);
}

.player-tiles form {
    display: contents;
}

.player-tiles button {
    all: unset;
    display: block;
}

.tile-activatable {
    cursor: pointer;
    opacity: 1;
}

.tile-activatable:hover {
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.5);
}

.tile-inactive {
    opacity: 0.55;
}

.tile-used {
    filter: grayscale(100%);
    opacity: 0.3;
}

.tile-active {
    box-shadow: 0 0 0 2px #f0c040, 0 0 10px rgba(240, 192, 64, 0.7);
}

.player-spinner {
    /* background-image: url("/assets/tape-reel-0f078491.svg"); */
    animation: playspin 3s infinite linear;
    display: inline-block;
    width: 40px;
    transform-origin: 20px 20px;
}

@keyframes playspin {
    to {
        transform: rotate(-360deg);
    }
}

.handle {
    font-size: larger;
}

.first-player-marker {
    margin-left: 0.3em;
    vertical-align: middle;
}

.first-player-marker img {
    width: 40px;
}

.player-order {
    display: none;
}

.settlement-icon {
    display: inline-block;
    width: 36px;
    height: 38px;
}

.warrior-icon {
    display: inline-block;
    width: 36px;
    height: 38px;
}

.settlement-count {
    display: inline-block;
    font-size: 20px;
    font-weight: 700;
    min-width: 2ch;
    line-height: 1;
}

.score-container {
    position: relative;
    display: inline-block;
    cursor: default;
}

.player-score {
    font-size: 2em;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

.score-unit {
    font-size: 0.5em;
    font-weight: 400;
    opacity: 0.7;
    letter-spacing: 0;
}

.score-breakdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #0d1f0d;
    border: 1px solid var(--clr-g-link);
    box-shadow: 0 0 12px rgba(204, 204, 0, 0.25), 0 4px 16px rgba(0,0,0,0.7);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.8em;
    color: #ddd;
    min-width: 160px;
    z-index: 100;
    pointer-events: none;
    animation: score-breakdown-in 0.12s ease-out;
}

@keyframes score-breakdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.score-container:hover .score-breakdown {
    display: block;
}

.score-row {
    display: flex;
    justify-content: space-between;
    gap: 1.5em;
    padding: 2px 0;
}

.score-row-total {
    border-top: 1px solid #444;
    margin-top: 4px;
    padding-top: 4px;
    color: var(--clr-g-link);
    font-weight: 600;
}

.score-goal-value {
    text-align: right;
}

.player-card {
    background-size: 100%;
    width: 52px;
    height: 52px;
    color: transparent;
    display: inline-block;
    flex-shrink: 0;
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.35);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}

.player-card.card-Z {
    background-image: url("/assets/silver/castle-5a03f4a7.svg");
}

.player-card.card-G {
    background-image: url("/assets/grass-33d2a8b8.svg");
    background-position: 20%;
}

.player-card.card-C {
    background-image: url("/assets/canyon-233c488b.svg");
}

.player-card.card-D {
    background-image: url("/assets/desert-54b92ecd.svg");
}

.player-card.card-F {
    background-image: url("/assets/flowers-ad0ce5d6.svg");
}

.player-card.card-T {
    background-image: url("/assets/timberland-5e825230.svg");
}

.player-card.card-shunned {
    opacity: 0.35;
    filter: grayscale(60%);
    position: relative;
}

.meeple-popup {
    position: absolute;
    z-index: 100;
    background: #222;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.meeple-popup.hidden {
    display: none;
}

.popup-btn {
    background: #444;
    color: #eee;
    border: none;
    border-radius: 3px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 11px;
    width: 100%;
}

.popup-btn:hover {
    background: #666;
}

.popup-btn-cancel {
    background: #333;
    color: #aaa;
}

.popup-warning {
    color: #f90;
    font-size: 10px;
    padding: 2px 4px;
    display: block;
    text-align: center;
}
