/* My Kingdom Keys RC5.7 — Full Key Game */

.key-game-scripture-warning{
    display:grid;grid-template-columns:46px 1fr;gap:13px;margin:0 0 15px;padding:15px;
    border-radius:19px;background:#3c4937;color:#fff;box-shadow:0 10px 28px rgba(39,47,35,.10)
}
.key-warning-mark{
    width:44px;height:44px;display:grid;place-items:center;border-radius:14px;
    background:rgba(255,255,255,.12);font-size:1.25rem
}
.key-game-scripture-warning span{
    display:block;font-size:.75rem;line-height:1.2;letter-spacing:.08em;font-weight:950;opacity:.75
}
.key-game-scripture-warning h2{
    margin:4px 0 7px;font-family:Georgia,'Times New Roman',serif;font-size:1.2rem;line-height:1.25
}
.key-game-scripture-warning p{margin:0;font-size:.93rem;line-height:1.55;opacity:.93}
.key-game-scripture-warning small{display:block;margin-top:7px;font-size:.8rem!important;opacity:.72}

.key-game-hero{
    display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center;
    margin:0 0 12px;padding:20px;border-radius:24px;background:#f4ead8;border:1px solid rgba(61,68,52,.08)
}
.key-game-hero h1{
    margin:5px 0 7px;font-family:Georgia,'Times New Roman',serif;
    font-size:clamp(2rem,8vw,3rem);line-height:1.02;color:#2d352b
}
.key-game-hero h1 em{font-weight:500}
.key-game-hero p{margin:0;max-width:520px;color:#62695f;font-size:.95rem;line-height:1.55}
.key-game-count{
    min-width:86px;padding:13px 10px;border-radius:21px;background:#e7d9ae;text-align:center
}
.key-game-count span{display:block;font-size:.65rem;letter-spacing:.06em;font-weight:950;color:#6e6347}
.key-game-count strong{display:block;margin:3px 0;font-family:Georgia,'Times New Roman',serif;font-size:2.2rem;line-height:1}
.key-game-count b{font-size:1.2rem}

.key-game-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:12px 0 15px}
.key-game-stats a{
    padding:11px 7px;border-radius:15px;background:#fffaf0;border:1px solid rgba(57,64,52,.09);
    text-align:center;text-decoration:none;color:inherit
}
.key-game-stats strong{display:block;font-size:1.22rem}
.key-game-stats span{display:block;margin-top:2px;font-size:.72rem;color:#70766e;line-height:1.25}

.key-game-rule{margin:12px 0 18px;padding:15px;border-radius:18px;background:#ece9df}
.key-game-rule>span{font-size:.73rem;letter-spacing:.08em;font-weight:950;color:#687264}
.key-game-loop{
    display:flex;align-items:center;gap:5px;overflow-x:auto;padding:8px 0 7px;scrollbar-width:none
}
.key-game-loop b{
    flex:0 0 auto;padding:7px 9px;border-radius:10px;background:#fffdf7;color:#40513a;
    font-size:.75rem;letter-spacing:.03em
}
.key-game-loop i{font-style:normal;color:#a29d92}
.key-game-rule p{margin:0;color:#656b62;font-size:.88rem;line-height:1.5}

.today-key-challenge{
    position:relative;margin:18px 0 22px;padding:20px;border-radius:25px;
    background:linear-gradient(145deg,#334132,#59634f);color:#fff;overflow:hidden
}
.today-key-challenge::after{
    content:"🔑";position:absolute;right:-8px;bottom:-25px;font-size:7rem;opacity:.055;transform:rotate(-22deg)
}
.challenge-kicker{font-size:.74rem;letter-spacing:.09em;font-weight:950;opacity:.7}
.challenge-key-icon{font-size:2.2rem;margin:12px 0 3px}
.today-key-challenge>span{display:block;font-size:.72rem;letter-spacing:.08em;font-weight:950;color:#e6d7a6}
.today-key-challenge h2{
    position:relative;z-index:1;margin:4px 0 7px;font-family:Georgia,'Times New Roman',serif;font-size:1.65rem;line-height:1.15
}
.today-key-challenge p{position:relative;z-index:1;margin:0 0 10px;font-size:.94rem;line-height:1.55;opacity:.9}
.challenge-reference{position:relative;z-index:1;margin:8px 0 13px;font-size:.8rem;font-weight:850;opacity:.72}
.today-key-challenge>a,.today-key-challenge form button{
    position:relative;z-index:1;display:inline-flex;min-height:46px;box-sizing:border-box;align-items:center;
    padding:11px 14px;border:0;border-radius:13px;background:#f3ead7;color:#334031;
    text-decoration:none;font-size:.84rem;font-weight:950
}

.found-key-grid,.scripture-key-grid{display:grid;gap:10px}
.found-key-card{
    padding:16px;border-radius:19px;border:1px dashed rgba(75,78,60,.24);background:#f5f0e3
}
.found-key-head{display:flex;justify-content:space-between;gap:10px;align-items:center}
.found-key-head span{font-size:.72rem;letter-spacing:.06em;font-weight:950;color:#75633f}
.found-key-head small{font-size:.73rem!important;color:#777b72}
.found-key-card h3{
    margin:10px 0 6px;font-family:Georgia,'Times New Roman',serif;font-size:1.27rem;line-height:1.2
}
.found-key-card p{margin:0 0 10px;color:#62685f;font-size:.91rem;line-height:1.52}
.found-key-ref{margin-bottom:11px;font-size:.78rem;font-weight:900;color:#5e6758}
.found-key-card>a,.found-key-card form button{
    display:inline-flex;align-items:center;min-height:42px;padding:9px 11px;border:0;border-radius:11px;
    background:#40513a;color:#fff;text-decoration:none;font-size:.8rem;font-weight:900
}

.scripture-key-card.state-ready{background:#f4efe2}
.scripture-key-card.state-lost{background:#f2e1dc;border-color:rgba(128,62,48,.16)}
.scripture-key-card.state-rusting{background:#eee3d1;border-color:rgba(121,83,38,.17)}
.scripture-key-card.state-needs-polish{background:#f5edda}
.scripture-key-card.state-polished{background:#eaf0e5}
.scripture-key-meta{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 10px}
.scripture-key-meta small{font-size:.76rem!important;color:#73776f}
.key-empty-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.key-empty-actions a{padding:10px 12px;border-radius:11px;background:#40513a;color:#fff;text-decoration:none;font-size:.82rem;font-weight:900}
.key-empty-actions a+ a{background:#e9e1d4;color:#586052}

.key-practice-head>a{color:#697166;text-decoration:none;font-size:.87rem}
.key-practice-head h1{
    margin:5px 0 7px;font-family:Georgia,'Times New Roman',serif;font-size:2rem;line-height:1.08
}
.key-practice-head p{margin:0;font-size:.96rem;line-height:1.55;color:#666d63}
.key-practice-rule{
    margin:15px 0;padding:13px 14px;border-radius:16px;background:#40513a;color:#fff
}
.key-practice-rule span{display:block;font-size:.73rem;letter-spacing:.07em;font-weight:950;opacity:.72}
.key-practice-rule strong{display:block;margin-top:3px;font-size:.98rem;line-height:1.4}
.key-proof-door{
    margin:17px 0;padding:18px;border-radius:22px;background:linear-gradient(145deg,#2f3e30,#53614c);color:#fff
}
.key-proof-door>span{font-size:.74rem;letter-spacing:.08em;font-weight:950;opacity:.72}
.key-proof-door h2{margin:4px 0 6px;font-family:Georgia,'Times New Roman',serif;font-size:1.5rem}
.key-proof-door p{margin:0 0 13px;font-size:.92rem;line-height:1.5;opacity:.86}
.key-proof-door form button{
    width:100%;min-height:51px;border:0;border-radius:14px;background:#f4ead8;color:#334031;font-size:.9rem;font-weight:950
}
.key-proof-door>a{display:block;margin-top:11px;text-align:center;color:#fff;font-size:.83rem;opacity:.82}

.key-proof-v57,.key-reference-v57{
    min-height:100dvh;box-sizing:border-box;padding:max(74px,calc(env(safe-area-inset-top) + 66px)) 20px max(22px,env(safe-area-inset-bottom));
    background:#fcfaf5;color:#20261e;overflow-y:auto
}
.key-proof-progress{display:flex;align-items:center;justify-content:center;gap:6px;margin:0 auto 24px;max-width:580px}
.key-proof-progress span{font-size:.73rem;line-height:1.2;font-weight:900;color:#8a8c85}
.key-proof-progress span.active{color:#40513a}.key-proof-progress span.done{color:#4f7548}
.key-proof-progress i{width:24px;height:1px;background:#d8d3ca}.key-proof-progress i.done{background:#709268}
.key-proof-question{text-align:center;margin:8px auto 22px;max-width:620px}
.key-proof-question h1{
    margin:8px 0;font-family:Georgia,'Times New Roman',serif;font-size:clamp(2rem,9vw,3.3rem);line-height:1.05
}
.key-proof-question p{margin:0;font-size:1.08rem;font-weight:800}
.key-proof-question small{display:block;margin-top:6px;color:#777b74;font-size:.84rem!important}
.key-proof-methods{max-width:620px;margin:auto}
.key-proof-method{text-align:center;padding:17px;border-radius:20px;background:#fff;border:1px solid #e0dbd2}
.key-proof-method>strong{display:block;font-size:1.05rem}
.key-proof-method>small{display:block;margin:3px 0 12px;color:#72776f;font-size:.83rem!important}
.key-reference-question{max-width:650px;margin:15px auto;text-align:center}
.key-reference-question h1{
    margin:18px 0 14px;font-family:Georgia,'Times New Roman',serif;font-size:clamp(2rem,8vw,3rem);line-height:1.08
}
.key-reference-question blockquote{
    margin:0 auto 16px;padding:18px;border-radius:19px;background:#fff;border:1px solid #ded9d0;
    font-family:Georgia,'Times New Roman',serif;font-size:clamp(1.25rem,5vw,1.75rem);line-height:1.5;color:#293028
}
.key-reference-question>p{font-size:.96rem;color:#676d64}
.key-reference-question form{margin-top:15px}
.key-reference-question label{text-align:left;display:block}
.key-reference-question label>span{display:block;margin-bottom:5px;font-size:.77rem;font-weight:950;letter-spacing:.07em;color:#667061}
.key-reference-question input{
    width:100%;box-sizing:border-box;min-height:54px;padding:11px 13px;border:1px solid #cfc9bf;border-radius:14px;font-size:1.08rem;background:#fff
}
.key-reference-question form button{
    width:100%;min-height:52px;margin-top:9px;border:0;border-radius:14px;background:#40513a;color:#fff;font-size:.9rem;font-weight:950
}

.lost-key-symbol{font-size:3rem;margin-bottom:4px}
.key-lost-message{margin:15px 0;padding:14px;border-radius:15px;background:#f0dfd7;color:#60453c}
.key-lost-message strong{display:block;margin-bottom:3px}
.key-lost-message span{font-size:.9rem;line-height:1.45}

.kingdom-key-found{
    display:grid;grid-template-columns:48px 1fr;gap:12px;margin:18px 0;padding:17px;border-radius:21px;
    background:linear-gradient(145deg,#eee5c8,#f7f1df);border:1px solid rgba(104,87,48,.14)
}
.key-found-icon{
    width:46px;height:46px;display:grid;place-items:center;border-radius:14px;background:#dfcc94;font-size:1.35rem
}
.key-found-copy>span{display:block;font-size:.73rem;letter-spacing:.08em;font-weight:950;color:#79683f}
.key-found-copy h2{margin:4px 0 6px;font-family:Georgia,'Times New Roman',serif;font-size:1.3rem}
.key-found-copy>p{margin:0 0 11px;color:#5f6258;font-size:.92rem;line-height:1.5}
.key-found-scripture{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 11px;padding:9px 10px;border-radius:11px;background:rgba(255,255,255,.54)}
.key-found-scripture small{font-size:.68rem!important;letter-spacing:.06em;font-weight:900;color:#7a7465}
.key-found-scripture strong{font-size:.87rem}
.key-found-scripture b{font-size:.73rem;color:#777267}
.key-found-copy>a,.key-found-copy form button{
    display:inline-flex;min-height:42px;align-items:center;padding:9px 11px;border:0;border-radius:11px;background:#40513a;color:#fff;text-decoration:none;font-size:.79rem;font-weight:900
}

.studio-key-game-editor{
    margin:18px 0;padding:17px;border-radius:18px;border:1px solid rgba(111,91,44,.18);background:#f3ecd8
}
.studio-key-game-editor>span{font-size:.74rem;letter-spacing:.08em;font-weight:950;color:#75633f}
.studio-key-game-editor h2{margin:4px 0 5px;font-size:1.15rem}
.studio-key-game-editor>p{margin:0 0 12px;color:#65675e;font-size:.88rem;line-height:1.5}

html[data-text-size="large"] .key-game-scripture-warning p,
html[data-text-size="large"] .today-key-challenge p,
html[data-text-size="large"] .found-key-card p{font-size:1rem}
html[data-text-size="xlarge"] .key-game-scripture-warning p,
html[data-text-size="xlarge"] .today-key-challenge p,
html[data-text-size="xlarge"] .found-key-card p{font-size:1.08rem}

html[data-contrast="high"] .key-game-scripture-warning,
html[data-contrast="high"] .key-game-hero,
html[data-contrast="high"] .today-key-challenge,
html[data-contrast="high"] .found-key-card,
html[data-contrast="high"] .kingdom-key-found{
    background:#fff!important;color:#111!important;border:2px solid #111!important
}

@media(max-width:430px){
    .key-game-stats{grid-template-columns:repeat(2,1fr)}
    .key-game-hero{grid-template-columns:1fr auto;padding:17px}
    .key-game-count{min-width:72px}
}
@media(max-width:360px){
    .key-game-hero{grid-template-columns:1fr}
    .key-game-count{display:flex;gap:8px;align-items:center;justify-content:center}
    .key-game-count strong{font-size:1.7rem}
    .kingdom-key-found{grid-template-columns:1fr}
}
