.act-stronghold { --c: #9dc39a; }
.stronghold-panel { color: #e9e1d3; padding: clamp(20px, 3vw, 42px); background: radial-gradient(circle at 88% 0, rgba(86,125,85,.15), transparent 42%), #151914; border: 1px solid rgba(157,195,154,.25); }
.stronghold-panel h2, .stronghold-panel h3, .stronghold-panel h4 { color: #f2e4ca; margin: 0 0 .7em; }
.stronghold-panel h2 { font: 600 clamp(2rem, 4vw, 3.2rem)/1.1 var(--font-display, Georgia, serif); }
.stronghold-panel h3 { margin-top: 1.6em; font: 600 1.45rem var(--font-display, Georgia, serif); }
.stronghold-panel p { max-width: 78ch; line-height: 1.6; }
.sh-eyebrow { color: #9dc39a; font: 700 .75rem var(--font-ui, sans-serif); text-transform: uppercase; letter-spacing: .18em; }
.sh-head { display: flex; justify-content: space-between; align-items: start; gap: 2rem; flex-wrap: wrap; border-bottom: 1px solid rgba(157,195,154,.25); padding-bottom: 1.5rem; }
.sh-total { display: grid; gap: .1rem; min-width: 170px; padding: 1rem 1.4rem; border: 1px solid rgba(157,195,154,.32); background: rgba(157,195,154,.08); }
.sh-total b { font: 600 2.1rem var(--font-display, Georgia, serif); color: #d2e7b7; }
.sh-total span { text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; }
.sh-total small, .stronghold-panel small, .sh-note { color: #b8b9aa; }
.sh-progress { height: 11px; max-width: 500px; border: 1px solid #708264; background: #292f26; margin: 1.3rem 0 .4rem; }
.sh-progress span { display: block; height: 100%; background: linear-gradient(90deg, #688a62, #c5d897); }
.sh-create, .sh-rename { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; margin: 1.3rem 0; }
.sh-create label, .sh-rename label { display: grid; gap: .4rem; }
.sh-create input[name="name"], .sh-rename input[name="name"] { min-width: min(330px, 75vw); padding: .75rem; background: #222821; border: 1px solid #6c7d66; color: #fff; font: inherit; }
.sh-check { display: flex !important; align-items: center; gap: .5rem !important; }
.sh-directory, .sh-members, .sh-upgrades { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.sh-directory article, .sh-members article, .sh-upgrades article { padding: 1.1rem; background: rgba(16,22,17,.7); border: 1px solid rgba(157,195,154,.2); }
.sh-directory article { display: grid; gap: .5rem; justify-items: start; }
.sh-directory button { margin-top: .4rem; }
.sh-members ul { padding-left: 1.1rem; margin-bottom: 0; }
.sh-members li { margin: .6rem 0; }
.sh-members li span { display: block; color: #b5c9a9; font-size: .82rem; }
.sh-upgrades article { display: grid; gap: .4rem; }
.sh-upgrades span { color: #b8b9aa; font-size: .85rem; }
.sh-siege { border: 1px solid #a56548; background: rgba(135,57,32,.2); padding: 1rem 1.25rem; margin-top: 1.5rem; }
.sh-siege strong { color: #ffba86; }
.sh-siege p { margin-bottom: 0; }
.sh-management { border-top: 1px solid rgba(157,195,154,.25); margin-top: 2rem; }
.sh-request { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.sh-disband, .sh-leave { margin-top: 1.5rem; }
.sh-notice { border-left: 3px solid #9dc39a; background: rgba(157,195,154,.08); padding: .7rem 1rem; }
@media (max-width: 600px) { .stronghold-panel { padding: 18px; } .sh-head { gap: .8rem; } .sh-total { width: 100%; } }

/* ---- tabs and panels ---- */
.sh-tabs { display: flex; gap: .25rem; flex-wrap: wrap; margin: 1.4rem 0 0; border-bottom: 1px solid rgba(157,195,154,.25); }
.sh-tabbtn { background: none; border: 0; border-bottom: 3px solid transparent; color: #b8b9aa; padding: .7rem 1.1rem; font: 600 .9rem var(--font-ui, sans-serif); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.sh-tabbtn:hover { color: #f2e4ca; }
.sh-tabbtn[aria-selected="true"] { color: #f2e4ca; border-bottom-color: #9dc39a; }
.sh-dot { display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 1em; background: #d2453a; color: #fff; font-style: normal; font-size: .75rem; text-align: center; }
.sh-panel { padding-top: 1.4rem; max-height: none; }
.sh-panel > h3:first-child, .sh-fortintro h3 { margin-top: 0; }
.sh-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.sh-card { display: grid; gap: .15rem; padding: 1rem 1.2rem; background: rgba(16,22,17,.7); border: 1px solid rgba(157,195,154,.2); }
.sh-card span { text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; color: #b8b9aa; }
.sh-card b { font: 600 1.7rem var(--font-display, Georgia, serif); color: #d2e7b7; }

/* ---- fort planner ---- */
.sh-plan { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; }
.sh-mapwrap { overflow-x: auto; }
.sh-grid { position: relative; display: grid; grid-template-columns: repeat(var(--cols), var(--cell-size)); width: max-content; gap: 0; padding: 0; touch-action: none; user-select: none; background: #11140f; border: 3px solid #d2453a; }
.sh-cell { position: relative; aspect-ratio: 1; min-width: 0; padding: 0; border: 0; background: #2a2f25; cursor: pointer; overflow: hidden; }
.sh-cell img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; image-rendering: auto; }
.sh-cell .sh-ground { filter: brightness(.72) saturate(.7); }
.sh-cell .sh-tile[hidden] { display: none; }
.sh-cell::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); pointer-events: none; }
.sh-cell.is-planned::before { content: ""; position: absolute; inset: 0; z-index: 2; background: repeating-linear-gradient(45deg, transparent 0 7px, rgba(244,241,230,.14) 7px 8px); pointer-events: none; }
.sh-cell.is-planned.k-F::before { box-shadow: inset 0 0 0 2px rgba(190,196,206,.88); }
.sh-cell.is-planned.k-V::before { box-shadow: inset 0 0 0 2px rgba(214,163,90,.88); }
.sh-cell.is-planned.k-C::before { box-shadow: inset 0 0 0 2px rgba(122,156,214,.88); }
.sh-cell.is-built.k-F::after { box-shadow: inset 0 0 0 2px rgba(190,196,206,.55); }
.sh-cell.is-built.k-V::after { box-shadow: inset 0 0 0 2px rgba(214,163,90,.6); }
.sh-cell.is-built.k-C::after { box-shadow: inset 0 0 0 2px rgba(122,156,214,.6); }
.sh-cell.is-selected::after { box-shadow: inset 0 0 0 3px #f4f1e6; z-index: 3; }
.sh-cell.is-invalid::after { box-shadow: inset 0 0 0 3px #e05b4e; z-index: 3; }
.sh-cell.is-blocked { cursor: not-allowed; }
.sh-cell.is-blocked:hover::before { content: ""; position: absolute; inset: 0; z-index: 4; background: rgba(210,69,58,.6); }
.sh-yellow { position: absolute; z-index: 5; border: 3px solid #f2d34a; pointer-events: none; box-sizing: border-box; }
.sh-legend { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; font-size: .82rem; color: #b8b9aa; margin: .7rem 0 0; }
.sh-legend i { display: inline-block; width: 16px; height: 12px; margin-right: .3rem; vertical-align: -1px; }
.sh-legend .z-y { border: 2px solid #f2d34a; } .sh-legend .z-r { border: 2px solid #d2453a; }
.sh-legend .k-plan { background: repeating-linear-gradient(45deg, #777 0 3px, #ccc 3px 5px); } .sh-legend .k-sel { border: 2px solid #f4f1e6; }
.sh-plan-side { display: grid; gap: 1rem; position: sticky; top: 1rem; }
.sh-mapcontrols { display: flex; align-items: center; gap: .65rem; margin-bottom: .55rem; color: #cfd2c0; font-size: .84rem; }
.sh-mapcontrols label { display: flex; align-items: center; gap: .6rem; }
.sh-mapcontrols input { accent-color: #d2e7b7; cursor: pointer; }
.sh-zoom-label { color: #b8b9aa; }
.sh-tile-preview { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; padding: .8rem; border: 1px solid rgba(157,195,154,.3); background: #191e18; }
.sh-preview-top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.sh-preview-top strong { color: #f2e4ca; font: 600 1rem var(--font-display, Georgia, serif); }
.sh-preview-coord { color: #b8b9aa; font-size: .73rem; text-align: right; }
.sh-preview-image { display: block; width: 100%; aspect-ratio: 1; image-rendering: auto; border: 1px solid rgba(157,195,154,.2); background: #252d23; }
.sh-preview-note { grid-column: 1 / -1; margin: 0; color: #b8b9aa; font-size: .78rem; line-height: 1.4; }
.sh-preview-neighbors { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; border: 1px solid rgba(157,195,154,.25); }
.sh-preview-neighbors[hidden] { display: none; }
.sh-preview-neighbors img { display: block; width: 100%; aspect-ratio: 1; min-width: 0; background: #252d23; }
.sh-preview-neighbors img.is-center { outline: 2px solid #f2d34a; outline-offset: -2px; position: relative; }
.sh-gold { display: grid; gap: .1rem; margin: 0; padding: .9rem 1.1rem; background: rgba(242,211,74,.07); border: 1px solid rgba(242,211,74,.3); }
.sh-gold b { font: 600 1.6rem var(--font-display, Georgia, serif); color: #f2d34a; }
.sh-gold span { text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; }
.sh-modes { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.sh-mode, .sh-tool { display: grid; gap: .15rem; text-align: left; padding: .7rem .8rem; background: rgba(16,22,17,.7); border: 1px solid rgba(157,195,154,.25); color: #e9e1d3; cursor: pointer; font: inherit; }
.sh-tool { grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: .55rem; }
.sh-tool img { width: 42px; height: 42px; object-fit: cover; border: 1px solid rgba(157,195,154,.25); }
.sh-tool span { min-width: 0; font-size: .84rem; }
.sh-tool small { display: block; font-size: .72rem; }
.sh-mode small { color: #b8b9aa; font-size: .75rem; line-height: 1.3; }
.sh-mode[aria-checked="true"], .sh-tool[aria-checked="true"] { border-color: #9dc39a; background: rgba(157,195,154,.16); }
.sh-tools { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.sh-tool small { color: #f2d34a; }
.sh-buy { display: grid; gap: .6rem; }
.sh-buy[hidden], .sh-tools[hidden] { display: none; }
.sh-selbtns { display: flex; gap: .5rem; flex-wrap: wrap; }
.sh-quote, .sh-status { margin: 0; font-size: .88rem; color: #cfd2c0; }
.sh-quote { padding: .8rem; border: 1px solid rgba(157,195,154,.3); background: rgba(16,22,17,.7); line-height: 1.45; }
.sh-placement { margin: 0; color: #b8b9aa; font-size: .8rem; line-height: 1.4; }
.sh-status { color: #b8b9aa; font-size: .8rem; }
@media (max-width: 900px) { .sh-plan { grid-template-columns: 1fr; } .sh-plan-side { position: static; } .sh-tabs { overflow-x: auto; flex-wrap: nowrap; } .sh-tabbtn { white-space: nowrap; } }
