
.wg-app, .wg-app * { box-sizing: border-box; }
.wg-app { --wg-ink: #f2f6f1; --wg-muted: #b8c8b4; --wg-line: rgba(255, 255, 255, .14); --wg-glass: rgba(14, 22, 18, .72);
  --wg-leaf: #7ed492; --wg-bad: #f2a07b; --wg-gold: #ffd34d;
  --gs-ink: var(--wg-ink); --gs-muted: var(--wg-muted); --gs-line: #2c3b33; --gs-accent: #ff8fab; --gs-accent-ink: #2a0f18;
  --gs-panel: #142019; --gs-bg: #0c140f; --gs-chip: rgba(20, 32, 25, .9);
  position: relative; display: flex; flex-direction: column; color: var(--wg-ink); font: 16px/1.45 "Segoe UI", system-ui, Arial, sans-serif; overflow: clip; }
.wg-app.wg-embedded { height: clamp(560px, calc(100svh - 110px), 880px); clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); border: 1px solid #2c3b33; background: #0c140f; }
.wg-app.gs-fs { background: #0c140f; }
.wg-app button { font: inherit; color: inherit; cursor: pointer; }
.wg-app button:focus-visible { outline: 2px solid var(--wg-gold); outline-offset: 2px; }
.wg-app .gs-stage, .wg-app .gs-main { min-height: 0; }
.wg-app.gs-wide .gs-stage { align-items: stretch; grid-template-rows: minmax(0, 1fr); }
.wg-app .gs-side { min-height: 0; overflow: auto; }
.wg-root { font-weight: 600; color: #ffc2d1; }
.wg-msg { text-align: center; padding: 30px 10px; color: var(--wg-muted); }
.wg-body { position: relative; flex: 1; min-height: 0; display: flex; }
.wg-stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.wg-scene { position: absolute; inset: 0; background: #bfe6ff; }
.wg-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wg-plain-box { position: absolute; inset: 0; }
.wg-plain-box svg { display: block; width: 100%; height: 100%; }
.wg-scene.pw-ready .wg-plain-box { visibility: hidden; transition: visibility 0s linear .8s; }
.wg-scene.pw-ready .wg-plain-box * { animation: none; }   
.wg-scene.wg-wilt .wg-plain-box, .wg-scene.wg-wilt canvas { filter: grayscale(.8) brightness(.9); transition: filter .6s ease; }
.wg-place { position: absolute; right: 10px; bottom: calc(var(--wg-bottom, 150px) + 6px); z-index: 2; display: none; font: 600 11px "Segoe UI", Arial, sans-serif;
  color: #fff; background: rgba(5, 8, 14, .4); padding: 2px 9px; clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); pointer-events: none; }
.wg-scene.pw-live .wg-place { display: block; }
.wg-top { position: relative; z-index: 3; display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 0; pointer-events: none; }
.wg-top > * { pointer-events: auto; }
.wg-hud { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; pointer-events: none; width: min(100%, 640px); align-self: center; }
.wg-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 5px 4px; min-width: 0;
  background: var(--wg-glass); border: 1px solid var(--wg-line); backdrop-filter: blur(4px); clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.wg-chip small { font: 700 9px/1 monospace; letter-spacing: 1.3px; color: var(--wg-muted); text-transform: uppercase; white-space: nowrap; }
.wg-chip b { display: inline-flex; align-items: center; gap: 5px; font: 800 16px/1.15 monospace; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wg-chip b.g { color: #ffc2d1; }
.wg-band { font-size: 11px; font-weight: 700; padding: 1px 6px; clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px); background: var(--b); color: #0b1020; }
.wg-grow b { gap: 4px; min-height: 18px; }
.wg-grow i { width: 9px; height: 9px; transform: rotate(45deg); background: rgba(255, 255, 255, .22); }
.wg-grow i.on { background: var(--wg-leaf); box-shadow: 0 0 6px var(--wg-leaf); }
.wg-card { align-self: center; width: min(100%, 640px); background: rgba(14, 22, 18, .8); border: 1px solid var(--wg-line); clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  padding: 10px 16px 12px; text-align: center; backdrop-filter: blur(6px); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.wg-fam { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--wg-muted); }
.wg-fam b { color: #ffc2d1; }
.wg-sent { font-size: 18px; line-height: 1.55; margin-top: 2px; }
.wg-gap { display: inline-block; min-width: 92px; margin: 0 3px; padding: 0 8px; border-bottom: 2px dashed #ffd36b; transition: background .15s, border-color .15s; }
.wg-gap.hot { background: rgba(255, 211, 107, .25); border-bottom-style: solid; }
.wg-gap.filled { border-bottom: 0; font-weight: 700; }
.wg-gap.good { color: #0f2a17; background: var(--wg-leaf); }
.wg-gap.bad { color: #2a1405; background: var(--wg-bad); }
.wg-say { position: absolute; left: 50%; top: 38%; z-index: 4; transform: translate(-50%, 6px); max-width: 90%; text-align: center; background: var(--wg-glass);
  border: 1px solid var(--wg-line); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); padding: 6px 14px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; }
.wg-say.on { opacity: 1; transform: translate(-50%, 0); }
.wg-bloom { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 16px; cursor: pointer; }
.wg-bloom[hidden] { display: none; }
.wg-bloom-card { background: rgba(14, 22, 18, .9); border: 1px solid var(--wg-line); clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); padding: 16px 22px; text-align: center; max-width: 340px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45); animation: wgPop .5s cubic-bezier(.3, 1.6, .5, 1); }
.wg-stars { font-size: 26px; letter-spacing: 4px; color: rgba(255, 255, 255, .25); }
.wg-stars .on { color: var(--wg-gold); text-shadow: 0 0 10px rgba(255, 211, 77, .7); }
.wg-bloom-title { font-weight: 700; font-size: 18px; }
.wg-bloom-sub { color: var(--wg-muted); font-size: 14px; }
.wg-pts { margin-top: 6px; font-weight: 700; color: var(--wg-leaf); }
@keyframes wgPop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.wg-bottom { position: relative; z-index: 3; margin-top: auto; padding: 0 10px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 8px; align-items: center; background: linear-gradient(transparent, rgba(6, 12, 8, .35) 40%); }
.wg-why { width: min(100%, 640px); max-height: 42vh; overflow-y: auto; background: rgba(14, 22, 18, .9); border: 1px solid var(--wg-line); clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); padding: 10px 14px; }
.wg-why[hidden] { display: none; }
.wg-why-head { font-size: 16px; }
.wg-why-head.good { color: var(--wg-leaf); }
.wg-why-head.bad { color: var(--wg-bad); }
.wg-why-head b { color: var(--wg-ink); }
.wg-tip { color: var(--wg-ink); font-size: 14px; margin-top: 4px; }
.wg-life { color: #f6ad55; font-size: 13px; margin-top: 6px; }
.wg-pos { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 8px; clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px);
  background: rgba(255, 255, 255, .12); color: #fff; vertical-align: middle; }
.wg-next { position: relative; overflow: hidden; margin-top: 8px; border: 0; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); padding: 8px 18px; min-height: 44px; font-weight: 700; background: #ff8fab; color: #2a0f18; }
.wg-ring { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: rgba(42, 15, 24, .45); }
.wg-ring.go { animation: wgRing linear forwards; }
@keyframes wgRing { to { width: 100%; } }
.wg-seeds { width: min(100%, 640px); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wg-seeds.odd .wg-seed:last-child { grid-column: 1 / -1; }
.wg-seed { position: relative; min-height: 58px; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); border: 1px solid rgba(255, 255, 255, .18); background: linear-gradient(180deg, #2b4a33, #1c3323);
  font-size: 18px; font-weight: 600; box-shadow: inset 0 -4px 0 #10200f; touch-action: none; user-select: none; -webkit-user-select: none;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s, box-shadow .12s, opacity .2s; }
.wg-seed:active:not([disabled]) { transform: translateY(3px); box-shadow: inset 0 -1px 0 #10200f; }
.wg-seed.lifted { opacity: .35; }
.wg-seed.right { background: linear-gradient(180deg, #4caf6a, #2f8a4b); color: #fff; }
.wg-seed.wrong { background: linear-gradient(180deg, #b5583c, #8a3d26); color: #fff; }
.wg-seed.dim { opacity: .45; }
.wg-seed[disabled] { cursor: default; }
.wg-key { font-size: 11px; min-width: 20px; padding: 1px 5px; clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px); background: rgba(255, 255, 255, .12); color: var(--wg-muted); }
@media (hover: none) { .wg-key { display: none; } }
.wg-ghost { position: fixed; z-index: 99; pointer-events: none; transform: translate(-50%, -60%) scale(1.08); min-width: 120px; padding: 0 16px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .45); }
.shake { animation: wgShake .38s; }
@keyframes wgShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.wg-famcard { width: min(92vw, 420px); max-height: 80vh; overflow: auto; background: #142019; border: 1px solid #2c3b33; clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); padding: 16px; color: var(--wg-ink); }
.wg-famhead { display: flex; align-items: center; gap: 12px; }
.wg-famhead b { display: block; font-size: 20px; }
.wg-famhead span { color: var(--wg-muted); font-size: 13px; }
.wg-famcard ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.wg-famcard li { background: rgba(255, 255, 255, .05); clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); padding: 8px 10px; font-size: 14px; }
.wg-famcard i { color: var(--wg-muted); }
.wg-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
@media (max-width: 420px) {
  .wg-app.gs-root .gs-bar { gap: 4px; }
  .wg-app.gs-root .gs-btn { min-width: 40px; padding: 0 6px; }
  .wg-app .gs-title { font-size: 13px; letter-spacing: .04em; }
  .wg-sent { font-size: 17px; }
  .wg-seed { min-height: 54px; font-size: 17px; }
  .wg-hud { gap: 4px; }
  .wg-chip small { font-size: 8.5px; letter-spacing: 1px; }
  .wg-chip b { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .shake { animation: none; } }
