:root {
  color-scheme: light;
  --bg: #eef5fb;
  --panel: #ffffff;
  --ink: #07172c;
  --muted: #64758a;
  --line: #d6e5f1;
  --accent: #087dca;
  --accent-2: #00bce7;
  --gold: #d99b18;
  --warn: #a66c00;
  --danger: #c01818;
  --soft: #e8f7ff;
  --shadow: 0 12px 30px rgba(7, 23, 44, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  touch-action: manipulation;
}

body.splash-active {
  background: #00152e;
  overflow: hidden;
}

body.splash-active .app-shell {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

body.auth-pending .app-shell {
  display: none;
}

body.splash-done .app-shell {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 320ms ease, transform 320ms ease;
}

.splash-screen {
  align-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(26, 150, 255, 0.25), transparent 34%),
    radial-gradient(circle at 50% 72%, rgba(0, 235, 255, 0.14), transparent 32%),
    linear-gradient(145deg, #001025 0%, #031d40 42%, #000914 100%);
  display: grid;
  inset: 0;
  justify-items: center;
  overflow: hidden;
  padding: 22px;
  position: fixed;
  z-index: 50;
}

.splash-screen::before,
.splash-screen::after {
  content: "";
  position: absolute;
}

.splash-screen::before {
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.17) 46%, transparent 58%);
  height: 150%;
  left: -72%;
  top: -24%;
  transform: rotate(12deg);
  width: 42%;
  animation: splashSheen 2600ms 420ms ease forwards;
}

.splash-screen::after {
  background: radial-gradient(circle, rgba(0, 216, 255, 0.34), transparent 62%);
  filter: blur(22px);
  height: 220px;
  opacity: 0;
  right: -80px;
  top: 18%;
  width: 220px;
  animation: lightBloom 2600ms 300ms ease forwards;
}

.splash-screen.is-hiding {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 320ms ease, transform 320ms ease;
}

.splash-screen[hidden] {
  display: none;
}

.splash-skip {
  background: rgba(230, 244, 255, 0.11);
  border: 1px solid rgba(154, 220, 255, 0.34);
  border-radius: 999px;
  color: #d8f5ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  min-height: 34px;
  padding: 8px 14px;
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  top: max(14px, env(safe-area-inset-top));
  z-index: 52;
}

.splash-stage {
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(circle at 50% 50%, rgba(8, 35, 73, 0.72), rgba(0, 9, 24, 0.98) 65%),
    linear-gradient(145deg, #06224a, #000b19);
  border: 1px solid rgba(127, 200, 255, 0.24);
  border-radius: clamp(46px, 9vw, 112px);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.035),
    inset 0 0 80px rgba(0, 147, 255, 0.17),
    0 30px 88px rgba(0, 0, 0, 0.42);
  max-width: 590px;
  opacity: 0;
  overflow: hidden;
  position: relative;
  transform: scale(0.92);
  width: min(88vw, 72vh);
  animation: stageArrive 650ms 90ms ease forwards;
}

.splash-orbit {
  border: 2px solid rgba(0, 130, 255, 0.34);
  border-left-color: rgba(12, 234, 255, 0.9);
  border-radius: 50%;
  inset: 14%;
  opacity: 0;
  position: absolute;
}

.orbit-one {
  animation: orbitDraw 1400ms 300ms ease forwards, orbitSpin 3800ms 1100ms linear infinite;
}

.orbit-two {
  border-color: rgba(45, 115, 210, 0.26);
  border-right-color: rgba(0, 208, 255, 0.86);
  inset: 22%;
  animation: orbitDraw 1400ms 460ms ease forwards, orbitSpinReverse 5200ms 1200ms linear infinite;
}

.splash-cross {
  background: linear-gradient(90deg, transparent, #23efff, transparent);
  height: 3px;
  opacity: 0;
  position: absolute;
  width: 17%;
  animation: crossPulse 2100ms 650ms ease-in-out infinite;
}

.cross-top {
  left: 41.5%;
  top: 6%;
  transform: rotate(90deg);
}

.cross-bottom {
  bottom: 6%;
  left: 41.5%;
  transform: rotate(90deg);
}

.cross-left {
  left: 4%;
  top: 49.5%;
}

.cross-right {
  right: 4%;
  top: 49.5%;
}

.splash-logo {
  display: flex;
  font-size: clamp(42px, 11vw, 84px);
  font-style: italic;
  font-weight: 1000;
  gap: 0.16em;
  justify-content: center;
  left: 50%;
  letter-spacing: 0;
  line-height: 0.9;
  opacity: 0;
  position: absolute;
  text-shadow: 0 10px 14px rgba(0, 0, 0, 0.45);
  top: 13%;
  transform: translate(-50%, -12px) scale(0.94);
  animation: logoRise 760ms 420ms cubic-bezier(.19, 1, .22, 1) forwards;
  white-space: nowrap;
  width: max-content;
  z-index: 5;
}

.logo-slo {
  background: linear-gradient(180deg, #ffffff 0%, #d8e1ec 52%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.28));
}

.logo-navi {
  background: linear-gradient(180deg, #fff7c3 0%, #ffc533 48%, #8f5b00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.48));
}

.slot-machine {
  height: 30%;
  left: 19%;
  opacity: 0;
  position: absolute;
  top: 34%;
  transform: translateY(18px) scale(0.96);
  width: 62%;
  animation: reelEnter 720ms 700ms cubic-bezier(.19, 1, .22, 1) forwards;
  z-index: 4;
}

.reel-window {
  background: linear-gradient(180deg, #d6e8ff, #6d83a2 8%, #031327 16%, #010814 84%, #6d83a2 92%, #f1f7ff);
  border: 2px solid rgba(238, 249, 255, 0.84);
  border-radius: 13% / 28%;
  box-shadow:
    inset 0 0 0 7px rgba(8, 22, 40, 0.94),
    0 20px 30px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 4%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 100%;
  padding: 9% 9%;
  position: relative;
  z-index: 2;
}

.reel {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(0, 18, 42, 0.18), transparent 20%, transparent 78%, rgba(0, 18, 42, 0.2)),
    linear-gradient(90deg, #879ab5 0%, #fbfdff 20%, #ffffff 50%, #dce7f5 82%, #7188a8 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 13% / 9%;
  box-shadow: inset 0 13px 20px rgba(255, 255, 255, 0.68), inset 0 -16px 22px rgba(15, 35, 62, 0.28);
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.reel::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), transparent);
  content: "";
  height: 32%;
  inset: 0 0 auto;
  opacity: 0;
  position: absolute;
  animation: reelFlash 1900ms 850ms ease-in-out infinite;
}

.reel-left,
.reel-right {
  animation: reelSettle 800ms 740ms ease-out both;
}

.reel-center {
  animation: reelSettle 800ms 860ms ease-out both;
}

.diamond {
  background: linear-gradient(135deg, #0ae2ff, #0144b0 58%, #002d73);
  border: 2px solid #001d65;
  box-shadow: inset 0 3px 7px rgba(255, 255, 255, 0.38), 0 0 18px rgba(0, 170, 255, 0.24);
  height: 25%;
  transform: rotate(45deg);
  width: 25%;
}

.red-j {
  background: linear-gradient(180deg, #ffebe7 0%, #ff2b1d 23%, #b80000 70%, #6d0000 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 8px rgba(255, 26, 13, 0.72)) drop-shadow(0 7px 3px rgba(0, 0, 0, 0.38));
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 15vw, 112px);
  font-weight: 1000;
  line-height: 0.8;
  -webkit-text-stroke: 2px rgba(255, 236, 226, 0.82);
  animation: redJGlow 1700ms 1100ms ease-in-out infinite;
}

.reel-side {
  background: linear-gradient(90deg, #05214a, #e4f4ff 50%, #062450);
  border-radius: 999px;
  box-shadow: inset 0 0 18px rgba(4, 20, 48, 0.72), 0 8px 20px rgba(0, 0, 0, 0.32);
  height: 55%;
  position: absolute;
  top: 22.5%;
  width: 13%;
  z-index: 1;
}

.reel-side-left {
  left: -8%;
}

.reel-side-right {
  right: -8%;
}

.reel-lever {
  background: linear-gradient(180deg, #dbeeff, #0d2a54 60%, #020a18);
  border-radius: 999px;
  height: 46%;
  position: absolute;
  right: -18%;
  top: 27%;
  transform: rotate(12deg);
  transform-origin: bottom;
  width: 4%;
  animation: leverTick 1600ms 1050ms ease-in-out infinite;
}

.reel-lever span {
  background: radial-gradient(circle at 35% 26%, #ffffff, #1fc6ff 18%, #0053c7 70%, #00194b);
  border-radius: 50%;
  box-shadow: 0 0 19px rgba(0, 152, 255, 0.56);
  height: 46%;
  left: 50%;
  position: absolute;
  top: -27%;
  transform: translateX(-50%);
  width: 340%;
}

.splash-chart {
  bottom: 9%;
  height: 34%;
  left: 16%;
  opacity: 0;
  position: absolute;
  width: 70%;
  animation: chartReveal 680ms 1260ms ease forwards;
  z-index: 6;
}

.chart-bars {
  align-items: end;
  bottom: 4%;
  display: grid;
  gap: 5%;
  grid-template-columns: repeat(6, 1fr);
  height: 62%;
  left: 18%;
  opacity: 0.56;
  position: absolute;
  width: 64%;
}

.chart-bars i {
  background: linear-gradient(180deg, #008dff, #003173);
  border-top: 1px solid rgba(85, 236, 255, 0.76);
  border-radius: 5px 5px 0 0;
  box-shadow: 0 0 18px rgba(0, 144, 255, 0.34);
  height: 0;
  animation: barGrow 720ms 1420ms ease forwards;
}

.chart-line {
  inset: 0;
  position: absolute;
}

.chart-segment {
  background: linear-gradient(90deg, #005bff, #23eaff);
  border: 2px solid rgba(207, 253, 255, 0.95);
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(0, 207, 255, 0.7);
  height: 8%;
  opacity: 0;
  position: absolute;
  transform-origin: left center;
}

.segment-one {
  left: 0;
  top: 74%;
  transform: rotate(-38deg) scaleX(0);
  width: 30%;
  animation: segmentOne 430ms 1390ms ease forwards;
}

.segment-two {
  left: 25%;
  top: 52%;
  transform: rotate(26deg) scaleX(0);
  width: 24%;
  animation: segmentTwo 430ms 1620ms ease forwards;
}

.segment-three {
  left: 44%;
  top: 60%;
  transform: rotate(-43deg) scaleX(0);
  width: 30%;
  animation: segmentThree 430ms 1840ms ease forwards;
}

.segment-four {
  left: 68%;
  top: 38%;
  transform: rotate(-40deg) scaleX(0);
  width: 30%;
  animation: segmentFour 430ms 2040ms ease forwards;
}

.chart-node {
  background: radial-gradient(circle at 38% 32%, #ffffff, #5dffff 35%, #0071ff 68%, #00348a);
  border: 3px solid rgba(224, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(0, 220, 255, 0.8);
  height: 16%;
  opacity: 0;
  position: absolute;
  transform: translate(-50%, -50%) scale(0.65);
  width: 9%;
}

.node-one {
  left: 25%;
  top: 54%;
  animation: nodePop 260ms 1590ms ease forwards;
}

.node-two {
  left: 46%;
  top: 66%;
  animation: nodePop 260ms 1820ms ease forwards;
}

.node-three {
  left: 70%;
  top: 38%;
  animation: nodePop 260ms 2040ms ease forwards;
}

.chart-arrow {
  border-bottom: 26px solid transparent;
  border-left: 40px solid #35efff;
  border-top: 26px solid transparent;
  filter: drop-shadow(0 0 16px rgba(0, 216, 255, 0.88));
  opacity: 0;
  position: absolute;
  right: -1%;
  top: 9%;
  transform: rotate(-37deg) scale(0.65);
  animation: arrowPop 360ms 2250ms ease forwards;
}

.splash-gloss {
  background: linear-gradient(120deg, transparent 10%, rgba(255, 255, 255, 0.24) 45%, transparent 62%);
  height: 170%;
  left: -74%;
  position: absolute;
  top: -42%;
  transform: rotate(18deg);
  width: 42%;
  z-index: 20;
  animation: innerGloss 2350ms 720ms ease forwards;
}

.splash-red-glow {
  background: radial-gradient(circle, rgba(255, 40, 28, 0.5), transparent 58%);
  filter: blur(12px);
  height: 18%;
  left: 44%;
  opacity: 0;
  position: absolute;
  top: 43%;
  width: 15%;
  animation: redGlowPulse 1700ms 980ms ease-in-out infinite;
  z-index: 3;
}

.splash-scan {
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.72), transparent);
  bottom: 0;
  height: 2px;
  left: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
  animation: scanLine 2100ms 680ms ease-in-out infinite;
  z-index: 19;
}

.login-view {
  align-items: center;
  background:
    radial-gradient(circle at 50% 24%, rgba(0, 214, 255, 0.18), transparent 32%),
    linear-gradient(145deg, #001025 0%, #062148 52%, #000914 100%);
  display: grid;
  inset: 0;
  justify-items: center;
  min-height: 100vh;
  padding: 22px;
  position: fixed;
  z-index: 30;
}

.login-panel {
  background: rgba(3, 18, 39, 0.84);
  border: 1px solid rgba(139, 218, 255, 0.28);
  border-radius: 8px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 12px;
  max-width: 380px;
  padding: 22px;
  width: min(100%, 380px);
}

.login-logo {
  display: flex;
  font-size: 38px;
  font-style: italic;
  font-weight: 1000;
  gap: 8px;
  justify-content: center;
  letter-spacing: 0;
  line-height: 0.9;
  margin-bottom: 4px;
}

.login-logo span {
  background: linear-gradient(180deg, #ffffff, #d8e1ec 56%, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-logo strong {
  background: linear-gradient(180deg, #fff7c3, #ffc533 52%, #8f5b00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-panel h1 {
  color: #eff9ff;
  font-size: 18px;
  text-align: center;
}

.login-panel label {
  color: #b8d4e6;
}

.login-panel input {
  background: rgba(245, 251, 255, 0.98);
  border-color: rgba(181, 226, 255, 0.55);
}

.login-panel .primary-action {
  background: linear-gradient(135deg, #00a8d8, #1460d7);
}

.login-error {
  color: #ffb7ad;
  font-size: 13px;
  font-weight: 850;
  min-height: 20px;
}

.home-toolbar,
.app-tabs {
  align-items: center;
  display: flex;
  gap: 10px;
}

.account-actions {
  align-items: flex-end;
  display: grid;
  gap: 6px;
  justify-items: end;
  max-width: 190px;
}

.user-chip {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  max-width: 180px;
  overflow: hidden;
  padding: 8px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  min-height: 28px;
  padding: 5px 10px;
}

.logout-button:active {
  background: var(--soft);
  color: var(--accent);
}

.app-tabs {
  background: #dfeaf2;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 4px;
}

.master-plan-switch {
  align-items: center;
  background: #eef7ff;
  border: 1px solid rgba(0, 132, 211, 0.2);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 10px 0 14px;
  padding: 10px;
}

.master-plan-switch span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 950;
}

.master-plan-switch button {
  min-height: 38px;
  padding: 8px 12px;
}

.tab-button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  flex: 1;
  font-weight: 950;
  min-height: 40px;
}

.tab-button.is-active {
  background: #ffffff;
  color: #006fb8;
  box-shadow: 0 5px 14px rgba(20, 32, 29, 0.08);
}

.home-toolbar {
  align-items: stretch;
  margin-bottom: 10px;
}

.home-toolbar .primary-action,
.home-toolbar .secondary-action {
  flex: 1;
}

.profit-view {
  display: grid;
  gap: 10px;
}

.transfer-view {
  display: grid;
  gap: 10px;
}

.profit-summary,
.profit-calendar-panel,
.profit-form,
.profit-list-item,
.transfer-card,
.admin-transfer-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 12px;
}

.profit-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profit-calendar-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 12px;
}

.profit-calendar-toolbar {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 84px minmax(0, 1fr) 84px;
  margin-bottom: 10px;
}

.profit-calendar-toolbar strong {
  color: var(--ink);
  font-size: 18px;
  text-align: center;
}

.profit-weekdays,
.profit-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.profit-weekdays span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 8px 2px;
  text-align: center;
}

.profit-calendar {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.profit-day {
  background: #fbfdff;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 7px;
  text-align: left;
}

.profit-day.empty {
  background: #edf4fa;
}

.profit-day.today {
  box-shadow: inset 0 0 0 2px rgba(0, 188, 231, 0.72);
}

.profit-day strong {
  font-size: 14px;
}

.profit-day span {
  font-size: 11px;
  font-weight: 950;
  line-height: 1.2;
}

.profit-day.plus span {
  color: #0078b9;
}

.profit-day.minus span {
  color: #c01818;
}

.profit-summary div {
  min-width: 0;
}

.profit-summary span,
.profit-list-item span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
}

.profit-summary strong {
  display: block;
  font-size: 20px;
  line-height: 1.15;
}

.profit-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profit-dialog {
  border: 0;
  border-radius: 8px;
  max-width: 560px;
  padding: 0;
  width: calc(100% - 24px);
}

.profit-dialog::backdrop {
  background: rgba(0, 12, 26, 0.54);
}

.profit-dialog .profit-form {
  box-shadow: none;
  max-width: 100%;
  overflow-x: hidden;
}

.profit-dialog label {
  max-width: 100%;
}

#profitDateInput {
  -webkit-appearance: none;
  appearance: none;
  max-width: 100%;
  min-width: 0;
  text-align: center;
}

.profit-dialog-records {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}

.profit-dialog-record {
  background: #f5faff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
}

.profit-dialog-record span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
}

.profit-dialog-record strong {
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.profit-dialog-record p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

.profit-wide {
  grid-column: 1 / -1;
}

.profit-form .primary-action {
  grid-column: 1 / -1;
}

.profit-list {
  display: grid;
  gap: 10px;
}

.profit-list-item {
  box-shadow: none;
  display: grid;
  gap: 7px;
}

.profit-list-item strong {
  display: block;
  font-size: 17px;
  line-height: 1.25;
}

.profit-list-item p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.profit-list-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.transfer-card {
  display: grid;
  gap: 12px;
}

.transfer-form {
  display: grid;
  gap: 10px;
}

.transfer-result {
  display: grid;
  gap: 9px;
}

.transfer-code-box {
  background: #f5faff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 10px;
}

.transfer-code-box span,
.admin-transfer-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.transfer-code-box strong {
  color: var(--ink);
  font-size: clamp(18px, 5vw, 25px);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.transfer-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.danger-text {
  color: var(--danger);
}

.admin-transfer-list {
  display: grid;
  gap: 10px;
}

.admin-download-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.admin-transfer-item {
  box-shadow: none;
  display: grid;
  gap: 7px;
}

.admin-transfer-item strong {
  font-size: 17px;
}

.admin-transfer-section {
  background: #eef7ff;
  border-color: rgba(0, 132, 211, 0.18);
}

.admin-event-item {
  background: #fbfdff;
}

.admin-transfer-item p,
.admin-transfer-item li {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-transfer-item ul {
  margin: 0;
  padding-left: 18px;
}

.admin-transfer-item details {
  background: #f5faff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.premium-gate {
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 216, 255, 0.16), transparent 32%),
    #ffffff;
  border: 1px solid rgba(0, 132, 211, 0.22);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 34, 74, 0.08);
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 16px;
  text-align: center;
}

.premium-gate strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 950;
}

.premium-gate p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
  margin: 0;
}

.app-view.is-premium-locked > :not(.premium-gate) {
  display: none;
}

.premium-locked-card {
  overflow: hidden;
  position: relative;
}

.premium-blur-content {
  filter: blur(5px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.premium-lock-overlay {
  align-items: center;
  background: rgba(248, 252, 255, 0.78);
  backdrop-filter: blur(8px);
  display: grid;
  gap: 10px;
  inset: 0;
  justify-items: center;
  padding: 12px;
  position: absolute;
  text-align: center;
  z-index: 2;
}

.premium-lock-overlay p {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.45;
  margin: 0;
}

.premium-lock-overlay .primary-action {
  min-height: 38px;
  padding: 8px 12px;
}

.admin-transfer-item summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 950;
}

.admin-transfer-item pre {
  background: #061629;
  border-radius: 8px;
  color: #dff7ff;
  font-size: 11px;
  line-height: 1.45;
  margin: 8px 0 0;
  max-height: 280px;
  overflow: auto;
  padding: 9px;
  white-space: pre-wrap;
  word-break: break-word;
}

.small-danger-button {
  background: #fee2e2;
  border: 0;
  border-radius: 8px;
  color: #991b1b;
  font-size: 13px;
  font-weight: 950;
  min-height: 36px;
  padding: 8px 11px;
}

.profit-plus {
  color: #0078b9;
}

.profit-minus {
  color: #b42318;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.app-shell {
  margin: 0 auto;
  max-width: 820px;
  min-height: 100vh;
  padding: 14px 12px 30px;
}

.app-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.eyebrow,
.machine-card span,
.result-card span,
.reason-card span,
.setting-meter > span,
.stats-grid span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.05;
}

h2 {
  font-size: 18px;
  line-height: 1.25;
}

.primary-action,
.secondary-action,
.icon-button,
.quick-update button,
.counter-row button {
  border: 0;
  border-radius: 8px;
  font-weight: 950;
  min-height: 42px;
}

.primary-action {
  background: var(--accent);
  color: #fff;
  padding: 9px 12px;
}

.secondary-action {
  background: #e9eeee;
  color: var(--ink);
  padding: 9px 12px;
}

.icon-button {
  background: #eef2f1;
  color: var(--ink);
  font-size: 22px;
  height: 42px;
  width: 42px;
}

.machine-card,
.counter-panel,
.result-card,
.reason-card,
.setting-meter,
.stats-grid,
.quick-update {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.machine-card {
  margin-bottom: 10px;
  padding: 14px;
}

.machine-card strong {
  display: block;
  font-size: 24px;
  line-height: 1.15;
  margin-bottom: 7px;
}

.machine-card p,
.section-head p,
.muted-text,
.disclaimer {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.quick-update {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 96px;
  margin-bottom: 10px;
  padding: 12px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 5px;
  min-width: 0;
}

input,
select {
  box-sizing: border-box;
  background: #fbfdfc;
  border: 1px solid #ccd8d2;
  border-radius: 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  min-height: 46px;
  min-width: 0;
  padding: 9px 10px;
  width: 100%;
}

.quick-update button,
.counter-row button {
  background: var(--soft);
  color: var(--accent);
}

.counter-panel {
  padding: 14px;
}

.section-head {
  align-items: start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.counter-list {
  display: grid;
  gap: 9px;
}

.counter-row {
  align-items: center;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 64px 72px 64px;
  padding: 8px;
  touch-action: manipulation;
}

.counter-name {
  align-items: center;
  display: flex;
  font-weight: 950;
  gap: 9px;
  min-width: 0;
}

.counter-name b {
  align-items: center;
  background: var(--soft);
  border-radius: 8px;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  min-width: 42px;
}

.counter-row strong {
  font-size: 20px;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
}

.result-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.result-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-card,
.reason-card,
.setting-meter,
.stats-grid {
  box-shadow: none;
  padding: 12px;
}

.result-card strong {
  color: var(--accent);
  display: block;
  font-size: 31px;
  line-height: 1.05;
}

.decision-card strong {
  color: var(--accent-2);
}

.result-card p,
.reason-card p {
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
  margin-top: 6px;
}

.stats-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid div {
  min-width: 0;
}

.stats-grid strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

.setting-meter {
  display: grid;
  gap: 9px;
}

.meter-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 52px minmax(0, 1fr) 44px;
}

.meter-row span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.meter-row div {
  background: #e6eee9;
  border-radius: 999px;
  height: 11px;
  overflow: hidden;
}

.meter-row i {
  background: linear-gradient(90deg, #00bce7, #087dca);
  border-radius: 999px;
  display: block;
  height: 100%;
}

.meter-row strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  text-align: right;
}

.disclaimer {
  margin: 18px 2px 0;
}

.text-link {
  appearance: none;
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  display: inline;
  font: inherit;
  font-weight: 950;
  padding: 0 0 0 6px;
  text-decoration: underline;
}

.terms-dialog {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(3, 18, 34, 0.26);
  max-width: 720px;
  padding: 0;
  width: min(94vw, 720px);
}

.terms-dialog::backdrop {
  background: rgba(4, 15, 28, 0.55);
}

.terms-form {
  display: grid;
  gap: 14px;
  max-height: min(86vh, 820px);
  overflow: hidden;
  padding: 18px;
}

.terms-content {
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 52vh;
  overflow: auto;
  padding: 12px;
  -webkit-overflow-scrolling: touch;
}

.terms-content h1 {
  font-size: 20px;
  margin: 0 0 10px;
}

.terms-content h2 {
  font-size: 16px;
  margin: 20px 0 8px;
}

.terms-content p,
.terms-content li {
  font-size: 13px;
}

.terms-consent-check {
  align-items: center;
  background: #eef7ff;
  border: 1px solid rgba(0, 132, 211, 0.2);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  padding: 12px;
}

.terms-consent-check input {
  min-height: 22px;
  min-width: 22px;
}

.terms-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  margin: 0;
}

.setup-dialog {
  border: 0;
  border-radius: 8px;
  max-width: 560px;
  padding: 0;
  width: calc(100% - 24px);
}

.setup-dialog::backdrop {
  background: rgba(10, 18, 16, 0.44);
}

.setup-form {
  display: grid;
  gap: 11px;
  padding: 14px;
}

.dialog-head,
.dialog-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.dialog-head p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.dialog-actions {
  margin-top: 4px;
}

@keyframes stageArrive {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes splashSheen {
  0% {
    left: -72%;
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    left: 125%;
    opacity: 0;
  }
}

@keyframes lightBloom {
  25%,
  74% {
    opacity: 1;
  }
  100% {
    opacity: 0.18;
  }
}

@keyframes orbitDraw {
  0% {
    opacity: 0;
    transform: scale(0.82) rotate(-24deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes orbitSpin {
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes crossPulse {
  0%,
  100% {
    opacity: 0.16;
  }
  46% {
    opacity: 0.9;
  }
}

@keyframes logoRise {
  72% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes reelEnter {
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes reelSettle {
  0% {
    background-position: 0 -120px;
    filter: blur(2px);
    transform: translateY(-12%);
  }
  70% {
    filter: blur(0);
    transform: translateY(2%);
  }
  100% {
    background-position: 0 0;
    transform: translateY(0);
  }
}

@keyframes reelFlash {
  0%,
  100% {
    opacity: 0;
  }
  45% {
    opacity: 0.74;
  }
}

@keyframes redJGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(255, 26, 13, 0.62)) drop-shadow(0 7px 3px rgba(0, 0, 0, 0.38));
    transform: scale(1);
  }
  45% {
    filter: drop-shadow(0 0 19px rgba(255, 42, 22, 0.96)) drop-shadow(0 7px 3px rgba(0, 0, 0, 0.38));
    transform: scale(1.035);
  }
}

@keyframes leverTick {
  0%,
  100% {
    transform: rotate(12deg);
  }
  46% {
    transform: rotate(5deg);
  }
}

@keyframes chartReveal {
  to {
    opacity: 1;
  }
}

@keyframes barGrow {
  to {
    height: var(--bar-height);
  }
}

@keyframes segmentOne {
  to {
    opacity: 1;
    transform: rotate(-38deg) scaleX(1);
  }
}

@keyframes segmentTwo {
  to {
    opacity: 1;
    transform: rotate(26deg) scaleX(1);
  }
}

@keyframes segmentThree {
  to {
    opacity: 1;
    transform: rotate(-43deg) scaleX(1);
  }
}

@keyframes segmentFour {
  to {
    opacity: 1;
    transform: rotate(-40deg) scaleX(1);
  }
}

@keyframes nodePop {
  74% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes arrowPop {
  to {
    opacity: 1;
    transform: rotate(-37deg) scale(1);
  }
}

@keyframes innerGloss {
  0% {
    left: -74%;
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    left: 118%;
    opacity: 0;
  }
}

@keyframes redGlowPulse {
  0%,
  100% {
    opacity: 0.14;
    transform: scale(0.88);
  }
  45% {
    opacity: 0.72;
    transform: scale(1.18);
  }
}

@keyframes scanLine {
  0% {
    opacity: 0;
    transform: translateY(-180px);
  }
  30%,
  62% {
    opacity: 0.86;
  }
  100% {
    opacity: 0;
    transform: translateY(-12px);
  }
}

@media (max-width: 650px) {
  .splash-stage {
    width: min(94vw, 78vh);
  }

  .splash-logo {
    top: 15%;
  }

  .slot-machine {
    left: 17%;
    top: 35%;
    width: 66%;
  }

  .reel-lever {
    right: -14%;
  }

  .splash-chart {
    bottom: 9%;
    left: 12%;
    width: 76%;
  }

  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions,
  .home-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-action {
    width: 100%;
  }

  .counter-row {
    grid-template-columns: minmax(0, 1fr) 56px 56px 56px;
  }

  .result-grid,
  .stats-grid,
  .profit-summary,
  .profit-form {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
