
.wwl-app, .wwl-app * { box-sizing: border-box; }
.wwl-app { --ink: #f4f6ff; --muted: #b7c0dc; --line: rgba(255, 255, 255, .16); --glass: rgba(9, 12, 26, .78); --glass2: rgba(9, 12, 26, .9);
  --gold: #ffd166; --good: #7ee0a1; --bad: #ff9a8a; --accent: #c77dff; --cut: 8px;
  --gs-ink: var(--ink); --gs-muted: var(--muted); --gs-line: #2c3150; --gs-accent: #c77dff; --gs-accent-ink: #1b0b2e;
  --gs-panel: #141833; --gs-bg: #0b1020; --gs-chip: rgba(22, 26, 52, .92);
  position: relative; display: flex; flex-direction: column; color: var(--ink); font: 16px/1.4 "Segoe UI", system-ui, Arial, sans-serif;
  overflow: clip; -webkit-tap-highlight-color: transparent; }
.wwl-app.wwl-embedded { height: clamp(580px, calc(100svh - 110px), 900px); border: 1px solid #2c3150; background: #0b1020;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.wwl-app.gs-fs { background: #0b1020; }
.wwl-app button { font: inherit; color: inherit; cursor: pointer; }
.wwl-app button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wwl-app .gs-stage, .wwl-app .gs-main { min-height: 0; }
.wwl-app.gs-wide .gs-stage { align-items: stretch; grid-template-rows: minmax(0, 1fr); }
.wwl-app .gs-side { min-height: 0; overflow: auto; }
.wwl-cut { clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.wwl-msg { text-align: center; padding: 30px 10px; color: var(--muted); }
.wwl-body { position: relative; flex: 1; min-height: 0; display: flex; }
.wwl-stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.wwl-scene { position: absolute; inset: 0; top: var(--wwl-hud, 0px); z-index: 0; overflow: hidden; background: #1a1446; pointer-events: none; }
.wwl-scene > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wwl-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wwl-scene .ww-sky-canvas { opacity: 0; transition: opacity .7s ease; }
.wwl-scene.ww-ready .ww-sky-canvas { opacity: 1; }
.wwl-scene.ww-ready > svg { visibility: hidden; transition: visibility 0s linear .8s; }
.wwl-scene.ww-ready > svg * { animation: none; }   
.wwl-scene.ww-live .ww-cloud, .wwl-scene.ww-live .ww-bird { display: none; }
.wwl-scene::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(to bottom, rgba(5, 8, 14, calc(.18 + var(--ww-day, 0) * .18)) 0%, rgba(5, 8, 14, 0) 22%, rgba(5, 8, 14, 0) 46%, rgba(5, 8, 14, calc(.55 + var(--ww-day, 0) * .2)) 100%); }
.wwl-scene .ww-star { animation: wwlTwinkle 3.5s ease-in-out infinite; }
.wwl-scene .ww-cloud { animation: wwlDrift 90s linear infinite; }
.wwl-scene .ww-aurora { animation: wwlAurora 9s ease-in-out infinite alternate; }
@keyframes wwlTwinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes wwlDrift { from { transform: translateX(-120px); } to { transform: translateX(120px); } }
@keyframes wwlAurora { from { transform: translateY(-10px) skewX(-4deg); opacity: .22; } to { transform: translateY(12px) skewX(4deg); opacity: .42; } }
.wwl-stage .ww-fly { position: absolute; z-index: 6; pointer-events: none; font: 800 26px "Segoe UI", Arial, sans-serif; color: #fff7dc;
  text-shadow: 0 0 6px #ffd166, 0 0 16px rgba(255, 196, 90, .85); will-change: transform, opacity; }
.wwl-stage .ww-journey, .wwl-stage .pw-journey { position: absolute; left: 0; right: 0; top: 30%; z-index: 4; pointer-events: none; text-align: center; animation: wwlJourney 4s ease both; }
.wwl-stage .ww-journey span { display: inline-block; font: 800 clamp(20px, 6vw, 32px) "Segoe UI", Arial, sans-serif; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); }
@keyframes wwlJourney { 0% { opacity: 0; transform: translateY(10px); } 30% { opacity: 0; } 50% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
.wwl-place { margin-left: auto; font: 600 11px "Segoe UI", Arial, sans-serif; color: #fff;
  background: rgba(5, 8, 14, .5); padding: 2px 9px; pointer-events: none; }
.wwl-hud { position: relative; z-index: 5; flex: 0 0 auto; background: var(--glass2); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.wwl-hudrow { display: flex; align-items: center; gap: 8px; padding: 6px 10px 0; min-width: 0; }
.wwl-hudrow:has(.wwl-stat:empty):has(.wwl-place:empty) { display: none; }
.wwl-stat { display: flex; gap: 10px; padding: 3px 10px; background: var(--glass); --cut: 6px;
  font: 700 13px "Segoe UI", Arial, sans-serif; font-variant-numeric: tabular-nums; pointer-events: none; }
.wwl-stat:empty, .wwl-place:empty { display: none; }
.wwl-top { position: relative; z-index: 3; flex: 1 1 46%; min-height: 0; display: flex; flex-direction: column; padding: 10px 10px 0; pointer-events: none; }
.wwl-gridbox { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; contain: layout paint; }
.wwl-grid { --cs: 34px; display: grid; gap: 4px; grid-template-columns: repeat(var(--cols, 5), var(--cs)); grid-auto-rows: var(--cs); }
.wwl-cell { width: var(--cs); height: var(--cs); }
.wwl-cell.on { display: flex; align-items: center; justify-content: center; background: rgba(250, 248, 240, .9); color: #1a1830;
  font: 800 calc(var(--cs) * .56) "Segoe UI", Arial, sans-serif; --cut: calc(var(--cs) * .2); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.wwl-cell.on.empty { background: rgba(12, 16, 36, .72); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); }
.wwl-cell.on.got { background: linear-gradient(#fffbe8, #ffe9a8); }
.wwl-cell.pop { animation: wwlPop .42s cubic-bezier(.3, 1.6, .5, 1) both; }
.wwl-cell.peek { animation: wwlPeek 1.1s ease both; }
@keyframes wwlPop { 0% { transform: scale(.4); opacity: .3; } 100% { transform: none; opacity: 1; } }
@keyframes wwlPeek { 0%, 100% { transform: none; } 30% { transform: scale(1.18); } }
.wwl-app.calm .wwl-cell.pop, .wwl-app.calm .wwl-cell.peek { animation: none; }
.wwl-say { position: relative; z-index: 4; min-height: 26px; margin: 4px 12px 0; text-align: center; font-size: 14px; font-weight: 600;
  color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.wwl-say.on { opacity: 1; }
.wwl-say.good { color: #c9ffd9; } .wwl-say.bonus { color: #ffe7a3; } .wwl-say.bad { color: #ffd2ca; }
.wwl-say small { display: block; font-weight: 400; font-size: 12.5px; color: #dfe4f5; }
.wwl-bottom { position: relative; z-index: 3; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 2px 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
.wwl-word { position: relative; height: 40px; min-width: 64px; display: flex; align-items: center; justify-content: center; }
.wwl-word span { display: inline-block; padding: 4px 16px; font: 800 24px "Segoe UI", Arial, sans-serif; letter-spacing: 3px; color: #1a1830;
  background: #fff6d6; --cut: 7px; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.wwl-word span:empty { display: none; }
.wwl-word .gone { position: absolute; left: 50%; top: 50%; translate: -50% -50%; animation: wwlGone .55s ease forwards; pointer-events: none; }
.wwl-word .gone.bad { background: #ffd2ca; animation: wwlGoneBad .5s ease forwards; }
.wwl-word .gone.calm { animation: wwlGoneCalm .5s ease forwards; }
@keyframes wwlGone { to { transform: translateY(-46px) scale(.85); opacity: 0; } }
@keyframes wwlGoneBad { 0%, 100% { transform: none; } 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); opacity: 1; } 100% { opacity: 0; } }
@keyframes wwlGoneCalm { to { opacity: 0; } }
.wwl-wheelrow { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.wwl-wheel-wrap { position: relative; width: var(--wheel, 280px); height: var(--wheel, 280px); flex: 0 0 auto; contain: layout paint; }
.wwl-wheel { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.wwl-ring { fill: rgba(9, 12, 26, .62); stroke: rgba(255, 255, 255, .22); stroke-width: 2; }
.wwl-line { fill: none; stroke: var(--gold); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.wwl-letter circle { fill: #fdfbf4; stroke: rgba(0, 0, 0, .18); stroke-width: 2; }
.wwl-letter text { font: 800 30px "Segoe UI", Arial, sans-serif; fill: #1a1830; pointer-events: none; }
.wwl-letter.sel circle { fill: var(--gold); stroke: #fff; }
.wwl-side { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.wwl-btn { min-width: 52px; min-height: 52px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  border: 0; background: var(--glass2); color: var(--ink); font-size: 20px; line-height: 1; padding: 4px 6px;
  --cut: 10px; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.wwl-btn small { font-size: 10.5px; font-weight: 700; color: var(--muted); margin-top: 3px; }
.wwl-btn:active { transform: scale(.94); }
.wwl-btn.poor small { color: #8a90aa; }
.wwl-btn .wwl-n { font-size: 11px; font-weight: 800; color: var(--gold); }
.wwl-chip { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.wwl-band { font-size: 11px; font-weight: 800; padding: 0 6px; background: var(--b); color: #0b1020; }
.wwl-streak { color: #ffcf6e; }
.wwl-bonuslist { display: flex; flex-wrap: wrap; gap: 6px; }
.wwl-bonuslist span { padding: 3px 9px; background: rgba(255, 209, 102, .16); color: #ffe7a3; font-weight: 700; letter-spacing: 1px; --cut: 5px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.wwl-done { width: min(440px, 94vw); max-height: 88%; overflow-y: auto; overscroll-behavior: contain; background: rgba(12, 15, 34, .96); color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .14); padding: 16px 16px 14px; text-align: center; --cut: 16px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.wwl-done h3 { margin: 0 0 2px; font-size: 22px; color: var(--gold); }
.wwl-done .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 10px; }
.wwl-done .sp { color: var(--good); font-weight: 700; }
.wwl-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0; }
.wwl-chips button { min-height: 40px; padding: 6px 12px; border: 0; background: #262c55; color: #fff; font-weight: 700; letter-spacing: 1px; --cut: 7px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.wwl-chips button.bonus { background: #4a3a12; color: #ffe7a3; }
.wwl-chips button.on { background: var(--accent); color: #1b0b2e; }
.wwl-chips button.nocard { opacity: .7; }
.wwl-lbl { font-size: 12px; color: var(--muted); margin-top: 8px; }
.wwl-card { text-align: left; background: rgba(255, 255, 255, .05); padding: 10px 12px; margin: 8px 0 10px; min-height: 64px; font-size: 14px; }
.wwl-card .w { font-size: 19px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.wwl-card .m { margin-top: 6px; }
.wwl-card .pos { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 0 6px; background: rgba(199, 125, 255, .25); color: #e6c8ff; margin-right: 6px; }
.wwl-card .base { font-size: 12px; color: var(--muted); }
.wwl-card .ex { color: #cfd6ee; font-style: italic; margin-top: 2px; }
.wwl-card .syn { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.wwl-card .syn i { margin-right: 6px; }
.wwl-card .tip, .wwl-card .credit { color: var(--muted); font-size: 12px; }
.wwl-app .wwl-next { position: relative; min-height: 48px; width: 100%; border: 0; background: var(--gold); color: #2a1a00; font-weight: 800; font-size: 17px; overflow: hidden; --cut: 10px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.wwl-next i { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: rgba(0, 0, 0, .25); transform-origin: left; transform: scaleX(0); }
.wwl-next.timing i { animation: wwlTimer var(--t, 12s) linear forwards; }
@keyframes wwlTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.wwl-help li b { color: var(--gold); }
.wwl-modes { position: relative; z-index: 5; flex: 0 0 auto; display: flex; gap: 6px; padding: 6px 10px 0; }
.wwl-mode { flex: 1 1 0; min-height: 40px; padding: 4px 8px; border: 1px solid rgba(199, 125, 255, .35); background: var(--glass); color: var(--muted);
  font-weight: 800; font-size: 14px; --cut: 9px; }
.wwl-mode[aria-pressed="true"] { color: #fff; border-color: var(--accent); background: rgba(88, 44, 140, .85); }
.wwl-mode i { font-style: normal; margin-left: 6px; color: var(--good); }
.wwl-give { flex: 0 0 auto; min-height: 40px; padding: 4px 10px; border: 1px solid rgba(255, 154, 138, .4); background: var(--glass); color: #ffd0c8; font-weight: 700; font-size: 13px; --cut: 9px; }
.wwl-give[hidden] { display: none; }
.wwl-give.sure { background: rgba(140, 40, 40, .9); color: #fff; }
.wwl-pts { color: var(--gold); }
.wwl-body.intro .wwl-top, .wwl-body.intro .wwl-bottom, .wwl-body.intro .wwl-say { visibility: hidden; }
.wwl-intro { display: none; position: absolute; left: 0; right: 0; top: 52px; bottom: 0; z-index: 5; padding: 8px 12px 12px; overflow-y: auto; align-items: center; justify-content: center; }
.wwl-body.intro .wwl-intro { display: flex; }
.wwl-introcard { width: min(440px, 100%); max-height: 100%; overflow-y: auto; background: rgba(12, 15, 34, .94); border: 1px solid rgba(255, 255, 255, .14); padding: 16px; }
.wwl-introcard h3 { margin: 0 0 4px; font-size: 21px; color: var(--gold); }
.wwl-introcard .lead { margin: 0 0 8px; color: var(--ink); font-size: 14.5px; }
.wwl-introcard ul { margin: 0 0 12px; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.wwl-introcard li { margin-bottom: 4px; }
.wwl-introcard .meta { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 12.5px; }
.wwl-introcard .wwl-next:disabled { opacity: .6; }
.wwl-bigscore { font-size: 44px; font-weight: 900; color: var(--gold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.wwl-bigscore small { font-size: 16px; color: var(--muted); }
.wwl-dstats { display: flex; gap: 8px; justify-content: center; margin: 6px 0; }
.wwl-dstats span { flex: 1 1 0; padding: 6px 4px; background: rgba(255, 255, 255, .06); font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; }
.wwl-dstats b { font-size: 18px; color: #fff; }
.wwl-top5 { margin: 4px 0 6px; text-align: left; font-size: 13.5px; }
.wwl-top5 .r { display: flex; gap: 8px; padding: 3px 8px; background: rgba(255, 255, 255, .05); margin-bottom: 2px; }
.wwl-top5 .r span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wwl-top5 .r.me { background: rgba(199, 125, 255, .22); }
.wwl-row2 { display: flex; gap: 8px; margin-top: 8px; }
.wwl-sec { flex: 1 1 0; min-height: 44px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .07); color: #fff; font-weight: 700; --cut: 8px; }
@media (orientation: landscape) and (max-height: 520px) {
  .wwl-stage { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(0, 1fr); }
  .wwl-hud { grid-column: 1; grid-row: 1; }
  .wwl-say { grid-column: 1; grid-row: 2; }
  .wwl-top { grid-column: 1; grid-row: 3; padding-top: 8px; }
  .wwl-bottom { grid-column: 2; grid-row: 1 / -1; justify-content: center; }
}
@media (max-width: 400px) { .wwl-mode { font-size: 13px; padding: 4px 4px; } .wwl-give { font-size: 12px; padding: 4px 7px; } }
