/* Forged frames and engraved emblems for the out-of-combat interface. */
:root { --iron: #171c23; --brass: #8a7150; --parchment: #e8dcc5; }
.ui-icon { display: block; width: 24px; height: 24px; flex: 0 0 auto; }
.topbar { height: 94px; gap: 18px; background: linear-gradient(180deg,#1b1c21,#0e1219); border-bottom: 1px solid #a58b5740; }
.brand { flex-shrink: 0; color: #eee3d1; }
.brand small { color: #a0927c; }
.cross-mark { color: #d74845; text-shadow: 0 2px 0 #742523,0 0 22px #c234382b; }
.treasury { display: flex; align-items: stretch; gap: 9px; margin-left: auto; min-width: 0; }
#wallet, #shop { position: relative; display: flex; align-items: center; min-height: 52px; border: 1px solid #78685170; border-radius: 2px; background: linear-gradient(160deg,#29292a,#11161e 65%); box-shadow: inset 0 1px #ffffff12,inset 0 -3px #0005; padding: 8px 14px; gap: 22px; text-align: left; }
#wallet::after, #shop::after { content: ''; position: absolute; inset: 3px; border: 1px solid #b4986816; pointer-events: none; }
#shop { border-color: #9974c166; background: radial-gradient(ellipse at 15% 15%,#664a822b,transparent 70%),linear-gradient(160deg,#272131,#13141e); gap: 12px; }
.currency-badge { display: inline-flex; align-items: center; gap: 8px; min-width: 0; vertical-align: middle; text-align: left; }
.currency-badge .ui-icon { width: 27px; height: 27px; filter: drop-shadow(0 2px 2px #0009); }
.currency-copy { display: block; min-width: 0; }
.currency-copy b { display: block; font-size: 15px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.currency-copy small { display: block; font-size: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: #a69e94; margin-top: 4px; }
.currency-badge.silver { color: #c6d2df !important; }
.currency-badge.gold { color: #e8bd68 !important; }
.currency-badge.crystal { color: #d7b9ff; }
.currency-plus { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #b88be14d; color: #dec4f6; background: #a668d615; font-size: 16px; }
.utility-actions { display: flex; gap: 5px; }
.utility-actions .icon-btn { width: 44px; height: 44px; border-radius: 2px; background: linear-gradient(140deg,#26292e,#131820); border-color: #80725c55; color: #b7afa1; box-shadow: inset 0 1px #ffffff0d; }
.utility-actions .icon-btn .ui-icon { width: 21px; height: 21px; }
.utility-actions .sound-on { color: #ecd09a; border-color: #b391535c; }
.modes-button { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 10px 15px; background: linear-gradient(160deg,#403228,#241f1e); border: 1px solid #ad88586e; border-radius: 2px; color: #e6d4b4; font-size: 12px; font-weight: 800; box-shadow: inset 0 1px #d2af6333,inset 0 -3px #0004; }
.modes-button span { margin: 0; }
.modes-button .ui-icon { width: 20px; height: 20px; }
.adventure-nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); padding: 17px 5.3%; gap: 11px; background: linear-gradient(#11161d,#0b1119); border-bottom: 1px solid #ae98701a; }
.adventure-nav .nav-tile, .adventure-nav #profile, .adventure-nav #forestArena { --emblem: #bfc7d1; position: relative; grid-column: auto; display: flex; align-items: center; justify-content: flex-start; gap: 13px; min-height: 79px; padding: 13px 16px; border: 1px solid #81705b66; border-radius: 2px; background: repeating-linear-gradient(115deg,transparent 0 3px,#ffffff02 3px 4px),linear-gradient(135deg,#292b30,#161c24 70%); color: var(--parchment); text-align: left; box-shadow: inset 0 1px #ffffff13,inset 0 -3px #0004,0 4px 9px #0002; }
.adventure-nav .nav-tile::before { content: ''; position: absolute; inset: 4px; border: 1px solid #ab927522; pointer-events: none; }
.adventure-nav .nav-tile::after { content: ''; position: absolute; left: 5px; top: 5px; width: 5px; height: 5px; background: #a38a60; box-shadow: 0 0 0 1px #090d13; transform: rotate(45deg); opacity: .7; }
.adventure-nav #forestArena { --emblem: #b5c797; }
.adventure-nav #profile { --emblem: #d6b77b; }
.adventure-nav #armor { --emblem: #adc7dd; }
.adventure-nav #daily { --emblem: #e1bc71; }
.adventure-nav #story { --emblem: #c8b2cc; }
.nav-emblem { display: grid; place-items: center; color: var(--emblem); width: 39px; height: 43px; flex-shrink: 0; background: radial-gradient(ellipse,#c7b18e13,transparent 72%); filter: drop-shadow(0 2px 1px #000); }
.nav-emblem .ui-icon { width: 34px; height: 34px; }
.nav-copy { display: block; min-width: 0; }
.nav-copy strong { display: block; font-family: Oswald,'Arial Narrow',sans-serif; font-weight: 500; font-size: 20px; letter-spacing: .6px; }
.nav-copy small { display: block; color: #999b9e; font-size: 9px; line-height: 1.5; margin-top: 3px; }
#dailyReady { position: absolute; right: 10px; top: 10px; width: 6px; height: 6px; background: #f1d191; border-radius: 0; transform: rotate(45deg); box-shadow: 0 0 9px #f5bc5980; }
#menu .primary, #dialog .primary, #menu .upgrade-menu-btn, #dialog .secondary { position: relative; border-radius: 2px; border: 1px solid #9b7c5e; box-shadow: inset 0 1px #ffe5c34d,inset 0 -4px #0004,0 5px 16px #0003; }
#menu .primary, #dialog .primary { background: linear-gradient(115deg,#a23832,#84231f 65%,#a6372c); color: #fff0da; border-color: #ce7952; text-shadow: 0 1px 2px #390c0a; }
#menu .primary::before, #dialog .primary::before, #menu .upgrade-menu-btn::before, #dialog .secondary::before { content: ''; position: absolute; inset: 4px; border: 1px solid #ffe2b226; pointer-events: none; }
#play { gap: 12px; min-height: 59px; width: 320px; padding: 17px 20px; }
#play > span { flex: 1; font-size: 14px; }
#play > .ui-icon:first-child { width: 26px; height: 26px; }
#play > .ui-icon:last-child { width: 19px; height: 19px; }
#menu .upgrade-menu-btn { width: 320px; background: linear-gradient(115deg,#2d2b29,#191d24); border-color: #776449; color: #ddcba9; gap: 12px; padding: 13px 20px; min-height: 51px; }
#upgradeHero > span:not(.upgrade-count) { flex: 1; text-align: left; }
#upgradeHero .ui-icon { width: 20px; height: 20px; }
#upgradeHero .upgrade-count { background: #d3b06c; color: #2e2419; border-radius: 2px; }
#chooseHero { display: flex; align-items: center; gap: 10px; color: #d3c4a8; }
#chooseHero .ui-icon { width: 17px; height: 17px; }
.mission-card { border-radius: 2px; background: linear-gradient(130deg,#25272b,#141b23); border-color: #6d63524f; box-shadow: inset 0 1px #b5a28516; }
.mission-card.active { border-color: #a58c5b; }
.mission-card.active .num { color: #d4b784; }
.mission-card:disabled { opacity: .62; }
#dialog { border-radius: 3px; border-color: #8f78526e; background: radial-gradient(ellipse at 0 0,#63503b26,transparent 55%),linear-gradient(135deg,#202127,#111822); box-shadow: inset 0 1px #ffe0b21c,0 40px 150px #000c; }
#dialog .secondary { background: linear-gradient(130deg,#34322e,#1c232a); color: #e4d5ba; border-color: #8672528c; }
#closeDialog { border-radius: 2px; border-color: #8b775461; color: #e0cfb0; background: #26272b; }
#dialog :is(.hero-option,.mode-card,.upgrade-tabs button,.equipment-item,.profile-heroes button,.difficulty-picker button) { border-radius: 2px; }
#dialog :is(.upgrade-tabs,.difficulty-picker) button.selected { background: linear-gradient(130deg,#4a3c2c,#26292b); border-color: #b4955b; color: #f3dcb2; }
#dialog .profile-wallet, #dialog .wallet-large { gap: 18px; }
#dialog .wallet-large { align-items: center; }
#dialog .crystal-balance { display: flex; align-items: center; gap: 16px; color: #e0c4ff; font-size: 36px; margin: 20px 0; }
.crystal-balance > .ui-icon { width: 49px; height: 49px; filter: drop-shadow(0 0 14px #b578ed38); }
.crystal-balance small { display: block; font-size: 11px; margin-top: 5px; color: #bca4d0; }
#menu button:focus-visible, #dialog button:focus-visible { outline: 2px solid #f2d59a; outline-offset: 2px; }
@media (hover: hover) {
  .adventure-nav .nav-tile:hover { border-color: #c2a978; background-color: #40382e; box-shadow: inset 0 0 25px #d0a45c0f,0 4px 12px #0004; }
  #wallet:hover { border-color: #bea274; }
  #shop:hover { border-color: #bb8ee6; }
}
@media (max-width: 1100px) {
  .topbar { padding-left: 3%; padding-right: 3%; gap: 10px; }
  .brand { font-size: 12px; gap: 8px; }
  .brand small { font-size: 8px; }
  .treasury { gap: 6px; }
  #wallet, #shop { gap: 12px; padding: 8px 10px; }
  .adventure-nav { padding-left: 3%; padding-right: 3%; gap: 8px; }
  .adventure-nav .nav-tile, .adventure-nav #profile, .adventure-nav #forestArena { padding: 12px 10px; gap: 7px; }
  .nav-copy strong { font-size: 18px; }
  .nav-copy small { font-size: 8px; }
}
@media (max-width: 800px) {
  .topbar { display: grid; grid-template-columns: minmax(0,1fr) auto auto; height: auto; min-height: 0; padding: calc(var(--safe-top) + 12px) calc(var(--safe-right) + 16px) 12px calc(var(--safe-left) + 16px); gap: 10px; }
  .brand { grid-column: 1; grid-row: 1; font-size: 12px; letter-spacing: .8px; }
  .brand small { font-size: 8px; letter-spacing: 1.5px; }
  .cross-mark { font-size: 32px; }
  .utility-actions { grid-column: 2; grid-row: 1; }
  .modes-button { grid-column: 3; grid-row: 1; min-height: 44px; padding: 10px; }
  .modes-button .ui-icon { display: none; }
  .treasury { grid-row: 2; grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1.12fr); width: 100%; margin: 0; gap: 8px; }
  #wallet { grid-row: auto; grid-column: auto; justify-self: stretch; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  #shop { justify-content: space-between; }
  #wallet, #shop { min-width: 0; min-height: 52px; padding: 9px 12px; }
  .adventure-nav .nav-tile, .adventure-nav #profile, .adventure-nav #forestArena { flex-direction: column; justify-content: center; gap: 4px; padding: 9px 4px; min-height: 84px; text-align: center; }
  .nav-copy small { display: none; }
  .nav-copy strong { font-size: 15px; letter-spacing: .2px; }
  .nav-emblem { height: 33px; width: 34px; }
  .nav-emblem .ui-icon { width: 29px; height: 29px; }
}
@media (max-width: 650px) {
  .adventure-nav { grid-template-columns: repeat(5,minmax(0,1fr)); padding: 10px calc(var(--safe-right) + 12px) 10px calc(var(--safe-left) + 12px); gap: 6px; }
  .adventure-nav .nav-tile, .adventure-nav #profile, .adventure-nav #forestArena { min-height: 78px; }
  .hero-copy #play, #menu .upgrade-menu-btn { width: 100%; max-width: 380px; }
  #dialog { border-radius: 3px; }
  .currency-badge { gap: 5px; }
  .currency-badge .ui-icon { width: 24px; height: 24px; }
  .currency-copy b { font-size: 14px; }
  .currency-copy small { font-size: 7px; letter-spacing: .6px; }
}
@media (max-width: 380px) {
  .topbar { padding-left: calc(var(--safe-left) + 12px); padding-right: calc(var(--safe-right) + 12px); gap: 6px; }
  .brand { font-size: 10px; letter-spacing: .4px; gap: 5px; }
  .brand small { display: none; }
  .cross-mark { font-size: 25px; }
  .utility-actions { gap: 3px; }
  .modes-button { font-size: 10px; padding: 8px; }
  #wallet, #shop { padding: 8px; gap: 5px; }
  .currency-plus { width: 16px; height: 20px; font-size: 13px; flex-shrink: 0; }
  .currency-copy b { font-size: 12px; }
  .currency-badge .ui-icon { width: 20px; height: 20px; }
  .nav-copy strong { font-size: 12px; }
  .adventure-nav .nav-tile::before { inset: 3px; }
  #dailyReady { right: 7px; top: 7px; }
}
/* Hero dossier, ability cards and battle selection. */
#dialog[data-kind="hero-overview"], #dialog[data-kind="hero-picker"] { max-width: 1100px; }
.hero-dossier { display: grid; grid-template-columns: minmax(180px,.7fr) minmax(0,1.5fr); gap: 25px; margin-top: 22px; }
.dossier-portrait { position: relative; min-height: 280px; border: 1px solid #aa8b5955; overflow: hidden; background: #111822; }
.dossier-portrait > img { width: 100%; height: 100%; position: absolute; object-fit: cover; object-position: 50% 25%; }
.dossier-portrait > span { position: absolute; bottom: 0; left: 0; right: 0; padding: 35px 14px 16px; background: linear-gradient(transparent,#080e16); font: 500 15px Oswald,sans-serif; letter-spacing: 1.2px; color: #ead7b4; }
.dossier-summary { min-width: 0; }
.dossier-summary > h3 { font: 500 36px Oswald,sans-serif; margin: 12px 0 18px; }
.dossier-summary > h3 small { font-size: 17px; color: #8c9cad; }
.dossier-summary > p { color: #a8b8ca; font-size: 13px; }
.dossier-attributes { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; border-block: 1px solid #99876a33; padding: 16px 0; margin-top: 18px; }
.dossier-attributes b { display: block; color: #e5d2ad; font-size: 23px; }
.dossier-attributes span, .career-grid span { display: block; font-size: 10px; color: #a5adbb; line-height: 1.5; margin-top: 5px; }
.dossier-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#dialog .dossier-actions button { min-width: 0; flex: 1; padding: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; }
#dialog .dossier-actions button:disabled { opacity: .55; }
.dossier-section { border-top: 1px solid #a58c5d33; padding-top: 22px; margin-top: 28px; }
.dossier-section > h3 { font: 500 24px Oswald,sans-serif; color: #eee1c7; margin: 0 0 17px; }
.career-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.career-grid > div { padding: 17px 14px; background: linear-gradient(130deg,#35302a66,#141c25); border: 1px solid #a58c5d2e; }
.career-grid b { font: 500 29px Oswald,sans-serif; color: #ebd6af; overflow-wrap: anywhere; }
.dossier-ranks { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.dossier-ranks > div { display: grid; gap: 9px; padding: 14px; border: 1px solid #6f614844; background: #a08d5410; font-size: 12px; color: #b5bdc7; }
.dossier-ranks b { color: #deca9f; }
.dossier-gear { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; }
.dossier-gear strong { font-size: 14px; }
.dossier-gear p { font-size: 12px; color: #a5b2c4; }
.dossier-gear button { display: flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; }
.skill-list { display: grid; gap: 12px; }
.skill-entry { display: flex; gap: 12px; align-items: flex-start; text-align: left; }
.skill-emblem { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; background: linear-gradient(135deg,#303442,#101924); border: 1px solid #8b9daf70; box-shadow: inset 0 0 0 3px #0c172277; color: var(--skill-color,#b5c9de); }
.skill-emblem .ui-icon { width: 29px; height: 29px; }
.skill-emblem.empowered { border-color: var(--skill-color); background: radial-gradient(ellipse,#65668944,#101924); }
.skill-entry > div { min-width: 0; }
.skill-entry small { display: block; font-size: 8px; letter-spacing: .7px; line-height: 1.7; color: #99a8bc; }
.skill-entry strong { display: block; color: #e9e4d8; font-size: 13px; margin-top: 3px; }
.skill-entry p { color: #a7b5c6; font-size: 12px; line-height: 1.7; margin: 6px 0 0; }
.hero-selection { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.hero-choice { min-width: 0; display: flex; flex-direction: column; background: linear-gradient(130deg,#29313b,#131c26); border: 1px solid #7369517a; padding: 17px; }
.hero-choice.selected { border-color: #d5b779; box-shadow: inset 0 0 0 3px #d5b77913; }
.hero-choice-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 19px; }
.hero-choice-heading img { width: 74px; height: 95px; object-fit: cover; object-position: 50% 25%; border: 1px solid #8d78554d; }
.hero-choice-heading h3 { font: 500 23px Oswald,sans-serif; margin: 7px 0; }
.hero-choice-heading small { color: #d2b989; font-size: 9px; line-height: 1.6; }
.hero-choice-heading span { color: #a4b5ca; font-size: 10px; }
.hero-choice .skill-list { flex: 1; }
.hero-choice > button { margin-top: 18px; width: 100%; min-height: 46px; }
.shared-power { display: flex; align-items: flex-start; gap: 14px; margin-top: 22px; padding: 17px; border: 1px solid #8bb9d33b; background: #87adff09; }
.shared-power > .ui-icon { color: #9fcfdc; width: 34px; height: 34px; }
.shared-power strong { font-size: 13px; color: #dce6ee; }
.shared-power p { font-size: 12px; line-height: 1.8; color: #a7b6c8; margin-bottom: 0; }
.forest-skill-preview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: 20px 0 26px; }
.forest-skill-preview > section { min-width: 0; background: #051a1333; border: 1px solid #839e6344; padding: 16px; }
.forest-skill-preview h3 { color: #c7d4b3; font: 500 20px Oswald,sans-serif; margin: 0 0 16px; }
@media(max-width:650px) {
 .hero-dossier { grid-template-columns: minmax(0,1fr); gap: 19px; }
 .dossier-portrait { min-height: 205px; }
 .dossier-portrait > img { object-position: 50% 22%; }
 .dossier-attributes, .career-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .dossier-ranks { gap: 6px; }
 .dossier-ranks > div { padding: 11px 8px; font-size: 10px; }
 .dossier-gear { flex-direction: column; align-items: stretch; gap: 8px; }
 .hero-selection, .forest-skill-preview { grid-template-columns: minmax(0,1fr); }
 .hero-choice { padding: 14px; }
 .hero-choice-heading h3 { font-size: 23px; }
 .skill-entry { gap: 10px; }
 .skill-entry p { font-size: 12px; }
 .skill-entry small { letter-spacing: .25px; }
 .dossier-tabs { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
