/* BusinessWars — classic 2005 browser-game aesthetic, business skin */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #bfe2ec;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 11px;
  color: #222;
}
a, .linkbtn, .cl, .mini { color: #1a4fa0; text-decoration: none; cursor: pointer; }
a:hover, .linkbtn:hover, .cl:hover, .mini:hover { text-decoration: underline; }
.mini { font-size: 10px; }
.dim { color: #888; font-weight: normal; }
.good { color: #1e7d2c; }
.bad { color: #b22; }
h2 { font-size: 14px; margin: 0 0 8px; border-bottom: 1px solid #ddd; padding-bottom: 4px; }
h3 { font-size: 12px; margin: 14px 0 4px; }
h4 { font-size: 11px; margin: 10px 0 3px; }

#app { display: flex; flex-direction: column; min-height: 100vh; }

/* header */
#header {
  display: flex; gap: 14px; align-items: center;
  background: repeating-linear-gradient(90deg, #20242c 0 6px, #232833 6px 12px);
  color: #eee; padding: 6px 12px; flex-wrap: wrap;
  border-bottom: 3px solid #c9a227;
}
.logo { font-size: 19px; font-weight: bold; letter-spacing: -0.5px; color: #fff; }
.logo span { color: #c9a227; }
.logo.big { font-size: 32px; }
.tagline { font-size: 9px; color: #9aa3b2; font-style: italic; }
.hcell { padding: 0 10px; border-left: 1px solid #3a4150; line-height: 1.5; }
.hcell b { color: #c9a227; }
.hnav a { color: #cfd6e4; }
.hclock { font-size: 10px; }
.hbars { min-width: 210px; }
.bar { position: relative; background: #555; border: 1px solid #777; height: 11px; width: 150px; display: inline-block; vertical-align: middle; }
.bar .fill { background: #6fae3f; height: 100%; }
.bar.red .fill { background: #c0392b; }
.bar.blue .fill { background: #2980b9; }
.bar span { position: absolute; left: 0; right: 0; top: -1px; text-align: center; font-size: 9px; color: #fff; text-shadow: 0 0 2px #000; }

/* layout */
#main { display: flex; flex: 1; align-items: stretch; }
#sidebar {
  width: 185px; min-width: 185px; background: #efe9d9; border-right: 1px solid #cfc7ae;
  padding: 8px 0 20px;
}
.profile { padding: 4px 10px 10px; font-size: 11px; }
.navhead { padding: 8px 10px 2px; font-size: 9px; letter-spacing: 2px; color: #998f6e; font-weight: bold; }
ul.nav { list-style: none; margin: 0; padding: 0; }
ul.nav li { padding: 3px 10px; cursor: pointer; color: #1a4fa0; }
ul.nav li:hover { background: #e5dcc2; text-decoration: underline; }
ul.nav li.on { background: #dfd4b2; font-weight: bold; }
.badge { background: #c0392b; color: #fff; border-radius: 8px; padding: 0 6px; font-size: 9px; }
.sideflavor { margin: 18px 10px 0; padding-top: 8px; border-top: 1px solid #d8d0b8; font-size: 9px; color: #777; }

#content {
  flex: 1; background: #fff; margin: 12px; padding: 16px 20px 40px;
  border: 1px solid #9db9c4; box-shadow: 2px 2px 0 rgba(0,0,0,0.08);
  max-width: 950px; line-height: 1.55;
}

/* home page */
.hometabs { border-bottom: 1px solid #ccc; margin-bottom: 10px; }
.tab { display: inline-block; padding: 3px 12px; border: 1px solid #ccc; border-bottom: none; background: #f3f3f3; cursor: pointer; margin-right: 2px; font-size: 10px; color: #1a4fa0; }
.tab.on { background: #fff; font-weight: bold; color: #222; }
.homewrap { display: flex; gap: 18px; }
.avatar { font-size: 64px; text-align: center; min-width: 110px; padding-top: 8px; }
.avcompany { font-size: 9px; color: #888; margin-top: 6px; }
.sheet { flex: 1; }
.subhead { font-weight: bold; text-decoration: underline; margin-top: 10px; }
.gearcol { width: 170px; min-width: 170px; }
.gearbox { border: 1px solid #ccc; padding: 6px 8px; margin-bottom: 6px; background: #fafafa; }
.gearname { font-weight: bold; }
ul.notices { margin-top: 16px; padding-left: 18px; color: #444; }
ul.notices li { margin-bottom: 4px; }
.wonbadge { margin-top: 6px; background: #fdf3d5; border: 1px solid #c9a227; padding: 4px 8px; font-weight: bold; display: inline-block; }

/* city */
.flavor { background: #f7f5ec; border: 1px solid #e2dcc4; padding: 8px 10px; }
.citygrid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
ul.plain { list-style: none; padding-left: 4px; margin: 4px 0; }
ul.plain li { margin-bottom: 3px; }

/* generic */
table.kv { border-collapse: collapse; margin: 6px 0; }
table.kv td { padding: 3px 14px 3px 0; vertical-align: middle; }
table.shop { border-collapse: collapse; width: 100%; margin: 6px 0; }
table.shop td, table.shop th { border-bottom: 1px solid #eee; padding: 4px 8px 4px 0; text-align: left; vertical-align: top; }
table.shop th { font-size: 10px; color: #777; }
table.shop tr.merow td { background: #fdf3d5; font-weight: bold; }
table.shop tr.gotcheevo td { background: #f0f9ee; }
.btn {
  display: inline-block; background: #e8e4d4; border: 1px solid #b4ab8b;
  padding: 3px 10px; cursor: pointer; color: #222; border-radius: 2px;
  font-size: 11px; font-family: inherit;
}
.btn:hover { background: #ded6ba; text-decoration: none; }
.btn.small { padding: 1px 7px; font-size: 10px; }
.btn.danger { background: #f3d3d0; border-color: #c08; border-color: #c97f78; }
button.btn { font-size: 12px; }
.callout { background: #f7f5ec; border: 1px solid #e0d9c0; padding: 8px 12px; margin: 10px 0; }
.callout.bad { background: #fbeeed; border-color: #e6c5c1; }
.callout.good { background: #eef8ec; border-color: #c5e0c1; }
input[type="number"], input[type="text"], input:not([type]) {
  font-family: inherit; font-size: 11px; padding: 3px 5px; border: 1px solid #aaa; width: 110px;
}
input.lotto { width: 36px; margin-right: 4px; }
select { font-family: inherit; font-size: 11px; }
textarea#savebox { width: 100%; height: 90px; margin-top: 10px; font-size: 9px; font-family: monospace; }

/* puzzle */
table.puzzle { border-collapse: collapse; margin: 8px 0; }
table.puzzle td { width: 30px; height: 26px; text-align: center; }
.circle { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #777; }
.circle.c0 { background: #d44; }
.circle.c1 { background: #f7e26a; }
.circle.c2 { background: #4b4; }

/* fight overlay */
.overlay { position: fixed; inset: 0; background: rgba(20,22,30,0.65); display: flex; align-items: center; justify-content: center; z-index: 50; }
.fightbox { background: #fff; border: 2px solid #444; max-width: 620px; width: 92%; max-height: 86vh; padding: 14px 18px; overflow: auto; }
.fightlog { background: #16181d; color: #ccc; font-family: monospace; font-size: 10px; padding: 10px; max-height: 320px; overflow-y: auto; margin: 8px 0; line-height: 1.6; }
.fightlog .me { color: #8fd18f; }
.fightlog .them { color: #e09a93; }
.fightlog .skill { color: #ffd866; }
.fightsummary { font-size: 12px; padding: 6px 0; }
.winbox { border-color: #c9a227; box-shadow: 0 0 40px #c9a227; }

/* news, misc */
ul.newslog { list-style: none; padding-left: 0; }
ul.newslog li { border-bottom: 1px dotted #ddd; padding: 4px 0; }
.slotreels { font-size: 26px; letter-spacing: 6px; }
.spark { width: 220px; height: 46px; border: 1px solid #ddd; background: #fafdfa; display: block; margin: 4px 0; }
.venture { border: 1px solid #e0d9c0; background: #fcfbf6; padding: 10px 14px; margin-bottom: 12px; }
.help p { max-width: 700px; }

/* toasts */
#toasts { position: fixed; top: 14px; right: 14px; z-index: 99; }
.toast {
  background: #20242c; color: #fff; border-left: 3px solid #c9a227; padding: 8px 14px;
  margin-bottom: 6px; opacity: 0; transform: translateX(20px); transition: all 0.3s; font-size: 11px; max-width: 280px;
}
.toast.show { opacity: 1; transform: none; }

/* intro */
#intro { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #bfe2ec; }
.introbox { background: #fff; border: 2px solid #20242c; box-shadow: 4px 4px 0 rgba(0,0,0,0.15); max-width: 560px; padding: 28px 34px; text-align: center; }
.introbox .logo { color: #20242c; }
.introstory { text-align: left; margin: 18px 0; line-height: 1.7; }
.introform label { display: block; text-align: left; margin-bottom: 12px; font-weight: bold; }
.introform input { width: 100%; font-size: 14px; padding: 6px; margin-top: 3px; }
.introform .btn { font-size: 14px; padding: 8px 22px; margin-top: 6px; }
/* account list (sign up / log in) */
.acctlist { text-align: left; margin: 14px 0; }
.acctrow { border: 1px solid #cfc7ae; background: #faf8f0; border-radius: 6px; padding: 10px 14px; margin-bottom: 8px; cursor: pointer; transition: background 0.12s, transform 0.06s; }
.acctrow:hover { background: #f0ead4; transform: translateY(-1px); }
.acctmain { font-size: 14px; }
.acctmeta { font-size: 10px; margin-top: 2px; }
#loginerr { margin-top: 6px; font-size: 12px; min-height: 14px; }

/* ---- expansion UI ---- */
.fxchips { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; margin-top: 4px; padding-left: 2px; }
.fxchip { background: #2c333f; border: 1px solid #4a5568; border-radius: 10px; padding: 1px 8px; font-size: 9px; color: #ffd866; }
.fxchip b { color: #fff; }
.titlebadge { display: inline-block; background: #c9a227; color: #20242c; font-weight: bold; font-size: 9px; padding: 1px 6px; border-radius: 3px; margin-top: 2px; }
.prestige { color: #c9a227; font-weight: bold; }
.relmgr { color: #8a6d1f !important; }
.tierbadge { font-size: 9px; color: #777; margin-top: 4px; background: #f3f0e6; border: 1px solid #e0d9c0; border-radius: 3px; padding: 1px 5px; display: inline-block; }
.onboard { background: #eef6fb; border: 1px solid #bcd9ea; padding: 8px 12px; margin-bottom: 12px; }
.onboard ul { list-style: none; margin: 6px 0 0; padding: 0; columns: 2; }
.onboard li { margin-bottom: 2px; }
.onboard li.ob-done { color: #1e7d2c; }
.bracket { background: #16181d; color: #ccc; padding: 12px; font-size: 11px; margin: 8px 0; }
.brkround { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #333; }
.bracket b { color: #ffd866; }
.grouphdr td { background: #f3f0e6; }
.bugle-masthead { border-bottom: 2px solid #222; border-top: 2px solid #222; padding: 4px 0; margin-bottom: 8px; text-align: center; }
.bugle-headline { font-family: Georgia, 'Times New Roman', serif; font-size: 19px; text-align: center; margin: 10px 0 14px; }

/* ---- idle / clicker layer ---- */
.clicker-card { display: flex; gap: 16px; align-items: center; background: linear-gradient(135deg, #1f2630, #2c3a2e); border: 1px solid #3a4150; border-radius: 8px; padding: 14px 18px; margin-bottom: 12px; }
.bigclick {
  font-family: inherit; cursor: pointer; border: none; border-radius: 50%;
  width: 116px; height: 116px; min-width: 116px;
  background: radial-gradient(circle at 38% 32%, #ffe082, #e0a020 60%, #b9831b);
  box-shadow: 0 5px 0 #8a6212, 0 8px 14px rgba(0,0,0,0.4);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #4a3508; transition: transform 0.05s, box-shadow 0.05s, filter 0.1s; user-select: none;
}
.bigclick:hover { filter: brightness(1.05); }
.bigclick:active { transform: translateY(4px); box-shadow: 0 1px 0 #8a6212, 0 3px 8px rgba(0,0,0,0.4); }
.bigclick.pop { animation: bcpop 0.18s ease; }
@keyframes bcpop { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1); } }
.bc-emoji { font-size: 40px; line-height: 1; }
.bc-label { font-size: 15px; font-weight: 800; letter-spacing: 1px; margin-top: 2px; }
.clicker-stats { color: #e8edf4; font-size: 12px; line-height: 1.7; }
.clicker-stats b { color: #ffd866; }
.clicker-stats .cl { color: #9fd0ff; }
.combo { color: #ff8c42; font-weight: bold; margin-left: 6px; opacity: 0; transition: opacity 0.2s; }
.combo.on { opacity: 1; }
.empire-summary { display: flex; flex-wrap: wrap; gap: 18px; background: #f7f5ec; border: 1px solid #e0d9c0; border-radius: 6px; padding: 8px 14px; margin: 6px 0 12px; }
.empire-summary b { color: #1e7d2c; }
.ownpill { background: #1e7d2c; color: #fff; border-radius: 10px; padding: 0 7px; font-size: 9px; }
#floatlayer { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.floatnum { position: absolute; transform: translate(-50%, 0); color: #1e9d3a; font-weight: 800; font-size: 16px; text-shadow: 0 1px 2px rgba(0,0,0,0.3); transition: transform 0.9s ease-out, opacity 0.9s ease-out; opacity: 1; }
.floatnum.big { font-size: 22px; color: #ff8c42; }
.floatnum.go { transform: translate(-50%, -70px); opacity: 0; }
.welcomebox { text-align: center; border-color: #c9a227; }
.welcome-earn { font-size: 38px; font-weight: 800; color: #1e9d3a; margin: 10px 0; }

/* ---- modern 2026 UX: avatars, contracts, share, a11y, mobile nav ---- */
.hamburger { display: none; background: transparent; border: none; color: #fff; font-size: 22px; cursor: pointer; padding: 2px 10px; line-height: 1; }
#navscrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 39; }
.profrow { display: flex; align-items: center; gap: 10px; }
.bw-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; line-height: 1; flex: none; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.avpick { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0; }
.avopt { font-size: 19px; padding: 2px 5px; border-radius: 7px; cursor: pointer; border: 1px solid transparent; }
.avopt:hover { background: #eee; }
.avopt.on { border-color: #c9a227; background: #fdf3d5; }
.avcol { display: inline-block; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px #aaa; }
.avcol.on { box-shadow: 0 0 0 2px #222; }
.contracts-card { border: 1px solid #e0d9c0; background: #fcfbf6; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.contracts-head { font-weight: bold; margin-bottom: 8px; }
.contract { margin-bottom: 9px; }
.contract-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; align-items: center; }
.cbar { height: 7px; background: #e6e0c8; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.cfill { height: 100%; background: linear-gradient(90deg, #7bc95a, #4b9e2e); transition: width 0.3s; }
.sharebox { text-align: center; }
.sharecard { width: 100%; max-width: 520px; border-radius: 12px; margin: 8px 0; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
:focus-visible { outline: 2px solid #2563cc; outline-offset: 2px; border-radius: 3px; }
.fin-home { background: #f4f7fb; border: 1px solid #d8e2ee; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 12px; line-height: 1.6; }
.fin-home b { color: #16a34a; }
.spark2 { width: 92px; height: 28px; display: block; }
.firmform { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.firmform input, .firmform select { font-size: 12px; }
.proflair { background: linear-gradient(90deg, #f5c542, #ffe082); color: #4a3508; font-weight: 800; font-size: 8px; padding: 1px 5px; border-radius: 8px; letter-spacing: 0.5px; vertical-align: middle; }
.adminbadge { background: linear-gradient(90deg, #7b3ff2, #b06bff); color: #fff; font-weight: 800; font-size: 8px; padding: 1px 5px; border-radius: 8px; letter-spacing: 0.5px; vertical-align: middle; }
.cosmetic-ring { box-shadow: 0 0 0 2px #f5c542, 0 0 10px 2px rgba(245,197,66,0.6) !important; }
.learntip { background: #eef6fb; border: 1px solid #bcd9ea; border-left: 3px solid #2980b9; border-radius: 6px; padding: 6px 10px; margin: 8px 0; font-size: 11px; }
.learncard { border: 1px solid #e0d9c0; border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; background: #fcfbf6; }
.learncard-h { font-size: 13px; margin-bottom: 3px; }
.learncard-why { margin-top: 5px; color: #1e5e8a; font-size: 11px; }

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

@media (max-width: 760px) {
  .hamburger { display: block; }
  #sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 40;
    width: 240px; max-width: 82vw; transform: translateX(-100%);
    transition: transform 0.22s ease; overflow-y: auto;
    box-shadow: 4px 0 18px rgba(0,0,0,0.3);
  }
  body.navopen #sidebar { transform: translateX(0); }
  body.navopen #navscrim { display: block; }
  ul.nav li { padding: 9px 12px; }
  .homewrap { flex-direction: column; }
  .gearcol { width: 100%; }
  .citygrid { grid-template-columns: 1fr; }
  .onboard ul { columns: 1; }
  .clicker-card { flex-direction: column; text-align: center; }
  #content { margin: 8px; padding: 14px 14px 40px; }
  .btn { padding: 6px 12px; }
  #header { gap: 8px; }
  .hbars { min-width: 160px; }
}
