:root {
  --nbc-bg: #F5F1E8;
  --nbc-panel: #EFE7DA;
  --nbc-panel-2: #E9E0D2;
  --nbc-text: #111111;
  --nbc-muted: #475569;
  --nbc-border: #D6CABB;
  --nbc-orange: #F97316;
  --nbc-orange-dark: #EA580C;
  --nbc-white: #fffaf1;
}
.nbc-games-app, .nbc-games-app * { box-sizing: border-box; }
.nbc-games-app {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--nbc-text);
  background: var(--nbc-bg);
  border: 1px solid var(--nbc-border);
  border-radius: 28px;
  padding: clamp(18px, 3vw, 34px);
  max-width: 1220px;
  margin: 32px auto;
  overflow: hidden;
}
.nbc-games-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: stretch; margin-bottom: 22px; }
.nbc-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--nbc-orange-dark); font-weight: 900; margin: 0 0 8px; }
.nbc-games-hero h1, .nbc-game-header h2 { margin: 0; letter-spacing: -.045em; line-height: 1; }
.nbc-games-hero h1 { font-size: clamp(42px, 7vw, 84px); max-width: 850px; }
.nbc-games-hero p, .nbc-game-header p { color: var(--nbc-muted); line-height: 1.55; max-width: 780px; }
.nbc-score-card, .nbc-stats, .nbc-catalog, .nbc-lot-wrap {
  background: var(--nbc-panel); border: 1px solid var(--nbc-border); border-radius: 24px; box-shadow: 0 18px 40px rgba(17,17,17,.06);
}
.nbc-score-card { padding: 22px; display: flex; flex-direction: column; justify-content: center; }
.nbc-score-card span, .nbc-score-card small { color: var(--nbc-muted); }
.nbc-score-card strong { font-size: 23px; line-height: 1.1; margin: 8px 0 10px; }
.nbc-game-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.nbc-game-tabs button, .nbc-btn, .nbc-catalog-card, .nbc-game-actions select {
  border: 1px solid var(--nbc-border); background: var(--nbc-white); color: var(--nbc-text); border-radius: 999px; padding: 12px 16px; font-weight: 900; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; line-height: 1.1;
}
.nbc-game-tabs button.active, .nbc-primary, .nbc-catalog-card.active { background: var(--nbc-orange); color: #fff; border-color: var(--nbc-orange-dark); }
.nbc-btn:hover, .nbc-game-tabs button:hover, .nbc-catalog-card:hover { transform: translateY(-1px); }
.nbc-game-panel { display: none; }
.nbc-game-panel.active { display: block; }
.nbc-game-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin: 18px 0; }
.nbc-game-header h2 { font-size: clamp(30px, 4vw, 54px); }
.nbc-game-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.nbc-empire-layout { display: grid; grid-template-columns: 290px minmax(360px, 1fr) 285px; gap: 16px; align-items: start; }
.nbc-catalog, .nbc-stats, .nbc-lot-wrap { padding: 16px; }
.nbc-catalog h3, .nbc-stats h3 { margin: 0 0 14px; font-size: 20px; }
.nbc-catalog-grid { display: grid; gap: 10px; }
.nbc-catalog-card { border-radius: 18px; text-align: left; padding: 13px; width: 100%; justify-content: flex-start; display: block; }
.nbc-catalog-card strong { display: block; }
.nbc-catalog-card span { display: block; color: var(--nbc-muted); font-size: 12px; margin-top: 4px; }
.nbc-catalog-card.active span { color: rgba(255,255,255,.82); }
.nbc-lot-toolbar { display: flex; justify-content: space-between; gap: 12px; color: var(--nbc-muted); margin-bottom: 12px; }
.nbc-lot { min-height: 540px; border-radius: 18px; border: 1px dashed var(--nbc-border); background-color: #efe2ce; background-image: linear-gradient(90deg, transparent 0 28%, rgba(71,85,105,.28) 28% 34%, transparent 34% 66%, rgba(71,85,105,.22) 66% 72%, transparent 72%), linear-gradient(transparent 0 32%, rgba(71,85,105,.25) 32% 38%, transparent 38% 70%, rgba(71,85,105,.18) 70% 75%, transparent 75%), radial-gradient(circle at 13% 18%, rgba(34,197,94,.20) 0 8%, transparent 9%), radial-gradient(circle at 80% 22%, rgba(249,115,22,.16) 0 7%, transparent 8%), linear-gradient(rgba(100,116,139,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(100,116,139,.12) 1px, transparent 1px); background-size: 100% 100%, 100% 100%, 260px 260px, 320px 320px, 42px 42px, 42px 42px; position: relative; overflow: hidden; cursor: crosshair; }
.nbc-lot:before { content: 'Click anywhere to place selected item'; position: absolute; left: 14px; bottom: 14px; color: rgba(17,17,17,.42); font-weight: 900; font-size: 12px; pointer-events: none; background: rgba(255,250,241,.74); border: 1px solid rgba(214,202,187,.8); border-radius: 999px; padding: 8px 10px; z-index: 2; }
.nbc-lot:after { content: ''; position: absolute; inset: 14px; border-radius: 16px; pointer-events: none; background: linear-gradient(90deg, transparent 0 29%, rgba(17,17,17,.10) 29% 33%, transparent 33% 66%, rgba(17,17,17,.08) 66% 70%, transparent 70%), linear-gradient(transparent 0 34%, rgba(17,17,17,.10) 34% 38%, transparent 38% 71%, rgba(17,17,17,.08) 71% 75%, transparent 75%); mix-blend-mode: multiply; opacity: .7; }
.nbc-placed-item { position: absolute; z-index: 3; border-radius: 12px; background: #d96d1d; border: 2px solid rgba(17,17,17,.75); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 900; text-align: center; padding: 6px; cursor: pointer; box-shadow: 0 8px 20px rgba(17,17,17,.15); transition: transform .15s ease, box-shadow .15s ease; }
.nbc-placed-item:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(17,17,17,.22); }
.nbc-placed-item small { font-size: 10px; opacity: .82; }
.nbc-placed-item.home { background: #EA580C; }
.nbc-placed-item.premium { background: #111111; }
.nbc-placed-item.commercial { background: #475569; }
.nbc-placed-item.small { background: #64748B; }
.nbc-placed-item.upgrade { background: #9a5a2e; }
.nbc-placed-item.income { background: #0f766e; }
.nbc-placed-item.green { background: #166534; }
.nbc-placed-item.park { background: #15803d; }
.nbc-placed-item.road { background: #333842; min-height: 24px; }
.nbc-placed-item.round { border-radius: 999px; }
.nbc-stat { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--nbc-border); }
.nbc-stat span { color: var(--nbc-muted); }
.nbc-stat strong { text-align: right; }
.nbc-meter { margin: 16px 0; font-weight: 900; }
.nbc-meter div { height: 12px; border-radius: 999px; background: var(--nbc-panel-2); overflow: hidden; margin-top: 8px; }
.nbc-meter i { display: block; height: 100%; width: 0; background: var(--nbc-orange); border-radius: inherit; transition: width .25s ease; }
.nbc-game-box, .nbc-tip { margin-top: 16px; padding: 14px; border-radius: 18px; background: var(--nbc-white); border: 1px solid var(--nbc-border); }
.nbc-game-box p { color: var(--nbc-muted); margin: 7px 0 12px; }
.nbc-achievements { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.nbc-achievements span, .nbc-achievements em { border-radius: 999px; padding: 7px 9px; background: var(--nbc-panel-2); border: 1px solid var(--nbc-border); font-size: 12px; font-weight: 900; font-style: normal; color: var(--nbc-text); }
.nbc-delivery-grid-wrap, .nbc-stack-layout { display: grid; grid-template-columns: minmax(360px, 1fr) 310px; gap: 16px; align-items: start; }
.nbc-delivery-board { display: grid; grid-template-columns: repeat(var(--cols), minmax(34px, 1fr)); gap: 6px; background: var(--nbc-panel); border: 1px solid var(--nbc-border); border-radius: 24px; padding: 14px; min-height: 540px; outline: none; }
.nbc-cell { border-radius: 12px; min-height: 46px; background: var(--nbc-white); border: 1px solid var(--nbc-border); display: grid; place-items: center; font-weight: 900; font-size: 13px; }
.nbc-road { background: #d8d1c5; position: relative; }
.nbc-road:nth-child(3n) { background: #d1cabf; }
.nbc-obstacle { background: #475569; color: #fff; }
.nbc-moving-obstacle { background: #111111; color: #fff; animation: nbcHazardPulse .6s ease-in-out infinite alternate; }
@keyframes nbcHazardPulse { from { transform: scale(.96); } to { transform: scale(1.04); } }
.nbc-goal { background: #f6b37a; color: #111; }
.nbc-truck { background: var(--nbc-orange); color: #fff; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); font-size: 21px; }
.nbc-mobile-drive { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.nbc-mobile-drive button { border: 1px solid var(--nbc-border); background: var(--nbc-white); border-radius: 14px; min-height: 46px; font-size: 20px; font-weight: 900; cursor: pointer; }
.nbc-mobile-drive button[data-drive="up"] { grid-column: 2; }
.nbc-mobile-drive button[data-drive="left"] { grid-column: 1; }
.nbc-mobile-drive button[data-drive="down"] { grid-column: 2; }
.nbc-mobile-drive button[data-drive="right"] { grid-column: 3; grid-row: 2; }
.nbc-stack-canvas { width: 100%; height: auto; min-height: 420px; background: linear-gradient(#fbf6ec, #efe7da); border: 1px solid var(--nbc-border); border-radius: 24px; touch-action: manipulation; }
.nbc-stack-side .nbc-btn { width: 100%; margin-top: 10px; }
@media (max-width: 980px) {
  .nbc-games-hero, .nbc-empire-layout, .nbc-delivery-grid-wrap, .nbc-stack-layout { grid-template-columns: 1fr; }
  .nbc-game-header { flex-direction: column; }
  .nbc-game-actions { justify-content: flex-start; }
  .nbc-lot, .nbc-delivery-board { min-height: 460px; }
}
@media (max-width: 560px) {
  .nbc-games-app { border-radius: 18px; margin: 14px auto; padding: 14px; }
  .nbc-game-tabs button, .nbc-game-actions, .nbc-game-actions select, .nbc-game-actions .nbc-btn { width: 100%; }
  .nbc-delivery-board { gap: 4px; padding: 8px; min-height: 390px; }
  .nbc-cell { min-height: 32px; font-size: 11px; border-radius: 8px; }
  .nbc-lot-toolbar { flex-direction: column; }
  .nbc-lot { min-height: 420px; }
  .nbc-placed-item { transform: scale(.86); transform-origin: top left; }
  .nbc-placed-item:hover { transform: scale(.86); }
}
