/* Python World */
.wd { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 10px; }
.wd-list { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; }
.wd-main { min-width: 0; }
.wd-stage { position: relative; height: min(62vh, 560px); min-height: 340px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #9ed8ff; }
.wd-stage canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
.wd-stage canvas:focus { box-shadow: inset 0 0 0 3px #f59e0b; }
.wd-hud { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.wd-hud > * { pointer-events: auto; }
#wd-score { padding: 6px 14px; border-radius: 999px; background: rgba(15, 23, 42, .65); color: #fff; font-weight: 700; font-size: 18px; }
.wd-hint { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(15, 23, 42, .65); color: #fff; font-size: 13px; white-space: nowrap; pointer-events: none; }
.wd-bubble { position: absolute; top: 22%; left: 50%; transform: translateX(-50%); padding: 8px 14px; border-radius: 14px; background: #fff; color: #111; font-weight: 600; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
.wd-message { position: absolute; top: 40%; left: 0; right: 0; text-align: center; font: 700 clamp(26px, 5vw, 46px) system-ui; color: #fff; text-shadow: 0 3px 0 #0f172a, 0 0 18px rgba(0, 0, 0, .5); pointer-events: none; }
.wd-message.is-in { animation: wd-pop .5s ease; }
@keyframes wd-pop { from { transform: scale(.6); opacity: 0; } }
.wd-pad { display: none; position: absolute; right: 12px; bottom: 12px; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(2, 46px); gap: 4px; }
.wd-pad button { border-radius: 12px; background: rgba(15, 23, 42, .55); color: #fff; font-size: 18px; touch-action: none; user-select: none; }
.wd-pad [data-key="arrowup"] { grid-column: 2; } .wd-pad [data-key="arrowleft"] { grid-column: 1; grid-row: 2; }
.wd-pad [data-key=" "] { grid-column: 3; grid-row: 1; } .wd-pad [data-key="arrowright"] { grid-column: 3; grid-row: 2; } .wd-pad [data-key="arrowdown"] { grid-column: 2; grid-row: 2; }
@media (pointer: coarse) { .wd-pad { display: grid; } .wd-hint { display: none; } }
.wd-main .lk-title { margin-top: 14px; }
.wd-ref { margin-top: 14px; }
.wd-ref pre { font-size: 12.5px; }
@media (max-width: 900px) { .wd { grid-template-columns: minmax(0, 1fr); } .wd-list { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
