
.wm-app, .wm-app * { box-sizing: border-box; }
.wm-app { --wm-cut: 8px; --gs-ink: #eef1f8; --gs-muted: #98a2bd; --gs-line: #2a3350; --gs-accent: #ef4444; --gs-accent-ink: #fff;
  --gs-panel: #0d1224; --gs-bg: #070a13; --gs-chip: rgba(10, 14, 28, .92);
  position: relative; display: flex; flex-direction: column; color: #eef1f8; font: 16px/1.4 "Segoe UI", system-ui, Arial, sans-serif;
  overflow: clip; -webkit-tap-highlight-color: transparent; }
.wm-app.wm-embedded { height: clamp(480px, calc(100svh - 110px), 900px); border: 1px solid #2a3350; background: #070a13;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.wm-app.gs-fs { background: #070a13; }
.wm-app .gs-stage, .wm-app .gs-main { min-height: 0; }
.wm-app.gs-wide .gs-stage { align-items: stretch; grid-template-rows: minmax(0, 1fr); }
.wm-app .gs-side { min-height: 0; overflow: auto; }
.wm-app .gs-main { display: flex; flex-direction: column; }
.wm-cut { clip-path: polygon(var(--wm-cut) 0, 100% 0, 100% calc(100% - var(--wm-cut)), calc(100% - var(--wm-cut)) 100%, 0 100%, 0 var(--wm-cut)); }
.wm-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 0 0 env(safe-area-inset-bottom, 0); }
.wm-info { font: 700 12px/1 monospace; letter-spacing: 1px; color: #fca5a5; }
.wm-hud { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.wm-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 8px; background: rgba(13, 18, 36, .9); border: 1px solid rgba(239, 68, 68, .3); --wm-cut: 6px; }
.wm-chip small { font: 700 9px/1 monospace; letter-spacing: 1.3px; color: #98a2bd; }
.wm-chip b { font: 800 14px/1 monospace; color: #fff; white-space: nowrap; }
#wmHearts span { margin-right: 1px; }
#wmHearts span.on { color: #ef4444; }
#wmHearts span.lost { color: #3f4660; }
#wmSpC b { color: #fde047; }
.wm-chip.hit { animation: wmHit .5s ease; }
@keyframes wmHit { 0%, 100% { transform: none; } 30% { transform: scale(1.18); } 60% { transform: scale(.95); } }
.wm-stage { position: relative; flex: 1 1 auto; min-height: 300px; --wm-cut: 12px; overflow: hidden; background: #0a0e18; border: 1px solid #2a3350;
  touch-action: none; user-select: none; -webkit-user-select: none; }
.wm-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.wm-stage.off { background: radial-gradient(ellipse at 50% 20%, #1c2342 0%, #10152a 55%, #070a13 100%); touch-action: manipulation; }
.wm-stage.off canvas { display: none; }
.wm-off { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 10px; z-index: 2; }
.wm-off[hidden] { display: none; }
.wm-off-mags { display: grid; gap: 8px; grid-template-columns: 1fr; }
.wm-off-mags.n2 { grid-template-columns: 1fr 1fr; }
.wm-off-mags.n3 { grid-template-columns: 1fr 1fr 1fr; }
.wm-mag { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-height: 64px; padding: 8px; border: 1px solid #7f1d1d; cursor: pointer;
  background: linear-gradient(160deg, rgba(239, 68, 68, .22), rgba(127, 29, 29, .35)); color: #fff; --wm-cut: 10px; font: inherit; text-align: center; }
.wm-mag.armed { border-color: #fcd34d; box-shadow: inset 0 0 0 2px rgba(252, 211, 77, .5); }
.wm-mag:focus-visible { outline: 3px solid #5eead4; outline-offset: 1px; }
.wm-mag-key { font: 800 15px/1.2 system-ui, sans-serif; letter-spacing: .5px; word-break: break-word; }
.wm-mag-found { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.wm-mag-found i { font-style: normal; font: 700 12px/1 system-ui, sans-serif; padding: 4px 6px; background: linear-gradient(#fde68a, #f59e0b); color: #3b2a00;
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }
.wm-mag-found i.gap { background: rgba(8, 12, 24, .5); color: #64748b; }
.wm-off-low { display: flex; flex-direction: column; gap: 8px; }
.wm-off-hint { text-align: center; font-size: 13px; color: #98a2bd; }
.wm-off-tiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.wm-word { min-height: 48px; min-width: 64px; padding: 10px 14px; border: 1px solid rgba(203, 213, 225, .38); cursor: pointer; --wm-cut: 8px;
  background: linear-gradient(#5b6a8c, #3d4968 45%, #262e48); color: #f1f5f9; font: 700 16px/1.1 system-ui, sans-serif; }
.wm-word.picked { background: linear-gradient(#f1f5f9, #cbd5e1 50%, #94a3b8); color: #0f172a; border-color: #5eead4; }
.wm-word.wait { opacity: .5; }
.wm-word:active { transform: scale(.97); }
.wm-word:focus-visible { outline: 3px solid #5eead4; outline-offset: 1px; }
.wm-msg { min-height: 22px; font-size: 14px; color: #c7d2fe; text-align: center; padding: 0 8px 4px; }
.wm-msg.bad { color: #fca5a5; }
.wm-over { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 14px;
  background: rgba(7, 10, 19, .72); backdrop-filter: blur(2px); }
.wm-card { background: linear-gradient(160deg, #1c2342, #0b0f1e); border: 1px solid rgba(239, 68, 68, .45); --wm-cut: 14px;
  padding: 18px; max-width: 460px; width: 100%; text-align: center; color: #eef1f8; max-height: 100%; overflow: auto; }
.wm-kicker { font: 700 12px/1.2 system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #fca5a5; }
.wm-kicker.bad { color: #fca5a5; }
.wm-title { font: 800 26px/1.2 system-ui, sans-serif; margin: 4px 0 8px; }
.wm-title.sm { font-size: 20px; }
.wm-title.bad { color: #fecaca; }
.wm-band { display: inline-block; margin-left: 8px; font-size: 13px; padding: 2px 8px; background: rgba(255, 255, 255, .08); color: var(--b); vertical-align: 4px;
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }
.wm-sub { color: #c7d2fe; font-size: 14px; margin: 6px 0 10px; line-height: 1.45; }
.wm-go { background: linear-gradient(135deg, #f87171, #dc2626); color: #fff; border: 0; padding: 12px 28px; min-height: 46px;
  font: 800 16px system-ui, sans-serif; cursor: pointer; --wm-cut: 9px; }
.wm-go:focus-visible { outline: 2px solid #5eead4; outline-offset: 3px; }
.wm-stars { font-size: 30px; letter-spacing: 6px; color: #fcd34d; }
.wm-stars .off { filter: grayscale(1) opacity(.3); }
.wm-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0 12px; }
.wm-stat { background: rgba(255, 255, 255, .06); padding: 8px 4px; --wm-cut: 6px; }
.wm-stat b { display: block; font-size: 20px; }
.wm-stat i { font-style: normal; font: 700 10px/1.2 monospace; color: #fca5a5; letter-spacing: .06em; text-transform: uppercase; }
.wm-rev-h { font: 700 12px system-ui, sans-serif; letter-spacing: .1em; color: #fde68a; margin: 4px 0 4px; text-align: left; }
.wm-key { margin: 0 0 6px; font-size: 12px; color: #98a2bd; text-align: left; }
.wm-rev { text-align: left; display: grid; gap: 6px; margin-bottom: 8px; }
.wm-rev-row { background: rgba(0, 0, 0, .25); padding: 7px 10px; font-size: 13.5px; line-height: 1.4; color: #e2e8f0; --wm-cut: 6px; }
.wm-rev-row b { color: #fca5a5; }
.wm-phr { margin: 3px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.wm-tw { color: #fde68a; font-weight: 800; }
.wm-xw { color: #5eead4; font-style: italic; text-decoration: underline dotted; text-underline-offset: 3px; }
.wm-mean { color: #98a2bd; }
.wm-hint { font-size: 12px; color: #c7d2fe; margin: 8px 0 10px; }
@media (max-width: 420px) {
  .wm-info { display: none; }      
  .wm-chip { padding: 3px 6px; gap: 4px; }
  .wm-chip small { font-size: 8px; letter-spacing: 1px; }
  .wm-chip b { font-size: 13px; }
  .wm-off-mags.n3 { grid-template-columns: 1fr; }
  .wm-off-mags.n3 .wm-mag { min-height: 48px; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; }
}
@media (max-width: 420px) { .wm-app .gs-title { font-size: 13px; letter-spacing: .04em; } }
