
.ww-app, .ww-app * { box-sizing: border-box; }
.ww-app { --ww-cut: 8px; --gs-ink: #e2e8f0; --gs-muted: #a5b4cf; --gs-line: #3b2f66; --gs-accent: #a78bfa; --gs-accent-ink: #14082e;
  --gs-panel: #120d28; --gs-bg: #05060f; --gs-chip: rgba(10, 8, 28, .92);
  position: relative; display: flex; flex-direction: column; color: #e2e8f0; font: 16px/1.4 "Segoe UI", system-ui, Arial, sans-serif;
  overflow: clip; -webkit-tap-highlight-color: transparent; }
.ww-app.ww-embedded { height: clamp(480px, calc(100svh - 110px), 900px); border: 1px solid #3b2f66; background: #05060f;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.ww-app.gs-fs { background: #05060f; }
.ww-app .gs-stage, .ww-app .gs-main { min-height: 0; }
.ww-app.gs-wide .gs-stage { align-items: stretch; grid-template-rows: minmax(0, 1fr); }
.ww-app .gs-side { min-height: 0; overflow: auto; }
.ww-app .gs-main { display: flex; flex-direction: column; }
.ww-cut { clip-path: polygon(var(--ww-cut) 0, 100% 0, 100% calc(100% - var(--ww-cut)), calc(100% - var(--ww-cut)) 100%, 0 100%, 0 var(--ww-cut)); }
.ww-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 0 0 env(safe-area-inset-bottom, 0); }
.ww-hud { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.ww-chip-h { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 8px; background: rgba(18, 13, 40, .9); border: 1px solid rgba(167, 139, 250, .4); --ww-cut: 6px; }
.ww-chip-h small { font: 700 9px/1 monospace; letter-spacing: 1.3px; color: #c4b5fd; }
.ww-chip-h b { font: 800 14px/1 monospace; color: #fff; white-space: nowrap; }
.ww-chip-h b.gold { color: #fde68a; }
.web-stage { position: relative; flex: 1 1 0; min-height: 150px; --ww-cut: 12px; overflow: hidden; background: #050a12; border: 1px solid rgba(196, 181, 253, 0.3);
  user-select: none; -webkit-user-select: none; }
.web-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.web-timebar { position: absolute; left: 0; right: 0; top: 0; height: 5px; background: rgba(255,255,255,0.08); z-index: 3; }
.web-timebar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #34d399, #fbbf24 70%, #f87171); transform-origin: left; transition: transform 0.2s linear; }
.web-badges { position: absolute; left: 10px; top: 12px; right: 10px; display: flex; justify-content: space-between; z-index: 3; pointer-events: none; font: bold 12px monospace; color: #e2e8f0; }
.web-badge { background: rgba(2, 6, 14, 0.6); border: 1px solid rgba(255,255,255,0.14); padding: 4px 10px; --ww-cut: 5px;
  clip-path: polygon(var(--ww-cut) 0, 100% 0, 100% calc(100% - var(--ww-cut)), calc(100% - var(--ww-cut)) 100%, 0 100%, 0 var(--ww-cut)); }
.web-clock { font-size: 15px; }
.web-stage.hurry { box-shadow: 0 0 0 2px rgba(248,113,113,0.6) inset, 0 0 28px rgba(248,113,113,0.35) inset; animation: webHurry 0.9s ease-in-out infinite; }
@keyframes webHurry { 50% { box-shadow: 0 0 0 2px rgba(248,113,113,0.2) inset, 0 0 6px rgba(248,113,113,0.1) inset; } }
.web-float { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font: bold 22px monospace; color: #fde68a; text-shadow: 0 0 12px rgba(0,0,0,0.9); z-index: 4; pointer-events: none; opacity: 0; }
.web-float.go { animation: webFloat 1.1s ease-out forwards; }
@keyframes webFloat { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.8); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -120%) scale(1.1); } }
.web-over { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 10px; box-sizing: border-box; z-index: 5;
  background: radial-gradient(ellipse at center, rgba(2,6,14,0.55), rgba(2,6,14,0.88)); }
.web-over.show { display: flex; }
.web-card { --ww-cut: 14px; width: min(460px, 100%); max-height: 100%; overflow: auto; background: rgba(8, 12, 24, 0.94); border: 1px solid rgba(196,181,253,0.4); padding: 16px 16px 14px; color: #e2e8f0; text-align: center; }
.web-title { font: bold 24px/1.15 Georgia, serif; color: #f5f3ff; margin: 2px 0 6px; }
.web-sub { font-size: 13px; color: #a5b4cf; margin-bottom: 10px; }
.web-stars { font-size: 26px; letter-spacing: 4px; margin: 4px 0; }
.web-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 10px; }
.web-stat { background: rgba(255,255,255,0.06); padding: 6px 4px; font-size: 11px; color: #94a3b8; --ww-cut: 6px; }
.web-stat b { display: block; font: bold 17px monospace; color: #fde68a; }
.web-go { --ww-cut: 10px; background: linear-gradient(180deg, #8b5cf6, #6d28d9); color: #fff; border: 0; padding: 12px 24px; min-height: 46px; font: bold 15px system-ui, sans-serif; cursor: pointer; }
.web-go:hover { filter: brightness(1.1); }
.web-go:disabled { opacity: 0.5; cursor: default; }
.web-rev { text-align: left; margin: 6px 0 12px; max-height: 190px; overflow: auto; border-top: 1px dashed #334155; padding-top: 8px; }
.web-rev-head { font: bold 11px monospace; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.web-rev-row { font-size: 12.5px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.05); line-height: 1.4; }
.web-rev-row .q { color: #cbd5e1; }
.web-rev-row .a { color: #86efac; font-weight: bold; }
.web-rev-row .p { color: #fca5a5; text-decoration: line-through; }
.web-rev-row .ex { color: #94a3b8; font-style: italic; display: block; }
.web-q { flex: 0 0 auto; --ww-cut: 12px; background: rgba(12, 10, 30, 0.92); border: 1px solid #2d2656; padding: 12px; min-height: 170px; }
.web-ask { font: bold 11px monospace; color: #a78bfa; text-transform: uppercase; letter-spacing: 0.6px; display: flex; align-items: center; gap: 6px; }
.web-qtext { font: 600 19px/1.35 Georgia, serif; color: #f1f5f9; margin: 6px 0 10px; min-height: 26px; overflow-wrap: anywhere; }
.web-qtext.word { font-size: 26px; text-align: center; color: #fde68a; letter-spacing: 0.5px; }
.web-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.web-opts.long { grid-template-columns: 1fr; }
.web-opt { --ww-cut: 9px; text-align: left; background: rgba(40, 34, 78, 0.85); color: #e2e8f0; border: 1px solid #4a3f86; padding: 11px 12px; font: 15px/1.3 system-ui, sans-serif; cursor: pointer; min-height: 48px;
  -webkit-tap-highlight-color: transparent; transition: background 0.15s, border-color 0.15s, transform 0.08s; overflow-wrap: anywhere; }
.web-opt:hover:not(:disabled) { border-color: #a78bfa; background: rgba(76, 29, 149, 0.45); }
.web-opt:active:not(:disabled) { transform: scale(0.98); }
.web-opt:disabled { cursor: default; }
.web-opt.right { background: rgba(22, 101, 52, 0.6); border-color: #4ade80; color: #fff; }
.web-opt.wrong { background: rgba(127, 29, 29, 0.65); border-color: #f87171; color: #fff; }
.web-opt .k { display: inline-block; width: 20px; color: #8b8fc4; font: bold 12px monospace; }
.web-fb { min-height: 20px; margin-top: 8px; font-size: 13px; color: #cbd5e1; }
.web-fb b { color: #86efac; }
.web-fb .bad { color: #fca5a5; font-weight: bold; }
.web-fb i { color: #94a3b8; }
.web-idle { color: #8b8fc4; text-align: center; padding: 30px 6px; font-size: 14px; }
@media (max-width: 640px) {
  .web-opts { grid-template-columns: 1fr; gap: 7px; }
  .web-opt { padding: 10px 12px; min-height: 46px; }
  .web-qtext { font-size: 17px; }
  .web-qtext.word { font-size: 23px; }
  .web-title { font-size: 21px; }
  .web-q { padding: 10px; }
}
@media (max-width: 420px) { .ww-app .gs-title { font-size: 13px; letter-spacing: .04em; } .ww-chip-h { padding: 3px 6px; gap: 4px; } .ww-chip-h small { font-size: 8px; letter-spacing: 1px; } .ww-chip-h b { font-size: 13px; } }
@media (max-height: 700px) { .web-q { min-height: 0; } .web-qtext { margin: 4px 0 8px; } .web-idle { padding: 14px 6px; } }
