/* PLAISET — styles
 *
 * Palette: deep red + warm brown + cream, matching the printed rules
 * sheet. Desktop-first (board + side-panel side-by-side); below 720px
 * the layout stacks vertically and the dice/log fall below the board.
 */

.sts-plaiset {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #2a1f17;
    max-width: 1000px;
    margin: 24px auto;
    padding: 16px;
    box-sizing: border-box;
    position: relative;
}

.sts-plaiset-loading {
    text-align: center;
    color: #8a5a00;
    padding: 60px 20px;
    font-size: 16px;
}

.sts-plaiset-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===================== HEADER ===================== */
.sts-plaiset-header { text-align: center; }
.sts-plaiset-title {
    color: #a4341f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    margin: 0;
    letter-spacing: 2px;
}
.sts-plaiset-tagline {
    color: #8a5a00;
    font-style: italic;
    margin: 4px 0 0;
    font-size: 14px;
}

/* ===================== PLAYERS PANEL ===================== */
.sts-plaiset-players {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}
.sts-plaiset-player {
    background: #fff;
    border: 2px solid #d4dde7;
    border-radius: 8px;
    padding: 10px 14px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    align-items: center;
    transition: transform .15s, box-shadow .15s;
}
.sts-plaiset-player.is-active {
    background: #fef9f0;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, .25);
    transform: translateY(-2px);
}
.sts-plaiset-player.is-out {
    opacity: 0.45;
    filter: saturate(0.5);
}
.sts-plaiset-pdot {
    grid-row: 1 / 3;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, .12);
}
.sts-plaiset-pname {
    font-weight: 700;
    font-size: 14px;
}
.sts-plaiset-pscore {
    grid-row: 1 / 3;
    font-size: 24px;
    font-weight: 700;
    color: #a4341f;
    font-family: Georgia, serif;
}
.sts-plaiset-pleft {
    font-size: 11px;
    color: #6a5749;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================== PLAY AREA ===================== */
.sts-plaiset-play {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
    gap: 18px;
    align-items: start;
}
@media (max-width: 720px) {
    .sts-plaiset-play { grid-template-columns: 1fr; }
}

/* ===================== BOARD ===================== */
.sts-plaiset-board-wrap {
    background: #fdf7ed;
    border: 4px solid #6f3e1f;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.sts-plaiset-board {
    width: 100%;
    height: auto;
    display: block;
}
.sts-plaiset-sq {
    fill: #f3e6cf;
    stroke: #8a6740;
    stroke-width: 2;
}
.sts-plaiset-sq-legal {
    fill: #ffd95e;
    fill-opacity: 0.55;
    stroke: #b8860b;
    stroke-width: 3;
    cursor: pointer;
    animation: sts-plaiset-pulse 1.4s ease-in-out infinite;
    pointer-events: all;
}
.sts-plaiset-sq-target {
    fill: #5db94f;
    fill-opacity: 0.45;
    stroke: #1e7e34;
    stroke-width: 3;
    pointer-events: none;
    animation: sts-plaiset-pulse 1s ease-in-out infinite;
}
.sts-plaiset-sq-home {
    pointer-events: none;
}
.sts-plaiset-counter {
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25));
    pointer-events: none;
}
.sts-plaiset-home-star {
    font-size: 22px;
    fill: #fff;
    font-family: Georgia, serif;
    pointer-events: none;
}
@keyframes sts-plaiset-pulse {
    0%, 100% { fill-opacity: 0.35; }
    50% { fill-opacity: 0.65; }
}

/* ===================== SIDE PANEL ===================== */
.sts-plaiset-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sts-plaiset-turn {
    background: #fff;
    border: 1px solid #d4dde7;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    min-height: 22px;
}
.sts-plaiset-turn-label {
    color: #8a5a00;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-right: 6px;
}
.sts-plaiset-dice {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}
.sts-plaiset-die {
    width: 50px;
    height: 50px;
    background: #fff;
    border: 2px solid #6f3e1f;
    border-radius: 8px;
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    color: #a4341f;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
}
.sts-plaiset-double-badge {
    background: #a4341f;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-left: 6px;
}
.sts-plaiset-roll-btn {
    background: #a4341f;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background .15s;
}
.sts-plaiset-roll-btn:hover { background: #842918; }
.sts-plaiset-roll-btn:disabled {
    background: #c0a39d;
    cursor: not-allowed;
}
.sts-plaiset-prompt {
    background: #fef9f0;
    border-left: 4px solid #b8860b;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
    color: #6a5749;
    min-height: 18px;
}
.sts-plaiset-log {
    background: #fff;
    border: 1px solid #d4dde7;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
}
.sts-plaiset-log-title {
    color: #8a5a00;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 6px;
}
.sts-plaiset-log-empty {
    color: #999;
    font-style: italic;
    font-size: 12px;
}
.sts-plaiset-log-row {
    padding: 4px 0 4px 8px;
    border-left: 3px solid #d4dde7;
    margin-bottom: 4px;
    line-height: 1.3;
}
.sts-plaiset-new-btn {
    background: transparent;
    color: #6f3e1f;
    border: 1px solid #6f3e1f;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.sts-plaiset-new-btn:hover {
    background: #6f3e1f;
    color: #fff;
}

/* ===================== NEW-GAME OVERLAY ===================== */
.sts-plaiset-overlay {
    position: absolute;
    inset: 0;
    background: rgba(42, 31, 23, .72);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
}
.sts-plaiset-newgame {
    background: #fdf7ed;
    border: 3px solid #6f3e1f;
    border-radius: 10px;
    padding: 24px 28px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.sts-plaiset-newgame h3 {
    margin: 0 0 8px;
    color: #a4341f;
    font-family: Georgia, serif;
    font-size: 24px;
}
.sts-plaiset-newgame label {
    display: block;
    margin: 12px 0;
    font-weight: 600;
    color: #6f3e1f;
}
.sts-plaiset-newgame select {
    margin-left: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #8a6740;
    font-size: 14px;
}
.sts-plaiset-newgame .sts-plaiset-note {
    font-size: 12px;
    color: #8a5a00;
    margin: 6px 0;
}
.sts-plaiset-newgame button {
    background: #a4341f;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.sts-plaiset-newgame button:hover { background: #842918; }

/* ===================== MOBILE TWEAKS ===================== */
@media (max-width: 480px) {
    .sts-plaiset-title { font-size: 28px; letter-spacing: 1px; }
    .sts-plaiset-players { grid-template-columns: 1fr 1fr; }
    .sts-plaiset-player { padding: 8px 10px; font-size: 12px; }
    .sts-plaiset-pscore { font-size: 20px; }
    .sts-plaiset-die { width: 40px; height: 40px; font-size: 24px; }
    .sts-plaiset-roll-btn { padding: 14px 18px; font-size: 14px; }
}
