/* Forest Frontier v0.8.2 visual direction
   Stylized dark fantasy with restrained magitech foreshadowing. */

:root {
  --ash-bg: #07090a;
  --ash-bg-soft: #0b0e0e;
  --ash-panel: rgba(16, 19, 18, .94);
  --ash-panel-deep: rgba(9, 12, 12, .97);
  --ash-stone: #1a1c1a;
  --ash-stone-2: #22231f;
  --ash-line: #3b3a31;
  --ash-line-bright: #706047;
  --ash-bronze: #b79a62;
  --ash-bronze-soft: #8c744d;
  --ash-ember: #b86143;
  --ash-rune: #62b4a3;
  --ash-rune-soft: #4e8179;
  --ash-text: #e1dccf;
  --ash-muted: #919792;
  --ash-shadow: rgba(0, 0, 0, .72);
  --health: #943f35;
  --xp: #587c78;
  --accent: var(--ash-bronze);
  --panel: var(--ash-panel);
  --panel-2: var(--ash-stone);
  --line: var(--ash-line);
  --muted: var(--ash-muted);
}

html {
  background: var(--ash-bg);
}

body.theme-ashen {
  position: relative;
  isolation: isolate;
  color: var(--ash-text);
  background:
    radial-gradient(circle at 50% -10%, rgba(122, 104, 72, .13), transparent 35%),
    linear-gradient(180deg, rgba(7, 9, 10, .72), rgba(7, 9, 10, .95) 55%, #060707),
    var(--ash-bg);
}

body.theme-ashen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: url("../../assets/art/world-backdrop.svg") 50% 0 / cover no-repeat;
  opacity: .54;
  filter: saturate(.82) contrast(1.05);
}

body.theme-ashen::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(100deg, transparent 0 42px, rgba(255, 255, 255, .008) 43px 44px),
    radial-gradient(circle at 75% 36%, rgba(76, 160, 145, .06), transparent 25%),
    linear-gradient(180deg, transparent 65%, rgba(0, 0, 0, .36));
  mix-blend-mode: screen;
}

body.theme-ashen button,
body.theme-ashen summary {
  -webkit-tap-highlight-color: transparent;
}

body.theme-ashen .app {
  position: relative;
}

/* Brand bar */
body.theme-ashen .topbar {
  position: relative;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(112, 96, 71, .58);
  border-radius: 12px;
  background:
    linear-gradient(105deg, rgba(31, 29, 24, .94), rgba(13, 17, 16, .94) 55%, rgba(11, 19, 18, .94));
  box-shadow:
    inset 0 1px rgba(255, 240, 194, .06),
    inset 0 -1px rgba(0, 0, 0, .55),
    0 14px 34px rgba(0, 0, 0, .34);
  backdrop-filter: blur(10px);
}

body.theme-ashen .topbar::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(98, 180, 163, .32), transparent);
}

body.theme-ashen .title-row {
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body.theme-ashen .brand-rune {
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  border-radius: 50%;
  background: url("../../assets/art/rune-mark.svg") center / 32px no-repeat, rgba(7, 10, 10, .62);
  border: 1px solid rgba(112, 96, 71, .68);
  box-shadow: 0 0 20px rgba(79, 161, 146, .12), inset 0 0 14px rgba(0, 0, 0, .8);
}

body.theme-ashen .brand-copy {
  min-width: 0;
}

body.theme-ashen h1,
body.theme-ashen h2,
body.theme-ashen h3,
body.theme-ashen .reward-heading,
body.theme-ashen .combatant-name,
body.theme-ashen .item-detail-name,
body.theme-ashen .ruins-floor-title {
  font-family: Georgia, "Times New Roman", serif;
  text-wrap: balance;
}

body.theme-ashen h1 {
  color: #e8dfca;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .75);
  letter-spacing: .01em;
}

body.theme-ashen .world-tagline {
  display: block;
  margin-top: 2px;
  color: #80958e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.theme-ashen .version {
  align-self: flex-start;
  margin-top: 3px;
  padding: 3px 6px;
  border: 1px solid rgba(112, 96, 71, .45);
  border-radius: 999px;
  color: #b9a984;
  background: rgba(8, 10, 10, .48);
  font-size: 9px;
  letter-spacing: .08em;
  white-space: nowrap;
}

body.theme-ashen .top-summary {
  gap: 7px;
}

body.theme-ashen .top-summary > span {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid rgba(79, 78, 68, .65);
  border-radius: 8px;
  background: rgba(5, 8, 8, .5);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

body.theme-ashen .gold {
  color: #ca8a55;
}

body.theme-ashen .developer-toggle {
  opacity: .75;
}

body.theme-ashen .developer-toggle-track {
  border-color: #4b4c45;
  background: #0c0f0f;
}

body.theme-ashen .developer-toggle input:checked + .developer-toggle-track {
  border-color: var(--ash-rune-soft);
  background: #17302c;
  box-shadow: 0 0 12px rgba(98, 180, 163, .15);
}

body.theme-ashen .developer-toggle input:checked + .developer-toggle-track .developer-toggle-thumb {
  background: var(--ash-rune);
}

/* Surfaces */
body.theme-ashen .panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(87, 81, 66, .68);
  background:
    linear-gradient(180deg, rgba(25, 27, 24, .95), rgba(12, 15, 14, .96) 58%, rgba(8, 11, 11, .97));
  box-shadow:
    inset 0 1px rgba(255, 241, 204, .045),
    inset 0 0 0 1px rgba(0, 0, 0, .42),
    0 20px 50px rgba(0, 0, 0, .45);
}

body.theme-ashen .panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(183, 154, 98, .10), transparent 16%, transparent 84%, rgba(98, 180, 163, .06)),
    repeating-linear-gradient(115deg, transparent 0 38px, rgba(255, 255, 255, .006) 39px 40px);
  opacity: .72;
}

body.theme-ashen .panel > * {
  position: relative;
  z-index: 1;
}

body.theme-ashen .section-label {
  color: #b49a67;
  letter-spacing: .16em;
  text-shadow: 0 1px rgba(0, 0, 0, .7);
}

body.theme-ashen .section-label::before {
  content: "◆";
  margin-right: 6px;
  color: var(--ash-rune-soft);
  font-size: .72em;
}

body.theme-ashen .state {
  border-color: rgba(98, 180, 163, .34);
  color: #aebeb8;
  background: rgba(16, 37, 34, .44);
  box-shadow: inset 0 0 13px rgba(98, 180, 163, .05);
}

/* Buttons */
body.theme-ashen .primary,
body.theme-ashen .small-button {
  position: relative;
  overflow: hidden;
  border-color: #8e744a;
  color: #17140f;
  background:
    linear-gradient(180deg, #c0a36a, #9d8153 54%, #795f3c);
  box-shadow:
    inset 0 1px rgba(255, 244, 201, .36),
    inset 0 -2px rgba(61, 42, 23, .42),
    0 6px 16px rgba(0, 0, 0, .28);
  text-shadow: 0 1px rgba(255, 239, 190, .2);
}

body.theme-ashen .primary::after,
body.theme-ashen .small-button::after {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255, 240, 191, .12);
  border-radius: inherit;
  pointer-events: none;
}

body.theme-ashen .primary:hover:not(:disabled),
body.theme-ashen .small-button:hover:not(:disabled) {
  filter: brightness(1.08);
}

body.theme-ashen .secondary,
body.theme-ashen .menu-button,
body.theme-ashen .equip-button {
  border-color: #44463f;
  color: #d1cec3;
  background:
    linear-gradient(180deg, rgba(39, 41, 37, .96), rgba(21, 24, 23, .98));
  box-shadow: inset 0 1px rgba(255, 255, 255, .045), 0 5px 13px rgba(0, 0, 0, .2);
}

body.theme-ashen .secondary:hover:not(:disabled),
body.theme-ashen .menu-button:hover:not(:disabled),
body.theme-ashen .equip-button:hover:not(:disabled) {
  border-color: #6f654e;
  background: linear-gradient(180deg, #30312b, #202320);
}

body.theme-ashen .boss-button,
body.theme-ashen .danger {
  border-color: #884f3e;
  color: #f0d8ce;
  background: linear-gradient(180deg, #613328, #391d19);
  box-shadow: inset 0 1px rgba(255, 191, 162, .09), 0 7px 17px rgba(0, 0, 0, .3);
}

body.theme-ashen button:focus-visible,
body.theme-ashen summary:focus-visible {
  outline: 2px solid var(--ash-rune);
  outline-offset: 2px;
}

