:root {
  --bg: #ffffff;
  --surface: #f1f3f1;
  --pill: #ddeadd;
  --pill-strong: #cfe6cd;
  --text: #202124;
  --muted: #5f6368;
  --faint: #80868b;
  --line: #e8eaed;
  --accent: #1e7a34;
  --accent-soft: #b7e9ae;
  --danger: #c5221f;
  --shadow: 0 1px 3px rgba(60, 64, 67, 0.18), 0 4px 12px rgba(60, 64, 67, 0.08);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #202124;
    --surface: #2b2d30;
    --pill: #2f3a31;
    --pill-strong: #3a4a3c;
    --text: #e8eaed;
    --muted: #9aa0a6;
    --faint: #80868b;
    --line: #3c4043;
    --accent: #9fe3a8;
    --accent-soft: #14401d;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, "Helvetica Neue", -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; }

.ntp {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px 40px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.brand {
  text-align: center;
  margin: clamp(24px, 9vh, 92px) 0 0;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  font-family: "Google Sans", "Product Sans", Roboto, Arial, sans-serif;
  font-size: clamp(44px, 13vw, 64px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
  user-select: none;
}
.logo span:nth-child(1) { color: #4285f4; }
.logo span:nth-child(2) { color: #ea4335; }
.logo span:nth-child(3) { color: #fbbc05; }
.logo span:nth-child(4) { color: #34a853; }

.brand-sub {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.searchbar {
  margin-top: clamp(22px, 5vh, 44px);
  height: 56px;
  border-radius: 28px;
  background: var(--pill);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 0 18px;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.searchbar:focus-within { background: var(--pill-strong); box-shadow: var(--shadow); }
.searchbar .ico { width: 22px; height: 22px; flex: none; color: var(--text); opacity: 0.86; }
.searchbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0.01em;
}
.searchbar input::placeholder { color: var(--muted); }
.sbtn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text);
  opacity: 0.8;
}
.sbtn:active { background: rgba(0, 0, 0, 0.06); }

.meta {
  margin: 14px 0 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
.meta b { font-weight: 500; color: var(--text); }
.meta a { color: var(--muted); text-decoration: none; }
.meta .sep { margin: 0 5px; color: var(--faint); }

.chips { display: flex; gap: 10px; }
.chip {
  flex: 1 1 0;
  height: 46px;
  border-radius: 24px;
  background: var(--pill);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  transition: background 0.15s ease;
}
.chip:active { background: var(--pill-strong); }
.chip svg { width: 19px; height: 19px; }

.shortcut-card {
  margin-top: 16px;
  background: var(--surface);
  border-radius: 18px;
  padding: 16px 6px 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 2px 0;
  min-width: 0;
}

.sis {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.sis svg { width: 30px; height: 30px; }
.slabel {
  font-size: 11.5px;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sis--add {
  background: transparent;
  box-shadow: none;
  border: 0;
  color: var(--faint);
}
.sis--add svg { width: 26px; height: 26px; }

.hero-actions { margin-top: auto; padding-top: 28px; }
.legal {
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.7;
}
.legal a { text-decoration: underline; }

/* ---------- auth ---------- */

.auth {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.auth-card .logo { font-size: 44px; }
.auth-sub { margin: 8px 0 28px; color: var(--muted); font-size: 13px; }
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  border-radius: 14px;
  background: var(--surface);
  padding: 0 16px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}
.field:focus-within { border-color: var(--pill-strong); background: var(--bg); }
.field svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.field input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); }
.btn {
  width: 100%;
  height: 52px;
  border-radius: 26px;
  background: var(--accent-soft);
  color: #0c2c12;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  margin-top: 8px;
}
.btn:disabled { opacity: 0.55; }
.btn--ghost { background: transparent; color: var(--muted); font-weight: 500; }
.msg { min-height: 20px; font-size: 13px; color: var(--danger); margin-top: 10px; }
.hint { margin-top: 18px; font-size: 12px; color: var(--faint); line-height: 1.6; }

/* ---------- play ---------- */

.player {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #0b0d10;
}
.player-bar {
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 4px;
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.icon-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
}
.icon-btn:active { background: var(--surface); }
.icon-btn svg { width: 22px; height: 22px; }
.player-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-bal {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--pill);
  padding: 7px 12px;
  border-radius: 999px;
  margin-right: 6px;
  white-space: nowrap;
}
.frame-wrap { position: relative; flex: 1; min-height: 0; background: #0b0d10; }
.frame-wrap iframe { width: 100%; height: 100%; border: 0; display: block; background: #0b0d10; }
.loader {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: #0b0d10;
  color: #cfd6dd;
  font-size: 13px;
  gap: 14px;
  text-align: center;
  padding: 24px;
}
.loader .spin {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #7ddc8f;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader.hidden { display: none; }
.loader .err { color: #ffb4ab; max-width: 320px; line-height: 1.5; }
.loader button {
  margin-top: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #7ddc8f;
  color: #07220d;
  font-weight: 600;
  font-size: 13px;
}

/* ---------- mock game ---------- */

.mock {
  min-height: 100dvh;
  background: radial-gradient(120% 60% at 50% 0%, #17351f 0%, #0b0d10 60%);
  color: #e9f2ec;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 18px 30px;
  font-family: Roboto, Arial, sans-serif;
}
.mock h1 { font-size: 22px; margin: 6px 0 2px; letter-spacing: 0.02em; }
.mock .sub { color: #8fa697; font-size: 12px; margin-bottom: 18px; }
.mock .wheel {
  width: 190px; height: 190px; border-radius: 50%;
  background: conic-gradient(#1f9d55 0 45deg, #164626 45deg 90deg, #2b6cb0 90deg 135deg, #123049 135deg 180deg, #c53030 180deg 225deg, #4a1414 225deg 270deg, #b7791f 270deg 315deg, #3a2a08 315deg 360deg);
  border: 6px solid #0b0d10;
  box-shadow: 0 0 0 2px #2b3a30, 0 18px 40px rgba(0, 0, 0, 0.55);
  display: grid; place-items: center;
  transition: transform 1s cubic-bezier(0.15, 0.9, 0.2, 1);
}
.mock .wheel span { background: #0b0d10; border-radius: 50%; width: 84px; height: 84px; display: grid; place-items: center; font-size: 22px; }
.mock .bal { margin: 22px 0 6px; font-size: 30px; font-weight: 700; letter-spacing: 0.01em; }
.mock .balline { font-size: 12px; color: #8fa697; }
.mock .bet { margin-top: 18px; display: flex; gap: 10px; width: 100%; max-width: 340px; }
.mock .bet button { flex: 1; height: 50px; border-radius: 25px; background: #7ddc8f; color: #07220d; font-weight: 700; font-size: 15px; }
.mock .bet button.ghost { background: #1d2a22; color: #cfe0d5; font-weight: 500; }
.mock .log { margin-top: 18px; width: 100%; max-width: 360px; font-size: 11.5px; color: #9fb3a6; }
.mock .log div { padding: 7px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.04); margin-bottom: 6px; word-break: break-all; }

@media (max-width: 380px) {
  .logo { font-size: 42px; }
  .sis { width: 50px; height: 50px; }
  .slabel { font-size: 10.5px; }
}

/* ---------- account ---------- */

.account { max-width: 600px; margin: 0 auto; padding: 0 16px 40px; }
.acc-head { height: 56px; display: flex; align-items: center; gap: 6px; }
.acc-head .ttl { font-size: 16px; font-weight: 500; }
.acc-card { background: var(--surface); border-radius: 18px; padding: 18px 18px 8px; margin-bottom: 14px; }
.acc-label { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.acc-bal { font-size: 34px; font-weight: 700; letter-spacing: -.01em; margin: 4px 0 12px; }
.acc-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; font-size: 13px; border-top: 1px solid var(--line); }
.acc-row span:first-child { color: var(--muted); }
.acc-row span:last-child { text-align: right; word-break: break-all; }
.tx-list { margin-top: 10px; }
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tx .dot { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 15px; }
.tx .dot.in { background: var(--pill); color: var(--accent); }
.tx .dot.out { background: rgba(197, 34, 31, .12); color: var(--danger); }
.tx .body { flex: 1; min-width: 0; }
.tx .k { font-size: 13px; font-weight: 500; text-transform: capitalize; }
.tx .m { font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx .amt { font-size: 13px; font-weight: 600; }
.tx .amt.in { color: var(--accent); }
.tx .amt.out { color: var(--danger); }
.empty { padding: 26px 0; text-align: center; color: var(--faint); font-size: 13px; }

/* ---------- cashier ---------- */
.cashier-actions { display: flex; gap: 10px; margin: 12px 0 6px; }
.cash-btn { flex: 1; height: 46px; border-radius: 23px; background: var(--accent-soft); color: #0c2c12; font-weight: 600; font-size: 14px; }
.cash-btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--text); font-weight: 500; }
.cashier-form { margin-top: 12px; }
.cash-row { display: flex; gap: 10px; }
.cash-field { display: block; flex: 1; margin-bottom: 10px; }
.cash-field span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.cash-field input, .cash-field select { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 0 12px; outline: none; }
.cash-field input:focus, .cash-field select:focus { border-color: var(--accent); }
.cashier-form .btn { margin-top: 4px; }
.req-list { margin-top: 8px; }
.req { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.req .r-kind { font-weight: 500; }
.req .r-time { color: var(--faint); font-size: 11px; }
.req .r-amt { margin-left: auto; font-weight: 600; }
.req .chip { padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.req .chip.pending { background: #fff3d6; color: #8a5a00; }
.req .chip.approved { background: #e3f4e6; color: var(--accent); }
.req .chip.rejected, .req .chip.expired, .req .chip.cancelled { background: #fdeceb; color: var(--danger); }
.req .chip.review { background: #e8f0fe; color: #1a4f8a; }
