/* Player shell from the approved WorkHub flow. Catalogue styles are scoped to the game. */
:root {
  color-scheme: dark;
  --brand-primary: #b9851e;
  --brand-accent: #f3d58a;
  --brand-bg: #070502;
  --brand-text: #fff4d6;
  --brand-glow: color-mix(in srgb, var(--brand-primary) 35%, var(--brand-bg));
  --brand-panel: color-mix(in srgb, var(--brand-primary) 12%, var(--brand-bg));
  --accent-text: color-mix(in srgb, var(--brand-accent) 52%, #fff);
  --accent-border: color-mix(in srgb, var(--brand-accent) 28%, transparent);
  --goldInk: #2a1805;
  --f-ui: Inter, system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --f-disp: 'Playfair Display', Georgia, serif;
  --f-game: Sora, Inter, system-ui, sans-serif;
  --ease-press: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: start;
  padding: 24px 10px;
  background:
    radial-gradient(600px 400px at 50% 0%, var(--brand-glow), transparent), var(--brand-bg);
  color: var(--brand-text);
  font: 14px/1.45 var(--f-ui);
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}
.num {
  font-variant-numeric: tabular-nums;
}
.brand {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: max(18px, env(safe-area-inset-top)) 18px 4px;
  text-align: center;
}
.brand img {
  display: block;
  width: auto;
  max-width: 160px;
  height: 48px;
  object-fit: contain;
}
#screen[data-ecity-primary-mark] #logo {
  filter: drop-shadow(0 0.4px #ffe7c2b0) drop-shadow(0 2px 3px #260916bb);
}
.brand span {
  font: 900 20px/1.2 var(--f-game);
  letter-spacing: 0.1em;
}
.brand p {
  margin: 0;
  color: var(--accent-text);
  font: 700 9px/1.3 var(--f-game);
  letter-spacing: 0.16em;
}
.page-status {
  position: relative;
  margin: 55px 22px;
  text-align: center;
}
.status-retry {
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--brand-panel);
  color: var(--accent-text);
  font: 800 11px/1.2 var(--f-game);
}
.game-error {
  position: relative;
  margin: 12px 18px;
  text-align: center;
  color: #ff9daf;
}
#game {
  display: contents;
}
.login .ico span {
  opacity: 0.5;
}
.phone {
  width: min(390px, 100%);
  border-radius: 44px;
  padding: 11px;
  background: linear-gradient(160deg, #2b2b33, #0c0c10);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 30px 70px rgba(0, 0, 0, 0.6);
}
.screen {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  min-height: 720px;
  background: radial-gradient(
    118% 70% at 50% 0%,
    var(--brand-glow) 0%,
    var(--brand-panel) 52%,
    var(--brand-bg) 100%
  );
  color: var(--brand-text);
  font-family: var(--f-game);
  display: flex;
  flex-direction: column;
}
.rays {
  position: absolute;
  left: 50%;
  top: 40px;
  width: 560px;
  height: 560px;
  margin-left: -280px;
  pointer-events: none;
  opacity: 0.4;
  background: conic-gradient(
    from 0deg,
    var(--accent-border) 0 5deg,
    transparent 5deg 23deg,
    rgba(243, 213, 138, 0.14) 23deg 28deg,
    transparent 28deg 46deg,
    var(--accent-border) 46deg 51deg,
    transparent 51deg 70deg
  );
  transform: rotate(-7deg);
}
.ptitle {
  position: relative;
  text-align: center;
  margin-top: 22px;
}
.ptitle small {
  font: 800 8.5px/1 var(--f-game);
  letter-spacing: 0.32em;
  color: var(--accent-text);
}
.ptitle h1 {
  margin: 7px 0 0;
  font: italic 900 30px/1 var(--f-disp);
  background: linear-gradient(180deg, #fff8e0, var(--accent-text) 48%, var(--brand-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6));
}
.login {
  position: relative;
  margin: 38px 22px 0;
  padding: 22px 18px 18px;
  border-radius: 22px;
  background: var(--brand-panel);
  box-shadow:
    inset 0 0 0 1px var(--accent-border),
    0 20px 40px rgba(0, 0, 0, 0.5);
}
.login .ico {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 30px;
  margin-bottom: 14px;
}
.login label {
  display: block;
  font: 800 9px/1 var(--f-game);
  letter-spacing: 0.24em;
  color: rgba(243, 213, 138, 0.75);
  margin-bottom: 8px;
}
.telrow {
  display: flex;
  align-items: center;
  border-radius: 14px;
  background: #0b0703;
  box-shadow: inset 0 0 0 1.5px var(--accent-border);
}
.telrow:focus-within {
  box-shadow:
    inset 0 0 0 2px var(--brand-accent),
    0 0 0 4px rgba(243, 213, 138, 0.15);
}
.telrow span {
  padding-left: 14px;
  font: 700 15px/1 var(--f-mono);
  color: rgba(243, 213, 138, 0.6);
}
.telrow input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  padding: 15px 12px;
  font: 700 18px/1 var(--f-mono);
  letter-spacing: 0.04em;
  color: #fff4d6;
}
.gold-btn {
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 999px;
  padding: 15px 20px;
  font: 900 14px/1 var(--f-game);
  letter-spacing: 0.14em;
  color: var(--goldInk);
  background: linear-gradient(180deg, #fff8e6, #e3b44e 60%, #b07f1c);
  box-shadow:
    0 5px 0 #6e4e12,
    0 12px 26px rgba(0, 0, 0, 0.5);
  transition: transform 130ms var(--ease-press);
}
.gold-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #6e4e12;
  transition-duration: 65ms;
}
.gold-btn:disabled {
  filter: grayscale(0.7) brightness(0.7);
  cursor: not-allowed;
}
.perr {
  margin-top: 10px;
  min-height: 16px;
  text-align: center;
  font: 700 11px/1.3 var(--f-game);
  color: #ff9daf;
}
.pfoot {
  position: relative;
  margin: 16px 0 22px;
  text-align: center;
  font: 600 10px/1.4 var(--f-game);
  color: rgba(255, 244, 214, 0.45);
  letter-spacing: 0.06em;
}

.prof {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 14px 18px 0;
  padding: 8px 10px 8px 12px;
  border-radius: 16px;
  background: var(--brand-panel);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}
.av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 900 15px/1 var(--f-game);
  color: var(--goldInk);
  background: radial-gradient(circle at 30% 25%, #fff8d8, #d4a63a 70%, #8c5e12);
}
.prof .nm {
  flex: 1;
  min-width: 0;
}
.prof .nm b {
  display: block;
  font: 800 14px/1.2 var(--f-game);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prof .nm small {
  font: 600 11px/1.35 var(--f-mono);
  color: color-mix(in srgb, var(--brand-text) 81%, var(--brand-panel));
}
.prof button {
  min-width: 56px;
  min-height: 44px;
  border: 1px solid var(--accent-border);
  background: color-mix(in srgb, var(--brand-accent) 9%, var(--brand-panel));
  color: var(--accent-text);
  border-radius: 999px;
  padding: 7px 11px;
  font: 800 10px/1.2 var(--f-game);
  letter-spacing: 0.06em;
}
.stats {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 10px;
  margin: 10px 18px 0;
}
.st {
  border-radius: 16px;
  padding: 11px 12px;
  background: var(--brand-panel);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}
.st > span {
  display: block;
  font: 800 10px/1.25 var(--f-game);
  letter-spacing: 0.055em;
  color: var(--accent-text);
}
.st b {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  font: 900 27px/1 var(--f-game);
}
.st.fc {
  background: linear-gradient(150deg, #fff6d6 0%, #f3d58a 40%, #c8952a 100%);
  box-shadow:
    0 10px 24px rgba(212, 166, 58, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  color: var(--goldInk);
}
.st.fc > span {
  color: rgba(42, 24, 5, 0.75);
}
.st.fc b small {
  font: 900 12px/1 var(--f-game);
}
.st.fc.bump {
  animation: bump 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
@keyframes bump {
  40% {
    transform: scale(1.07);
  }
}
.tkicons {
  display: flex;
}
.tkicons i {
  width: 15px;
  height: 20px;
  border-radius: 3px;
  margin-left: -6px;
  background: linear-gradient(160deg, #fff1bf, #d4a63a);
  box-shadow: 0 0 0 1.5px #150e04;
  font-style: normal;
}
.tkicons i:first-child {
  margin-left: 0;
}

/* The sheet keeps detailed deadlines out of the play view. */
.deadlines {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 18px 0;
  min-height: 56px;
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--accent-border);
  border-radius: 14px;
  background: linear-gradient(120deg, var(--brand-panel), var(--brand-bg));
  text-align: left;
}
.deadlines::after {
  position: absolute;
  right: 13px;
  content: '';
  width: 8px;
  height: 8px;
  border: solid var(--brand-accent);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
}
.deadlines b {
  display: block;
  font: 800 14px/1.25 var(--f-game);
}
.deadlines small {
  display: block;
  color: var(--accent-text);
  font: 700 10px/1.2 var(--f-ui);
}
#deadlineHint:not(:empty) {
  margin-top: 4px;
}
#deadlineHint .deadline-time {
  font-size: 11px;
}
#deadlineTriggerTime {
  text-align: right;
  color: var(--accent-text);
  font: 700 10px/1.2 var(--f-ui);
}
#deadlineTriggerTime .deadline-time {
  display: block;
  font-size: 19px;
}
.deadline-time {
  color: var(--accent-text);
  font: 700 13px/1.15 var(--f-mono);
  white-space: nowrap;
}
.timer-drawer {
  position: fixed;
  inset: auto 0 0;
  width: min(480px, 100%);
  max-width: 100%;
  max-height: min(78dvh, 680px);
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--accent-border);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: color-mix(in srgb, var(--brand-panel) 88%, var(--brand-bg));
  color: var(--brand-text);
  box-shadow: 0 -18px 60px #0006;
  font-family: var(--f-game);
  overflow: hidden;
}
.timer-drawer[open] {
  display: flex;
  flex-direction: column;
}
.prof button,
.deadlines,
.timer-drawer button {
  -webkit-tap-highlight-color: transparent;
  transition: scale 130ms var(--ease-press);
}
.prof button:active:not(:focus-visible),
.deadlines:active:not(:focus-visible),
.timer-drawer button:active:not(:focus-visible) {
  scale: 0.98;
  transition-duration: 65ms;
}
.prof button:active,
.deadlines:active,
.timer-drawer button:active {
  box-shadow: inset 0 0 0 1px var(--accent-border);
}
@media (prefers-reduced-motion: no-preference) {
  .timer-drawer[open][data-pointer-motion] {
    transition:
      translate 190ms var(--ease-sheet),
      opacity 150ms var(--ease-sheet);
  }
  @starting-style {
    .timer-drawer[open][data-pointer-motion] {
      opacity: 0.9;
      translate: 0 14px;
    }
  }
}
.timer-drawer button,
.timer-drawer summary {
  -webkit-tap-highlight-color: transparent;
}
.timer-drawer::backdrop {
  background: #08050caa;
}
html:has(.timer-drawer[open]) {
  overflow: hidden;
}
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 6px;
}
.drawer-header h2 {
  margin: 0;
  font: 900 20px/1.2 var(--f-game);
}
.drawer-header button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  background: var(--brand-bg);
  font: 700 22px/1 var(--f-ui);
}
.drawer-tabs {
  display: flex;
  gap: 4px;
  margin: 0 16px 9px;
  padding: 3px;
  border-radius: 11px;
  background: var(--brand-bg);
}
.drawer-tabs button {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
  background: transparent;
  font: 800 13px/1.2 var(--f-game);
}
.drawer-tabs button[aria-selected='true'] {
  background: var(--brand-accent);
  color: #171019;
}
.drawer-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 16px max(16px, env(safe-area-inset-bottom));
}
.drawer-deadline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  margin: 0 0 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand-primary) 16%, var(--brand-bg));
}
.drawer-deadline p {
  margin: 0;
  font: 800 12px/1.35 var(--f-game);
}
.drawer-deadline .deadline-time {
  font-size: 15px;
}
.drawer-deadline small {
  grid-column: 1 / -1;
  color: var(--accent-text);
  font: 700 10px/1.3 var(--f-ui);
}
.ticket-block,
.prize-block {
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--accent-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand-primary) 9%, var(--brand-bg));
}
.ticket-block + .ticket-block,
.hist > li + li {
  margin-top: 8px;
}
.block-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.block-title,
.block-subtotal {
  min-width: 0;
  margin: 0;
  font: 800 12px/1.4 var(--f-game);
}
.block-subtotal {
  flex: none;
  max-width: 105px;
  color: var(--accent-text);
  text-align: right;
}
.ticket-block summary,
.prize-block summary {
  position: relative;
  align-items: center;
  min-height: 44px;
  flex-wrap: nowrap;
  padding: 8px 19px 8px 0;
  cursor: pointer;
}
.ticket-block summary::-webkit-details-marker,
.prize-block summary::-webkit-details-marker {
  display: none;
}
.ticket-block summary::after,
.prize-block summary::after {
  content: '';
  position: absolute;
  right: 2px;
  width: 7px;
  height: 7px;
  border: solid var(--brand-accent);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.ticket-block[open] summary::after,
.prize-block[open] summary::after {
  transform: rotate(225deg);
}
.block-count {
  color: var(--accent-text);
}
.block-header small {
  display: block;
  margin-top: 2px;
  font: 600 10px/1.3 var(--f-ui);
  color: color-mix(in srgb, var(--brand-text) 75%, var(--brand-bg));
}
.ticket-items,
.win-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.ticket-items {
  margin-top: 0;
}
.ticket-items li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--accent-border);
}
.ticket-serial {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 600 11px/1.2 var(--f-mono);
  color: color-mix(in srgb, var(--brand-text) 77%, var(--brand-bg));
}
.gamehost {
  position: relative;
  margin: 12px auto 0;
  width: 100%;
  display: flex;
  justify-content: center;
}
.tally {
  position: relative;
  margin: 4px 18px 0;
  padding: 14px 14px 6px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--brand-panel), var(--brand-bg));
  box-shadow:
    inset 0 0 0 1px var(--accent-border),
    0 14px 30px rgba(0, 0, 0, 0.45);
}
.big {
  text-align: center;
  padding-bottom: 12px;
}
.big small {
  display: block;
  font: 800 9px/1 var(--f-game);
  letter-spacing: 0.32em;
  color: var(--accent-text);
}
.big b {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  font: 900 44px/1 var(--f-game);
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff8e0, #f3d58a 52%, #b9851e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 10px rgba(243, 213, 138, 0.25));
}
.big b .cur {
  font-size: 18px;
  letter-spacing: 0;
}
.big em {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font: 800 9px/1 var(--f-game);
  font-style: normal;
  letter-spacing: 0.16em;
  color: #ffe9a8;
  background: rgba(243, 213, 138, 0.1);
}
.big.hit b {
  animation: bigHit 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
@keyframes bigHit {
  35% {
    transform: scale(1.12);
    filter: drop-shadow(0 0 18px rgba(255, 233, 168, 0.7));
  }
}
.hist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.win-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--accent-border);
}
.hist .ic {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 900 9px/1 var(--f-game);
  color: var(--goldInk);
  background: radial-gradient(circle at 35% 30%, #fff8d8, #e3b44e 60%, #8c5e12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.win-label,
.win-amount {
  min-width: 0;
}
.win-date {
  font: 700 11px/1.25 var(--f-mono);
}
.win-label small {
  margin-top: 3px;
}
.win-countdown {
  display: block;
  margin-top: 4px;
  color: var(--accent-text);
  font: 600 10px/1.35 var(--f-ui);
}
.win-countdown .deadline-time {
  font-size: 11px;
}
.win-amount {
  text-align: right;
}
.win-amount b {
  color: var(--accent-text);
  font: 900 14px/1.2 var(--f-game);
  font-variant-numeric: tabular-nums;
}
.win-phase {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  color: var(--phase-color);
  font: 700 9px/1.1 var(--f-ui);
  white-space: nowrap;
}
.win-phase .dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}
.block-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  margin: 0;
}
.block-breakdown div {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--phase-color);
  font: 600 10px/1.25 var(--f-ui);
}
.block-breakdown dd {
  margin: 0;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.unclaimed {
  --phase-color: var(--accent-text);
}
.processing {
  --phase-color: #a5d9fb;
}
.credited {
  --phase-color: #86efac;
}
.expired {
  --phase-color: #fda4af;
}
.hist li.new {
  animation: lineIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.hist li.new b {
  animation: amtGlow 1.4s ease;
}
@keyframes lineIn {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
  }
}
@keyframes amtGlow {
  0%,
  40% {
    text-shadow: 0 0 14px rgba(255, 233, 168, 0.9);
  }
}
.hist .empty {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 12px;
  font: 800 10px/1 var(--f-game);
  letter-spacing: 0.16em;
  color: rgba(243, 213, 138, 0.5);
  border: 0;
}
.cs {
  position: relative;
  margin: auto 18px 8px;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 700 10px/1.3 var(--f-game);
  letter-spacing: 0.08em;
  color: rgba(255, 244, 214, 0.55);
}
.cs svg {
  width: 15px;
  height: 15px;
  color: #f3d58a;
  flex: none;
}

.cs strong {
  color: var(--accent-text);
}
@media (max-width: 440px) {
  body {
    padding: 0;
  }
  .phone {
    width: 100%;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .screen {
    min-height: 100dvh;
    border-radius: 0;
  }
}
@media (max-width: 350px) {
  .st > span {
    white-space: normal;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .prof button:active:not(:focus-visible),
  .deadlines:active:not(:focus-visible),
  .timer-drawer button:active:not(:focus-visible),
  .gold-btn:active {
    scale: none;
    transform: none;
  }
}

.preview {
  position: relative;
  margin: 8px 8px 18px;
  text-align: center;
}
.preview h2 {
  font: 800 12px/1.4 var(--f-game);
  color: var(--accent-text);
}
.preview button {
  padding: 6px 9px;
  border-radius: 16px;
  border: 1px solid var(--accent-border);
  background: var(--brand-panel);
  color: var(--accent-text);
  font: 700 10px/1.2 var(--f-game);
}
.preview button + button {
  margin-left: 5px;
}
#previewClose {
  margin-top: 8px;
}
