.content-page:has(> .lp-page) { padding: 20px 20px 28px; }
.lp-page { --lp-mint: #a2edd6; --lp-muted: #9eb6b8; --lp-violet: #c7b6f5; max-width: 560px; margin: 0 auto; color: #e7f2ef; }
.lp-page [hidden] { display: none !important; }
.lp-page button, .lp-page select { font: inherit; -webkit-tap-highlight-color: transparent; }
.lp-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lp-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.lp-heading h1 { font-size: clamp(25px, 3.7vw, 34px); font-weight: 750; line-height: 1.15; letter-spacing: -1.2px; margin: 0; }
.lp-brand-mark { position: relative; display: block; width: 37px; height: 37px; flex: 0 0 37px; }
.lp-brand-mark i { position: absolute; width: 23px; height: 29px; border-radius: 6px; border: 1.5px solid var(--lp-mint); background: #1b3b38; top: 3px; left: 2px; transform: rotate(-16deg); }
.lp-brand-mark i:last-child { left: 13px; top: 7px; border-color: var(--lp-violet); background: #29253d; transform: rotate(12deg); }
.lp-brand-mark i:last-child::after { content: ""; width: 6px; height: 6px; position: absolute; top: 10px; left: 7px; background: var(--lp-violet); transform: rotate(45deg); }
.lp-back { color: #abc4bf; text-decoration: none; font-size: 11px; white-space: nowrap; }
.lp-back span { color: var(--lp-mint); margin-left: 4px; }
.lp-back:hover { color: #e2fff3; }
.lp-intro { font-size: 12px; color: var(--lp-muted); margin: 10px 0 20px 48px; }
.lp-game { border-top: 1px solid #30433f; padding-top: 17px; }
.lp-toolbar { display: flex; align-items: end; gap: 12px; justify-content: space-between; }
.lp-mode-label { display: flex; flex-direction: column; gap: 6px; flex: 1; max-width: 300px; }
.lp-mode-label > span { font-size: 10px; color: var(--lp-muted); }
.lp-mode-label select { color-scheme: dark; min-height: 44px; width: 100%; padding: 9px 32px 9px 12px; border-radius: 9px; border: 1px solid #3a5551; background: #162926; color: #dbefe6; font-size: 13px; cursor: pointer; }
.lp-new { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; border: 1px solid #3a4a4d; border-radius: 9px; padding: 9px 14px; background: #1b292e; color: #cbdedb; font-size: 12px !important; white-space: nowrap; }
.lp-new > span { color: var(--lp-mint); font-size: 19px; line-height: 1; }
.lp-new:hover { border-color: #829d94; background: #263b3c; }
.lp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 17px 0 15px; }
.lp-stats > div { display: flex; flex-direction: column; gap: 3px; border-right: 1px solid #2c3e3d; padding-left: 22px; }
.lp-stats > div:first-child { padding-left: 2px; }
.lp-stats > div:last-child { border-right: 0; }
.lp-stats span { color: var(--lp-muted); font-size: 10px; }
.lp-stats strong { font-size: 23px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: -.5px; }
.lp-stats > div:first-child strong { color: var(--lp-mint); }
.lp-stats strong small { color: #7e9993; font-size: 14px; font-weight: 450; }
.lp-board-shell { padding: 10px; border: 1px solid #344b48; border-radius: 16px; background: radial-gradient(ellipse at 50% 0, #25433d55, transparent 70%), #0e1a1e; box-shadow: 0 14px 32px #0002; }
.lp-board { --lp-columns: 3; display: grid; grid-template-columns: repeat(var(--lp-columns), minmax(0, 1fr)); gap: 9px; }
.lp-card { position: relative; display: block; width: 100%; min-height: 60px; aspect-ratio: 1.12; padding: 0; border: 0; background: transparent; border-radius: 11px; cursor: pointer; perspective: 650px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.lp-card-inner { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transition: transform .32s cubic-bezier(.25,.7,.3,1); }
.lp-card.is-open .lp-card-inner { transform: rotateY(180deg); }
.lp-card-back, .lp-card-face { display: grid; place-items: center; position: absolute; inset: 0; border: 1px solid #43645d; border-radius: 11px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.lp-card-back { overflow: hidden; background: linear-gradient(145deg, #29493e, #1a3030 75%); box-shadow: inset 0 1px #a6e8c50f, 0 3px 0 #081416; }
.lp-card-back::before { content: ""; position: absolute; inset: 6px; border: 1px solid #a2edd616; border-radius: 6px; }
.lp-card-back svg { width: 35%; height: 40%; fill: none; stroke: #83b8a4; stroke-width: 1.4; opacity: .75; }
.lp-card-back::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#c3f6d919 .7px, transparent .9px); background-size: 8px 8px; mask-image: linear-gradient(135deg, #000, transparent 80%); }
.lp-card-face { transform: rotateY(180deg); background: #e9f3df; border-color: #d6e7d0; box-shadow: 0 3px 0 #091316; }
.lp-card-face svg { width: 76%; height: 82%; overflow: visible; }
.lp-card.is-matched .lp-card-face { background: #e5f4e7; border-color: #9ee3c1; box-shadow: inset 0 0 0 2px #6dae952a; }
.lp-card.is-matched::after { content: "✓"; display: grid; place-items: center; position: absolute; bottom: 5px; right: 5px; width: 15px; height: 15px; border-radius: 50%; background: #285f4c; color: #e0ffe9; font-size: 10px; font-weight: 700; pointer-events: none; }
.lp-card[aria-disabled="true"] { cursor: default; }
.lp-card:focus-visible { outline: 3px solid #dfc9ff; outline-offset: 2px; z-index: 1; }
@media (hover: hover) { .lp-card:not([aria-disabled="true"]):hover .lp-card-back { border-color: #a5d7bf; background: linear-gradient(145deg, #345d4d, #213c39 75%); } }
.lp-status { min-height: 19px; color: #aec7bd; text-align: center; font-size: 12px; line-height: 1.5; margin: 13px 0 10px; }
.lp-status.is-success { color: var(--lp-mint); }
.lp-bottom { border-top: 1px solid #2d403d; padding-top: 12px; display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.lp-help { font-size: 11px; color: #abc1ba; flex: 1; min-width: 0; }
.lp-help summary { color: #cdded9; width: max-content; cursor: pointer; padding: 4px 0; }
.lp-help p { line-height: 1.7; margin: 9px 0 0; }
.lp-size-note { font-size: 10px; color: #7d9a93; padding-top: 5px; white-space: nowrap; }
.lp-victory { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid #567966; border-radius: 12px; background: #18372d; margin-bottom: 15px; }
.lp-victory-spark { color: #c8efad; font-size: 35px; }
.lp-victory > div { flex: 1; }
.lp-victory h2 { color: #dbf7d3; margin: 0 0 5px; font-size: 17px; font-weight: 650; }
.lp-victory p { color: #aac6b6; margin: 0; font-size: 11px; }
.lp-primary { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 42px; border: 1px solid var(--lp-mint); border-radius: 8px; background: var(--lp-mint); color: #122c24; font-weight: 700 !important; font-size: 12px !important; padding: 10px 13px; white-space: nowrap; }
.lp-primary:hover { background: #c0ffe9; }
.lp-storage-note { color: #e9c789; font-size: 11px; line-height: 1.6; margin-top: 12px; }
.lp-page button:disabled, .lp-page select:disabled { opacity: .5; cursor: wait; }
@media (max-width: 600px) {
    .content-page:has(> .lp-page) { padding: 14px 12px 20px; }
    .lp-heading h1 { font-size: 25px; letter-spacing: -.8px; }
    .lp-brand { gap: 8px; }
    .lp-brand-mark { width: 29px; height: 33px; flex-basis: 29px; transform: scale(.85); transform-origin: left center; margin-right: -3px; }
    .lp-back { font-size: 10px; }
    .lp-intro { font-size: 11px; margin: 7px 0 14px 34px; }
    .lp-game { padding-top: 12px; }
    .lp-toolbar { gap: 10px; }
    .lp-new { padding: 9px 10px; font-size: 11px !important; }
    .lp-mode-label select { font-size: 12px; padding-left: 9px; }
    .lp-stats { padding: 13px 0; }
    .lp-stats > div { padding-left: 16px; }
    .lp-stats strong { font-size: 21px; }
    .lp-board-shell { padding: 7px; border-radius: 13px; }
    .lp-board { gap: 7px; }
    .lp-card { aspect-ratio: 1.12; border-radius: 8px; }
    .lp-card-back, .lp-card-face { border-radius: 8px; }
    .lp-card-back::before { inset: 4px; border-radius: 4px; }
    .lp-card.is-matched::after { bottom: 3px; right: 3px; width: 13px; height: 13px; font-size: 9px; }
    .lp-status { font-size: 11px; margin: 10px 0; }
    .lp-victory { padding: 12px; flex-wrap: wrap; gap: 9px; }
    .lp-victory-spark { font-size: 28px; }
    .lp-victory h2 { font-size: 16px; }
    .lp-victory .lp-primary { width: 100%; }
}
@media (max-width: 350px) {
    .lp-heading h1 { font-size: 23px; }
    .lp-back { max-width: 64px; white-space: normal; text-align: right; line-height: 1.4; }
    .lp-board { gap: 6px; }
    .lp-board-shell { padding: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .lp-card-inner { transition: none; }
}
