/* =====================================================================
 * pixelm.css — PIXEL F v9 theme: Login / Character Select / Channel,
 * Guild emblems & skill tree, Daily 14, Weather HUD, Feedback, Graphics
 * ===================================================================== */
:root {
  --pm-bg0: #07060f; --pm-bg1: #120d2a; --pm-ink: #efe9ff; --pm-dim: #a79fc7;
  --pm-acc: #ff4fa3; --pm-acc2: #4fd8ff; --pm-gold: #ffd166; --pm-line: rgba(255, 255, 255, .12);
  --pm-card: rgba(20, 14, 44, .86); --pm-px: "Press Start 2P", "Cinzel", monospace;
}
#pm-auth { position: fixed; inset: 0; z-index: 900; color: var(--pm-ink); font-family: inherit; overflow: auto; }
#pm-auth.hidden, .pm-view.hidden, .pm-modal.hidden { display: none !important; }
.pm-bg { position: fixed; inset: 0; background: radial-gradient(1200px 600px at 50% 110%, #3a1466 0%, transparent 60%), radial-gradient(900px 500px at 10% -10%, #0d3a5c 0%, transparent 55%), linear-gradient(180deg, var(--pm-bg0), var(--pm-bg1)); overflow: hidden; }
.pm-stars i { position: absolute; width: var(--s); height: var(--s); background: #fff; box-shadow: 0 0 6px #fff; animation: pmTw 2.8s infinite ease-in-out; image-rendering: pixelated; }
@keyframes pmTw { 0%, 100% { opacity: .15 } 50% { opacity: 1 } }
.pm-grid { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%; background-image: linear-gradient(rgba(255, 79, 163, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 216, 255, .3) 1px, transparent 1px); background-size: 48px 48px; transform: perspective(420px) rotateX(62deg); transform-origin: 50% 0; animation: pmGrid 3s linear infinite; mask-image: linear-gradient(transparent, #000 40%); -webkit-mask-image: linear-gradient(transparent, #000 40%); }
@keyframes pmGrid { to { background-position: 0 48px, 0 0 } }
.pm-glow { position: absolute; left: 50%; bottom: 34%; width: 520px; height: 520px; margin-left: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 79, 163, .45), rgba(255, 140, 60, .18) 40%, transparent 70%); filter: blur(6px); }
.pm-view { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 28px 16px 60px; box-sizing: border-box; }
.pm-foot { position: fixed; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--pm-dim); letter-spacing: .5px; pointer-events: none; }
.pm-logo { text-align: center; line-height: 1; user-select: none; }
.pm-logo .px, .pm-logo .m { font-family: var(--pm-px); font-weight: 800; font-size: clamp(38px, 8vw, 78px); letter-spacing: 4px; color: #fff; text-shadow: 4px 4px 0 #2a0f55, 0 0 24px rgba(255, 79, 163, .7); }
.pm-logo .m { margin-left: 14px; color: var(--pm-acc); display: inline-block; animation: pmBob 2.2s ease-in-out infinite; text-shadow: 4px 4px 0 #2a0f55, 0 0 30px rgba(255, 79, 163, 1); }
@keyframes pmBob { 50% { transform: translateY(-6px) } }
.pm-logo small { display: block; margin-top: 10px; font-size: 12px; letter-spacing: 6px; color: var(--pm-acc2); text-transform: uppercase; }
.pm-card { background: var(--pm-card); border: 2px solid var(--pm-line); border-radius: 14px; box-shadow: 0 0 0 2px #000, 0 20px 50px rgba(0, 0, 0, .55), inset 0 0 40px rgba(79, 216, 255, .06); padding: 22px; backdrop-filter: blur(6px); }
.pm-login-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 10px; }
.pm-h { font-weight: 800; font-size: 17px; text-align: center; margin-bottom: 4px; letter-spacing: .5px; }
.pm-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; border-radius: 10px; border: 2px solid rgba(0, 0, 0, .5); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; color: #fff; background: #2b2450; box-shadow: 0 4px 0 rgba(0, 0, 0, .45); transition: transform .08s, filter .15s; }
.pm-btn:hover:not([disabled]) { filter: brightness(1.15); transform: translateY(-1px); }
.pm-btn:active:not([disabled]) { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.pm-btn[disabled] { opacity: .45; cursor: not-allowed; }
.pm-google { background: #fff; color: #222; }
.pm-discord { background: #5865f2; }
.pm-guest { background: #3a3358; }
.pm-start { background: linear-gradient(180deg, #ff6bb5, #d6307f); }
.pm-danger { background: linear-gradient(180deg, #ff5e5e, #b31b1b); }
.pm-ghost { background: transparent; border-color: var(--pm-line); box-shadow: none; }
.pm-mini { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--pm-line); background: rgba(255, 255, 255, .06); color: var(--pm-ink); font: inherit; font-size: 12px; cursor: pointer; }
.pm-mini:hover { background: rgba(255, 255, 255, .14); }
.pm-or { display: flex; align-items: center; gap: 10px; color: var(--pm-dim); font-size: 12px; }
.pm-or::before, .pm-or::after { content: ""; flex: 1; height: 1px; background: var(--pm-line); }
.pm-note { font-size: 12px; color: var(--pm-dim); text-align: center; margin: 4px 0; line-height: 1.5; }
.pm-note.warn { color: #ffb86b; }
.pm-err { color: #ff7a7a; font-size: 12px; min-height: 14px; text-align: center; margin: 4px 0 0; }
.pm-in { width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 9px; border: 2px solid var(--pm-line); background: rgba(0, 0, 0, .35); color: #fff; font: inherit; margin: 4px 0; }
.pm-in:focus { outline: none; border-color: var(--pm-acc2); }
.pm-row { display: flex; gap: 10px; margin-top: 8px; }
.pm-top { width: min(980px, 100%); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pm-top .pm-logo .px, .pm-top .pm-logo .m { font-size: 34px; }
.pm-top .pm-logo small { font-size: 10px; letter-spacing: 3px; }
.pm-acc { display: flex; align-items: center; gap: 10px; background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: 12px; padding: 8px 12px; }
.pm-acc-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); font-size: 18px; }
.pm-acc b { display: block; font-size: 14px; }
.pm-acc small { color: var(--pm-dim); font-size: 11px; }
.pm-title2 { font-family: var(--pm-px); font-size: 22px; font-weight: 800; letter-spacing: 2px; text-shadow: 3px 3px 0 #2a0f55; }
.pm-title2 small { font-size: 13px; color: var(--pm-acc2); margin-left: 8px; }
.pm-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 18px; width: min(720px, 100%); justify-content: center; }
.pm-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px 16px; border-radius: 14px; cursor: pointer; background: linear-gradient(180deg, rgba(40, 28, 84, .9), rgba(16, 12, 36, .92)); border: 2px solid var(--pm-line); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: transform .15s, border-color .15s, box-shadow .15s; }
.pm-slot:hover { transform: translateY(-4px); }
.pm-slot.on { border-color: var(--pm-acc); box-shadow: 0 0 0 2px rgba(255, 79, 163, .35), 0 0 30px rgba(255, 79, 163, .45); }
.pm-slot b { font-size: 16px; }
.pm-slot small { color: var(--pm-acc2); font-size: 12px; }
.pm-slot em { font-style: normal; font-size: 11px; color: var(--pm-dim); }
.pm-ped { width: 150px; height: 170px; display: grid; place-items: center; border-radius: 10px; background: radial-gradient(ellipse at 50% 88%, rgba(255, 209, 102, .35), transparent 55%), rgba(0, 0, 0, .25); }
.pm-ped canvas { image-rendering: pixelated; }
.pm-slot.empty { border-style: dashed; opacity: .8; }
.pm-slot.empty .pm-ped span { font-size: 48px; color: var(--pm-dim); }
.pm-slot.empty:hover { opacity: 1; border-color: var(--pm-acc2); }
.pm-x { position: absolute; top: 8px; right: 8px; border: 0; background: rgba(0, 0, 0, .4); color: #fff; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; opacity: .6; }
.pm-x:hover { opacity: 1; background: #b31b1b; }
.pm-actions { width: min(360px, 100%); display: flex; gap: 10px; }
.pm-chs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; width: min(560px, 100%); }
.pm-ch { background: var(--pm-card); border: 2px solid var(--pm-line); border-radius: 14px; padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: transform .15s, border-color .15s; }
.pm-ch:hover { transform: translateY(-3px); border-color: var(--pm-acc2); box-shadow: 0 0 24px rgba(79, 216, 255, .35); }
.pm-ch b { font-family: var(--pm-px); font-size: 22px; letter-spacing: 2px; }
.pm-bar { height: 10px; border-radius: 6px; background: rgba(0, 0, 0, .45); overflow: hidden; border: 1px solid var(--pm-line); }
.pm-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3ee08f, #7cf6c0); transition: width .6s; }
.pm-bar i.busy { background: linear-gradient(90deg, #ffbe3d, #ffd98a); }
.pm-bar i.full { background: linear-gradient(90deg, #ff4d4d, #ff9a9a); }
.pm-ch small { color: var(--pm-dim); font-size: 12px; }
.pm-modal { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(0, 0, 0, .6); padding: 16px; }
.pm-mcard { width: min(400px, 100%); display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 640px) { .pm-slots { grid-template-columns: 1fr; } .pm-ped { height: 130px; } .pm-ped canvas { height: 130px; width: auto; } }

/* ============================ Guild v9 ============================ */
.g9-emb { image-rendering: pixelated; }
.g9-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; max-height: 190px; overflow: auto; padding: 4px; background: rgba(0, 0, 0, .25); border-radius: 8px; }
.g9-gallery button { border: 2px solid transparent; background: rgba(255, 255, 255, .04); border-radius: 8px; padding: 3px; cursor: pointer; }
.g9-gallery button.on { border-color: var(--pm-gold); box-shadow: 0 0 10px rgba(255, 209, 102, .6); }
.g9-gallery img { width: 38px; height: 38px; display: block; image-rendering: pixelated; }
.g9-head { display: flex; gap: 12px; align-items: center; }
.g9-head img { width: 64px; height: 64px; }
.g9-xp { height: 8px; border-radius: 5px; background: rgba(0, 0, 0, .4); overflow: hidden; margin: 4px 0; }
.g9-xp i { display: block; height: 100%; background: linear-gradient(90deg, #ffd166, #ff8f3d); }
.g9-tree { display: grid; gap: 10px; }
.g9-tier { border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; padding: 8px; }
.g9-tier.lock { opacity: .5; }
.g9-tier > b { font-size: 12px; color: var(--pm-gold); }
.g9-skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 6px; }
.g9-sk { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; padding: 6px 8px; font-size: 12px; }
.g9-sk.max { border-color: #ffd166; }
.g9-sk .ic { font-size: 18px; }
.g9-sk .lv { float: right; color: #7cf6c0; font-weight: 700; }
.g9-sk p { margin: 2px 0 4px; color: #bbb; font-size: 11px; min-height: 26px; }

/* ============================ Daily 14 ============================ */
.d14-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.d14 { position: relative; border-radius: 10px; padding: 6px 4px; text-align: center; background: rgba(255, 255, 255, .05); border: 2px solid rgba(255, 255, 255, .1); font-size: 11px; min-height: 76px; }
.d14 .n { font-weight: 800; font-size: 11px; color: #aaa; }
.d14 .ic { width: 30px; height: 30px; margin: 3px auto; display: block; image-rendering: pixelated; }
.d14.big { background: linear-gradient(180deg, rgba(255, 209, 102, .18), rgba(255, 79, 163, .12)); border-color: rgba(255, 209, 102, .5); }
.d14.got { opacity: .45; }
.d14.got::after { content: "✔"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; color: #7cf6c0; text-shadow: 0 0 8px #000; }
.d14.today { border-color: #ff4fa3; box-shadow: 0 0 14px rgba(255, 79, 163, .6); animation: pmPulse 1.2s infinite; }
@keyframes pmPulse { 50% { box-shadow: 0 0 4px rgba(255, 79, 163, .3); } }

/* ============================ Weather HUD ============================ */
#wx-hud { position: absolute; top: 118px; right: 12px; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: auto; }
#wx-hud .wx-pill { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; background: rgba(10, 8, 26, .72); border: 1px solid rgba(255, 255, 255, .15); font-size: 12px; color: #fff; cursor: help; }
#wx-hud .wx-buff { background: linear-gradient(90deg, rgba(255, 209, 102, .3), rgba(255, 79, 163, .25)); border-color: rgba(255, 209, 102, .6); animation: pmPulse 2s infinite; }
#wx-hud .wx-t { font-variant-numeric: tabular-nums; color: #ffd166; }

/* ============================ Feedback / Community ============================ */
.fb-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-cats button.on { background: #ff4fa3; color: #fff; }
.fb-ta { width: 100%; min-height: 110px; box-sizing: border-box; border-radius: 8px; padding: 8px; background: rgba(0, 0, 0, .35); color: #fff; border: 1px solid rgba(255, 255, 255, .2); font: inherit; resize: vertical; }
.fb-shot { max-width: 100%; max-height: 120px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .2); margin-top: 6px; }
.cm-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.discord { background: #5865f2 !important; color: #fff !important; }
#pm-wiki { position: fixed; inset: 0; z-index: 9400; background: rgba(0, 0, 0, .75); display: flex; flex-direction: column; padding: 16px; box-sizing: border-box; }
#pm-wiki iframe { flex: 1; border: 2px solid rgba(255, 255, 255, .2); border-radius: 12px; background: #0b0918; width: 100%; }
#pm-wiki .bar { display: flex; justify-content: space-between; align-items: center; color: #fff; margin-bottom: 8px; font-weight: 700; }
.gfx-seg { display: flex; gap: 6px; }
.gfx-seg button.on { background: linear-gradient(180deg, #ff6bb5, #d6307f) !important; color: #fff !important; }
#pm-auth.ingame { background: rgba(0, 0, 0, .55); }
#pm-auth.ingame .pm-bg, #pm-auth.ingame .pm-foot { display: none; }

/* v143: แบรนด์ Pixel F — ธีมสไลม์เขียว (โลโก้แบบที่ 9) */
.pm-logo .px { text-shadow: 4px 4px 0 #281030, 0 0 24px rgba(124, 179, 66, .55); }
.pm-logo .m { color: #9ccc65; text-shadow: 4px 4px 0 #281030, 0 0 30px rgba(124, 179, 66, 1); }
.pm-logo .pm-slime { height: .9em; font-size: clamp(38px, 8vw, 78px); image-rendering: pixelated; margin-left: 12px; vertical-align: -4px; animation: pmBob 2.2s ease-in-out infinite; animation-delay: -.6s; filter: drop-shadow(0 0 10px rgba(124,179,66,.7)); }
.pm-top .pm-logo .pm-slime { font-size: 34px; }
.pm-logo small { color: #c5e1a5; }
