/* ==========================================================================
   "Gilded" (v0.8): the classic 2010 mafia-game layout in black, red and gold.
   Chosen by the owner (design J). This layer sits on top of styles.css, which
   keeps the base classic rules; everything here only restyles, never relayouts
   pages beyond the shell (header, stat panels, tabs, tier tabs, job rows).
   Phone rules live only inside @media (max-width: 780px).
   ========================================================================== */
:root {
  --gold: #ffcc33;
  --gold-dark: #b8860b;
  --gold-line: #b8860b;
  --gold-soft: #d8b060;
  --money: #3ad13a;
  --red: #c22;
  --ink-red: #7a1a0e;
  --panel-bg: linear-gradient(#1a1a1a, #080808);
  --well: rgba(8, 3, 2, 0.86);
  --title-bg: linear-gradient(#3a2a08, #1a1204);
  --text: #d6d0c8;
  --muted: #a8a096;
  --dim: #7a7268;
  --row-alt: rgba(255, 255, 255, 0.025);
  --yellow-btn: linear-gradient(#fff27a 0%, #ffcf26 50%, #f0a800 100%);
  --yellow-btn-hi: linear-gradient(#fff9b0 0%, #ffdc50 50%, #ffb800 100%);
}

body {
  background: #050505 radial-gradient(ellipse at 50% 0%, #2a0c05 0%, #0a0303 50%, #050505 100%) no-repeat;
  background-size: 100% 900px;
  color: var(--text);
}

/* ------------------------------------------------ top blue bar (the old social-network chrome) */
.fb-bar { background: linear-gradient(#4a66a8, #3b5998); border-bottom: 1px solid #1d3266; height: auto; }
.fb-bar-inner { width: 980px; height: 32px; gap: 18px; }
.fb-bar-inner a { font-weight: bold; font-size: 11px; }

/* ------------------------------------------------ the page */
.game { width: 980px; background: transparent; border: 0; box-shadow: none; margin-top: 0; }
.auth { width: 980px; }

/* header: gold logo over a faint skyline, the player card on the right */
.header { height: 96px; background: transparent; border-bottom: 0; }
.header .skyline { opacity: 0.55; }
.header .logo { left: 10px; top: 8px; }
.header .header-right { top: 14px; right: 10px; color: var(--soft, #d8b060); }
.header .header-right .who a { color: #fff; font-size: 14px; }
.header .header-right .class-tag { color: var(--gold); }
.header .header-right .portrait { border: 2px solid var(--gold); border-radius: 3px; background: linear-gradient(#3a3a3a, #111); }

/* ------------------------------------------------ stat panels */
.stats { display: flex; gap: 6px; height: auto; background: none; border: 0; padding: 0 0 2px; }
.stats-main, .stat.level {
  background: var(--panel-bg); border: 1px solid var(--gold-line); border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.stats-main { flex: 3 1 0; display: flex; min-width: 0; }
.stats-main .stat {
  flex: 1 1 0; flex-direction: row; align-items: flex-start; justify-content: flex-start; gap: 7px;
  padding: 7px 10px; border-right: 1px solid #4a3a14; box-shadow: none; min-width: 0;
}
.stats-main .stat:last-child { border-right: 0; }
.stats-main .stat > svg { flex: none; margin-top: 2px; }
.stat .label { font: bold 11px Verdana, sans-serif; text-transform: none; letter-spacing: 0; color: var(--gold-soft); }
.stat .label .bank-link { font-weight: normal; color: var(--gold); margin-left: 3px; }
.stat .value { font-size: 17px; line-height: 1.15; color: #fff; }
.stat .sub, .stat .sub a { font-size: 10px; color: var(--muted); }
.stat .sub a { color: var(--gold); }
.stat.cash .value { color: var(--money); }
.stat.health .value, .stat.energy .value, .stat.stamina .value { color: #fff; }
.stat.energy.full .value { color: var(--gold); text-shadow: 0 0 8px rgba(255, 204, 51, 0.6); }
.stat.level { flex: 1 1 0; flex-direction: row; align-items: center; gap: 10px; padding: 6px 12px; min-width: 220px; }
.stat.level .xp-side { flex: 1; min-width: 0; }
.stat.level .xp-label { font: bold 11px Verdana, sans-serif; color: var(--gold-soft); display: flex; gap: 4px; align-items: center; }
.stat.level .xp-nums { font: bold 14px Verdana, sans-serif; color: #fff; }
.xpbar { height: 8px; background: #111; border: 1px solid #000; border-radius: 3px; margin: 3px 0 1px; overflow: hidden; }
.xpbar > div { background: linear-gradient(#7cc4ff, #2a74c9); }
.level-badge { text-align: center; flex: none; }
.level-badge .label { display: block; font-size: 10px; color: var(--gold-soft); }
.level-badge .level-num { display: block; font: bold 20px Verdana, sans-serif; color: #fff; line-height: 1; }
.stat.level.leveled .level-num { color: var(--gold); text-shadow: 0 0 10px #f90; }

/* ------------------------------------------------ main tabs: separate glossy buttons with gold edges */
.nav {
  display: flex; flex-wrap: wrap; gap: 3px; background: rgba(0, 0, 0, 0.55); border: 0; padding: 3px; margin: 6px 0 8px; border-radius: 3px;
}
.nav a {
  flex: 1 1 auto; text-align: center; color: #fff; font-size: 12px; padding: 6px 10px;
  background: linear-gradient(#3a3a3a 0%, #1a1a1a 50%, #000 100%); border: 1px solid var(--gold-line); border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.nav a:hover { background: linear-gradient(#4a4a4a 0%, #2a2a2a 50%, #0a0a0a 100%); color: var(--gold); text-decoration: none; }
.nav a.active { background: linear-gradient(#fff, #c9c9c9); color: #111; box-shadow: inset 0 1px 0 #fff; }
.nav .badge { position: static; display: inline-block; margin-left: 4px; background: #c00; color: #fff; border-radius: 8px; font-size: 10px; line-height: 15px; padding: 0 4px; min-width: 15px; }

/* sub-tabs on other pages: smaller versions of the same buttons */
.subnav, .subnav[style] { background: transparent !important; border: 0; gap: 3px; margin-bottom: 8px; }
.subnav a {
  color: #f2e6d0; border: 1px solid #4a3a14; border-radius: 3px; padding: 4px 10px;
  background: linear-gradient(#2a2a2a, #0c0c0c);
}
.subnav a:hover { color: var(--gold); text-decoration: none; }
.subnav a.active { background: linear-gradient(#c22, #700); border-color: #e0a040; color: #fff; }
.subnav a.locked { color: #666; }

/* ------------------------------------------------ job tier tabs: arrows, like the original */
.tier-tabs { display: flex; flex-wrap: wrap; gap: 4px 0; padding: 0 0 0 10px; margin-bottom: 8px; }
.tier-tab {
  flex: 1 1 96px; min-width: 96px; margin-left: -10px; padding: 6px 18px 6px 24px; text-decoration: none !important;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
  background: linear-gradient(#2a2a2a, #0c0c0c); color: var(--gold); cursor: pointer;
}
.tier-tab:first-child { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); padding-left: 14px; }
.tier-tab:hover { background: linear-gradient(#3a3a3a, #161616); }
.tier-tab.active { background: linear-gradient(#c22, #700); color: #fff; }
.tier-tab.locked { background: linear-gradient(#2a2a2a, #161616); color: #888; }
.tier-tab-name { display: flex; gap: 4px; align-items: center; font: bold 12px Verdana, sans-serif; white-space: nowrap; }
.tier-tab-sub { display: block; font-size: 10px; color: #f0c27a; white-space: nowrap; }
.tier-tab.active .tier-tab-sub { color: #ffe0b0; }
.tier-tab.locked .tier-tab-sub { color: #999; }
.unlock-note { text-align: center; font: bold 15px Verdana, sans-serif; color: #ffe6c8; padding: 8px 10px 12px; }
.tier-banner { border: 1px solid var(--gold-line); border-radius: 3px; }

/* ------------------------------------------------ content, panels, headings */
.content { padding: 8px 0 10px; }
h1.page-title { font: bold 20px Georgia, serif; color: var(--gold); border-bottom: 1px solid #4a3a14; }
h2 { color: var(--gold); }
.panel { background: var(--well); border: 1px solid var(--gold-line); border-radius: 3px; overflow: hidden; }
.panel > .panel-title { background: var(--title-bg); color: var(--gold); border-bottom: 1px solid #000; font-size: 12px; padding: 5px 10px; }
.panel > .panel-body { padding: 8px 10px; }
.money { color: var(--money); }
.footer { border-top: 1px solid #3a2a10; color: var(--dim); }

/* ------------------------------------------------ tables: gold frame, brown header */
table.list { border: 1px solid var(--gold-line); border-radius: 3px; border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--well); }
table.list th { background: var(--title-bg); color: var(--gold); font: bold 11px Verdana, sans-serif; text-transform: none; letter-spacing: 0; padding: 6px 10px; }
table.list td { border-bottom: 1px solid #2a1e0c; padding: 8px 10px; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:nth-child(even) td { background: var(--row-alt); }
.panel table.list { border: 0; border-radius: 0; background: transparent; }

/* job rows */
.jobs-table .job-desc { width: 34%; }
.job-name { font-size: 13px; }
.job-mastery { font-size: 11px; color: var(--text); display: flex; gap: 4px; align-items: center; margin-top: 2px; }
.mastery { width: 150px; height: 9px; background: #2a0a0a; border: 1px solid #000; border-radius: 3px; overflow: hidden; display: block; margin-top: 3px; }
.mastery > div { background: linear-gradient(#ff4a3a, #b0120a); }
.big-money { font-size: 14px; }
.xp-num { color: #fff; }
.loot-chance { color: var(--money); font-size: 11px; display: flex; gap: 4px; align-items: center; margin-top: 2px; cursor: help; }
.loot-q { display: inline-flex; width: 15px; height: 15px; align-items: center; justify-content: center; border: 1px solid var(--gold); color: var(--gold); font-weight: bold; font-size: 10px; }
.job-cost .req { display: flex; gap: 4px; font-size: 11px; }
.job-cost .req b { font-size: 13px; color: #fff; }
.job-cost .req.missing b { color: #ff5544; }
.job-reqs { white-space: normal; }
.req-item { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; margin: 0 6px 2px 0; font: bold 11px Verdana, sans-serif; color: var(--text); vertical-align: top; }
.req-item .item-icon { border: 1px solid #555; background: #0d0d0d; }
.req-item.used span { color: var(--gold); }

/* ------------------------------------------------ buttons: yellow is "do it", red is "fight" */
.btn {
  background: var(--yellow-btn); color: #2a1a00; border: 1px solid #7a5a00; text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 2px #000; border-radius: 3px; padding: 4px 11px;
}
.btn:hover { background: var(--yellow-btn-hi); color: #2a1a00; text-decoration: none; }
.btn.red { background: linear-gradient(#ff5a44 0%, #d0200a 50%, #9a1200 100%); color: #fff; border-color: #4a0800; text-shadow: 0 -1px 0 #4a0800; }
.btn.red:hover { background: linear-gradient(#ff7a64 0%, #e0301a 50%, #aa2200 100%); color: #fff; }
.btn.green { background: linear-gradient(#77cc33, #4a9a11 50%, #2a5a00); color: #fff; border-color: #1a3300; text-shadow: 0 -1px 0 #1a3300; }
.btn.green:hover { background: linear-gradient(#88dd44, #5aaa22 50%, #3a6a10); color: #fff; }
.btn.gray { background: linear-gradient(#6a6a6a, #3a3a3a 50%, #1a1a1a); color: #fff; border-color: #000; }
.btn.gray:hover { background: linear-gradient(#7a7a7a, #4a4a4a 50%, #2a2a2a); color: #fff; }
.btn.blue { background: linear-gradient(#5a8ad8, #3b5998 50%, #1a3366); color: #fff; border-color: #0a1a44; }
.btn.blue:hover { background: linear-gradient(#6a9ae8, #4b69a8 50%, #2a4376); color: #fff; }
.btn.disabled, .btn:disabled { background: linear-gradient(#5a5a5a, #2e2e2e) !important; color: #999 !important; border-color: #222 !important; box-shadow: none; }
.btn.do-job { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; padding: 7px 13px; }
.btn.do-job .bolt { color: #2a1a00; }

/* ------------------------------------------------ messages after an action */
.flash { border-radius: 3px; }
.flash.good { background: linear-gradient(#1d2a12, #101a08); border-color: #5a8a2a; }
.flash.bad { background: linear-gradient(#2a1212, #180808); border-color: #8a2a2a; }
.flash .title { color: #fff; font-size: 13px; }

/* "Locked": a small red-and-gold tag */
.locked-stamp {
  display: inline-block; border: 1px solid #a02010; background: linear-gradient(#5a1a10, #2a0805); color: #ffd0a0; padding: 0 6px;
  font: bold 10px Verdana, sans-serif; letter-spacing: 1px; text-transform: uppercase; border-radius: 3px;
}
.tab-lock { display: none; }
.lock-icon { flex: none; }

/* ------------------------------------------------ modals, popups, banners */
.modal { background: #0d0a08; border: 2px solid var(--gold-line); border-radius: 4px; }
.modal .modal-title { background: var(--title-bg); color: var(--gold); }
.welcome-back, .ach-popup { border-color: var(--gold-line); border-radius: 3px; }

/* big screen stamps after missions, sieges and wins */
.fx-stamp {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%);
  border: 2px solid var(--gold); border-radius: 6px; padding: 10px 26px; text-align: center;
  background: linear-gradient(#2a1a04, #0a0602); box-shadow: 0 0 0 1px #000, 0 0 30px rgba(255, 160, 0, 0.45), 0 10px 30px #000;
  animation: fxStamp 2.2s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.fx-stamp-good { color: var(--money); } .fx-stamp-bad { color: #ff5544; border-color: #c22; } .fx-stamp-gold { color: var(--gold); }
.fx-stamp-text { font: bold 30px Georgia, serif; letter-spacing: 2px; text-transform: uppercase; text-shadow: 0 2px 0 #000, 0 0 12px currentColor; }
.fx-stamp-sub { font: bold 13px Verdana, sans-serif; color: #f2e6d0; margin-top: 4px; }
@keyframes fxStamp {
  0% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
  12% { transform: translate(-50%, -50%) scale(0.95); opacity: 1; }
  18% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}
.motion-reduced .fx-stamp { animation-name: fadeIn; animation-duration: 0.3s; }

/* ------------------------------------------------ v0.7: the daily envelope and missions */
.streak-modal { width: 640px; }
.envelopes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.envelope { text-align: center; padding: 6px 2px; border: 1px solid #3a2a10; border-radius: 3px; background: #141008; }
.envelope svg { width: 100%; max-width: 64px; height: auto; display: block; margin: 0 auto; }
.envelope.today { border: 2px solid var(--gold); background: #2a1e06; box-shadow: 0 0 12px rgba(255, 204, 51, 0.35); }
.envelope.future { opacity: 0.85; }
.envelope.big svg { filter: drop-shadow(0 0 5px #ffcc33); }
.envelope .flap { transform-origin: 32px 6px; transition: transform 0.5s; }
.envelope.opening .flap { transform: scaleY(-1); }
.envelope.opening { animation: envShake 0.4s; }
@keyframes envShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(3deg); } 50% { transform: rotate(-4deg); } 75% { transform: rotate(2deg); } }
.env-day { font: bold 11px Verdana, sans-serif; color: var(--gold); margin-top: 3px; }
.env-label { font-size: 10px; line-height: 1.25; color: var(--text); min-height: 26px; }
.missions { display: flex; flex-direction: column; gap: 8px; }
.mission { display: flex; gap: 8px; align-items: flex-start; position: relative; }
.mission-box { flex: none; width: 18px; height: 18px; border: 1px solid var(--gold-line); border-radius: 3px; background: #000; display: flex; align-items: center; justify-content: center; font: bold 13px Verdana, sans-serif; color: var(--money); margin-top: 1px; }
.mission.weekly .mission-box { color: var(--gold); font-size: 10px; }
.mission-title { font: bold 12px Verdana, sans-serif; color: #fff; }
.mission.done .mission-title { text-decoration: line-through; color: var(--muted); }
.mission-progress { display: flex; gap: 6px; align-items: center; margin: 3px 0; }
.mission-progress .progress { flex: 1; height: 8px; border-radius: 3px; overflow: hidden; }
.mission-stamp { position: absolute; right: 0; top: 2px; border: 1px solid var(--money); color: var(--money); background: #0d1a06; font: bold 10px Verdana, sans-serif; padding: 0 6px; border-radius: 3px; text-transform: uppercase; }
.mission-bonus { margin: 10px 0 8px; padding: 6px 8px; border: 1px dashed var(--gold-line); border-radius: 3px; font-size: 11px; background: #1a1204; }
.mission-bonus.done { border-color: var(--money); color: var(--money); background: transparent; }
.mission.weekly { border-top: 1px solid #3a2a10; padding-top: 8px; }
.streak-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid #3a2a10; font-size: 11px; flex-wrap: wrap; }
.streak-dots { display: inline-flex; gap: 3px; }
.streak-dots i { width: 12px; height: 12px; border: 1px solid var(--gold-line); border-radius: 2px; display: inline-block; background: #000; }
.streak-dots i.on { background: linear-gradient(#ffe27a, #d9a520); }
.streak-dots i.today { border: 2px solid #ff5544; }

/* the "while you were gone" story */
.away-story { font: 12px/1.6 'Courier New', Courier, monospace; color: #f2e6d0; background: #120c04; border: 1px solid var(--gold-line); border-left: 4px solid var(--gold); padding: 8px 10px; margin: 6px 0 8px; white-space: pre-wrap; cursor: pointer; border-radius: 3px; }
.away-story .caret { animation: caretBlink 0.8s steps(1) infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }

/* ------------------------------------------------ v0.7: sieges */
.siege-banner { display: flex; align-items: center; gap: 10px; border: 1px solid #c22; border-radius: 3px; background: linear-gradient(#3a0a08, #1a0404); padding: 6px 10px; margin-bottom: 8px; font-size: 12px; color: #ffe0d0; }
.siege-banner.attacker { border-color: var(--gold-line); background: linear-gradient(#2a1e06, #120c02); color: #f2e6d0; }
.siege-tag { font: bold 11px Verdana, sans-serif; text-transform: uppercase; letter-spacing: 1px; color: #fff; background: linear-gradient(#e33, #900); padding: 2px 7px; border-radius: 3px; }
.siege-banner.defender .siege-tag { animation: siegePulse 1.2s ease-in-out infinite; }
@keyframes siegePulse { 50% { background: #5a0000; box-shadow: 0 0 10px #f00; } }
.siege-clock { font: bold 18px Verdana, sans-serif; font-variant-numeric: tabular-nums; color: #fff; }
.siege-panel { border: 1px solid #c22; border-radius: 3px; background: linear-gradient(#2a0806, #120303); padding: 8px 10px; margin: 8px 0; }
.siege-head { display: flex; align-items: center; gap: 8px; }
.siege-fuse { height: 7px; border: 1px solid #000; border-radius: 3px; margin: 6px 0; background: #111; overflow: hidden; }
.siege-fuse > div { height: 100%; background: repeating-linear-gradient(45deg, #ff5544 0 6px, #a00 6px 12px); transition: width 1s linear; }
.siege-sides { display: flex; justify-content: center; align-items: center; gap: 18px; text-align: center; margin: 4px 0 6px; }
.siege-sides b { font: bold 22px Verdana, sans-serif; }
.siege-sides .vs { font: bold 20px Georgia, serif; color: var(--gold); }
.siege-invite { border-top: 1px dashed #5a2a1a; margin-top: 6px; padding-top: 6px; }

/* ------------------------------------------------ v0.7: rivals */
.rival-tag { display: inline-block; font: bold 9px Verdana, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #fff; background: linear-gradient(#e33, #900); padding: 0 5px; margin-right: 6px; border-radius: 3px; vertical-align: 1px; }
.rival-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rival-card { display: flex; gap: 8px; align-items: center; border: 1px solid #5a1a10; border-radius: 3px; padding: 6px; background: #160606; }
.head-to-head { margin-top: 6px; padding: 4px 8px; border: 1px solid var(--gold-line); border-radius: 3px; display: inline-block; background: #120c04; }

/* ------------------------------------------------ v0.7: side bets */
.bet-card { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #2a1e0c; }
.bet-card:last-child { border-bottom: 0; }
.bet-card.incoming { background: #1a1204; padding: 8px; border: 1px solid var(--gold-line); border-radius: 3px; margin-bottom: 6px; }
.bet-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.horse-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 3px 10px; margin: 6px 0; font-size: 12px; }
.horse-picker label { display: flex; align-items: center; gap: 4px; cursor: pointer; padding: 2px 4px; border-radius: 3px; }
.horse-picker label.on { outline: 1px solid var(--gold); background: #2a1e06; }
.horse-picker label.taken { opacity: 0.5; cursor: default; }
.sb-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.sb-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.sb-kinds label { border: 1px solid #3a2a10; border-radius: 3px; padding: 6px 8px; cursor: pointer; background: #0d0a06; }
.sb-kinds label.on { border-color: var(--gold); background: #2a1e06; }
.showdown-row { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 3px; }
.showdown-row .sd-name { width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.showdown-row .sd-val { width: 90px; text-align: right; font-variant-numeric: tabular-nums; }
.showdown-row.ahead .sd-name { font-weight: bold; color: var(--gold); }
.showdown-row .progress { height: 10px; border-radius: 3px; overflow: hidden; }
.sb-stamp { display: inline-block; font: bold 10px Verdana, sans-serif; text-transform: uppercase; border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; min-width: 54px; text-align: center; }

/* ------------------------------------------------ v0.7: Public Enemy (a wanted poster on the wall) */
.wanted-row { gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.pe-poster {
  width: 240px; flex: none; background: linear-gradient(#e9d9b0, #cdb47c); color: #3a2410; border: 1px solid #6a4a20;
  box-shadow: 3px 4px 10px #000; padding: 10px 12px 12px; text-align: center; transform: rotate(-1deg); font-family: Georgia, serif;
}
.wanted-head { font: bold 40px/1 Georgia, serif; letter-spacing: 4px; text-transform: uppercase; }
.wanted-sub { font: bold 9px Verdana, sans-serif; letter-spacing: 1px; text-transform: uppercase; border-top: 2px solid #3a2410; border-bottom: 2px solid #3a2410; margin: 4px 0 8px; padding: 2px 0; }
.wanted-photo { position: relative; display: inline-block; border: 3px solid #3a2410; line-height: 0; }
.wanted-photo .portrait { filter: sepia(0.5); }
.wanted-photo.hit { animation: cbShake 0.5s; }
@keyframes cbShake { 0%, 100% { transform: translate(0, 0); } 15% { transform: translate(-5px, 2px) rotate(-1deg); } 35% { transform: translate(5px, -2px) rotate(1deg); } 55% { transform: translate(-3px, 1px); } 75% { transform: translate(2px, 0); } }
.cb-dmg { position: absolute; top: 40%; font: bold 18px Verdana, sans-serif; color: #ff3322; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; opacity: 0; animation: cbDmg 1.1s ease-out forwards; pointer-events: none; line-height: 1; }
@keyframes cbDmg { 0% { opacity: 0; transform: translateY(0) scale(0.6); } 15% { opacity: 1; transform: translateY(-8px) scale(1.15); } 100% { opacity: 0; transform: translateY(-60px) scale(1); } }
.wanted-stamp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-16deg); border: 4px solid #b01010; color: #b01010; background: rgba(233, 217, 176, 0.8); font: bold 22px/1.1 Verdana, sans-serif; letter-spacing: 3px; text-transform: uppercase; padding: 2px 10px; }
.pe-poster.down .wanted-photo svg { filter: grayscale(1) contrast(1.1); }
.wanted-name { font: bold 20px Georgia, serif; margin-top: 8px; }
.wanted-title { font: bold 10px Verdana, sans-serif; text-transform: uppercase; color: #5a3a1a; margin-bottom: 6px; }
.cb-hp { height: 14px; border: 2px solid #3a2410; background: #f6ecd2; }
.cb-hp > div { height: 100%; background: repeating-linear-gradient(-45deg, #c22 0 6px, #900 6px 12px); transition: width 0.8s ease-out; }
.cb-hp-label { font: bold 12px Verdana, sans-serif; margin-top: 3px; font-variant-numeric: tabular-nums; }
.cb-me { margin-top: 8px; padding: 6px 8px; border: 1px dashed var(--gold-line); border-radius: 3px; background: #1a1204; }
.cb-trophy { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
tr.me-row td { background: #2a1e06 !important; }
html.motion-off .wanted-photo.hit, html.motion-reduced .wanted-photo.hit { animation: none; }

/* ------------------------------------------------ v0.7: richer news feed */
.feed-item { border-bottom: 1px solid #2a1e0c; }
.feed-amt { flex: none; font: bold 11px Verdana, sans-serif; font-variant-numeric: tabular-nums; padding: 0 5px; border-radius: 3px; margin-right: 6px; align-self: flex-start; }
.feed-amt.up { color: var(--money); background: #0d1a06; border: 1px solid #2a5a10; }
.feed-amt.down { color: #ff6655; background: #1a0606; border: 1px solid #5a1a10; }
.feed-go { font: bold 10px Verdana, sans-serif; white-space: nowrap; }
.feed-item.kind-siege, .feed-item.kind-siege_help { background: rgba(160, 20, 10, 0.12); }
.feed-item.kind-mission, .feed-item.kind-streak { background: rgba(255, 204, 51, 0.06); }
.feed-dot.siege, .feed-dot.turf_lost, .feed-dot.revenge { background: #f33; }
.feed-dot.mission, .feed-dot.streak, .feed-dot.cboss { background: var(--gold); }
.feed-dot.sidebet, .feed-dot.rival { background: #f90; }
.feed-dot.siege_help, .feed-dot.mention { background: #5aa8ff; }
.feed-dot.race, .feed-dot.turf, .feed-dot.turf_held, .feed-dot.heist { background: var(--money); }

/* ------------------------------------------------ in between the full page and phones */
@media (max-width: 1000px) {
  .game, .fb-bar-inner, .auth { width: auto; margin-left: 8px; margin-right: 8px; }
}

/* ------------------------------------------------ phones */
@media (max-width: 780px) {
  .game, .fb-bar-inner, .auth { margin-left: 0; margin-right: 0; }
  .content { padding: 6px 6px 14px; }
  .header { height: 66px; }
  .header .header-right .portrait { width: 40px; height: 40px; }
  .stats { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
  .stats-main { display: grid; grid-template-columns: 1fr 1fr; }
  .stats-main .stat { border-right: 0; border-bottom: 1px solid #3a2a10; padding: 6px 8px; }
  .stats-main .stat:nth-child(odd) { border-right: 1px solid #3a2a10; }
  .stats-main .stat:nth-child(n+3) { border-bottom: 0; }
  .stat .value { font-size: 16px; }
  .stat.level { min-width: 0; padding: 5px 10px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; margin: 4px 4px 6px; position: sticky; top: 0; z-index: 30; }
  .nav a { flex: none; padding: 9px 11px; font-size: 12px; }
  .tier-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .tier-tabs::-webkit-scrollbar { display: none; }
  .tier-tab { flex: none; min-width: 112px; padding-top: 8px; padding-bottom: 8px; }
  .unlock-note { font-size: 13px; }
  .jobs-table .job-desc { width: 100% !important; flex: 1 1 100%; }
  .btn { padding: 7px 12px; font-size: 12px; }
  .btn.small { padding: 4px 9px; font-size: 11px; }
  .btn.big { padding: 9px 16px; font-size: 14px; }
  .btn.do-job { padding: 10px 16px; font-size: 13px; }
  .envelopes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .env-label { font-size: 9px; }
  .siege-banner { flex-wrap: wrap; }
  .rival-cards { grid-template-columns: 1fr; }
  .sb-kinds { grid-template-columns: 1fr; }
  .bet-card { flex-wrap: wrap; }
  .pe-poster { width: 100%; transform: none; }
}

/* ==========================================================================
   v0.8 features
   ========================================================================== */
.rarity-unique { color: #ffcc33; text-shadow: 0 0 6px rgba(255, 60, 30, 0.6); }
.rarity-tag { display: inline-block; font: bold 9px Verdana, sans-serif; text-transform: uppercase; letter-spacing: 0.5px; padding: 0 4px; border-radius: 3px; border: 1px solid currentColor; vertical-align: 1px; margin-left: 3px; }
.rt-uncommon { color: #66cc33; } .rt-rare { color: #3399ff; } .rt-epic { color: #cc66ff; }
.rt-legendary { color: #ff9933; background: rgba(255, 140, 0, 0.12); }
.rt-unique { color: #ffcc33; background: linear-gradient(#5a1a10, #2a0805); border-color: #ffcc33; box-shadow: 0 0 6px rgba(255, 140, 0, 0.5); }
.subnav .badge { display: inline-block; margin-left: 4px; background: #c00; color: #fff; border-radius: 8px; font-size: 9px; line-height: 14px; padding: 0 4px; }

/* titles */
.title-popup .ach-badge { font-family: Georgia, serif; }
.title-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.title-card { border: 1px solid #3a2a10; border-radius: 3px; padding: 8px; background: #0d0a06; }
.title-card.got { border-color: var(--gold-line); background: linear-gradient(#2a1e06, #120c02); }
.title-name { font: bold 14px Georgia, serif; color: #aaa; }
.title-card.got .title-name { color: var(--gold); }
.title-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.title-chip { font: italic bold 11px Georgia, serif; color: var(--gold); border: 1px solid var(--gold-line); border-radius: 10px; padding: 1px 8px; background: #1a1204; cursor: help; }

/* fight streak meter */
.streak-meter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--gold-line); border-radius: 3px; background: var(--panel-bg); padding: 6px 10px; margin-bottom: 8px; }
.streak-meter .pips { display: inline-flex; gap: 3px; }
.streak-meter .pips i { width: 14px; height: 14px; border-radius: 7px; border: 1px solid #5a4a20; background: #000; display: inline-block; }
.streak-meter .pips i.on { background: radial-gradient(circle at 35% 35%, #fff2a0, #d9a520); border-color: #7a5a00; box-shadow: 0 0 6px rgba(255, 204, 51, 0.6); }
.streak-line-p { margin-top: 4px; color: #ff9933; }
.statue-line { margin-top: 4px; color: var(--gold); display: flex; gap: 6px; align-items: center; }

/* the auction */
.auction-banner { display: flex; align-items: center; gap: 10px; border: 1px solid var(--gold); border-radius: 3px; background: linear-gradient(#2a1e06, #120c02); padding: 5px 10px; margin-bottom: 8px; font-size: 12px; box-shadow: 0 0 12px rgba(255, 204, 51, 0.25); }
.auction-tag { font: bold 11px Verdana, sans-serif; text-transform: uppercase; letter-spacing: 1px; color: #2a1a00; background: var(--yellow-btn); padding: 2px 7px; border-radius: 3px; }
.auction-banner.open .auction-tag { animation: auctionPulse 1.4s ease-in-out infinite; }
@keyframes auctionPulse { 50% { box-shadow: 0 0 12px #ffcc33; } }
.auction-clock { font: bold 16px Verdana, sans-serif; font-variant-numeric: tabular-nums; color: #fff; }
.auction-clock.hot { color: #ff5544; animation: clockHot 0.8s steps(1) infinite; }
@keyframes clockHot { 50% { color: #ffcc33; } }
.auction-lot { display: flex; gap: 16px; align-items: flex-start; border: 2px solid var(--gold); border-radius: 4px; padding: 14px; margin-bottom: 10px;
  background: radial-gradient(ellipse at 20% 30%, #3a1a06 0%, #120804 60%, #0a0402 100%); box-shadow: 0 0 20px rgba(255, 160, 0, 0.2); }
.lot-art { text-align: center; flex: none; display: flex; flex-direction: column; align-items: center; }
.lot-art .item-icon { box-shadow: 0 0 18px rgba(255, 204, 51, 0.45); border-color: var(--gold); }
.lot-art .rarity-tag { display: inline-block; margin-top: 6px; }
.lot-name { font: bold 22px Georgia, serif; }
.lot-status { font-size: 13px; line-height: 1.7; }
.bid-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid #4a3a14; }

/* gifts and trades */
.give-modal { width: 620px; }
.item-picker { max-height: 260px; overflow-y: auto; border: 1px solid #3a2a10; border-radius: 3px; }
.pick-row { display: flex; gap: 6px; align-items: center; padding: 3px 6px; border-bottom: 1px solid #1e160a; }
.pick-row.on { background: #2a1e06; }
.trade-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.trade-h { font: bold 13px Verdana, sans-serif; color: var(--gold); margin: 0 0 4px; }
.trade-card { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 1px solid var(--gold-line); border-radius: 3px; background: #1a1204; margin-bottom: 6px; }
.trade-side { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; vertical-align: middle; }
.trade-item { display: inline-flex; align-items: center; gap: 3px; }
.sb-stamp.good { color: var(--money); }

/* statues */
.statue-row { gap: 16px; align-items: flex-start; }
.statue-card { display: flex; gap: 10px; align-items: center; border: 1px solid var(--gold-line); border-radius: 3px; padding: 8px 12px; background: linear-gradient(#2a1e06, #120c02); min-width: 220px; }
.me-line { background: #2a1e06; }
.map-statue { animation: statueGlow 3s ease-in-out infinite; }
@keyframes statueGlow { 50% { filter: drop-shadow(0 0 4px #ffcc33); } }
html.motion-off .map-statue, html.motion-reduced .map-statue { animation: none; }

@media (max-width: 780px) {
  .auction-lot { flex-direction: column; align-items: center; text-align: center; }
  .bid-row { justify-content: center; }
  .auction-banner { flex-wrap: wrap; }
  .trade-sides { grid-template-columns: 1fr; }
  .give-modal { width: 100%; }
  .trade-card { flex-wrap: wrap; }
}

/* ==========================================================================
   v0.9 the territory map and battle replays
   ========================================================================== */
.nyc-map { width: 100%; height: auto; border: 1px solid var(--gold-line); border-radius: 3px; box-shadow: 0 0 0 1px #000, 0 4px 14px rgba(0, 0, 0, 0.7); }
.nyc-map .borough:hover .bpath { filter: brightness(1.3) drop-shadow(0 2px 2px #000); }
.nyc-map .borough.attacking .bpath { animation: boroughPulse 0.45s ease-in-out infinite alternate; }
.nyc-map .borough.captured .bpath { animation: captureFill 1.6s ease-out; }
.nyc-map .borough.besieged .bpath { stroke: #ff5544; stroke-width: 2.2; stroke-dasharray: 6 4; animation: siegeDash 1.2s linear infinite; }
@keyframes siegeDash { to { stroke-dashoffset: -20; } }
.nyc-map .siege-mark { animation: auctionPulse 1.2s ease-in-out infinite; }
.map-name { font: bold 19px Georgia, serif; fill: #fff; stroke: #000; stroke-width: 3.5px; paint-order: stroke; text-anchor: middle; letter-spacing: 0.5px; }
.map-owner { font: bold 10px Verdana, sans-serif; fill: #ffe9a8; stroke: #000; stroke-width: 2.5px; paint-order: stroke; text-anchor: middle; }
.map-owner.mine { fill: #ffcc33; }
.map-region { font: bold 11px Verdana, sans-serif; letter-spacing: 3px; fill: #6a5a40; text-anchor: middle; }
.map-water { font: italic 11px Georgia, serif; fill: #4a78a8; text-anchor: middle; letter-spacing: 1px; }
.map-bridge { stroke: #c9a050; stroke-width: 2.4; stroke-linecap: round; opacity: 0.85; }
.map-landmark circle { fill: #ffcc33; stroke: #000; stroke-width: 1; }
.map-landmark text { font: 8.5px Verdana, sans-serif; fill: #f0dca0; stroke: #000; stroke-width: 2px; paint-order: stroke; }
.map-compass circle { fill: rgba(0, 0, 0, 0.45); stroke: #b8860b; stroke-width: 1; }
.map-compass path { fill: #b8860b; stroke: #000; stroke-width: 0.6; }
.map-compass .needle { fill: #ffcc33; }
.map-compass text { font: bold 11px Georgia, serif; fill: #ffcc33; }
.map-cartouche { fill: rgba(10, 6, 2, 0.85); stroke: #b8860b; stroke-width: 1.2; }
.map-title { font: bold 13px Georgia, serif; fill: #ffcc33; letter-spacing: 3px; }
.map-statue-name { font: bold 10px Georgia, serif; fill: #ffcc33; stroke: #000; stroke-width: 2.5px; paint-order: stroke; }
.map-statue-sub { font: 8px Verdana, sans-serif; fill: #e0c890; stroke: #000; stroke-width: 2px; paint-order: stroke; }
.territory-top { align-items: flex-start; }
.territory-top .map-wrap { flex: 0 1 560px; min-width: 0; }

/* the replay */
.replay-modal { width: 760px; }
.replay-modal .modal-body { padding: 8px; }
.replay-map { position: relative; }
.replay-map .nyc-map { cursor: default; }
.army .token { transition: opacity 0.6s; }
.token-bg { stroke-width: 1.5; }
.token-bg.atk { fill: #3a0a06; stroke: #ff5544; }
.token-bg.def { fill: #2a2006; stroke: #ffcc33; }
.token-count-bg { fill: #000; stroke: #b8860b; stroke-width: 0.8; }
.token-count { font: bold 10px Verdana, sans-serif; fill: #fff; text-anchor: middle; font-variant-numeric: tabular-nums; }
.token.hit { animation: tokenHit 0.45s ease-out; }
@keyframes tokenHit { 0% { transform: translate(0, 0); } 30% { transform: translate(-3px, 1px); } 60% { transform: translate(3px, -1px); } 100% { transform: translate(0, 0); } }
.army-beaten { opacity: 0.25; transition: opacity 1s; }
.march { transition: transform 1s cubic-bezier(0.3, 0.7, 0.4, 1); }
.tracer { stroke: #ffdd66; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 10 200; animation: tracer 0.35s linear both; filter: drop-shadow(0 0 3px #ff9900); }
@keyframes tracer { from { stroke-dashoffset: 0; opacity: 1; } to { stroke-dashoffset: -210; opacity: 0.2; } }
.burst { fill: #ffcc33; opacity: 0; animation: burst 0.45s ease-out both; }
@keyframes burst { 0% { opacity: 0.9; transform-box: fill-box; transform-origin: center; transform: scale(0.2); } 100% { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(1.6); } }
.loss-float { font: bold 16px Verdana, sans-serif; fill: #ff5544; stroke: #000; stroke-width: 3px; paint-order: stroke; text-anchor: middle; animation: lossFloat 0.8s ease-out both; }
@keyframes lossFloat { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-18px); } }
.replay-stamp rect { stroke-width: 3; }
.replay-stamp rect.won { fill: rgba(90, 10, 6, 0.9); stroke: #ff5544; }
.replay-stamp rect.held { fill: rgba(40, 30, 4, 0.9); stroke: #ffcc33; }
.replay-stamp text { font: bold 22px Georgia, serif; fill: #fff; letter-spacing: 4px; }
.replay-stamp text.stamp-sub { font: bold 11px Verdana, sans-serif; letter-spacing: 0.5px; fill: #ffd76a; }
.replay-stamp { animation: stampIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; transform-box: fill-box; transform-origin: center; }
@keyframes stampIn { from { opacity: 0; transform: scale(2.2); } to { opacity: 1; transform: scale(1); } }
.replay-hud { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; margin-top: 8px; align-items: stretch; }
.replay-vs { text-align: center; display: flex; flex-direction: column; justify-content: center; }
.replay-vs .vs { font: bold 26px Georgia, serif; color: var(--gold); }
.replay-vs .round { font: bold 12px Verdana, sans-serif; color: #fff; }
.side-card { border: 1px solid #3a2a10; border-radius: 3px; padding: 6px 8px; background: #0d0a06; }
.side-card.atk { border-left: 4px solid #ff5544; }
.side-card.def { border-left: 4px solid #ffcc33; }
.side-card.winner { box-shadow: 0 0 12px rgba(255, 204, 51, 0.45); border-color: var(--gold); }
.side-title { font: bold 10px Verdana, sans-serif; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.win-tag { margin-left: 6px; color: #2a1a00; background: var(--yellow-btn); padding: 0 5px; border-radius: 3px; }
.side-name { font: bold 13px Verdana, sans-serif; color: #fff; margin: 2px 0 4px; }
.side-power { font-size: 11px; }
.power-bar { height: 6px; background: #000; border: 1px solid #333; border-radius: 3px; overflow: hidden; margin: 2px 0 4px; }
.side-card.atk .power-bar > div { height: 100%; background: linear-gradient(#ff7a64, #b0120a); }
.side-card.def .power-bar > div { height: 100%; background: linear-gradient(#ffe27a, #d9a520); }
.unit-line { display: grid; grid-template-columns: 1fr auto auto; gap: 4px; font-size: 11px; font-variant-numeric: tabular-nums; }
.unit-line b { min-width: 24px; text-align: right; }
.replay-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
html.motion-off .march, html.motion-off .token.hit, html.motion-reduced .token.hit { animation: none; transition: none; }
@media (max-width: 780px) {
  .replay-modal { width: 100%; }
  .replay-hud { grid-template-columns: 1fr 1fr; }
  .replay-vs { grid-column: span 2; order: -1; flex-direction: row; gap: 10px; align-items: center; justify-content: center; }
  .map-landmark text { display: none; }
  .territory-top .map-wrap { flex: 0 0 auto; width: 100%; }
}
.replay-map .nyc-map { max-height: 60vh; width: auto; max-width: 100%; margin: 0 auto; display: block; }
.replay-modal { max-height: 96vh; }

/* ---------------------------------------------------------------- v0.9 prestige */
.prestige-star { vertical-align: middle; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8)); }
.stat.level .level-badge { position: relative; }
.level-prestige { position: absolute; right: -6px; top: -6px; cursor: pointer; }
.xpbar.capped > div { background: linear-gradient(90deg, #b8860b, #ffd76a, #b8860b); background-size: 200% 100%; animation: capShine 2.4s linear infinite; }
@keyframes capShine { to { background-position: -200% 0; } }
.prestige-ready { animation: auctionPulse 1.4s ease-in-out infinite; }
.profile-prestige { color: var(--gold, #e8b923); font-weight: bold; white-space: nowrap; }
.prestige-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--gold-line); background: linear-gradient(#1a1406, #0d0a03); border-radius: 3px; }
.prestige-big { width: 72px; text-align: center; }
.prestige-big .prestige-star { animation: starGlow 2.4s ease-in-out infinite alternate; }
@keyframes starGlow { from { filter: drop-shadow(0 0 2px #000); } to { filter: drop-shadow(0 0 10px rgba(255, 200, 60, 0.7)); } }
.prestige-none { font-size: 11px; color: #777; border: 1px dashed #555; border-radius: 50%; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; text-align: center; margin: 0 auto; }
.prestige-rank { font: bold 20px Georgia, serif; color: #fff; }
.prestige-ready-panel .panel { border-color: #ffcc33; box-shadow: 0 0 14px rgba(255, 200, 60, 0.35); }
.prestige-keep { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.prestige-keep ul { margin: 4px 0 0; padding-left: 18px; font-size: 12px; }
.btn.big { font-size: 15px; padding: 8px 26px; }
.prestige-ladder tr.locked td { opacity: 0.45; }
.prestige-ladder tr.locked .prestige-star { filter: grayscale(1); }
.prestige-ladder tr.next td { background: rgba(255, 200, 60, 0.08); }
.prestige-road { height: 10px; margin-top: 4px; }
.city-locked { margin-bottom: 8px; }
.locked-tag { display: inline-block; font: bold 10px Verdana, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #ffd76a; border: 1px solid #b8860b; padding: 1px 6px; margin-right: 6px; background: #2a1e05; }
.city-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.city-idea { padding: 4px 10px; border: 1px solid var(--gold-line); border-radius: 12px; cursor: pointer; font-size: 12px; background: #1a1406; }
.city-idea.on { background: #b8860b; color: #000; font-weight: bold; }
.prestige-confirm { max-width: 460px; }
@media (max-width: 780px) {
  .prestige-head { flex-direction: column; text-align: center; }
  .prestige-keep { grid-template-columns: 1fr; }
  .city-choose input { width: 100%; }
}
