/* Pydle page. Colours from theme.css. */

.pydle-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.pydle-preview {
    background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
    display: flex; flex-direction: column;
}
.pydle-bar {
    display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--border);
    font-size: 13px; color: var(--muted);
}
.pydle-bar .spacer { flex: 1; }
.pydle-bar .btn { padding: 4px 12px; font-size: 13px; }
.save-status[data-kind="ok"] { color: var(--ok); }
.save-status[data-kind="bad"] { color: var(--error); }
/* The game is 960x600; the player letterboxes it to fit. */
.pydle-stage { position: relative; aspect-ratio: 960 / 600; background: var(--panel-2); }
.pydle-placeholder {
    position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); padding: 1rem;
    text-align: center;
}
.player-frame {
    position: absolute; inset: 0; width: 100%; height: 100%;
    border: 0; opacity: 0; pointer-events: none; z-index: 0;
}
.player-frame.is-active { opacity: 1; pointer-events: auto; z-index: 1; }
.pydle-preview:fullscreen { border-radius: 0; justify-content: center; background: var(--panel-2); }
.pydle-preview:fullscreen .pydle-stage { flex: 1; aspect-ratio: auto; }

.error-box { border-top: 3px solid var(--error); background: rgba(255, 143, 143, .08); padding: 10px 12px; }
.error-box pre {
    margin: 0 0 10px; white-space: pre-wrap; word-break: break-word; color: #ffd0d0;
    font: 12px/1.45 ui-monospace, Consolas, monospace; max-height: 180px; overflow: auto;
}

.pydle-side { display: grid; gap: 14px; }
.xp-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.xp-card h2 {
    margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
}
.xp-balance { font-size: 15px; color: var(--muted); }
.xp-balance strong { font-size: 34px; color: var(--py-yellow); margin-right: 4px; }
.xp-breakdown { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 10px 0 0; font-size: 14px; }
.xp-breakdown dt { color: var(--muted); }
.xp-breakdown dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.earn-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; line-height: 1.45; }
.earn-links { margin: 10px 0 0; font-size: 13px; }
.earn-links a { color: var(--link); }

@media (max-width: 1000px) {
    .pydle-layout { grid-template-columns: 1fr; }
}
.side-note { margin: 0; font-size: 13px; line-height: 1.45; }
