/* Evoker Web - Character screens after the 1.7.4 client: the profile (ui.screens.playerinfo, the user's screenshot
   profile-top-tap.png: large_slice panel with popup_fill, default_slice = small_white boxes, resourcebg_big stats
   box, Support button on the menubar plate), the options (options_def: header_framer_big / _small plates,
   slider_bg + slider_button sliders, large_slice boxes), the stat-point panel for old saves, the daily calendar.
   Everything on fullscreen_background. */

.screen-body.character {
  display: flex; flex-direction: column; justify-content: safe center;
  padding: 16px 8px 24px;
  background: #17110b url('/assets/orig/ui/fullscreen_background.png') center top / 125% auto no-repeat;
}
.screen-body.character[data-tab="daily"] { justify-content: flex-start; }
.character .screen-title { color: var(--tan); }
.character-content { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Profile ---------- */
.tab-profile { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pi-panel {
  position: relative; width: 704px; height: 620px; flex: none;
  border: 16px solid transparent;
  border-image: url('/assets/orig/ui/frames/hud_nineframe.png') 16 / 16px stretch;
  background: rgba(26, 25, 24, .92); background-clip: padding-box;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .7);
}
.pi-panel > * { position: absolute; }
.pi-player { left: -4px; top: 4px; right: 0; height: 90px; }
.pi-avatar {
  position: absolute; left: 0; top: 0; width: 102px; height: 88px; padding: 0; margin: 0;
  border: 4px solid transparent;
  border-image: url('/assets/orig/ui/frames/small_white.png') 12 / 8px stretch;
  background: #0a0b0c; background-clip: padding-box; overflow: hidden; cursor: pointer;
}
.pi-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pi-avatar:hover img { filter: brightness(1.15); }
.pi-name {
  position: absolute; left: 114px; top: 20px; max-width: 560px; height: 48px; padding: 0; margin: 0;
  border: 0; background: none; cursor: pointer;
  font-size: 32px; font-weight: var(--fw-bold); letter-spacing: .02em; color: #d9a85a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
  text-shadow: 0 2px 2px rgba(0, 0, 0, .9);
}
.pi-best, .pi-stats, .pi-buttons {
  border: 4px solid transparent;
  border-image: url('/assets/orig/ui/frames/small_white.png') 12 / 8px stretch;
  background: rgba(10, 10, 10, .25); background-clip: padding-box;
}
.pi-best { left: -8px; top: 96px; width: 246px; height: 322px; cursor: pointer; }
.pi-best-label, .pi-best-name { position: absolute; left: 4px; right: 4px; font-size: 19px; font-weight: var(--fw-bold); color: #f2f2f2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); }
.pi-best-label { top: 4px; }
.pi-best-name { top: 28px; }
.pi-best-card { position: absolute; left: 10px; top: 56px; width: 216px; height: 252px; }
.pi-best-card.empty { border-color: #333; }
.pi-stats { left: 246px; top: 96px; width: 442px; height: 216px; }
.pi-stats-label, .pi-bonus-label { position: absolute; top: 4px; font-size: 22px; font-weight: var(--fw-bold); color: #f2f2f2; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); }
.pi-stats-label { left: 10px; }
.pi-bonus-label { left: 290px; }
.pi-stats-bg {
  position: absolute; left: 8px; top: 36px; width: 268px; height: 168px;
  background: url('/assets/orig/ui/resourcebg_big.png') center / 100% 100% no-repeat;
}
.pi-bar { position: absolute; left: 50px; width: 200px; height: 28px; }
.pi-bar.xp { top: 14px; }
.pi-bar.stamina { top: 54px; }
.pi-bar.mana { top: 92px; }
.pi-bar.hp { top: 130px; }
.pi-bar-text, .pi-bar .pi-bar-text.bar-label {
  position: absolute; left: 10px; top: 1px; right: auto; bottom: auto; display: block; padding: 0; text-align: left; font-size: 20px; font-weight: var(--fw-bold); line-height: 22px; color: #f4f4f4;
  white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .95);
}
.pi-bar-line { position: absolute; left: 4px; bottom: 3px; height: 4px; max-width: calc(100% - 8px); border-radius: 1px; background: var(--c-xp-bar); box-shadow: 0 0 4px var(--c-xp-bar); }
.pi-bar.stamina .pi-bar-line { background: var(--c-stamina); box-shadow: 0 0 4px var(--c-stamina); }
.pi-bar.mana .pi-bar-line { background: var(--c-mana); box-shadow: 0 0 4px var(--c-mana); }
.pi-bar.hp .pi-bar-line { background: var(--c-hp); box-shadow: 0 0 4px var(--c-hp); }
.pi-bonuses { position: absolute; left: 286px; top: 0; width: 146px; height: 100%; }
.pi-bonus {
  position: absolute; left: 0; width: 146px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid transparent; border-image: url('/assets/orig/ui/frames/small_white.png') 12 / 6px stretch;
  background: rgba(0, 0, 0, .35); background-clip: padding-box;
  font-size: 20px; font-weight: var(--fw-bold);
}
.pi-bonus.xp { top: 50px; color: var(--c-xp-bar); }
.pi-bonus.stamina { top: 90px; color: var(--c-stamina); }
.pi-bonus.mana { top: 128px; color: var(--c-mana); }
.pi-bonus.hp { top: 166px; color: var(--c-hp); }
.pi-facts { left: 254px; top: 320px; width: 420px; display: flex; flex-direction: column; gap: 4px; }
.pi-fact { display: grid; grid-template-columns: 236px 1fr; font-size: 26px; font-weight: var(--fw-bold); color: #f2f2f2; line-height: 30px; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); }
.pi-buttons { left: -8px; top: 424px; width: 696px; height: 164px; }
.pi-support-label { position: absolute; right: 20px; top: 8px; width: 140px; text-align: center; font-size: 26px; font-weight: var(--fw-bold); color: #f2f2f2; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); }
.pi-support {
  position: absolute; right: 38px; top: 48px; width: 104px; height: 100px; padding: 0; margin: 0;
  border: 0; background: url('/assets/orig/ui/frames/menubar_button.png') center / 100% 100% no-repeat;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--t-fast), filter var(--t-fast);
}
.pi-support:hover { filter: brightness(1.1); }
.pi-support:active { transform: scale(.95); }
.pi-support-icon { width: 46px; height: 62px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .7)); }
.tab-profile .stat-points { width: 704px; position: relative; }

/* Avatar picker */
.dialog-avatars .dialog { width: 640px; }
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; justify-items: center; padding: 6px 4px 10px; }
.avatar-choice { width: 128px; height: 128px; cursor: pointer; }
.avatar-choice:hover { filter: brightness(1.15); }
.avatar-choice.current { box-shadow: 0 0 0 3px var(--tier-gold), 0 0 14px rgba(255, 207, 53, .6); }

/* Change-name dialog */
.name-form { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.name-input {
  font: inherit; font-size: 30px; font-weight: var(--fw-bold); color: var(--gold); text-align: center;
  padding: 10px 16px;
  background: linear-gradient(180deg, #0b0c0d, #16181a);
  border: 2px solid var(--stone-edge-dark); border-radius: 6px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .8), 0 1px 0 var(--bevel-hi);
  user-select: text; -webkit-user-select: text;
}
.name-input:focus { outline: 3px solid var(--steel-hi); outline-offset: 1px; }

/* Stat points */
.stat-points { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.stat-points.has-points::after {
  content: ''; position: absolute; inset: -8px; pointer-events: none;
  border: 24px solid transparent;
  border-image: url('/assets/orig/ui/frames/glowgold.png') 26 / 24px stretch;
}
.stat-points-head { display: flex; align-items: center; gap: 12px; font-size: 28px; font-weight: var(--fw-bold); color: var(--tan); text-shadow: 0 2px 2px rgba(0, 0, 0, .8); }
.stat-points-left { margin-left: auto; font-size: 24px; color: var(--text); }
.stat-badge {
  position: static; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: url('/assets/orig/ui/badge.png') center / contain no-repeat;
  color: transparent; font-size: 0;
  animation: badgePulse 1.4s ease-in-out infinite;
}
.stat-points-hint { font-size: 17px; font-weight: var(--fw-light); }
.stat-cols, .stat-row { display: grid; grid-template-columns: 170px 90px 1fr 100px 80px; align-items: center; gap: 6px; }
.stat-cols { font-size: 15px; text-align: center; padding: 0 2px; }
.stat-cols span:first-child { text-align: left; }
.stat-rows { display: flex; flex-direction: column; gap: 6px; }
.stat-row {
  min-height: 64px; padding: 4px 6px;
  border: 5px solid transparent;
  border-image: url('/assets/orig/ui/frames/ironframe.png') 10 / 10px stretch;
  background: rgba(0, 0, 0, .3); background-clip: padding-box;
}
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: var(--fw-bold); }
.stat-label img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .8)); }
.stat-row.stamina .stat-label { color: var(--c-stamina); }
.stat-row.mana .stat-label { color: var(--c-mana); }
.stat-row.hp .stat-label { color: var(--c-hp); }
.stat-cur, .stat-next, .stat-add { text-align: center; font-size: 24px; }
.stat-cur { color: var(--text); }
.stat-next { color: var(--muted); }
.stat-next.on { color: var(--tier-gold); }
.stat-add { min-width: 44px; color: var(--muted); }
.stat-add.on { color: var(--c-star); }
.stat-spinner { display: flex; align-items: center; justify-content: center; gap: 4px; }
.stat-spinner .spin { width: 54px; height: 54px; min-height: 0; padding: 0; margin: 2px; font-size: 34px; font-weight: var(--fw-bold); line-height: 1; border-image-width: 16px; }
.stat-spinner .spin.inc { border-image-source: url('/assets/orig/ui/frames/button_green.png'); }
.stat-per { font-size: 14px; text-align: right; }
.stat-points-actions { display: flex; justify-content: center; margin-top: 4px; }
.stat-points-actions .btn { min-width: 260px; }

/* ---------- Daily ---------- */
.daily-event { margin: 0 0 4px; height: 80px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; font-size: 28px; }
.daily-event-desc { font-size: 19px; font-weight: var(--fw-light); color: #bfe6ff; }
.daily-head { padding: 14px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.daily-head-row { width: 100%; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 24px; font-weight: var(--fw-bold); }
.daily-streak .num { font-size: 30px; }
.daily-next { font-size: 20px; font-weight: var(--fw-light); }
.daily-hint { font-size: 16px; font-weight: var(--fw-light); text-align: center; }
.daily-head .btn { min-width: 340px; }
.daily-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.daily-cell {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 118px; padding: 8px 6px;
  border: 5px solid transparent;
  border-image: url('/assets/orig/ui/frames/ironframe.png') 10 / 10px stretch;
  background: rgba(20, 22, 24, .9); background-clip: padding-box;
  text-align: center;
}
.daily-day { font-size: 16px; font-weight: var(--fw-bold); color: var(--muted); }
.daily-icons { display: flex; align-items: center; gap: 6px; }
.daily-icon { display: inline-flex; align-items: center; gap: 2px; font-size: 18px; }
.daily-icon img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .8)); }
.daily-icon.big { font-size: 30px; }
.daily-icon.big img { width: 72px; height: 72px; }
.daily-text { font-size: 14px; font-weight: var(--fw-light); color: var(--tan); line-height: 1.2; }
.daily-cell.claimed { filter: brightness(.75) saturate(.6); }
.daily-cell.claimed .daily-day, .daily-cell.claimed-today .daily-day { color: var(--c-hp); }
.daily-cell.today::after, .daily-cell.claimed-today::after {
  content: ''; position: absolute; inset: -10px; pointer-events: none;
  border: 20px solid transparent;
  border-image: url('/assets/orig/ui/frames/glowgold.png') 26 / 20px stretch;
  animation: glowPulse 1.6s ease-in-out infinite;
}
.daily-cell.claimed-today::after { border-image-source: url('/assets/orig/ui/frames/glowblue.png'); animation: none; opacity: .8; }
.daily-cell.today .daily-day { color: var(--tier-gold); }
.daily-cell.last .daily-day::after { content: ' ★'; color: var(--tier-gold); }
.daily-check {
  position: absolute; right: 6px; top: 4px;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #6fe06f, #2d7a24 70%);
  border: 2px solid #0a0b0c;
  color: #fff; font-size: 16px; font-weight: var(--fw-bold);
}
.daily-reward-popup { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.daily-reward-icons { display: flex; gap: 16px; }

/* ---------- Options (options_def: header 300 units on header_framer_big, rows on header_framer_small) ---------- */
.tab-settings { display: flex; flex-direction: column; align-items: center; gap: 0; }
.opt-header { position: relative; width: 698px; height: 96px; flex: none; z-index: 1; margin-bottom: -40px; }
.opt-title {
  position: absolute; left: 50%; top: 14px; width: 674px; height: 61px; transform: translateX(-50%);
  background: url('/assets/orig/ui/header_framer_big.png') center / 100% 100% no-repeat;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: var(--fw-bold); color: #fff; text-shadow: 0 2px 2px rgba(0, 0, 0, .9);
}
.opt-version { position: absolute; right: 50px; top: 30px; font-size: 20px; font-weight: var(--fw-bold); color: #cfd3d6; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); margin: 0; }
.opt-about { left: 0; top: 10px; width: 66px; height: 62px; }
.opt-box {
  position: relative; width: 698px; flex: none;
  padding: 44px 26px 22px; gap: 10px;
  border: 16px solid transparent;
  border-image: url('/assets/orig/ui/frames/hud_nineframe.png') 16 / 16px stretch;
  background: rgba(25, 25, 25, .78); background-clip: padding-box;
}
.opt-box.opt-more { margin-top: 10px; padding-top: 18px; }
.opt-row { flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; border-top: 0; box-shadow: none; min-height: 0; padding: 4px 0 8px; }
.opt-label {
  width: 362px; height: 43px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: url('/assets/orig/ui/header_framer_small.png') center / 100% 100% no-repeat;
}
.opt-label .setting-label { font-size: 23px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); }
.opt-label .slider-value { font-size: 19px; color: #c9cfd3; }
.opt-slider {
  --fill: 50%;
  -webkit-appearance: none; appearance: none;
  width: 600px; height: 40px; margin: 0; padding: 0; cursor: pointer; background: transparent;
}
.opt-slider::-webkit-slider-runnable-track {
  height: 30px; border: 0;
  background: url('/assets/orig/ui/slider_bg.png') center / 100% 100% no-repeat;
}
.opt-slider::-moz-range-track { height: 30px; border: 0; background: url('/assets/orig/ui/slider_bg.png') center / 100% 100% no-repeat; }
.opt-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 46px; height: 46px; margin-top: -8px; border: 0;
  background: url('/assets/orig/ui/slider_button.png') center / contain no-repeat;
}
.opt-slider::-moz-range-thumb { width: 46px; height: 46px; border: 0; background: url('/assets/orig/ui/slider_button.png') center / contain no-repeat; }
.opt-slider:focus-visible { outline: 2px solid var(--steel-hi); outline-offset: 2px; }
.opt-presets { width: 560px; display: flex; justify-content: space-between; font-size: 20px; font-weight: var(--fw-bold); color: #9da3a8; }
.opt-presets .on { color: #fff; }
.opt-more .setting-row:not(.opt-row) { border-top: 0; box-shadow: none; min-height: 62px; }
.opt-sep { height: 4px; margin: 6px 0; background: url('/assets/orig/ui/seperator_thin.png') center / 100% 100% no-repeat; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding: 6px 4px; }
.setting-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.setting-label { font-size: 24px; font-weight: var(--fw-bold); }
.setting-hint { font-size: 16px; font-weight: var(--fw-light); }
.toggle {
  position: relative; flex: none;
  width: 124px; height: 50px; border-radius: 25px;
  background: linear-gradient(180deg, #2a2e31, #3a3f44);
  border: 2px solid var(--stone-edge-dark);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .8), 0 1px 0 var(--bevel-hi);
  display: flex; align-items: center; justify-content: flex-end; padding: 0 16px;
  color: var(--muted); font-size: 20px; font-weight: var(--fw-bold);
  transition: background var(--t-med), color var(--t-med);
}
.toggle-knob {
  position: absolute; left: 4px; top: 4px; width: 38px; height: 38px; border-radius: 50%;
  background: url('/assets/orig/ui/slider_button.png') center / contain no-repeat;
  transition: transform var(--t-med) var(--ease), filter var(--t-med);
}
.toggle.on { background: linear-gradient(180deg, #2d7a24, #5fbf4a); color: #fff; justify-content: flex-start; }
.toggle.on .toggle-knob { transform: translateX(74px); filter: brightness(1.3); }
.settings-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 2px; }
.settings-actions .btn { font-size: 21px; min-height: 52px; }
