:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
    background: #eef2f7;
    line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(180deg, #f7f9fc 0%, #e8eef6 100%); min-height: 100vh; }
a { color: inherit; }
button, input { font: inherit; }
.k3-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 54px; }
.k3-hero, .k3-topbar, .k3-document-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.k3-hero { padding: 28px; border-radius: 24px; color: #fff; background: linear-gradient(135deg, #162f57, #1f6e68); box-shadow: 0 18px 44px rgba(22,47,87,.18); }
.k3-hero h1, .k3-topbar h1, .k3-document-header h1 { margin: 2px 0 8px; line-height: 1.12; }
.k3-hero p { margin: 0; color: rgba(255,255,255,.86); font-size: 1.08rem; }
.k3-kicker { font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; opacity: .72; }
.k3-help-button, .k3-secondary, .k3-nav a { text-decoration: none; border-radius: 12px; font-weight: 750; }
.k3-help-button { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.4); padding: 10px 16px; }
.k3-auth-grid, .k3-game-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.k3-card, .k3-game-card { background: #fff; border: 1px solid #dce3ec; border-radius: 20px; padding: 24px; box-shadow: 0 10px 30px rgba(31,52,78,.07); }
.k3-card-active { border-color: #6b9c96; box-shadow: 0 12px 34px rgba(31,110,104,.13); }
.k3-card h2, .k3-game-card h3 { margin: 0 0 8px; }
.k3-muted { color: #677387; margin-top: 0; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 700; font-size: .94rem; }
input { width: 100%; border: 1px solid #cbd5e1; border-radius: 11px; padding: 11px 12px; background: #fbfdff; }
input:focus { outline: 3px solid rgba(31,110,104,.14); border-color: #1f6e68; }
.k3-primary, .k3-game-card button, .k3-secondary { display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 11px 16px; border-radius: 12px; font-weight: 800; text-decoration: none; cursor: pointer; }
.k3-primary { background: #1f6e68; color: #fff; }
.k3-secondary { background: #fff; color: #1d3150; border: 1px solid #cdd7e3; }
.k3-game-card button:disabled { background: #e8edf3; color: #818c9b; cursor: not-allowed; }
.k3-alert { border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; font-weight: 700; }
.k3-alert-error { background: #fff0f0; border: 1px solid #e7b4b4; color: #8b2424; }
.k3-section { margin-top: 32px; }
.k3-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 2px 14px; }
.k3-section-heading h2 { margin: 2px 0 0; }
.k3-section-heading p { margin: 0; color: #687589; text-align: right; }
.k3-demo-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.k3-demo-card { min-height: 118px; display: flex; flex-direction: column; gap: 7px; justify-content: center; text-decoration: none; background: #fff; border: 1px solid #dce3ec; border-radius: 17px; padding: 18px; box-shadow: 0 8px 24px rgba(31,52,78,.06); transition: transform .15s ease, box-shadow .15s ease; }
.k3-demo-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(31,52,78,.10); }
.k3-demo-card span { color: #697588; font-size: .92rem; }
.k3-footer { display: flex; justify-content: space-between; margin-top: 32px; color: #6d7888; font-size: .9rem; }
.k3-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.k3-nav a { background: #fff; border: 1px solid #d4dce6; padding: 8px 12px; }
.k3-game-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.k3-game-card { display: flex; flex-direction: column; gap: 10px; }
.k3-game-card p { color: #667387; flex: 1; margin: 0; }
.k3-featured { border-color: #7aa9a4; box-shadow: 0 12px 34px rgba(31,110,104,.13); }
.k3-disabled { background: #f7f9fb; }
.k3-status { width: fit-content; padding: 4px 8px; border-radius: 999px; background: #e9f2f1; color: #225e59; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.k3-disabled .k3-status { background: #e9edf2; color: #697588; }
.k3-document { max-width: 860px; }
.k3-document .k3-card h2:not(:first-child) { margin-top: 26px; }
.k3-center-actions { display: flex; justify-content: center; padding-top: 20px; }
@media (max-width: 900px) {
    .k3-game-grid, .k3-demo-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 680px) {
    .k3-shell { width: min(100% - 20px, 1180px); padding-top: 16px; }
    .k3-hero, .k3-topbar, .k3-document-header, .k3-section-heading { flex-direction: column; align-items: stretch; }
    .k3-section-heading p { text-align: left; }
    .k3-auth-grid, .k3-game-grid, .k3-demo-grid { grid-template-columns: 1fr; }
    .k3-nav { margin-top: 4px; }
}
