/* The same brass highlight marks the primary action, the selected tab and the held item. */
:root { --bronze: #d8af75; --obsidian: #182025; --forest: #324e50; --deep: #1c292c; }
.masthead { background: #131c20; border-color: #b294634d; }
.wordmark .brand-mark { color: var(--bronze); }
.evolution { background: linear-gradient(148deg,#30372e,#141d21 76%); }
.era-portraits img { max-height: 63svh; object-position: 50% 40%; }
.era-labels { background: linear-gradient(transparent,#171e20ed); }
.era-labels span { margin-inline: 8%; padding-block: .7rem; border-bottom-width: 1px; color: #fff5e3; }
.evolution-title { border-left: 2px solid #aa8d61; margin: clamp(1rem,2.6vw,2.5rem); padding: .35rem clamp(.9rem,2vw,2rem); }
.evolution-title h1 { font-size: clamp(2.35rem,4.5vw,5.5rem); letter-spacing: -.045em; }
.evolution-title em { color: #e2bd85; font-style: italic; }
.evolution-title p { color: #d3d9cf; }
#auth .entry-sheet, #editor .entry-sheet { background: radial-gradient(ellipse at 15% 8%,#304047 0,transparent 60%),#182226; color: #f3eee4; border-left: 1px solid #b49a6f55; }
.entry-sheet .compass-rule { color: var(--bronze); }
#auth .entry-form label,#editor .entry-form label { color: #e2e5de; }
#auth .entry-form input:not([type=checkbox]),#editor .entry-form :is(input:not([type=color]),select) { background: #10191c; color: #f4f2e8; border-color: #687a79; }
#auth .input-wrap svg { color: #a6b6b0; }
#auth .auth-switch { border-color: #61716f; }
#auth .auth-switch button { color: #b8c5c3; }
#auth .auth-switch button.active,#auth .auth-switch:has(+ #loginForm[hidden]) #showRegister { color: #ffe3af; box-shadow: inset 0 -2px #ddb578; }
#auth .auth-switch:has(+ #loginForm[hidden]) #showLogin { color: #b8c5c3; box-shadow: none; }
#auth .auth-switch button:hover { background: #334447; }
.entry-sheet button.primary { background: #dbba86; border-color: #f1d3a3; color: #182024; font-weight: 700; }
.entry-sheet button.primary:hover:enabled { background: #f3d394; color: #131b1e; }
.entry-sheet .enter-button svg { color: #344240; }
.entry-sheet .save-note,.entry-sheet .server-note { color: #b3c0b9; }
.entry-sheet .error { color: #ffb9a5; }
.entry-sheet :focus-visible, #game :focus-visible { outline: 2px solid #daae6b; outline-offset: 2px; }
.portrait-stage { background: radial-gradient(ellipse at 52% 46%,#697377,#2d393c 66%,#1a2228); }
#overlay { background: #0c151aaa; }
.panel-window { border-color: #b39a79; background: #f2f0e6; box-shadow: 0 20px 64px #08101480; }
.panel-head { background: linear-gradient(100deg,#19292e,#36484a); border-bottom: 2px solid #bd9b68; }
#tabs { background: #e6e5da; border-color: #bcc0b4; }
#tabs button:is(.selected,.active,[aria-selected=true]) { background: #304c50; box-shadow: inset 0 -2px #bb9d6b; color: #fff; }
#inventoryRail { background: linear-gradient(110deg,#17282ce8,#182023eb); border: 1px solid #a6b0a655; box-shadow: 0 4px 16px #06101540; }
#inventoryRail h3 { color: #e1d1b0; font-size: .78rem; letter-spacing: .05em; }
#inventoryRail #hotbar button { border-color: #81939545; background: #273539; color: #f1f0e6; }
#inventoryRail #hotbar button[aria-pressed=true] { border-color: #d8b777; background: #424840; box-shadow: inset 2px 0 #e1be7e; }
#hud:not(:empty),#vitals:not(:empty),#minimap { background-color: #162529e3; border-color: #bca0788a; }
#bridge { background: radial-gradient(ellipse at 75% 4%,#243b43 0,transparent 51%),#101b23; }
.bridge-head { border-color: #b49a6f77; }
.bridge-head h1 { color: #f4e6cf; }
#bridge canvas.system-chart { border: 1px solid #7f959c80; border-radius: .4rem; }
.item-icon:is([data-item=axe],[data-item=pickaxe],[data-item=tent],[data-item=wood],[data-item=stone],[data-item=fiber],[data-item=food],[data-item=surfaceMiningLaser]) { background-image: url('/client/assets/landscape/inventory.webp'); background-size: 400% 200%; }
.item-icon[data-item=axe] { background-position: 0 0; }
.item-icon[data-item=pickaxe] { background-position: 33.333% 0; }
.item-icon[data-item=tent] { background-position: 66.667% 0; }
.item-icon[data-item=wood] { background-position: 100% 0; }
.item-icon[data-item=stone] { background-position: 0 100%; }
.item-icon[data-item=fiber] { background-position: 33.333% 100%; }
.item-icon[data-item=food] { background-position: 66.667% 100%; }
.item-icon[data-item=surfaceMiningLaser] { background-position: 100% 100%; }
@media(max-width:760px) {
  .era-portraits img { max-height: 42svh; }
  .evolution-title { margin: 1rem 1.2rem; }
  #auth .entry-sheet,#editor .entry-sheet { border-left: 0; border-top: 1px solid #b49a6f55; }
}

#panelBody [data-quick-item] h3 { display:flex; align-items:center; gap:.55rem; }
#panelBody [data-quick-item] .item-icon { width:2.25rem; height:2.25rem; }
#panelBody .energy-icon { background-image:url('/client/assets/energy-tools.svg'); background-size:700% 100%; }
#panelBody .item-icon:is([data-item=knife],[data-item=spear],[data-item=bow],[data-item=club],[data-item=sword],[data-item=rod]) { background-image:url('/client/assets/field-tools.svg'); background-size:600% 100%; }

.galaxy-field { background-image:linear-gradient(112deg,#111c2b33,#10192555),url('/client/assets/landscape/galaxy.webp'); background-size:cover; background-position:center; }
.galaxy-field::before { background:radial-gradient(ellipse at center,transparent 48%,#0c172960 100%); }

#characterForm fieldset {min-width:0;margin:0;padding:0 0 .9rem;border:0;border-bottom:1px solid #657a794d}
#characterForm legend {padding:0;margin-bottom:.55rem;color:#e7cb9c;font-weight:600}
#characterForm fieldset label {margin:0;min-width:0}
#characterForm #foundingFields label+label {margin-top:.55rem}
#characterForm .twin {gap:.55rem .8rem;grid-template-columns:repeat(2,minmax(0,1fr))}
#characterForm :is(select,input[type=color]) {width:100%;min-width:0}
#editor .portrait-stage {background:radial-gradient(ellipse at 50% 35%,#7b8888,#3b4b51 58%,#1c292f)}
.portrait-tools {position:absolute;bottom:1rem;left:50%;transform:translateX(-50%);display:flex;gap:3px;max-width:100%;padding:4px;background:#182328ed;border:1px solid #9aab9a66;border-radius:.45rem}
.portrait-tools button {padding:.3rem .6rem;color:#f8f1de;background:#283a3d;border:1px solid transparent}
.portrait-tools button[aria-pressed=true] {border-color:#d7b480;color:#ffe1aa}
@media(min-width:761px){#editor .portrait-stage {position:sticky;top:0;align-self:start;height:calc(100dvh - 4rem)}}
@media(max-width:760px){#editor .portrait-stage {min-height:clamp(250px,43svh,430px)}.portrait-tools{bottom:.4rem}}

#editor .entry-sheet {padding-block:clamp(1rem,3.2vh,2.5rem)}
#characterForm {margin-top:1rem}
