/*
 * Visual polish that sits on top of the older tool styles.
 * Keeping this separate makes the new theme easy to adjust without disturbing map or planner geometry.
 */
:root{
  --variant-bg:#0d0f0e;
  --variant-bg-soft:#111411;
  --variant-panel:#141714;
  --variant-panel-raised:#181b17;
  --variant-line:#30342e;
  --variant-line-soft:#252923;
  --variant-gold:#e7c77f;
  --variant-gold-strong:#ffd477;
  --variant-text:#e8dfcc;
  --variant-muted:#9d9380;
  --variant-shadow:0 18px 45px rgba(0,0,0,.28);
}

body{
  background:
    radial-gradient(circle at 76% -10%,rgba(199,165,83,.06),transparent 34%),
    linear-gradient(180deg,#0d0f0e,#0b0d0c 65%);
  color:var(--variant-text);
}

header{
  min-height:52px;
  box-sizing:border-box;
  gap:14px;
  background:
    linear-gradient(90deg,rgba(221,183,91,.04),transparent 32%),
    linear-gradient(to right,#171915,#24251f);
  box-shadow:0 6px 22px rgba(0,0,0,.18);
  position:relative;
  z-index:8;
}
header::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(232,198,119,.38) 22%,rgba(232,198,119,.12) 72%,transparent);
  pointer-events:none;
}
.header-brand{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.header-brand-mark{
  width:34px;
  height:34px;
  border-radius:8px;
  object-fit:cover;
  border:1px solid #4a412e;
  box-shadow:0 4px 14px rgba(0,0,0,.28);
}
.header-brand-copy{
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
}
.header-title{
  white-space:nowrap;
}
.header-field-tag{
  color:#80745f;
  font-size:9px;
  letter-spacing:.13em;
  text-transform:uppercase;
  font-weight:800;
  white-space:nowrap;
}

nav{
  background:
    linear-gradient(180deg,rgba(214,182,105,.025),transparent 22%),
    #121412;
  border-right-color:#2b2f29;
}
nav button[data-section]{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:39px;
  color:#bcb19d;
  border-bottom-color:#1d211d;
  transition:background-color .15s ease,color .15s ease,padding-left .15s ease,border-color .15s ease;
}
nav button[data-section]::after{
  content:"";
  width:2px;
  height:16px;
  margin-left:auto;
  border-radius:999px;
  background:transparent;
}
nav button[data-section]:hover{
  padding-left:17px;
  background:#1b1e19;
}
nav button[data-section].active{
  background:linear-gradient(90deg,rgba(181,145,60,.14),rgba(181,145,60,.025));
  color:#f2d898;
}
nav button[data-section].active::after{
  background:#d7ae52;
  box-shadow:0 0 12px rgba(215,174,82,.38);
}
.variant-nav-icon{
  width:17px;
  height:17px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  color:#756c5a;
}
nav button:hover .variant-nav-icon,
nav button.active .variant-nav-icon{
  color:#d5b568;
}
.variant-icon{
  width:1em;
  height:1em;
  display:inline-block;
  vertical-align:-.14em;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.variant-icon path[fill],.variant-icon rect[fill],.variant-icon circle[fill]{
  stroke:none;
}

main{
  background:
    radial-gradient(circle at 72% 0,rgba(180,151,79,.035),transparent 34%),
    linear-gradient(180deg,rgba(255,255,255,.006),transparent 38%);
}
.app-purpose{
  border:1px solid #292d27;
  border-left:3px solid #6d592a;
  background:linear-gradient(90deg,#11140f,#0f1110);
  color:#a99d87;
  border-radius:9px;
  padding:9px 12px;
  line-height:1.45;
  box-shadow:0 8px 20px rgba(0,0,0,.08);
}
.app-purpose b{color:#d9c796}
.panel-title{
  display:flex;
  align-items:center;
  gap:8px;
  letter-spacing:.01em;
}
.panel-title::after{
  content:"";
  height:1px;
  flex:1;
  min-width:30px;
  background:linear-gradient(90deg,rgba(200,167,89,.25),transparent);
}

.overview-search-strip{
  border:1px solid #292d27;
  border-radius:11px;
  padding:7px;
  background:rgba(13,15,13,.86);
  box-shadow:0 8px 24px rgba(0,0,0,.12);
}
.overview-search-strip .vh-input{
  border-color:transparent;
  background:#0b0d0b;
}
.overview-search-strip .vh-input:focus{
  border-color:#65532d;
}

.field-hero,
.vh-hero{
  position:relative;
  overflow:hidden;
  isolation:isolate;
  min-height:210px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:24px;
  border:1px solid #39392e;
  border-radius:16px;
  box-shadow:var(--variant-shadow);
  background-color:#121511;
  background-repeat:no-repeat;
  background-size:cover;
  background-position:center;
}
.field-hero::before,
.vh-hero::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(90deg,rgba(9,11,9,.98) 0%,rgba(9,11,9,.88) 43%,rgba(9,11,9,.28) 76%,rgba(9,11,9,.1) 100%);
}
.field-hero::after,
.vh-hero::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  box-shadow:inset 0 0 80px rgba(0,0,0,.5),inset 0 -70px 90px rgba(0,0,0,.35);
}
.field-hero[data-prospect="olympus"]{background-image:url("../assets/art/icarus-olympus.svg")}
.field-hero[data-prospect="styx"]{background-image:url("../assets/art/icarus-styx.svg")}
.field-hero[data-prospect="prometheus"]{background-image:url("../assets/art/icarus-prometheus.svg")}
.field-hero[data-prospect="elysium"]{background-image:url("../assets/art/icarus-elysium.svg")}
.vh-hero{background-image:url("../assets/art/valheim-hero.svg")}

.overview-title-row{
  position:relative;
  z-index:1;
  align-items:flex-start;
}
.overview-title-copy{
  max-width:720px;
}
.overview-title-copy h2,
.field-hero h2,
.vh-hero h2{
  font-size:clamp(26px,3vw,38px);
  line-height:1.05;
  letter-spacing:-.025em;
  text-shadow:0 3px 18px rgba(0,0,0,.5);
}
.field-hero p,.vh-hero p{
  max-width:690px;
  font-size:13px;
  color:#b7ad99;
}
.hero-field-line{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:13px;
  color:#8f846f;
  font:700 10px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.hero-field-line::before{
  content:"";
  width:26px;
  height:1px;
  background:#b08e44;
}
.overview-support-link{
  min-height:34px!important;
  padding:6px 10px!important;
  font-size:12px!important;
  margin-top:-4px;
  backdrop-filter:blur(8px);
  background:rgba(13,15,13,.72)!important;
}

.ic-home-status{
  position:relative;
  z-index:1;
  margin-top:16px;
}
.ic-status-chip{
  backdrop-filter:blur(8px);
  background:rgba(13,16,13,.72);
  border-color:rgba(210,180,110,.2);
}
.vh-release{
  position:relative;
  z-index:1;
  max-width:720px;
  background:rgba(16,17,13,.76);
  backdrop-filter:blur(8px);
  border-left-color:#bb9142;
}

.ic-progress-grid,.vh-grid{
  gap:10px;
}
.ic-progress-card,.vh-card{
  position:relative;
  overflow:hidden;
  transition:transform .15s ease,border-color .15s ease,background-color .15s ease,box-shadow .15s ease;
}
.ic-progress-card{
  border:1px solid #2b3029;
  border-radius:12px;
  padding:13px;
  background:linear-gradient(145deg,#131613,#0f110f);
}
.ic-progress-card::after,.vh-card::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:2px;
  background:linear-gradient(90deg,transparent,rgba(211,174,83,.15),transparent);
  opacity:0;
  transition:opacity .15s ease;
}
.ic-progress-card:hover,.vh-card:hover{
  transform:translateY(-2px);
  border-color:#454334;
  box-shadow:0 12px 26px rgba(0,0,0,.16);
}
.ic-progress-card:hover::after,.vh-card:hover::after{opacity:1}
.ic-progress-card-head,.vh-card-head{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:7px;
}
.metric-icon{
  width:29px;
  height:29px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border:1px solid #3c3a2d;
  border-radius:8px;
  background:#171911;
  color:#c5a85f;
}
.metric-icon .variant-icon{font-size:16px}
.ic-progress-card-head h3,.vh-card-head h3{
  margin:0;
}
.ic-progress-card .vh-btn,.vh-card .vh-btn{
  position:relative;
  z-index:1;
}
.vh-card{
  background:linear-gradient(145deg,#131613,#0f110f);
}

.ic-home-section,.vh-home-continue,.ic-support,.vh-overview-details{
  border-top-color:#2b3029;
}
.ic-continue-row,.ic-activity,.vh-home-continue-row{
  border-radius:9px;
  padding-left:8px;
  padding-right:8px;
  transition:background-color .15s ease;
}
.ic-continue-row:hover,.ic-activity:hover,.vh-home-continue-row:hover{
  background:rgba(255,255,255,.018);
}

.vh-btn,.vbtn,.sidebar-action,.header-install-btn{
  transition:transform .12s ease,background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease;
}
.vh-btn:hover,.vbtn:hover,.sidebar-action:hover,.header-install-btn:hover{
  transform:translateY(-1px);
}
.vh-btn:active,.vbtn:active,.sidebar-action:active,.header-install-btn:active{
  transform:translateY(0);
}

.vh-note-empty,.vhx-empty,.vempty,.vstableGalleryEmpty,.guide-empty,.variant-empty-state{
  position:relative;
  overflow:hidden;
  min-height:106px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:5px;
  border:1px dashed #34372f;
  border-radius:11px;
  background:
    radial-gradient(circle at center,rgba(183,154,92,.05),transparent 62%),
    #101210;
  color:#928977;
  padding:18px 20px;
}
.variant-empty-art{
  width:98px;
  height:60px;
  object-fit:contain;
  opacity:.7;
  margin-bottom:3px;
}
.variant-empty-title{
  color:#cdb98c;
  font-weight:800;
  font-size:13px;
}
.variant-empty-copy{
  max-width:520px;
  color:#8f8675;
  font-size:12px;
  line-height:1.45;
}

body[data-game="valheim"]{
  background:
    radial-gradient(circle at 76% -10%,rgba(111,132,87,.07),transparent 34%),
    linear-gradient(180deg,#0c0f0d,#0b0d0c 65%);
}
body[data-game="valheim"] nav button[data-section].active{
  background:linear-gradient(90deg,rgba(126,145,88,.14),rgba(126,145,88,.02));
}
body[data-game="valheim"] nav button[data-section].active::after{
  background:#a7ad72;
}
body[data-game="valheim"] nav button.active .variant-nav-icon,
body[data-game="valheim"] nav button:hover .variant-nav-icon{
  color:#b8b77c;
}

/* Give the 3D planner the same quiet field-grid treatment as the main app. */
.v3dApp{
  background:
    linear-gradient(rgba(211,177,94,.018) 1px,transparent 1px),
    linear-gradient(90deg,rgba(211,177,94,.018) 1px,transparent 1px),
    #080908!important;
  background-size:42px 42px!important;
}
.v3dTopbar{
  box-shadow:0 8px 24px rgba(0,0,0,.2);
}
.v3dPanel{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.012);
}

@media(max-width:820px){
  .header-brand-mark{width:30px;height:30px}
  .header-brand-copy{display:block}
  .header-field-tag{display:none}
  .brand-sub{display:none}
  .field-hero,.vh-hero{min-height:190px;padding:18px}
  .field-hero::before,.vh-hero::before{background:linear-gradient(90deg,rgba(9,11,9,.96),rgba(9,11,9,.74) 70%,rgba(9,11,9,.36))}
  .overview-title-row{display:block}
  .overview-support-link{margin-top:14px}
  .ic-progress-card:hover,.vh-card:hover{transform:none;box-shadow:none}
}

@media(max-width:560px){
  .field-hero,.vh-hero{min-height:176px;padding:15px;background-position:64% center}
  .overview-title-copy h2,.field-hero h2,.vh-hero h2{font-size:24px}
  .hero-field-line{font-size:9px}
  .ic-progress-grid{grid-template-columns:1fr!important}
  .metric-icon{width:27px;height:27px}
}

/* Splash animation is decorative only; the app still dismisses it using the normal shell logic. */
.splash-emblem{
  position:relative;
  width:104px;
  height:104px;
  display:grid;
  place-items:center;
  margin-bottom:18px;
}
.splash-emblem img{
  width:62px;
  height:62px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid #66562f;
  box-shadow:0 0 36px rgba(223,185,95,.14),0 14px 35px rgba(0,0,0,.45);
  z-index:2;
}
.splash-ring{
  position:absolute;
  inset:0;
  border:1px solid rgba(221,184,92,.24);
  border-radius:50%;
}
.splash-ring::after{
  content:"";
  position:absolute;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#c9a455;
  box-shadow:0 0 14px rgba(220,179,80,.5);
  left:50%;
  top:-4px;
}
.splash-ring-one{animation:variant-orbit 5.6s linear infinite}
.splash-ring-two{inset:12px;opacity:.6;animation:variant-orbit 8.5s linear reverse infinite}
#splash{
  background:
    radial-gradient(circle at center,rgba(190,152,67,.1),transparent 26%),
    linear-gradient(180deg,#080a08,#050605);
}
#splash .splash-app-name{
  letter-spacing:.02em;
  text-shadow:0 3px 22px rgba(0,0,0,.7);
}
#splash small{
  letter-spacing:.08em;
  text-transform:uppercase;
}
@keyframes variant-orbit{to{transform:rotate(360deg)}}

.vh-stat-compact{font-size:20px!important}
.vh-card-note{margin-top:6px}
.vh-card-action{margin-top:9px}
.vh-btn .variant-icon,.vbtn .variant-icon{font-size:15px;margin-right:4px}
.vbaseEmptyArt{width:126px;height:78px;object-fit:contain;opacity:.72;margin:0 auto 8px;display:block}
.v3dEmptyArt{width:132px;height:82px;object-fit:contain;opacity:.74;margin:0 auto 5px}

@media(prefers-reduced-motion:reduce){
  .splash-ring-one,.splash-ring-two{animation:none}
}

/* Technical-status panels are intentionally plain: the useful part is the state, not decoration. */
.help-action-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0;
}
.source-game-target{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:11px 12px;
  margin:10px 0;
  border:1px solid #373123;
  border-radius:10px;
  background:#11120f;
}
.source-game-target span,.source-health-row small,.source-health-chip small,.source-change-row small{
  display:block;
  color:#8f846f;
  font-size:11px;
  margin-top:2px;
}
.source-game-target b{display:block;color:#f0d49c;margin-top:2px}
.source-game-target a{color:#d5bb82;text-decoration:none;white-space:nowrap}
.source-health-list,.source-change-list{display:grid;gap:6px;margin:9px 0}
.source-health-row,.source-change-row,.diagnostics-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:8px 10px;
  border:1px solid #2b2b27;
  border-radius:8px;
  background:#0d0e0c;
}
.source-health-chip{
  min-width:84px;
  text-align:right;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.source-health-chip.ok,.source-check-ok{color:#83d18b}
.source-health-chip.warn,.source-check-warning{color:#ffd166}
.source-check-detail{color:#8f846f;margin-top:6px;font-size:12px}
.source-change-row>span{color:#b8aa8e;font-size:12px;white-space:nowrap}
.diagnostics-grid{display:grid;gap:6px;margin-top:10px}
.diagnostics-row span{color:#9d927d}
.diagnostics-row b{color:#e7dcc5;text-align:right;overflow-wrap:anywhere}

@media(max-width:820px){
  /* The support link is already available under Resources & Support. Hiding the duplicate here keeps the hero readable on phones. */
  .overview-support-link{display:none!important}
  .source-game-target,.source-health-row,.source-change-row,.diagnostics-row{align-items:flex-start}
}
@media(max-width:560px){
  .source-game-target,.source-health-row,.source-change-row,.diagnostics-row{flex-direction:column}
  .source-health-chip,.diagnostics-row b{text-align:left}
}

.help-search-bar {
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid rgba(214, 177, 95, 0.22);
  border-radius: 12px;
  background: rgba(12, 12, 11, 0.72);
}

.help-search-bar > label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.help-search-row {
  display: flex;
  gap: 8px;
}

.help-search-row .vinput {
  flex: 1;
}

.help-search-bar .vmuted {
  margin-top: 7px;
}

.tool-context-help {
  margin-left: auto;
}

.header-sync-status {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(214, 177, 95, 0.28);
  border-radius: 999px;
  background: rgba(17, 16, 14, 0.82);
  color: #d8cfbd;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.header-sync-status[data-state="ready"] {
  border-color: rgba(95, 155, 105, 0.5);
}

.header-sync-status[data-state="reconnect"] {
  border-color: rgba(214, 158, 68, 0.55);
}

@media (max-width: 820px) {
  .header-sync-status {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .help-search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .tool-context-help {
    margin-left: 0;
  }
}

/* Help pages use compact native accordions so one long explanation never stretches an entire row. */
#help .help-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding-bottom: 38px;
}

#help .help-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 290px);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid #34312b;
  border-radius: 14px;
  background: radial-gradient(circle at top right, rgba(164, 124, 46, 0.12), transparent 38%), linear-gradient(145deg, #151513, #0f100f);
}

#help .help-kicker,
#help .help-group-kicker {
  display: block;
  color: #9f8d6b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

#help .help-hero h2 {
  margin: 6px 0 7px;
  color: #f0d49c;
  font-size: 24px;
}

#help .help-hero p {
  margin: 0;
  max-width: 760px;
  color: #b8aa8e;
  line-height: 1.55;
}

#help .help-hero-note {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #2d2c27;
  border-radius: 10px;
  background: rgba(9, 10, 9, .62);
}

#help .help-hero-note b {
  color: #e7cf9a;
  font-size: 12px;
}

#help .help-hero-note span {
  color: #a89a80;
  font-size: 12px;
}

#help .help-search-bar {
  margin: 12px 0 0;
  padding: 12px;
}

#help .help-grid {
  display: block;
  max-width: none;
  padding-bottom: 0;
}

#help .help-group {
  margin-top: 18px;
}

#help .help-group-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin: 0 2px 9px;
}

#help .help-group-head h2 {
  margin: 3px 0 0;
  color: #e8d5ad;
  font-size: 17px;
}

#help .help-group-head p {
  margin: 0;
  max-width: 540px;
  color: #827866;
  font-size: 12px;
  text-align: right;
}

#help .help-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  align-items: start;
}

#help details.help-card {
  margin: 0;
  align-self: start;
  border: 1px solid #2b2e2b;
  border-radius: 11px;
  background: #101110;
  overflow: hidden;
}

#help details.help-card[open] {
  border-color: #3d382d;
  background: #11120f;
}

#help details.help-card > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

#help details.help-card > summary::-webkit-details-marker {
  display: none;
}

#help details.help-card > summary > span {
  min-width: 0;
  flex: 1;
}

#help details.help-card > summary::after {
  content: "›";
  flex: 0 0 auto;
  color: #b99a5a;
  font-size: 22px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform .16s ease;
}

#help details.help-card[open] > summary::after {
  transform: rotate(90deg);
}

#help .help-card summary h3 {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #efcb82;
  font-size: 14px;
  line-height: 1.25;
}

#help .help-card summary small {
  display: block;
  margin-top: 3px;
  color: #827968;
  font-size: 11px;
  line-height: 1.35;
}

#help .help-card-body {
  padding: 11px 13px 13px;
  border-top: 1px solid #242521;
  color: #d8d1c2;
  font-size: 13px;
  line-height: 1.52;
}

#help .help-card-body ol,
#help .help-card-body ul {
  margin: 3px 0 0 18px;
}

#help .help-card-body li {
  margin: 5px 0;
}

#help .help-note {
  margin-top: 9px;
}

#help .source-health-grid,
#help .diagnostics-grid {
  margin-top: 9px;
}

/* Valheim mirrors the same help structure without changing normal Valheim cards elsewhere. */
#valheim-help .vh-help-shell {
  max-width: 1240px;
}

#valheim-help .vh-help-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 290px);
  gap: 18px;
  align-items: center;
}

#valheim-help .vh-help-hero-note {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #30342b;
  border-radius: 10px;
  background: rgba(8, 10, 8, .58);
}

#valheim-help .vh-help-hero-note b {
  color: #e8cf98;
  font-size: 12px;
}

#valheim-help .vh-help-hero-note span {
  color: #938a77;
  font-size: 12px;
}

#valheim-help .vh-help-group {
  margin-top: 18px;
}

#valheim-help .vh-help-group-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin: 0 2px 9px;
}

#valheim-help .vh-help-group-head > div > span {
  display: block;
  color: #8e846c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

#valheim-help .vh-help-group-head h2 {
  margin: 3px 0 0;
  color: #dfc892;
  font-size: 17px;
}

#valheim-help .vh-help-group-head p {
  margin: 0;
  max-width: 520px;
  color: #7f7868;
  font-size: 12px;
  text-align: right;
}

#valheim-help .vh-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  align-items: start;
}

#valheim-help details.vh-help-card {
  margin: 0;
  align-self: start;
  border: 1px solid #2d3029;
  border-radius: 11px;
  background: #10120f;
  overflow: hidden;
}

#valheim-help details.vh-help-card[open] {
  border-color: #3d382a;
  background: #111310;
}

#valheim-help details.vh-help-card > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

#valheim-help details.vh-help-card > summary::-webkit-details-marker {
  display: none;
}

#valheim-help details.vh-help-card > summary > span {
  min-width: 0;
  flex: 1;
}

#valheim-help details.vh-help-card > summary::after {
  content: "›";
  flex: 0 0 auto;
  color: #ad9157;
  font-size: 22px;
  line-height: 1;
  transition: transform .16s ease;
}

#valheim-help details.vh-help-card[open] > summary::after {
  transform: rotate(90deg);
}

#valheim-help .vh-help-card h3 {
  margin: 0;
  color: #e8cf98;
  font-size: 14px;
  line-height: 1.25;
}

#valheim-help .vh-help-card summary small {
  display: block;
  margin-top: 3px;
  color: #817968;
  font-size: 11px;
  line-height: 1.35;
}

#valheim-help .vh-help-body {
  padding: 11px 13px 13px;
  border-top: 1px solid #262820;
  color: #b8ae9a;
  font-size: 13px;
  line-height: 1.52;
}

@media (max-width: 780px) {
  #help .help-hero,
  #valheim-help .vh-help-hero {
    grid-template-columns: 1fr;
  }

  #help .help-hero-note,
  #valheim-help .vh-help-hero-note {
    display: none;
  }

  #help .help-group-head,
  #valheim-help .vh-help-group-head {
    display: block;
  }

  #help .help-group-head p,
  #valheim-help .vh-help-group-head p {
    margin-top: 4px;
    text-align: left;
  }

  #help .help-card-grid,
  #valheim-help .vh-help-grid {
    grid-template-columns: 1fr;
  }
}


/* High-resolution Variant brand mark. */
.header-brand-mark{
  image-rendering:auto!important;
  object-fit:contain!important;
  background:#050606!important;
}


/* Layout and responsive controls. */
/*
  Interface polish for the everyday tool screens.
  This file stays intentionally separate from the larger feature stylesheets so layout
  cleanup does not get mixed into map rendering, planners, or game-data rules.
*/

/* Header actions should never push through the product name on narrow screens. */
header .header-brand {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

header .header-brand-copy,
header .header-title {
  min-width: 0;
}

header .header-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-sync-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.header-sync-icon {
  flex: 0 0 auto;
  line-height: 1;
}

.header-sync-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tool tabs behave like one compact navigation rail instead of a row of loose buttons. */
#toolsContainer > .vtabs {
  position: sticky;
  top: 0;
  z-index: 12;
  gap: 5px;
  padding: 6px;
  margin: -2px 0 10px;
  border: 1px solid #2d302a;
  border-radius: 11px;
  background: rgba(13, 15, 13, .94);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
  backdrop-filter: blur(10px);
  overflow-x: auto;
  scrollbar-width: thin;
}

#toolsContainer > .vtabs .vtab {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 7px;
}

#toolsContainer > .vtabs .vtab.active {
  box-shadow: inset 0 0 0 1px rgba(233, 198, 112, .12);
}

/* Keep information-heavy pages readable on ultrawide monitors. */
.guides-shell,
#tool-shared > *,
#tool-sync > *,
#tool-here > *,
#tool-backup > * {
  max-width: 1440px;
}

.guides-shell {
  margin-right: auto;
}

/* Shared Maps */
.shared-hub {
  display: grid;
  gap: 12px;
}

.shared-hub-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  border: 1px solid #403a2c;
  border-radius: 13px;
  background:
    radial-gradient(circle at 92% -20%, rgba(210, 173, 86, .12), transparent 36%),
    linear-gradient(135deg, #171913, #10120f 68%);
}

.shared-hub-kicker,
.sync-hub-kicker {
  margin-bottom: 4px;
  color: #9e8a5c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.shared-hub-hero h2 {
  margin: 0;
  color: #f0d49c;
  font-size: clamp(21px, 2vw, 28px);
}

.shared-hub-hero p {
  max-width: 780px;
  margin: 5px 0 0;
  color: #a9a18f;
  line-height: 1.45;
}

.shared-hub-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #38513a;
  border-radius: 999px;
  background: #101711;
  color: #b9d0b7;
  font-size: 12px;
  white-space: nowrap;
}

.shared-hub-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7fb381;
  box-shadow: 0 0 0 3px rgba(127, 179, 129, .1);
}

.shared-hub .vsharedGrid {
  gap: 14px;
}

.shared-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.shared-hub .vcard {
  margin: 0;
  border-color: #2f332d;
  border-radius: 11px;
  background: linear-gradient(150deg, rgba(19, 21, 18, .98), rgba(13, 15, 13, .98));
}

.shared-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.shared-card-head .vtitle {
  margin: 0;
}

.shared-card-head .vbadge {
  flex: 0 0 auto;
}

.shared-create-join {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 9px;
}

.shared-action-box {
  min-width: 0;
  padding: 10px;
  border: 1px solid #2c302b;
  border-radius: 9px;
  background: rgba(11, 13, 11, .58);
}

.shared-action-box > strong {
  display: block;
  margin-bottom: 7px;
  color: #d9c18f;
  font-size: 12px;
}

.shared-action-box .vinput {
  width: 100%;
  box-sizing: border-box;
}

.shared-action-box .vbtn {
  width: 100%;
  margin-top: 7px;
}

.shared-hub .vsharedMapRow {
  position: relative;
  padding: 11px 12px;
  border-color: #30342e;
  border-radius: 10px;
  background: #10130f;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}

.shared-hub .vsharedMapRow:hover {
  border-color: #48483b;
  background: #131611;
}

.shared-hub .vsharedMapRow.active {
  border-color: #7a5e25;
  background: linear-gradient(90deg, rgba(93, 69, 25, .18), #11130f 38%);
}

.shared-hub .vsharedMapRow .vrow {
  gap: 6px;
}

.shared-hub .vsharedMapRow .vbtn {
  min-height: 31px;
  padding: 5px 9px;
}

.shared-hub .vsharedActive {
  margin: 0 0 9px;
  border-color: #544927;
  background: linear-gradient(100deg, rgba(90, 68, 24, .18), #121510);
}

.shared-hub .vsharedHelp summary,
.sync-details summary {
  cursor: pointer;
  color: #e3ca94;
  font-weight: 700;
  user-select: none;
}

.shared-hub .vsharedInviteCard {
  border-color: #3a4a48;
  background: linear-gradient(145deg, #101716, #0d1110);
}

.shared-hub .vsharedInviteBox {
  border-color: #405250;
  background: #0b1111;
}

/* Google Sync */
.sync-hub {
  display: grid;
  gap: 12px;
}

.sync-hub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 17px;
  border: 1px solid #36372f;
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(75, 132, 91, .11), transparent 34%),
    linear-gradient(135deg, #161814, #10120f);
}

.sync-hub-header .vtitle {
  font-size: 22px;
}

.sync-hub-copy {
  max-width: 860px;
  margin: 5px 0 0;
  line-height: 1.45;
}

.sync-connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #41443b;
  border-radius: 999px;
  background: #10120f;
  color: #c7c0af;
  font-size: 12px;
  font-weight: 700;
}

.sync-connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #817b6d;
}

.sync-primary-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.sync-primary-grid .vcard,
.sync-details {
  margin: 0;
}

.sync-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sync-action-row {
  margin-top: 9px;
}

.sync-persistence-note {
  margin-top: 9px;
  padding: 8px 9px;
  border: 1px solid #30332d;
  border-radius: 8px;
  background: #0e100e;
  color: #9f998a;
  font-size: 12px;
  line-height: 1.4;
}

.sync-persistence-note[data-state="good"] {
  border-color: #334d36;
  color: #b4c9b3;
  background: #0f1510;
}

.sync-persistence-note[data-state="warning"] {
  border-color: #5b4829;
  color: #ddc18c;
  background: #171309;
}

.sync-stats {
  margin: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sync-details {
  background: #0f110f;
}

.sync-details > p {
  margin: 9px 0 0;
}

.sync-transfer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.sync-transfer-card {
  padding: 11px;
  border: 1px solid #2d302b;
  border-radius: 9px;
  background: #0c0e0c;
}

.sync-transfer-card .vmuted {
  margin-top: 5px;
  min-height: 34px;
}

.sync-transfer-card .vbtn {
  margin-top: 10px;
}

/* Grid Lookup replaces the old vague What's Here? wording. */
.grid-lookup {
  display: grid;
  gap: 12px;
}

.grid-lookup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.grid-lookup-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(170px, auto) auto;
  gap: 8px;
  margin-top: 10px;
}

.grid-lookup-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.grid-lookup-results {
  display: grid;
  gap: 6px;
}

.grid-lookup-results .vresource {
  margin: 0;
}

/* Icarus map toolbar: one clear control surface instead of floating boxes. */
#map .map-toolbar {
  padding: 9px !important;
  border: 1px solid #30332d;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(18, 20, 17, .97), rgba(12, 14, 12, .97));
  box-shadow: 0 5px 16px rgba(0, 0, 0, .14);
}

#map .map-toolbar > .map-marker-select-wrap > div,
#map .map-toolbar > .map-marker-input-wrap > div {
  color: #aa9c7f !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .05em;
  text-transform: uppercase;
}

#map .map-toolbar .codex-select,
#map .map-toolbar .map-marker-label-input,
#map .map-toolbar .variant-mobile-select-trigger,
#map .map-toolbar > button {
  border-radius: 7px !important;
}

#map .map-place-marker-button {
  border-color: #755b28 !important;
  background: linear-gradient(#2a220f, #1d180c) !important;
  color: #f2d596 !important;
}

/* Valheim gets the same map-control hierarchy as Icarus. */
.vhx-map-icarus-toolbar {
  padding: 9px;
  border: 1px solid #30332d;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(18, 20, 17, .97), rgba(12, 14, 12, .97));
}

.vhx-map-control-field > span {
  margin-left: 3px;
  color: #aa9c7f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.vhx-map-empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  text-align: center;
}

.vhx-map-empty-state > div {
  max-width: 370px;
  padding: 13px 15px;
  border: 1px solid rgba(80, 75, 58, .7);
  border-radius: 10px;
  background: rgba(12, 14, 12, .88);
  color: #9f9684;
  line-height: 1.45;
  backdrop-filter: blur(5px);
}

.vhx-map-empty-state b {
  display: block;
  margin-bottom: 3px;
  color: #e5ca91;
}

/* Completed checklist items stay visible without letting old material notes dominate the page. */
.check-item-wrap.done .check-item-note,
.check-item-wrap.done .check-item-tools,
.vh-check-item-wrap.done .vh-check-item-note,
.vh-check-item-wrap.done .vh-check-item-tools {
  display: none !important;
}

/* Small-screen priorities: navigation, title, then compact actions. */
@media (max-width: 820px) {
  header {
    gap: 5px !important;
  }

  header .header-brand {
    gap: 6px;
  }

  header .header-brand-mark {
    width: 28px;
    height: 28px;
  }

  header .header-title {
    font-size: 14px;
    letter-spacing: .015em;
  }

  .header-sync-status,
  .header-calculator-btn,
  .header-install-btn {
    flex: 0 0 auto;
  }

  .header-sync-status {
    width: 34px;
    max-width: 34px;
    min-height: 32px;
    padding: 5px;
  }

  .header-sync-label {
    display: none;
  }

  .header-calculator-btn {
    min-width: 42px;
    padding-inline: 7px;
  }

  .shared-hub-hero,
  .sync-hub-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }

  .shared-hub-status,
  .sync-connection-pill {
    align-self: flex-start;
  }

  .shared-create-join,
  .sync-primary-grid,
  .sync-transfer-grid {
    grid-template-columns: 1fr;
  }

  .sync-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sync-card-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .sync-card-heading .vbtn {
    width: 100%;
  }

  .grid-lookup-head,
  .grid-lookup-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .grid-lookup-form {
    grid-template-columns: 1fr;
  }

  #map .map-toolbar,
  .vhx-map-icarus-toolbar {
    padding: 7px !important;
  }
}

@media (max-width: 480px) {
  header .header-brand-mark {
    display: none;
  }

  header .header-title {
    font-size: 13px;
  }

  .header-calculator-btn {
    min-width: 38px;
    padding-inline: 6px;
  }

  .sync-stats {
    grid-template-columns: 1fr 1fr;
  }
}

.sync-connection-pill[data-state="ready"] {
  border-color: #38513a;
  color: #bdd0ba;
  background: #101711;
}

.sync-connection-pill[data-state="ready"] .sync-connection-dot {
  background: #7fb381;
}

.sync-connection-pill[data-state="warning"] {
  border-color: #5c4827;
  color: #dfc18b;
  background: #171309;
}

.sync-connection-pill[data-state="warning"] .sync-connection-dot {
  background: #d2a553;
}

@media (min-width: 1100px) {
  .vh-shell {
    max-width: 1320px;
  }

  #storms .storm-layout {
    max-width: 1500px;
  }
}

/* Mobile tools use one selector instead of wrapping every tool into a wall of buttons. */
.vtoolMobileNav {
  display: none;
}

@media (max-width: 820px) {
  #toolsContainer > .vtabs {
    display: none;
  }

  #toolsContainer > .vtoolMobileNav {
    position: sticky;
    top: 0;
    z-index: 12;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin: -2px 0 12px;
    padding: 9px 10px;
    border: 1px solid #2d302a;
    border-radius: 11px;
    background: rgba(13, 15, 13, .96);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
    backdrop-filter: blur(10px);
  }

  #toolsContainer > .vtoolMobileNav > span {
    color: #cbb889;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  #toolsContainer > .vtoolMobileNav .vselect {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 15px;
    font-weight: 650;
    border-color: #5a4a28;
    background-color: #141410;
  }
}

/* Keep Google Sync simple: one control panel, one status strip, and plain-language help. */
.sync-card-kicker {
  margin-bottom: 5px;
  color: #b89b61;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
}

.sync-primary-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid #33362f;
  border-radius: 12px;
  background: linear-gradient(145deg, #131613, #0e100e);
}

.sync-primary-grid .vcard {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 16px;
}

.sync-primary-grid .sync-actions-card {
  border-left: 1px solid #30332d;
}

.sync-auto-card .vtitle,
.sync-actions-card .vtitle {
  margin-bottom: 5px;
}

.sync-action-row {
  gap: 7px;
  flex-wrap: wrap;
}

.sync-persistence-note {
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.sync-stats {
  gap: 0;
  overflow: hidden;
  border: 1px solid #30332d;
  border-radius: 10px;
  background: #0f110f;
}

.sync-stats > div {
  border: 0;
  border-right: 1px solid #292c27;
  border-radius: 0;
  background: transparent;
  padding: 10px 12px;
}

.sync-stats > div:last-child {
  border-right: 0;
}

.sync-friendly-note {
  padding: 10px 12px;
  border-left: 2px solid #7f6a3d;
  background: rgba(127, 106, 61, .07);
  color: #aaa392;
  font-size: 12px;
  line-height: 1.5;
}

.sync-friendly-note b {
  color: #d8c28f;
}

.sync-details {
  padding: 12px 14px;
}

.sync-details > summary {
  cursor: pointer;
  color: #d9c28f;
  font-weight: 800;
}

@media (max-width: 760px) {
  .sync-primary-grid .sync-actions-card {
    border-left: 0;
    border-top: 1px solid #30332d;
  }

  .sync-stats {
    grid-template-columns: 1fr;
  }

  .sync-stats > div {
    border-right: 0;
    border-bottom: 1px solid #292c27;
  }

  .sync-stats > div:last-child {
    border-bottom: 0;
  }
}
