/* evo443: "เส้นทางอาชีพ & จุติ" — the job-path / rebirth showcase of the website (/<lang>/web/#paths, server/evo443.js) and
   its teaser on the landing pages. Night (default) and day follow the site's own switch (html[data-theme]); logical
   properties everywhere (ar / he / fa / ur); every picture has its size in the HTML, so nothing jumps while it loads.
   The figures stand on a small night "stage" in both themes: the rebirth auras and wings are light, they need the dark. */
.evo {
  --e-panel: rgba(16, 30, 72, .78); --e-panel2: rgba(24, 42, 96, .92); --e-line: rgba(160, 182, 255, .18); --e-edge: rgba(242, 194, 78, .4);
  --e-text: #eef2ff; --e-muted: #a9b5da; --e-gold: #f2c24e; --e-gold2: #ffe9a3; --e-shadow: 0 12px 34px rgba(0, 0, 0, .42);
  --e-st1: #1c2a63; --e-st2: #0a1130; --e-st-line: rgba(160, 182, 255, .22); --e-rail: rgba(160, 182, 255, .28);
  --e-warrior: #ff8a6b; --e-scout: #7fe0b0; --e-arcane: #b79cff; --e-faith: #ffd76a; --pc: var(--e-gold);
  color: var(--e-text);
}
:root[data-theme='light'] .evo {
  --e-panel: rgba(255, 252, 242, .94); --e-panel2: #fffaf0; --e-line: rgba(26, 35, 71, .14); --e-edge: rgba(168, 116, 26, .5);
  --e-text: #18224a; --e-muted: #56608a; --e-gold: #b47a10; --e-gold2: #8a5a06; --e-shadow: 0 10px 26px rgba(60, 40, 0, .15);
  --e-st1: #33468f; --e-st2: #172152; --e-st-line: rgba(26, 35, 71, .3); --e-rail: rgba(26, 35, 71, .22);
  --e-warrior: #c8452a; --e-scout: #14825a; --e-arcane: #6a45d8; --e-faith: #a8740c;
}
.evo .p-warrior { --pc: var(--e-warrior); } .evo .p-scout { --pc: var(--e-scout); } .evo .p-arcane { --pc: var(--e-arcane); } .evo .p-faith { --pc: var(--e-faith); }
.evo img { max-width: 100%; height: auto; display: block; }
.evo-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evo-lead { margin: 0 0 14px; color: var(--e-muted); font-size: 15.5px; line-height: 1.6; max-width: 62ch; }

/* ------------------------------------------------------------ top: heading, jump links, the video */
.evo-top { display: grid; gap: 18px; align-items: center; margin-bottom: 8px; }
.evo-top.has-vid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.evo-top-t { min-width: 0; }
.evo-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.evo-jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--e-line); border-inline-start: 4px solid var(--pc);
  background: var(--e-panel); color: var(--e-text); font-weight: 700; font-size: 14px; text-decoration: none; }
.evo-jump a:hover { border-color: var(--pc); }
.evo-vid { margin: 0; min-width: 0; display: flex; justify-content: center; }
.evo-video { display: block; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--e-edge); background: #060b20; box-shadow: var(--e-shadow); }
.evo-video-h { aspect-ratio: 16 / 9; }
.evo-video-v { aspect-ratio: 9 / 16; width: auto; max-width: 100%; max-height: min(74vh, 640px); display: none; }
.evo-vid-one .evo-video { display: block; }
.evo-vid-one .evo-video-h { max-width: 720px; }

/* ------------------------------------------------------------ job rows */
.evo-group { margin-top: 30px; scroll-margin-top: 70px; }
.evo-h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 12px; padding-inline-start: 12px; border-inline-start: 5px solid var(--pc); font-size: clamp(19px, 2.6vw, 24px); line-height: 1.25; }
.evo-h3 small { font-size: 14px; font-weight: 500; color: var(--e-muted); flex: 1 1 280px; }
.evo-row { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 14px; padding: 12px; margin-bottom: 12px; border-radius: 18px; background: var(--e-panel); border: 1px solid var(--e-line);
  border-inline-start: 4px solid var(--pc); box-shadow: var(--e-shadow); }
.evo-job { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 6px; border-radius: 14px; text-decoration: none; color: var(--e-text); text-align: center;
  background: linear-gradient(180deg, var(--e-panel2), transparent); border: 1px solid var(--e-line); min-width: 0; }
.evo-job:hover { border-color: var(--pc); }
.evo-face { width: 104px; }
.evo-job strong { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.evo-path { font-size: 12.5px; font-weight: 700; color: var(--pc); }
.evo-body { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 14px; align-items: center; min-width: 0; }
.evo-stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.evo-st { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.evo-fig { display: block; width: 100%; border-radius: 14px; border: 1px solid var(--e-st-line); overflow: hidden;
  background: radial-gradient(70% 46% at 50% 92%, rgba(130, 160, 255, .34), transparent 70%), linear-gradient(180deg, var(--e-st1), var(--e-st2)); }
.evo-fig img { width: 100%; }
.evo-st4 .evo-fig { border-color: var(--e-edge); background: radial-gradient(70% 46% at 50% 92%, rgba(255, 214, 110, .36), transparent 70%), linear-gradient(180deg, var(--e-st1), var(--e-st2)); }
.evo-st b { margin-top: 6px; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.evo-st small { font-size: 12.5px; color: var(--e-muted); line-height: 1.3; }
.evo-st4 b { color: var(--e-gold); }
.evo-arr { width: 18px; height: 18px; }
.evo-st > .evo-arr { position: absolute; inset-inline-start: -14px; top: 34%; z-index: 1; color: var(--e-gold); background: var(--e-st2); border-radius: 50%; padding: 2px; border: 1px solid var(--e-st-line); }
[dir='rtl'] .evo-arr { transform: scaleX(-1); }
.evo-info { min-width: 0; }
.evo-info p { margin: 8px 0 0; color: var(--e-muted); font-size: 14px; line-height: 1.5; }
.evo-sk { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.evo-sk li { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.evo-sk .o42-skic { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff7dc; background: radial-gradient(circle at 35% 30%, #5d78e8, #263a94); border: 2px solid var(--e-edge);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .28); }
.evo-sk .o42-skic svg { width: 19px; height: 19px; display: block; }
.evo-sk .e-fire { background: radial-gradient(circle at 35% 30%, #ff9a5a, #b83214); } .evo-sk .e-water { background: radial-gradient(circle at 35% 30%, #6fc6ff, #1b62b8); }
.evo-sk .e-wind { background: radial-gradient(circle at 35% 30%, #7fe0a8, #1c8256); } .evo-sk .e-earth { background: radial-gradient(circle at 35% 30%, #d6a868, #7c5220); }
.evo-sk .e-light, .evo-sk .t-heal, .evo-sk .t-buff { background: radial-gradient(circle at 35% 30%, #ffe08a, #b47a10); } .evo-sk .e-dark { background: radial-gradient(circle at 35% 30%, #a67cff, #45208f); }
.evo-more { text-align: center; margin: 18px 0 0; }

/* ------------------------------------------------------------ the next jobs to open */
.evo-soon { margin-top: 30px; }
.evo-h3s { border-inline-start-color: var(--e-muted); }
.evo-soon ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.evo-soon a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; border-radius: 14px; background: var(--e-panel); border: 1px dashed var(--e-rail); color: var(--e-text); text-decoration: none; text-align: center; height: 100%; }
.evo-soon .evo-face { width: 84px; filter: grayscale(.55) brightness(.9); }
.evo-soon strong { font-size: 14.5px; line-height: 1.25; overflow-wrap: anywhere; }
.evo-soon time { font-size: 12.5px; color: var(--e-muted); }

/* ------------------------------------------------------------ the rebirth ladder */
.evo-rb { margin-top: 44px; scroll-margin-top: 70px; --pc: var(--e-gold); }
.evo-tier { margin-top: 22px; }
.evo-tier h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 17px; line-height: 1.3; }
.evo-tier h4 span { flex: 0 0 auto; padding: 3px 12px; border-radius: 999px; background: linear-gradient(180deg, #fff1b8, #f2c24e 50%, #c98d16); color: #2a1800; font-weight: 800; font-size: 14px; }
.evo-ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.evo-step { --c: #f2c24e; position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 16px; background: var(--e-panel); border: 1px solid var(--e-line); border-top: 4px solid var(--c); box-shadow: var(--e-shadow); overflow: hidden; }
.evo-step .evo-fig { border: 0; border-radius: 0; border-bottom: 1px solid var(--e-st-line); background: radial-gradient(64% 40% at 50% 84%, color-mix(in srgb, var(--c) 46%, transparent), transparent 72%), linear-gradient(180deg, var(--e-st1), var(--e-st2)); }
.evo-step .evo-fig img { width: min(160px, 100%); margin-inline: auto; }
.evo-n { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 1; min-width: 32px; height: 32px; padding: 0 6px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 15px; color: #10142c;
  background: var(--c); border: 2px solid rgba(255, 255, 255, .7); box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.evo-txt { display: flex; flex-direction: column; gap: 2px; padding: 10px 10px 12px; min-width: 0; }
.evo-txt b { font-size: 14.5px; line-height: 1.25; overflow-wrap: anywhere; }
.evo-txt i { font-style: normal; font-size: 13px; font-weight: 700; color: var(--e-gold); overflow-wrap: anywhere; }
.evo-txt small { font-size: 12.5px; line-height: 1.4; color: var(--e-muted); overflow-wrap: anywhere; }
.evo-txt .evo-bonus { color: var(--e-text); font-weight: 600; margin-top: 3px; padding-top: 5px; border-top: 1px dashed var(--e-line); }
.evo-c1 { --c: #f4f6ff; } .evo-c2 { --c: #a8dcff; } .evo-c3 { --c: #3f7bff; } .evo-c4 { --c: #2fd18a; } .evo-c5 { --c: #ffd24a; }
.evo-c6 { --c: #b26bff; } .evo-c7 { --c: #ff6a2a; } .evo-c8 { --c: #fff4c2; } .evo-c9 { --c: #ff3048; } .evo-c10 { --c: #ffcf4a; }
.evo-c11 { --c: #9fd8ff; } .evo-c12 { --c: #dfe6f0; } .evo-c13 { --c: #ffd76a; } .evo-c14 { --c: #ff9a3c; } .evo-c15 { --c: #bfa8ff; }
.evo-c16 { --c: #7fe0ff; } .evo-c17 { --c: #7a3cff; } .evo-c18 { --c: #ff4a1a; } .evo-c19 { --c: #d0102a; } .evo-c20 { --c: #fff0a0; }
:root[data-theme='light'] .evo-step { border-top-color: color-mix(in srgb, var(--c) 70%, #3a2a00); }

/* ------------------------------------------------------------ the finale */
.evo-fin { position: relative; margin-top: 44px; border-radius: 22px; overflow: hidden; border: 1px solid var(--e-edge); box-shadow: var(--e-shadow); isolation: isolate;
  background: radial-gradient(90% 60% at 50% 0%, #2b3f9a, transparent 70%), linear-gradient(180deg, #0b1648 0%, #101b52 46%, #24306e 78%, #4a3f7a 100%); color: #eef2ff; }
.evo-fin-sky { position: absolute; inset: 0; z-index: -1; }
.evo-fin-sky i { position: absolute; inset: 0; opacity: .8;
  background-image: radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent 60%), radial-gradient(1.5px 1.5px at 28% 8%, #ffe9a3, transparent 60%), radial-gradient(2px 2px at 44% 22%, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 61% 10%, #cfe0ff, transparent 60%), radial-gradient(2px 2px at 76% 20%, #fff, transparent 60%), radial-gradient(1.5px 1.5px at 90% 9%, #ffe9a3, transparent 60%),
    radial-gradient(1.5px 1.5px at 6% 38%, #cfe0ff, transparent 60%), radial-gradient(1.5px 1.5px at 94% 34%, #fff, transparent 60%), radial-gradient(1.5px 1.5px at 52% 4%, #fff, transparent 60%); }
.evo-fin::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 34%; z-index: -1; background: radial-gradient(60% 100% at 50% 100%, rgba(255, 214, 110, .34), transparent 70%); }
.evo-fin-in { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 16px 0; text-align: center; }
.evo-fin-logo { width: min(340px, 64%); }
.evo-fin-h { margin: 0; font: 700 clamp(20px, 3.4vw, 30px)/1.25 'w403serif', system-ui, sans-serif; color: #ffe9a3; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.evo-fin .evo-start { min-height: 60px; font-size: clamp(18px, 3vw, 24px); margin-bottom: 4px; }
.evo-fin-art { width: 100%; margin-top: -2%; }
.evo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px; border-radius: 14px; font-weight: 800; text-decoration: none; }
.evo-btn-gold { color: #2a1800; background: linear-gradient(180deg, #fff1b8, #f2c24e 45%, #c98d16); border: 1px solid #fff0b0; box-shadow: 0 4px 0 #7a4f06, 0 0 18px rgba(242, 194, 78, .3); }
.evo-btn-gold:active { transform: translateY(3px); box-shadow: 0 1px 0 #7a4f06; }
.evo-btn .evo-arr { width: 18px; height: 18px; }

/* ------------------------------------------------------------ the landing-page teaser */
.evo-tz { width: min(1120px, 100%); margin: 0 auto; padding: 56px 18px 8px; }
.evo-tz-h { margin: 0 0 10px; font-size: clamp(24px, 4vw, 36px); line-height: 1.2; }
.evo-tz-pic { border-radius: 18px; overflow: hidden; border: 1px solid var(--e-edge); background: linear-gradient(180deg, #0b1648, #24306e 80%, #4a3f7a); box-shadow: var(--e-shadow); }

/* ------------------------------------------------------------ scroll reveal (only when the page script says so) */
.evo-js .evo-rv { opacity: 0; transform: translateY(22px); transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1); will-change: opacity, transform; }
.evo-js .evo-rv.is-in { opacity: 1; transform: none; will-change: auto; }
.evo-js .evo-step.evo-rv { transform: translateY(22px) scale(.96); }
.evo-js .evo-step.evo-rv.is-in { transform: none; }
@media (prefers-reduced-motion: reduce) { .evo-js .evo-rv { opacity: 1; transform: none; transition: none; } }

/* ------------------------------------------------------------ sizes */
@media (max-width: 980px) {
  .evo-body { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .evo-sk { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .evo-sk li { flex-direction: column; text-align: center; font-size: 12.5px; gap: 4px; }
  .evo-info p { text-align: start; }
  .evo-ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .evo-top.has-vid { grid-template-columns: minmax(0, 1fr); }
  .evo-row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 10px; }
  .evo-job { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 6px 10px; text-align: start; flex-wrap: wrap; }
  .evo-face { width: 54px; }
  .evo-job strong { font-size: 17px; }
  .evo-path { margin-inline-start: auto; }
  .evo-stages { gap: 8px; }
  .evo-st b { font-size: 12.5px; } .evo-st small { font-size: 11.5px; }
  .evo-st > .evo-arr { inset-inline-start: -13px; top: 26%; width: 16px; height: 16px; }
  /* the ladder becomes a tall ladder: one step a line, a rail down the side */
  .evo-ladder { grid-template-columns: minmax(0, 1fr); gap: 10px; position: relative; padding-inline-start: 18px; }
  .evo-ladder::before { content: ''; position: absolute; inset-block: 8px; inset-inline-start: 5px; width: 4px; border-radius: 4px; background: linear-gradient(180deg, var(--e-rail), var(--e-gold)); }
  .evo-step { flex-direction: row; align-items: stretch; border-top-width: 1px; border-inline-start: 4px solid var(--c); overflow: visible; }
  :root[data-theme='light'] .evo-step { border-top-color: var(--e-line); border-inline-start-color: color-mix(in srgb, var(--c) 70%, #3a2a00); }
  .evo-step::before { content: ''; position: absolute; top: 50%; inset-inline-start: -19px; width: 14px; height: 4px; border-radius: 4px; background: var(--e-rail); }
  .evo-step .evo-fig { flex: 0 0 112px; width: 112px; border-bottom: 0; border-inline-end: 1px solid var(--e-st-line); border-start-start-radius: 11px; border-end-start-radius: 11px; display: flex; align-items: center; }
  .evo-n { top: 6px; inset-inline-start: 6px; min-width: 28px; height: 28px; font-size: 13.5px; }
  .evo-txt { justify-content: center; padding: 8px 10px; flex: 1 1 auto; }
  .evo-fin-in { padding-top: 20px; }
}
@media (max-width: 700px) and (orientation: portrait) {
  .evo-vid:not(.evo-vid-one) .evo-video-h { display: none; }
  .evo-vid:not(.evo-vid-one) .evo-video-v { display: block; }
}
@media (max-width: 360px) {
  .evo-row { padding: 8px; } .evo-stages { gap: 6px; }
  .evo-step .evo-fig { flex-basis: 92px; width: 92px; }
}
@media (min-width: 701px) and (max-width: 980px) { .evo-row { grid-template-columns: 124px minmax(0, 1fr); } }
@media (max-height: 520px) and (orientation: landscape) { .evo-video-v { max-height: 86vh; } }

/* ------------------------------------------------------------ the recorder's page (?evo=rec, tools/evo443_video.mjs): the same
   section with every word hidden — only the game's characters, numbers, icons and logo, so one video fits every language */
.evo-rec, .evo-rec body { scroll-behavior: auto !important; scrollbar-width: none; }
.evo-rec body::-webkit-scrollbar { display: none; }
.evo-rec .w403-bar, .evo-rec .w403-skip, .evo-rec .w403-foot, .evo-rec main > :not(.evo), .evo-rec .evo-top, .evo-rec .evo-more, .evo-rec .evo-soon, .evo-rec .evo-h3, .evo-rec .evo-lead, .evo-rec .evo-tier h4,
.evo-rec .evo-job strong, .evo-rec .evo-path, .evo-rec .evo-st b, .evo-rec .evo-st small, .evo-rec .evo-info p, .evo-rec .evo-sk span:not(.o42-skic), .evo-rec .evo-txt, .evo-rec .evo-fin-h, .evo-rec .evo-start .t { display: none !important; }
.evo-rec .evo { padding-top: 14px; padding-bottom: 14px; }
.evo-rec .evo-group { margin-top: 0; }
.evo-rec .evo-group .evo-row:nth-of-type(n+4) { display: none; }
.evo-rec .evo-row { grid-template-columns: 22% minmax(0, 1fr); align-items: center; margin-bottom: 14px; padding: 12px; }
.evo-rec .evo-job { flex-direction: column; justify-content: center; padding: 8px 4px; background: none; border: 0; }
.evo-rec .evo-face { width: 100%; max-width: 150px; }
.evo-rec .evo-body { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.evo-rec .evo-sk { display: flex; justify-content: center; gap: 14px; }
.evo-rec .evo-sk li { flex: 0 0 auto; }
.evo-rec .evo-rb { margin-top: 10px; }
.evo-rec .evo-tier { margin-top: 14px; }
.evo-rec .evo-ladder { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 0; }
.evo-rec .evo-ladder::before, .evo-rec .evo-step::before { display: none; }
.evo-rec .evo-step { flex-direction: column; border-top: 4px solid var(--c); border-inline-start: 1px solid var(--e-line); overflow: hidden; }
.evo-rec .evo-step .evo-fig { flex: 0 0 auto; width: 100%; border: 0; display: block; }
.evo-rec .evo-fin { margin-top: 18px; min-height: calc(100vh - 28px); display: flex; flex-direction: column; justify-content: space-between; }
.evo-rec .evo-fin-in { padding-top: 7vh; gap: 3vh; }
.evo-rec .evo-fin-logo { width: min(620px, 78%); }
.evo-rec .evo-start { min-width: 0; width: 96px; height: 96px; min-height: 0; padding: 0; border-radius: 50%; font-size: 40px; }
@media (min-width: 1000px) {
  .evo-rec .evo { width: min(1240px, 100%); }
  .evo-rec .evo-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
  .evo-rec .evo-group .evo-row:nth-of-type(n+3) { display: none; }
  .evo-rec .evo-tier { display: inline-block; width: calc(50% - 9px); vertical-align: top; }
  .evo-rec .evo-tier:nth-of-type(odd) { margin-inline-end: 14px; }
  .evo-rec .evo-fin-in { padding-top: 4vh; gap: 2vh; }
  .evo-rec .evo-fin-logo { width: min(420px, 40%); }
  .evo-rec .evo-start { width: 76px; height: 76px; font-size: 32px; }
}
