/* ==========================================================================
   MUZeeD แผนที่และจุดเกิดมอน /game-info/maps (2026-09-28)
   - โทนเดียวกับเว็บ (พื้นมืด ตัวอักษร Kanit จาก layouts.app)
   - มือถือ 375px: การ์ดคอลัมน์เดียว ภาพขยาย/ตารางเลื่อนในกรอบของตัวเอง หน้าเว็บไม่เลื่อนด้านข้าง
   - .ma-adm = extra parts the server adds for staff review (gold left border), hidden by .ma-player
   ========================================================================== */
.ma-page, .ma-dlg {
    --ma-gold: #f59e0b;
    --ma-text: #e5e7eb;
    --ma-muted: #9ca3af;
    --ma-line: rgba(255, 255, 255, .1);
    --ma-card: rgba(17, 24, 39, .85);
    --ma-card-2: rgba(255, 255, 255, .04);
    --ma-shot: #07080b;
    --gA: #3cc79c; --gB: #e3ae45; --gC: #86a9de; --gD: #ac8fe0;
    --crit: #f0834d; --warn: #e3b341; --room: #ac8fe0; --pend: #60a5fa; --info: #9ca3af;
    color: var(--ma-text);
}
.ma-page { overflow-x: hidden; overflow-x: clip; }
.ma-page button, .ma-dlg button { font: inherit; }
.ma-page :focus-visible, .ma-dlg :focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }
.gA { --gc: var(--gA); } .gB { --gc: var(--gB); } .gC { --gc: var(--gC); } .gD { --gc: var(--gD); }

/* ---------- head ---------- */
.ma-wrap { padding-top: 14px; padding-bottom: 40px; }
.ma-head { display: grid; gap: 18px; margin-bottom: 18px; }
@media (min-width: 992px) {
    .ma-page:not(.ma-player) .ma-head:has(.ma-tally) { grid-template-columns: 1.4fr 1fr; align-items: end; }
}
.ma-eyebrow { font-size: .8rem; letter-spacing: .06em; color: var(--ma-gold); font-weight: 500; }
.ma-title { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 600; line-height: 1.2; margin: .2rem 0 0; color: #f3f4f6; }
.ma-lead { color: var(--ma-muted); max-width: 72ch; margin: .55rem 0 0; line-height: 1.65; }

/* ---------- review parts (only in the page when the server adds them) ---------- */
.ma-adm { border-left: 3px solid var(--ma-gold); padding-left: 10px; }
.ma-player .ma-adm { display: none !important; }
.ma-adm-note { font-size: .74rem; letter-spacing: .04em; color: var(--ma-gold); border-left-style: dashed; }
.ma-tally { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.ma-tally button { cursor: pointer; text-align: left; color: var(--ma-text); background: var(--ma-card); border: 1px solid var(--ma-line);
    border-radius: 12px; padding: 8px 11px; display: grid; gap: 2px; }
.ma-tally button[aria-pressed="true"] { border-color: var(--gc); box-shadow: inset 0 0 0 1px var(--gc); }
.ma-tally b { font-size: 1.4rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ma-tally span { font-size: .76rem; color: var(--ma-muted); line-height: 1.35; }
.ma-g { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ma-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gc); flex: none; display: inline-block; }
.ma-findings { background: var(--ma-card); border: 1px solid var(--ma-line); border-left: 3px solid var(--ma-gold);
    border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.ma-findings h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 8px; color: #f3f4f6; }
.ma-findings h2 small { font-size: .72rem; color: var(--ma-gold); font-weight: 500; margin-left: 6px; }
.ma-findings ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; font-size: .92rem; color: #d1d5db; }
.ma-findings a { color: #fbbf24; border-bottom: 1px dotted currentColor; }

/* ---------- toolbar ---------- */
.ma-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 0; margin-bottom: 14px;
    border-bottom: 1px solid var(--ma-line); }
.ma-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ma-chip { cursor: pointer; font-size: .84rem; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--ma-line);
    background: var(--ma-card); color: var(--ma-text); display: inline-flex; gap: 6px; align-items: center; }
.ma-chip[aria-pressed="true"] { background: #e5e7eb; color: #111827; border-color: #e5e7eb; }
.ma-search { flex: 1 1 240px; min-width: 0; font: inherit; padding: 7px 12px; border-radius: 10px; color: var(--ma-text);
    border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); }
.ma-search::placeholder { color: #6b7280; }
.ma-search:focus { outline: none; border-color: rgba(245, 158, 11, .7); box-shadow: 0 0 0 3px rgba(245, 158, 11, .15); }
.ma-toggle { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--ma-muted); cursor: pointer; margin: 0; }
.ma-adm-switch { color: #fde68a; }
.ma-count { font-size: .85rem; color: var(--ma-muted); font-variant-numeric: tabular-nums; margin-left: auto; }

/* ---------- cards ---------- */
.ma-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.ma-card { background: var(--ma-card); border: 1px solid var(--ma-line); border-radius: 14px; overflow: hidden; display: grid;
    grid-template-rows: auto 1fr; cursor: pointer; transition: border-color .15s, transform .15s; }
.ma-card[hidden] { display: none; }
.ma-card:hover { border-color: var(--gc, rgba(245, 158, 11, .6)); }
@media (hover: hover) { .ma-card:hover { transform: translateY(-2px); } }
.ma-shot { display: block; width: 100%; height: auto; aspect-ratio: 1424 / 1024; background: var(--ma-shot); }
.ma-meta { padding: 10px 12px 12px; display: grid; gap: 6px; align-content: start; }
.ma-row1 { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.ma-mapno { font-weight: 600; color: var(--ma-gold); font-variant-numeric: tabular-nums; margin-right: 7px; }
.ma-mapname { font-weight: 500; font-size: 1.02rem; color: #f3f4f6; overflow-wrap: anywhere; }
.ma-gtag { font-size: .72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; color: var(--gc, var(--ma-gold));
    border: 1px solid var(--gc, var(--ma-gold)); white-space: nowrap; }
.ma-stats { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: .84rem; color: var(--ma-muted); font-variant-numeric: tabular-nums; }
.ma-stats b { color: var(--ma-text); font-weight: 600; }
.ma-flags { display: flex; flex-wrap: wrap; gap: 5px; }
.ma-flag { font-size: .74rem; padding: 1px 8px; border-radius: 6px; background: var(--ma-card-2); border: 1px solid var(--ma-line);
    white-space: nowrap; }
.ma-flag.crit { color: var(--crit); border-color: rgba(240, 131, 77, .5); }
.ma-flag.warn { color: var(--warn); border-color: rgba(227, 179, 65, .45); }
.ma-flag.room { color: var(--room); border-color: rgba(172, 143, 224, .45); }
.ma-flag.pend { color: var(--pend); border-color: rgba(96, 165, 250, .5); }
.ma-flag.info { color: var(--info); }
.ma-empty { grid-column: 1 / -1; padding: 40px 10px; text-align: center; color: var(--ma-muted); }
.ma-empty[hidden] { display: none; }
.ma-foot { margin-top: 24px; color: var(--ma-muted); font-size: .84rem; display: grid; gap: 5px; max-width: 110ch; }
.ma-foot > div { overflow-wrap: anywhere; }

/* ---------- dialog: big picture + details ---------- */
/* pinned to the top (not centred): a change of height never moves the picture under the pointer */
.ma-dlg { margin: 10px auto auto; border: 1px solid var(--ma-line); border-radius: 16px; padding: 0; width: min(1180px, calc(100vw - 20px)); max-width: none;
    max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); background: #111827; box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
    overflow: hidden; font-family: var(--font-family, 'Kanit', sans-serif); }
.ma-dlg::backdrop { background: rgba(4, 6, 12, .75); }
.ma-dlg-in { display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: calc(100vh - 22px); max-height: calc(100dvh - 22px); }
.ma-dlg .ma-dlg-in:focus, .ma-dlg .ma-dlg-in:focus-visible { outline: none; }
.ma-dlg-head { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; justify-content: space-between; padding: 10px 14px;
    border-bottom: 1px solid var(--ma-line); }
.ma-dlg-head h2 { font-size: 1.15rem; font-weight: 600; margin: 0; color: #f3f4f6; overflow-wrap: anywhere; }
.ma-dlg-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.ma-btn { cursor: pointer; font-size: .86rem; padding: 5px 12px; border-radius: 9px; color: var(--ma-text);
    border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); }
.ma-btn:hover:not(:disabled) { border-color: rgba(245, 158, 11, .6); color: #fff; }
.ma-btn:disabled { opacity: .45; cursor: default; }
.ma-dlg-body { overflow: auto; overscroll-behavior: contain; padding: 12px 14px 16px; display: grid; gap: 16px;
    grid-template-columns: minmax(0, 1fr); }
.ma-pic { min-width: 0; }
@media (min-width: 1000px) {
    .ma-dlg-body { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: start; }
}
.ma-bigwrap { background: var(--ma-shot); border-radius: 10px; overflow: auto; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); }
.ma-stage { position: relative; line-height: 0; }
.ma-big { display: block; width: 100%; height: auto; cursor: crosshair; user-select: none; -webkit-user-select: none;
    -webkit-user-drag: none; -webkit-touch-callout: none; touch-action: pan-y pinch-zoom; }
.ma-bigwrap.zoomed .ma-stage { width: 1424px; }
.ma-bigwrap.zoomed .ma-big { touch-action: auto; }
.ma-tile { position: absolute; pointer-events: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .9), 0 0 0 2px #fff, 0 0 0 3px rgba(0, 0, 0, .55); }
.ma-tile[hidden], .ma-tip[hidden] { display: none; }
.ma-tip { position: fixed; left: 0; top: 0; z-index: 10; pointer-events: none; padding: 3px 8px; border-radius: 6px; white-space: nowrap;
    font-size: .84rem; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; color: #1f1400;
    background: #fde68a; border: 1px solid #b45309; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.ma-tools { display: flex; gap: 8px 14px; align-items: center; margin-top: 10px; }
.ma-tools .ma-btn { flex: none; }
.ma-coord { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;   /* one line: the */
    font-size: .88rem; color: var(--ma-muted); font-variant-numeric: tabular-nums; }                     /* row never grows */
.ma-coord.on { color: #fde68a; font-weight: 600; }
.ma-side { display: grid; gap: 14px; font-size: .9rem; min-width: 0; }
.ma-side h3 { font-size: .95rem; font-weight: 600; margin: 0 0 4px; color: #f3f4f6; }
.ma-side ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 4px; color: #d1d5db; }
.ma-side li { overflow-wrap: anywhere; }
.ma-side li.ma-adm { list-style: none; margin-left: -1.1rem; }
.ma-muted { color: var(--ma-muted); margin: 0; }
.ma-kinds { overflow-x: auto; }
.ma-kinds table { border-collapse: collapse; width: 100%; font-size: .86rem; }
.ma-kinds th, .ma-kinds td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--ma-line); color: #d1d5db; }
.ma-kinds th { color: var(--ma-muted); font-weight: 500; font-size: .78rem; }
.ma-kinds .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- new picture style (only in the page when the server adds it) ---------- */
.ma-page, .ma-dlg { --ma-ease: cubic-bezier(.2, .7, .2, 1); }
.ma-art-only { display: none; }
.ma-art-on .ma-art-only { display: block; }
.ma-art-on .ma-old-only { display: none; }
/* the style switch: the same width in both states (bold = weight of both), so switching moves nothing */
.ma-style { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .05); flex: none; }
.ma-style button { cursor: pointer; font-size: .86rem; font-weight: 600; padding: 3px 11px; border-radius: 7px; border: 0; background: transparent;
    color: var(--ma-muted); transition: background-color .15s, color .15s; }
.ma-style button:hover { color: #f3f4f6; }
.ma-style button[aria-pressed="true"] { background: #f59e0b; color: #1f1400; }
.ma-style-pre { border: 1px dashed rgba(245, 158, 11, .55); }        /* Super Admin preview: players do not have it yet */
.ma-style-note { font-size: .74rem; color: #fde68a; padding: 0 6px 0 4px; white-space: nowrap; }
.ma-player .ma-style-pre { display: none; }
/* the new-style card thumbnail keeps the old card's proportions: both styles lay the grid out the same */
.ma-shot-art { object-fit: cover; }
.ma-hid { display: inline-block; justify-self: start; margin-top: 2px; font-size: .72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, .6); background: rgba(127, 29, 29, .25); white-space: nowrap; }
.ma-dlg-head .ma-hid { margin-top: 0; vertical-align: middle; }
.ma-card-hid .ma-shot { opacity: .5; }
.ma-dlg-art .ma-dlg-body { grid-template-columns: minmax(0, 1fr); }
.ma-art[hidden], .ma-zoom[hidden], .ma-bigwrap[hidden], .ma-btn[hidden] { display: none; }
.ma-art-stage { position: relative; width: 100%; max-width: calc((100vh - 176px) * 1.84); max-width: calc((100dvh - 176px) * 1.84);
    margin: 0 auto; aspect-ratio: 1840 / 1000; overflow: hidden; border-radius: 10px; background: var(--ma-shot);
    contain: layout paint; touch-action: pan-y pinch-zoom; }
.ma-art-stage.zoomed { touch-action: none; }
.ma-art-world { position: absolute; inset: 0; transform-origin: 0 0; transition: transform .32s var(--ma-ease); cursor: crosshair; }
.ma-art-world.ma-still { transition: none; }
.ma-art-stage.zoomed .ma-art-world { cursor: grab; }
.ma-art-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-select: none;
    -webkit-user-drag: none; -webkit-touch-callout: none; }
.ma-art-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ma-art-hits { position: absolute; inset: 0; }
.ma-hit { position: absolute; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; border-radius: 50%;
    -webkit-tap-highlight-color: transparent; }
.ma-hit.ma-rowhit { border-radius: 8px; }
.ma-hit:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }
.ma-art-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 4px 10px; border-radius: 8px;
    font-size: .8rem; color: #fde68a; background: rgba(8, 10, 15, .86); border: 1px solid rgba(245, 158, 11, .45); pointer-events: none;
    opacity: 0; transition: opacity .2s; white-space: nowrap; }
.ma-art-hint.on { opacity: 1; }
.ma-zoom { display: inline-flex; gap: 4px; flex: none; }
.ma-zoom .ma-btn { min-width: 34px; }
/* overlay layers: every effect is opacity / transform only (nothing in the page moves) */
.ma-fx { opacity: 0; transition: opacity .22s var(--ma-ease); }
.ma-fx.on { opacity: 1; }
.ma-area-fill { opacity: .24; fill-rule: evenodd; }
.ma-area-line { fill: none; stroke-width: 2; stroke-linejoin: round; opacity: .95; }
.ma-dim path { fill: rgba(4, 6, 10, .55); }
.ma-mag { opacity: 0; transform: scale(1); transform-box: view-box; transition: transform .2s var(--ma-ease), opacity .2s var(--ma-ease); }
.ma-mag.on { opacity: 1; }
.ma-ring { fill: none; stroke-width: 3.2; transform-box: fill-box; transform-origin: center; transform: scale(.9); opacity: 0;
    transition: transform .22s var(--ma-ease), opacity .22s var(--ma-ease); }
.ma-ring.on { transform: scale(1); opacity: 1; }
.ma-shine { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; transform-box: fill-box; transform-origin: center; opacity: 0; }
.ma-shine.on { animation: ma-spin 1.1s var(--ma-ease) 1 both; }
@keyframes ma-spin { 0% { transform: rotate(0deg); opacity: 0; } 15% { opacity: .95; } 85% { opacity: .6; } 100% { transform: rotate(320deg); opacity: 0; } }
.ma-pulse { fill: none; stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: ma-pulse 2.8s ease-out infinite; }
@keyframes ma-pulse { 0% { transform: scale(1); opacity: .75; } 70% { transform: scale(1.35); opacity: 0; } 100% { transform: scale(1.35); opacity: 0; } }
.ma-rowhl { fill: rgba(245, 158, 11, .10); stroke: rgba(245, 158, 11, .9); stroke-width: 1.5; opacity: 0; transform-box: fill-box;
    transform-origin: left center; transform: scaleX(.98); transition: opacity .18s var(--ma-ease), transform .18s var(--ma-ease); }
.ma-rowhl.on { opacity: 1; transform: scaleX(1); }
.ma-quad { fill: rgba(255, 214, 10, .22); stroke: #ffd60a; stroke-width: 1.6; }
/* the floating card: fixed to the viewport, never part of the layout */
.ma-hover { position: fixed; left: 0; top: 0; z-index: 12; width: 300px; max-width: calc(100vw - 16px); pointer-events: none;
    background: linear-gradient(180deg, rgba(24, 32, 50, .97), rgba(14, 18, 28, .97)); border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px; box-shadow: 0 12px 34px rgba(0, 0, 0, .55); padding: 12px 12px 10px; color: var(--ma-text); opacity: 0; visibility: hidden;
    transform: translate3d(var(--x, 0), var(--y, 0), 0) translateY(8px);
    transition: opacity .18s var(--ma-ease), transform .18s var(--ma-ease), visibility 0s .18s; }
.ma-hover.on { opacity: 1; visibility: visible; transform: translate3d(var(--x, 0), var(--y, 0), 0);
    transition: opacity .18s var(--ma-ease), transform .18s var(--ma-ease); }
.ma-hover.pinned { pointer-events: auto; }
.ma-hover h4 { margin: 0 0 8px; font-size: 1rem; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: #f3f4f6; }
.ma-chipc { font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.ma-mon { display: grid; grid-template-columns: 38px 1fr auto; gap: 8px; align-items: center; padding: 4px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.ma-mon:first-of-type { border-top: 0; }
.ma-mface { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; border: 2px solid var(--c, #cbd5e1); background: #0b0d12; }
.ma-mface img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ma-mface span, .ma-face span { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 700; font-size: .78rem; color: #e5e7eb; background: #475569; }
.ma-mon b { display: block; font-size: .9rem; line-height: 1.2; font-weight: 600; }
.ma-mon small { color: var(--ma-muted); font-size: .76rem; }
.ma-mon em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.ma-hover footer { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .08); color: var(--ma-muted); font-size: .78rem;
    font-variant-numeric: tabular-nums; }
/* the monster table with portraits: rows light up with the badges (colour / shadow only, no size change) */
.ma-kname { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.ma-face { width: 28px; height: 28px; flex: none; border-radius: 50%; overflow: hidden; border: 1px solid rgba(255, 255, 255, .25); background: #0b0d12; }
.ma-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ma-kinds-art tr[data-id] { cursor: pointer; transition: background-color .15s, box-shadow .15s; }
.ma-kinds-art tr[data-id]:focus-visible { outline: 2px solid #fbbf24; outline-offset: -2px; }
.ma-kinds-art tr.on td { background: rgba(245, 158, 11, .12); }
.ma-kinds-art tr.on td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }

@media (max-width: 575.98px) {
    .ma-dlg-head { padding: 8px 10px; }
    .ma-dlg-body { padding: 10px; }
    .ma-count { margin-left: 0; }
    .ma-hover { width: calc(100vw - 16px); }
    .ma-art-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ma-card { transition: none; }
    .ma-card:hover { transform: none; }
    .ma-art-world, .ma-fx, .ma-mag, .ma-ring, .ma-rowhl, .ma-hover, .ma-hover.on, .ma-art-hint { transition: none !important; }
    .ma-pulse, .ma-shine.on { animation: none !important; }
    .ma-pulse { opacity: .6; }
}
