:root { color-scheme: dark; font-family: system-ui, sans-serif; color: #fff; background: #111c2b; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button { color: #fff; cursor: pointer; border: 1px solid #647993; border-radius: 9px; background: #273c57; padding: 10px 16px; }
button:hover { background: #365776; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #90f4ff; outline-offset: 3px; }
.entry { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 95%, #397e9b 0%, #173956 35%, #101a2d 75%); }
.entry-card { width: min(100%, 420px); background: #17263beF; border: 1px solid #6883a0; border-radius: 20px; padding: 32px; box-shadow: 0 24px 80px #050d1cb3; }
.crest { display: block; color: #ffd552; text-align: center; font-size: 48px; line-height: 1; }
h1 { text-align: center; font-size: 34px; margin: 0; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tabs button { background: transparent; border-color: transparent; color: #c5d5e5; }
.tabs button.active { border-color: #448dda; color: white; background: #1c4772; }
form { display: grid; gap: 7px; margin-top: 20px; }
label { font-weight: 700; font-size: 13px; margin-top: 8px; }
#email-field { display: grid; gap: 7px; }
input { min-height: 44px; border: 1px solid #566d87; background: #111d2e; color: white; border-radius: 8px; padding: 10px; }
form small, .hint { color: #b6c8db; font-size: 12px; line-height: 1.5; }
.primary { margin-top: 14px; background: linear-gradient(#188ff0, #0563bd); border-color: #61b5f9; font-weight: 800; }
.status { min-height: 20px; color: #ffcfaa; font-size: 13px; }
/* Game screen */
.game-screen { height: 100dvh; overflow: hidden; position: relative; background: #738795; }
#game { position: absolute; inset: 0; touch-action: none; }
#game canvas { display: block; }
#game canvas:focus-visible { outline: 3px solid #90f4ff; outline-offset: -3px; }
.game-top { position: absolute; inset: 0 0 auto; min-height: 72px; display: flex; align-items: center; gap: 18px; padding: 7px 18px; background: linear-gradient(180deg,#263a50,#101f32); border-bottom: 1px solid #536a83; box-shadow: 0 6px 20px #07132280; z-index: 2; }
.brand, .identity { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand { flex: none; padding-right: 18px; border-right: 1px solid #728398; }
.brand img { display: block; width: 160px; height: auto; }
.identity { min-width: 154px; }
.identity strong, .identity small { display: block; }
.identity small { color: #aec4d9; font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.shield { display: grid; place-items: center; width: 38px; height: 44px; background: linear-gradient(#10b5ff,#0569c9); border: 2px solid #b1e4ff; border-radius: 9px 9px 15px 15px; color: #ffe168; font-size: 21px; }
.empire-bar { display: grid; grid-template-columns: repeat(4, minmax(95px, 1fr)); flex: 1; max-width: 585px; margin: 0 auto; border: 1px solid #415c78; border-radius: 10px; background: #102238; box-shadow: inset 0 1px 5px #050d1b80; }
.resource { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 4px 12px; position: relative; }
.resource + .resource::before { content: ''; position: absolute; left: 0; height: 30px; border-left: 1px solid #486079; }
.resource-icon { font-size: 25px; line-height: 1; color: #e8f5ff; }

.resource small, .resource strong, .resource-content > span { display: block; white-space: nowrap; }
.resource small { color: #c1d1e0; font-size: 10px; } .resource strong { font-size: 14px; line-height: 1.1; } .resource-content > span { color: #5be38b; font-size: 10px; font-weight: 700; } .resource .negative { color: #ff8e8e; }
.game-top > button { margin-left: auto; white-space: nowrap; }
.map-status, .territory, .waiting-card, .camera button { background: linear-gradient(155deg,#1c3048f5,#101f32f7); border: 1px solid #61758c; box-shadow: 0 5px 18px #0c152955; border-radius: 12px; }
.map-status { position: absolute; left: 50%; top: 82px; transform: translateX(-50%); padding: 8px 14px; font-size: 12px; color: #e3f1ff; max-width: 70%; text-align: center; transition: opacity .5s ease; }
.map-status.guidance-hidden { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .map-status { transition: none; } }
.territory { position: absolute; z-index: 1; right: 8px; top: 80px; bottom: 12px; width: min(408px, calc(100% - 24px)); padding: 14px 16px; overflow-y: auto; }
.territory-heading { display: flex; gap: 10px; align-items: center; }
.territory-heading h2 { margin: 0; font-size: 19px; flex: 1; }
.territory-heading h2 { min-width: 0; overflow-wrap: anywhere; }
.territory-name-display { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 8px; }
.territory-name-display strong { min-width: 0; overflow-wrap: anywhere; }
.edit-territory-name { display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; background: transparent; border-color: transparent; color: #b6d8ed; }
.territory-name-controls { display: flex; gap: 7px; }
.territory-name-controls input { min-width: 0; flex: 1; }
.territory-name-controls button { white-space: nowrap; }
#territory-name-form { margin: 0 0 8px; }
#territory-name-status { margin: 0; }
.territory-heading button { font-size: 22px; padding: 0; width: 36px; height: 36px; }
.territory-icon { display: grid; place-items: center; width: 36px; height: 36px; font-size: 30px; color: #75deff; }
.territory-tabs { display: grid; grid-template-columns: repeat(4,1fr); gap: 3px; margin: 14px 0 12px; border-bottom: 1px solid #3b5570; }
.territory-tabs button { min-width: 0; padding: 10px 3px; background: transparent; border: 0; border-radius: 10px 10px 0 0; font-size: 12px; font-weight: 700; }
.territory-tabs button[aria-selected="true"] { background: linear-gradient(#098de8,#0058b7); box-shadow: inset 0 -3px #59d7ff; }
.territory-tabs button:disabled { opacity: .4; cursor: not-allowed; }
.territory-summary { display: flex; align-items: center; gap: 10px; min-height: 58px; margin-bottom: 9px; }
.territory-summary > div:first-of-type { flex: 1; min-width: 0; font-size: 13px; }
.territory-summary small { display: block; color: #adc2d7; margin-top: 3px; }
.summary-icon { display: grid; place-items: center; width: 36px; height: 36px; font-size: 24px; border-radius: 7px; background: linear-gradient(#15aeff,#006ed3); }
.specialization-badge { text-align: center; background: #213953; border: 1px solid #3d5772; border-radius: 10px; padding: 6px 10px; }
.specialization-badge small { font-size: 10px; margin: 0; }
.specialization-badge strong { font-size: 12px; color: #ffe28a; }
.stat-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 7px 0; }
.stat-card { display: flex; gap: 10px; align-items: center; min-width: 0; min-height: 56px; padding: 8px 10px; background: linear-gradient(115deg,#1b334e,#172a41); border: 1px solid #344b66; border-radius: 10px; }
.stat-card > span { font-size: 24px; line-height: 1; color: #e7f4ff; }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { font-size: 11px; line-height: 1.2; color: #c6d5e5; } .stat-card strong { font-size: 13px; margin-top: 4px; }
.positive { color: #58e18d; }
.territory h3 { margin: 14px 2px 5px; color: #fff; font-size: 12px; } .territory h3 span { color: #b7cde0; font-weight: 500; }
.detail-strip { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 6px; padding: 10px 12px; min-height: 39px; background: #172d46; border: 1px solid #344b66; border-radius: 9px; color: #c6d7e8; font-size: 12px; }
.detail-strip strong { color: #fff; text-align: right; }
.manage-button { width: 100%; padding: 13px; }
.panel-intro, .panel-note { color: #bccfe0; font-size: 13px; line-height: 1.5; }
.panel-note { padding: 12px 0; }
#agriculture-allocation, #mining-allocation { display: grid; gap: 7px; }
#economy-form { margin-top: 12px; } #economy-form select { min-height: 40px; border: 1px solid #566d87; border-radius: 8px; background: #111d2e; color: white; padding: 8px; } #economy-form input { min-height: 40px; }
.camera { position: absolute; right: 18px; bottom: 18px; display: grid; gap: 7px; }
.game-screen:has(.territory:not([hidden])) .camera { right: 426px; }
.camera button { width: 46px; min-height: 46px; padding: 0; font-size: 26px; }
.waiting { position: absolute; inset: 0; display: grid; place-items: center; padding: 80px 20px 20px; background: #111b2b99; z-index: 3; }
.waiting-card { max-width: 400px; text-align: center; padding: 28px; line-height: 1.5; }.waiting-card p { color: #c5d4e2; }
@media (max-width: 1050px) { .game-top { gap: 10px; } .brand { padding-right: 10px; } .brand img { width: 110px; } .identity { min-width: 110px; } .resource { padding: 4px 7px; } }
@media (max-width: 700px) { .game-top { min-height: 62px; flex-wrap: wrap; padding: 6px 10px; } .brand { display: flex; padding-right: 6px; } .brand img { width: 68px; } .identity { min-width: 0; } .identity > span:last-child { min-width: 0; max-width: 76px; } .identity strong { overflow: hidden; text-overflow: ellipsis; } .shield { width: 32px; height: 36px; } .game-top > button { padding: 8px 10px; } .empire-bar { order: 3; width: 100%; max-width: none; flex-basis: 100%; } .resource { gap: 5px; } .resource-icon { font-size: 18px; } .resource strong { font-size: 12px; } .resource small, .resource-content > span { font-size: 9px; } .map-status { top: 130px; } .territory { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: min(56dvh, 540px); } .game-screen:has(.territory:not([hidden])) .camera { right: 10px; bottom: calc(min(56dvh, 540px) + 18px); } .camera { right: 10px; bottom: 12px; } .entry-card { padding: 25px; } }
@media (max-width: 380px) { .empire-bar { grid-template-columns: repeat(4, minmax(0,1fr)); } .resource { padding: 4px; } .resource-icon { display: none; } }
@media (max-height: 500px) and (min-width: 701px) { .territory { top: 78px; bottom: 6px; } }

.reach-warning { margin: 12px 0 0; padding: 10px 12px; border: 1px solid #f17078; border-radius: 8px; background: #57232edb; color: #ffe5e6; font-size: 12px; line-height: 1.4; }

.growth-card { margin-top: 8px; padding: 11px 12px; border: 1px solid #36546b; border-radius: 10px; background: #142b40; }
.growth-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #d6e5f0; font-size: 12px; }
.growth-heading strong { color: #fff; font-size: 14px; }
.growth-secondary { color: #adc5d9; font-size: 11px; }
.growth-progress { height: 8px; margin: 9px 0 6px; overflow: hidden; border-radius: 8px; background: #0a1c2b; }
.growth-progress span { display: block; height: 100%; background: linear-gradient(90deg,#15a7dd,#6be7a0); border-radius: inherit; }
.growth-card p { margin: 8px 0 0; color: #b8cfdf; font-size: 11px; line-height: 1.45; }
@media (max-width: 420px) { .territory-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.resource { width: 100%; border: 0; border-radius: 0; color: inherit; background: transparent; text-align: left; }
.resource:hover, .resource:focus-visible { background: #244561; }
.resource:first-child { border-radius: 9px 0 0 9px; }
.resource:last-child { border-radius: 0 9px 9px 0; }
.resource-dialog { width: min(420px, calc(100vw - 32px)); max-height: min(620px, calc(100dvh - 32px)); overflow-y: auto; border: 1px solid #6a829b; border-radius: 14px; background: linear-gradient(155deg,#203750,#101f32); color: #fff; box-shadow: 0 16px 60px #050d1dcc; padding: 20px; }
.resource-dialog::backdrop { background: #050c19b8; }
.resource-dialog-heading { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.resource-dialog-heading small { color: #a9c4df; font-size: 10px; letter-spacing: .1em; font-weight: 800; }
.resource-dialog-heading h2 { margin: 4px 0 0; font-size: 20px; }
.resource-dialog-heading button { width: 38px; height: 38px; padding: 0; font-size: 24px; }
.resource-dialog > p { color: #bed1e2; font-size: 13px; line-height: 1.5; }
.resource-dialog dl { margin: 16px 0; }
.resource-dialog dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid #40566e; font-size: 13px; }
.resource-dialog dt { color: #bcd0e2; } .resource-dialog dd { margin: 0; text-align: right; font-weight: 700; }
.resource-dialog .resource-dialog-note { margin-bottom: 0; font-size: 12px; color: #9fb8cc; }

.action-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.action-buttons button { margin: 0; min-width: 0; min-height: 44px; padding: 10px 4px; font-size: 12px; font-weight: 700; }
#start-attack { background: linear-gradient(#188ff0, #0563bd); border-color: #61b5f9; }
#start-raid { background: linear-gradient(#c94b41, #8e2828); border-color: #f18476; }
#start-relocation { background: linear-gradient(#26876d, #17614f); border-color: #6ac6a8; }
@media (max-width: 360px) { .action-buttons { grid-template-columns: 1fr; } }
#march-military-field { display: grid; gap: 7px; }
.cancel-march { position: fixed; z-index: 2; left: 50%; bottom: 0; display: grid; place-items: center; width: 56px; height: 56px; padding: 0; color: #ff626b; background: #18344d; border-color: #e85b65; border-radius: 12px 12px 0 0; transform: translate(-50%, 100%); visibility: hidden; pointer-events: none; transition: transform .25s ease, visibility 0s linear .25s; }
.cancel-march.is-visible { transform: translate(-50%, 0); visibility: visible; pointer-events: auto; transition: transform .25s ease, visibility 0s; }
@media (prefers-reduced-motion: reduce) { .cancel-march, .cancel-march.is-visible { transition: none; } }
.march-list { position: absolute; z-index: 1; left: 16px; top: 86px; width: min(220px, calc(100vw - 32px)); max-height: min(35dvh, 300px); overflow-y: auto; padding: 12px 14px; border: 1px solid #7892aa; border-radius: 12px; background: #102337f2; box-shadow: 0 5px 18px #0c152955; font-size: 12px; }
.minimap { position: absolute; z-index: 1; left: 12px; bottom: 12px; width: min(240px, 36vw); aspect-ratio: 8 / 5; overflow: hidden; border: 2px solid #a7bacb; border-radius: 14px; background: #1b2b43; box-shadow: 0 5px 18px #0c152955; pointer-events: none; }
.minimap canvas { display: block; width: 100%; height: 100%; }
.march-list > strong { display: block; font-size: 14px; }
.march-list ul { padding: 0; margin: 7px 0 0; list-style: none; }
.march-list li { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-top: 1px solid #40566e; }
.march-list li:last-child { padding-bottom: 0; }
.march-event-icon { display: grid; place-items: center; flex: none; width: 24px; height: 24px; font-size: 22px; line-height: 1; }
.march-event-icon.enroute { color: #20b8ff; }
.march-event-icon.battle { color: #fff; background: #ce2639; border-radius: 3px; font-size: 19px; }
.march-event-icon.complete, .march-event-icon.failed { width: 21px; height: 21px; margin: 1px; border-radius: 50%; color: #fff; font-size: 19px; font-weight: 800; background: #23ba55; }
.march-event-icon.failed { background: #c94748; }
.march-event-content { display: grid; min-width: 0; gap: 2px; text-align: left; line-height: 1.2; }
.march-event-content strong { color: #fff; font-size: 12px; }
.march-event-content span { color: #c2d2e2; font-size: 11px; overflow-wrap: anywhere; }
@media (max-width: 700px) { .march-list { top: 128px; max-width: 180px; max-height: 20dvh; } .minimap { left: 10px; bottom: 12px; width: min(180px, 36vw); } .game-screen:has(.territory:not([hidden])) .minimap { bottom: calc(min(56dvh, 540px) + 18px); } }

.battle-dialog { width: min(360px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 18px 22px 20px; color: #fff; border: 1px solid #61748f; border-radius: 14px; text-align: center; background: radial-gradient(ellipse at 50% -20%, #744050 0, #202334 48%, #11223a 100%); box-shadow: 0 18px 60px #050d1dcc; }
.battle-dialog::backdrop { background: #050c19b8; }
.battle-heading { display: flex; align-items: center; justify-content: center; position: relative; min-height: 34px; }
.battle-heading h2 { margin: 0; font-size: 17px; }
.battle-heading button { position: absolute; right: -9px; top: -8px; width: 34px; height: 34px; padding: 0; font-size: 21px; background: #18263b; }
.battle-location { color: #bad0e1; font-size: 12px; margin: 7px 0 13px; }
.battle-sides { display: grid; grid-template-columns: 1fr 48px 1fr; align-items: center; gap: 8px; }
.battle-side { display: grid; justify-items: center; gap: 3px; }
.battle-side strong { font-size: 20px; } .battle-side small { color: #c1d2e3; font-size: 11px; } .battle-side > span:last-child { color: #c1d2e3; font-size: 11px; }
.battle-crest { display: grid; place-items: center; width: 40px; height: 44px; clip-path: polygon(50% 0, 92% 21%, 92% 80%, 50% 100%, 8% 80%, 8% 21%); border-radius: 5px; font-size: 26px; color: #fff; box-shadow: 0 0 16px #0008; }
.attacker-crest { background: linear-gradient(#26c3ff,#0060d6); } .defender-crest { background: linear-gradient(#ff7580,#c51d3c); }
.battle-swords { font-size: 32px; animation: battle-clash 1.1s ease-in-out infinite alternate; }
.battle-meter { height: 14px; border-radius: 12px; margin: 16px 0 10px; overflow: hidden; background: linear-gradient(90deg,#f15d73,#bc2848); box-shadow: inset 0 0 4px #ffffff70; }
.battle-meter span { display: block; height: 100%; background: linear-gradient(90deg,#0081ed,#59c8ff); border-radius: inherit; transition: width .3s ease; }
.battle-caption, .battle-outcome { font-size: 12px; line-height: 1.45; margin: 6px 0 0; color: #d1e2ed; }
.battle-outcome { color: #70eaa1; font-weight: 800; }
.battle-dialog.resolved .battle-swords { animation: none; }
.march-list li button { background: transparent; border: 0; border-radius: 2px; padding: 0; font-size: inherit; }
.march-list li button:hover strong { text-decoration: underline; }
@keyframes battle-clash { from { transform: rotate(-8deg) scale(.94); } to { transform: rotate(8deg) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .battle-swords { animation: none; } .battle-meter span { transition: none; } }

.recruit-form { margin-top: 20px; padding-top: 14px; border-top: 1px solid #40566e; }
.recruit-form h3 { margin: 0; font-size: 15px; }.recruit-form > p { color: #bdd1e2; margin: 0; font-size: 12px; line-height: 1.45; }
.recruit-form button:disabled { opacity: .5; cursor: not-allowed; }
.recruit-exchange { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 5px; padding: 10px 0 5px; }
.recruit-exchange div { min-width: 0; display: grid; justify-items: center; gap: 4px; padding: 9px 3px; background: #19344d; border: 1px solid #405c75; border-radius: 9px; text-align: center; }
.recruit-exchange span { font-size: 24px; line-height: 1; }.recruit-exchange strong { font-size: 11px; overflow-wrap: anywhere; }.recruit-exchange b { color: #a9c9df; }
.recruit-form .recruit-available { color: #a9c4d9; }.recruit-form .status { color: #ffcfaa; min-height: 20px; }

/* Your Empire */
.game-top > .identity { margin-left: 0; padding: 3px 7px; text-align: left; background: transparent; border-color: transparent; }
.empire-dialog { width: min(760px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0; border: 1px solid #6a829b; border-radius: 16px; color: #fff; background: linear-gradient(155deg,#203750,#101f32); box-shadow: 0 16px 60px #050d1dcc; overflow: hidden; }
.empire-dialog[open] { display: flex; flex-direction: column; }
.empire-dialog::backdrop { background: #050c19c9; }
.empire-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 10px; }
.empire-dialog-header small { color: #a9c4df; font-weight: 800; font-size: 10px; letter-spacing: .1em; }
.empire-dialog-header h2 { margin: 4px 0 0; font-size: 22px; }
.empire-dialog-header button { width: 38px; height: 38px; padding: 0; font-size: 24px; }
.empire-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; padding: 0 22px; border-bottom: 1px solid #40566e; }
.empire-tabs button { min-width: 0; padding-inline: 4px; border: 0; border-radius: 8px 8px 0 0; background: transparent; font-weight: 700; }
.empire-tabs button[aria-selected="true"] { background: #086ebd; box-shadow: inset 0 -3px #59d7ff; }
.empire-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px 24px; }
.empire-content h3 { margin: 22px 0 10px; font-size: 16px; }
.empire-content h3:first-child { margin-top: 0; }
.empire-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.empire-card, .empire-section, .empire-event { background: #172d46; border: 1px solid #344b66; border-radius: 10px; padding: 12px; }
.empire-card span, .empire-card strong, .empire-event span { display: block; }
.empire-card span { font-size: 12px; color: #c6d5e5; }
.empire-card strong { margin-top: 8px; overflow-wrap: anywhere; }
.empire-section { margin: 8px 0; }
.empire-section h4 { margin: 0 0 8px; }
.empire-section .detail-strip { padding: 6px 0; border: 0; background: transparent; }
.empire-note { color: #c5d4e2; font-size: 13px; line-height: 1.5; }
.empire-event { margin: 6px 0; }
.empire-event span { margin-top: 6px; font-size: 12px; color: #c5d4e2; }
.empire-content a { color: #90ddff; overflow-wrap: anywhere; text-align: right; }
#alliance-content form { display: grid; gap: 8px; max-width: 360px; }
#alliance-content form label { display: grid; gap: 6px; }
#alliance-content .empire-section button { margin: 8px 8px 0 0; }
.ranking-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.ranking-controls button[aria-pressed="true"] { background: #086ebd; border-color: #61b5f9; }
@media (max-width: 600px) { .empire-dialog-header { padding: 16px 14px 10px; } .empire-tabs { padding: 0 14px; } .empire-content { padding: 14px; } .empire-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.ranking-current { border-color: #5fd7ff; background: #1c4c71; }

/* Shared sliders for workforce allocation and recruitment. */
.slider-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.slider-heading label { margin: 0; }
.slider-heading output { color: #9be5ff; font-weight: 700; }
input.quantity-slider, #economy-form input.quantity-slider { width: 100%; min-height: 32px; margin: 0; padding: 0; border: 0; background: transparent; accent-color: #29b9ef; cursor: pointer; }
input.quantity-slider:disabled { opacity: .5; cursor: not-allowed; }
.slider-limits { display: flex; justify-content: space-between; color: #a9c4d9; font-size: 11px; }

/* Credits wallet */
.top-actions { display: flex; align-items: center; flex: none; gap: 8px; margin-left: auto; }
.top-actions button { min-height: 44px; white-space: nowrap; }
.top-actions .credits-slot { display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: #102238; border-color: #74683d; text-align: left; }
.notification-button { position: relative; display: grid; place-items: center; width: 44px; padding: 0; }
#notification-count { position: absolute; top: -6px; right: -6px; }
#notification-count:not(:empty) { min-width: 18px; padding: 2px 4px; border-radius: 10px; background: #d94e59; color: #fff; font-size: 10px; font-weight: 800; line-height: 1.2; }
#logout { display: flex; align-items: center; justify-content: center; gap: 7px; }
#notification-items { max-height: 40dvh; overflow-y: auto; padding-left: 20px; color: #c5d4e2; font-size: 13px; line-height: 1.5; }
#notification-items li + li { margin-top: 10px; }
.credits-slot > span:last-child { display: grid; gap: 2px; }
.credits-slot small { color: #e4d3a2; font-size: 9px; letter-spacing: .08em; }
.credits-slot strong { color: #fff2c7; font-size: 14px; }
.credits-star { display: grid; place-items: center; width: 32px; height: 32px; color: #f6d16b; font-size: 25px; line-height: 1; text-shadow: 0 1px 5px #d7932b; }
.credit-history-list { padding: 0; margin: 0; list-style: none; }
.credit-history-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #40566e; font-size: 13px; }
.credit-history-list small { display: block; color: #a9c4d9; margin-top: 4px; }
@media (max-width: 700px) { .game-top { gap: 5px; } .brand img { width: 60px; } .game-top > .identity { flex: 1; min-width: 0; padding: 4px; } .identity > span:last-child { flex: 1; } .top-actions { gap: 5px; margin-left: 0; } .top-actions .credits-slot { padding: 4px; gap: 3px; } #logout { padding: 8px 6px; font-size: 12px; gap: 4px; } .credits-star { width: 24px; height: 24px; font-size: 21px; } .empire-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 400px) { .game-top .brand { display: none; } }
/* Public landing and guides */
a { color: #8adcf0; }
a:focus-visible, summary:focus-visible { outline: 3px solid #90f4ff; outline-offset: 4px; }
.entry { display: block; padding: 0; }
.entry, .guide-page { position: relative; isolation: isolate; background: #0e1a2a; }
.entry::before, .guide-page::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(#020508e3, #0e1a2ad9), url('/background-desktop.jpg') center / cover no-repeat; }
@media (max-width: 700px) { .entry::before, .guide-page::before { background-image: linear-gradient(#020508e3, #0e1a2ad9), url('/background-mobile.webp'); } }
.entry-layout { min-height: 100vh; max-width: 1440px; margin: auto; padding: 48px clamp(24px, 6vw, 100px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 430px); align-items: center; gap: clamp(40px, 7vw, 110px); }
.entry-story { max-width: 720px; }
.landing-brand { display: inline-flex; align-items: center; text-decoration: none; }
.landing-brand img { display: block; width: min(260px, 60vw); height: auto; }
.story-kicker { margin: 75px 0 18px; color: #f2c77d; font-size: 11px; font-weight: 800; letter-spacing: .2em; }
.entry-story h2 { max-width: 680px; margin: 0; font-family: Georgia, serif; font-size: clamp(46px, 5.5vw, 78px); line-height: 1.04; letter-spacing: -.035em; }
.entry-story h2 em { color: #f2c77d; font-style: normal; }
.story-lead { max-width: 570px; color: #c7d7df; font-size: 18px; line-height: 1.7; }
.story-link { display: inline-block; margin: 8px 0 0; font-weight: 700; text-decoration: none; }
.feature-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 68px; }
.feature-list div { border-top: 1px solid #72929b; padding-top: 16px; }
.feature-list span { display: block; color: #e5bd79; font-size: 11px; margin-bottom: 12px; }
.feature-list strong { font-size: 14px; }
.feature-list p { color: #b6cbd4; font-size: 13px; line-height: 1.5; }
.landing-nav { display: flex; gap: 24px; margin-top: 42px; font-size: 13px; }
.landing-nav a { color: #c7d9e3; }
.entry-card { width: 100%; background: #101f30ef; border-color: #506c7b; border-radius: 18px; padding: 36px; }
.entry-card h1 { font-family: Georgia, serif; margin-bottom: 25px; }
.entry-card .primary { min-height: 48px; }
.game-help { position: relative; flex: none; z-index: 3; }
.game-help summary { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #8cb3c7; border-radius: 50%; background: #152d42; cursor: pointer; font-weight: 800; list-style: none; }
.game-help summary::-webkit-details-marker, .inline-help summary::-webkit-details-marker { display: none; }
.game-help > div { position: absolute; top: 100%; right: 0; width: min(310px, calc(100vw - 32px)); margin-top: 8px; padding: 16px; border: 1px solid #61758c; border-radius: 12px; background: #12283a; box-shadow: 0 8px 24px #07132299; font-size: 13px; line-height: 1.5; }
.game-help p, .inline-help p { color: #c8dbe5; }
.inline-help { margin: 10px 0; font-size: 12px; line-height: 1.5; }
.inline-help summary { color: #8adcf0; cursor: pointer; list-style: none; font-weight: 700; }
.inline-help summary::before { content: '?'; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border: 1px solid currentColor; border-radius: 50%; }
.inline-help p { margin: 8px 0; }
.guide-page { min-height: 100vh; color: #eaf3f5; }
.guide-shell { max-width: 980px; margin: auto; padding: 38px 24px 80px; }
.guide-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.guide-nav nav { display: flex; gap: 20px; font-size: 14px; }
.guide-hero { max-width: 760px; padding: 70px 0 32px; }
.guide-hero h1 { text-align: left; font: 700 clamp(38px, 6vw, 64px)/1.08 Georgia, serif; }
.guide-hero p { color: #c6d9df; line-height: 1.7; font-size: 18px; }
.guide-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.guide-content section { padding: 24px; border: 1px solid #476879; border-radius: 14px; background: #152b3bdd; }
.guide-content h2 { margin: 0 0 12px; color: #f2c77d; font: 700 23px Georgia, serif; }
.guide-content p, .guide-content li { color: #d0dfe5; line-height: 1.65; font-size: 15px; }
.guide-content ol { padding-left: 20px; }
.guide-footer { margin-top: 34px; line-height: 1.7; }
@media (max-width: 800px) { .entry-layout { grid-template-columns: 1fr; gap: 32px; padding-top: 30px; } .story-kicker { margin-top: 42px; } .feature-list { margin-top: 36px; } .entry-card { max-width: 520px; } }
@media (max-width: 700px) { .game-help summary { width: 28px; height: 28px; } }
@media (max-width: 520px) { .feature-list, .guide-content { grid-template-columns: 1fr; } .feature-list { gap: 8px; } .feature-list p { margin-bottom: 6px; } .landing-nav { margin-top: 24px; } .entry-card { padding: 25px; } .guide-hero { padding-top: 50px; } }

/* Empire command center */
.empire-dialog { width: min(820px, calc(100vw - 24px)); border-color: #49647d; background: #0d1b2b; box-shadow: 0 24px 90px #020810dc; }
.empire-dialog-header { padding: 24px 28px 18px; background: radial-gradient(ellipse at 12% 0%, #244d5a 0, #172c3f 38%, #102235 80%); border-bottom: 1px solid #30495c; }
.empire-dialog-header small, .empire-eyebrow { color: #dfba79; letter-spacing: .16em; font-size: 10px; font-weight: 800; }
.empire-dialog-header h2 { font-family: Georgia, serif; font-size: 27px; letter-spacing: -.02em; }
.empire-subtitle { color: #b0c4d2; font-size: 12px; margin: 5px 0 0; }
.empire-dialog-header button { border-color: #476070; background: #172d3c; }
.empire-tabs { gap: 6px; padding: 10px 28px; background: #122537; border-bottom: 1px solid #2d4658; }
.empire-tabs button { min-height: 40px; border-radius: 8px; color: #b8cfda; font-size: 13px; }
.empire-tabs button:hover { background: #1c3b4c; color: white; }
.empire-tabs button[aria-selected="true"] { color: #eafaff; background: #205267; box-shadow: inset 0 0 0 1px #4d8795; }
.empire-content { padding: 24px 28px 32px; background: linear-gradient(160deg,#102334,#0d1b2b 65%); }
.empire-content h3 { margin: 27px 0 12px; color: #eef7f4; font-size: 15px; letter-spacing: .015em; }
.empire-intro { margin-bottom: 16px; }.empire-intro p { margin: 5px 0 0; color: #a7bdc8; font-size: 13px; }
.empire-stats { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.empire-card, .empire-section, .empire-event { background: linear-gradient(145deg,#193346,#14283a); border-color: #324b5e; border-radius: 12px; }
.empire-card { min-height: 88px; padding: 15px; }.empire-card span { color: #b2cbd4; font-size: 12px; }.empire-card strong { margin-top: 10px; color: #f4fbf8; font-size: 23px; }
.empire-section { padding: 16px; }.empire-section h4 { color: #e3c286; }.empire-section .detail-strip + .detail-strip { border-top: 1px solid #2b4455; }
.empire-reset-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; padding: 16px; border: 1px solid #685440; border-radius: 12px; background: #332c28; }
.empire-reset-card strong { color: #f3d8a3; font-size: 14px; }.empire-reset-card p { margin: 5px 0 0; color: #d0c6b4; font-size: 12px; line-height: 1.4; }
.empire-reset-card button { flex: none; color: #ffe1b3; background: #66452f; border-color: #ab7851; }
.ranking-controls { padding: 4px; border: 1px solid #334c60; background: #132a3b; border-radius: 10px; }
.ranking-controls button { flex: 1; border: 0; background: transparent; color: #b8cfda; }.ranking-controls button[aria-pressed="true"] { background: #205267; color: #fff; }
.ranking-row { min-height: 48px; margin-top: 7px; padding: 12px 14px; background: #172f40; border: 1px solid #304a5c; border-radius: 9px; gap: 12px; }
.ranking-row strong { color: #d7edf0; text-align: right; }.ranking-current { border-color: #64c7b6; background: #1c4950; }
.reset-empire-dialog { width: min(430px, calc(100vw - 32px)); border: 1px solid #78604b; border-radius: 16px; padding: 24px; color: #eff7f5; background: #142737; box-shadow: 0 18px 70px #020810d9; }
.reset-empire-dialog::backdrop { background: #030b14c9; }.reset-crest { color: #e9b879; font-size: 28px; }.reset-empire-dialog h2 { margin: 8px 0; font-family: Georgia, serif; }.reset-empire-dialog p { color: #c5d5d9; font-size: 13px; line-height: 1.55; }.reset-empire-dialog .reset-protection-note { color: #ebc68f; }
.reset-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }.reset-actions button { flex: 1; }.reset-actions #confirm-reset { background: #8a3c33; border-color: #dc8272; }.reset-actions button:disabled { opacity: .55; }
@media (max-width: 600px) { .empire-dialog-header { padding: 18px 16px 14px; }.empire-tabs { padding: 8px 12px; }.empire-tabs button { font-size: 12px; }.empire-content { padding: 18px 16px 24px; }.empire-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }.empire-card { padding: 10px; min-height: 76px; }.empire-card span { font-size: 10px; }.empire-card strong { font-size: 18px; }.empire-reset-card { align-items: flex-start; flex-direction: column; }.empire-reset-card button { width: 100%; }.ranking-row { align-items: flex-start; flex-direction: column; }.ranking-row strong { text-align: left; } }

.military-slot { min-width: 0; display: flex; align-items: center; border-left: 1px solid #486079; border-radius: 0 9px 9px 0; }
.military-slot .resource { flex: 1; min-width: 0; }
.military-slot .resource-content { min-width: 0; overflow: hidden; }
.military-slot .resource-content strong { overflow: hidden; text-overflow: ellipsis; }
.recruit-plus { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; margin: 0 8px 0 0; border: 1px solid #548bb2; border-radius: 50%; color: #c4efff; background: linear-gradient(145deg, #245a79, #153b5c); box-shadow: inset 0 1px 0 #a1defb42, 0 2px 5px #06132080; transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
.recruit-plus:hover { color: #fff; border-color: #99ddff; background: linear-gradient(145deg, #3286ae, #1a5e8b); transform: translateY(-1px); }
.recruit-plus:active { transform: translateY(0); background: #153b5c; }
.recruit-plus:focus-visible { outline-offset: 2px; }
.recruit-territory-label { font-size: 13px; font-weight: 700; margin-top: 8px; }
.recruit-form #recruit-territory { color: #fff; }
@media (max-width: 600px) { .military-slot .resource-icon { display: none; } .recruit-plus { width: 30px; height: 30px; margin-right: 4px; } }
@media (prefers-reduced-motion: reduce) { .recruit-plus { transition: none; } }

/* Boosts and shop */
.shop-button { display: flex; align-items: center; justify-content: center; gap: 6px; color: #b5f48c; border-color: #688c56; background: #17332c; padding: 8px; }
.active-boosts { position: absolute; z-index: 2; right: 72px; bottom: 18px; width: 330px; max-width: calc(100% - 84px); max-height: calc(100dvh - 100px); overflow-y: auto; border: 1px solid #7ada9e; border-radius: 12px; background: linear-gradient(125deg,#152c3bed,#0c1d2df5); box-shadow: 0 0 15px #66ff9c26; padding: 9px 12px; }
.active-boosts summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; font-size: 13px; font-weight: 750; }
.active-boosts summary::after { content: '⌄'; color: #b5d3e1; }
.active-boosts[open] summary::after { content: '⌃'; }
#boost-count { margin-left: auto; border: 1px solid #88da60; color: #a8ef74; border-radius: 20px; padding: 1px 7px; }
.boost-row { display: flex; gap: 10px; align-items: center; padding: 10px 0 3px; border-top: 1px solid #486176; margin-top: 8px; }
.boost-icon { display: grid; place-items: center; flex: none; width: 40px; height: 43px; color: #efffe8; font-size: 25px; border: 1px solid #a0e969; border-radius: 8px; background: linear-gradient(#315e47,#152e26); box-shadow: inset 0 0 9px #8ad86e33; }
.boost-row > div { flex: 1; min-width: 0; }
.boost-row strong { font-size: 12px; display: block; } .boost-row small { display: block; color: #bed0df; font-size: 10px; margin: 3px 0; }
.boost-time { color: #dcebf7; font-size: 11px; white-space: nowrap; }
.boost-row progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 6px; overflow: hidden; background: #425c74; accent-color: #a2ef6b; }
.boost-row progress::-webkit-progress-bar { background: #425c74; } .boost-row progress::-webkit-progress-value { background: linear-gradient(90deg,#75d76c,#b9fa75); border-radius: 6px; }
.boost-empty { font-size: 12px; color: #afc3d4; margin: 10px 0 3px; }
.resource-content > .boost-mini { font-size: 8px; color: #befb82; line-height: 1.3; }
.shop-dialog { width: min(1120px, calc(100% - 32px)); max-width: 1120px; max-height: calc(100dvh - 36px); padding: 28px; }
.shop-intro { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; margin: 18px 0; border: 1px solid #44654f; border-radius: 14px; background: radial-gradient(ellipse at right,#345735,#162b3f 75%); }
.shop-intro small { color: #b5ed8d; letter-spacing: .15em; font-size: 10px; } .shop-intro h3 { font-size: 27px; margin: 8px 0; } .shop-intro p { color: #bdcfdf; margin: 0; } .shop-emblem { color: #b3f57c; font-size: 70px; }
.boost-catalog { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.boost-product { display: flex; flex-direction: column; align-items: flex-start; padding: 24px; border: 1px solid #4d687b; border-radius: 14px; background: linear-gradient(145deg,#223c50,#112337); }
.product-icon { width: 60px; height: 60px; display: grid; place-items: center; background: #284c3c; border: 1px solid #8bc76e; border-radius: 13px; color: #d4fbb3; font-size: 34px; margin-bottom: 22px; }
.boost-product > small { color: #b7ceaa; font-size: 10px; letter-spacing: .14em; } .boost-product h3 { margin: 8px 0; font-size: 19px; } .product-effect { color: #b2f57c; font-size: 42px; } .boost-product p { color: #b9cedf; line-height: 1.6; font-size: 13px; flex: 1; } .boost-product button { width: 100%; margin-top: 15px; border-color: #84b95e; background: #294d35; color: #e2ffc9; font-size: 13px; font-weight: 700; } .boost-product button:disabled { opacity: .55; cursor: default; }
.shop-history { margin-top: 24px; } .shop-history summary { cursor: pointer; color: #bdcfe0; padding: 10px 0; }
#shop-active-boosts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.game-screen:has(.territory:not([hidden])) .active-boosts { right: 480px; max-width: calc(100% - 492px); }
@media (max-width: 1100px) and (min-width: 701px) { .game-top { flex-wrap: wrap; } .empire-bar { order: 3; flex-basis: 100%; max-width: none; } .territory { top: 140px; } .map-status { top: 140px; } }
@media (max-width: 1060px) and (min-width: 701px) { .game-screen:has(.territory:not([hidden])) .active-boosts { bottom: 170px; max-height: max(50px, calc(100dvh - 320px)); } }
@media (max-width: 700px) { .active-boosts { right: 64px; bottom: 12px; width: 290px; } .game-screen:has(.territory:not([hidden])) .active-boosts { right: 64px; bottom: calc(min(56dvh, 540px) + 18px); max-width: calc(100% - 76px); max-height: max(50px, calc(100dvh - min(56dvh, 540px) - 90px)); } .shop-button span { display: none; } .shop-button { padding: 7px; } .shop-dialog { padding: 16px; width: calc(100% - 16px); } .boost-catalog, #shop-active-boosts { grid-template-columns: 1fr; } .shop-intro { padding: 16px; } .shop-intro h3 { font-size: 21px; } .shop-emblem { font-size: 42px; } .boost-product { padding: 20px; } .product-icon { margin-bottom: 12px; } }
@media (max-width: 550px) { .active-boosts { bottom: calc(min(112.5px, 22.5vw) + 20px); max-height: max(50px, calc(100dvh - min(112.5px, 22.5vw) - 92px)); } .game-screen:has(.territory:not([hidden])) .active-boosts { bottom: calc(min(56dvh, 540px) + min(112.5px, 22.5vw) + 26px); max-height: max(50px, calc(100dvh - min(56dvh, 540px) - min(112.5px, 22.5vw) - 98px)); } }

/* Compact navigation for small screens. */
.header-menu { display: contents; }
.map-overlays { display: contents; }
.header-menu-toggle, .mobile-menu-label { display: none; }
@media (max-width: 700px) {
  .game-top { flex-wrap: nowrap; min-height: 62px; }
  .game-top .brand { display: flex; }
  .brand img { width: 80px; }
  .game-top > .identity { flex: 1; }
  .identity > span:last-child { max-width: none; overflow: hidden; }
  .header-menu-toggle { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0 !important; }
  .game-top:has(#notification-count:not(:empty)) .header-menu-toggle::after { content: ''; position: absolute; width: 9px; height: 9px; margin: -32px -32px 0 0; border-radius: 50%; background: #f25c68; }
  .header-menu { display: none; position: absolute; top: calc(100% + 6px); right: 10px; width: min(360px, calc(100vw - 20px)); max-height: calc(100dvh - 80px); overflow-y: auto; padding: 12px; border: 1px solid #61758c; border-radius: 12px; background: #12283a; box-shadow: 0 8px 24px #07132299; }
  .header-menu.is-open { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
  .header-menu .empire-bar { order: 0; width: 100%; flex: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-menu .resource { min-height: 54px; padding: 6px 8px; }
  .header-menu .resource .resource-icon { display: block; }
  .header-menu .top-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
  .header-menu .top-actions button { width: 100%; min-height: 44px; justify-content: center; }
  .header-menu .shop-button, .header-menu .notification-button { display: flex; align-items: center; gap: 7px; }
  .header-menu .shop-button span, .header-menu .mobile-menu-label { display: inline; }
  .header-menu #notification-count { position: static; }
  .header-menu .game-help { order: 1; }
  .header-menu .game-help summary { width: auto; height: 44px; display: flex; justify-content: center; gap: 8px; border-radius: 9px; }
  .header-menu .game-help summary::after { content: 'Map instructions'; }
  .header-menu .game-help > div { position: static; width: auto; margin-top: 8px; }
  .map-status { top: 72px; }
  .map-overlays { position: absolute; z-index: 1; top: 72px; left: 10px; display: flex; flex-direction: column; gap: 8px; width: min(290px, calc(100% - 20px)); pointer-events: none; }
  .map-overlays .march-list { position: static; width: 100%; max-width: none; pointer-events: auto; }
}

.credit-catalog { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.shop-intro.credit-intro { display: block; padding: 4px 0 20px; margin: 24px 0 20px; border: 0; border-bottom: 1px solid #486176; border-radius: 0; background: none; }
.credit-intro small { color: #e7c77e; }
.credit-intro h3 { margin: 8px 0; font-size: 25px; }
.credit-intro p { font-size: 14px; line-height: 1.6; }
.credit-product { --pack-color: #70c6ee; --pack-glow: #245b7d; padding: 24px; border-color: var(--pack-color); background: radial-gradient(ellipse at bottom right, var(--pack-glow), transparent 85%), #142b3e; }
.credit-product[data-pack="credits_standard"] { --pack-color: #b7a0f4; --pack-glow: #493b7b; }
.credit-product[data-pack="credits_expanded"] { --pack-color: #edbd63; --pack-glow: #6b5428; }
.credit-product[data-pack="credits_large"] { --pack-color: #a9ee7b; --pack-glow: #3c6137; }
.credit-pack-icon.product-icon { width: 72px; height: 72px; font-size: 43px; color: var(--pack-color); border-color: var(--pack-color); background: radial-gradient(circle, var(--pack-glow), #152b3e); box-shadow: inset 0 0 20px #ffffff0c; margin-bottom: 24px; }
.credit-product > small { color: var(--pack-color); min-height: 15px; font-weight: 750; }
.credit-product h3 { margin: 10px 0 14px; }
.credit-product .product-effect { font-size: clamp(32px, 3.4vw, 44px); line-height: 1.1; color: #ffdf95; font-variant-numeric: tabular-nums; }
.credit-unit { color: #dfcda0; font-size: 14px; margin: 5px 0 8px; }
.credit-product p { margin: 12px 0 22px; }
.credit-pack-price { font-size: 25px; width: 100%; padding-top: 18px; border-top: 1px solid #ffffff22; }
.credit-product button { border-color: var(--pack-color); background: #263e4b; color: #f5f5e5; min-height: 42px; }
.credit-product button:disabled { opacity: 1; color: #b9c8d0; background: #162b3dcc; border-color: #8096a655; }
.expansion-offer, .protection-product { display: flex; align-items: center; gap: 22px; padding: 24px; margin: 20px 0; border: 1px solid #bc9852; border-radius: 14px; background: radial-gradient(ellipse at top left, #6b512d77, transparent 80%), #182e42; }
.expansion-offer[hidden] { display: none; }
.expansion-icon, .protection-icon { flex: none; display: grid; place-items: center; width: 66px; height: 72px; font-size: 44px; color: #ffda8c; border: 1px solid #b99a58; border-radius: 14px; background: #51472c66; }
.expansion-offer small, .protection-product small { font-size: 10px; letter-spacing: .14em; color: #f3cc7d; font-weight: 750; }
.expansion-offer h3, .protection-product h3 { margin: 6px 0; font-size: 22px; }
.expansion-offer p, .protection-product p { color: #bdcfdf; font-size: 13px; line-height: 1.6; margin: 0; }
.expansion-action { margin-left: auto; flex: none; text-align: center; }
.expansion-action span { display: block; color: #e6cf9b; font-size: 12px; margin-bottom: 8px; }
.expansion-action button:disabled, .protection-product button:disabled { opacity: 1; color: #b9c8d0; background: #1b3042; border-color: #62788a; cursor: default; }
.protection-product { border-color: #6990be; background: radial-gradient(ellipse at left, #28486b88, transparent 80%), #182e42; }
.protection-icon { color: #bbd9ff; border-color: #6990be; background: #28486b; }
.protection-product small { color: #a9cbf3; }
.protection-product button { margin-left: auto; flex: none; }
@media (max-width: 700px) { .expansion-offer, .protection-product { flex-wrap: wrap; gap: 14px; padding: 20px; } .expansion-offer > div:not(.expansion-action), .protection-product > div { flex: 1; min-width: 160px; } .expansion-action, .protection-product button { width: 100%; margin-left: 0; } .expansion-action button { width: 100%; } }
@media (max-width: 900px) { .credit-catalog { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 520px) { .credit-catalog { grid-template-columns: 1fr; } }

.expansion-action .expansion-sale { color: #c4fa9a; font-size: 10px; letter-spacing: .09em; font-weight: 800; }
.expansion-prices { margin: 8px 0 12px; }
.expansion-prices del { color: #b5c4d2; font-size: 16px; margin-right: 6px; }
.expansion-prices strong { color: #ffdc8b; font-size: 32px; }
.expansion-prices small { display: block; color: #c6d1dd; font-size: 11px; letter-spacing: 0; margin-top: 3px; }
.expansion-action button:not(:disabled) { background: #b6ef7f; border-color: #b6ef7f; color: #172b20; font-weight: 800; }

/* In-game guidance */
.gameplay-guide { width: min(540px, calc(100vw - 32px)); }
.gameplay-guide a { color: #8adcf0; }
.gameplay-guide-steps { padding-left: 22px; margin: 18px 0; }
.gameplay-guide-steps li { padding: 0 0 10px 4px; color: #8adcf0; font-size: 13px; line-height: 1.5; }
.gameplay-guide-steps strong { color: #fff; }
.gameplay-guide-steps p { color: #c8dbe5; margin: 4px 0 0; }
.game-help button { width: 100%; font-size: 12px; }
.specialization-help { margin: 10px 0; font-size: 12px; line-height: 1.5; }
.specialization-help button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: #8adcf0; font-size: inherit; font-weight: 700; }
.specialization-help button span { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; }
.specialization-tooltip { display: none; margin-top: 8px; padding: 10px 12px; border: 1px solid #61758c; border-radius: 9px; background: #12283a; color: #c8dbe5; }
.specialization-tooltip p { margin: 0 0 8px; }
.specialization-tooltip p:last-child { margin-bottom: 0; }
.specialization-tooltip ul { padding-left: 18px; margin: 0 0 8px; }
.specialization-tooltip li + li { margin-top: 5px; }
.specialization-tooltip strong { color: #fff; }

.specialization-help button[aria-expanded="true"] + .specialization-tooltip, .specialization-help button:focus-visible:not([data-dismissed]) + .specialization-tooltip { display: block; }
@media (hover: hover) { .specialization-help:hover button:not([data-dismissed]) + .specialization-tooltip { display: block; } }
