/* The female puzzle has its own theme; game rules and shared pages stay separate. */
body.match-page--female {
    --match-bg: #f5f0f4;
    --match-ink: #392b40;
    --match-muted: #77677b;
    --match-pink: #8d4279;
    --match-purple: #7154a1;
    --match-deep: #744365;
    --match-line: #e6dce7;
    --match-pink-soft: #f6edf5;
    background: #f5f0f4;
}
.match-page--female .match-shell { padding: 16px 12px max(24px, env(safe-area-inset-bottom)); min-height: 0; }
.puzzle-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 16px; }
.puzzle-eyebrow { margin: 0 0 5px; color: var(--match-muted); font-size: 11px; letter-spacing: .08em; }
.puzzle-heading h1 { margin: 0; font-size: 23px; letter-spacing: .04em; line-height: 1.3; }
.puzzle-heading h1 span { margin-left: 7px; color: var(--match-muted); font-size: 12px; font-weight: 500; }
.puzzle-heading-mark { color: #9c6d92; font-size: 32px; padding-right: 6px; }
.match-page--female .board-frame {
    padding: 12px; border-radius: 22px; border: 1px solid #e6dce7;
    background: #fffcf8; backdrop-filter: none; -webkit-backdrop-filter: none;
    box-shadow: 0 12px 32px #51334f0d, inset 0 1px #fff;
}
.match-page--female .match-status {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px; margin-bottom: 12px;
}
.match-page--female .match-hud > div {
    min-height: 59px; padding: 8px 4px; gap: 6px; border: 0; border-radius: 12px;
    background: #f3edf3; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.match-page--female .match-hud > div:first-child { display: flex; order: 1; }
.match-page--female .match-hud > div:nth-child(2) { order: 2; background: #754368; }
.match-page--female .match-hud > div:nth-child(3) { order: 3; }
.match-page--female .match-hud span { font-size: 10px; font-weight: 600; }
.match-page--female .match-hud strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.match-page--female .match-hud > div:nth-child(2) span { color: #f5deed; }
.match-page--female .match-hud > div:nth-child(2) strong { color: #fff; font-size: 27px; }
.match-page--female .goal-panel {
    order: 4; grid-column: 1 / -1; grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: auto 5px; min-height: 60px; padding: 8px 10px;
    gap: 5px 10px; border: 1px solid #e9e0e8; border-radius: 12px;
    background: #fff; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.match-page--female .goal-icon { width: 40px; height: 40px; box-shadow: 0 2px 7px #51334f1a; }
.goal-caption { display: block; margin-bottom: 5px; color: var(--match-muted); font-size: 10px; }
.match-page--female .goal-panel strong { justify-content: space-between; font-size: 13px; gap: 8px; }
.match-page--female .goal-count { padding: 0; background: none; color: #754368; box-shadow: none; text-shadow: none; font-size: 17px; }
.match-page--female .goal-count em { color: #aa98a8; margin: 0 3px; }
.match-page--female .goal-progress { background: #f0e9ef; }
.match-page--female .goal-progress span { background: #a7739e; }
.match-page--female .board-grid {
    gap: 5px; padding: 7px; border-radius: 15px; border: 1px solid #ddd1e1;
    background: #e8e0ec; box-shadow: inset 0 2px 5px #49304e0a;
}
.match-page--female .tile {
    border-radius: 11px; border: 1px solid #ffffffb3;
    background: linear-gradient(155deg, #ffffff80, #ffffff10), var(--tile-color);
    box-shadow: inset 0 1px 1px #ffffffd9, inset 0 -3px 0 #38233e26, 0 2px 3px #392b4014;
}
.match-page--female .tile img { width: 86%; height: 86%; border: 2px solid #ffffffd9; }
.match-page--female .tile::after { display: none; }
.match-page--female .tile.is-selected { outline: 3px solid #754368; outline-offset: 1px; }
.match-page--female .tile.has-power { border-color: #fff; box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #9b578a; }
.match-page--female .tile.power-candy { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #c17c39; }
.match-page--female .tile.power-prism { background: conic-gradient(#e5a8c8, #ffdf99, #a0dbd0, #b4b2ef, #e5a8c8); box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #7d63b0; }
.match-page--female .power-badge {
    top: -4px; right: -3px; width: clamp(18px, 38%, 25px); font-size: clamp(15px, 4vw, 20px);
    color: #fff; background: #754368; border: 2px solid #fff;
    box-shadow: 0 2px 4px #392b402e; animation: none;
}
.match-page--female .power-candy .power-badge { color: #fff; background: #a45d25; }
.match-page--female .power-prism .power-badge { background: #7154a1; }
.match-page--female .match-actions { gap: 8px; margin-top: 12px; }
.match-page--female .match-actions button {
    min-height: 44px; border-radius: 12px; background: #fffcf8; border: 1px solid #e6dce7;
    font-size: 11px; box-shadow: 0 2px 4px #51334f05; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.match-page--female .match-actions button::before { background: transparent; color: #875178; box-shadow: none; font-size: 18px; width: 18px; }
.match-page--female button:focus-visible, .puzzle-guide summary:focus-visible { outline: 3px solid #754368; outline-offset: 3px; }
.match-page--female .match-actions button:disabled {
    opacity: .5; cursor: default; transform: none;
}
.match-page--female .match-actions button:not(:disabled):active { transform: translateY(1px); background: #eee4ed; }
.puzzle-guide { margin-top: 14px; padding: 0 4px; color: var(--match-muted); }
.puzzle-guide summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; cursor: pointer; font-size: 12px; list-style: none; }
.puzzle-guide summary::-webkit-details-marker { display: none; }
.puzzle-guide summary > span { font-size: 18px; transition: transform 150ms ease; }
.puzzle-guide[open] summary > span { transform: rotate(45deg); }
.puzzle-guide-items { padding: 2px 0 12px; }
.puzzle-guide-items p { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.guide-symbol { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 10px; color: #fff; background: #754368; font-size: 22px; }
.guide-bomb { background: #a45d25; }
.guide-prism { background: #7154a1; }
.puzzle-guide-items strong { display: block; color: var(--match-ink); font-size: 12px; }
.puzzle-guide-items small { display: block; margin-top: 3px; font-size: 11px; }
.puzzle-guide-tip { padding: 10px; border-radius: 10px; background: #eae1ec; color: #634363; font-size: 11px; line-height: 1.6; }
.match-page--female .global-panel { margin-top: 10px; padding: 14px; border-radius: 14px; background: #fffcf8; border: 1px solid #e6dce7; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.match-page--female .global-panel-head span { font-size: 12px; }
.match-page--female .global-grid > div { background: #f4eff4; border: 0; box-shadow: none; padding: 10px; border-radius: 9px; }
.match-page--female .global-grid dd { margin-top: 5px; font-size: 17px; font-variant-numeric: tabular-nums; }
.match-page--female .match-overlay { inset: 8px; border-radius: 17px; background: #392b4066; backdrop-filter: blur(4px); }
.match-page--female .overlay-panel { padding: 24px 18px; border-radius: 20px; border: 1px solid #fff; background: #fffcf8; box-shadow: 0 16px 48px #392b4033; }
.match-page--female .start-panel::before { background: #ac83a4; }
.match-page--female .overlay-panel strong { font-size: 23px; }
.match-page--female .overlay-panel button { min-height: 44px; border-radius: 12px; background: #754368; box-shadow: 0 4px 0 #54324d; }
.match-page--female .result-stats > div { background: #f4eff4; border: 0; box-shadow: none; }
.match-page--female .effects-layer { border-radius: 20px; }
.match-page--female .combo-pop { background: #754368; }
.match-page--female .power-pop { color: #fff; }
@media (max-width: 370px) {
    .match-page--female .match-shell { padding-right: 8px; padding-left: 8px; }
    .match-page--female .board-frame { padding: 9px; border-radius: 18px; }
    .match-page--female .board-grid { gap: 4px; padding: 5px; }
    .match-page--female .tile { border-radius: 8px; }
    .match-page--female .match-actions button { gap: 3px; padding: 0 3px; }
}
@media (prefers-reduced-motion: reduce) {
    .puzzle-guide summary > span, .match-page--female .goal-progress span { transition: none; }
}

.puzzle-play-tip { margin: 12px 0 0; text-align: center; color: var(--match-muted); font-size: 11px; line-height: 1.5; }
.match-page--female .tile.is-invalid { animation: invalidSwap 180ms ease-in-out; }
@keyframes invalidSwap {
    0%, 100% { transform: translateX(0); }
    30% { transform: translateX(-4px); }
    70% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
    .match-page--female .tile.is-invalid { animation: none; outline: 2px solid #a45d25; }
}


/* Keep the move budget beside the collection target; secondary stats stay small. */
.match-page--female .match-status {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 5px 8px;
    margin-bottom: 8px;
}
.match-page--female .match-hud > div:nth-child(2) {
    grid-column: 1;
    grid-row: 1;
    min-height: 52px;
    padding: 6px 4px;
    gap: 4px;
}
.match-page--female .goal-panel {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 52px;
    padding: 5px 7px;
    gap: 3px 6px;
}
.match-page--female .goal-icon {
    width: 32px;
    height: 32px;
}
.match-page--female .goal-caption {
    margin-bottom: 3px;
    font-size: 9px;
}
.match-page--female .match-hud > div:first-child,
.match-page--female .match-hud > div:nth-child(3) {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    grid-row: 2;
    min-height: 18px;
    padding: 0 2px;
    gap: 4px;
    background: transparent;
}
.match-page--female .match-hud > div:first-child { grid-column: 1; }
.match-page--female .match-hud > div:nth-child(3) { grid-column: 2; }
.match-page--female .match-hud > div:first-child strong,
.match-page--female .match-hud > div:nth-child(3) strong {
    font-size: 12px;
    overflow-wrap: anywhere;
}
.match-page--female .tile.power-rainbow::before {
    border-style: solid;
    border-width: 3px 0;
    border-radius: 0;
}
.match-page--female .tile.power-column::before {
    border-style: solid;
    border-width: 0 3px;
    border-radius: 0;
}
.match-page--female .tile.power-prism::before {
    border: 3px double #fff;
    border-radius: 0;
}
