* { box-sizing: border-box; }

html {
  background: #0d0d0d;
  -webkit-text-size-adjust: 100%;
}

[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", sans-serif;
  background: #0d0d0d;
  color: #fff;
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: env(safe-area-inset-bottom);
}

button, a, summary, label {
  touch-action: manipulation;
}

/* Keep the first paint still until the desk has its real copy. */
body.booting {
  overflow: hidden;
}

body.booting main {
  visibility: hidden;
}

/* Turning ring while a page is opening, instead of a blank screen. */
body.booting::before,
html.turning body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #0d0d0d;
}

body.booting::after,
html.turning body::after {
  content: "";
  position: fixed;
  z-index: 81;
  left: 50%;
  top: 42%;
  width: 52px;
  height: 52px;
  margin-left: -26px;
  border-radius: 50%;
  border: 3px solid rgba(227, 201, 119, 0.28);
  border-top-color: #e3c977;
  animation: instant-turn 0.8s linear infinite;
  pointer-events: none;
}

@keyframes instant-turn {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  body.booting::after,
  html.turning body::after {
    animation: none;
  }
}

body.desk {
  background: #000;
}

a { color: #e3c977; }

.wrap {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 20px max(16px, env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.card {
  background: #1a1a1a;
  border: 1px solid #b38b2e66;
  border-radius: 12px;
  padding: 22px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e3c977;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0;
}

.mark {
  width: 36px;
  height: 36px;
  flex: none;
}

.mark-sm {
  width: 18px;
  height: 18px;
}

.product-line {
  margin: 0 0 10px;
  color: #e3c977;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand span { color: #b38b2e; }

h1, h2 {
  color: #e3c977;
  font-size: 1.35rem;
  margin: 8px 0 12px;
}

p.hint, .hint {
  color: #cfcfcf;
  font-size: 0.92rem;
  margin: 0 0 12px;
}

label {
  display: block;
  text-align: left;
  margin-top: 12px;
  font-size: 0.85rem;
  color: #e3c977;
}

input, select, button {
  width: 100%;
  min-height: 48px;
  border-radius: 6px;
  font-size: 16px;
}

input:not([type="checkbox"]), select {
  margin-top: 6px;
  padding: 12px;
  background: #111;
  color: #fff;
  border: none;
}

input[type="checkbox"] {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-width: 22px;
  max-width: 22px;
  min-height: 22px;
  max-height: 22px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #e3c977;
}

button, .btn {
  margin-top: 16px;
  padding: 12px;
  background: #b38b2e;
  color: #000;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: block;
  text-align: center;
}

button:hover, .btn:hover { background: #e4b847; }

button.quiet,
a.btn.quiet {
  background: transparent;
  color: #e3c977;
  border: 1px solid #b38b2e;
}

.secret {
  position: relative;
  display: block;
}

.secret input {
  padding-right: 76px;
}

.secret.has-match input {
  padding-right: 108px;
}

.secret .match-mark {
  position: absolute;
  right: 68px;
  bottom: 8px;
  width: 28px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.secret .match-mark.is-match,
.secret .match-mark.is-miss {
  display: flex;
}

.secret .match-mark.is-match,
.matched .match-mark.is-match { color: #3ddc84; }
.secret .match-mark.is-miss,
.matched .match-mark.is-miss { color: #ff6b6b; }

.matched {
  position: relative;
  display: block;
}

.matched input {
  padding-right: 44px;
}

.matched .match-mark {
  position: absolute;
  right: 12px;
  bottom: 8px;
  width: 28px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.matched .match-mark.is-match,
.matched .match-mark.is-miss {
  display: flex;
}

.secret .reveal {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: auto;
  min-height: 32px;
  margin: 0;
  padding: 4px 8px;
  background: transparent;
  color: #e3c977;
  font-weight: 700;
}

.secret .reveal:hover {
  background: transparent;
  color: #fff;
}

.note {
  text-align: left;
  border: 1px solid #b38b2e;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 12px 0 0;
  color: #e3c977;
  font-size: 0.95rem;
  background: #14120c;
}

.pay-posted {
  margin: 12px 0 0;
  padding: 14px 16px;
  border: 1px solid #3d9a62;
  border-radius: 14px;
  background: #0c1c16;
  text-align: left;
}

.pay-posted-kicker {
  margin: 0;
  color: #8ee0b0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pay-posted-amount {
  margin: 4px 0 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}

.pay-posted p {
  margin: 6px 0 0;
}

.pay-posted-ref,
.pay-posted-when {
  color: #c8c8c8;
  font-size: 0.9rem;
}

.published-state {
  margin: 0 0 8px;
  color: #7dcea0;
  font-weight: 700;
}

.published-today {
  margin: 0 0 8px;
  color: #c8c8c8;
  font-size: 0.85rem;
}

.published-pick {
  margin-top: 14px;
}

.published-pick label {
  display: block;
  font-weight: 700;
}

.month-fold.playing summary { color: #7dcea0; }
.month-fold.earned summary { color: #e3c977; }

.month-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 12px;
}

.month-score b {
  font-size: 2.4rem;
  line-height: 1;
  font-weight: 800;
}

.month-score span {
  color: #9a9a9a;
  font-weight: 700;
}

.month-track {
  display: flex;
  gap: 5px;
  align-items: flex-start;
  margin: 0 0 10px;
}

.month-track span {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
}

.month-track i {
  display: block;
  width: 100%;
  height: 14px;
  border-radius: 99px;
  background: #2a2a2a;
}

.month-fold .month-track span.on i { background: #b38b2e; }
.month-fold.playing .month-track span.on i { background: #3d9a62; }
.month-fold.earned .month-track span.on i { background: #e3c977; }

.month-line {
  margin: 0 0 6px;
  color: #9a9a9a;
  font-weight: 700;
}

.month-line.on { color: #7dcea0; }
.month-fold.earned .month-line.on { color: #e3c977; }
.month-line:last-child { margin-bottom: 0; }

.msg-fold summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.msg-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: #8d8d8d;
}

.msg-fold.unread summary {
  color: #e3c977;
}

.msg-fold.unread .msg-icon {
  color: #e3c977;
}

.msg-fold .pay-posted,
.msg-fold .note {
  margin-top: 0;
  margin-bottom: 10px;
}

.msg-fold .pay-posted:last-child,
.msg-fold .note:last-child {
  margin-bottom: 0;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  margin-top: 14px;
  color: #fff;
  font-size: 0.9rem;
}

.check span {
  flex: 1 1 auto;
  min-width: 0;
}

.error { color: #ff5555; min-height: 1.2em; font-size: 0.9rem; }
.ok { color: #4caf50; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #222;
  background: #000;
  position: sticky;
  top: 0;
  z-index: 40;
}

.top button,
.top a.btn {
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 8px 12px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.row {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 12px;
  text-align: left;
}

.row strong { color: #e3c977; }

.links {
  margin-top: 16px;
  font-size: 0.9rem;
}

.prize {
  font-size: 1.8rem;
  color: #e3c977;
  margin: 8px 0;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.stat {
  background: #111;
  border-radius: 8px;
  padding: 10px 6px;
}

.stat b {
  display: block;
  color: #e3c977;
  font-size: 1.2rem;
}

@media (min-width: 800px) {
  .wrap.wide { max-width: 720px; }
}

.player-home { padding-top: 12px; }

.player-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: #000;
  border-bottom: 1px solid #222;
  position: sticky;
  top: 0;
  z-index: 40;
}

.player-bar .mark {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
}

.player-bar .brand {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}

.player-bar .brand-rule { color: #b38b2e; font-weight: 500; }
.player-bar .brand-tier { color: #f5d90a; }

.player-bar .bar-actions {
  margin-left: auto;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-menu {
  position: relative;
}

.player-bar .game-menu > button {
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #b38b2e;
  border-radius: 6px;
  color: #f5d90a;
  background: #111;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
}

.player-bar .game-menu > button:hover {
  background: #1a1a1a;
  color: #f5d90a;
}

.game-menu nav {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 148px;
  margin: 0;
  padding: 6px;
  background: #111;
  border: 1px solid #b38b2e;
  border-radius: 8px;
  display: grid;
  gap: 2px;
}

.game-menu a {
  display: block;
  width: auto;
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  color: #e3c977;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.game-menu a.active {
  color: #111;
  background: #f5d90a;
}

.player-bar > button,
.player-bar .bar-actions button {
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  background: #7a2e32;
  color: #fff;
}

.player-bar > button { margin-left: auto; }

.player-bar .game-menu > button,
.player-bar .game-menu > button:hover {
  border: 1px solid #b38b2e;
  color: #f5d90a;
  background: #111;
}

.login-mark,
.door-mark {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
  margin: 4px auto 8px;
}

.door-line {
  margin: 0;
  text-align: center;
  color: #e3c977;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

.door-line span {
  color: #f5d90a;
  font-weight: 500;
}

.door-role {
  margin: 4px 0 10px;
  text-align: center;
  color: #cfcfcf;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup .mark {
  border-radius: 8px;
  object-fit: cover;
}

.brand-lockup .brand-rule { color: #b38b2e; font-weight: 500; }
.brand-lockup .brand-tier { color: #f5d90a; }

.ops-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}

.ops-brand .mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.ops-brand .ops-product {
  margin: 2px 0 0;
}

.ask-links {
  text-align: center;
  color: #fff;
}

.game-status {
  margin: 0 0 6px;
  padding: 14px 16px;
  border: 1px solid #2c2c2c;
  border-radius: 14px;
  background: #141414;
  color: #d7ffe8;
  font-weight: 700;
}

.game-status:empty,
.session-banner:empty,
.hello:empty,
.next-step:empty {
  display: none;
}

.countdown {
  margin: 0 0 8px;
  color: #f5d90a;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.countdown { margin-bottom: 8px; color: #fff; }

.prize-strip {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #141414;
  border: 1px solid #b38b2e;
  color: #f5d90a;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-align: center;
  line-height: 1.35;
}

.prize-board {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #2c2c2c;
  border-radius: 14px;
  background: #141414;
}

.prize-board .money-row { margin: 8px 0 0; }

.play-reminder {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #3a2410;
  border: 1px solid #8a6420;
  color: #ffe7a3;
  font-weight: 700;
}

.play-reminder-now {
  background: #4a1818;
  border-color: #a33;
  color: #ffd0d0;
}

.game-status.session-open { color: #3ddc84; }
.game-status.session-hour,
.game-status.session-half { color: #ffe7a3; }
.game-status.session-closing,
.game-status.session-closed_morning,
.game-status.session-closed_night,
.game-status.session-maintenance { color: #ffb4b4; }

.focus-ticket { margin-top: 14px; }

.smart {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 16px;
}

.smart-seq,
.lucky-seq {
  margin: 0 0 6px;
  color: #f5d90a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.smart-kicker {
  margin: 0;
  color: #e3c977;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.smart-amount {
  margin: 6px 0 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}

.smart-status {
  margin: 8px 0 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.smart-status-pending { color: #ffe7a3; }
.smart-status-paid { color: #b6f0cf; }

.paid-flag {
  color: #b6f0cf;
  font-weight: 800;
  white-space: nowrap;
}

.paid-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.32em;
  border-radius: 50%;
  background: #1f8a4c;
  color: #fff;
  font-size: 0.82em;
  font-weight: 800;
  line-height: 1;
  vertical-align: -0.12em;
}

.ticket-paid .ticket-badge .paid-check {
  background: #eaffe8;
  color: #146b38;
}

.smart-detail {
  margin: 6px 0 0;
  color: #c8c8c8;
  line-height: 1.45;
}

.smart-serial {
  margin: 8px 0 0;
  color: #9ec4c0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.lucky-dial {
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid #b38b2e;
  border-radius: 14px;
  background: #101820;
}

.lucky-title {
  margin: 0;
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
}

.lucky-top {
  margin: 8px 0 0;
  color: #f5d90a;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.lucky-range {
  margin: 4px 0 0;
  color: #c8c8c8;
  font-size: 0.82rem;
  line-height: 1.35;
}

.lucky-letters {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.lucky-letter {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 8px 0;
  background: #141414;
  color: #f5d90a;
  border: 1px solid #b38b2e;
  border-radius: 10px;
  font-weight: 800;
}

.lucky-letter[aria-pressed="true"] {
  background: #f5d90a;
  color: #111;
}

.lucky-go {
  margin-top: 10px;
}

.lucky-go:disabled,
.lucky-letter:disabled {
  opacity: 0.55;
  cursor: default;
}

.smart-won,
.smart-paid { border-color: #b38b2e; }
.smart-closed,
.smart-void { border-color: #6a3030; }
.smart-closed .smart-kicker,
.smart-void .smart-kicker { color: #ff8d8d; }

.ticket-lines { display: flex; flex-direction: column; gap: 8px; }

.ticket-line {
  margin: 0;
  width: 100%;
  text-align: left;
  background: #141414;
  color: #eee;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 12px;
  min-height: 44px;
  font-weight: 600;
}

button.ticket-line { margin-top: 0; }

.ticket-line.is-paid { border-color: #1f8a4c; }

.hello {
  margin: 4px 0 4px;
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
}

.section-title {
  margin: 22px 0 10px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b38b2e;
}

.play-panel {
  background: #111;
  border: 1px solid #b38b2e;
  border-radius: 16px;
  padding: 18px 16px 16px;
}

.play-kicker {
  margin: 0;
  color: #b38b2e;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.play-price {
  margin: 4px 0 0;
  font-size: 2rem;
  font-weight: 800;
  color: #e3c977;
  line-height: 1.1;
}

.play-price span:last-child {
  font-size: 0.95rem;
  font-weight: 600;
  color: #cfcfcf;
}

#price:empty + span,
.play-price:has(#price:empty) {
  display: none;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.qty-btn {
  width: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0;
  background: #000;
  color: #e3c977;
  border: 1px solid #b38b2e;
  font-size: 1.5rem;
  line-height: 1;
}

.qty-btn:disabled {
  opacity: 0.35;
}

.qty-readout {
  text-align: center;
}

.qty-readout span {
  display: block;
}

#qty-count {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

#qty-word {
  color: #cfcfcf;
  font-size: 0.85rem;
}

.play-total {
  margin: 12px 0 0;
  text-align: center;
  color: #fff;
  font-weight: 600;
}

.play-panel button#play { margin-top: 12px; }

body.desk .play-panel button#play {
  background: #f5d90a;
  color: #111;
  border-radius: 12px;
  font-size: 1.05rem;
}

.waiting {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #2a220f;
  color: #e3c977;
  font-size: 0.9rem;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket {
  position: relative;
  z-index: 0;
  overflow: hidden;
  border-radius: 14px;
  padding: 14px 14px 12px 18px;
  background: #141414;
  border: 1px solid #2a2a2a;
  text-align: left;
}

.ticket::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: #4a3030;
}

.ticket-won {
  background: linear-gradient(160deg, #2c2412 0%, #16120a 100%);
  border-color: #b38b2e;
  box-shadow: 0 8px 22px rgba(179, 139, 46, 0.16);
}

.ticket-won::before {
  background: linear-gradient(180deg, #f3e2a6, #b38b2e);
}

.ticket-paid {
  background: linear-gradient(160deg, #123024 0%, #0c1c16 100%);
  border-color: #3d9a62;
  box-shadow: 0 8px 22px rgba(61, 154, 98, 0.18);
}

.ticket-paid::before {
  background: linear-gradient(180deg, #b6f0cf, #1f7a45);
}

.ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ticket-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b38b2e;
}

.ticket-product {
  margin: 8px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e3c977;
}

button.match {
  height: auto;
  text-align: left;
  padding: 12px 14px;
}

button.match strong,
button.match span {
  display: block;
}

button.match span {
  margin-top: 3px;
  font-weight: 500;
  color: #d5d0c4;
  word-break: break-all;
}

button.match .match-day {
  color: #e3c977;
  font-weight: 700;
}

.ticket-paid .ticket-kind { color: #8ee0b0; }

.ticket-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: #000;
  color: #cfcfcf;
}

.ticket-won .ticket-badge {
  background: #e3c977;
  color: #1a1406;
}

.ticket-paid .ticket-badge {
  background: #1f7a45;
  color: #eaffe8;
}

.ticket-code {
  margin-top: 8px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  word-break: break-all;
}

.ticket-serial {
  margin-top: 4px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: #9ec4c0;
  word-break: break-all;
}

.ticket-hold {
  margin: 14px 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}

.ticket-opened {
  animation: none;
}

@keyframes ticket-open {
  from { opacity: 0.35; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.face-down {
  background:
    radial-gradient(circle at 20% 0%, rgba(227, 201, 119, 0.16), transparent 42%),
    #141414;
}

.ticket-sealed {
  border-style: dashed;
  border-color: #3d4d5c;
}

.ticket-closed,
.ticket-lost {
  background: linear-gradient(160deg, #2a1416 0%, #12090a 100%);
  border-color: #a33b44;
}

.ticket-closed::before,
.ticket-lost::before {
  background: #e15b64;
}

.ticket-closed .ticket-badge,
.ticket-lost .ticket-badge {
  background: #a33b44;
  color: #fff;
}

.ticket-closed .ticket-prize-label,
.ticket-closed .ticket-prize-amount,
.ticket-closed .ticket-pay,
.ticket-lost .ticket-prize-label,
.ticket-lost .ticket-prize-amount,
.ticket-lost .ticket-pay {
  color: #ffb4b8;
}

.ticket-fold {
  margin-top: 10px;
}

.ticket-fold summary,
.ticket-bucket summary {
  cursor: pointer;
  padding: 12px 14px;
  border: 1px solid #2a3a4a;
  border-radius: 10px;
  background: #0c1824;
  color: #e8e4d4;
  font-weight: 700;
}

.ticket-fold .ticket,
.ticket-bucket .ticket { margin-top: 8px; }

.ticket-bucket { margin-top: 14px; }

.player-check {
  margin: 8px 0 16px;
  padding: 12px 14px;
  border: 1px solid #2a3a4a;
  border-radius: 12px;
  background: #0c1824;
}

.player-check strong,
.player-check span {
  display: block;
}

.player-check strong { font-size: 1.15rem; }

.player-check span {
  margin-top: 4px;
  color: #c9d4d2;
  word-break: break-all;
}

.ticket-outcome { margin-top: 8px; }

.ticket-quiet {
  margin: 0;
  color: #b5b5b5;
  font-size: 0.95rem;
}

.ticket-prize-label,
.ticket-pay {
  display: block;
}

.ticket-prize-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e3c977;
}

.ticket-paid .ticket-prize-label { color: #8ee0b0; }

.ticket-prize-amount {
  display: block;
  margin-top: 2px;
  font-size: 1.7rem;
  font-weight: 800;
  color: #f3e2a6;
  line-height: 1.1;
}

.ticket-paid .ticket-prize-amount { color: #d8ffe8; }

.ticket-pay {
  margin-top: 4px;
  font-size: 0.88rem;
  color: #e3c977;
}

.ticket-paid .ticket-pay { color: #b6f0cf; }

.ticket-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #cfcfcf;
  font-size: 0.82rem;
  font-weight: 600;
}

.bank-card {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 14px;
}

.bank-card strong {
  display: block;
  font-size: 1.05rem;
}

.bank-card span {
  color: #cfcfcf;
  letter-spacing: 0.04em;
}

.payout-card { margin-bottom: 14px; }

.payout-amount {
  margin: 10px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f5d90a;
}

.player-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
}

.player-tabs button {
  flex: 1;
  width: auto;
  margin: 0;
  min-height: 48px;
  background: #111;
  color: #eee;
  border: 1px solid #2c2c2c;
  border-radius: 12px;
}

.player-tabs button[aria-current="page"] {
  background: #f5d90a;
  color: #111;
  border-color: #f5d90a;
}

#prize-range {
  margin: 8px 0 0;
  font-weight: 700;
  color: #fff;
}

.prize-chips {
  margin: 8px 0;
  font-weight: 800;
  color: #f5d90a;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
}

.prize-examples-label {
  margin: 14px 0 0;
  color: #e3c977;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prize-total {
  margin: 8px 0 0;
  font-size: 2rem;
  font-weight: 800;
  color: #f5d90a;
}

a.back-play {
  display: block;
  margin: 0 0 16px;
  padding: 14px 16px;
  background: #f5d90a;
  color: #111;
  font-weight: 800;
  font-size: 1.05rem;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
}

.how-play {
  margin: 0;
  padding: 4px 12px 10px;
  border-radius: 10px;
  background: #101820;
}

.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.how-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid #1c3344;
  line-height: 1.3;
}

.how-steps li:last-child { border-bottom: 0; padding-bottom: 4px; }

.how-steps li span {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  background: #f5d90a;
  color: #111;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.how-steps li p {
  margin: 0;
  color: #eee;
}

.how-line {
  margin: 6px 0 0;
  color: #c8c8c8;
  font-size: 0.88rem;
  line-height: 1.35;
}

.player-tabs a {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid #2c2c2c;
  color: #eee;
  text-decoration: none;
  font-weight: 700;
}

.player-tabs a[aria-current="page"] {
  background: #f5d90a;
  color: #111;
  border-color: #f5d90a;
}

.pin-box {
  margin-top: 28px;
  border-top: 1px solid #222;
  padding-top: 8px;
}

.pin-box summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #e3c977;
  cursor: pointer;
  font-weight: 600;
}

.pin-box .hint { margin-top: 8px; }

html:has(body.agent-home) { background: #071018; }

body.agent-home {
  background: #071018;
}

body.agent-home .top {
  background: #071018;
  border-bottom-color: #163044;
}

body.agent-home .brand span { color: #7ec8c3; }

body.agent-home .section-title,
body.agent-home label { color: #7ec8c3; }

body.agent-home input {
  background: #0d1c28;
  border: 1px solid #1c4a5c;
}

.agent-card { border-color: #1c4a5c; }

.agent-caption {
  margin: 0 0 16px;
  color: #c5ddd9;
  font-size: 0.95rem;
}

.count-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.count-card-wide {
  grid-column: 1 / -1;
}

.count-card {
  background: #0d1c28;
  border: 1px solid #1c4a5c;
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
}

.count-card b {
  display: block;
  min-height: 1.98rem;
  font-size: 1.8rem;
  line-height: 1.1;
}

.count-card span {
  display: block;
  margin-top: 4px;
  color: #9ec4c8;
  font-size: 0.8rem;
}

.agent-float {
  margin: 14px 0 4px;
  color: #d5ecea;
  font-weight: 600;
}

body.agent-home button,
body.agent-home .btn {
  min-height: 48px;
  margin-top: 10px;
}

body.agent-home .player-tabs button,
body.agent-home .lucky-letter {
  margin-top: 0;
}

body.agent-home .lucky-go {
  margin-top: 10px;
}

.desk-fold {
  margin-top: 12px;
  border: 1px solid #1c4a5c;
  border-radius: 12px;
  background: #0c1824;
}

.desk-fold summary {
  min-height: 48px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.desk-fold summary::-webkit-details-marker { display: none; }

.desk-fold > :not(summary) {
  padding: 0 14px 14px;
}

.desk-fold > .agent-prizes {
  margin: 0;
  padding: 0 14px 14px;
  border: none;
  background: transparent;
}

.desk-fold > .how-play {
  margin: 0 14px 12px;
  padding: 4px 12px 10px;
  border-radius: 10px;
  background: #101820;
}

.transfer-card {
  margin-top: 8px;
  padding-top: 4px;
  border-top: 1px solid #1c3344;
}

.wallet-label {
  margin: 10px 0 4px;
  color: #7ec8c3;
  font-size: 0.85rem;
  font-weight: 700;
}

.money-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid #163044;
}

.money-row span:last-child {
  font-weight: 700;
}

.published-paid-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.win-overhead-day {
  margin-top: 8px;
}

.win-overhead-line {
  margin: 0;
  padding: 2px 0 6px 12px;
  color: #d0d0d0;
  font-size: 0.92rem;
}

.status-pending,
.status-paid {
  margin: 8px 0 0;
  font-weight: 700;
}

.status-pending { color: #e3c977; }
.status-paid { color: #b6f0cf; }

.code-name {
  margin: 12px 0 0;
  color: #7ec8c3;
  font-weight: 700;
}

.winner-name {
  margin: 0;
  padding: 12px 14px;
  background: #0d1c28;
  border-radius: 10px;
  font-weight: 700;
}

.agent-chosen {
  margin: 12px 0 0;
  color: #7ec8c3;
  font-weight: 700;
}

#play .match { margin-top: 8px; }

#qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 8px auto 12px;
  background: #fff;
  border-radius: 12px;
}

.share-link {
  word-break: break-all;
  color: #d5ecea;
  font-size: 0.9rem;
}

.optional {
  color: #cfcfcf;
  font-weight: 500;
}

.next-step {
  margin: 0 0 14px;
  color: #d5ecea;
  font-size: 0.95rem;
}

.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.share-grid .btn,
.share-grid button {
  margin-top: 0;
}

body.agent-home textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  background: #0d1c28;
  color: #fff;
  border: 1px solid #1c4a5c;
  border-radius: 6px;
  font: inherit;
}

.session-banner {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #143024;
  color: #d7ffe8;
  font-weight: 600;
}

.session-hour,
.session-half {
  background: #3a2a08;
  color: #ffe7a3;
}

.session-closing,
.session-closed_morning,
.session-closed_night,
.session-maintenance {
  background: #3a1212;
  color: #ffd0d0;
}

.ticket-void {
  border-color: #8a3030;
}

.draw-banner {
  border: 2px solid #e3c977;
  background: #141414;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.badge {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge-live { background: #3d2a00; color: #e3c977; }
.badge-off { background: #2a2a2a; color: #ddd; }
.badge-certified { background: #1d3d2a; color: #b7e4c7; }
.badge-draft { background: #243044; color: #c9d7ee; }
.badge-warn { background: #4a1c1c; color: #f3c1c1; }

.draw-tier {
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #333;
}

.draw-tier h3 {
  margin: 8px 0;
  color: #e3c977;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

button:disabled {
  opacity: 0.45;
}

body.ops {
  background: #0d0d0d;
  color: #f3f3f3;
}

body.ops a { color: #e3c977; }

.ops-side {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #141414;
  border-right: 1px solid #3a3018;
  padding: 22px 14px;
}

.ops-mark {
  margin: 0;
  color: #f4f7fb;
  font-weight: 700;
  font-size: 1.05rem;
}

.ops-product {
  margin: 4px 0 22px;
  color: #b5b5b5;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ops-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (min-width: 861px) {
  .ops-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
}

.ops-nav a {
  color: #c5d0e2;
  text-decoration: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.ops-nav a:hover { background: #241c0c; }

.ops-side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.ops .ops-side-foot button,
body.ops .ops-top-actions button,
body.ops #save-draft,
body.ops #create-draft {
  width: auto;
  min-height: 36px;
  margin-top: 0;
  padding: 8px 14px;
  background: #1a1a1a;
  color: #f4f7fb;
}

body.ops #create-draft,
body.ops #save-draft { background: #b38b2e; }

body.ops .ops-govern button {
  width: auto;
  min-height: 36px;
  margin-top: 12px;
  background: #243044;
  color: #9aabc4;
  cursor: not-allowed;
}

.ops-main {
  margin-left: 232px;
  max-width: calc(100vw - 232px);
  padding: 28px 32px 64px;
  box-sizing: border-box;
}

.ops-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
}

.ops-panel header {
  display: block;
}

.ops-top h1,
.ops-main h2 {
  margin: 0;
  color: #f4f7fb;
  font-size: 1.45rem;
}

.ops-top p,
.ops-panel header p,
.ops-govern p,
#detail-meta,
#readonly-note,
#updated {
  margin: 6px 0 0;
  color: #c8c8c8;
  font-size: 0.88rem;
}

.ops-kpis,
.ops-govern,
.ops-split {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.ops-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ops-govern,
.ops-split { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.ops-kpi,
.ops-panel,
.ops-govern article,
.ops-split article {
  background: #1a1a1a;
  border: 1px solid #3a3018;
  border-radius: 12px;
  padding: 16px;
  min-width: 0;
}

.ops-kpi p,
.ops-govern h3,
.ops-split h3,
#detail-body h3 {
  margin: 0;
  color: #c8c8c8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

#kpi-game.session-open { color: #3ddc84; }
#kpi-game.session-hour,
#kpi-game.session-half,
#kpi-game.session-closing { color: #ffe7a3; }
#kpi-game.session-closed_morning,
#kpi-game.session-closed_night,
#kpi-game.session-maintenance { color: #ffb4b4; }

.ops-kpi strong {
  display: block;
  margin-top: 10px;
  color: #f7f9fc;
  font-size: 1.35rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ops-kpi span {
  display: block;
  margin-top: 8px;
  color: #c8c8c8;
  font-size: 0.8rem;
}

.ops-kpi-live { border-color: #b38b2e; }

.ops-panel { margin-top: 22px; }

.ops-panel > header p { max-width: 720px; }

.ops-table-wrap { overflow-x: auto; margin-top: 12px; }

.ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.ops-table th,
.ops-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #3a3018;
  color: #f3f3f3;
  vertical-align: middle;
}

.ops-table thead th {
  color: #c8c8c8;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#config-list tr { cursor: pointer; }
#config-list tr:hover,
#config-list tr.is-selected { background: #20304c; }

body.ops .ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

body.ops .ops-grid label,
body.ops #detail label {
  color: #c8c8c8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.ops input {
  background: #111111;
  border: 1px solid #3a3018;
  color: #f4f7fb;
  min-height: 40px;
}

body.ops input[type="checkbox"] {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-width: 22px;
  max-width: 22px;
  min-height: 22px;
  max-height: 22px;
  margin: 2px 0 0;
  padding: 0;
}

body.ops .ops-table input {
  min-height: 34px;
  margin-top: 0;
  padding: 6px 8px;
}

body.ops .ops-table input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
  min-height: 18px;
  max-height: 18px;
  padding: 0;
}

body.ops #detail-badges { margin-top: 10px; }

body.ops .badge-live { background: #3d2a00; color: #e3c977; }
body.ops .badge-off { background: #2a2a2a; color: #ddd; }
body.ops .badge-certified { background: #1d3d2a; color: #b7e4c7; }
body.ops .badge-draft { background: #2a2418; color: #e3c977; }
body.ops .badge-warn { background: #4a3418; color: #ffe1ad; }

body.ops .ops-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

body.ops .ops-gate[hidden] {
  display: none !important;
}

body.ops .ops-gate .card {
  width: 100%;
  max-width: 420px;
  background: #1a1a1a;
  border: 1px solid #3a3018;
  color: #f3f3f3;
}

body.ops .ops-gate h1 { color: #f4f7fb; }

body.ops .ops-gate label,
body.ops .ops-main label {
  color: #c8c8c8;
}

body.ops #go {
  width: 100%;
  background: #b38b2e;
  color: #f4f7fb;
}

body.ops #go:hover { background: #e4b847; }

body.ops .secret .reveal,
body.ops .secret .reveal:hover {
  color: #e3c977;
  background: transparent;
}

body.ops .ops-main h3 {
  margin: 22px 0 8px;
  color: #f4f7fb;
  font-size: 1rem;
}

body.ops .ops-main .card {
  background: transparent;
  border: 0;
  padding: 0;
  margin-top: 8px;
}

body.ops .ops-main button {
  width: auto;
  display: inline-block;
  min-height: 36px;
  margin-top: 8px;
  margin-right: 8px;
  padding: 8px 14px;
  background: #b38b2e;
  color: #f4f7fb;
}

body.ops .ops-main button:hover { background: #e4b847; }

body.ops .ops-main button.quiet {
  background: transparent;
  color: #c5d0e2;
  border: 1px solid #3a4d6e;
}

body.ops .ops-main button.quiet:hover { background: #241c0c; }

body.ops .hint { color: #c8c8c8; }

body.ops .row {
  background: #141414;
  border: 1px solid #3a3018;
  color: #f3f3f3;
}

body.ops .row input {
  width: auto;
  min-width: 160px;
  margin-right: 8px;
}

body.ops .check { color: #f3f3f3; }

body.ops .note {
  color: #d5e7ff;
  border-color: #3a3018;
  background: #141414;
}

body.ops .ops-main button,
body.ops #go,
body.ops #save-draft,
body.ops #create-draft { color: #111; }

body.ops .ops-side-foot button { color: #e3c977; }

body.ops .is-role-hidden { display: none !important; }

body.ops .ops-menu {
  display: none;
  width: auto;
  margin: 0 0 10px;
}

body.ops .ops-nav a.is-current {
  background: #241c0c;
  color: #e3c977;
}

.pay-filters {
  display: flex;
  gap: 8px;
  margin: 4px 0 12px;
}

.pay-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.pay-range label {
  color: #a8a8a8;
}

.result-steps {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  counter-reset: result-step;
}

.result-steps li {
  counter-increment: result-step;
  position: relative;
  margin: 0 0 8px;
  padding: 10px 12px 10px 46px;
  border: 1px solid #3a3018;
  border-radius: 10px;
  background: #141414;
}

.result-steps li::before {
  content: counter(result-step);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #e3c977;
  color: #e3c977;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-steps li b {
  display: block;
  color: #f4f7fb;
}

.result-steps li span {
  display: block;
  margin-top: 2px;
  color: #c8c8c8;
  font-size: 0.92rem;
}

.result-steps li.now {
  border-color: #e3c977;
  background: #241c0c;
}

.result-steps li.done::before {
  content: "✓";
  background: #241c0c;
}

.result-steps li.published {
  border-color: #4caf50;
  background: #142418;
}

.result-steps li.published::before {
  content: "✓";
  border-color: #4caf50;
  color: #7dcea0;
  background: #1e3a24;
}

.result-steps li.open {
  border-color: #e3c977;
  background: #241c0c;
}

.result-steps li.wait {
  opacity: 0.72;
}

.result-steps li.open.wait {
  opacity: 1;
}

.result-waiting {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  margin: 0 0 10px;
}

.result-waiting[hidden] {
  display: none !important;
}

button.result-day {
  width: auto;
  margin: 0;
  padding: 8px 12px;
  font-weight: 700;
}

body.ops .ops-main button.result-day.open,
body.ops .ops-main button.result-day.open:hover {
  background: #3d2a00;
  color: #e3c977;
  border: 1px solid #e3c977;
}

body.ops .ops-main button.result-day.selected,
body.ops .ops-main button.result-day.selected:hover {
  background: #e3c977;
  color: #111;
  border: 2px solid #fff3c4;
  box-shadow: 0 0 0 2px #e3c977;
}

body.ops .ops-main button.result-day.pending.selected,
body.ops .ops-main button.result-day.pending.selected:hover {
  background: #f4f7fb;
  color: #111;
  border: 2px solid #f4f7fb;
  box-shadow: 0 0 0 2px #8d8d8d;
}

body.ops .ops-main button.result-day.published,
body.ops .ops-main button.result-day.published:hover {
  background: #1e3a24;
  color: #7dcea0;
  border: 1px solid #4caf50;
}

body.ops .ops-main button.result-day.pending,
body.ops .ops-main button.result-day.pending:hover,
body.ops .ops-main #publish-result.pending,
body.ops .ops-main #publish-result.pending:hover,
body.ops .ops-main #publish-result.pending:disabled {
  background: #2a2a2a;
  color: #f4f7fb;
  border: 1px solid #8d8d8d;
  opacity: 1;
  cursor: default;
}

body.ops .ops-main #result-unpublished,
body.ops .ops-main #result-unpublished:hover,
body.ops .ops-main #result-published,
body.ops .ops-main #result-published:hover {
  background: transparent;
  color: #f4f7fb;
  border: 1px solid #8d8d8d;
}

body.ops .ops-main button.result-day.published.selected,
body.ops .ops-main button.result-day.published.selected:hover {
  background: #7dcea0;
  color: #111;
  border: 2px solid #d8ffe8;
  box-shadow: 0 0 0 2px #4caf50;
}

#result-date.pending,
.result-steps li.pending,
.result-steps li.now.pending {
  border-color: #8d8d8d;
  background: #141414;
  opacity: 1;
}

body.ops .hint.pending {
  color: #f4f7fb;
  font-weight: 700;
}

#result-date.open {
  border-color: #e3c977;
}

#result-date.published {
  border-color: #4caf50;
  box-shadow: 0 0 0 1px #4caf50;
}

body.ops .hint.open {
  color: #e3c977;
  font-weight: 700;
}

body.ops .hint.published {
  color: #7dcea0;
  font-weight: 700;
}

body.ops .ops-main #publish-result.published,
body.ops .ops-main #publish-result.published:hover,
body.ops .ops-main #publish-result.published:disabled {
  background: #1e3a24;
  color: #7dcea0;
  border: 1px solid #4caf50;
  opacity: 1;
  cursor: default;
}

.result-range {
  margin-bottom: 10px;
}

.pay-range input[type="date"] {
  color-scheme: dark;
  background: #141414;
  color: #f4f7fb;
  border: 1px solid #3a3018;
  border-radius: 8px;
  padding: 8px 10px;
}

.pay-card {
  background: #141414;
  border: 1px solid #3a3018;
  border-radius: 12px;
  padding: 14px 16px 16px;
  margin: 0 0 12px;
}

.pay-card.is-paid {
  border-color: #1f6b45;
}

.pay-kind {
  margin: 10px 0 0;
  color: #e3c977;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pay-who {
  margin: 4px 0 0;
  color: #f4f7fb;
  font-size: 1.15rem;
}

.pay-meta {
  margin: 4px 0 0;
  color: #d0d0d0;
}

.pay-figures {
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.pay-figures div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.pay-figures dt {
  margin: 0;
  color: #a8a8a8;
  font-weight: 500;
}

.pay-figures dd {
  margin: 0;
  color: #f4f7fb;
  font-variant-numeric: tabular-nums;
}

.pay-send {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #241c0c;
  border: 1px solid #e3c977;
}

.pay-send dt {
  color: #e3c977;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pay-send dd {
  color: #f6e7b1;
  font-size: 1.55rem;
  font-weight: 700;
}

.pay-card .status-paid {
  margin: 6px 0 0;
  color: #3dd68c;
  font-size: 1rem;
  font-weight: 700;
}

.pay-players {
  margin: 6px 0 0;
  padding-left: 18px;
  color: #f3f3f3;
}

.pay-to {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #101010;
  border: 1px solid #3a3018;
}

.pay-account {
  margin: 4px 0 0;
  color: #f4f7fb;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pay-form {
  margin-top: 8px;
}

.pay-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pay-ask {
  flex: 1 0 100%;
  margin: 8px 0 0;
  color: #f4f7fb;
  font-weight: 700;
}

body.ops .ops-main button.pay-copy {
  width: auto;
  margin: 8px 0 0;
  background: transparent;
  color: #e3c977;
  border: 1px solid #b38b2e;
}

body.ops .ops-main button.pay-mark,
body.ops .ops-main button.pay-mark:hover {
  width: auto;
  margin: 8px 0 0;
  background: #1e7a46;
  color: #f4f7fb;
}

body.ops .ops-main .pay-actions button.quiet {
  width: auto;
  margin: 8px 0 0;
}

body.ops .ops-main #detail.card {
  background: #1a1a1a;
  border: 1px solid #3a3018;
  padding: 16px;
}

body.ops #finance-deferred { color: #c8c8c8; }

@media (max-width: 860px) {
  body.ops .ops-menu { display: inline-block; }
}

@media (max-width: 860px) {
  .ops-side {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid #3a3018;
  }
  .ops-nav { display: none; }
  .ops-nav.is-open { display: flex; flex-direction: column; }
  .ops-side-foot { margin-top: 16px; }
  .ops-main { margin-left: 0; max-width: none; padding: 20px 16px 48px; }
  .ops-kpis { grid-template-columns: 1fr; }
  .ops-top { align-items: flex-start; flex-direction: column; }
}

.system-read {
  border: 1px solid #b38b2e66;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
}
.system-read h2 { margin: 0 0 8px; font-size: 1.35rem; }
.system-read.expected { border-color: #4caf50; }
.system-read.attention { border-color: #e3c977; }
.system-read.not_expected { border-color: #ff5555; }
.insight-grid { display: grid; gap: 10px; margin-bottom: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.insight-card {
  background: #111;
  border: 1px solid #3a3018;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.insight-card h3 { margin: 0 0 6px; font-size: 1rem; }
.insight-card p { margin: 4px 0; }
.insight-move.up { color: #4caf50; font-weight: 650; }
.insight-move.down { color: #ff5555; font-weight: 650; }
.insight-move.flat, .insight-move.new { color: #e3c977; font-weight: 650; }
.insight-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.insight-durations { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.insight-durations button, .insight-legend button {
  background: #111;
  color: #fff;
  border: 1px solid #3a3018;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
}
.insight-durations button.is-on, .insight-legend button.is-on { border-color: #e3c977; color: #e3c977; }
.insight-total { font-size: 1.25rem; margin: 4px 0; }
.insight-detail { min-height: 2.6em; }
.insight-pie-svg { width: 168px; height: 168px; flex: 0 0 auto; }
.insight-pie-svg path { cursor: pointer; }
.insight-pie-svg path.is-on, .insight-pie-svg path:hover { stroke: #fff; stroke-width: 2; }
.insight-legend { display: grid; gap: 6px; margin: 0; flex: 0 1 460px; }
.insight-legend button {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  border-radius: 8px;
  text-align: left;
}
.insight-payout { margin-top: 8px; }
body.investor-home { background: #000; }

body.investor-home .player-bar {
  width: min(420px, 100%);
  max-width: 420px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  position: static;
  background: #000;
  border: none;
}

.investor-logo {
  display: block;
  width: 168px;
  max-width: 58%;
  height: auto;
  margin: 0 auto 4px;
  object-fit: contain;
  border-radius: 8px;
  background: #050814;
}

.player-bar .investor-logo-bar {
  width: 132px;
  max-width: 52%;
  height: auto;
  margin: 0;
  border-radius: 6px;
  object-fit: contain;
}

body.investor-home .player-bar button {
  width: auto;
  margin: 0 0 0 auto;
}

body.investor-home .hello {
  margin: 2px 0 12px;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

body.investor-home .inv-hero {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(227, 201, 119, 0.18), transparent 52%),
    #121212;
  padding: 18px 16px 14px;
}

body.investor-home .inv-kicker {
  margin: 0;
  color: #cbb98a;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.investor-home .inv-hero-amount {
  margin: 8px 0 14px;
  color: #f4e4b0;
  font-size: 2.45rem;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

body.investor-home .inv-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

body.investor-home .inv-stats div {
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(179, 139, 46, 0.28);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
}

body.investor-home .inv-stats span {
  display: block;
  color: #b7a57a;
  font-size: 0.74rem;
  line-height: 1.25;
}

body.investor-home .inv-stats b {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 1.05rem;
}

body.investor-home .inv-day {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #2a2a2a;
}

body.investor-home .inv-day:last-child { border-bottom: 0; }

body.investor-home .inv-day span {
  color: #e3c977;
  font-weight: 700;
}

body.investor-home .inv-day b { color: #fff; }

body.investor-home .inv-bar {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #2a2a2a;
}

body.investor-home .inv-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #8a6a2a, #e3c977);
}

body.investor-home .inv-week {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #2c2c2c;
  border-radius: 14px;
  background: #101010;
}

body.investor-home .inv-week-title {
  margin: 0;
  color: #e3c977;
  font-weight: 700;
}

body.investor-home .inv-send {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  padding: 12px;
  border-radius: 12px;
  background: #1c170c;
}

body.investor-home .inv-send span {
  color: #cbb98a;
  font-size: 0.85rem;
}

body.investor-home .inv-send b {
  color: #fff;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

body.investor-home .inv-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

body.investor-home .inv-facts div {
  padding: 8px;
  border-radius: 10px;
  background: #181818;
}

body.investor-home .inv-facts span {
  display: block;
  color: #9a9a9a;
  font-size: 0.72rem;
  line-height: 1.25;
}

body.investor-home .inv-facts b {
  display: block;
  margin-top: 3px;
  color: #fff;
  font-size: 0.95rem;
}

body.investor-home h2 {
  margin-bottom: 2px;
  font-size: 1.2rem;
}

.wallet-fold {
  margin-top: 12px;
  border: 1px solid #b38b2e66;
  border-radius: 12px;
  background: #141414;
}

.wallet-fold summary {
  min-height: 52px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 700;
  color: #e3c977;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wallet-fold summary::-webkit-details-marker { display: none; }

.wallet-fold summary b {
  margin-left: auto;
  margin-right: 12px;
  max-width: 58%;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
}

.wallet-fold summary::after {
  content: "▸";
  color: #b38b2e;
  font-size: 1.1rem;
}

.wallet-fold[open] summary::after { content: "▾"; }

.wallet-fold > :not(summary) { padding: 0 16px 16px; }

.otp {
  letter-spacing: 0.35em;
  text-align: center;
  font-size: 1.25rem;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 8px;
}

body.advertiser-home { background: #000; }

body.advertiser-home .player-bar {
  width: min(420px, 100%);
  max-width: 420px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  position: static;
  background: #000;
  border: none;
}

.advertiser-logo {
  display: block;
  width: 168px;
  max-width: 58%;
  height: auto;
  margin: 0 auto 4px;
  object-fit: contain;
  border-radius: 8px;
  background: #050814;
}

.player-bar .advertiser-logo-bar {
  width: 132px;
  max-width: 52%;
  height: auto;
  margin: 0;
  border-radius: 6px;
  object-fit: contain;
}

body.advertiser-home .player-bar button {
  width: auto;
  margin: 0 0 0 auto;
}

.desk-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 18px;
}

.desk-tabs button {
  width: auto;
  min-height: 38px;
  margin: 0;
  padding: 0 16px;
  background: transparent;
  color: #e8e0cf;
  border: 1px solid #3a3324;
}

.desk-tabs button.is-current {
  background: #b38b2e;
  color: #000;
  border-color: #b38b2e;
}

.shop-card {
  border: 1px solid #3a3324;
  border-radius: 12px;
  padding: 14px 16px 16px;
  margin: 0 0 12px;
}

.shop-card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.shop-actions input,
.shop-actions button {
  width: auto;
  margin: 0;
}

.shop-terms {
  margin-top: 12px;
}

.shop-terms summary {
  cursor: pointer;
  color: #e3c977;
}

body.advertiser-home #qr {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 12px auto;
  background: #fff;
  border-radius: 8px;
}

body.advertiser-home #names {
  margin: 8px 0 0;
  padding-left: 1.2rem;
}

.cash-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
  margin: 12px 0 16px;
}

.cash-filters label,
.cash-filters select,
.cash-filters input {
  width: auto;
  min-width: 160px;
  margin: 0;
}

.cash-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #e3c977;
}

#cash-focus {
  border: 1px solid #3a3018;
  padding: 12px 14px;
  margin-bottom: 12px;
}

#cash-focus h3 {
  margin: 0 0 6px;
  color: #e3c977;
}

.book-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.book-guide article {
  border: 1px solid #3a3018;
  padding: 10px 12px;
}

.book-guide h3 {
  margin: 0 0 6px;
  color: #e3c977;
  font-size: 0.95rem;
}

.book-guide p {
  margin: 0;
  color: #c8c8c8;
}

.instant-install-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(179, 139, 46, 0.55);
  background: #141414;
  color: #fff;
}

.instant-install-banner[hidden] { display: none !important; }

.instant-install-copy { min-width: 0; flex: 1; text-align: left; }

.instant-install-copy strong {
  font-size: 0.95rem;
  color: #e3c977;
}

.instant-install-sub {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #aaa;
  line-height: 1.35;
}

.instant-install-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.instant-install-btn,
.instant-install-dismiss {
  min-width: 96px;
  margin: 0;
}

.instant-install-btn {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  background: #b38b2e;
  color: #111;
}

.instant-install-dismiss {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 10px;
  background: transparent;
  color: #999;
  border: 1px solid #444;
}

@media (max-width: 380px) {
  .instant-install-banner { flex-direction: column; align-items: stretch; }
  .instant-install-actions { flex-direction: row; }
  .instant-install-btn,
  .instant-install-dismiss { flex: 1; }
}
