﻿
:root{
  --bg:#1e1e20;
  --panel:#36363a;
  --panel2:#2b2b2e;
  --border:#f0c84a;
  --border-rgb:240, 200, 74;
  --text:#eaeaea;
  --muted:#b8b8b8;
  --btn:#2e2e31;
  --btn2:#1f1f22;
  --btnBorder:#111;
  --accent:#294a73; /* selection blue */
  --danger:#c23b3b;
  --shadow: rgba(0,0,0,0.55);
}

*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; font-family: "Segoe UI", Arial, sans-serif; color:var(--text); background:var(--bg); }

.app{
  height:100vh;
  display:grid;
  grid-template-columns: 280px 1fr;
  gap:0;
  padding:10px;
}

.left, .right{
  background:var(--panel);
  border:1px solid var(--border);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.25) inset;
}

.left{
  padding:12px 10px;
  position:relative;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.left-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:8px;
}

.left-stats{
  font-size:14px;
  line-height:1.35;
}
.statline{ margin:0 0 2px 0; }
.left-player-profile{
  margin-top:8px;
  width:100%;
  display:grid;
  grid-template-columns:44px 1fr;
  align-items:center;
  gap:8px;
  padding:6px;
  border:1px solid rgba(var(--border-rgb),0.35);
  border-radius:8px;
  background:linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.2));
  color:var(--text);
  text-align:left;
  cursor:pointer;
}
.left-player-profile:hover{
  filter:brightness(1.06);
}
.left-player-avatar,
.left-player-avatar-fallback{
  grid-column:1;
  grid-row:1;
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid rgba(var(--border-rgb),0.55);
  background:rgba(0,0,0,0.35);
}
.left-player-avatar{
  display:none;
  object-fit:cover;
}
.left-player-avatar-fallback{
  display:grid;
  place-items:center;
  font-weight:700;
  color:var(--border);
}
.left-player-meta{
  grid-column:2;
  grid-row:1;
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.left-player-name{
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.left-player-sub{
  font-size:12px;
  color:#d8d8d8;
}
.left-player-exp-slot{
  margin-top:2px;
}
.driver-exp{
  display:grid;
  gap:4px;
}
.driver-exp-track{
  height:6px;
  border-radius:999px;
  background:rgba(56, 120, 56, 0.2);
  border:1px solid rgba(96, 180, 96, 0.25);
  overflow:hidden;
}
.driver-exp-fill{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(92, 210, 120, 0.95), rgba(145, 255, 162, 0.92));
  box-shadow:0 0 10px rgba(92, 210, 120, 0.28);
}
.driver-exp-label{
  font-size:11px;
  color:#cce7cc;
  letter-spacing:0.02em;
}
.driver-exp-compact{
  gap:0;
}
.driver-exp-compact .driver-exp-track{
  height:4px;
}

.pp-btn{
  width:44px;
  height:44px;
  background:var(--btn);
  color:var(--text);
  border:1px solid var(--btnBorder);
  border-radius:3px;
  cursor:pointer;
  box-shadow: 0 2px 0 rgba(0,0,0,0.6);
}

.car-card{
  height:190px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--panel2);
  border:1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35);
}
.car-illustration{
  width:210px;
  height:120px;
  background:
    radial-gradient(circle at 35% 40%, rgba(255,255,255,0.12), transparent 45%),
    radial-gradient(circle at 65% 60%, rgba(255,255,255,0.10), transparent 50%),
    linear-gradient(135deg, rgba(255,255,255,0.07), rgba(0,0,0,0.2));
  border-radius:18px;
  position:relative;
}
.car-illustration:before{
  content:"";
  position:absolute; left:18px; top:32px;
  width:174px; height:56px;
  border-radius:14px;
  border:2px solid rgba(255,255,255,0.18);
  transform:skewX(-10deg);
}
.car-illustration:after{
  content:"";
  position:absolute; left:24px; top:76px;
  width:58px; height:14px; border-radius:10px;
  background:rgba(192,52,52,0.65);
  box-shadow: 95px 0 0 rgba(192,52,52,0.65);
}
.car-logo-img{
  display:block;
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
}

.left-menu{
  margin-top:auto;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
  padding-top:8px;
}
.menu-btn{
  height:34px;
  background:var(--btn);
  color:var(--text);
  border:1px solid var(--btnBorder);
  border-radius:3px;
  cursor:pointer;
  box-shadow: 0 2px 0 rgba(0,0,0,0.55);
}
.menu-btn:hover{ filter:brightness(1.08); }
.menu-btn.active{ background:var(--accent); }
.menu-btn.disabled{ opacity:0.35; cursor:not-allowed; }
.menu-btn.disabled:hover{ filter:none; }
.debt-lock-sidebar-active .menu-btn.debt-locked-hidden{
  color:transparent;
  text-shadow:none;
  pointer-events:none;
  cursor:not-allowed;
}
.debt-lock-sidebar-active .menu-btn.debt-locked-hidden:hover{
  filter:none;
}

.right{
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.topbar{
  --topbar-height:58px;
  --topbar-gap:8px;
  --topbar-icon-size:34px;
  --topbar-title-size:28px;
  --topbar-title-gap:8px;
  --topbar-pill-font-size:12px;
  min-height:var(--topbar-height);
  display:grid;
  grid-template-columns:minmax(0, max-content) minmax(0, 1fr) minmax(0, max-content);
  gap:12px;
  align-items:center;
  border-bottom:1px solid var(--border);
  padding:0 10px;
  background:linear-gradient(#3a3a3e, #333337);
}
.topbar-left,
.topbar-right{
  min-width:0;
}
.topbar-left{
  display:flex;
  gap:var(--topbar-gap);
  align-items:center;
}
.top-icon{
  width:var(--topbar-icon-size);
  height:var(--topbar-icon-size);
  flex:0 0 var(--topbar-icon-size);
  border-radius:3px;
  border:1px solid rgba(0,0,0,0.65);
  background:linear-gradient(#2d2d30,#252528);
  box-shadow: 0 2px 0 rgba(0,0,0,0.55);
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
}
.top-icon-btn{
  padding:0;
  appearance:none;
}
.top-icon[data-nav]{
  cursor:pointer;
}
.top-icon[data-nav]:hover{
  filter:brightness(1.1);
}
.top-icon.glow::after{
  content:"";
  width:clamp(8px, calc(var(--topbar-icon-size) * 0.3), 10px);
  height:clamp(8px, calc(var(--topbar-icon-size) * 0.3), 10px);
  border-radius:50%;
  background:#5aa7ff;
  box-shadow:0 0 12px #5aa7ff;
}
.top-icon.red::after{
  content:"";
  width:clamp(8px, calc(var(--topbar-icon-size) * 0.3), 10px);
  height:clamp(8px, calc(var(--topbar-icon-size) * 0.3), 10px);
  border-radius:50%;
  background:#d44;
  box-shadow:0 0 10px #d44;
}
.top-icon.q{
  color:#ddd;
  font-size:clamp(13px, calc(var(--topbar-icon-size) * 0.47), 16px);
}

.topbar-title{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:center;
  font-size:var(--topbar-title-size);
  font-weight:700;
  font-family: "Segoe Script", "Brush Script MT", "Comic Sans MS", cursive;
  letter-spacing:0.5px;
  line-height:1.12;
  white-space:nowrap;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:var(--topbar-title-gap);
  padding:4px 0;
}
.retuned-tag{
  display:inline-block;
  margin-left:0;
  white-space:nowrap;
  flex:0 0 auto;
  font-family:"Brush Script MT","Segoe Script","Comic Sans MS",cursive;
  font-weight:700;
  font-size:0.8em;
  color:#f6d76c;
  transform:rotate(-7deg);
  transform-origin:left center;
  text-shadow:0 1px 0 rgba(0,0,0,0.45);
}
.topbar-right{
  display:flex;
  justify-content:flex-end;
}
.toggle{
  display:flex;
  gap:10px;
  align-items:center;
  white-space:nowrap;
}
.toggle-pill{
  display:inline-block;
  min-width:max(40px, calc(var(--topbar-icon-size) + 6px));
  text-align:center;
  padding:clamp(2px, calc(var(--topbar-height) * 0.06), 3px) 8px;
  background:linear-gradient(#2e2e31,#232326);
  border:1px solid rgba(0,0,0,0.65);
  border-radius:10px;
  color:#cfcfcf;
  font-size:var(--topbar-pill-font-size);
}
.toggle-label{
  font-weight:700;
  line-height:1;
}

.content{
  flex:1;
  padding:10px;
  overflow:auto;
  border-bottom:1px solid var(--border);
}
.view{
  min-height:100%;
  border:1px solid var(--border);
  padding:14px;
  background:rgba(0,0,0,0.06);
}

.infobar{
  min-height:220px;
  padding:10px 14px 12px;
  border-top:1px solid rgba(0,0,0,0.35);
  background:rgba(0,0,0,0.06);
  display:grid;
  grid-template-rows:auto auto minmax(0, 1fr);
  gap:10px;
}
.right.footer-mode-full .content{
  flex:0 0 0;
  min-height:0;
  padding:0;
  border-bottom:none;
  overflow:hidden;
}
.right.footer-mode-full .view{
  min-height:0;
  border:none;
  padding:0;
  display:none;
}
.right.footer-mode-full .infobar{
  flex:1 1 0;
  min-height:0;
}
.right.footer-mode-full .footer-feed{
  min-height:0;
  max-height:none;
}
.right.footer-mode-small .infobar{
  min-height:136px;
  padding:8px 10px 10px;
  gap:8px;
}
.right.footer-mode-fit .content,
.right.footer-mode-fit .infobar{
  flex:1 1 0;
  min-height:0;
}
.right.footer-mode-fit .view{
  min-height:auto;
}
.right.footer-mode-fit .footer-feed{
  min-height:0;
  max-height:none;
}
.right.footer-mode-hidden .content{
  border-bottom:none;
}
.right.footer-mode-hidden .infobar{
  min-height:46px;
  padding:8px 10px;
  display:flex;
  align-items:center;
}
#infoText{
  font-size:14px;
  color:var(--text);
  white-space:pre-wrap;
}
.footer-help{
  font-size:13px;
  color:var(--text);
  white-space:pre-wrap;
}
.footer-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.footer-tab{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04);
  color:var(--text);
  cursor:pointer;
}
.footer-tab.active{
  border-color:rgba(var(--border-rgb),0.7);
  background:rgba(var(--border-rgb),0.14);
}
.footer-tab-count{
  min-width:18px;
  padding:1px 6px;
  border-radius:999px;
  background:rgba(0,0,0,0.28);
  text-align:center;
  font-size:12px;
}
.footer-panel{
  min-height:0;
  border:1px solid rgba(var(--border-rgb),0.28);
  border-radius:10px;
  padding:10px;
  background:rgba(0,0,0,0.18);
  display:grid;
  grid-template-rows:auto minmax(0, 1fr) auto;
  gap:10px;
}
.footer-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.footer-panel-title{
  font-size:15px;
  font-weight:700;
}
.footer-panel-tools{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-left:auto;
}
.footer-feed{
  min-height:90px;
  max-height:150px;
  overflow:auto;
  overflow-x:hidden;
  display:grid;
  gap:8px;
  align-content:start;
}
.footer-assistance{
  padding:10px 12px;
  border-radius:8px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  font-size:13px;
  line-height:1.45;
  white-space:pre-wrap;
}
.footer-entry{
  padding:6px 8px;
  border-radius:8px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
}
.footer-entry-line{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.footer-entry-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:4px;
}
.footer-entry-tools{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
  flex:0 0 auto;
}
.footer-entry-name{
  font-weight:700;
  flex:0 0 auto;
}
.footer-entry-line .footer-entry-name{
  max-width:170px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.footer-entry-name-copy,
.messages-copy-name{
  padding:0;
  border:none;
  background:transparent;
  color:inherit;
  font:inherit;
  text-align:left;
  cursor:pointer;
}
.footer-entry-name-copy:hover,
.messages-copy-name:hover{
  text-decoration:underline;
  text-underline-offset:3px;
}
.footer-entry-time{
  font-size:12px;
  color:#b8bfd0;
  white-space:nowrap;
}
.footer-entry-delete{
  min-height:0;
  padding:3px 8px;
  font-size:11px;
  line-height:1.2;
}
.footer-entry-body{
  font-size:13px;
  line-height:1.35;
  word-break:break-word;
}
.footer-entry-line .footer-entry-body{
  flex:1 1 auto;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  line-height:1.2;
}
.footer-empty,
.footer-readonly{
  padding:10px;
  border-radius:8px;
  background:rgba(255,255,255,0.03);
  font-size:13px;
  color:var(--muted);
}
.footer-compose{
  display:flex;
  align-items:stretch;
  gap:8px;
  width:100%;
}
.footer-mode-controls{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.footer-mode-label,
.footer-collapsed-label{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  letter-spacing:0.04em;
}
.footer-mode-buttons{
  display:inline-flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.footer-mode-btn{
  min-height:0;
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:var(--muted);
  cursor:pointer;
  font:inherit;
  font-size:12px;
  line-height:1.2;
}
.footer-mode-btn:hover{
  color:var(--text);
}
.footer-mode-btn.active{
  color:var(--text);
  text-decoration:underline;
  text-underline-offset:3px;
}
.footer-collapsed-bar{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.footer-scope-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.footer-scope-tab{
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04);
  color:var(--text);
  cursor:pointer;
}
.footer-scope-tab.active{
  border-color:rgba(var(--border-rgb),0.7);
  background:rgba(var(--border-rgb),0.14);
}
.footer-compose .footer-chat-input{
  flex:1 1 auto;
  width:auto;
  min-width:0;
}
.footer-compose .footer-send-btn{
  flex:0 0 auto;
  min-width:72px;
  white-space:nowrap;
}
.right.footer-mode-small .footer-panel{
  padding:8px;
  gap:8px;
}
.right.footer-mode-small .footer-panel-head{
  gap:8px;
}
.right.footer-mode-small .footer-feed{
  min-height:56px;
  max-height:96px;
  gap:6px;
}
.right.footer-mode-small .footer-entry,
.right.footer-mode-small .footer-assistance,
.right.footer-mode-small .footer-empty,
.right.footer-mode-small .footer-readonly{
  padding:8px;
}
.right.footer-mode-small .footer-compose{
  gap:6px;
}
.footer-log-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:20px;
  padding:0 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.04em;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.06);
}
.footer-log-chip.finance{
  color:#aee6ff;
}
.footer-log-chip.racing{
  color:#ffd58b;
}
.footer-log-chip.club{
  color:#f6b8ff;
}
.footer-log-chip.save{
  color:#ffe69a;
}

h2{ margin:0 0 12px 0; font-size:20px; font-weight:700; }
.small{ color:var(--muted); font-size:13px; }

.btn{
  height:32px;
  padding:0 14px;
  background:linear-gradient(#2f2f33,#242427);
  border:1px solid rgba(0,0,0,0.7);
  color:var(--text);
  border-radius:3px;
  cursor:pointer;
  box-shadow: 0 2px 0 rgba(0,0,0,0.55);
}
.btn:hover{ filter:brightness(1.1); }
.btn:active{ transform: translateY(1px); box-shadow:none; }
.btn:disabled{
  opacity:0.45;
  cursor:not-allowed;
  filter:saturate(0.35);
}
.btn:disabled:hover{
  filter:saturate(0.35);
}
.btn.primary{
  background:linear-gradient(#365f93,#27466e);
  border-color:#112540;
}
.btn.danger{ background:linear-gradient(#4a2323,#371a1a); border-color:#190b0b; }
.btn.ghost{ background:transparent; border:1px solid rgba(255,255,255,0.12); box-shadow:none; }

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 8px;
}
.table th{
  text-align:left;
  font-weight:700;
  color:#e7e7e7;
  padding:0 8px 6px 8px;
  font-size:14px;
}
.table td{
  padding:0 8px;
  vertical-align:middle;
}
.carsoul-table{
  border-spacing:0 6px;
}
.carsoul-table td:first-child{
  width:52%;
}
.carsoul-table td:nth-child(2){
  width:24%;
}
.carsoul-table td:last-child{
  width:24%;
}
.carsoul-table .btn{
  min-width:120px;
}
.carsoul-dot{
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:50%;
  margin-left:6px;
  background:#5aa7ff;
  box-shadow:0 0 10px #5aa7ff;
  vertical-align:middle;
}
.carsoul-offer-page{
  width:100%;
  min-height:70vh;
  display:grid;
  place-items:center;
  text-align:center;
}
.carsoul-offer-main{
  width:min(560px, 100%);
  margin:0 auto;
  padding:8px 6px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}
.carsoul-offer-question{
  font-size:26px;
  line-height:1.25;
  max-width:560px;
}
.carsoul-offer-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap:8px 12px;
  width:min(420px, 100%);
  margin:0 auto;
}
.carsoul-offer-grid .btn{
  height:34px;
  font-size:14px;
}
.carsoul-offer-grid .btn .carsoul-dot{
  margin-left:7px;
}
.carsoul-offer-active{
  filter:brightness(1.15);
}
.carsoul-offer-actions{
  margin-top:4px;
  display:flex;
  justify-content:center;
  width:min(420px, 100%);
}
.carsoul-offer-actions .btn{
  min-width:120px;
  height:32px;
  font-size:14px;
}
.carsoul-buy-page{
  width:min(980px, 100%);
  margin:0 auto;
  padding:6px 4px;
}
.carsoul-buy-banner{
  text-align:center;
  font-size:18px;
  font-weight:700;
  margin:4px 0 28px 0;
}
.carsoul-buy-title{
  margin:0 0 22px 0;
  text-align:center;
  font-size:36px;
  font-weight:700;
}
.carsoul-buy-layout{
  display:grid;
  grid-template-columns: 1.5fr 240px;
  gap:24px;
  align-items:start;
}
.carsoul-buy-copy{
  min-height:240px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:18px;
}
.carsoul-buy-text{
  font-size:32px;
  line-height:1.08;
}
.carsoul-buy-owned{
  font-size:34px;
  display:flex;
  align-items:center;
  gap:10px;
}
.carsoul-buy-owned .carsoul-dot{
  width:14px;
  height:14px;
  margin-left:0;
}
.carsoul-buy-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-top:22px;
}
.carsoul-buy-btn{
  width:100%;
  height:40px;
  font-size:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:500;
  letter-spacing:0.1px;
}
.carsoul-help-page{
  width:100%;
  min-height:70vh;
  display:grid;
  place-items:center;
  padding:10px 0;
}
.carsoul-help-page-dark{
  background:#050505;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:10px;
  padding:16px;
}
.carsoul-help-panel{
  width:min(860px, 100%);
  display:grid;
  gap:14px;
  padding:20px;
  border-radius:10px;
  background:linear-gradient(180deg, rgba(20,20,20,0.96), rgba(5,5,5,0.98));
  border:1px solid rgba(240,200,74,0.28);
  box-shadow:0 18px 50px rgba(0,0,0,0.35);
}
.carsoul-help-kicker{
  font-size:12px;
  font-weight:700;
  letter-spacing:0.16em;
  text-transform:uppercase;
  color:#f0c84a;
}
.carsoul-help-title{
  margin:0;
  font-size:30px;
  line-height:1.1;
}
.carsoul-help-copy{
  display:grid;
  gap:10px;
  color:#dcdcdc;
  line-height:1.5;
}
.carsoul-help-copy p{
  margin:0;
}
.carsoul-help-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.carsoul-video-panel{
  background:linear-gradient(180deg, rgba(10,10,10,0.98), rgba(0,0,0,1));
}
.carsoul-video-frame-wrap{
  aspect-ratio:16 / 9;
  width:100%;
  border-radius:10px;
  overflow:hidden;
  border:1px solid rgba(240,200,74,0.2);
  background:#000;
}
.carsoul-video-frame{
  width:100%;
  height:100%;
  min-height:320px;
  background:#000;
}
.carsoul-video-frame iframe{
  width:100%;
  height:100%;
}
.carsoul-video-empty{
  padding:18px;
  border-radius:8px;
  border:1px dashed rgba(255,255,255,0.18);
  color:#d7d7d7;
  background:rgba(255,255,255,0.03);
}
.carsoul-checkout-modal{
  width:min(560px, 94vw);
  display:grid;
  gap:14px;
  padding:20px 20px 18px;
  border-radius:16px;
  border:1px solid rgba(240,200,74,0.34);
  background:
    radial-gradient(circle at top right, rgba(90,167,255,0.18), transparent 34%),
    radial-gradient(circle at top left, rgba(240,200,74,0.16), transparent 28%),
    linear-gradient(180deg, rgba(22,22,28,0.98), rgba(7,7,11,0.98));
  box-shadow:0 18px 44px rgba(0,0,0,0.52);
}
.carsoul-checkout-kicker{
  font-size:12px;
  font-weight:700;
  letter-spacing:0.16em;
  text-transform:uppercase;
  color:#f0c84a;
}
.carsoul-checkout-hero{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:14px;
  align-items:center;
}
.carsoul-checkout-seal{
  width:68px;
  height:68px;
  border-radius:20px;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), transparent 34%),
    linear-gradient(145deg, rgba(240,200,74,0.28), rgba(90,167,255,0.22));
  border:1px solid rgba(255,255,255,0.12);
  box-shadow:inset 0 0 24px rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.26);
}
.carsoul-checkout-seal .carsoul-dot{
  width:18px;
  height:18px;
  margin:0;
}
.carsoul-checkout-copy{
  display:grid;
  gap:6px;
}
.carsoul-checkout-status{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.05);
  font-size:12px;
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
}
.carsoul-checkout-summary{
  font-size:18px;
  line-height:1.4;
  color:#f3f3f3;
}
.carsoul-checkout-reward,
.carsoul-checkout-detail,
.carsoul-checkout-note{
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.035);
}
.carsoul-checkout-reward{
  font-size:20px;
  font-weight:700;
  color:#f7f4e7;
}
.carsoul-checkout-detail,
.carsoul-checkout-note{
  line-height:1.45;
  color:#d7d7d7;
}
.carsoul-checkout-note{
  border-style:dashed;
  color:#ffd37a;
}
.carsoul-checkout-actions{
  justify-content:flex-start;
  flex-wrap:wrap;
}
.carsoul-checkout-success .carsoul-checkout-status{
  color:#9ce29c;
  border-color:rgba(156,226,156,0.24);
  background:rgba(64,124,78,0.18);
}
.carsoul-checkout-success .carsoul-checkout-seal{
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), transparent 34%),
    linear-gradient(145deg, rgba(68,161,98,0.4), rgba(90,167,255,0.22));
}
.carsoul-checkout-cancel .carsoul-checkout-status{
  color:#ffd37a;
  border-color:rgba(255,211,122,0.24);
  background:rgba(120,82,24,0.18);
}
.carsoul-checkout-cancel .carsoul-checkout-seal{
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.16), transparent 34%),
    linear-gradient(145deg, rgba(168,121,42,0.38), rgba(70,86,128,0.2));
}
.carsoul-checkout-error .carsoul-checkout-status{
  color:#ff9b9b;
  border-color:rgba(255,155,155,0.24);
  background:rgba(124,56,56,0.18);
}
.carsoul-checkout-error .carsoul-checkout-seal{
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.16), transparent 34%),
    linear-gradient(145deg, rgba(176,72,72,0.36), rgba(85,55,78,0.18));
}
.carsoul-landing{
  min-height:100vh;
  margin:0;
  padding:24px;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at top, rgba(240,200,74,0.14), transparent 32%),
    radial-gradient(circle at bottom right, rgba(90,167,255,0.16), transparent 28%),
    linear-gradient(180deg, #17181f 0%, #090a0f 100%);
}
.carsoul-landing-shell{
  width:min(760px, 100%);
  display:grid;
  gap:18px;
}
.carsoul-landing-header{
  display:grid;
  gap:8px;
  text-align:center;
  justify-items:center;
}
.carsoul-landing-title{
  margin:0;
  font-size:36px;
  line-height:1.05;
}
.carsoul-landing-subtitle{
  max-width:640px;
  color:#d7d7d7;
  line-height:1.5;
}
.carsoul-landing-panel{
  display:grid;
  gap:14px;
  padding:22px;
  border-radius:18px;
  border:1px solid rgba(240,200,74,0.18);
  background:rgba(0,0,0,0.34);
  box-shadow:0 16px 40px rgba(0,0,0,0.34);
}
.carsoul-landing-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:12px;
}
.carsoul-landing-card{
  display:grid;
  gap:10px;
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.04);
}
.carsoul-landing-card-title{
  font-size:16px;
  font-weight:700;
}
.carsoul-landing-card-copy{
  color:#d7d7d7;
  line-height:1.45;
}
.carsoul-landing-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
@media (max-width: 980px){
  .carsoul-offer-question{ font-size:18px; }
  .carsoul-offer-grid{
    grid-template-columns: 1fr;
    max-width:280px;
  }
  .carsoul-offer-grid .btn{ font-size:14px; height:32px; }
  .carsoul-offer-actions .btn{ font-size:14px; height:32px; }
  .carsoul-buy-banner{ font-size:15px; margin-bottom:18px; }
  .carsoul-buy-title{ font-size:26px; margin-bottom:14px; }
  .carsoul-buy-layout{
    grid-template-columns: 1fr;
    gap:14px;
  }
  .carsoul-buy-copy{
    min-height:0;
    gap:10px;
  }
  .carsoul-buy-text{ font-size:20px; }
  .carsoul-buy-owned{ font-size:24px; }
  .carsoul-buy-btn{ font-size:16px; height:34px; }
  .carsoul-help-panel{
    padding:16px;
  }
  .carsoul-help-title{
    font-size:24px;
  }
  .carsoul-video-frame{
    min-height:220px;
  }
  .carsoul-checkout-modal{
    padding:18px 16px 16px;
  }
  .carsoul-checkout-hero{
    grid-template-columns:1fr;
  }
  .carsoul-checkout-seal{
    width:60px;
    height:60px;
  }
  .carsoul-checkout-summary{
    font-size:16px;
  }
  .carsoul-landing{
    padding:16px;
  }
  .carsoul-landing-title{
    font-size:28px;
  }
  .carsoul-landing-panel{
    padding:18px 16px;
  }
}
.rowbox{
  height:30px;
  background:rgba(0,0,0,0.22);
  border:1px solid rgba(0,0,0,0.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius:3px;
  display:flex;
  align-items:center;
  padding:0 10px;
}
.rowbox.rowbox-progress{
  position:relative;
  overflow:hidden;
}
.rowbox-progress-fill{
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:0%;
  background:linear-gradient(90deg, rgba(var(--border-rgb),0.62), rgba(255,224,120,0.78));
  pointer-events:none;
}
.rowbox-progress-fill.paused{
  background:linear-gradient(90deg, rgba(143,148,160,0.58), rgba(168,174,189,0.75));
}
.building-progress-fill{
  background:linear-gradient(90deg, rgba(146,27,27,0.84), rgba(226,84,84,0.92));
}
.building-capacity-fill{
  background:linear-gradient(90deg, rgba(60,130,190,0.34), rgba(120,205,255,0.52));
}
.building-warehouse-fill{
  background:linear-gradient(90deg, rgba(58,150,94,0.34), rgba(129,224,164,0.52));
}
.building-car-storage-fill{
  background:linear-gradient(90deg, rgba(176,122,46,0.34), rgba(235,195,103,0.52));
}
.rowbox-progress-label{
  position:relative;
  z-index:1;
}
.building-progress-label{
  display:block;
  width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.research-progress-label{
  display:block;
  width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.research-progress-fill{
  background:linear-gradient(90deg, rgba(24,94,48,0.82), rgba(142,224,168,0.9));
}

.input{
  height:30px;
  width:70px;
  background:rgba(0,0,0,0.35);
  border:1px solid rgba(0,0,0,0.65);
  border-radius:3px;
  color:var(--text);
  padding:0 8px;
  outline:none;
}

.settings-theme-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(220px, 1fr));
  gap:12px;
  max-width:700px;
}
.settings-actions-layout{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
  gap:14px;
  align-items:start;
}
.settings-actions-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.settings-log-panel{
  display:grid;
  gap:10px;
  align-content:start;
}
.settings-color-card{
  display:grid;
  gap:8px;
  padding:12px;
  border:1px solid rgba(var(--border-rgb),0.35);
  border-radius:8px;
  background:rgba(0,0,0,0.18);
}
.settings-color-label{
  font-size:14px;
  font-weight:600;
  color:#efefef;
}
.settings-color-control{
  display:flex;
  align-items:center;
  gap:10px;
}
.settings-color-input{
  width:48px;
  height:32px;
  padding:0;
  border:1px solid rgba(var(--border-rgb),0.55);
  border-radius:6px;
  background:transparent;
  cursor:pointer;
}
.settings-color-input::-webkit-color-swatch-wrapper{
  padding:3px;
}
.settings-color-input::-webkit-color-swatch{
  border:none;
  border-radius:4px;
}
.settings-color-input::-moz-color-swatch{
  border:none;
  border-radius:4px;
}
.settings-color-value{
  font-family:Consolas, monospace;
  font-size:12px;
  color:var(--muted);
  letter-spacing:0.04em;
}
@media (max-width: 620px){
  .settings-theme-grid{
    grid-template-columns:1fr;
  }
  .settings-actions-grid,
  .settings-log-grid{
    grid-template-columns:1fr;
  }
}
@media (max-width: 980px){
  .settings-actions-layout{
    grid-template-columns:1fr;
  }
}

.tabs2{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:8px 0 12px 0;
}
.tab2{
  height:28px;
  padding:0 14px;
  border-radius:3px;
  background:rgba(0,0,0,0.22);
  border:1px solid rgba(0,0,0,0.65);
  color:#ddd;
  cursor:pointer;
}
.tab2.active{ background:rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); }

.scrollbar{
  max-height: 340px;
  overflow:auto;
  padding-right:8px;
}
.scrollbar::-webkit-scrollbar{ width:10px; }
.scrollbar::-webkit-scrollbar-track{ background:rgba(0,0,0,0.18); border-radius:10px; }
.scrollbar::-webkit-scrollbar-thumb{ background:rgba(var(--border-rgb),0.85); border-radius:10px; }

.research-view{
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.research-scroll{
  max-height:none;
  flex:1;
  min-height:0;
}

.progress{
  height:10px;
  background:rgba(0,0,0,0.25);
  border:1px solid rgba(0,0,0,0.65);
  border-radius:999px;
  overflow:hidden;
}
.progress > div{
  height:100%;
  width:0%;
  background:rgba(var(--border-rgb),0.9);
}
.progress > .prod-progress-fill,
.progress > .prod-card-parts-progress-fill,
.progress > .prod-card-assembly-progress-fill{
  width:100%;
  transform-origin:left center;
  transform:scaleX(0);
  will-change:transform;
}
.progress.paused > div{
  background:rgba(143,148,160,0.9);
}

.badge{
  padding:2px 8px;
  border-radius:999px;
  background:rgba(0,0,0,0.25);
  border:1px solid rgba(255,255,255,0.1);
  font-size:12px;
  color:#ddd;
}
.badge.red{ color:#ff8b8b; }

.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.55);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:50;
}
.modal-backdrop.show{ display:flex; }
.modal-backdrop.debt-lock-backdrop{
  inset:10px 10px 10px 290px;
}
.modal{
  width:min(520px, 92vw);
  background:var(--panel);
  border:1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0,0,0,0.65);
  padding:16px;
}
.app.debt-lock-modal-active .right > .topbar,
.app.debt-lock-modal-active .right > .content,
.app.debt-lock-modal-active .right > .infobar{
  visibility:hidden;
  pointer-events:none;
}
.app.debt-lock-modal-active .left-top,
.app.debt-lock-modal-active .car-card{
  visibility:hidden;
  pointer-events:none;
}
.debt-lock-modal{
  width:min(560px, 94vw);
  text-align:left;
  border-color:rgba(194,59,59,0.9);
  box-shadow:0 18px 42px rgba(0,0,0,0.72);
}
.debt-lock-kicker{
  font-size:11px;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:#ff8b8b;
  margin-bottom:6px;
}
.debt-lock-grid{
  margin-top:12px;
}
.debt-lock-note{
  margin-top:12px;
  line-height:1.5;
}
.debt-lock-actions{
  justify-content:space-between;
  flex-wrap:wrap;
}
.design-modal{
  width:min(860px, 96vw);
}
.modal h3{ margin:0 0 10px 0; }
.modal .actions{ display:flex; gap:12px; justify-content:center; margin-top:14px; }
.part-info-modal{
  width:min(900px, 96vw);
}
.part-info-layout{
  display:grid;
  grid-template-columns:minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap:18px;
  align-items:start;
  margin-top:12px;
}
.part-info-art-card,
.part-info-summary-panel{
  border:1px solid rgba(var(--border-rgb), 0.55);
  background:linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.03);
}
.part-info-art-card{
  padding:12px;
}
.part-info-art-stage{
  --part-art-accent: 122, 169, 207;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:250px;
  padding:10px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:14px;
  overflow:hidden;
  background:
    radial-gradient(circle at 22% 18%, rgba(255,255,255,0.16), transparent 28%),
    linear-gradient(150deg, rgba(var(--part-art-accent), 0.18), rgba(8,11,15,0.04) 38%),
    linear-gradient(180deg, #2b3137, #161b20 62%, #090c10);
}
.part-info-art-stage::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size:28px 28px;
  opacity:0.4;
}
.part-info-art-stage::after{
  content:"";
  position:absolute;
  left:10%;
  right:10%;
  bottom:10px;
  height:42px;
  background:radial-gradient(ellipse at center, rgba(var(--part-art-accent), 0.22), transparent 72%);
  filter:blur(20px);
}
.part-info-art-stage--chassis{ --part-art-accent: 126, 166, 189; }
.part-info-art-stage--tires{ --part-art-accent: 217, 165, 107; }
.part-info-art-stage--brakes{ --part-art-accent: 224, 101, 82; }
.part-info-art-stage--engine{ --part-art-accent: 198, 106, 69; }
.part-info-art-stage--electronics{ --part-art-accent: 82, 200, 173; }
.part-info-art-stage--cooler{ --part-art-accent: 121, 184, 216; }
.part-info-art-stage--tank{ --part-art-accent: 208, 163, 111; }
.part-info-art-stage--body{ --part-art-accent: 122, 169, 207; }
.part-info-art-svg{
  max-width:100%;
  max-height:100%;
  position:relative;
  z-index:1;
  display:block;
  width:100%;
  height:auto;
}
.part-info-art-caption{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
  color:var(--muted);
}
.part-info-art-caption-title{
  color:var(--text);
}
.part-info-art-caption-subtitle{
  text-align:right;
}
.part-info-summary-panel{
  padding:14px 16px;
}
.part-info-kicker{
  margin-bottom:8px;
  color:#d6c37a;
  letter-spacing:0.12em;
  text-transform:uppercase;
}
.part-info-summary-grid,
.part-info-stats-grid{
  display:grid;
  grid-template-columns:1fr auto;
  column-gap:12px;
  row-gap:6px;
}
.part-info-summary-grid{
  font-variant-numeric:tabular-nums;
}
.part-info-summary-note{
  margin-top:12px;
  line-height:1.45;
  color:var(--muted);
}
.part-info-stats-grid{
  margin-top:14px;
}
.part-info-footnote{
  margin-top:12px;
  color:var(--muted);
}
@media (max-width: 760px){
  .part-info-layout{
    grid-template-columns:1fr;
  }
  .part-info-art-caption{
    align-items:flex-start;
    flex-direction:column;
  }
  .part-info-art-caption-subtitle{
    text-align:left;
  }
}
.finance-breakdown-modal{
  width:min(920px, 96vw);
}
.finance-breakdown-table{
  border-spacing:0 6px;
  margin-top:8px;
}
.finance-breakdown-table th{
  text-align:left;
}
.finance-breakdown-table td:nth-child(2),
.finance-breakdown-table td:nth-child(3){
  text-align:right;
  font-variant-numeric: tabular-nums;
}
.finance-total-row td{
  border-top:1px solid rgba(255,255,255,0.12);
  padding-top:6px;
}
.finance-net-row td{
  border-top:1px solid rgba(var(--border-rgb),0.45);
  padding-top:8px;
}
.finance-modal-pin-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:10px;
}
.finance-modal-countdown{
  margin-top:8px;
  color:#e7d58d;
}
.finance-view{
  gap:14px;
}
.finance-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
}
.finance-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.finance-toolbar-btn.active{
  background:linear-gradient(180deg, rgba(var(--border-rgb),0.36), rgba(0,0,0,0.24));
  border-color:rgba(var(--border-rgb),0.72);
}
.finance-summary-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}
.finance-summary-card{
  display:grid;
  gap:6px;
  padding:14px;
  border:1px solid rgba(var(--border-rgb),0.32);
  border-radius:10px;
  background:linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.18));
}
.finance-summary-alert{
  border-color:rgba(194,59,59,0.6);
  box-shadow:inset 0 0 0 1px rgba(194,59,59,0.18);
}
.finance-summary-bank{
  border-color:rgba(var(--border-rgb),0.58);
}
.finance-summary-label{
  font-size:12px;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:#d5d5d5;
}
.finance-summary-value{
  font-size:28px;
  font-weight:700;
}
.finance-panel{
  border:1px solid rgba(var(--border-rgb),0.3);
  border-radius:12px;
  padding:14px;
  background:rgba(0,0,0,0.16);
  display:grid;
  gap:12px;
}
.finance-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
}
.finance-panel-head h3{
  margin:0 0 6px 0;
}
.finance-panel-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}
.finance-card{
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:10px;
  background:rgba(255,255,255,0.03);
}
.finance-card-title{
  font-size:16px;
  font-weight:700;
}
.finance-big-value{
  font-size:30px;
  font-weight:700;
  line-height:1;
}
.finance-risk-pill{
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  font-size:12px;
  font-weight:700;
  letter-spacing:0.04em;
  text-transform:uppercase;
}
.finance-risk-low{
  color:#abefab;
  border-color:rgba(86,168,86,0.52);
  background:rgba(31,84,39,0.35);
}
.finance-risk-mid{
  color:#ffe39a;
  border-color:rgba(212,171,72,0.56);
  background:rgba(104,78,22,0.32);
}
.finance-risk-high{
  color:#ffb1b1;
  border-color:rgba(194,59,59,0.62);
  background:rgba(95,24,24,0.34);
}
.finance-bank-pill{
  color:#f2df9c;
  border-color:rgba(var(--border-rgb),0.48);
  background:rgba(var(--border-rgb),0.12);
}
.finance-loan-progress{
  height:12px;
}
.finance-loan-progress > div{
  background:linear-gradient(90deg, rgba(var(--border-rgb),0.7), rgba(255,239,171,0.95));
}
.finance-metric-grid{
  display:grid;
  grid-template-columns:1fr auto;
  gap:6px 14px;
}
.finance-money-input{
  width:100%;
}
.finance-preset-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.finance-preset-row .btn{
  min-width:72px;
}
.finance-route-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}
.finance-route-toggle{
  display:flex;
  align-items:center;
  gap:10px;
}
.finance-route-switch{
  position:relative;
  width:62px;
  height:30px;
  display:inline-flex;
  align-items:center;
}
.finance-route-switch input{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
  z-index:2;
}
.finance-route-track{
  position:absolute;
  inset:0;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(var(--border-rgb),0.36);
  transition:background 0.18s ease, border-color 0.18s ease;
}
.finance-route-thumb{
  position:absolute;
  left:4px;
  top:4px;
  width:20px;
  height:20px;
  border-radius:50%;
  background:rgba(var(--border-rgb),0.58);
  box-shadow:0 2px 7px rgba(0,0,0,0.4);
  transition:transform 0.18s ease, background 0.18s ease;
}
.finance-route-switch input:checked ~ .finance-route-track{
  background:rgba(var(--border-rgb),0.22);
  border-color:rgba(var(--border-rgb),0.78);
}
.finance-route-switch input:checked ~ .finance-route-thumb{
  transform:translateX(30px);
  background:var(--border);
}
.finance-transfer-card{
  border-style:dashed;
  border-color:rgba(190,190,190,0.28);
}
.finance-deposit-progress{
  height:14px;
  background:rgba(180,180,180,0.12);
  border:1px solid rgba(180,180,180,0.22);
}
.finance-deposit-progress > div{
  background:linear-gradient(90deg, rgba(150,150,150,0.38), rgba(208,208,208,0.58));
}
.finance-ledger-table{
  border-spacing:0 6px;
}
.finance-ledger-table th:nth-child(n+2),
.finance-ledger-table td:nth-child(n+2){
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.building-warning-modal{
  width:min(560px, 92vw);
  border:1px solid rgba(194,59,59,0.72);
  box-shadow: 0 14px 36px rgba(0,0,0,0.72), inset 0 0 0 1px rgba(194,59,59,0.3);
}
.building-warning-icon{
  width:72px;
  height:72px;
  margin:0 auto 10px auto;
  border-radius:50%;
  border:2px solid rgba(194,59,59,0.9);
  color:#ffd3d3;
  background:radial-gradient(circle at 35% 30%, rgba(194,59,59,0.65), rgba(93,20,20,0.8));
  display:grid;
  place-items:center;
  font-size:48px;
  font-weight:800;
  line-height:1;
}
.building-warning-metrics{
  margin-top:10px;
  display:grid;
  grid-template-columns: 1fr auto;
  column-gap:14px;
  row-gap:6px;
}

.prod-cards{
  display:grid;
  gap:12px;
}
.prod-toolbar{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(280px, 420px);
  gap:14px;
  align-items:end;
}
.prod-toolbar-step-controls{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.prod-header-topline{
  display:flex;
  justify-content:flex-start;
  align-items:center;
}
.prod-toolbar-stats{
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:flex-end;
}
.prod-toolbar-stat{
  display:grid;
  gap:4px;
  padding:0;
  border:none;
  border-radius:0;
  background:none;
  text-align:right;
}
.prod-toolbar-stat-inline{
  gap:0;
}
.prod-toolbar-stat-value{
  font-size:14px;
  line-height:1.35;
}
.prod-toolbar-stat-value-inline{
  white-space:nowrap;
}
.prod-toolbar-stat-note{
  color:#9ecfff;
}
.prod-toolbar-stat-inline-bonus{
  color:#9ecfff;
}
.prod-card{
  background:rgba(0,0,0,0.22);
  border:1px solid rgba(var(--border-rgb),0.45);
  border-radius:6px;
  padding:10px;
}
.prod-card-head{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:start;
  gap:12px;
}
.prod-head-spacer{
  min-height:1px;
}
.prod-card-title{
  text-align:center;
}
.prod-card-head h2{
  margin:2px 0 0 0;
  font-size:18px;
}
.prod-card-status{
  margin-top:4px;
  color:#e5d28d;
}
.prod-card-head .btn{
  justify-self:end;
}
.prod-card-actions{
  justify-self:end;
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.prod-card-body{
  margin-top:8px;
}
.prod-card-detail-panels{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:10px;
  margin-bottom:10px;
}
.prod-card-detail-panel{
  background:linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border:1px solid rgba(255,255,255,0.14);
  border-radius:10px;
  padding:10px;
}
.prod-card-detail-grid{
  margin-top:6px;
}
.prod-card-detail-note{
  color:#d6c88f;
}
.prod-card-top-progress{
  margin-bottom:8px;
  display:grid;
  gap:4px;
}
.prod-card-top-line{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.prod-card-collapsed-workers{
  margin-top:4px;
}
.prod-mini-table{
  border-spacing:0 6px;
}
.prod-mini-table th{
  font-size:12px;
  padding:0 6px 4px 6px;
}
.prod-mini-table td{
  padding:0 6px;
}
.prod-mini-table .rowbox{
  height:24px;
  font-size:12px;
  padding:0 8px;
}
.prod-mini-btn{
  height:24px;
  min-width:26px;
  padding:0 8px;
  line-height:1;
}
@media (max-width: 980px){
  .prod-toolbar{
    grid-template-columns:1fr;
    align-items:stretch;
  }
  .prod-toolbar-stats{
    align-items:flex-start;
  }
  .prod-toolbar-stat{
    text-align:left;
  }
}
.design-compact{
  border-spacing:0 4px;
}
.design-compact th{
  font-size:12px;
  padding:0 6px 4px 6px;
}
.design-compact td{
  padding:0 6px;
}
.design-compact .rowbox{
  height:24px;
  font-size:12px;
  padding:0 8px;
}
.design-select{
  width:100%;
  min-width:220px;
}
.design-part-cards{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:10px;
}
.design-part-card{
  background:linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  border:1px solid rgba(255,255,255,0.18);
  border-radius:10px;
  padding:10px;
  display:grid;
  gap:8px;
}
.design-part-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:8px;
}
.design-part-card-actions{
  display:flex;
  gap:6px;
  align-items:center;
  flex-wrap:wrap;
}
.design-part-card-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:6px 10px;
}
.design-part-card-line{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.design-stopat-input{
  width:84px;
}
.progress.active{
  border-color:rgba(var(--border-rgb),0.95);
  box-shadow: 0 0 0 1px rgba(var(--border-rgb),0.25), 0 0 8px rgba(var(--border-rgb),0.2);
}
.progress.active > div{
  background:linear-gradient(90deg, var(--border), #ffd978);
}
.prod-progress.prod-progress-part-active{
  border-color:rgba(102, 178, 255, 0.9);
  box-shadow:0 0 0 1px rgba(102, 178, 255, 0.2), 0 0 8px rgba(102, 178, 255, 0.14);
}
.prod-progress.prod-progress-part-active > div{
  background:linear-gradient(90deg, #2d82c9, #66b2ff);
}
.prod-parts-progress{
  border-color:rgba(102, 178, 255, 0.9);
  box-shadow:0 0 0 1px rgba(102, 178, 255, 0.2), 0 0 8px rgba(102, 178, 255, 0.14);
}
.prod-parts-progress > div{
  background:linear-gradient(90deg, #2d82c9, #66b2ff);
}
.prod-card-parts-progress-label{
  color:#9ecfff;
}
.prod-card-assembly-progress-label{
  color:#e8d793;
}
.prod-part-active-label{
  color:#9ecfff;
}
.market-price-modal{
  width:min(760px, 96vw);
}
.market-price-grid{
  display:grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap:10px;
  margin-top:10px;
  align-items:start;
}
.market-price-line{
  min-height:28px;
  display:flex;
  align-items:center;
}
.market-price-input{
  width:100%;
  max-width:200px;
  text-align:center;
  margin-bottom:8px;
}
.market-price-pad{
  display:grid;
  grid-template-columns: repeat(3, 62px);
  gap:6px;
}
.market-price-toggle-btn{
  min-width:52px;
}
.market-price-toggle-btn.active{
  border-color:rgba(var(--border-rgb),0.95);
}
.market-price-max-hint{
  margin-top:12px;
  border:1px solid rgba(var(--border-rgb),0.55);
  border-radius:6px;
  padding:8px;
  font-size:12px;
  color:#f0f0f0;
  min-height:56px;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity 120ms ease;
}
.market-price-max-hint.show{
  opacity:1;
  visibility:visible;
}
.market-view{
  gap:12px;
}
.market-head-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
}
.market-step-controls{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.market-step-input{
  width:126px;
  text-align:center;
}
.market-step-controls .btn{
  min-width:66px;
}
.market-total-salesmen{
  font-size:13px;
}
.market-table{
  border-spacing:0 8px;
}
.market-table th{
  text-align:center;
}
.market-table td{
  text-align:center;
}
.market-table td:first-child{
  text-align:left;
}
.market-row-progress{
  height:32px;
}
.market-row-progress-label{
  display:block;
  width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.market-name-box{
  padding:0;
  min-height:34px;
  overflow:hidden;
}
.market-name-selected{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:140px;
  height:100%;
  padding:0 12px;
  font-size:16px;
  font-weight:700;
  color:#d9e9ff;
  background:#2f4972;
  border-right:1px solid rgba(0,0,0,0.45);
}
.market-name-fill{
  flex:1;
  height:100%;
  background:rgba(0,0,0,0.88);
}
.market-mini-btn{
  min-width:74px;
  padding:0 12px;
}
.market-price-btn{
  min-width:160px;
}
.market-meta{
  line-height:1.4;
}
.market-ad-status{
  color:#e7d58d;
}
.market-ads-modal{
  width:min(760px, 96vw);
  min-height:430px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.market-ads-intro{
  font-size:13px;
  line-height:1.35;
  color:#e7e7e7;
  max-width:680px;
}
.market-ads-active{
  border:1px solid rgba(var(--border-rgb),0.55);
  background:rgba(0,0,0,0.22);
  border-radius:4px;
  padding:8px 10px;
  font-size:13px;
  color:#f3e5b7;
}
.market-ads-active.muted{
  color:#bfbfbf;
  border-color:rgba(255,255,255,0.18);
}
.market-ads-list{
  display:grid;
  gap:10px;
  margin-top:2px;
}
.market-ads-row{
  display:grid;
  grid-template-columns:minmax(220px, 1fr) 220px;
  gap:14px;
  align-items:center;
}
.market-ads-name{
  font-size:14px;
  color:#efefef;
}
.market-ads-buy-btn{
  width:100%;
}
.market-ads-buy-btn.active{
  border-color:rgba(var(--border-rgb),0.95);
}
.market-ads-footer{
  margin-top:auto;
  display:flex;
  justify-content:flex-end;
}
@media (max-width: 820px){
  .market-step-controls{
    justify-content:flex-start;
  }
  .market-total-salesmen{
    font-size:13px;
  }
  .market-ads-row{
    grid-template-columns:1fr;
  }
  .market-ads-buy-btn{
    width:100%;
  }
}

.racing-shell{
  display:grid;
  gap:14px;
}
.racing-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  padding:8px;
  border:1px solid rgba(var(--border-rgb),0.28);
  border-radius:8px;
  background:rgba(0,0,0,0.18);
}
.racing-tabs .btn{
  min-width:150px;
}
.racing-tabs .btn.active{
  border-color:rgba(var(--border-rgb),0.78);
  background:linear-gradient(180deg, rgba(var(--border-rgb),0.24), rgba(30,30,30,0.7));
  color:#fff4cf;
}
.racing-pro-grid{
  display:grid;
  grid-template-columns:minmax(300px, 0.9fr) minmax(380px, 1.3fr);
  gap:14px;
  align-items:start;
}
.racing-column{
  display:grid;
  gap:12px;
}
.racing-section{
  background:linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.24));
  border:1px solid rgba(var(--border-rgb),0.3);
  border-radius:8px;
  padding:12px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
}
.racing-section h3{
  margin:0 0 8px 0;
  font-size:17px;
}
.racing-inline-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.racing-join-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin-top:8px;
}
.racing-code-input{
  width:150px;
  text-transform:uppercase;
}
.racing-select{
  width:180px;
}
.racing-countdown{
  margin-top:10px;
  color:#f6d76c;
  font-size:14px;
}
.racing-status-row{
  margin-top:8px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.racing-status-pill{
  display:inline-flex;
  align-items:center;
  gap:5px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  padding:4px 9px;
  font-size:12px;
  background:rgba(0,0,0,0.2);
}
.racing-status-pill.live{
  border-color:rgba(84,220,145,0.55);
  color:#abf4c7;
}
.racing-status-pill.countdown{
  border-color:rgba(255,210,120,0.55);
  color:#ffe8a8;
}
.racing-status-pill.finished{
  border-color:rgba(150,170,255,0.5);
  color:#d4ddff;
}
.racing-minimized-bar{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  background:rgba(0,0,0,0.22);
  border:1px solid rgba(var(--border-rgb),0.35);
  border-radius:6px;
  padding:10px;
}
.racing-table{
  margin-top:4px;
}
.racing-avatar,
.racing-avatar-fallback{
  width:36px;
  height:36px;
  border-radius:999px;
  border:1px solid rgba(var(--border-rgb),0.35);
  background:rgba(0,0,0,0.35);
}
.racing-avatar{
  display:block;
  object-fit:cover;
}
.racing-avatar-fallback{
  display:grid;
  place-items:center;
  font-weight:700;
  color:var(--border);
}
.racing-name{
  font-weight:700;
}
.racing-score-pill{
  display:inline-block;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.1);
  padding:3px 8px;
  font-size:12px;
}
.racing-score-above{
  color:#ffb4b4;
  border-color:rgba(255,120,120,0.45);
}
.racing-score-below{
  color:#bde6b9;
  border-color:rgba(120,255,120,0.3);
}
.racing-score-equal{
  color:#d8d8d8;
}
.racing-offline-list{
  display:grid;
  gap:8px;
  margin-top:8px;
}
.racing-offline-overview{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:14px;
  align-items:start;
}
.racing-offline-item{
  border:1px solid rgba(255,255,255,0.1);
  border-radius:6px;
  background:rgba(0,0,0,0.18);
  padding:8px;
}
.racing-offline-item b{
  color:#f5dda0;
}
.racing-summary-notes{
  display:grid;
  gap:6px;
  margin-top:10px;
}
.racing-table-wrap{
  overflow-x:auto;
}
.racing-track-preview-panel{
  display:grid;
  gap:10px;
}
.racing-track-preview-top{
  display:grid;
  grid-template-columns:minmax(220px, 0.9fr) minmax(240px, 1.1fr);
  gap:12px;
  align-items:start;
}
.racing-track-preview-copy{
  display:grid;
  gap:8px;
  align-content:start;
}
.racing-track-preview-title{
  font-size:22px;
  font-weight:700;
  color:#fff0c6;
}
.racing-track-preview-stat-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}
.racing-track-preview-stat{
  display:grid;
  gap:4px;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,0.1);
  border-radius:8px;
  background:rgba(0,0,0,0.2);
}
.racing-track-preview-stat b{
  color:#f7e09d;
}
.racing-track-preview-shell{
  border:1px solid rgba(var(--border-rgb),0.28);
  border-radius:10px;
  overflow:hidden;
  background:radial-gradient(circle at 18% 15%, rgba(255,255,255,0.07), rgba(255,255,255,0) 36%), #101114;
}
.racing-track-preview-svg{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:16/10;
}
.racing-track-preview-bg{
  fill:#11141b;
}
.racing-track-preview-track{
  fill:none;
  stroke:rgba(255,255,255,0.16);
  stroke-width:34;
  stroke-linejoin:round;
  stroke-linecap:round;
  opacity:0.75;
}
.racing-track-preview-track-core{
  fill:none;
  stroke:var(--track-accent);
  stroke-width:20;
  stroke-linejoin:round;
  stroke-linecap:round;
}
.racing-track-preview-start{
  stroke:#f4f4f4;
  stroke-width:3;
  stroke-linecap:round;
}
.racing-track-preview-apex{
  fill:var(--track-accent);
  fill-opacity:0.92;
  stroke:rgba(255,255,255,0.5);
  stroke-width:2;
}
.racing-track-preview-race-list{
  display:grid;
  gap:8px;
}
.racing-track-preview-race{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:8px;
  background:rgba(0,0,0,0.16);
}
.racing-track-preview-race b{
  margin-right:6px;
  color:#f5dda0;
}
.racing-result-card{
  background:rgba(0,0,0,0.2);
  border:1px solid rgba(var(--border-rgb),0.4);
  border-radius:6px;
  padding:10px;
}
.racing-result-card h3{
  margin:0 0 8px 0;
  font-size:17px;
}
.racing-live-screen{
  min-height:72vh;
}
.racing-live-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.racing-live-layout{
  display:grid;
  grid-template-columns:minmax(560px, 1.35fr) minmax(300px, 0.65fr);
  gap:12px;
  align-items:start;
}
.racing-live-map .racing-minimap-card{
  min-height:calc(72vh - 120px);
}
.racing-live-map .racing-minimap-wrap{
  min-height:48vh;
}
.racing-live-sidebar{
  display:grid;
  gap:10px;
  align-content:start;
}
.racing-minimap-card{
  background:rgba(0,0,0,0.22);
  border:1px solid rgba(var(--border-rgb),0.45);
  border-radius:6px;
  padding:10px;
}
.racing-minimap-card h3{
  margin:0 0 6px 0;
  font-size:17px;
}
.racing-minimap-wrap{
  margin-top:8px;
  border:1px solid rgba(var(--border-rgb),0.25);
  border-radius:8px;
  overflow:hidden;
  background:#101114;
}
.racing-minimap-svg{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:16/10;
}
.racing-minimap-bg{
  fill:#101218;
}
.racing-minimap-track{
  fill:none;
  stroke:rgba(255,255,255,0.13);
  stroke-width:34;
  stroke-linejoin:round;
  stroke-linecap:round;
}
.racing-minimap-track-core{
  fill:none;
  stroke:#2b2f39;
  stroke-width:22;
  stroke-linejoin:round;
  stroke-linecap:round;
  filter:url(#minimapGlow);
}
.racing-minimap-dot-outline{
  fill:rgba(0,0,0,0.7);
}
.racing-minimap-dot{
  stroke:rgba(255,255,255,0.35);
  stroke-width:1.5;
  filter:url(#minimapGlow);
  transition:transform 0.9s linear;
}
.racing-minimap-dot.finished{
  stroke:#fff2a2;
  stroke-width:2;
}
.racing-minimap-start{
  stroke:#f4f4f4;
  stroke-width:3;
  stroke-linecap:round;
}
.racing-minimap-legend{
  margin-top:10px;
  display:grid;
  grid-template-columns:1fr;
  gap:6px;
}
.racing-minimap-legend-row{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:8px;
  align-items:center;
  min-height:24px;
}
.racing-minimap-swatch{
  width:12px;
  height:12px;
  border-radius:99px;
  border:1px solid rgba(255,255,255,0.25);
}
.racing-minimap-name{
  font-size:12px;
  color:#e6e6e6;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.racing-minimap-meta{
  font-size:12px;
  color:#aeb7c7;
}
.racing-minimap-empty{
  margin-top:8px;
  min-height:180px;
  border:1px dashed rgba(255,255,255,0.2);
  border-radius:8px;
  display:grid;
  place-items:center;
  color:#96a0b4;
  background:linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}
.player-skill-modal{
  width:min(520px, 94vw);
}
.player-skill-header{
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:center;
  text-align:center;
  margin-top:10px;
}
.player-skill-avatar,
.player-skill-avatar-fallback{
  width:76px;
  height:76px;
  border-radius:999px;
  border:1px solid rgba(var(--border-rgb),0.55);
  background:rgba(0,0,0,0.35);
  box-shadow:0 10px 24px rgba(0,0,0,0.28);
}
.player-skill-avatar{
  object-fit:cover;
}
.player-skill-avatar-fallback{
  display:grid;
  place-items:center;
  font-size:28px;
  font-weight:700;
  color:var(--border);
}
.player-skill-name{
  font-size:18px;
  font-weight:700;
}
.player-skill-header .driver-exp{
  width:min(280px, 100%);
}
.player-skill-grid{
  display:grid;
  gap:8px;
  margin-top:10px;
}
.player-skill-row{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto auto;
  gap:8px;
  align-items:center;
  min-height:34px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:6px;
  background:rgba(255,255,255,0.03);
  padding:6px 8px;
}
.player-skill-copy{
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:2px;
  line-height:1.35;
}
.player-skill-label{
  font-weight:700;
}
.player-skill-description{
  color:#96a0b4;
  font-size:12px;
}
.player-skill-value{
  min-width:30px;
  text-align:center;
  font-weight:700;
}
.racing-config-modal{
  width:min(500px, 94vw);
}
.racing-config-modal .input{
  width:100%;
}
.racing-config-modal .racing-code-input{
  min-width:150px;
}
.racing-config-grid{
  display:grid;
  gap:10px;
  margin-top:10px;
}
.racing-config-grid label{
  display:grid;
  gap:4px;
}
.messages-shell{
  min-height:70vh;
}
.messages-layout{
  display:grid;
  grid-template-columns: minmax(280px, 34%) minmax(420px, 1fr);
  gap:12px;
}
.messages-panel{
  border:1px solid rgba(var(--border-rgb),0.35);
  border-radius:8px;
  background:rgba(0,0,0,0.22);
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.messages-panel h3{
  margin:0;
}
.messages-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}
.messages-list{
  display:grid;
  gap:8px;
  max-height:55vh;
  overflow:auto;
}
.messages-list-item{
  width:100%;
  text-align:left;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.03);
  color:var(--text);
  border-radius:6px;
  padding:8px;
  cursor:pointer;
}
.messages-list-item.unread{
  border-color:rgba(var(--border-rgb),0.55);
}
.messages-list-item.active{
  background:rgba(var(--border-rgb),0.14);
  border-color:rgba(var(--border-rgb),0.75);
}
.messages-list-head{
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-size:13px;
  font-weight:700;
}
.messages-list-meta{
  font-size:12px;
  color:#b7becc;
  margin-top:3px;
}
.messages-inline-copy{
  display:inline;
}
.messages-name-text{
  color:inherit;
}
.messages-preview{
  border:1px solid rgba(255,255,255,0.12);
  border-radius:6px;
  background:rgba(255,255,255,0.03);
  min-height:170px;
  padding:10px;
}
.messages-preview-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.messages-preview-title{
  font-size:15px;
  font-weight:700;
}
.messages-preview-body{
  font-size:14px;
  line-height:1.4;
  color:#e7e9ed;
  white-space:normal;
  word-break:break-word;
}
.messages-preview-actions{
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,0.08);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.messages-avatar,
.messages-avatar-fallback{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(var(--border-rgb),0.55);
  background:rgba(0,0,0,0.3);
}
.messages-avatar{
  object-fit:cover;
}
.messages-avatar-fallback{
  display:grid;
  place-items:center;
  font-size:14px;
  font-weight:700;
  color:var(--border);
}
.messages-compose{
  display:grid;
  gap:6px;
}
.messages-compose .input{
  width:100%;
}
.messages-compose-body{
  height:auto;
  min-height:120px;
  resize:vertical;
}
.messages-compose-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:4px;
}
.carclub-layout{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:14px;
}
.carclub-card{
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid rgba(var(--border-rgb),0.45);
  border-radius:8px;
  background:linear-gradient(180deg, rgba(255,255,255,0.045), rgba(0,0,0,0.16));
}
.carclub-command-card{
  gap:14px;
  border-color:rgba(183,155,81,0.44);
  background:
    radial-gradient(circle at top right, rgba(191,147,67,0.16), transparent 34%),
    linear-gradient(145deg, rgba(10,20,34,0.84), rgba(30,18,12,0.82) 48%, rgba(11,22,25,0.84));
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.06), 0 20px 40px rgba(0,0,0,0.18);
}
.carclub-command-hero{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  flex-wrap:wrap;
}
.carclub-command-kicker{
  font-size:11px;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:#d5bd7c;
}
.carclub-command-actions{
  display:grid;
  gap:8px;
  justify-items:end;
}
.carclub-command-stats .carclub-stat-card{
  background:rgba(255,255,255,0.06);
  border-color:rgba(255,255,255,0.1);
}
.carclub-command-lanes{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
}
.carclub-lane-card{
  position:relative;
  overflow:hidden;
}
.carclub-lane-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  border-radius:8px 0 0 8px;
}
.carclub-lane-community{
  border-color:rgba(89,154,115,0.35);
  background:linear-gradient(145deg, rgba(21,48,34,0.82), rgba(11,22,18,0.8));
}
.carclub-lane-community::before{
  background:linear-gradient(180deg, #6bc088, #2a6b47);
}
.carclub-lane-business{
  border-color:rgba(88,158,170,0.35);
  background:linear-gradient(145deg, rgba(14,46,52,0.82), rgba(10,19,23,0.8));
}
.carclub-lane-business::before{
  background:linear-gradient(180deg, #69bac4, #2f6f76);
}
.carclub-lane-operations{
  border-color:rgba(200,116,73,0.35);
  background:linear-gradient(145deg, rgba(50,26,16,0.82), rgba(19,13,11,0.82));
}
.carclub-lane-operations::before{
  background:linear-gradient(180deg, #dc8a52, #804525);
}
.carclub-lock{
  display:grid;
  gap:6px;
  min-height:140px;
  place-content:center;
  text-align:center;
}
.carclub-card h3{
  margin:0;
}
.carclub-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.carclub-tab-btn{
  border:1px solid rgba(var(--border-rgb),0.32);
  border-radius:999px;
  background:rgba(255,255,255,0.03);
  color:var(--text);
  padding:8px 14px;
  font:inherit;
  cursor:pointer;
  transition:background .15s ease, border-color .15s ease, transform .15s ease;
}
.carclub-tab-btn:hover{
  border-color:rgba(var(--border-rgb),0.58);
  transform:translateY(-1px);
}
.carclub-tab-btn.active{
  background:rgba(var(--border-rgb),0.18);
  border-color:rgba(var(--border-rgb),0.78);
}
.carclub-card-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.carclub-create-input{
  width:100%;
  min-height:46px;
  padding:0 14px;
  border-radius:6px;
  font-size:16px;
}
.carclub-create-tag-input{
  width:min(280px, 100%);
  font-weight:700;
  letter-spacing:0.08em;
}
.carclub-status{
  padding:10px 12px;
  border-radius:6px;
  border:1px solid rgba(var(--border-rgb),0.35);
  background:rgba(0,0,0,0.24);
}
.carclub-status.success{
  border-color:rgba(92, 190, 110, 0.65);
  color:#b7f0c0;
}
.carclub-status.error{
  border-color:rgba(210, 90, 90, 0.65);
  color:#ffb4b4;
}
.carclub-club-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  flex-wrap:wrap;
}
.carclub-club-meta{
  display:grid;
  gap:4px;
  text-align:right;
}
.carclub-club-meta .btn{
  justify-self:end;
}
.carclub-summary-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(160px, 1fr));
  gap:10px;
}
.carclub-stat-card{
  display:grid;
  gap:4px;
  padding:12px;
  border-radius:8px;
  border:1px solid rgba(var(--border-rgb),0.24);
  background:rgba(255,255,255,0.035);
}
.carclub-campus-grid,
.carclub-building-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:12px;
}
.carclub-campus-card,
.carclub-building-card,
.carclub-project-card{
  --carclub-accent-rgb: var(--border-rgb);
  position:relative;
  overflow:hidden;
  background:
    linear-gradient(140deg, rgba(var(--carclub-accent-rgb),0.16), rgba(255,255,255,0.04) 42%, rgba(0,0,0,0.16)),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.18));
}
.carclub-campus-card::before,
.carclub-building-card::before,
.carclub-project-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:rgba(var(--carclub-accent-rgb),0.95);
}
.carclub-building-top{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:start;
}
.carclub-building-icon{
  width:44px;
  height:44px;
  border-radius:12px;
  border:1px solid rgba(var(--carclub-accent-rgb),0.42);
  display:grid;
  place-items:center;
  font-size:13px;
  font-weight:800;
  letter-spacing:0.08em;
  background:rgba(var(--carclub-accent-rgb),0.18);
  color:#f8f5ef;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.14);
}
.carclub-building-kpis{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(120px, 1fr));
  gap:8px;
}
.carclub-building-kpi{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(0,0,0,0.22);
}
.carclub-theme-command{ --carclub-accent-rgb: 216,176,78; }
.carclub-theme-factory{ --carclub-accent-rgb: 208,118,66; }
.carclub-theme-sales{ --carclub-accent-rgb: 84,168,112; }
.carclub-theme-racing{ --carclub-accent-rgb: 196,76,76; }
.carclub-theme-logistics{ --carclub-accent-rgb: 79,140,197; }
.carclub-theme-finance{ --carclub-accent-rgb: 83,165,158; }
.carclub-overview-list{
  display:grid;
  gap:10px;
}
.carclub-overview-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  padding:10px 12px;
  border-radius:6px;
  background:rgba(0,0,0,0.24);
}
.carclub-roster{
  display:grid;
  gap:8px;
}
.carclub-member-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:6px;
  background:rgba(0,0,0,0.24);
}
.carclub-member-meta{
  display:grid;
  gap:6px;
  justify-items:end;
}
.carclub-member-meta .input{
  min-width:220px;
}
.carclub-member-meta .btn{
  min-height:0;
  padding:5px 10px;
  font-size:12px;
  white-space:nowrap;
}
.carclub-rank-select,
.carclub-dividend-select{
  min-height:40px;
}
.carclub-offshore-card{
  border-color:rgba(73,147,162,0.36);
  background:
    radial-gradient(circle at top right, rgba(86,170,178,0.16), transparent 34%),
    linear-gradient(145deg, rgba(10,35,39,0.84), rgba(13,18,31,0.82));
}
.carclub-role-pill{
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(var(--border-rgb),0.35);
  font-size:12px;
  text-transform:capitalize;
  background:rgba(255,255,255,0.04);
}
.carclub-directory{
  display:grid;
  gap:10px;
}
.carclub-directory-card{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;
  align-items:center;
  padding:12px;
  border-radius:6px;
  background:rgba(0,0,0,0.24);
}
.carclub-directory-state{
  padding:4px 10px;
  border-radius:999px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
  font-size:12px;
  font-weight:700;
}
.carclub-empty{
  padding:12px;
  border-radius:6px;
  background:rgba(0,0,0,0.24);
}
.carclub-donation-feed{
  display:grid;
  gap:8px;
}
.carclub-donation-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border-radius:6px;
  background:rgba(0,0,0,0.24);
}
.carclub-profile-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:10px;
}
.carclub-profile-card{
  display:grid;
  gap:10px;
  padding:12px;
  border-radius:8px;
  border:1px solid rgba(var(--border-rgb),0.2);
  background:rgba(255,255,255,0.03);
}
.carclub-profile-head{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:center;
}
.carclub-profile-avatar,
.carclub-profile-avatar-fallback{
  width:44px;
  height:44px;
  border-radius:999px;
  display:grid;
  place-items:center;
  object-fit:cover;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(var(--border-rgb),0.25);
  font-weight:700;
}
.carclub-profile-stat-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}
.carclub-profile-car{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border-radius:6px;
  background:rgba(0,0,0,0.24);
}
.settings-log-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.settings-log-card{
  display:grid;
  gap:6px;
  padding:12px;
  border-radius:8px;
  border:1px solid rgba(var(--border-rgb),0.28);
  background:rgba(255,255,255,0.03);
}
.settings-log-toggle{
  display:flex;
  align-items:center;
  gap:10px;
}
@media (max-width: 980px){
  .topbar{
    --topbar-height:52px;
    --topbar-gap:6px;
    --topbar-icon-size:30px;
    --topbar-title-size:24px;
    --topbar-title-gap:6px;
  }
  .topbar-left .top-icon:nth-child(1),
  .topbar-left .top-icon:nth-child(3){
    display:none;
  }
  .racing-tabs .btn{
    flex:1 1 calc(50% - 8px);
    min-width:unset;
  }
  .racing-pro-grid{
    grid-template-columns:1fr;
  }
  .racing-offline-overview{
    grid-template-columns:1fr;
  }
  .racing-track-preview-top{
    grid-template-columns:1fr;
  }
  .racing-live-layout{
    grid-template-columns:1fr;
  }
  .racing-live-map .racing-minimap-card{
    min-height:auto;
  }
  .racing-live-map .racing-minimap-wrap{
    min-height:36vh;
  }
  .racing-minimized-bar{
    flex-direction:column;
    align-items:flex-start;
  }
  .messages-layout{
    grid-template-columns:1fr;
  }
  .carclub-club-meta{
    text-align:left;
  }
  .carclub-command-actions{
    justify-items:start;
  }
  .carclub-overview-row{
    flex-direction:column;
  }
  .carclub-directory-card{
    grid-template-columns:1fr;
  }
  .carclub-building-top{
    grid-template-columns:auto 1fr;
  }
  .carclub-building-top .carclub-club-meta{
    grid-column:1 / -1;
  }
  .carclub-building-kpis{
    grid-template-columns:1fr;
  }
  .carclub-profile-head{
    grid-template-columns:auto 1fr;
  }
  .footer-compose{
    flex-direction:column;
    align-items:stretch;
  }
  .footer-panel-tools,
  .footer-collapsed-bar{
    justify-content:flex-start;
  }
  .messages-preview-actions{
    align-items:flex-start;
  }
}

@media (max-width: 620px){
  .topbar{
    --topbar-height:46px;
    --topbar-gap:4px;
    --topbar-icon-size:24px;
    --topbar-title-size:18px;
    --topbar-title-gap:4px;
    --topbar-pill-font-size:11px;
    gap:8px;
    padding:0 8px;
  }
  .topbar-left .top-icon:nth-child(4){
    display:none;
  }
  .toggle{
    gap:6px;
  }
  .toggle-label{
    display:none;
  }
  .toggle-pill{
    min-width:36px;
    padding:2px 6px;
  }
  .racing-tabs .btn{
    flex:1 1 100%;
  }
  .racing-track-preview-stat-grid{
    grid-template-columns:1fr;
  }
  .racing-track-preview-race{
    flex-direction:column;
  }
  .carclub-member-row{
    align-items:flex-start;
    flex-direction:column;
  }
  .carclub-member-meta{
    justify-items:start;
    width:100%;
  }
  .carclub-member-meta .input{
    width:100%;
    min-width:0;
  }
  .carclub-profile-stat-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 980px){
  .finance-summary-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .finance-panel-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 620px){
  .finance-head{
    align-items:stretch;
  }
  .finance-toolbar{
    justify-content:flex-start;
  }
  .finance-summary-grid{
    grid-template-columns:1fr;
  }
  .finance-route-row,
  .finance-route-toggle{
    align-items:flex-start;
  }
}

.admin-shell{
  gap:14px;
}

.admin-page-head,
.admin-toolbar-row,
.admin-detail-head,
.admin-actions-row,
.admin-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.admin-page-head,
.admin-toolbar-row,
.admin-detail-head{
  align-items:flex-start;
  justify-content:space-between;
}

.admin-search{
  min-width:min(320px, 72vw);
}

.admin-tab-btn{
  min-width:92px;
}

.admin-tab-btn.active{
  box-shadow:inset 0 0 0 1px rgba(var(--border-rgb),0.8);
}

.admin-stack{
  display:grid;
  gap:12px;
}

.admin-summary-grid,
.admin-stat-grid{
  display:grid;
  gap:10px;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
}

.admin-card,
.admin-stat-card,
.admin-detail-card,
.admin-list-panel{
  border:1px solid rgba(var(--border-rgb),0.26);
  background:rgba(255,255,255,0.03);
  border-radius:8px;
}

.admin-card,
.admin-stat-card{
  padding:12px 14px;
}

.admin-card b,
.admin-stat-card b{
  display:block;
  margin-top:6px;
  font-size:20px;
}

.admin-card-label{
  display:block;
  font-size:12px;
  opacity:0.78;
}

.admin-two-column{
  display:grid;
  gap:12px;
  grid-template-columns:minmax(260px, 340px) minmax(0, 1fr);
  align-items:start;
}

.admin-list-panel{
  padding:10px;
  max-height:560px;
  overflow:auto;
}

.admin-list-item{
  width:100%;
  text-align:left;
  border:1px solid rgba(var(--border-rgb),0.14);
  background:rgba(255,255,255,0.02);
  border-radius:8px;
  padding:10px 12px;
  margin-bottom:8px;
}

.admin-list-item.active{
  border-color:rgba(var(--border-rgb),0.78);
  background:rgba(var(--border-rgb),0.11);
}

.admin-list-title{
  font-weight:700;
}

.admin-list-meta{
  font-size:12px;
  opacity:0.8;
  margin-top:4px;
  line-height:1.35;
}

.admin-detail-card{
  padding:14px;
  min-height:240px;
}

.admin-note-block{
  display:grid;
  gap:6px;
  margin-top:12px;
  padding:12px;
  border:1px solid rgba(var(--border-rgb),0.16);
  border-radius:8px;
  background:rgba(0,0,0,0.12);
}

.admin-message-body{
  margin-top:12px;
  padding:12px;
  border:1px solid rgba(var(--border-rgb),0.16);
  border-radius:8px;
  background:rgba(0,0,0,0.16);
  line-height:1.45;
  word-break:break-word;
}

.admin-member-list{
  display:grid;
  gap:8px;
  margin-top:12px;
}

.admin-member-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border:1px solid rgba(var(--border-rgb),0.14);
  border-radius:8px;
  background:rgba(255,255,255,0.02);
}

.admin-empty{
  padding:16px;
  font-size:13px;
  opacity:0.78;
}

@media (max-width: 900px){
  .admin-two-column{
    grid-template-columns:1fr;
  }

  .admin-list-panel{
    max-height:320px;
  }

  .admin-search{
    min-width:100%;
  }
}

