/* Wortzeit is intentionally scoped; existing portal controls stay untouched. */
.wortzeit-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(270px,1fr);gap:24px;align-items:start}
.wortzeit-game{min-width:0;padding:28px!important;background:rgba(255,255,255,.96)!important}
.wortzeit-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.wortzeit-heading h2{font-size:2rem;margin:0 0 8px}.wortzeit-heading p{margin:0 0 12px}.wortzeit-heading button{font-size:.85rem;padding:10px 14px}
.wortzeit-legend{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 24px}.wortzeit-legend span{border-radius:6px;padding:6px 9px;font-size:.8rem;font-weight:600}
.wortzeit-board{list-style:none;padding:0!important;margin:0 auto!important;width:min(100%,340px);display:grid;gap:7px}.wortzeit-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin:0!important;padding:0!important}
.wortzeit-tile{aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;border:2px solid #c5d2de;border-radius:8px;color:#14365c;background:#f7fafc;line-height:1}.wortzeit-tile b{font-size:1.7rem}.wortzeit-tile small{font-size:.7rem;height:12px;margin-top:3px;font-weight:800}
.wz-correct{background:#216947!important;color:#fff!important;border-color:#216947!important}.wz-present{background:#f7d86d!important;color:#382c00!important;border-color:#ba8e16!important}.wz-absent{background:#536378!important;color:#fff!important;border-color:#536378!important}
.wortzeit-status{min-height:3em;margin:20px 0 12px;font-weight:600;font-size:.95rem}.wortzeit-result{padding:18px;border-radius:10px;background:#e7f3ed}.wortzeit-result p{margin-bottom:0}
#wortzeit-form{margin:0}#wortzeit-help{margin:8px 0 16px}
.wortzeit-keyboard{display:grid;gap:6px}.wortzeit-keyrow{display:flex;justify-content:center;gap:4px}.wortzeit-game .wortzeit-key{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1 1 0;min-width:0;max-width:48px;min-height:48px;padding:5px 1px;border:1px solid #b4c4d5;border-radius:6px;background:#eaf0f6;color:#14365c;font-family:inherit;font-size:.95rem;font-weight:700;line-height:1.1;box-shadow:none}.wortzeit-key small{font-size:.65rem;height:9px}.wortzeit-actions{display:flex;gap:12px;margin-top:18px}.wortzeit-actions button{flex:1;min-width:0;font-size:.95rem;padding:12px}.wortzeit-game button:disabled{opacity:.55;cursor:wait}
.wortzeit-aside{min-width:0;display:grid;gap:20px}.wortzeit-aside .panel{margin:0;background:rgba(255,255,255,.96)}.wortzeit-aside h2{font-size:1.3rem;margin-top:0}.wortzeit-aside h3{font-size:1rem}.wortzeit-stats{display:flex;gap:32px;margin:20px 0 28px}.wortzeit-stats div{display:grid;gap:5px}.wortzeit-stats b{font-size:2rem}.wortzeit-stats span{font-size:.9rem;color:#536378}.wortzeit-distribution{list-style:none;padding:0!important}.wortzeit-distribution li{display:flex;justify-content:space-between;border-bottom:1px solid #e5ebf1;padding:7px 0;font-size:.9rem}.wortzeit-rules{font-size:.92rem;line-height:1.6}.wortzeit-rules summary{font-weight:700;cursor:pointer}.wortzeit-rules p:last-child{margin-bottom:0}
@media(max-width:900px){.wortzeit-layout{grid-template-columns:1fr}.wortzeit-game{padding:20px!important}}
@media(max-width:480px){.wortzeit-game{padding:14px!important}.wortzeit-heading{flex-wrap:wrap}.wortzeit-heading h2{font-size:1.75rem}.wortzeit-legend{gap:4px}.wortzeit-legend span{font-size:.72rem;padding:5px}.wortzeit-game .wortzeit-key{min-height:44px;font-size:.8rem}.wortzeit-keyrow{gap:3px}.wortzeit-actions{gap:8px}.wortzeit-actions button{font-size:.82rem;padding:10px 6px}.wortzeit-board{max-width:310px}}

#main:has(.wortzeit-layout)>.page-heading{padding:18px 24px;margin-bottom:20px}#main:has(.wortzeit-layout)>.page-heading h1{font-size:1.65rem;margin:4px 0 8px}#main:has(.wortzeit-layout)>.page-heading p{margin:4px 0}
@media(max-width:480px){#main:has(.wortzeit-layout)>.page-heading{padding:14px;margin-bottom:14px}#main:has(.wortzeit-layout)>.page-heading h1{font-size:1.3rem}.wortzeit-heading{flex-wrap:nowrap;gap:8px}.wortzeit-heading button{font-size:.7rem;padding:8px}.wortzeit-heading .eyebrow{font-size:.6rem}.wortzeit-heading p{font-size:.78rem;margin-bottom:4px}.wortzeit-heading h2{font-size:1.5rem}.wortzeit-board{max-width:240px;gap:5px}.wortzeit-row{gap:5px}.wortzeit-tile b{font-size:1.4rem}.wortzeit-legend{margin:12px 0}.wortzeit-status{min-height:0;font-size:.83rem;margin:12px 0}#wortzeit-form label{margin:0}#wortzeit-help{font-size:.75rem}.wortzeit-actions{margin-top:12px}}

.wortzeit-heading button{flex-shrink:0;white-space:nowrap}

.wortzeit-game input.wortzeit-letter{display:block;width:100%;min-width:0;height:auto;min-height:0;margin:0;padding:0;text-align:center;font-family:inherit;font-size:1.7rem;font-weight:700;line-height:1;letter-spacing:0;caret-color:#14365c;cursor:text;box-shadow:none}
.wortzeit-game input.wortzeit-letter.wortzeit-current{border-color:#008da2;background:#eefafd}
.wortzeit-game input.wortzeit-letter:focus{outline:3px solid #008da2;outline-offset:1px}
@media(max-width:480px){.wortzeit-game input.wortzeit-letter{font-size:1.4rem}}

/* Compact game layout, scoped to Wortzeit. */
.wortzeit-layout{gap:18px;grid-template-columns:minmax(0,1.8fr) minmax(250px,1fr)}
.wortzeit-game{padding:18px!important}
.wortzeit-heading h2{font-size:1.55rem;margin-bottom:4px}
.wortzeit-heading p{margin-bottom:6px}
.wortzeit-heading .eyebrow{font-size:.65rem}
.wortzeit-legend{margin:10px 0 14px;gap:5px}
.wortzeit-legend span{padding:4px 7px;font-size:.74rem}
.wortzeit-board{width:min(100%,260px);gap:5px}
.wortzeit-row{gap:5px}
.wortzeit-tile{border-radius:6px}
.wortzeit-tile b,.wortzeit-game input.wortzeit-letter{font-size:1.4rem}
.wortzeit-status{min-height:0;margin:12px 0;font-size:.85rem}
#wortzeit-help{margin:8px 0 12px;font-size:.8rem}
.wortzeit-actions{margin-top:10px;gap:8px}
.wortzeit-actions button{padding:10px 6px;font-size:.85rem;min-height:44px}
.wortzeit-aside{gap:14px}
.wortzeit-aside .panel{padding:18px}
.wortzeit-stats{margin:12px 0 16px}
.wortzeit-stats b{font-size:1.6rem}
.wortzeit-distribution li{padding:4px 0}
#main:has(.wortzeit-layout)>.page-heading{padding:12px 18px;margin-bottom:14px}
#main:has(.wortzeit-layout)>.page-heading h1{font-size:1.35rem;margin:2px 0 4px}
#main:has(.wortzeit-layout)>.page-heading .eyebrow{display:none}
@media(min-width:1100px){
 .wortzeit-game{display:grid;grid-template-columns:minmax(220px,260px) minmax(0,1fr);column-gap:18px;align-items:start}
 .wortzeit-heading,.wortzeit-legend{grid-column:1/-1}
 .wortzeit-board{grid-column:1;grid-row:3}
 #wortzeit-form,.wortzeit-result{grid-column:2;grid-row:3}
 .wortzeit-status{grid-column:1/-1;grid-row:4;margin-bottom:0}
 .wortzeit-game .wortzeit-key{min-height:44px;font-size:.8rem}
 .wortzeit-keyrow{gap:3px}
 #wortzeit-help{margin-top:0}
}
@media(max-width:1099px){.wortzeit-layout{grid-template-columns:minmax(0,1.4fr) minmax(240px,1fr)}}
@media(max-width:760px){.wortzeit-layout{grid-template-columns:1fr}.wortzeit-game{padding:14px!important}.wortzeit-board{width:min(100%,240px)}.wortzeit-heading p{font-size:.8rem}.wortzeit-heading h2{font-size:1.4rem}}
@media(max-width:480px){.wortzeit-legend span{font-size:.68rem;padding:4px}.wortzeit-heading{gap:8px}.wortzeit-keyboard{gap:4px}#main:has(.wortzeit-layout)>.page-heading{padding:10px 14px}}
@media(min-width:700px) and (max-width:1099px){
 .wortzeit-layout{grid-template-columns:1fr}
 .wortzeit-game{display:grid;grid-template-columns:240px minmax(0,1fr);gap:0 18px}
 .wortzeit-heading,.wortzeit-legend{grid-column:1/-1}
 .wortzeit-board{grid-column:1;grid-row:3;width:240px}
 #wortzeit-form,.wortzeit-result{grid-column:2;grid-row:3}
 .wortzeit-status{grid-column:1/-1;grid-row:4}
 .wortzeit-game .wortzeit-key{min-height:44px;font-size:.8rem}
 .wortzeit-aside{grid-template-columns:1fr 1fr}
}
@media(max-width:699px){.wortzeit-layout{grid-template-columns:1fr}#main:has(.wortzeit-layout)>.page-heading{display:none}}
