/* Livecode24 member system: header button + member pages, same palette as style.css */
.mem-btn { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-family: var(--hfont); font-weight: 700; font-size: 15px; color: var(--yellow); border: 2px solid var(--yellow); border-radius: 999px; padding: 6px 10px; white-space: nowrap; transition: background .15s, color .15s; }
.mem-btn svg { width: 20px; height: 20px; flex: none; }
.mem-btn span { display: none; }
.mem-btn:hover, .mem-btn.on { background: var(--yellow); color: #1b1240; }
.mem-btn + .cta { margin-left: 0 !important; }
@media (min-width: 640px) { .mem-btn { padding: 6px 14px; } .mem-btn span { display: inline; } }
@media (min-width: 960px) { .mem-btn { margin-left: 8px; } }
.mnav a.mnav-mem { color: var(--yellow); }

/* pages */
.mpage .head .wrap { gap: 10px; }
.mback { margin-left: auto; font-family: var(--hfont); font-weight: 500; font-size: 15px; color: var(--muted); }
.mback:hover { color: var(--yellow); }
.mpage .mem-btn { margin-left: 4px; }
.mmain { position: relative; z-index: 1; min-height: calc(100vh - 60px); padding: 100px 16px 40px; display: flex; justify-content: center; align-items: flex-start; }
.mcard { width: 100%; max-width: 440px; background: var(--card); border: 2px solid var(--line); border-top: 4px solid var(--yellow); border-radius: 22px; padding: 28px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.mcard.wide { max-width: 1100px; }
.mtitle { font-size: clamp(24px, 6vw, 30px); font-weight: 900; text-align: center; }
.msub { color: var(--muted); text-align: center; margin: 8px 0 20px; font-size: 16px; }
.mform { display: grid; gap: 14px; margin-top: 6px; }
.mform label { display: grid; gap: 6px; font-family: var(--hfont); font-weight: 500; font-size: 15px; }
.mform label small { color: var(--muted); font-weight: 400; }
.mform input { width: 100%; font: inherit; font-family: "Sarabun", system-ui, sans-serif; font-size: 17px; color: #fff; background: rgba(6,5,13,.7); border: 2px solid var(--line); border-radius: 12px; padding: 11px 14px; outline: none; }
.mform input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,210,63,.18); }
.mfull { width: 100%; margin-top: 4px; }
.mlink { color: var(--yellow); font-size: 15px; justify-self: end; text-decoration: underline; text-underline-offset: 3px; }
.merr { background: rgba(255,59,59,.14); border: 1px solid rgba(255,59,59,.5); color: #ffb3b3; border-radius: 10px; padding: 8px 12px; font-size: 15px; }
.mok { background: rgba(6,199,85,.14); border: 1px solid rgba(6,199,85,.5); color: #a6f5c6; border-radius: 10px; padding: 8px 12px; font-size: 15px; }
.mnote { text-align: center; color: var(--muted); font-size: 15px; margin-top: 18px; }
.mnote a { color: var(--yellow); }
.mtabs { display: grid; grid-template-columns: 1fr 1fr; background: rgba(6,5,13,.6); border: 2px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.mtabs a { text-align: center; font-family: var(--hfont); font-weight: 700; padding: 8px; border-radius: 999px; color: var(--muted); }
.mtabs a.on { background: var(--yellow); color: #1b1240; }
.gwrap { display: flex; justify-content: center; min-height: 44px; }
.mor { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 16px 0 14px; }
.mor::before, .mor::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.mavatar { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; background: var(--yellow); color: #1b1240; display: grid; place-items: center; font-family: var(--hfont); font-weight: 900; font-size: 34px; box-shadow: 0 0 0 5px rgba(255,210,63,.2); }
.mdl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 20px 0; background: rgba(6,5,13,.5); border-radius: 14px; padding: 16px; }
.mdl dt { color: var(--muted); font-family: var(--hfont); }
.mdl dd { margin: 0; word-break: break-word; }
.mdet { border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; }
.mdet summary { cursor: pointer; font-family: var(--hfont); font-weight: 500; }
.mdet[open] summary { margin-bottom: 10px; color: var(--yellow); }
.mrow { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.mrow .btn { flex: 1 1 160px; }
.mstats { display: flex; gap: 12px; margin: 18px 0; }
.mstats div { flex: 1; background: rgba(6,5,13,.5); border-radius: 14px; padding: 14px; text-align: center; }
.mstats b { display: block; font-family: var(--hfont); font-size: 30px; color: var(--yellow); }
.mstats span { color: var(--muted); font-size: 14px; }
.msearch { display: flex; gap: 8px; margin-bottom: 14px; }
.msearch input { flex: 1; font: inherit; color: #fff; background: rgba(6,5,13,.7); border: 2px solid var(--line); border-radius: 999px; padding: 9px 16px; }
.msearch .btn { padding: 8px 18px; font-size: 15px; }
.mtable { overflow-x: auto; border: 2px solid var(--line); border-radius: 14px; }
.mtable table { width: 100%; border-collapse: collapse; font-size: 15px; }
.mtable th, .mtable td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.mtable th { font-family: var(--hfont); color: var(--yellow); background: rgba(6,5,13,.6); }
.tag { background: var(--red); color: #fff; font-size: 12px; border-radius: 6px; padding: 1px 6px; }
.mdel { background: none; border: 1px solid rgba(255,59,59,.6); color: #ff9c9c; border-radius: 8px; padding: 3px 10px; cursor: pointer; font: inherit; font-size: 13px; }
.mfoot { position: relative; z-index: 1; text-align: center; color: var(--muted); font-size: 14px; padding: 10px 0 24px; }
.head .cta { white-space: nowrap; }
@media (max-width: 420px) { .head .wrap { gap: 8px; } .head .cta { padding: 7px 13px; } .head .logo { font-size: 18px; } .head .logo svg, .head .logo .logo-mark, .head .logo img { width: 32px; height: 32px; } .mem-btn { padding: 5px 8px; } }

/* shop: account / order / admin (2026-11-17) */
.mcard.mid { max-width: 760px; }
.mh2 { font-family: var(--hfont); font-size: 20px; font-weight: 800; color: var(--yellow); margin: 26px 0 12px; }
.mmuted { color: var(--muted); font-size: 15px; }
.mlabel { display: block; color: var(--muted); font-size: 14px; }
.mbox { background: rgba(6,5,13,.55); border: 2px solid var(--line); border-radius: 16px; padding: 16px; margin: 18px 0 6px; }
.mbox-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.mexp { font-family: var(--hfont); font-size: 22px; }
.mwarn { background: rgba(255,210,63,.12); border: 1px solid rgba(255,210,63,.55); color: #ffe48a; border-radius: 10px; padding: 8px 12px; font-size: 15px; margin-top: 12px; }
.mthemes { display: grid; gap: 10px; }
.mtheme { display: flex; gap: 12px; align-items: center; background: rgba(6,5,13,.45); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.mtheme img { width: 54px; height: 96px; object-fit: cover; border-radius: 8px; flex: none; }
.mlinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mlinks .btn, .btn.mini { padding: 6px 14px; font-size: 14px; }
.mbuy { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.mbuy .btn { flex: 1 1 150px; text-align: center; }
.mbadge { display: inline-block; font-size: 13px; border-radius: 999px; padding: 2px 10px; background: rgba(255,255,255,.12); white-space: nowrap; }
.mbadge.s-slip_uploaded { background: #ffd23f; color: #1b1240; }
.mbadge.s-approved { background: #2fbf71; color: #fff; }
.mbadge.s-rejected { background: var(--red); color: #fff; }
.mcount { font-family: var(--hfont); }
.mpicks { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.mpick { position: relative; display: block !important; cursor: pointer; background: rgba(6,5,13,.5); border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.mpick input { position: absolute; top: 8px; left: 8px; width: 20px !important; height: 20px; accent-color: #ffd23f; }
.mpick img { width: 100%; aspect-ratio: 9/12; object-fit: cover; display: block; }
.mpick span { display: block; padding: 6px 8px; font-size: 14px; line-height: 1.3; }
.mpick span small { display: block; color: var(--muted); }
.mpick.on { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,210,63,.25); }
.mpick.owned { opacity: .45; cursor: not-allowed; }
.mform textarea, .mform select, .msearch select { width: 100%; font: inherit; font-family: "Sarabun", system-ui, sans-serif; font-size: 16px; color: #fff; background: rgba(6,5,13,.7); border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.msearch select { flex: 1; border-radius: 999px; }
.mpay { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: center; margin: 18px 0; }
.mqr { background: #fff; border-radius: 14px; padding: 8px; width: 230px; }
.mqr svg { display: block; width: 100%; height: auto; }
.mqr code { color: #000; word-break: break-all; font-size: 11px; }
.mpp { text-align: center; line-height: 1.7; }
.mamt { font-family: var(--hfont); font-size: 26px; color: var(--yellow); }
.mbank { background: rgba(6,5,13,.55); border: 1px dashed var(--line); border-radius: 14px; padding: 12px 16px; text-align: center; line-height: 1.8; margin-bottom: 14px; }
.macc { font-family: var(--hfont); font-size: 20px; color: var(--yellow); letter-spacing: .5px; }
.mslip img { max-width: 220px; border-radius: 10px; display: block; margin: 10px auto; }
.mslipbig { max-width: 100%; max-height: 80vh; border-radius: 12px; display: block; }
.mtabs.adm { display: flex; flex-wrap: wrap; border-radius: 18px; margin: 16px 0 18px; }
.mtabs.adm a { flex: 1 1 100px; }
.mstats.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.mstat { background: rgba(6,5,13,.5); border-radius: 14px; padding: 14px; text-align: center; color: inherit; }
.mstat b { display: block; font-family: var(--hfont); font-size: 28px; color: var(--yellow); }
.mstat span { color: var(--muted); font-size: 14px; }
.mtable tr.off td { opacity: .5; }
.mtable td.wrapc { white-space: normal; min-width: 160px; }
.mtable small { color: var(--muted); }
.mthumb { width: 36px; height: 64px; object-fit: cover; border-radius: 6px; }
.mcheck { display: flex !important; gap: 8px; align-items: center; font-family: "Sarabun", system-ui, sans-serif !important; }
.mcheck input { width: 18px !important; height: 18px; accent-color: #ffd23f; }
.mfs { border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.mfs legend { font-family: var(--hfont); padding: 0 6px; }
.mchecks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 14px; }
.mform.narrow { max-width: 560px; }
.madm2 { display: grid; gap: 20px; }
@media (min-width: 860px) { .madm2 { grid-template-columns: 1.2fr 1fr; } }
/* member code + kit licenses */
.mcode { margin-top: -6px; }
.mcode b { font-family: Kanit, sans-serif; letter-spacing: .5px; color: var(--yellow, #ffd23f); }
.mlic { margin: 4px 0 6px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mlic .btn.mini { padding: 4px 10px; font-size: 13px; }
td .btn.mini + .btn.mini { margin-left: 4px; }
/* readable buttons + always-open sections */
button.btn { font: inherit; cursor: pointer; }
button.btn-outline { background: transparent; }
.mdet-h { font-family: var(--hfont); font-weight: 600; font-size: 1.05rem; color: var(--yellow); margin: 0 0 10px; }
/* theme image zoom */
.mpick { position: relative; }
.mpick img { cursor: zoom-in; }
.mzoom { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--yellow); background: rgba(10,8,30,.75); color: #fff; font-size: 16px; cursor: pointer; z-index: 2; }
.mlightbox { position: fixed; inset: 0; background: rgba(5,4,15,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; padding: 20px; cursor: zoom-out; }
.mlightbox img { max-width: 100%; max-height: 85vh; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.mlightbox p { color: var(--yellow); font-family: var(--hfont); font-size: 1.2rem; margin: 12px 0 0; }
.mlightbox .mlb-x { position: absolute; top: 14px; right: 18px; background: var(--yellow); color: #1b1240; border: 0; border-radius: 50%; width: 42px; height: 42px; font-size: 22px; font-weight: 700; cursor: pointer; }

/* custom-order form */
.mpick.mnew { display: flex !important; align-items: center; justify-content: center; text-align: center; min-height: 100%; border-style: dashed; background: rgba(255,210,63,.06); }
.mpick.mnew span { font-family: var(--hfont); font-weight: 700; color: var(--yellow); padding: 22px 8px; font-size: 15px; }
.mlinkbox { display: grid; gap: 8px; }
.mlinkbox > span { font-family: var(--hfont); font-weight: 500; font-size: 15px; }
.mlinkbox small { color: var(--muted); font-weight: 400; }
.mlinkbox .btn { justify-self: start; }
.mfilelist { font-size: 14px; color: var(--muted); margin: 0; }
.mfilelist.merr { color: #ffb3b3; }
.mattach { display: grid; gap: 10px; }
.mattach-item { display: grid; gap: 4px; }
.mattach-item img, .mattach-item video { max-width: 100%; max-height: 240px; border-radius: 10px; background: #000; }
.mdl dd.mattach { margin-top: 4px; }

.minstall { margin: 22px 0 8px; padding: 16px 18px; border: 1px solid rgba(255,210,63,.28); border-radius: 16px; background: rgba(255,210,63,.06); }
.minstall .msteps { margin: 10px 0 12px; padding-left: 1.2em; }
.minstall .msteps li { margin: 6px 0; }
.mvip { margin: 0 0 28px; }
.mvip-grid { display: grid; gap: 16px; margin-top: 12px; }
@media (min-width: 720px) { .mvip-grid { grid-template-columns: 1fr 1fr; } }
.mvip-card { background: #16122c; border: 1px solid rgba(255,210,63,.3); border-radius: 16px; overflow: hidden; }
.mvip-card video, .mvip-card img { display: block; width: 100%; aspect-ratio: 9/16; object-fit: cover; background: #0b0818; max-height: 420px; }
.mvip-card .body { padding: 12px 14px 16px; }
.mvip-card .tag { display: inline-block; background: #ffd23f; color: #1b1240; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; }
.mvip-card h3 { margin: 0 0 4px; font-family: var(--hfont, Kanit, sans-serif); font-size: 20px; }
.mvip-card p { margin: 0; color: var(--muted, #b9b0d8); font-size: 14px; }

/* play-preview button on buy/order theme cards */
.mplay { position: absolute; left: 50%; top: auto; bottom: 36px; transform: translateX(-50%); width: 36px; height: 36px; min-width: 36px; min-height: 36px; padding: 0; border-radius: 50%; border: 2px solid var(--yellow); background: rgba(10,8,30,.78); color: #ffd23f; font-size: 15px; line-height: 32px; text-align: center; cursor: pointer; z-index: 3; -webkit-tap-highlight-color: transparent; }
.mplay:hover, .mplay:focus { background: #ffd23f; color: #1b1240; }
.mlightbox video { max-width: min(100%, 420px); max-height: 85vh; border-radius: 14px; background: #000; box-shadow: 0 10px 40px rgba(0,0,0,.6); }

/* admin back-office: filters + action buttons, mobile wrap */
.msearch { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 0 0 14px; }
.msearch label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.msearch input, .msearch select { min-height: 40px; }
.mactions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mtable td.mactions { white-space: normal; min-width: 200px; }
.mtabs.adm { flex-wrap: wrap; }
@media (max-width: 720px) {
  .mstats.grid { grid-template-columns: 1fr 1fr; }
  .madm2 { display: block; }
  .msearch input[name="q"] { width: 100%; }
}
