/* Header */
.limiar-header .header-account-info strong {
  max-width: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.limiar-header .header-account-info strong > span { white-space: nowrap; }
.limiar-header .header-points { flex-wrap: nowrap; }
.limiar-header .site-account-actions :is(#site-account, #site-register, #site-admin, #site-signout) {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
}
@media (min-width: 1071px) {
  .limiar-header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "identity session" "nav nav";
    gap: 0 2rem;
  }
  .limiar-wordmark { grid-area: identity; min-height: 3.65rem; max-width: none; }
  .limiar-wordmark > span:last-child { max-width: 28ch; }
  .limiar-header-end { grid-area: session; }
  .limiar-header-session { gap: 1.4rem; }
  body .limiar-nav#main-nav {
    grid-area: nav;
    border-top: 1px solid #90749755;
    gap: 0 clamp(1rem, 2.5vw, 2.4rem);
    flex-wrap: wrap;
    justify-content: center;
  }
  .limiar-links { justify-content: center; column-gap: clamp(1rem, 2.5vw, 2.4rem); }
  .limiar-nav .limiar-links > a, .limiar-community > summary { min-height: 3.15rem; }
  .limiar-links > a[aria-current]::after,
  .limiar-community:is([open], :has(a[aria-current])) > summary::before { bottom: .34rem; }
}
@media (max-width: 1070px) {
  body .limiar-nav#main-nav { grid-template-columns: minmax(0, 1fr); }
  body .limiar-menu[aria-expanded=true] + .limiar-nav#main-nav { display: grid; gap: .25rem; }
  .limiar-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr)); gap: 0 .8rem; }
  .limiar-nav .limiar-links > a { min-width: 0; padding-inline: .38rem; white-space: normal; overflow-wrap: anywhere; }
  .limiar-community { position: relative; border-top: 1px solid var(--limiar-rule); }
  .limiar-flyout { position: static; width: 100%; max-width: none; box-shadow: none; }
}

/* Home and Gathering Hall */
.limiar-home .community-preview-label {
  width: fit-content;
  margin-bottom: .8rem;
  padding: .24rem .64rem;
  border: 1px solid #ae8679;
  border-radius: 4px;
  background: #3e2d38;
  color: #f5d5c0;
  font-weight: 600;
}
.limiar-home .chat-sigil {
  border-color: #dfae98;
  box-shadow: inset 0 0 0 3px #2b1f2e, inset 0 0 0 4px #a77889, 0 0 13px #d3978560;
}
.limiar-home .chat-compose input { background: #17111f; border-color: #ac8eaf; box-shadow: inset 0 2px 5px #0f0a14; }
.limiar-home .chat-compose button[type=submit] {
  background: var(--commit-face);
  color: var(--commit-ink);
  border-color: var(--commit-edge);
  box-shadow: var(--commit-shadow);
}
.limiar-home .chat-compose button[type=submit]:hover:not(:disabled) { background: var(--commit-hover); }
.limiar-home .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 22% 37%, #f6d4cc65 0 1px, transparent 1.8px) 0 0 / 211px 233px,
    radial-gradient(circle at 70% 53%, #d7c5f15e 0 1px, transparent 1.7px) 12px -22px / 157px 173px,
    radial-gradient(circle at 43% 71%, #efe1f36b 0 .8px, transparent 1.6px) -17px 12px / 283px 213px;
  mask-image: linear-gradient(100deg, transparent 18%, #000 65%), linear-gradient(#000 65%, transparent 95%);
  mask-composite: intersect;
}
.limiar-home .dialog-feedback:not(:empty) { color: var(--limiar-ice); margin-top: .75rem; }
.limiar-home .copy-box button:disabled { opacity: .6; cursor: not-allowed; }
.limiar-home :is(#realmlist, #realm-address, .dialog-command) { overflow-wrap: anywhere; }

/* Close controls share a secondary action treatment */
html body[data-area] :is(.avatar-dialog-heading > button, .shop-detail-toolbar > .shop-detail-close, #close-dialog) {
  background: linear-gradient(#463650, #2b2134);
  color: var(--limiar-ink);
  border: 1px solid var(--action-edge);
  border-radius: 5px;
  box-shadow: inset 0 1px #efd8f02e;
}
html body[data-area] :is(.avatar-dialog-heading > button, .shop-detail-toolbar > .shop-detail-close, #close-dialog):is(:hover,:focus-visible) {
  background: var(--action-hover);
  color: var(--limiar-ink);
  border-color: var(--limiar-ember);
}
html body[data-area] :is(.avatar-dialog-heading > button, .shop-detail-toolbar > .shop-detail-close, #close-dialog):focus-visible {
  outline: 2px solid var(--limiar-focus);
  outline-offset: 3px;
}

/* Store */
html body[data-area='store'] .shop-product { --rarity-edge: #b99eae; }
html body[data-area='store'] .shop-product.quality-2 { --rarity-edge: #83c978; }
html body[data-area='store'] .shop-product.quality-3 { --rarity-edge: #76b9ff; }
html body[data-area='store'] .shop-product.quality-4 { --rarity-edge: #cd97ff; }
html body[data-area='store'] .shop-product.quality-5 { --rarity-edge: #f5ad68; }
html body[data-area='store'] .shop-product:is(:hover,:has(:focus-visible)) {
  border-color: var(--rarity-edge);
  box-shadow: 0 8px 20px #110c198c, 0 0 22px color-mix(in srgb, var(--rarity-edge) 35%, transparent);
}
html body[data-area='store'] .shop-grid .shop-product:is(:hover,:has(:focus-visible)) { transform: translateY(-3px); }
html body[data-area='store'] .shop-product .shop-currency-options > button[aria-pressed=true] {
  --currency-edge: #e9c683;
  background: linear-gradient(#2d2237, #514059);
  box-shadow: inset 0 -3px var(--currency-edge), inset 0 1px #f3deea29;
}
html body[data-area='store'] .shop-product .shop-currency-options > button[aria-pressed=true]:has(.point-vp) { --currency-edge: #97d5f2; }
html body[data-area='store'] :is(.shop-filters .selected, .shop-currency-filter [aria-pressed=true]) {
  box-shadow: inset 0 -2px var(--limiar-ember), inset 0 1px #f7e3f02e;
}
html body[data-area='store'] :is(.shop-filters, .shop-currency-filter, .shop-currency-options) button:focus-visible {
  outline: 2px solid var(--limiar-focus);
  outline-offset: -3px;
}
html body[data-area='store'] .shop-product > button:not(.shop-details-link) { box-shadow: inset 0 1px #f2dbef3b, 0 2px 6px #110b18a6; }

/* Armory and player account */
html body[data-area='armory'] {
  --scene: linear-gradient(90deg, #171421df 12%, #241b35ab 55%, #1a16258f), url('/limiar/gate.jpg') center 42% / cover no-repeat;
  --scene-height: clamp(25rem, 43vw, 38rem);
}
html body[data-area='armory']::after {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: var(--scene-height);
  background: var(--scene);
  mask-image: linear-gradient(#000 35%, transparent);
  z-index: -1;
  pointer-events: none;
}
html body[data-area='armory'] :is(.archive-welcome, .archive-group, .guild-roster, .armory-item-page, .character-profile .equipment-layout) {
  border: 1px solid #887794;
  background-color: #251e2f;
  box-shadow: inset 0 0 0 3px #1a1421, inset 0 0 0 4px #735b7988, 0 12px 32px #100a1a85;
}
html body[data-area='armory'] :is(.character-profile .armory-stats,.character-sheet-header,.guild-roster-toolbar) {
  background: linear-gradient(#382d46, #262032);
  border-color: #806c8b;
}
html body[data-area='armory'] :is(.equipment-button,.character-portrait-frame) {
  box-shadow: inset 0 0 0 2px #15111b, 0 3px 7px #0f0c16a6;
}
html body[data-area='armory'] a.equipment-button:focus-visible {
  outline: 2px solid var(--limiar-focus);
  outline-offset: 2px;
}
html body[data-area='account'].account-dashboard .account-frame,
html body[data-area='account'] :is(.account-dashboard .character-roster,.history-panel,.avatar-dialog) {
  border-color: #a17e96;
  background: radial-gradient(ellipse at 20% 0, #4a354a, transparent 65%), #251d2c;
  box-shadow: inset 0 0 0 3px #1a1320, inset 0 0 0 4px #896b877d, 0 13px 30px #10091373;
}
html body[data-area='account'].account-dashboard .account-frame {
  background: linear-gradient(#2c2035d1, #251c2cf7), url('/limiar/hall.jpg') center 50% / cover;
}
html body[data-area='account'].account-dashboard .account-overview .account-identity {
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
}
html body[data-area='account'].account-dashboard .account-overview .account-identity > strong {
  font-size: clamp(1.05rem, 1.65vw, 1.5rem);
}
html body[data-area='account'] :is(.account-balances,.account-state,.activity-row) { border-color: #795d79; }
html body[data-area='account'] .balance-tile { background: linear-gradient(#3e3045, #221a2a); box-shadow: inset 0 1px #d1adcb38; }
html body[data-area='account'] .account-history-links { border-block: 1px solid #836781; }

/* Vote, Donate and connection states */
html body[data-area='vote'] .vote-site,
html body[data-area='donate'] #page-content > .cards > .card {
  border-color: #927189;
  background: linear-gradient(#35273b, #241b2b);
  box-shadow: inset 0 0 0 3px #1d1624, inset 0 0 0 4px #78587270, 0 8px 22px #100b1585;
}
html body[data-area='vote'] .vote-reward { background: #191828; border-color: #837192; }
html body[data-area='vote'] .vote-status { border-width: 1px; border-style: solid; }
html body[data-area='vote'] .vote-actions { border-top: 1px solid #98788a66; padding-top: .65rem; }
html body[data-area='donate'] #page-content > .banner {
  border: 1px solid #9c747c;
  border-inline-start: 3px solid #d0a38e;
  background: #352732;
  color: var(--limiar-ink);
  box-shadow: inset 0 1px #e9c7c529;
}
html body[data-area='donate'] #page-content > .banner p { color: var(--limiar-muted); }
html body[data-area='donate'] #page-content > .cards button:disabled {
  background: #514352;
  border-color: #938191;
  color: #e6d7e3;
  opacity: .85;
}
html body[data-area='how-to-connect'] .connect-command-row code { overflow-wrap: anywhere; box-shadow: inset 0 1px #d5b8dc33; }

@media (prefers-reduced-motion: reduce) {
  html body[data-area='store'] .shop-grid .shop-product:is(:hover,:has(:focus-visible)) { transform: none; }
}
