:root {
  color-scheme: light;
  --bg: #eef5f4;
  --surface: #ffffff;
  --surface-soft: #f7faf9;
  --navy: #10283b;
  --navy-2: #1a3c50;
  --muted: #748995;
  --line: #dbe7e5;
  --mint: #38c98d;
  --mint-dark: #169769;
  --gold: #e6ae47;
  --gold-dark: #a87416;
  --coral: #ef715f;
  --blue: #4d8fd8;
  --purple: #8571d7;
  --shadow: 0 14px 38px rgba(19, 60, 72, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

/* 2.16 security inventory, institutional markets and Bonanza presentation */
.security-ready-badge {
  display: inline-flex;
  margin-top: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(42, 151, 111, .28);
  border-radius: 999px;
  background: rgba(56, 201, 141, .1);
  color: #147655;
  font-size: 11px;
  font-weight: 800;
}

.security-assignment-list {
  margin-bottom: 18px;
}

.relationship-meter {
  height: 9px;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 52, 68, .1);
}

.relationship-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #dc6578, #e9a84d, #38c98d);
  box-shadow: 0 0 14px rgba(56, 201, 141, .3);
}

.family-stat-grid {
  margin-bottom: 12px;
}

.security-assignment-card {
  background: linear-gradient(135deg, rgba(56, 201, 141, .08), rgba(30, 53, 67, .03));
  border-color: rgba(38, 133, 101, .2);
}

.slot-board.bonanza {
  border-color: #cf8b28;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 211, 91, .22), transparent 38%),
    linear-gradient(180deg, #3a2417 0%, #171210 62%, #090807 100%);
  box-shadow: inset 0 0 45px rgba(255, 178, 45, .12), 0 16px 38px rgba(28, 16, 8, .34);
}

.slot-board.bonanza .slot-jackpot {
  background: linear-gradient(90deg, #5b2f13, #d68a21, #5b2f13);
  color: #fff5c6;
  letter-spacing: .12em;
}

.slot-board.bonanza .slot-reels {
  background:
    linear-gradient(rgba(18, 12, 9, .76), rgba(18, 12, 9, .82)),
    repeating-linear-gradient(90deg, transparent 0 15%, rgba(255, 191, 61, .08) 15% 16.66%);
  border-color: rgba(245, 179, 55, .42);
}

.slot-board.bonanza .slot-cell {
  background: linear-gradient(145deg, rgba(255, 246, 214, .96), rgba(210, 161, 79, .88));
  border-color: rgba(106, 58, 17, .34);
  text-shadow: 0 2px 0 rgba(255, 255, 255, .25);
}

.slot-scatter-cell {
  background: radial-gradient(circle, #fff4a8, #e99b24 58%, #8b4210) !important;
  box-shadow: 0 0 16px rgba(255, 198, 61, .8), inset 0 0 0 2px rgba(255,255,255,.42);
  animation: scatterPulse 1.15s ease-in-out infinite alternate;
}

@keyframes scatterPulse {
  to { transform: scale(1.08) rotate(2deg); filter: saturate(1.2) brightness(1.08); }
}

.flight-history .empty {
  opacity: .38;
  border-style: dashed;
}

@media (max-width: 560px) {
  .security-assignment-card .asset-actions { width: 100%; }
  .security-assignment-card .asset-actions button { width: 100%; }
  .slot-board.bonanza .slot-cell { font-size: clamp(18px, 6vw, 29px); }
}

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

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--navy);
  background:
    radial-gradient(circle at 10% -5%, rgba(56, 201, 141, 0.16), transparent 28%),
    radial-gradient(circle at 100% 15%, rgba(77, 143, 216, 0.12), transparent 24%),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

.app-shell {
  width: min(100%, 590px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 17px 16px calc(96px + env(safe-area-inset-bottom, 0px));
}

.app-header,
.header-actions,
.brand,
.page-heading,
.section-title,
.day-strip,
.market-feature-head,
.card-head,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-actions {
  flex: 0 0 auto;
  gap: 7px;
}

.test-money-button {
  padding: 9px 10px;
  border: 1px solid #d4aa54;
  border-radius: 12px;
  color: #76510d;
  background: #fff7dc;
  font-size: 8px;
  font-weight: 950;
}

.test-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(90px, 0.7fr);
  gap: 7px;
  margin: 9px 0;
}

.test-toolbar .test-money-button {
  min-width: 0;
  width: 100%;
  padding-right: 5px;
  padding-left: 5px;
  white-space: normal;
}

.test-delivery-button {
  color: #294b65;
  border-color: #b9d5e2;
  background: #edf8fc;
}

.inbox-button {
  position: relative;
}

.message-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 8px rgba(239, 113, 95, 0.8);
}

.message-dot.hidden {
  display: none;
}

.brand {
  min-width: 0;
  justify-content: flex-start;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(145deg, #46d69b, #169a6a);
  box-shadow: 0 9px 22px rgba(25, 158, 108, 0.23);
  font-size: 21px;
  font-weight: 950;
}

.brand small,
.brand strong {
  display: block;
}

.brand small,
.wealth-panel small,
.page-heading small,
.section-title small,
.empire-hero small,
.market-feature small,
.modal-hero small,
.tax-banner small,
.day-strip,
.mini-label {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand strong {
  margin-top: 2px;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.round-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
}

.wealth-panel {
  overflow: hidden;
  position: relative;
  margin: 18px 0 12px;
  padding: 20px;
  border-radius: 25px;
  color: white;
  background:
    radial-gradient(circle at 95% 0, rgba(98, 245, 177, 0.21), transparent 32%),
    linear-gradient(145deg, #193f53, #10283b);
  box-shadow: 0 18px 42px rgba(16, 40, 59, 0.2);
}

.wealth-panel::after {
  content: "";
  position: absolute;
  right: -45px;
  bottom: -85px;
  width: 210px;
  height: 210px;
  border: 28px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.wealth-panel h1 {
  display: inline-block;
  position: relative;
  z-index: 1;
  margin: 5px 8px 17px 0;
  font-size: clamp(31px, 8vw, 43px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
}

.status-chip {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 900;
}

.status-chip.positive {
  color: #b7ffdc;
  background: rgba(56, 201, 141, 0.17);
}

.status-chip.negative {
  color: #ffd2ca;
  background: rgba(239, 113, 95, 0.18);
}

.wealth-grid {
  display: grid;
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(3, 1fr);
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.wealth-grid div + div {
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.wealth-grid strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.tax-banner {
  display: grid;
  width: 100%;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #f1c8be;
  border-radius: 17px;
  color: var(--navy);
  background: #fff5f2;
  text-align: left;
}

.tax-banner.hidden {
  display: none;
}

.tax-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--coral);
  font-weight: 950;
}

.tax-banner strong,
.tax-banner em {
  display: block;
}

.tax-banner strong {
  margin: 2px 0;
  font-size: 11px;
}

.tax-banner em {
  color: var(--coral);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.tax-banner b {
  color: var(--coral);
  font-size: 9px;
}

.view {
  display: none;
  animation: view-in 0.25s ease both;
}

.view.active {
  display: block;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.day-strip {
  margin: 6px 2px 12px;
  letter-spacing: 0;
}

.day-strip span:first-child {
  display: flex;
  align-items: center;
  gap: 5px;
}

.day-strip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 9px var(--mint);
}

.empire-hero {
  display: grid;
  min-height: 195px;
  overflow: hidden;
  position: relative;
  grid-template-columns: 1.08fr 0.92fr;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
}

.hero-copy {
  z-index: 2;
  padding: 22px 0 20px 20px;
}

.empire-hero h2 {
  margin: 7px 0 7px;
  font-size: 21px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.empire-hero p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.empire-hero button,
.primary-button,
.small-action {
  border: 0;
  border-radius: 12px;
  color: white;
  background: linear-gradient(90deg, var(--mint-dark), var(--mint));
  font-size: 9px;
  font-weight: 900;
}

.empire-hero button {
  padding: 10px 12px;
}

.empire-hero button b {
  margin-left: 5px;
  color: #caffea;
}

.atlas-art,
.catalog-art {
  background-image: url("assets/empire-atlas.png");
  background-repeat: no-repeat;
  background-size: 400% 300%;
}

.atlas-art {
  align-self: stretch;
  min-width: 0;
  background-color: #f1f7f7;
}

.art-construction {
  background-position: 0 0;
}
.art-bank {
  background-position: 33.333% 0;
}
.art-stadium {
  background-position: 66.666% 0;
}
.art-logistics {
  background-position: 100% 0;
}
.art-tech {
  background-position: 0 50%;
}
.art-residence {
  background-position: 33.333% 50%;
}
.art-mall {
  background-position: 66.666% 50%;
}
.art-garage {
  background-position: 100% 50%;
}
.art-hangar {
  background-position: 0 100%;
}
.art-jet {
  background-position: 33.333% 100%;
}
.art-security {
  background-position: 66.666% 100%;
}
.art-hotel {
  background-position: 100% 100%;
}

.section-title,
.page-heading {
  margin: 25px 2px 12px;
}

.page-heading {
  margin-top: 23px;
}

.section-title h2,
.page-heading h2 {
  margin: 3px 0 0;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.counter,
.market-open {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: white;
  font-size: 8px;
  font-weight: 850;
}

.market-open {
  color: var(--mint-dark);
}

.market-open i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--mint);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.summary-grid button {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 0 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  text-align: left;
}

.summary-grid i {
  display: grid;
  width: 36px;
  height: 36px;
  grid-row: span 2;
  place-items: center;
  border-radius: 11px;
  color: var(--mint-dark);
  background: #e9f8f2;
  font-style: normal;
}

.summary-grid span {
  color: var(--muted);
  font-size: 8px;
}

.summary-grid strong {
  font-size: 11px;
}

.project-list,
.business-catalog,
.market-list,
.asset-list,
.club-list {
  display: grid;
  gap: 9px;
}

.delivery-list {
  display: grid;
  gap: 7px;
  margin: 10px 0;
}

.delivery-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 11px;
  border: 1px solid #c7dbef;
  border-radius: 14px;
  background: #f3f9fe;
}

.delivery-panel small,
.delivery-panel strong,
.delivery-panel span {
  display: block;
}

.delivery-panel small {
  color: var(--blue);
  font-size: 7px;
  font-weight: 900;
}

.delivery-panel strong {
  margin: 3px 0;
  font-size: 9px;
}

.delivery-panel span {
  color: var(--muted);
  font-size: 7px;
}

.portfolio-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 12px;
  border: 1px solid #c9dfda;
  border-radius: 17px;
  background: linear-gradient(135deg, #f3faf7, #f6f9fc);
}

.portfolio-overview div + div {
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.portfolio-overview small,
.portfolio-overview strong {
  display: block;
}

.portfolio-overview small {
  color: var(--muted);
  font-size: 7px;
}

.portfolio-overview strong {
  overflow: hidden;
  margin-top: 4px;
  font-size: 9px;
  text-overflow: ellipsis;
}

.operation-explainer {
  padding: 12px;
  border: 1px solid #c9dfda;
  border-radius: 15px;
  background: #f3faf7;
}

.operation-explainer strong,
.operation-explainer span {
  display: block;
}

.operation-explainer strong {
  margin-bottom: 4px;
  color: var(--mint-dark);
  font-size: 9px;
}

.operation-explainer span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.empty-state {
  padding: 23px 18px;
  border: 1px dashed #cbdad7;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.project-card,
.news-card,
.business-card,
.market-row,
.asset-card,
.club-card,
.market-feature {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 24px rgba(19, 60, 72, 0.045);
}

.project-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 12px;
}

.project-icon,
.business-icon,
.asset-icon,
.market-logo {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--mint-dark);
  background: #eaf8f2;
  font-size: 17px;
  font-weight: 950;
}

.project-card strong,
.project-card span {
  display: block;
}

.project-card strong {
  margin-bottom: 3px;
  font-size: 10px;
}

.project-card span {
  color: var(--muted);
  font-size: 8px;
}

.project-card button {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--blue);
  background: #f4f8fb;
  font-size: 8px;
  font-weight: 850;
}

.progress {
  height: 5px;
  overflow: hidden;
  margin-top: 7px;
  border-radius: 99px;
  background: #e9f0ef;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-dark), var(--mint));
}

.news-card {
  min-height: 85px;
  padding: 15px;
  background:
    linear-gradient(100deg, rgba(77, 143, 216, 0.08), transparent),
    white;
}

.news-card strong,
.news-card span {
  display: block;
}

.news-card strong {
  margin-bottom: 5px;
  font-size: 11px;
}

.news-card span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.category-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tabs button {
  flex: 1 0 auto;
  min-width: 72px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 8px;
  font-weight: 850;
}

.category-tabs button.active {
  color: white;
  background: var(--navy-2);
}

.business-card {
  display: grid;
  overflow: hidden;
  grid-template-columns: 92px 1fr;
  min-height: 112px;
}

.catalog-art {
  min-height: 112px;
  background-color: #edf5f4;
}

.business-info {
  padding: 13px;
}

.business-info h3,
.asset-card h3,
.market-row h3,
.club-card h3 {
  margin: 0 0 4px;
  font-size: 12px;
}

.business-info p,
.asset-card p,
.market-row p,
.club-card p {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.business-metrics {
  display: flex;
  justify-content: space-between;
  margin: 9px 0;
  color: var(--navy);
  font-size: 8px;
  font-weight: 800;
}

.business-actions,
.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.small-action {
  padding: 8px;
}

.bulk-buy {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.bulk-buy input,
.bulk-gear-buy input {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--navy);
  background: white;
  font-size: 8px;
  font-weight: 850;
}

.bulk-gear-buy {
  grid-template-columns: 62px minmax(75px, 1fr);
}

.outline-action,
.danger-action {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--navy);
  background: var(--surface-soft);
  font-size: 8px;
  font-weight: 850;
}

.danger-action {
  color: var(--coral);
  border-color: #f0c9c1;
  background: #fff6f3;
}

button:disabled {
  opacity: 0.42;
  cursor: default;
}

.market-feature {
  padding: 16px;
  border-radius: 23px;
}

.market-feature h2 {
  margin: 4px 0 0;
  font-size: 25px;
}

#marketChart {
  display: block;
  width: 100%;
  height: 155px;
  margin: 5px 0;
}

.market-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.market-stats div + div {
  padding-left: 9px;
  border-left: 1px solid var(--line);
}

.market-stats strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  font-size: 9px;
  text-overflow: ellipsis;
}

.market-row,
.asset-card,
.club-card {
  padding: 13px;
}

.casino-hero {
  background:
    radial-gradient(circle at 82% 16%, rgba(230, 174, 71, 0.22), transparent 34%),
    linear-gradient(135deg, #162c42, #244f62);
}

.casino-hero h3,
.casino-hero p,
.casino-hero .mini-label {
  color: white;
}

.casino-hero p {
  opacity: 0.76;
}

.casino-emblem,
.casino-modal-symbol {
  display: grid;
  place-items: center;
  color: #f2ca73;
  font-weight: 950;
}

.casino-game-stage {
  min-height: 255px;
  overflow: hidden;
  margin: 10px 0;
  border-radius: 20px;
  background: #10283b;
}

.casino-live-status {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--navy);
  background: white;
  font-size: 9px;
  font-weight: 850;
  text-align: center;
}

.casino-live-status > strong,
.casino-live-status > span {
  display: block;
}

.casino-live-status > strong {
  margin-bottom: 4px;
  font-size: 16px;
}

.casino-live-status .button-row {
  margin-top: 10px;
}

.casino-bet-picker {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 5px;
}

.casino-bet-picker button {
  border: 1px solid var(--line);
  border-radius: 9px;
  color: white;
  background: var(--navy-2);
  font-size: 16px;
  font-weight: 950;
}

.casino-bet-picker input {
  min-width: 0;
}

.super-spin-button {
  padding: 10px;
  border: 1px solid #f0b53c;
  border-radius: 11px;
  color: #fff7bd;
  background: linear-gradient(135deg, #a91b8f, #6721a3);
  font-size: 8px;
  font-weight: 950;
}

.casino-table {
  position: relative;
  display: grid;
  min-height: 255px;
  padding: 18px;
  color: white;
  background:
    radial-gradient(circle at center, rgba(76, 182, 137, 0.42), transparent 58%),
    #0d5c45;
}

.blackjack-table {
  align-content: space-between;
}

.interactive-blackjack .card-hand > div {
  flex-wrap: wrap;
}

.blackjack-controls {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.card-hand small {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 8px;
  font-weight: 900;
  text-align: center;
}

.card-hand > div,
.poker-hand {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.playing-card {
  display: grid;
  width: 52px;
  height: 72px;
  align-content: space-between;
  padding: 7px;
  border: 2px solid white;
  border-radius: 9px;
  color: #1d2b36;
  background: #fffdf7;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(-45px) rotate(-8deg) scale(0.86);
  animation: deal-card 0.48s cubic-bezier(0.22, 0.9, 0.35, 1.15) forwards;
  animation-delay: var(--deal-delay);
}

.playing-card b {
  font-size: 14px;
}

.playing-card span {
  justify-self: end;
  color: #c44343;
  font-size: 16px;
}

.table-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #eac56c;
  font-size: 19px;
  font-weight: 950;
  transform: translate(-50%, -50%);
}

.poker-table {
  align-content: center;
  justify-items: center;
  gap: 22px;
  background:
    radial-gradient(circle at center, rgba(81, 158, 120, 0.5), transparent 62%),
    #164d3b;
}

.poker-table > small {
  font-size: 8px;
  font-weight: 900;
}

.poker-hand {
  gap: 4px;
}

.poker-hand .playing-card {
  width: 45px;
  height: 66px;
  padding: 6px;
}

.poker-pot {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 99px;
  color: #f0cf7c;
  font-size: 8px;
  font-weight: 900;
}

.race-board {
  display: grid;
  align-content: center;
  min-height: 255px;
  gap: 8px;
  padding: 15px;
  background:
    linear-gradient(90deg, transparent 92%, rgba(255, 255, 255, 0.85) 92% 94%, transparent 94%),
    repeating-linear-gradient(#5b9a55 0 44px, #4c8849 44px 46px);
}

.race-lane {
  display: grid;
  grid-template-columns: 22px 82px 1fr;
  align-items: center;
  gap: 6px;
  min-height: 43px;
  color: white;
}

.race-lane.selected {
  color: #ffe59a;
}

.race-lane > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #17324a;
  background: white;
  font-size: 8px;
  font-weight: 950;
}

.race-lane > b {
  font-size: 7px;
}

.race-track {
  position: relative;
  height: 28px;
}

.race-horse {
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 24px;
  font-style: normal;
  transform: translateX(0);
}

.animation-started .race-horse {
  animation: horse-run var(--race-time) cubic-bezier(0.15, 0.62, 0.28, 1) forwards;
}

.race-horse.winner {
  color: #ffe78f;
  filter: drop-shadow(0 0 7px rgba(255, 225, 123, 0.8));
}

.flight-board {
  position: relative;
  min-height: 255px;
  overflow: hidden;
  color: white;
  background: linear-gradient(#163956, #10283b);
}

.flight-game-shell {
  min-height: 255px;
  padding: 8px;
  background: #080b13;
}

.flight-history {
  display: flex;
  gap: 5px;
  overflow: hidden;
  padding: 3px 0 8px;
}

.flight-history span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 99px;
  color: #a8c8ff;
  background: #172343;
  font-size: 7px;
  font-weight: 900;
}

.flight-rays {
  position: absolute;
  inset: 38% 0 0;
  opacity: 0.18;
  background: repeating-conic-gradient(from 260deg at 0 100%, #d51f4c 0 3deg, transparent 3deg 9deg);
}

.flight-grid {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
  background-size: 34px 34px;
}

.flight-trail {
  position: absolute;
  left: 8%;
  bottom: 18%;
  width: 0;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--mint), #f5c96e);
  transform: rotate(-22deg);
  transform-origin: left center;
}

.flight-plane {
  position: absolute;
  left: 8%;
  bottom: 16%;
  color: #f5ce76;
  font-size: 29px;
}

.animation-started .flight-trail {
  animation: flight-trail 2.7s ease-out forwards;
}

.animation-started .flight-plane {
  animation: flight-rise 2.7s ease-out forwards;
}

.flight-board strong {
  position: absolute;
  top: 38%;
  left: 50%;
  font-size: 34px;
  transform: translate(-50%, -50%);
}

.flight-board small {
  position: absolute;
  top: 55%;
  left: 50%;
  color: rgba(255, 255, 255, 0.65);
  font-size: 9px;
  transform: translateX(-50%);
}

.flight-bet-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  margin-top: 8px;
  padding: 9px 11px;
  border: 1px solid #6d1429;
  border-radius: 12px;
  color: white;
  background: #190b11;
}

.flight-live-trail {
  position: absolute;
  left: 7%;
  bottom: 14%;
  width: 0;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, #ed174b, #ff698a);
  transform-origin: left center;
}

.flight-live-plane {
  position: absolute;
  left: 7%;
  bottom: 14%;
  color: #ff285d;
  font-size: 30px;
  filter: drop-shadow(0 0 8px rgba(255, 40, 93, 0.7));
  transition: left 45ms linear, bottom 45ms linear;
}

.flight-cashout-button {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #e11d48, #9e0e31);
  box-shadow: 0 8px 22px rgba(207, 24, 67, 0.28);
  font-size: 11px;
  font-weight: 950;
}

.flight-bet-strip span,
.flight-bet-strip b,
.flight-bet-strip em {
  font-size: 7px;
}

.flight-bet-strip span {
  color: #e84e70;
  font-weight: 900;
}

.flight-bet-strip b {
  text-align: right;
}

.flight-bet-strip em {
  grid-column: 1 / -1;
  color: #8f6570;
  font-style: normal;
}

.slot-board {
  display: grid;
  align-content: center;
  min-height: 255px;
  padding: 18px;
  color: white;
  background:
    radial-gradient(circle at 50% 20%, rgba(235, 190, 91, 0.32), transparent 38%),
    #26385e;
}

.slot-board.candy {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.32), transparent 38%),
    linear-gradient(135deg, #f28fb7, #865ac8);
}

.slot-jackpot {
  margin-bottom: 7px;
  color: #ffe06d;
  font-size: 9px;
  font-weight: 950;
  text-align: center;
  text-shadow: 0 2px 7px rgba(74, 25, 107, 0.75);
}

.slot-machine {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 7px;
}

.slot-side-panel {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 8px;
  border: 2px solid #f5c44d;
  border-radius: 13px;
  color: white;
  background: linear-gradient(#d522a5, #7b28a5);
  text-align: center;
}

.slot-side-panel b {
  color: #fff1a5;
  font-size: 10px;
}

.slot-side-panel span {
  font-size: 6px;
  line-height: 1.35;
}

.slot-side-panel i {
  padding: 4px;
  border-radius: 7px;
  color: #153f24;
  background: #7cea75;
  font-size: 6px;
  font-style: normal;
  font-weight: 950;
}

.slot-reels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--slot-cols, 6), minmax(0, 1fr));
  gap: 5px;
  padding: 7px;
  border: 2px solid rgba(255, 220, 133, 0.65);
  border-radius: 16px;
  background: rgba(11, 24, 49, 0.48);
}

.live-slot-grid {
  overflow: hidden;
}

.slot-visible {
  opacity: 1;
  transform: none;
}

.slot-matched {
  z-index: 2;
  outline: 3px solid #ffe45e;
  background: #fff6ac;
  animation: slot-pop 0.62s ease forwards;
}

.slot-drop-in {
  animation: slot-drop 0.62s cubic-bezier(0.22, 0.86, 0.3, 1.12) both;
}

.slot-match-lines {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.slot-match-lines polyline {
  fill: none;
  stroke: #fff06b;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px #ff8ad6);
  stroke-dasharray: 240;
  animation: slot-line 0.5s ease-out both;
}

.slot-cell {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  opacity: 0;
  transform: translateY(-80px) rotate(90deg);
}

.slot-bonus-cell {
  color: #6d2b00;
  background: linear-gradient(135deg, #fff4a8, #ffb84d);
  font-size: 13px;
  font-weight: 950;
}

.animation-started .slot-cell {
  animation: slot-settle 0.72s cubic-bezier(0.2, 0.75, 0.3, 1.18) forwards;
  animation-delay: var(--spin-delay);
}

.slot-footer {
  display: grid;
  grid-template-columns: 1fr 45px 1fr;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}

.slot-footer > span {
  color: white;
  font-size: 7px;
  font-weight: 950;
  text-align: right;
}

.slot-spin-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  font-size: 25px;
  font-weight: 950;
}

.slot-multiplier {
  color: #ffe18b;
  font-size: 8px;
  font-weight: 950;
  text-align: left;
}

@keyframes deal-card {
  to {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
  }
}

@keyframes horse-run {
  0% { left: 0; transform: translateY(0); }
  22% { left: 20%; transform: translateY(-2px); }
  48% { left: 43%; transform: translateY(2px); }
  75% { left: 66%; transform: translateY(-2px); }
  100% { left: var(--race-end); transform: translateY(0); }
}

@keyframes flight-rise {
  to {
    left: 78%;
    bottom: 74%;
    transform: rotate(-12deg);
  }
}

@keyframes flight-trail {
  to { width: 78%; }
}

@keyframes slot-settle {
  40% { opacity: 1; transform: translateY(18px) rotate(25deg); }
  75% { opacity: 1; transform: translateY(-7px) rotate(-8deg); }
  100% { opacity: 1; transform: translateY(0) rotate(0); }
}

@keyframes slot-pop {
  0% { transform: scale(1); opacity: 1; }
  55% { transform: scale(1.22) rotate(4deg); opacity: 1; }
  100% { transform: scale(0.2) rotate(-12deg); opacity: 0; }
}

@keyframes slot-drop {
  0% { transform: translateY(-95px); opacity: 0; }
  70% { transform: translateY(8px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes slot-line {
  from { stroke-dashoffset: 240; opacity: 0; }
  to { stroke-dashoffset: 0; opacity: 1; }
}
.casino-emblem {
  width: 76px;
  min-height: 92px;
  font-size: 44px;
}

.casino-modal-symbol {
  height: 92px;
  margin: 8px 0 12px;
  border: 1px solid #d6e1df;
  border-radius: 20px;
  background:
    radial-gradient(circle, rgba(230, 174, 71, 0.22), transparent 52%),
    #172e45;
  font-size: 43px;
}

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

.casino-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
}

.casino-card h3,
.casino-card p {
  margin: 0;
}

.casino-card h3 {
  font-size: 10px;
}

.casino-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.4;
}

.casino-card span {
  display: block;
  margin-top: 5px;
  color: var(--gold-dark);
  font-size: 7px;
  font-weight: 900;
}

.casino-card button {
  grid-column: 1 / -1;
}

.casino-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: #f0c76d;
  background: #172e45;
  font-size: 15px;
  font-weight: 950;
}

.casino-history,
.message-list,
.mafia-ranking,
.war-list {
  display: grid;
  gap: 7px;
}

.war-card {
  padding: 13px;
  border: 1px solid #e3b3aa;
  border-radius: 17px;
  background:
    linear-gradient(135deg, rgba(239, 113, 95, 0.08), transparent 48%),
    white;
}

.war-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.war-card-head small,
.war-card-head h3 {
  display: block;
  margin: 0;
}

.war-card-head small {
  color: var(--coral);
  font-size: 7px;
  font-weight: 900;
}

.war-card-head h3 {
  margin-top: 3px;
  font-size: 12px;
}

.war-card-head > span {
  padding: 6px 9px;
  border-radius: 9px;
  color: white;
  background: var(--navy);
  font-size: 10px;
  font-weight: 950;
}

.war-side {
  display: grid;
  grid-template-columns: 122px 1fr 34px;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
}

.war-side > span,
.war-side > b {
  font-size: 7px;
}

.war-side > b {
  text-align: right;
}

.war-side > div {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #e4efec;
}

.war-side > div i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #169769, #55d8a3);
}

.war-side.enemy > div i {
  background: linear-gradient(90deg, #9f3040, #ef715f);
}

.war-card > p {
  margin: 10px 0;
  padding: 8px;
  border-radius: 10px;
  color: var(--muted);
  background: #f7faf9;
  font-size: 7px;
  line-height: 1.45;
}

.war-balance {
  display: grid;
  grid-template-columns: 1fr 45px 1fr;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.war-balance > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  text-align: center;
}

.war-balance small,
.war-balance strong {
  display: block;
}

.war-balance small {
  color: var(--muted);
  font-size: 7px;
}

.war-balance strong {
  margin-top: 4px;
  font-size: 18px;
}

.war-balance > i {
  height: 2px;
  background: linear-gradient(90deg, var(--mint-dark), var(--coral));
}

.casino-history > div:not(.empty-state) {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  font-size: 8px;
}

.message-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.message-card.pending {
  border-color: #e6c785;
  background: #fffaf0;
}

.message-card h3,
.message-card p {
  margin: 0;
}

.message-card h3 {
  font-size: 10px;
}

.message-card small {
  color: var(--muted);
  font-size: 7px;
}

.message-card p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.message-card > div > strong {
  font-size: 9px;
}

.message-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--mafia-color, var(--navy));
  font-size: 12px;
  font-weight: 950;
}

.message-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 8px;
}

.mafia-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.mafia-row.player-row {
  border-color: #81cdb1;
  background: #ecfaf4;
}

.mafia-row > b {
  color: var(--gold-dark);
  font-size: 10px;
  text-align: center;
}

.mafia-row span strong,
.mafia-row span small {
  display: block;
}

.mafia-row span strong {
  font-size: 9px;
}

.mafia-row span small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mafia-row em {
  color: var(--navy);
  font-size: 7px;
  font-style: normal;
  font-weight: 850;
}

.mafia-row button {
  grid-column: 2 / -1;
}

.chat-profile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 7px;
}

.chat-profile-row label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 900;
}

.chat-profile-row input,
.global-chat-compose input {
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--navy);
  background: white;
}

.chat-connection {
  margin: 9px 0;
  color: var(--coral);
  font-size: 7px;
  font-weight: 900;
}

.chat-connection.online {
  color: var(--mint-dark);
}

.global-chat-messages {
  display: grid;
  max-height: 360px;
  gap: 7px;
  overflow-y: auto;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f4f8f7;
}

.global-chat-message {
  max-width: 86%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 13px 13px 13px 3px;
  background: white;
}

.global-chat-message.mine {
  justify-self: end;
  border-color: #9ddbc3;
  border-radius: 13px 13px 3px 13px;
  background: #eaf9f3;
}

.global-chat-message > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.global-chat-message strong,
.global-chat-message small {
  font-size: 7px;
}

.global-chat-message small {
  color: var(--muted);
}

.global-chat-message p {
  margin: 5px 0 0;
  font-size: 8px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.global-chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 7px;
  margin-top: 8px;
}

.market-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
}

.market-logo {
  color: var(--blue);
  background: #edf4fb;
  font-size: 9px;
}

.market-price {
  text-align: right;
}

.market-price strong,
.market-price span {
  display: block;
}

.market-price strong {
  font-size: 10px;
}

.market-price span {
  margin-top: 3px;
  color: var(--mint-dark);
  font-size: 8px;
  font-weight: 850;
}

.market-price span.negative {
  color: var(--coral);
}

.holding-strip {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.holding-strip div {
  min-width: 0;
}

.holding-strip small,
.holding-strip strong {
  display: block;
}

.holding-strip small {
  color: var(--muted);
  font-size: 7px;
}

.holding-strip strong {
  overflow: hidden;
  margin-top: 2px;
  font-size: 8px;
  text-overflow: ellipsis;
}

.asset-header-card {
  display: grid;
  min-height: 150px;
  overflow: hidden;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}

.asset-header-copy {
  padding: 18px;
}

.asset-header-copy h3 {
  margin: 5px 0;
  font-size: 18px;
}

.asset-header-copy p {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.asset-card {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  gap: 10px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.catalog-toolbar label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.catalog-toolbar span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 850;
}

.catalog-toolbar select,
.catalog-toolbar input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--navy);
  background: transparent;
  font-size: 9px;
  font-weight: 850;
}

.asset-visual {
  width: 74px;
  height: 60px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background-color: #edf4f6;
  background-image: var(--asset-atlas);
  background-repeat: no-repeat;
  background-position: var(--asset-x) var(--asset-y);
  background-size: 400% 300%;
}

.catalog-count {
  align-self: center;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: white;
  font-size: 8px;
  font-weight: 850;
}

.asset-card .asset-actions {
  flex-direction: column;
}

.asset-card .asset-actions {
  display: flex;
  gap: 5px;
}

.asset-card .asset-actions button {
  padding: 7px 8px;
}

.badge {
  display: inline-block;
  margin-top: 5px;
  padding: 4px 6px;
  border-radius: 7px;
  color: var(--mint-dark);
  background: #eaf8f2;
  font-size: 7px;
  font-weight: 850;
}

.club-create {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
}

.club-create .atlas-art {
  height: 210px;
}

.club-create-copy {
  padding: 19px;
}

.club-create-copy h2 {
  margin: 5px 0 7px;
  font-size: 22px;
}

.club-create-copy p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.primary-button {
  width: 100%;
  padding: 13px;
}

.club-dashboard {
  display: grid;
  gap: 10px;
}

.club-identity {
  display: grid;
  grid-template-columns: 65px 1fr;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border-radius: 21px;
  color: white;
  background: linear-gradient(145deg, var(--club-color, #245a70), #10283b);
  box-shadow: var(--shadow);
}

.club-badge {
  display: grid;
  width: 60px;
  height: 67px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 17px 17px 25px 25px;
  color: white;
  background: var(--club-accent, #38c98d);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.08);
  font-size: 17px;
  font-weight: 950;
}

.club-identity h2 {
  margin: 3px 0;
  font-size: 20px;
}

.club-identity p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 8px;
}

.club-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.football-pitch {
  position: relative;
  height: 440px;
  overflow: hidden;
  margin: 12px 0;
  border: 4px solid #f6fff9;
  border-radius: 18px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 12.5%, transparent 12.5% 25%),
    linear-gradient(#2f9b61, #227e50);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.58),
    0 10px 24px rgba(25, 105, 68, 0.16);
}

.football-pitch::before {
  content: "";
  position: absolute;
  inset: 4%;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.pitch-line.center-line {
  position: absolute;
  top: 50%;
  right: 4%;
  left: 4%;
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
}

.pitch-circle {
  position: absolute;
  top: calc(50% - 42px);
  left: calc(50% - 42px);
  width: 84px;
  height: 84px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
}

.penalty-box {
  position: absolute;
  left: 27%;
  width: 46%;
  height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.penalty-top {
  top: 4%;
  border-top: 0;
}

.penalty-bottom {
  bottom: 4%;
  border-bottom: 0;
}

.pitch-player {
  display: grid;
  position: absolute;
  z-index: 2;
  width: 62px;
  min-height: 42px;
  padding: 4px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, var(--club-color, #245f78), #10283b);
  box-shadow: 0 5px 12px rgba(7, 38, 26, 0.28);
  text-align: center;
  transform: translate(-50%, -50%);
  cursor: grab;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  touch-action: manipulation;
}

.pitch-player.dragging,
.pitch-player.drag-selected {
  border-color: #f7d95b;
  box-shadow: 0 0 0 4px rgba(247, 217, 91, 0.28), 0 9px 20px rgba(7, 38, 26, 0.34);
}

.pitch-player.drop-ready {
  transform: translate(-50%, -50%) scale(1.12);
  border-color: #8ff2c9;
}

.squad-player-row {
  cursor: grab;
}

.squad-player-row.lineup-member {
  border-color: rgba(31, 168, 117, 0.48);
  background: rgba(31, 168, 117, 0.08);
}

.squad-player-row.drag-selected {
  border-color: #e1bd3f;
  box-shadow: 0 0 0 3px rgba(225, 189, 63, 0.18);
}

.pitch-player b {
  display: grid;
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  color: #6c4b0d;
  background: #f0c84b;
  font-size: 8px;
}

.pitch-player span {
  overflow: hidden;
  width: 100%;
  font-size: 8px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pitch-player small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 6px;
}

.competition-grid {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.competition-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.competition-card b,
.competition-card span {
  display: block;
}

.competition-card b {
  font-size: 9px;
}

.competition-card span {
  color: var(--muted);
  font-size: 7px;
}

.competition-card button,
.competition-card strong {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.competition-card button {
  padding: 8px 9px;
  border: 0;
  border-radius: 9px;
  color: white;
  background: var(--mint-dark);
  font-size: 7px;
  font-weight: 900;
}

.competition-card.muted {
  opacity: 0.7;
}

.league-table {
  display: grid;
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.league-table-row {
  display: grid;
  grid-template-columns: 22px minmax(120px, 1fr) repeat(6, 28px);
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 8px;
}

.league-table-row:last-child {
  border-bottom: 0;
}

.league-table-row > span {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.league-table-row > span strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-table-row i {
  display: grid;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  color: white;
  font-size: 6px;
  font-style: normal;
}

.league-table-row em {
  color: var(--muted);
  font-style: normal;
  text-align: center;
}

.league-table-row > b,
.league-table-row > strong {
  text-align: center;
}

.league-table-row.is-player {
  background: rgba(31, 168, 117, 0.11);
}

.league-table-head {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 7px;
  font-weight: 900;
}

.league-table.compact .league-table-row {
  grid-template-columns: 20px minmax(120px, 1fr) 26px 30px 30px;
}

.profile-hero {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, #ffffff, #e8f7f1);
}

.profile-avatar {
  display: grid;
  position: relative;
  width: 88px;
  height: 104px;
  place-items: center;
  overflow: hidden;
  border: 4px solid white;
  border-radius: 30px;
  color: #17344a;
  background: linear-gradient(160deg, #efc7a6, #c58c68);
  box-shadow: 0 12px 30px rgba(16, 40, 59, 0.16);
}

.profile-avatar span {
  font-size: 54px;
  transform: translateY(-8px);
}

.profile-avatar i {
  position: absolute;
  bottom: 20px;
  font-size: 28px;
  font-style: normal;
}

.profile-hero h2 {
  margin: 4px 0;
  font-size: 18px;
}

.profile-hero p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.profile-tabs {
  margin-bottom: 10px;
}

.profile-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.profile-option-card {
  display: grid;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--navy);
  background: white;
  text-align: left;
}

.profile-option-card .asset-visual {
  width: 100%;
  height: 105px;
  border: 0;
  border-radius: 0;
}

.profile-option-card > span {
  display: grid;
  gap: 3px;
  padding: 9px 9px 4px;
}

.profile-option-card strong {
  font-size: 8px;
}

.profile-option-card small {
  color: var(--muted);
  font-size: 6px;
  line-height: 1.4;
}

.profile-option-card > b {
  margin: 5px 9px 9px;
  padding: 7px;
  border-radius: 9px;
  color: var(--mint-dark);
  background: #eaf8f3;
  font-size: 7px;
  text-align: center;
}

.profile-option-card.selected {
  border-color: var(--mint);
  box-shadow: 0 0 0 2px rgba(56, 201, 141, 0.18);
}

.city-news-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.city-news-line {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.city-news-line:active,
.city-news-line:hover {
  border-color: var(--line);
  background: #f6fbfa;
}

.city-news-line b {
  font-size: 8px;
}

.city-news-line span {
  color: var(--muted);
  font-size: 7px;
  line-height: 1.4;
}

.news-stack {
  display: grid;
  gap: 7px;
}

.comm-section.hidden {
  display: none;
}

.communication-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 6px 0 10px;
  background: linear-gradient(90deg, #eef8f6 0 90%, rgba(238, 248, 246, 0));
  scrollbar-width: thin;
}

.communication-tabs small {
  display: block;
  margin-top: 2px;
  font-size: 6px;
  opacity: 0.72;
}

.category-tabs,
.profile-tabs {
  position: relative;
}

.category-tabs::after,
.profile-tabs::after {
  content: "↔";
  position: sticky;
  right: 0;
  margin-left: auto;
  padding: 0 5px;
  color: var(--muted);
  background: linear-gradient(90deg, transparent, var(--panel));
  font-size: 10px;
  pointer-events: none;
}

.club-kpis div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.club-kpis small,
.club-kpis strong {
  display: block;
}

.club-kpis small {
  color: var(--muted);
  font-size: 7px;
}

.club-kpis strong {
  margin-top: 4px;
  font-size: 11px;
}

.team-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
}

.team-row + .team-row {
  border-top: 1px solid var(--line);
}

.mini-badge {
  display: grid;
  width: 31px;
  height: 35px;
  place-items: center;
  border-radius: 8px 8px 12px 12px;
  color: white;
  font-size: 7px;
  font-weight: 950;
}

.team-row strong,
.team-row span {
  display: block;
}

.team-row strong {
  font-size: 9px;
}

.team-row span {
  color: var(--muted);
  font-size: 7px;
}

.team-row b {
  font-size: 9px;
}

.modal-backdrop {
  display: flex;
  position: fixed;
  z-index: 100;
  inset: 0;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  visibility: hidden;
  opacity: 0;
  background: rgba(10, 31, 43, 0.53);
  backdrop-filter: blur(7px);
  transition: 0.22s ease;
}

.modal-backdrop.open {
  visibility: visible;
  opacity: 1;
}

.modal-sheet {
  width: min(100%, 558px);
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  padding: 26px 18px 19px;
  border-radius: 27px;
  background: var(--bg);
  box-shadow: 0 30px 90px rgba(7, 29, 40, 0.28);
  transform: translateY(24px);
  transition: 0.22s ease;
}

.modal-backdrop.open .modal-sheet {
  transform: translateY(0);
}

.sheet-grabber {
  position: absolute;
  top: 9px;
  left: calc(50% - 22px);
  width: 44px;
  height: 4px;
  border-radius: 99px;
  background: #c7d7d4;
}

.modal-close {
  position: absolute;
  z-index: 3;
  top: 13px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: white;
  font-size: 20px;
}

.modal-hero {
  padding-right: 36px;
}

.modal-hero h2 {
  margin: 5px 0 6px;
  font-size: 23px;
  letter-spacing: -0.04em;
}

.modal-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.modal-art {
  height: 165px;
  margin: 13px 0;
  border: 1px solid var(--line);
  border-radius: 19px;
  background-color: white;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 13px 0;
}

.stat-grid div {
  min-width: 0;
  padding: 11px 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.stat-grid small,
.stat-grid strong {
  display: block;
}

.stat-grid small {
  color: var(--muted);
  font-size: 7px;
}

.stat-grid strong {
  overflow: hidden;
  margin-top: 3px;
  font-size: 9px;
  text-overflow: ellipsis;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin: 12px 0;
}

.form-grid label,
.form-field {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.form-grid label span,
.form-field span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
}

.form-grid input,
.form-grid select,
.form-field input,
.form-field select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--navy);
  background: transparent;
  font-size: 11px;
  font-weight: 850;
}

.modal-section-title {
  margin: 18px 0 8px;
  font-size: 11px;
}

.choice-list {
  display: grid;
  gap: 7px;
}

.choice-card {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--navy);
  background: white;
  text-align: left;
}

.choice-card.selected {
  border-color: var(--mint);
  box-shadow: 0 0 0 2px rgba(56, 201, 141, 0.11);
}

.choice-card strong,
.choice-card span {
  display: block;
}

.choice-card strong {
  font-size: 9px;
}

.choice-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.choice-card b {
  align-self: center;
  color: var(--mint-dark);
  font-size: 8px;
}

.trade-preview {
  padding: 12px;
  border: 1px solid #cfe1df;
  border-radius: 13px;
  background: #f8fbfa;
}

.trade-preview div {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
}

.trade-preview div + div {
  margin-top: 6px;
}

.trade-preview span {
  color: var(--muted);
}

.trade-preview strong {
  font-size: 8px;
}

.warning-box {
  margin: 10px 0;
  padding: 11px;
  border: 1px solid #efd7ab;
  border-radius: 12px;
  color: #8b6422;
  background: #fff9ec;
  font-size: 8px;
  line-height: 1.45;
}

.bank-ledger {
  overflow: hidden;
  margin: 9px 0 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}

.bank-ledger div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  font-size: 8px;
}

.bank-ledger div + div {
  border-top: 1px solid var(--line);
}

.bank-ledger span {
  color: var(--muted);
}

.bank-ledger strong {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.bank-ledger-total {
  background: #f3faf7;
}

.bank-ledger-total span,
.bank-ledger-total strong {
  font-weight: 950;
}

.ledger-positive {
  color: var(--mint-dark);
}

.ledger-negative {
  color: var(--coral);
}

.toast {
  position: fixed;
  z-index: 200;
  right: 50%;
  bottom: calc(85px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100% - 32px);
  padding: 11px 14px;
  border-radius: 13px;
  color: white;
  background: rgba(16, 40, 59, 0.95);
  box-shadow: 0 14px 35px rgba(16, 40, 59, 0.25);
  font-size: 9px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 12px);
  transition: 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(50%, 0);
}

.bottom-nav {
  display: grid;
  position: fixed;
  z-index: 50;
  right: 50%;
  bottom: 0;
  width: min(100%, 590px);
  padding: 9px 8px calc(9px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 -12px 35px rgba(16, 40, 59, 0.08);
  backdrop-filter: blur(20px);
  transform: translateX(50%);
}

.bottom-nav button {
  display: grid;
  gap: 3px;
  place-items: center;
  border: 0;
  color: #91a2aa;
  background: transparent;
}

.bottom-nav button span {
  font-size: 17px;
  line-height: 1;
}

.bottom-nav button b {
  font-size: 6px;
}

.bottom-nav button.active {
  color: var(--mint-dark);
}

.pmc-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #eef8f4);
}

.pmc-card h3 {
  margin: 2px 0 5px;
  font-size: 13px;
}

.pmc-card p {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.pmc-card small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.pmc-dominance {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef715f, #f1c85b, #1fa875);
}

.pmc-dominance span {
  display: block;
  width: 0;
  height: 100%;
  border-right: 3px solid white;
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 0 0 1px rgba(18, 38, 56, 0.08) inset;
}

.pmc-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 8px;
}

.pmc-meta b {
  color: var(--navy);
}

.pmc-meta em {
  font-style: normal;
}

.pmc-offer .asset-icon {
  background: linear-gradient(135deg, #1b3142, #1fa875);
}

@media (min-width: 720px) {
  .app-shell {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(16, 40, 59, 0.08);
    border-radius: 32px;
    background: rgba(238, 245, 244, 0.85);
    box-shadow: 0 35px 110px rgba(16, 40, 59, 0.16);
  }

  .bottom-nav {
    bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 0 0 32px 32px;
  }
}

@media (max-width: 370px) {
  .app-shell {
    padding-right: 11px;
    padding-left: 11px;
  }

  .empire-hero {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .hero-copy {
    padding-left: 15px;
  }

  .business-card {
    grid-template-columns: 78px 1fr;
  }
}

@media (max-width: 430px) {
  .header-actions {
    gap: 5px;
  }

  .round-button {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    font-size: 13px;
  }
}

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