/* Lucky Gate — Lucky Playland style. Mobile-first phone column, pastel pink. */
:root {
  --bg: #fff5fa;
  --bg-2: #f3ecff;
  --ink: #3a2448;
  --muted: #8a6a94;
  --card: #ffffff;
  --line: #f1dcea;
  --pink: #ff7ab0;
  --pink-2: #ff4f93;
  --peach: #ffb36b;
  --sun: #ffd25a;
  --sky: #6ec4ff;
  --violet: #9b7bff;
  --mint: #5ed8b0;
  --shadow: 0 6px 18px rgba(170, 70, 130, 0.14);
  --radius: 22px;
  --tab-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --col: 480px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: Kanit, "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 180, 215, 0.6), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(190, 170, 255, 0.5), transparent 40%),
    #fde9f3;
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 10px; }

.app {
  position: relative;
  max-width: var(--col);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 16px);
  box-shadow: 0 0 60px rgba(170, 70, 130, 0.15);
  overflow-x: clip;
}

/* ---------------------------------------------------------- install bar */
.install-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px 8px 6px; background: #fff; border-bottom: 1px solid var(--line); }
.install-bar[hidden] { display: none; }
.ib-close { flex: none; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); font-size: 16px; }
.ib-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.ib-icon { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.ib-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ib-text b { font-size: 14px; letter-spacing: 0.3px; }
.ib-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-btn { padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--pink), var(--violet)); box-shadow: 0 3px 10px rgba(155, 123, 255, 0.4); white-space: nowrap; }

/* ---------------------------------------------------------- header */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  height: 60px; padding: 0 10px;
  background: linear-gradient(135deg, #ff8fbe, #b48cff);
  color: #fff;
  box-shadow: 0 4px 14px rgba(180, 90, 160, 0.25);
}
.admin-bar .topbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .topbar { top: 46px; } }
@media (max-width: 600px) { .admin-bar .topbar { top: 0; } }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:active { background: rgba(255, 255, 255, 0.2); }
.logo { justify-self: center; display: flex; align-items: center; gap: 6px; }
.logo-img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 0 rgba(90, 30, 80, 0.3)); }
.logo-text { display: flex; flex-direction: column; line-height: 0.95; }
.logo-text b { font-size: 21px; font-weight: 700; letter-spacing: 0.5px; text-shadow: 0 2px 0 rgba(120, 40, 110, 0.35); }
.logo-text i { font-style: normal; font-size: 13px; font-weight: 500; letter-spacing: 2px; opacity: 0.95; }
.top-right { display: flex; justify-content: flex-end; }
.pill { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.25); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
.pill svg { width: 20px; height: 20px; }

/* ---------------------------------------------------------- marquee */
.marquee { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; }
.mq-icon { flex: none; width: 20px; height: 20px; color: var(--pink-2); }
.mq-icon svg { width: 20px; height: 20px; }
.mq-track { flex: 1; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.mq-track span { display: inline-block; padding-left: 100%; font-size: 14px; animation: marquee 24s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------------------------------------------------------- category bar */
.catbar {
  position: sticky; top: 60px; z-index: 19;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px;
  padding: 7px 8px; background: rgba(255, 245, 250, 0.96);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.admin-bar .catbar { top: 92px; }
@media (max-width: 782px) { .admin-bar .catbar { top: 106px; } }
@media (max-width: 600px) { .admin-bar .catbar { top: 60px; } }
.cat {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 46px; padding: 4px 2px; border-radius: 14px; background: #fff;
  box-shadow: inset 0 0 0 2px var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.1; text-align: center;
}
.cat.on { background: linear-gradient(135deg, #ffb3d1, #b99bff); color: #fff; box-shadow: 0 4px 10px rgba(155, 123, 255, 0.35); }
.cat-ico { width: 24px; height: 24px; object-fit: contain; }
.cat em { position: absolute; top: -7px; right: 4px; padding: 0 6px; border-radius: 999px; background: #ff4f6d; color: #fff; font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: 0.4px; line-height: 15px; box-shadow: 0 2px 6px rgba(255, 79, 109, 0.4); }

/* ---------------------------------------------------------- top banner + hero */
.top-banner { display: block; margin: 12px 14px 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.top-banner img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero { position: relative; margin: 12px 14px 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; aspect-ratio: 16 / 9; scroll-snap-align: start; overflow: hidden; color: #fff; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 6s ease-out; }
.slide.cur img { transform: scale(1.05); }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(40, 10, 50, 0.55), transparent 55%); }
.cap { position: absolute; left: 14px; bottom: 26px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cap .tag { padding: 2px 9px; border-radius: 8px; background: rgba(255, 255, 255, 0.28); font-size: 11px; font-weight: 700; letter-spacing: 0.5px; backdrop-filter: blur(4px); }
.cap b { font-size: clamp(19px, 5.4vw, 26px); line-height: 1.1; font-weight: 700; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.cap .cta { padding: 6px 16px; border-radius: 999px; background: #fff; color: var(--pink-2); font-weight: 600; font-size: 14px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); }
.dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; z-index: 3; pointer-events: none; }
.dot { pointer-events: auto; width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.55); transition: width 0.25s, background 0.25s; }
.dot.on { width: 22px; background: #fff; }

/* ---------------------------------------------------------- actions */
.actions { display: grid; gap: 10px; padding: 14px 18px 4px; }
.guest { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 6px 12px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); font-size: 13px; color: var(--muted); }
.guest b { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--bg-2); color: var(--violet); font-weight: 600; }
.guest svg { width: 18px; height: 18px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 10px 18px; border-radius: 999px;
  font-size: 18px; font-weight: 600; color: #fff; text-align: center;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.1), 0 8px 18px rgba(170, 70, 130, 0.16);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1); }
.btn svg { width: 22px; height: 22px; }
.btn-login { background: linear-gradient(135deg, #ff8a7a, var(--pink-2)); }
.btn-pattern { background: #fff; color: var(--ink); box-shadow: 0 5px 0 #f1dcea, 0 8px 18px rgba(170, 70, 130, 0.12); }
.btn-register { background: linear-gradient(135deg, var(--sun), var(--peach)); color: #5a2a00; }
.btn-demo { background: linear-gradient(135deg, #8ad8ff, var(--sky)); }
.btn-promo { background: linear-gradient(135deg, #b8a0ff, var(--violet)); }
.btn-a2hs { background: #fff; color: var(--ink); font-size: 16px; box-shadow: 0 5px 0 #f1dcea, 0 8px 18px rgba(170, 70, 130, 0.12); }
.btn-ghost { background: transparent; color: var(--muted); box-shadow: none; min-height: 44px; font-size: 16px; }

/* ---------------------------------------------------------- blocks */
.block { padding: 22px 14px 0; }
.block-title { display: flex; align-items: center; gap: 8px; margin: 0 4px 12px; font-size: 20px; font-weight: 700; }
.sec-ico { width: 28px; height: 28px; object-fit: contain; }
.hot-badge { padding: 2px 10px; border-radius: 999px; background: linear-gradient(135deg, #ff7a5a, var(--pink-2)); color: #fff; font-size: 13px; letter-spacing: 1px; }
.hot-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 4px 10px; scrollbar-width: none; }
.hot-row::-webkit-scrollbar { display: none; }
.hot-card { flex: 0 0 72%; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.hot-card .thumb { aspect-ratio: 16 / 9; }
.hc-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.hc-body b { display: block; font-size: 16px; }
.hc-body small { display: block; color: var(--muted); font-size: 12px; }
.hc-body .mini { padding: 0 16px; }

/* feature blocks (fish / space / cards) */
.feat-hero { position: relative; display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 8 / 3; background: #123; }
.feat-cards .feat-hero { aspect-ratio: 16 / 9; }
.feat-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.feat-hero:hover .feat-bg { transform: scale(1.04); }
.feat-txt { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 12px 14px; width: 62%; color: #fff; }
.feat-txt::before { content: ""; position: absolute; inset: 0 -40% 0 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 30, 70, 0.7), transparent); }
.feat-space .feat-txt::before { background: linear-gradient(90deg, rgba(20, 8, 50, 0.8), transparent); }
.feat-logo { width: 100%; max-height: 52%; object-fit: contain; object-position: left center; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35)); }
.feat-sub { font-size: 12px; line-height: 1.35; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.feat-play { padding: 5px 16px; border-radius: 999px; background: linear-gradient(135deg, #ffe27a, #ffb32e); color: #5a2a00; font-weight: 700; font-size: 14px; box-shadow: 0 3px 0 #d98a12, 0 6px 12px rgba(0, 0, 0, 0.25); }
.feat-txt.bar { inset: auto 0 0 0; width: 100%; flex-direction: row; align-items: center; justify-content: space-between; padding: 10px 12px; background: linear-gradient(0deg, rgba(10, 40, 25, 0.85), rgba(10, 40, 25, 0)); }
.feat-txt.bar::before { display: none; }
.feat-txt.bar .feat-sub { flex: 1; }
.feat-maps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.feat-map { position: relative; display: block; aspect-ratio: 1 / 0.8; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); color: #fff; }
.feat-map.plain { aspect-ratio: 1; }
.feat-map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.feat-map:hover img { transform: scale(1.06); }
.feat-map::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent 55%); }
.feat-map.plain::after { display: none; }
.feat-map b, .feat-map small { position: absolute; left: 8px; z-index: 1; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.feat-map b { bottom: 18px; font-size: 13px; }
.feat-map small { bottom: 5px; font-size: 10.5px; opacity: 0.9; }
.feat-note { margin: 8px 4px 0; font-size: 12px; color: var(--muted); }

/* filters + grid */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 0 4px 12px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 16px; border-radius: 999px; background: #fff; color: var(--muted); font-size: 14px; font-weight: 500; box-shadow: inset 0 0 0 2px var(--line); }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card { position: relative; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; animation: pop 0.3s ease-out; }
.card[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: scale(0.96); } }
.thumb { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: linear-gradient(160deg, #ffc6de, #b48cff); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.card:hover .thumb img, .hot-card:hover .thumb img { transform: scale(1.06); }
.badge { position: absolute; right: 8px; top: 8px; z-index: 2; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; color: #fff; background: var(--violet); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
.badge.b-new { background: var(--mint); }
.badge.b-hot { background: #ff6a5a; }
.badge.b-epic { background: #e0702a; }
.badge.b-free, .badge.b-pick { background: var(--sky); }
.badge.b-lucky { background: #f2b21a; }
.card-body { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 15px; font-weight: 600; line-height: 1.2; }
.card-title small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.players { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.players i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(94, 216, 176, 0.25); animation: blink 1.6s infinite; }
.players b { color: var(--ink); font-weight: 600; }
@keyframes blink { 50% { opacity: 0.4; } }
.card-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto; }
.card-btns .mini:only-child { grid-column: 1 / -1; }
.mini { min-height: 36px; border-radius: 999px; font-size: 13px; font-weight: 600; display: grid; place-items: center; }
.mini.play { background: linear-gradient(135deg, var(--pink), var(--pink-2)); color: #fff; }
.mini.try { background: #fff; color: var(--pink-2); box-shadow: inset 0 0 0 2px #ffd0e3; }

/* promos */
.promo-list { display: grid; gap: 12px; }
.promo { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.p-art { width: 70px; height: 70px; border-radius: 16px; display: grid; place-items: center; overflow: hidden; }
.p-art img { width: 54px; height: 54px; object-fit: contain; animation: bob 1.8s ease-in-out infinite; }
.p-txt em { display: inline-block; padding: 0 8px; margin-bottom: 2px; border-radius: 6px; background: #ffe3ef; color: var(--pink-2); font-style: normal; font-size: 11px; font-weight: 600; }
.p-txt b { display: block; font-size: 15px; }
.p-txt small { color: var(--muted); font-size: 12px; line-height: 1.3; display: block; }
.p-go { padding: 8px 12px; border-radius: 999px; background: var(--bg-2); color: var(--violet); font-size: 13px; font-weight: 600; white-space: nowrap; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* footer */
.foot { margin-top: 28px; padding: 22px 18px 8px; text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.foot p { margin-top: 8px; }
.foot-logo { font-size: 20px; color: var(--ink); font-weight: 600; }
.foot-logo b { color: var(--pink-2); }
.age-b { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 5px; border-radius: 6px; background: #ff5a6a; color: #fff; font-weight: 700; font-size: 12px; }
.foot a { color: var(--pink-2); text-decoration: underline; }
.copy { opacity: 0.7; }

/* ---------------------------------------------------------- tab bar */
.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 30;
  width: 100%; max-width: var(--col); height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -6px 20px rgba(170, 70, 130, 0.14);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; color: var(--muted); }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--pink-2); font-weight: 600; }
.mid-ball { display: grid; place-items: center; width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--violet)); box-shadow: 0 0 0 5px #fff, 0 8px 16px rgba(155, 123, 255, 0.45); }
.mid-ball img { width: 40px; height: 40px; object-fit: contain; animation: bob 1.4s ease-in-out infinite; }

/* ---------------------------------------------------------- floating helpers */
.side-tab { position: fixed; right: max(0px, calc(50% - var(--col) / 2)); top: 34%; z-index: 25; writing-mode: vertical-rl; padding: 14px 8px; border-radius: 14px 0 0 14px; background: linear-gradient(180deg, var(--peach), var(--pink-2)); color: #fff; font-size: 14px; font-weight: 600; box-shadow: -3px 4px 12px rgba(170, 70, 130, 0.25); }
.float-badge { position: fixed; right: calc(max(0px, calc(50% - var(--col) / 2)) + 12px); bottom: calc(var(--tab-h) + var(--safe-b) + 84px); z-index: 25; }
.float-badge[hidden] { display: none; }
.fb-body { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(135deg, #fff3a0, var(--peach)); box-shadow: 0 6px 16px rgba(255, 140, 60, 0.4); animation: wiggle 2.4s ease-in-out infinite; }
.fb-body img { width: 48px; height: 48px; object-fit: contain; }
.fb-body b { position: absolute; bottom: -6px; padding: 1px 8px; border-radius: 999px; background: var(--pink-2); color: #fff; font-size: 11px; }
.fb-close { position: absolute; right: -6px; top: -6px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: rgba(58, 36, 72, 0.6); color: #fff; font-size: 14px; line-height: 1; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-8deg); } 90% { transform: rotate(8deg); } 95% { transform: rotate(-4deg); } }
.support { position: fixed; right: calc(max(0px, calc(50% - var(--col) / 2)) + 14px); bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 25; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--peach), var(--pink-2)); box-shadow: 0 6px 16px rgba(255, 80, 140, 0.45); }
.support svg { width: 26px; height: 26px; }
.chat-pop { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 80px); transform: translateX(-50%); z-index: 26; width: min(92vw, 420px); padding: 16px; border-radius: 20px; background: #fff; box-shadow: 0 12px 30px rgba(90, 30, 80, 0.25); animation: rise 0.25s ease-out; }
.chat-pop[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } }
.cp-x { position: absolute; right: 10px; top: 8px; font-size: 22px; color: var(--muted); }
.cp-row { display: flex; gap: 10px; align-items: flex-start; padding-right: 18px; }
.cp-ava { width: 44px; height: 44px; border-radius: 50%; background: #ffe3ef; object-fit: cover; flex: none; }
.cp-row b { font-size: 15px; }
.cp-row p { font-size: 14px; color: var(--ink); margin-top: 2px; }
.cp-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.cp-ghost, .cp-main { min-height: 42px; border-radius: 12px; font-weight: 600; display: grid; place-items: center; }
.cp-ghost { box-shadow: inset 0 0 0 2px var(--line); color: var(--muted); }
.cp-main { background: linear-gradient(135deg, var(--pink), var(--violet)); color: #fff; }

/* drawer */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(58, 36, 72, 0.4); }
.scrim[hidden] { display: none; }
.drawer { position: fixed; top: 0; bottom: 0; left: max(0px, calc(50% - var(--col) / 2)); z-index: 41; width: min(80vw, 320px); background: #fff; transform: translateX(-110%); transition: transform 0.25s; overflow-y: auto; box-shadow: 8px 0 30px rgba(90, 30, 80, 0.2); }
.drawer.open { transform: none; }
.dr-head { display: flex; align-items: center; gap: 10px; padding: 16px 12px 14px 16px; background: linear-gradient(135deg, #ff8fbe, #b48cff); color: #fff; }
.dr-head > div { flex: 1; }
.dr-head b { display: block; font-size: 17px; }
.dr-head small { opacity: 0.9; font-size: 12px; }
.dr-links { display: flex; flex-direction: column; padding: 8px; }
.dr-links li { list-style: none; }
.dr-links a { display: block; padding: 13px 14px; border-radius: 14px; font-size: 16px; font-weight: 500; }
.dr-links a:hover, .dr-links a:active { background: var(--bg); color: var(--pink-2); }

/* welcome modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(58, 36, 72, 0.5); animation: fade 0.2s; }
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.welcome { position: relative; width: min(100%, 360px); padding: 0 18px 14px; border-radius: 26px; background: #fff; text-align: center; overflow: hidden; box-shadow: 0 20px 50px rgba(90, 30, 80, 0.35); animation: zoom 0.25s ease-out; }
@keyframes zoom { from { transform: scale(0.9); opacity: 0; } }
.wl-art { display: block; margin: 0 -18px 12px; }
.wl-art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.welcome h3 { font-size: 22px; }
.welcome p { color: var(--muted); margin: 4px 0 14px; font-size: 14px; }
.welcome .btn { width: 100%; }
.sh-x { position: absolute; right: 10px; top: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); font-size: 20px; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--pink-2); }

/* ---------------------------------------------------------- posts & pages */
.page-main { padding: 16px 14px 0; }
.page-h { margin: 4px 4px 14px; }
.entry-card { margin-bottom: 14px; padding: 16px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.entry-thumb img { width: calc(100% + 32px); max-width: none; margin: -16px -16px 12px; height: auto; }
.entry-title { font-size: 20px; line-height: 1.3; margin-bottom: 8px; }
.entry { font-size: 15px; line-height: 1.75; }
.entry p, .entry ul, .entry ol, .entry figure { margin-bottom: 12px; }
.entry ul, .entry ol { padding-left: 22px; }
.entry a { color: var(--pink-2); text-decoration: underline; }
.entry img { height: auto; border-radius: 12px; }
.pager .nav-links { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pager .page-numbers { min-width: 38px; padding: 6px 10px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.pager .current { background: var(--pink-2); color: #fff; }

@media (min-width: 900px) {
  /* wide screens: a soft "phone" frame */
  .app { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
