/* Rune Tree - รูน (client-debug/js/rune.js, src/map/rune.js, db-midgard/rune_db.yml; Noh 2026-11-06 "ขอสวยๆ อลังการ"): the
   window's star map (a sky and orbits of HTML layers the compositor turns, the tree one SVG), its panel; its entries shown
   only once the server said it has the tree (<html class="rn-sys">). The same dark sky in every theme: its buttons and box
   under #win-rune (above the RO theme's own). Linked by client/index.html and client-debug/index.html after style.css. */

html:not(.rn-sys) .rn-entry, html:not(.rn-sys) .mh-grid [data-w="!rune"] { display: none !important; }

#win-rune .win-body { padding: 0; overflow: auto; background: #05061a; }
.rn { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 316px; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "stage top" "stage rest";
	height: min(740px, calc(var(--maxh, 780px) - 90px)); min-height: 430px; color: #dfe6ff; font-size: 13px; line-height: 1.45;
	background: radial-gradient(ellipse 70% 80% at 36% 50%, #1d1856 0%, #0d0c31 46%, #04050f 100%); }
.rn-loading { display: flex; align-items: center; justify-content: center; grid-template-columns: none; }
.rn-wait { margin: 0; padding: 30px 12px; text-align: center; color: #c9d3ff; }
.rn-loading .rn-wait::before { content: '✦'; display: block; font-size: 30px; color: #ffd36b; animation: rn-spin 2.4s linear infinite; margin-bottom: 8px; }

/* ---- the stage ---- */
.rn-stage { grid-area: stage; position: relative; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.rn-stage.panning { cursor: grabbing; }
.rn-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.rn-sky i { position: absolute; display: block; }
.rn-neb { inset: -38%; opacity: 0.95; animation: rn-spin 260s linear infinite; animation-delay: var(--rn-t); will-change: transform; }
.rn-st { inset: 0; }
.rn-st.s2 { animation: rn-tw 3.7s ease-in-out infinite alternate; animation-delay: var(--rn-t); will-change: opacity; }
.rn-st.s3 { animation: rn-tw 5.3s ease-in-out infinite alternate; animation-delay: calc(var(--rn-t) - 2.1s); will-change: opacity; }
.rn-orbit { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; --k: 0.6; }
.rn-o { position: absolute; left: 0; top: 0; display: block; transform: translate(-50%, -50%); will-change: transform; }
.rn-o svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rn-o.o1 { width: calc(var(--k) * 1030px); height: calc(var(--k) * 1030px); animation: rn-orb 220s linear infinite; animation-delay: var(--rn-t); }
.rn-o.o2 { width: calc(var(--k) * 866px); height: calc(var(--k) * 866px); border-radius: 50%; border: 1px dashed rgba(170, 185, 255, 0.2); animation: rn-orbr 320s linear infinite; animation-delay: var(--rn-t); }
.rn-o.o3 { width: calc(var(--k) * 190px); height: calc(var(--k) * 190px); animation: rn-orbr 48s linear infinite; animation-delay: var(--rn-t); }
.rn-o.o4 { width: calc(var(--k) * 940px); height: calc(var(--k) * 940px); border-radius: 50%; border: 1px solid rgba(255, 214, 140, 0.07);
	box-shadow: inset 0 0 calc(var(--k) * 70px) rgba(120, 110, 255, 0.14), 0 0 calc(var(--k) * 40px) rgba(120, 110, 255, 0.06); will-change: auto; }
.rn-stage.deep .rn-o.o1, .rn-stage.deep .rn-o.o2, .rn-stage.deep .rn-o.o4 { display: none; }
.o-c { fill: none; stroke: rgba(255, 214, 140, 0.34); stroke-width: 0.35; }
.o-c2 { fill: none; stroke: rgba(170, 185, 255, 0.2); stroke-width: 0.3; stroke-dasharray: 1 2; }
.o-t { fill: none; stroke: rgba(255, 214, 140, 0.38); stroke-width: 0.3; }
.o-d polygon { fill: rgba(255, 214, 140, 0.75); }
.o-g path { fill: none; stroke: rgba(195, 205, 255, 0.55); stroke-width: 0.9; stroke-linecap: round; stroke-linejoin: round; }
.rn-capall .o-c, .rn-capall .o-t { stroke: rgba(255, 214, 120, 0.6); }

/* ---- the tree ---- */
.rn-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: hidden; }
.rn-rings circle { fill: none; stroke: rgba(150, 165, 255, 0.1); stroke-width: 1; stroke-dasharray: 2 7; }
.rn-e-lock { fill: none; stroke: rgba(130, 140, 195, 0.24); stroke-width: 1.3; }
.rn-e-can { fill: none; stroke: var(--c); stroke-width: 1.7; stroke-dasharray: 4 5; opacity: 0.7; }
.rn-e-glow { fill: none; stroke: var(--c); stroke-width: 9; opacity: 0.15; stroke-linecap: round; }
.rn-e-own { fill: none; stroke: var(--c); stroke-width: 2.7; stroke-linecap: round; }
.rn-flow { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1.5 15; opacity: 0.9; animation: rn-flow 1.3s linear infinite; animation-delay: var(--rn-t); }
.rn-draw { fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 5px var(--c)); animation: rn-draw 1s ease-out both; }
.rn-r { cursor: pointer; }
.rn-hit { fill: transparent; }
.rn-r .rn-s { fill: #0c1032; stroke: rgba(150, 160, 210, 0.45); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; transition: transform 0.15s ease-out; }
.rn-r .rn-in { fill: none; stroke: rgba(150, 160, 210, 0.38); stroke-width: 1.2; pointer-events: none; }
.rn-r:hover .rn-s { transform: scale(1.2); }
.rn-lock { opacity: 0.82; }
.rn-can .rn-s { fill: #151d4c; stroke: var(--c); stroke-width: 2.4; }
.rn-can .rn-in { stroke: var(--c); }
.rn-own .rn-s { fill: var(--c); stroke: #fff; stroke-width: 1.6; }
.rn-own .rn-in { fill: rgba(255, 255, 255, 0.9); stroke: none; }
.rn-halo { pointer-events: none; transform-box: fill-box; transform-origin: center; }
.rn-own .rn-halo { opacity: 0.7; }
.rn-own.rn-crown .rn-halo, .rn-own.rn-zen .rn-halo { opacity: 1; animation: rn-breathe 3.2s ease-in-out infinite; animation-delay: var(--rn-t); }
.rn-can .rn-halo { animation: rn-pulse 2s ease-in-out infinite; animation-delay: var(--rn-t); }
.rn-lock .rn-halo { opacity: 0.35; }
.rn-selring { fill: none; stroke: #fff; stroke-width: 1.7; stroke-dasharray: 4 3.4; pointer-events: none; transform-box: fill-box; transform-origin: center; animation: rn-spin 6s linear infinite; }
.rn-zen .rn-s { stroke-linejoin: round; }
.rn-pl { pointer-events: none; }
.rn-pl text { text-anchor: middle; font-family: inherit; }
.rn-pln { font-size: 23px; font-weight: 800; letter-spacing: 0.08em; fill: var(--c); paint-order: stroke; stroke: rgba(5, 6, 26, 0.85); stroke-width: 5px; }
.rn-pls { font-size: 12.5px; font-weight: 600; fill: rgba(225, 232, 255, 0.78); paint-order: stroke; stroke: rgba(5, 6, 26, 0.8); stroke-width: 3px; }
/* the core: the progress round it, the Grand Capstone's gold and rays */
.rn-core { cursor: pointer; }
.rn-cglow { fill: url(#rn-cg); pointer-events: none; transform-box: fill-box; transform-origin: center; animation: rn-breathe 4.2s ease-in-out infinite; animation-delay: var(--rn-t); }
.rn-carc0 { fill: none; stroke: rgba(160, 175, 255, 0.18); stroke-width: 3; }
.rn-carc { fill: none; stroke: #ffd36b; stroke-width: 3.2; stroke-linecap: round; filter: drop-shadow(0 0 3px #ffb52e); }
.rn-corb { fill: url(#rn-orb); }
.rn-crim { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 1.2; }
.rn-core.rn-sel .rn-crim { stroke: #fff; stroke-width: 2.2; stroke-dasharray: 5 3; }
.rn-cpc { text-anchor: middle; font-size: 19px; font-weight: 800; fill: #fff; paint-order: stroke; stroke: rgba(24, 18, 90, 0.6); stroke-width: 3px; pointer-events: none; }
.rn-cl { text-anchor: middle; font-size: 8.5px; font-weight: 700; letter-spacing: 0.22em; fill: rgba(235, 240, 255, 0.85); pointer-events: none; }
.rn-capped .rn-corb { fill: url(#rn-orbg); }
.rn-capped .rn-cglow { fill: url(#rn-cgg); }
.rn-capped .rn-cpc { font-size: 24px; fill: #fff6d8; stroke: rgba(120, 60, 0, 0.6); }
.rn-capped .rn-cl { fill: #ffe7a8; }
.rn-rays { transform-box: view-box; transform-origin: 0 0; animation: rn-spin 40s linear infinite; animation-delay: var(--rn-t); pointer-events: none; }
.rn-rays polygon { fill: rgba(255, 214, 120, 0.3); }
/* a rune bought: a flash, two rings, sparks */
.rn-burst { pointer-events: none; }
.rn-bf { fill: var(--c); opacity: 0; transform-box: fill-box; transform-origin: center; animation: rn-bf 0.85s ease-out both; }
.rn-br1 { fill: none; stroke: var(--c); stroke-width: 2.6; opacity: 0; transform-box: fill-box; transform-origin: center; animation: rn-ring 1.05s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.rn-br1.r2 { stroke: #fff; stroke-width: 1.3; }
.rn-sp { fill: #fff; stroke: var(--c); stroke-width: 1; opacity: 0; animation: rn-sp 1s cubic-bezier(0.15, 0.75, 0.3, 1) both; }
.rn-burst.big .rn-bf { animation-duration: 1.1s; }
.rn-burst.big .rn-br1 { animation-duration: 1.4s; }

/* over the stage: zoom, the legend, the Grand Capstone's screen */
.rn-zoom { position: absolute; right: 10px; bottom: 10px; z-index: 3; display: flex; flex-direction: column; gap: 6px; }
#win-rune .rn-zoom button { width: 34px; height: 34px; padding: 0; border-radius: 10px; font-size: 18px; line-height: 1; font-weight: 700; background: rgba(14, 16, 48, 0.78); }
.rn-legend { position: absolute; left: 10px; bottom: 10px; z-index: 3; display: flex; flex-wrap: wrap; gap: 3px 10px; max-width: calc(100% - 70px); font-size: 11px; color: rgba(222, 230, 255, 0.78); pointer-events: none; text-shadow: 0 1px 2px #000; }
.rn-legend .lg { display: inline-block; width: 9px; height: 9px; margin-right: 4px; border-radius: 50%; vertical-align: -1px; box-sizing: border-box; }
.rn-legend .lg.own { background: #ffd36b; box-shadow: 0 0 6px #ffb52e; }
.rn-legend .lg.can { border: 2px solid #8fb0ff; box-shadow: 0 0 6px rgba(143, 176, 255, 0.7); }
.rn-legend .lg.lock { background: #20254a; border: 1px solid #5a6088; }
.rn-legend em { flex-basis: 100%; font-style: normal; opacity: 0.72; }
.rn-capfx { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer;
	background: radial-gradient(circle at 50% 50%, rgba(255, 222, 140, 0.38), rgba(36, 18, 0, 0.86) 72%); animation: rn-cf-in 0.8s ease-out both; }
.rn-capfx.out { animation: rn-cf-out 0.6s ease-in forwards; }
.rn-cf-rays { position: absolute; left: 50%; top: 50%; width: 170%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none;
	background: repeating-conic-gradient(from 0deg, rgba(255, 222, 130, 0.34) 0deg 5deg, transparent 5deg 15deg);
	-webkit-mask: radial-gradient(circle, #000 0 16%, transparent 60%); mask: radial-gradient(circle, #000 0 16%, transparent 60%); animation: rn-orb 34s linear infinite; }
.rn-cf-ring { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; border-radius: 50%; border: 2px solid rgba(255, 232, 170, 0.9); transform: translate(-50%, -50%);
	box-shadow: 0 0 44px rgba(255, 200, 80, 0.9), inset 0 0 34px rgba(255, 200, 80, 0.6); animation: rn-cf-ring 1.8s ease-out both; pointer-events: none; }
.rn-cf-t { position: relative; display: flex; flex-direction: column; gap: 6px; max-width: 600px; padding: 34px 40px; text-align: center; background: radial-gradient(closest-side, rgba(34, 16, 0, 0.82), rgba(34, 16, 0, 0.55) 60%, transparent); }
.rn-cf-t small { font-size: 12px; font-weight: 700; letter-spacing: 0.42em; color: #ffe7a8; }
.rn-cf-t b { font-size: clamp(30px, 6vw, 56px); font-weight: 900; letter-spacing: 0.05em; line-height: 1.1; color: #ffd36b;
	background: linear-gradient(180deg, #fffbe8, #ffd36b 45%, #e0901e); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
	filter: drop-shadow(0 2px 12px rgba(255, 170, 40, 0.75)); animation: rn-cf-pop 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) 0.2s both; }
.rn-cf-t span { font-size: 13.5px; line-height: 1.6; color: #fff4d6; }
.rn-cf-t em { margin-top: 6px; font-size: 11.5px; font-style: normal; opacity: 0.6; }

/* ---- the panel ---- */
.rn-top { grid-area: top; padding: 12px 12px 8px; border-left: 1px solid rgba(140, 150, 255, 0.18); background: linear-gradient(180deg, rgba(22, 24, 66, 0.88), rgba(12, 13, 40, 0.78)); }
.rn-rest { grid-area: rest; min-height: 0; overflow-y: auto; padding: 4px 12px 12px; border-left: 1px solid rgba(140, 150, 255, 0.18); background: rgba(10, 11, 34, 0.78); }
#win-rune .rn button { height: auto; min-height: 0; padding: 6px 10px; border: 1px solid rgba(150, 165, 255, 0.3); border-radius: 9px; color: #e8edff;
	font: inherit; font-size: 13px; line-height: 1.25; text-shadow: none; box-shadow: none; background: rgba(32, 36, 96, 0.6); white-space: nowrap; }
#win-rune .rn button:hover:not(:disabled) { background: rgba(62, 68, 156, 0.7); border-color: rgba(195, 205, 255, 0.6); }
#win-rune .rn button:disabled { opacity: 0.5; color: #c4cbef; background: rgba(32, 36, 96, 0.42); cursor: default; }
.rn-rp { position: relative; display: flex; align-items: baseline; gap: 8px; padding: 9px 14px; border-radius: 14px; border: 1px solid rgba(255, 211, 107, 0.38);
	background: linear-gradient(120deg, rgba(255, 211, 107, 0.2), rgba(120, 90, 255, 0.16)); box-shadow: inset 0 0 18px rgba(255, 200, 90, 0.08); }
.rn-rp-l { flex: 1; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #ffe2a0; }
.rn-rp-n { font-size: 27px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(255, 200, 90, 0.6); }
.rn-rp-u { font-weight: 800; color: #ffd36b; }
.rn-rp.rn-gain { animation: rn-gain 1.1s ease-out; }
.rn-plus { position: absolute; right: 14px; top: -6px; font-weight: 800; color: #ffe08a; text-shadow: 0 0 8px rgba(255, 180, 60, 0.9); pointer-events: none; animation: rn-up 1.5s ease-out forwards; }
.rn-card { margin-top: 10px; padding: 12px; border-radius: 14px; border: 1px solid rgba(150, 165, 255, 0.35); border-color: color-mix(in srgb, var(--c) 55%, transparent);
	background: rgba(14, 16, 46, 0.92); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, rgba(14, 16, 46, 0.92)), rgba(10, 11, 32, 0.94) 70%);
	box-shadow: 0 0 24px color-mix(in srgb, var(--c) 20%, transparent); }
.rn-ctop { display: flex; align-items: center; gap: 10px; }
.rn-cic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; color: #fff; text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
	background: radial-gradient(circle at 40% 35%, #fff 0, var(--c) 45%, #1a1440 100%); box-shadow: 0 0 14px var(--c); }
.rn-card:not(.own) .rn-cic { filter: saturate(0.6) brightness(0.8); }
.rn-ctt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rn-ctt b { font-size: 15px; color: #fff; overflow-wrap: anywhere; }
.rn-ctt small { font-size: 11.5px; color: #c9d3ff; color: color-mix(in srgb, var(--c) 55%, #fff); }
.rn-cost { white-space: nowrap; font-size: 19px; font-weight: 800; color: #ffe08a; }
.rn-cost small { margin-left: 2px; font-size: 10px; opacity: 0.8; }
.rn-words { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 2px; }
.rn-words span { padding: 6px 9px; border-left: 3px solid var(--c); border-radius: 8px; font-size: 13px; color: #f2f5ff; background: rgba(255, 255, 255, 0.06); overflow-wrap: anywhere; }
#win-rune .rn .rn-buy { display: block; width: 100%; margin-top: 10px; padding: 10px 12px; border-color: #ffe39a; font-size: 14px; font-weight: 800; color: #2a1600; white-space: normal;
	background: linear-gradient(180deg, #fff1c2, #ffd36b 45%, #f0a531); box-shadow: 0 0 18px rgba(255, 190, 70, 0.45), inset 0 1px 0 #fff; }
#win-rune .rn .rn-buy:hover:not(:disabled) { background: linear-gradient(180deg, #fff6d6, #ffdc82 45%, #f5b049); }
#win-rune .rn .rn-buy:disabled { color: #5a4a2a; background: linear-gradient(180deg, #d8ceb0, #b8a477); box-shadow: none; }
.rn-why { margin: 10px 0 0; font-size: 12.5px; color: #ffc9c9; }
.rn-why.soft { color: #c9d3ff; }
.rn-need { margin-top: 8px; padding: 8px 10px; border: 1px dashed rgba(255, 211, 107, 0.4); border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.rn-need-h { margin-bottom: 4px; font-size: 11.5px; font-weight: 700; color: #ffe2a0; }
.rn-need ol { margin: 0; padding: 0 0 0 18px; }
.rn-need li { padding: 1px 0; font-size: 12.5px; color: #eef2ff; }
.rn-need li b { float: right; margin-left: 8px; color: #ffe08a; font-variant-numeric: tabular-nums; }
.rn-need li:last-child { font-weight: 700; color: #fff; }
#win-rune .rn .rn-buyall { background: linear-gradient(180deg, #fff6d6, #ffcf5c 40%, #ff9a2e); }
.rn-ownt { margin-top: 10px; font-size: 13px; font-weight: 700; color: #9ff0c0; }
.rn-short { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 7px 0 0; font-size: 12px; color: #ffb3a8; }
#win-rune .rn .rn-link { padding: 0; border: 0; background: none; color: #ffe08a; text-decoration: underline; }
.rn-paths { display: grid; gap: 5px; margin: 6px 0 12px; }
#win-rune .rn .rn-prow { display: grid; grid-template-columns: 38px minmax(0, 66px) minmax(0, 1fr) 38px auto; align-items: center; gap: 8px; width: 100%; padding: 6px 9px; text-align: left; background: rgba(24, 27, 74, 0.55); }
#win-rune .rn .rn-prow.full { border-color: var(--c); box-shadow: inset 0 0 12px color-mix(in srgb, var(--c) 25%, transparent); }
.rn-prow b { font-weight: 800; letter-spacing: 0.04em; color: var(--c); }
.rn-pt { overflow: hidden; text-overflow: ellipsis; font-size: 11px; opacity: 0.72; }
.rn-pbar { height: 6px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.rn-pbar i { display: block; height: 100%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.rn-pn { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.rn-pips { display: flex; gap: 3px; }
.rn-pips i { width: 6px; height: 6px; transform: rotate(45deg); border: 1px solid var(--c); opacity: 0.55; }
.rn-pips i.on { background: var(--c); box-shadow: 0 0 4px var(--c); opacity: 1; }
.rn-ex { margin-bottom: 12px; padding: 12px; border-radius: 14px; border: 1px solid rgba(150, 165, 255, 0.22); background: rgba(22, 24, 66, 0.72); }
.rn-h { margin-bottom: 8px; font-size: 13.5px; font-weight: 800; color: #fff; }
.rn-h small { margin-left: 6px; font-size: 11px; font-weight: 500; opacity: 0.62; }
.rn-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
#win-rune .rn .rn-tabs button { flex: 1; }
#win-rune .rn .rn-tabs button.on { border-color: #a49dff; font-weight: 700; color: #fff; background: linear-gradient(180deg, #6d63ff, #4a3fc4); }
.rn-rate { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 12px; color: #c9d3ff; }
.rn-rate b { color: #fff; }
.rn-exrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#win-rune .rn .rn-amt { width: 96px; height: 34px; min-height: 34px; padding: 4px 8px; border: 1px solid rgba(150, 165, 255, 0.42); border-radius: 9px; font: inherit; font-size: 16px;
	color: #fff; background: rgba(5, 6, 26, 0.82); box-shadow: none; font-variant-numeric: tabular-nums; }
.rn-quick { display: flex; gap: 4px; margin-left: auto; }
#win-rune .rn .rn-quick button { padding: 6px 7px; font-size: 12px; }
.rn-price { margin: 8px 0; font-size: 13px; color: #c9d3ff; }
.rn-price b { font-size: 16px; color: #ffe08a; }
#win-rune .rn .rn-exbtn { width: 100%; padding: 9px; border-color: #a49dff; font-weight: 800; color: #fff; white-space: normal; background: linear-gradient(180deg, #7b72ff, #4f43d6); }
#win-rune .rn .rn-exbtn:hover:not(:disabled) { background: linear-gradient(180deg, #8d85ff, #5c50e6); }
#win-rune .rn .rn-exbtn.confirm { border-color: #ffe39a; color: #2a1600; background: linear-gradient(180deg, #ffe08a, #f09a2a); animation: rn-blink 1s ease-in-out infinite; }
.rn-note { margin: 8px 0 0; font-size: 11px; opacity: 0.62; }
.rn-sum { padding: 2px 2px 6px; }
.rn-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rn-chips span { padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(150, 165, 255, 0.26); font-size: 12px; color: #eef2ff; background: rgba(120, 130, 255, 0.14); }
.rn-none { margin: 0; font-size: 12px; opacity: 0.68; }
.rn-capsum { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding: 9px 11px; border-radius: 12px; border: 1px solid rgba(255, 211, 107, 0.5);
	background: linear-gradient(120deg, rgba(255, 211, 107, 0.26), rgba(255, 140, 40, 0.12)); }
.rn-capsum b { color: #ffe08a; }
.rn-capsum span { font-size: 12px; color: #fff4d6; }
#win-rune .rn-prog { font-size: 12.5px; }
#win-rune .rn-prog b { font-variant-numeric: tabular-nums; }
/* the status window's entry */
.st-rn-btn { font-weight: 700; }

@media (max-width: 860px) and (min-width: 701px) { .rn { grid-template-columns: minmax(0, 1fr) 280px; } }
/* ---- the phone (rune.js: the window's body .rn-ph when isPhone() - a phone, the phone HUD, a phone on its side; Noh
   2026-11-06 18:36 "ใช้ยาก ต้องเลื่อนลงไป"): ONE screen, nothing to scroll - the RP pill and the progress on top, one view
   in the middle (the map filling it with the rune picked docked under it / the paths / the exchange / the bonus), its
   four tabs at the bottom. Drawn at full size like the world map (not the phone UI's size: the map needs the room). ---- */
html.mhud .win.win-rune { --wk: 1; transform: none; max-height: calc(100% - 88px - var(--mh-wb)) !important; }
html.mhud.mh-land .win.win-rune { width: min(560px, 62vw) !important; max-height: none !important; }
.win.win-rune.rn-phwin { height: calc(100% - 150px); }
html.mhud .win.win-rune.rn-phwin { height: calc(100% - 88px - var(--mh-wb)); }
html.mhud.mh-land .win.win-rune.rn-phwin { height: auto; }
#win-rune.rn-phwin .win-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.rn.rn-ph { display: flex; flex-direction: column; flex: 1 1 auto; height: auto; min-height: 0; }
.rn-phbar { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid rgba(140, 150, 255, 0.22);
	background: linear-gradient(180deg, rgba(30, 26, 80, 0.96), rgba(14, 13, 44, 0.92)); }
#win-rune .rn .rn-rppill { flex: none; display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 14px; border-radius: 999px; border: 1px solid rgba(255, 211, 107, 0.5);
	background: linear-gradient(120deg, rgba(255, 211, 107, 0.24), rgba(120, 90, 255, 0.2)); box-shadow: 0 0 14px rgba(255, 200, 90, 0.18); }
.rn-rppill .rn-rp-l { flex: none; font-size: 12px; letter-spacing: 0.1em; }
.rn-rppill .rn-rp-n { font-size: 21px; line-height: 1.1; }
.rn-rp-add { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-style: normal; font-weight: 800; font-size: 17px; color: #2a1600; background: linear-gradient(180deg, #ffe7a0, #f3a634); }
.rn-rppill .rn-plus { right: 6px; top: -16px; }
.rn-phprog { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.rn-phprog b { font-size: 14px; color: #fff; }
.rn-phprog span { font-size: 11.5px; color: #b7c0ec; }
.rn-phmain { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.rn-ph .rn-stage { flex: 1 1 auto; min-height: 180px; height: auto; }
.rn-dock { flex: none; max-height: 48%; overflow-y: auto; padding: 8px 10px 10px; border-top: 1px solid rgba(140, 150, 255, 0.25); background: linear-gradient(180deg, rgba(16, 15, 50, 0.92), rgba(9, 9, 30, 0.98)); }
.rn-phpane { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 10px; }
.rn-phpane .rn-h small { display: block; margin: 2px 0 0; }
.rn-ph .rn-paths { gap: 8px; }
.rn-ph .rn-ex { margin: 0; }
.rn-tabbar { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(140, 150, 255, 0.22); background: rgba(9, 9, 30, 0.98); }
#win-rune .rn .rn-tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 5px; border: 0; border-radius: 12px; font-size: 12px; color: #9aa3d6; background: none; }
#win-rune .rn .rn-tabbar button.on { color: #fff; background: rgba(110, 100, 255, 0.24); }
.rn-tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rn-tabbar button.on svg { stroke: #ffd36b; }
/* the rune picked, docked under the map: compact - its bonus words in one row of chips, the plan of what it needs inline */
.rn-ph .rn-card { margin-top: 0; padding: 10px 12px; }
.rn-ph .rn-cic { width: 30px; height: 30px; font-size: 15px; }
.rn-ph .rn-ctt b { font-size: 15px; }
.rn-ph .rn-cost { font-size: 18px; }
.rn-ph .rn-words { flex-direction: row; flex-wrap: wrap; gap: 4px; margin: 8px 0 0; }
.rn-ph .rn-words span { padding: 3px 9px; border-left-width: 2px; font-size: 12.5px; }
.rn-ph .rn-why { margin-top: 7px; font-size: 12px; }
.rn-ph .rn-need { margin-top: 6px; padding: 6px 8px; }
.rn-ph .rn-need-h { margin-bottom: 2px; font-size: 11px; }
.rn-ph .rn-need ol { display: flex; flex-wrap: wrap; gap: 1px 12px; padding: 0; list-style: none; counter-reset: rnn; }
.rn-ph .rn-need li { padding: 0; font-size: 12px; counter-increment: rnn; }
.rn-ph .rn-need li::before { content: counter(rnn) '. '; opacity: 0.6; }
.rn-ph .rn-need li b { float: none; margin-left: 4px; }
#win-rune .rn-ph .rn-buy { margin-top: 8px; padding: 11px 12px; font-size: 15px; }
.rn-ph .rn-ownt { margin-top: 8px; }
.rn-ph .rn-short { margin-top: 6px; }
#win-rune .rn-ph .rn-prow { padding: 10px 10px; }
#win-rune .rn-ph .rn-quick button, #win-rune .rn-ph .rn-tabs button { padding: 9px 10px; }
.rn-ph .rn-legend span { display: none; }
/* (the zoom and the legend at the top of the map on a phone: the paths' names INT / VIT are at its bottom corners) */
.rn-ph .rn-zoom { top: 8px; bottom: auto; flex-direction: row; }
.rn-ph .rn-legend { top: 10px; bottom: auto; max-width: calc(50% - 44px); }

@keyframes rn-spin { to { transform: rotate(360deg); } }
@keyframes rn-orb { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes rn-orbr { from { transform: translate(-50%, -50%) rotate(360deg); } to { transform: translate(-50%, -50%) rotate(0deg); } }
@keyframes rn-tw { from { opacity: 0.22; } to { opacity: 1; } }
@keyframes rn-flow { to { stroke-dashoffset: -16.5; } }
@keyframes rn-draw { 0% { stroke-dashoffset: 1; opacity: 1; } 55% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes rn-pulse { 0%, 100% { opacity: 0.25; transform: scale(0.75); } 50% { opacity: 0.95; transform: scale(1.12); } }
@keyframes rn-breathe { 0%, 100% { transform: scale(0.92); } 50% { transform: scale(1.08); } }
@keyframes rn-bf { 0% { opacity: 0; transform: scale(0.3); } 10% { opacity: 0.95; } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes rn-ring { 0% { opacity: 0; transform: scale(0.4); } 8% { opacity: 1; } 100% { opacity: 0; transform: scale(4.4); } }
@keyframes rn-sp { 0% { opacity: 0; transform: translate(0, 0) scale(1.2); } 8% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.4); } }
@keyframes rn-gain { 0% { box-shadow: 0 0 0 rgba(255, 210, 100, 0); } 25% { box-shadow: 0 0 30px rgba(255, 210, 100, 0.85); border-color: #ffe39a; } 100% { box-shadow: inset 0 0 18px rgba(255, 200, 90, 0.08); } }
@keyframes rn-up { 0% { opacity: 0; transform: translateY(8px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px); } }
@keyframes rn-blink { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
@keyframes rn-cf-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rn-cf-out { to { opacity: 0; } }
@keyframes rn-cf-ring { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); } 30% { opacity: 1; } 100% { opacity: 0.85; transform: translate(-50%, -50%) scale(1.6); } }
@keyframes rn-cf-pop { 0% { opacity: 0; transform: scale(0.6); } 100% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
	.rn-neb, .rn-st, .rn-o, .rn-flow, .rn-can .rn-halo, .rn-cglow, .rn-rays, .rn-selring, .rn-cf-rays { animation: none !important; }
}
