.terra-dominus-dashboard {
    background: #f4f4f4;
    border: 1px solid #ddd;
    padding: 20px;
    margin: 20px 0;
    font-family: Arial, sans-serif;
}

.terra-dominus-dashboard h2 {
    color: #2c3e50;
}

/* --- games directory ------------------------------------------------ */
.td-games-filter-panel {
    border: 1px solid currentColor;
    margin: 0 auto 20px;
    padding: 12px 16px;
    max-width: 720px;
    background: var(--wp--preset--color--background, transparent);
}

.td-games-filter-panel legend {
    font-weight: 600;
    padding: 0 6px;
}

.td-games-filter-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.td-games-filter-options .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.td-games-filter-button {
    font-weight: 600;
}

.td-games-filter-button.is-active {
    cursor: default;
    text-decoration: underline;
}

.td-games-filter-button.is-active:hover,
.td-games-filter-button.is-active:focus-visible {
    text-decoration: underline;
}

.td-games-directory .sorted > a,
.td-dashboard-table .sorted > a {
    color: var(--wp--preset--color--primary, #007cba);
}

.td-games-directory .td-sort-indicator,
.td-dashboard-table .td-sort-indicator {
    margin-left: 4px;
}

.td-game-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.td-game-actions-heading,
.td-game-actions-cell {
    width: 1%;
}

.td-game-actions-menu {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.td-game-actions-summary {
    list-style: none;
    display: block;
    margin: 0;
}

.td-game-actions-summary::-webkit-details-marker {
    display: none;
}

.td-game-actions-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.td-game-actions-menu[open] > .td-game-actions {
    margin-top: 4px;
}

.td-game-action-form {
    margin: 0;
}

.td-game-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    white-space: nowrap;
}

/* --- claim map ------------------------------------------------------ */
#td-zoom-map {
        display: block;
        margin: 0 auto 10px;
}

#td-layer-options {
        display: none;
        justify-content: center;
        gap: 10px;
        margin-bottom: 10px;
}

#td-layer-options input {
        display: none;
}

#td-layer-options label {
        margin: 0;
        cursor: pointer;
}

#td-layer-options label.td-active {
        opacity: 0.6;
        pointer-events: none;
}
.td-map-grid {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        background-color: var(--wp--preset--color--background, transparent);
        width: max-content;
        margin: 0 auto;
}
.td-hex-row { display:flex; margin-top:-15px; }
/* vertical spacing uses 3/4 of hex height; offset rows accordingly */
.td-map-grid.td-zoomed .td-hex-row { margin-top:-30px; }
.td-map-grid .td-hex-row:first-child { margin-top:0; }
/* shift odd rows by half the hex width */
.td-row-odd { margin-left:26px; }
.td-map-grid.td-zoomed .td-row-odd { margin-left:52px; }
.td-hex-cell {
        width: 52px;
        height: 60px;
        margin:1px;
        cursor: pointer;
        box-sizing: border-box;
        border: 0;
        color:#fff;
        font-weight:bold;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        overflow: hidden;
        position: relative;
        clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* --- map legend ---------------------------------------------------- */
.td-map-legend {
        display: grid;
        gap: 1.5rem;
        margin: 1.5rem 0;
}

.td-legend-section {
        border: 1px solid currentColor;
        padding: 1rem;
        background: var(--wp--preset--color--background, rgba(0, 0, 0, 0.08));
}

.td-legend-section h3 {
        margin-top: 0;
        margin-bottom: 0.75rem;
}

.td-legend-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 1rem;
}

.td-legend-item {
        display: flex;
        gap: 1rem;
        align-items: flex-start;
}

.td-legend-visual {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 110px;
}

.td-legend-copy {
        flex: 1;
}

.td-legend-copy h4 {
        margin: 0 0 0.35rem;
}

.td-legend-copy p {
        margin: 0;
}

.td-legend-hex {
        position: relative;
        width: 90px;
        height: 104px;
        clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        box-sizing: border-box;
}

.td-legend-hex-land,
.td-legend-hex-capital {
        background: linear-gradient(180deg, #7fb763 0%, #2f6b3a 100%);
        color: var(--wp--preset--color--foreground, #111);
}

.td-legend-hex-water {
        background: linear-gradient(180deg, #4dc4ff 0%, #125b9f 100%);
        color: #fff;
}

.td-legend-hex-mountain {
        background: linear-gradient(180deg, #c4c4c4 0%, #4d4d4d 100%);
        color: #fff;
}

.td-legend-hex-emblem {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 65%),
                    linear-gradient(180deg, #7fb763 0%, #2f6b3a 100%);
}

.td-legend-emblem {
        width: 46px;
        height: 46px;
        border-radius: 50%;
        background:
                radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.2) 55%, transparent 80%),
                var(--wp--preset--color--primary, #007cba);
        opacity: 0.75;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
}

.td-map-legend .td-land-name {
        position: static;
        transform: none;
        display: inline-block;
        font-size: 0.75rem;
        white-space: nowrap;
        padding: 0.1rem 0.35rem;
        background: rgba(0, 0, 0, 0.35);
        color: #fff;
        border-radius: 3px;
}

.td-legend-token {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.4);
}

.td-legend-fish .td-res-icon {
        width: 20px;
        height: 20px;
}

.td-map-legend .td-capital-icon {
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: auto;
}

.td-map-legend .td-legend-unit-stack {
        position: static;
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-content: flex-start;
        padding: 0.25rem 0.5rem;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 6px;
}

.td-map-legend .td-legend-unit-stack .td-unit-chip {
        font-size: 0.75rem;
}

.td-legend-resource-card {
        max-width: 200px;
}

.td-legend-resource-card .td-resources {
        display: flex;
        flex-direction: column;
}

.td-legend-resource-card .td-res-item {
        margin-bottom: 0.35rem;
}

.td-legend-resource-card .td-res-item:last-child {
        margin-bottom: 0;
}

.td-legend-hint {
        margin-top: 1rem;
        font-style: italic;
}

/* --- messaging ------------------------------------------------------ */
.td-turn-group {
        margin-bottom: 1.5rem;
}
.td-turn-title {
        font-weight: 700;
        text-decoration: underline;
        margin-bottom: 0.5rem;
}
.td-thread-list {
        margin-left: 1rem;
}
.td-thread-header {
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        margin: 0;
        padding: 0.25rem 0;
        background: none;
        border: none;
        color: inherit;
        text-decoration: none;
}
.td-thread-header::before {
        content: '\25B6';
        font-size: 0.85em;
        transition: transform 0.2s ease;
}
.td-thread-header.td-open::before {
        content: '\25BC';
}
.td-thread-header:focus {
        outline: 2px solid var(--wp--preset--color--primary, #007cba);
        outline-offset: 2px;
}
.td-thread-title {
        text-decoration: underline;
}
.td-thread-body {
        margin: 0 0 1rem 1.5rem;
}
.td-thread-body ul {
        list-style: none;
        padding-left: 0;
        margin: 0 0 1rem;
}
.td-thread-body li + li {
        margin-top: 0.5rem;
}
.td-message-field label {
        display: block;
        font-weight: 600;
        margin-bottom: 0.25rem;
}
.td-message-field input[type="text"],
.td-message-field textarea {
        width: 100%;
        box-sizing: border-box;
}
.td-message-field textarea {
        min-height: 120px;
}
.td-terrain-water { background-color:#4dc4ff; border:0; }
.td-terrain-mountain { background-color:#888; }
.td-terrain-land { background-color:#9c6; }

.td-edge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.td-beach-edge {
    background: linear-gradient(to left, #e7d39b 0, #e7d39b 20%, transparent 20%, transparent 100%);
}

.td-mountain-edge {
    background: linear-gradient(to left, #bbb 0, #bbb 20%, transparent 20%, transparent 100%);
}

.td-kingdom-border {
    background: linear-gradient(to left, var(--td-kingdom-color) 0, var(--td-kingdom-color) 4px, transparent 4px, transparent 100%);
    z-index: 2;
}

.td-edge-ne { transform: rotate(-60deg); transform-origin:50% 50%; }
.td-edge-nw { transform: rotate(-120deg); transform-origin:50% 50%; }
.td-edge-w  { transform: rotate(180deg); transform-origin:50% 50%; }
.td-edge-sw { transform: rotate(120deg); transform-origin:50% 50%; }
.td-edge-se { transform: rotate(60deg); transform-origin:50% 50%; }
.td-edge-e  { /* default orientation */ }

.td-map-grid.td-zoomed .td-hex-cell {
        width: 104px;
        height: 120px;
}
.td-map-grid .taken { cursor: default; }

.td-map-grid .td-resources { display: none; }
.td-map-grid.td-show-resources .td-resources { display: block; }
.td-map-grid .td-terrain-water .td-resources {
    top: 50%;
    transform: translateY(-50%);
}
.td-map-grid.td-show-resources .td-unit-stack { display: none; }
.td-map-grid:not(.td-zoomed) .td-unit-stack { display: none; }
.td-resources {
    position: absolute;
    top: 26px;
    left: 8px;
    right: 8px;
    pointer-events: none;
    z-index: 1;
}
.td-card .td-resources {
    position: static;
}
.td-unit-stack {
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 2px;
    right: 2px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    gap: 1px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.td-land-name {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    z-index: 1;
    color: var(--wp--preset--color--foreground, #000);
    background: var(--wp--preset--color--background, #fff);
    padding: 0 2px;
    border-radius: 2px;
    display: none;
}

.td-map-grid.td-show-names .td-land-name {
    display: block;
}

.td-map-grid.td-show-names .td-unit-stack {
    display: none;
}

.td-map-grid.td-show-units .td-unit-stack {
    display: flex;
}

.td-capital-icon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 35%;
    height: auto;
    pointer-events: none;
    z-index: 0;
}

.td-map-grid:not(.td-show-resources) .td-capital-icon {
    width: 35%;
    height: auto;
}

.td-map-grid.td-zoomed .td-capital-icon {
    top: -6px;
}

.td-resources .td-res-item {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.td-resources .td-resource-bar-wrap {
    flex: 1;
    background-color: rgba(0,0,0,0.4);
    height: 6px;
}

.td-resources .td-resource-bar {
    height: 100%;
    background-color: red; /* will be overridden inline */
}

.td-unit-chip {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 2px;
    font-size: 10px;
    border-radius: 3px;
    color: #fff;
}

.td-map-grid:not(.td-show-resources):not(.td-show-units) .td-unit-chip span {
    display: none;
}


/* --- units ---------------------------------------------------------- */
#td-units-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}
.unit-card {
    border: 1px solid #ccc;
    padding: 6px;
    width: 200px;
    box-sizing: border-box;
    cursor: default;
    background-image: var(--unit-icon);
    background-repeat: no-repeat;
    background-position: top right;
    background-size: 75px auto;
}
.unit-card h4 {
    margin: 0 0 4px;
    font-size: 14px;
}
.unit-card ul {
    list-style: none;
    margin: 0 0 4px;
    padding: 0;
    font-size: 12px;
}
.unit-card .td-btn {
    width: 100%;
    margin: 2px 0;
}

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

.td-exp-chips {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0;
    max-width: 100%;
    overflow-x: auto;
    padding: 0;
    min-width: 0;
}

.td-exp-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 0 4px;
    border-radius: 3px;
    background: var(--wp--preset--color--primary, #007cba);
    color: var(--wp--preset--color--background, #fff);
    white-space: nowrap;
}

.td-exp h5 {
    margin: 0;
    font-size: 13px;
}

.td-action-area {
    display: none;
    margin-top: 4px;
    gap: 8px;
}

.unit-card.td-actions-open {
    width: 320px;
}

.unit-card.td-actions-open .td-action-area {
    display: flex;
}

.td-action-buttons {
    flex: 0 0 120px;
}

.td-action-buttons h5 {
    margin: 0 0 4px;
    font-size: 13px;
}

.td-action-forms {
    flex: 1;
}
.unit-card .td-warning {
    color: #b00;
    font-size: 12px;
    margin: 4px 0;
}

/* unit updates overlay */
.td-units-msg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.td-units-msg-box {
    max-width: 400px;
    padding: 20px;
    background: var(--wp--preset--color--background, #fff);
    border-radius: 4px;
    text-align: center;
}

.td-units-close {
    margin-top: 1em;
    font-size: 12px;
}

/* description preview + overlay */
.td-description-preview {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    text-align: left;
}

.td-description-preview:hover,
.td-description-preview:focus {
    text-decoration: underline;
}

.td-description-preview:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.td-description-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
}

.td-description-overlay.is-visible {
    display: flex;
}

.td-description-box {
    max-width: 520px;
    padding: 24px;
    background: var(--wp--preset--color--base, var(--wp--preset--color--background, #fff));
    color: var(--wp--preset--color--contrast, var(--wp--preset--color--foreground, #111));
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    text-align: left;
}

.td-description-content p {
    margin: 0 0 1em;
}

.td-description-content p:last-child {
    margin-bottom: 0;
}

.td-description-close {
    margin-top: 1em;
    font-size: 12px;
    text-align: center;
}

.td-units-msg .td-warning {
    color: #b00;
    font-size: 12px;
    margin: 4px 0;
}

.td-units-msg .td-details {
    font-size: 12px;
    margin: 4px 0;
}

.unit-card .td-attack-btn,
.td-conquer-btn {
    background: #c00;
    color: #fff;
}

.unit-card.td-attack-select {
    outline: 2px solid #c00;
    cursor: crosshair;
}

.unit-card.td-transfer-select,
.td-land-store.td-transfer-select {
    outline: 2px solid #080;
    cursor: pointer;
}

/* --- land grid ----------------------------------------------------- */
.td-land-grid {
    border-collapse: collapse;
    margin: 0;
}
.td-land-grid td {
    width: 20px;
    height: 20px;
    text-align: center;
    border: 1px solid #ccc;
    font-size: 14px;
}

.td-tree-icon,
.td-food-icon,
.td-res-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.td-unit-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.td-pop-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* --- land navigation & layout ------------------------------------- */

.td-nav-arrows,
.td-move-grid {
    --td-control-size: 45px;
    --td-control-height: calc(var(--td-control-size) * 1.1547);
    --td-row-overlap: calc(var(--td-control-height) * -0.25);
    color: var(--wp--preset--color--foreground, currentColor);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1em;
}

.td-move-grid { --td-control-size: 40px; }

.td-nav-row,
.td-move-row { display:flex; }

.td-nav-row + .td-nav-row,
.td-move-row + .td-move-row { margin-top: var(--td-row-overlap); }

.td-nav-row.td-row-odd,
.td-move-row.td-row-odd { margin-left: calc(var(--td-control-size) / 2); }

.td-nav-arrows a,
.td-move-grid button,
.td-nav-arrows .td-current,
.td-move-grid .td-current {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin: 1px;
    border: none;
    background: var(--wp--preset--color--primary, currentColor);
    color: var(--wp--preset--color--foreground, currentColor);
    width: var(--td-control-size);
    height: var(--td-control-height);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    box-sizing: border-box;
}

.td-nav-arrows .td-current,
.td-move-grid .td-current {
    pointer-events: none;
    z-index: 1;
}

.td-nav-arrows .td-current::after,
.td-move-grid .td-current::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40%;
    height: 40%;
    background: currentColor;
    clip-path: inherit;
    transform: translate(-50%, -50%);
}

.td-nav-arrows a::after,
.td-move-grid button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40%;
    height: 40%;
    background: var(--wp--preset--color--base);
    clip-path: polygon(50% 0%, 100% 50%, 60% 50%, 60% 100%, 40% 100%, 40% 50%, 0% 50%);
    transform: translate(-50%, -50%);
}
.td-nav-arrows .ne::after,    .td-move-grid .ne::after    { transform: translate(-50%, -50%) rotate(30deg); }
.td-nav-arrows .east::after,  .td-move-grid .east::after  { transform: translate(-50%, -50%) rotate(90deg); }
.td-nav-arrows .se::after,    .td-move-grid .se::after    { transform: translate(-50%, -50%) rotate(150deg); }
.td-nav-arrows .sw::after,    .td-move-grid .sw::after    { transform: translate(-50%, -50%) rotate(210deg); }
.td-nav-arrows .west::after,  .td-move-grid .west::after  { transform: translate(-50%, -50%) rotate(270deg); }
.td-nav-arrows .nw::after,    .td-move-grid .nw::after    { transform: translate(-50%, -50%) rotate(330deg); }

.td-card {
    border: 1px solid currentColor;
    padding: 10px;
    background-color: var(--wp--preset--color--background, transparent);
}
.td-card h4 {
    margin-top: 0;
}
.td-card-toggle {
    background: var(--wp--preset--color--background, transparent);
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: inherit;
    position: relative;
}
.td-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
}
.td-form label {
    display: block;
    margin: 0 0 8px;
}
.td-form input[type="text"],
.td-form textarea,
.td-form select,
.td-form input[type="number"],
.td-form input[type="color"],
.td-form input[type="file"],
.td-form input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
}
.td-form button {
    margin-right: 5px;
}

.td-form .td-move-grid button {
    margin: 1px;
}

/* account settings -------------------------------------------------- */
.td-account-settings {
    max-width: 500px;
}

.td-account-settings fieldset {
    border: 1px solid currentColor;
    padding: 10px;
    margin: 0 0 15px;
}

.td-account-settings legend {
    font-weight: 600;
    padding: 0 5px;
}

.td-unit-group {
    border: 4px solid var(--td-owner-color, currentColor);
    padding: 10px;
    margin: 0 0 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.td-unit-group > legend {
    font-weight: 600;
    padding: 0 5px;
    flex-basis: 100%;
    margin-bottom: 4px;
    color: var(--td-owner-color, inherit);
}


.td-account-settings .td-inline {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 6px;
}

.td-account-settings .td-inline label {
    display: flex;
    flex-direction: column;
}

.td-account-settings .td-personal-row label {
    flex: 1;
}

.td-account-settings .td-personal-row input[type="color"] {
    width: 5rem;
    height: 5rem;
    padding: 0;
}

.td-account-settings input[type="file"] {
    width: auto;
}

.td-account-settings .td-checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.td-land-sections {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.td-land-preview .td-card {
    cursor: default;
}
.td-land-preview .td-card .td-card-toggle {
    cursor: pointer;
}
.td-land-sections .td-card {
    flex: 1 1 240px;
    max-width: 240px;
    cursor: move;
    display: flex;
    padding: 0;
}

.td-land-sections .td-card .td-card-content {
    flex: 1;
    padding: 10px;
    position: relative;
    z-index: 1;
}

.td-land-sections .td-card .td-card-toggle {
    width: 25px;
    border-right: 1px solid currentColor;
}

.td-card-symbol {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-weight: 700;
}

.td-card-title {
    display: inline-block;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 20px 0;
}

.td-card-title > span {
    display: inline-block;
    transform: rotate(180deg);
}

.td-land-sections .td-card.collapsed {
    flex: 0 0 25px;
    max-width: 25px;
}

.td-land-sections .td-card.collapsed .td-card-content {
    display: none;
}

.td-land-sections .td-card input,
.td-land-sections .td-card textarea,
.td-land-sections .td-card select {
    cursor: text;
}

.td-land-sections .td-card button,
.td-land-sections .td-card .td-card-toggle,
.td-land-sections .td-card .td-btn,
.td-land-sections .td-card a {
    cursor: pointer;
}

.td-preview-banner {
    margin-bottom: 20px;
    border: 1px dashed currentColor;
    padding: 10px;
    background-color: var(--wp--preset--color--background, transparent);
}
.td-preview-banner p {
    margin: 0;
}

.td-land-emblem-display {
    width: 150px;
    height: 150px;
    margin: 0 auto 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.td-land-details-display {
    margin-bottom: 10px;
}

.td-land-emblem-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: none;
}

.td-land-store {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.td-land-store li {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: var(--wp--preset--color--background, transparent);
}

.td-error {
    color: #b00;
    margin-bottom: 10px;
}

.td-success {
    color: green;
    margin-bottom: 10px;
}

/* --- notifications & messages icons -------------------------------- */
.td-notification-icon,
.td-message-icon {
    position: relative;
    display: inline-block;
}

.td-notification-image,
.td-message-image {
    display: inline-block;
    width: 24px;
    height: 24px;
}

.td-notification-image img,
.td-message-image img {
    width: 100%;
    height: 100%;
    display: block;
}

.td-notification-count,
.td-message-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: red;
    color: #fff;
    border-radius: 50%;
    padding: 0 4px;
    font-size: 12px;
    line-height: 1;
}

.td-notification-details {
    display: none;
    margin-top: 5px;
}

.td-details-button {
    margin-left: 8px;
}

/* --- wall graphic -------------------------------------------------- */
.td-wall-wrap {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    border: 1px solid #666;
    background: var(--wp--preset--color--background, transparent);
}
.td-wall {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-image: url('../art/wall.svg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: bottom;
}

/* --- dashboard settings ------------------------------------------- */
.td-dashboard-message {
    margin: 1em 0;
    padding: 0.75em 1em;
    border-left: 4px solid var(--wp--preset--color--foreground, currentColor);
    background-color: var(--wp--preset--color--background, rgba(0, 0, 0, 0.35));
}

.td-dashboard-message.error {
    border-left-color: var(--wp--preset--color--secondary, #dc2626);
}

.td-dashboard-message.success {
    border-left-color: var(--wp--preset--color--primary, #22c55e);
}

.td-toggle-settings {
    margin-top: 6px;
}

.td-game-settings-panel {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--wp--preset--color--foreground, #444);
    border-radius: 4px;
    background-color: var(--wp--preset--color--background, rgba(0, 0, 0, 0.25));
}

.td-dashboard-form > p {
    margin: 0 0 0.75em;
}

.td-dashboard-form input[type="text"],
.td-dashboard-form textarea,
.td-dashboard-form input[type="number"] {
    width: 100%;
}

.td-dashboard-form-actions {
    margin-top: 1em;
}

.td-dashboard-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1em;
}

.td-dashboard-inline {
    margin: 0;
}

.button-danger {
    background: var(--wp--preset--color--secondary, #7f1d1d);
    border-color: var(--wp--preset--color--secondary, #7f1d1d);
    color: #fff;
}

.button-danger:hover,
.button-danger:focus {
    background: var(--wp--preset--color--secondary, #9f1239);
    border-color: var(--wp--preset--color--secondary, #9f1239);
    color: #fff;
}

/* --- notifications & messages lists -------------------------------- */
.td-notifications-list {
    margin: 0;
    padding: 0;
}

.td-notifications-group,
.td-messages-game {
    margin-bottom: 1.75em;
}

.td-notifications-heading,
.td-messages-heading {
    margin: 0 0 0.5em;
    font-weight: 600;
}

.td-notifications-group ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.td-notifications-turn {
    margin-top: 1em;
    padding: 1em;
    border-left: 4px solid var(--wp--preset--color--foreground, currentColor);
    background: var(--wp--preset--color--background, rgba(0, 0, 0, 0.3));
}

.td-notifications-turn:first-child {
    margin-top: 0.5em;
}

.td-notifications-turn-heading {
    margin: 0 0 0.75em;
    font-size: 1.05em;
    font-weight: 600;
}

.td-notifications-turn .td-notifications-items {
    margin-bottom: 0.75em;
}

.td-notifications-turn .td-notifications-items:last-child {
    margin-bottom: 0;
}

.td-notifications-land {
    margin-top: 1em;
    padding: 0.75em 1em;
    border-left: 3px solid var(--wp--preset--color--primary, var(--wp--preset--color--foreground, currentColor));
    background: var(--wp--preset--color--background, rgba(0, 0, 0, 0.2));
}

.td-notifications-land-heading {
    margin: 0 0 0.5em;
    font-size: 1em;
    font-weight: 600;
}

.td-notifications-land-heading a {
    color: inherit;
    text-decoration: none;
}

.td-notifications-land-heading a:hover,
.td-notifications-land-heading a:focus {
    text-decoration: underline;
}

.td-notifications-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em;
    margin: 0 0 1.5em;
}

.td-pagination-label {
    font-weight: 600;
    margin-right: 0.25em;
}

.td-notifications-page-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.35em 0.9em;
    border-radius: 999px;
    background: var(--wp--preset--color--background, rgba(0, 0, 0, 0.3));
    color: inherit;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.td-notifications-page-link:hover,
.td-notifications-page-link:focus {
    background: var(--wp--preset--color--foreground, rgba(0, 0, 0, 0.45));
    color: var(--wp--preset--color--background, #fff);
}

.td-notifications-page-link.current {
    background: var(--wp--preset--color--primary, var(--wp--preset--color--foreground, currentColor));
    color: var(--wp--preset--color--background, #fff);
}

.td-turn-count {
    font-size: 0.8em;
    font-weight: 600;
}
