/* Sizes follow the Compose source 1:1 (1dp = 1 CSS px, 1sp = 1 CSS px). */

@font-face {
  font-family: "OrbitHeavy";
  src: url("faces/orbit-heavy.ttf") format("truetype");
  font-weight: 700;
  font-display: block;
}

:root {
  --wk-midnight: #12081f;
  --wk-violet: #2a1250;
  --wk-electric: #b14cff;
  --wk-pink: #ff3d9a;
  --wk-cyan: #2de8ff;
  --wk-lav: #e8d6ff;
  --wk-ink: #f6f1ff;
  --wk-mute: #c9b8e8;
  --wk-danger: #ff8aa3;
  --wk-rim: linear-gradient(to bottom right, rgba(177, 76, 255, .8), rgba(45, 232, 255, .55), rgba(255, 61, 154, .45));
  --wk-dock: 78px;
  --wk-top: env(safe-area-inset-top, 0px);
  --wk-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--wk-midnight);
}

.wk-body {
  color: var(--wk-ink);
  font-family: "OrbitHeavy", sans-serif;
  font-weight: 700;
  font-synthesis: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-text-size-adjust: 100%;
}

p, h1, h2 { margin: 0; font: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; -webkit-user-drag: none; }
[hidden] { display: none !important; }

/* ---- type scale (Type.kt) ---- */
.wk-t-head { font-size: 22px; line-height: 28px; }
.wk-t-title { font-size: 18px; line-height: 24px; }
.wk-t-sub { font-size: 16px; line-height: 22px; }
.wk-t-body { font-size: 15px; line-height: 22px; }
.wk-t-small { font-size: 13px; line-height: 18px; color: var(--wk-mute); }
.wk-t-label { font-size: 13px; line-height: 18px; }
.wk-t-tag { font-size: 12px; line-height: 16px; }
.wk-c-lav { color: var(--wk-lav); }
.wk-c-mute { color: var(--wk-mute); }
.wk-center { text-align: center; }
.wk-keep { white-space: pre-wrap; }
.wk-gap-t12 { margin-top: 12px; }
.wk-pad-v6 { margin-top: 6px; margin-bottom: 6px; }
.wk-pad-v20 { margin-top: 20px; margin-bottom: 20px; }
.wk-grow { flex: 1 1 0; min-width: 0; }
.wk-h52 { height: 52px; }
.wk-min52 { min-height: 52px; }

/* ---- frame ---- */
#wk-frame {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}

#wk-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.wk-room {
  position: absolute;
  inset: 0;
  background: var(--wk-midnight) url("soot/backdrop-arena.webp") center / cover no-repeat;
}

.wk-room.wk-alt { background-image: url("soot/backdrop-series.webp"); }

.wk-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.wk-scroll::-webkit-scrollbar { display: none; }

/* ---- surfaces (ThemedPanel / ActionPanel / GlassButton) ---- */
.wk-pane, .wk-plate, .wk-btn, .wk-meter, .wk-boxes-card {
  position: relative;
  isolation: isolate;
}

.wk-pane::before, .wk-plate::before, .wk-btn::before, .wk-meter::before, .wk-boxes-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1.2px;
  border-radius: inherit;
  background: var(--wk-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.wk-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(22, 8, 36, .72);
}

.wk-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(to right, rgba(42, 18, 80, .82), rgba(177, 76, 255, .64));
}

.wk-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 18px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(to right, rgba(42, 18, 80, .92), rgba(177, 76, 255, .78));
  text-align: center;
}
.wk-btn:disabled { background: linear-gradient(to right, rgba(42, 18, 80, .45), rgba(177, 76, 255, .35)); cursor: default; }

.wk-line { display: flex; align-items: center; min-width: 0; }
.wk-line-12 { gap: 12px; width: 100%; }
.wk-after12 { margin-left: 12px; min-width: 0; }
.wk-art-64 { height: 64px; width: auto; }
.wk-art-72 { height: 72px; width: auto; }

.wk-pair { display: flex; width: 100%; }
.wk-pair > * { flex: 1 1 0; min-width: 0; }
.wk-pair-8 { gap: 8px; }
.wk-pair-10 { gap: 10px; }

/* ---- ink (Material ripple, cyan 28%) ---- */
.wk-ink { position: relative; overflow: hidden; }
.wk-ink-drop {
  position: absolute;
  border-radius: 50%;
  background: rgba(45, 232, 255, .28);
  transform: scale(0);
  pointer-events: none;
  animation: wk-ink-grow 360ms cubic-bezier(.2, 0, 0, 1) forwards;
}
.wk-ink-drop.wk-ink-out { animation: wk-ink-grow 360ms cubic-bezier(.2, 0, 0, 1) forwards, wk-ink-fade 220ms linear forwards; }
@keyframes wk-ink-grow { to { transform: scale(1); } }
@keyframes wk-ink-fade { to { opacity: 0; } }

/* ---- Pulse Meter ---- */
.wk-meter {
  width: 100%;
  height: 44px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(22, 8, 36, .78);
}
.wk-meter::before { background: linear-gradient(to right, var(--wk-electric), var(--wk-cyan), var(--wk-pink)); }
.wk-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(to right, var(--wk-electric), var(--wk-pink), var(--wk-cyan));
}
.wk-meter-count {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--wk-lav);
  font-size: 13px;
  line-height: 18px;
}

/* ---- Disclosure ---- */
.wk-consent-col {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--wk-top)) 24px calc(24px + var(--wk-bottom));
}
.wk-consent-go { min-width: 220px; height: 56px; }

/* ---- Home ---- */
.wk-home-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(16px + var(--wk-top)) 16px 16px;
}
.wk-home-play { width: 100%; height: 58px; margin: 16px 0; }
.wk-home-foot { margin: 16px 0 24px; }

/* ---- Game ---- */
.wk-play-col {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(8px + var(--wk-top)) 12px 8px;
}
.wk-play.wk-tight { overflow-y: auto; scrollbar-width: none; }
.wk-play.wk-tight .wk-play-col { bottom: auto; min-height: 100%; }
.wk-play.wk-tight .wk-reelbox { flex: none; height: 320px; }

.wk-play-top { display: flex; align-items: center; gap: 8px; width: 100%; }

.wk-orb {
  position: relative;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
}
.wk-orb img { width: 100%; height: 100%; object-fit: contain; }
.wk-orb:disabled { opacity: .4; cursor: default; }
.wk-s64 { width: 64px; height: 64px; }
.wk-s66 { width: 66px; height: 66px; }

.wk-spin { width: 136px; height: 136px; }
.wk-spin:disabled { opacity: .45; }
.wk-spin span {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  font-size: 20px;
  line-height: 20px;
  text-align: center;
  transform: translateY(calc(-50% - 3px));
}

.wk-reelbox {
  position: relative;
  flex: 1 1 0;
  width: 100%;
  min-height: 320px;
  padding: 8px 0;
}
.wk-reels { position: absolute; inset: 8px 0; }
.wk-reel-window {
  position: absolute;
  top: 8.2%;
  bottom: 8.2%;
  left: 7.2%;
  right: 7.2%;
  display: flex;
  overflow: hidden;
  border-radius: 14px;
}
.wk-reel-bezel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
.wk-reel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 4px;
}
.wk-strip { position: absolute; top: 0; left: 0; right: 0; will-change: transform; }
.wk-cell { height: 33.3333%; }
.wk-strip .wk-cell { height: var(--wk-cell); }
.wk-cell img { width: 100%; height: 100%; padding: 2px; object-fit: contain; }
.wk-cell.wk-lit img { transform: scale(1.04); }
.wk-lines {
  position: absolute;
  top: 34px;
  bottom: 34px;
  left: 22px;
  right: 22px;
  width: calc(100% - 44px);
  height: calc(100% - 68px);
  pointer-events: none;
}

.wk-short {
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 18px;
  background: none;
  color: var(--wk-danger);
}

.wk-deck { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.wk-deck-mid { display: flex; align-items: center; justify-content: space-evenly; width: 100%; }
.wk-chip { height: 58px; flex-direction: column; }

/* ---- lists ---- */
.wk-list { display: flex; flex-direction: column; align-items: flex-start; }
.wk-list > .wk-list { display: contents; }
.wk-list-8 { gap: 8px; }
.wk-list-10 { gap: 10px; }
.wk-scroll > .wk-list { padding: calc(16px + var(--wk-top)) 16px calc(16px + var(--wk-bottom)); }
.wk-scroll > .wk-tuning-col { padding: calc(12px + var(--wk-top)) 16px 12px; }
.wk-tally-row { height: 68px; }
.wk-log-entry { flex-direction: column; }
.wk-log-entry > div { align-self: center; }

.wk-pay-row { display: flex; align-items: center; width: 100%; height: 56px; }
.wk-pay-art { display: flex; align-items: center; justify-content: center; flex: none; width: 56px; height: 56px; }
.wk-pay-art img { width: 48px; height: 48px; object-fit: contain; }
.wk-pay-row p { padding-left: 12px; white-space: pre-wrap; }

.wk-prose {
  margin: 0;
  padding: calc(20px + var(--wk-top)) 20px calc(20px + var(--wk-bottom));
  white-space: pre-line;
}

/* ---- Settings rows ---- */
.wk-switchrow { justify-content: space-between; }
.wk-toggle {
  position: relative;
  flex: none;
  width: 52px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
}
.wk-toggle::before, .wk-toggle::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  transition: all 150ms ease;
}
.wk-toggle::before { left: 0; top: 8px; width: 52px; height: 32px; background: #36343b; box-shadow: inset 0 0 0 2px #938f99; }
.wk-toggle::after { left: 8px; top: 16px; width: 16px; height: 16px; background: #938f99; }
.wk-toggle[aria-checked="true"]::before { background: var(--wk-electric); box-shadow: none; }
.wk-toggle[aria-checked="true"]::after { left: 24px; top: 12px; width: 24px; height: 24px; background: var(--wk-ink); }

/* ---- bottom bar ---- */
#wk-dock {
  display: flex;
  align-items: center;
  flex: none;
  height: calc(var(--wk-dock) + var(--wk-bottom));
  padding: 0 2px var(--wk-bottom);
  background: var(--wk-midnight);
}
.wk-tab {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
  padding: 0 1px;
  border: 0;
  background: none;
}
.wk-tab-orb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.wk-tab-orb img { width: 38px; height: 38px; }
.wk-tab-name {
  max-width: 100%;
  overflow: hidden;
  color: var(--wk-mute);
  font-size: 8px;
  line-height: 10px;
  white-space: nowrap;
  text-align: center;
}
.wk-tab.wk-on .wk-tab-orb { background: var(--wk-violet); }
.wk-tab.wk-on .wk-tab-name { color: var(--wk-lav); }

/* ---- game overlays ---- */
.wk-veil {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 8, 31, .78);
}
#wk-frame.wk-docked .wk-veil { bottom: calc(var(--wk-dock) + var(--wk-bottom)); }

.wk-burst-card {
  display: grid;
  place-items: center;
  width: 88%;
  height: 280px;
}
.wk-burst-card > * { grid-area: 1 / 1; }
.wk-burst-frame { width: 100%; height: 100%; object-fit: fill; }
.wk-burst-glow { width: 86%; height: 180px; padding: 0 24px; object-fit: contain; }
.wk-burst-rays { width: 70%; height: 170px; padding: 12px; object-fit: contain; }
.wk-burst-sparks { width: 84%; height: 140px; padding: 0 20px; object-fit: contain; }
.wk-burst-text { padding: 28px 36px; font-size: 26px; text-align: center; white-space: pre-line; }

.wk-boxes { padding: 24px 16px; }
.wk-boxes-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 24px 20px;
  border-radius: 22px;
  background: linear-gradient(to bottom, rgba(42, 18, 80, .96), rgba(18, 8, 31, .94));
}
.wk-boxes-note { padding: 8px 0 20px; }
.wk-box-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0;
  border: 0;
  border-radius: 9999px;
  background: none;
}
.wk-box-pick img { width: 100%; height: 110px; object-fit: contain; }
.wk-box-pick span { padding-top: 8px; text-align: center; }
.wk-box-pick span:empty { display: none; }

/* ---- dialogs (Material 3 AlertDialog) ---- */
.wk-scrim {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .6);
}
.wk-sheet {
  width: max-content;
  min-width: 280px;
  max-width: min(560px, calc(100vw - 92px));
  padding: 24px;
  border-radius: 28px;
  background: #2b2930;
}
.wk-sheet-head {
  margin: 0 0 16px;
  color: var(--wk-ink);
  font-family: Roboto, "Google Sans", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 32px;
}
.wk-sheet-copy { margin-bottom: 24px; }
.wk-sheet-list { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 24px; }
.wk-sheet-foot { display: flex; justify-content: flex-end; gap: 8px; }
.wk-flat {
  height: 40px;
  margin: 4px 0;
  padding: 0 12px;
  border: 0;
  border-radius: 20px;
  background: none;
}
