/* ============ สีและฟอนต์ (เวอร์ชัน 3: ท้องฟ้า สะอาด ตัวหนังสือตรง ใบเชกิ) ============ */
:root {
  color-scheme: light;
  --navy: #1b3768;
  --ink: #26426f;
  --royal: #2f6fc0;
  --royal-d: #245aa3;
  --muted: #6c86ad;
  --line: rgba(47, 111, 192, .16);
  --gold: #d3a548;
  --card: rgba(255, 255, 255, .84);
  --shadow: 0 10px 30px rgba(60, 120, 190, .16);

  /* ค่าจริงถูกใส่จาก common.js (หน้าทดลองฟอนต์เปลี่ยนได้) ภาษาไทยจะตกมาใช้ Prompt เสมอ */
  --f-script: "Allura";
  --f-display: "Poppins";
  --f-body: "Poppins";
  --f-hand: "Mali";
  --f-num: "Poppins";
  --ff-body: var(--f-body), "Prompt", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic UI", system-ui, sans-serif;
  --ff-display: var(--f-display), "Prompt", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic UI", sans-serif;
  --ff-num: var(--f-num), "Prompt", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic UI", sans-serif;
  --ff-script: var(--f-script), var(--f-body), "Prompt", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic UI", sans-serif;
  --ff-hand: var(--f-hand), "Mali", "Prompt", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic UI", sans-serif;

  /* ท้องฟ้าพาสเทล: ฟ้าไล่สี + แต้มชมพู/ม่วงอ่อนๆ + ก้อนเมฆ */
  --sky-bg:
    radial-gradient(60% 26% at 0% 40%, rgba(255, 207, 229, .55), transparent 72%),
    radial-gradient(50% 28% at 100% 14%, rgba(224, 214, 255, .55), transparent 72%),
    radial-gradient(22% 4.5% at 16% 9%, #fff, transparent 100%),
    radial-gradient(20% 5.5% at 28% 7%, #fff, transparent 100%),
    radial-gradient(18% 4% at 38% 10%, rgba(255, 255, 255, .9), transparent 100%),
    radial-gradient(24% 5% at 82% 30%, rgba(255, 255, 255, .95), transparent 100%),
    radial-gradient(20% 6% at 92% 28%, rgba(255, 255, 255, .85), transparent 100%),
    radial-gradient(26% 5% at 12% 58%, rgba(255, 255, 255, .9), transparent 100%),
    radial-gradient(22% 6% at 24% 60%, rgba(255, 255, 255, .8), transparent 100%),
    radial-gradient(30% 6% at 76% 84%, rgba(255, 255, 255, .95), transparent 100%),
    linear-gradient(180deg, #b5d8f7 0%, #d3e8fa 38%, #eaf4fd 72%, #f7fbff 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

body {
  position: relative;
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 15px;
  line-height: 1.55;
  background: #dcecfa;
}
body::before { content: ""; position: fixed; inset: 0; z-index: -2; background: var(--sky-bg); }
/* ลายตารางสก๊อตผืนใหญ่ จางมาก (ค่าเริ่มต้น = ปิด เปิดดูได้ด้วย ?plaid=1 ท้ายลิงก์) */
body::after {
  display: none; content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(90deg, transparent 0 59px, rgba(255, 255, 255, .6) 59px 60px, transparent 60px),
    linear-gradient(0deg, transparent 0 59px, rgba(255, 255, 255, .6) 59px 60px, transparent 60px),
    linear-gradient(90deg, rgba(80, 160, 236, .07) 0 36px, transparent 36px),
    linear-gradient(0deg, rgba(80, 160, 236, .07) 0 36px, transparent 36px);
  background-size: 120px 120px;
  background-position: 38px 38px, 38px 38px, 20px 20px, 20px 20px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
}
html[data-plaid="on"] body::after { display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--royal); outline-offset: 3px; }

.page {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 22px calc(36px + env(safe-area-inset-bottom));
  display: grid;
  gap: 20px;
}

/* ============ ปุ่ม ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 22px;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  font: 600 15px/1.2 var(--ff-body); letter-spacing: .01em;
  color: #fff;
  background: linear-gradient(180deg, #4f93e2, var(--royal));
  box-shadow: 0 6px 16px rgba(47, 111, 192, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .12s, box-shadow .12s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.99); box-shadow: 0 2px 8px rgba(47, 111, 192, .3); }
.btn.soft { color: var(--royal-d); background: rgba(255, 255, 255, .92); box-shadow: 0 4px 14px rgba(60, 120, 190, .18); }
.btn.big { width: 100%; min-height: 50px; font-size: 16px; }
.btn.mini { min-height: 36px; padding: 5px 14px; font-size: 13px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ============ หัวเว็บ: รูปเอรินจางลงกลมกลืนกับท้องฟ้า + ของตกแต่งจากโปสเตอร์ ============ */
.top-lace {
  position: absolute; left: 0; right: 0; top: 0; z-index: 3; height: 26px; pointer-events: none;
  background:
    linear-gradient(#fff, #fff) 0 0 / 100% 8px no-repeat,
    radial-gradient(circle at 50% 8px, #fff 10px, transparent 10.6px) 0 0 / 22px 26px repeat-x;
  filter: drop-shadow(0 2px 3px rgba(55, 110, 175, .18));
}
.hero { position: relative; text-align: center; }
.hero-photo { height: 232px; margin: -18px -22px 0; overflow: hidden; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 36%;
  -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent 98%); mask-image: linear-gradient(180deg, #000 50%, transparent 98%);
}
.hero-site {
  position: absolute; left: 50%; top: 32px; transform: translateX(-50%); z-index: 2; white-space: nowrap;
  padding: 3px 14px; font: 600 12px/1.6 var(--ff-body); letter-spacing: .08em; color: var(--royal-d);
  background: rgba(255, 255, 255, .86); border-radius: 999px; box-shadow: 0 2px 10px rgba(27, 55, 104, .22);
}
.hero-text { position: absolute; left: 0; right: 0; bottom: 4px; z-index: 2; padding: 0 16px; }
.script { font: 400 clamp(28px, 8.2vw, 34px)/1 var(--ff-script); color: var(--navy); }
.title {
  margin-top: 2px;
  font: 800 clamp(27px, 8.6vw, 40px)/1.1 var(--ff-display);
  letter-spacing: .01em; text-transform: uppercase; color: #fff;
  text-shadow:
    -2.5px -2.5px 0 #3b8be0, 2.5px -2.5px 0 #3b8be0, -2.5px 2.5px 0 #3b8be0, 2.5px 2.5px 0 #3b8be0,
    0 -2.5px 0 #3b8be0, 0 2.5px 0 #3b8be0, -2.5px 0 0 #3b8be0, 2.5px 0 0 #3b8be0,
    0 4px 0 #f0c14e, 0 0 14px rgba(80, 160, 240, .7), 0 8px 14px rgba(47, 111, 192, .3);
}
.hero-sub { margin-top: 10px; font-size: 13px; color: var(--ink); }
.hero-sub::before, .hero-sub::after { content: "✦"; margin: 0 .55em; color: var(--gold); font-size: 10px; vertical-align: 1px; }
.hero.small { padding-top: 14px; }
.hero.small .title { margin-top: 2px; }
.h-deco { position: absolute; z-index: 2; pointer-events: none; }
.h-deco.bow { left: 12px; bottom: 74px; width: 46px; height: 33px; transform: rotate(-12deg); filter: drop-shadow(0 2px 3px rgba(55, 110, 175, .35)); }
.h-deco.heart { right: 34px; bottom: 82px; width: 32px; height: 32px; transform: rotate(10deg); filter: drop-shadow(0 2px 4px rgba(55, 110, 175, .35)); }
.h-deco.wl, .h-deco.wr { bottom: 88px; width: 28px; height: 20px; filter: drop-shadow(0 1px 2px rgba(55, 110, 175, .3)); }
.h-deco.wl { right: 62px; transform: scaleX(-1) rotate(-8deg); }
.h-deco.wr { right: 6px; transform: rotate(-8deg); }
@media (max-width: 350px) { .h-deco.wl, .h-deco.wr, .h-deco.heart { display: none; } }

/* ============ กล่องทั่วไป ============ */
.card {
  padding: 18px 16px 16px;
  background: var(--card);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .9); border-radius: 22px;
  box-shadow: var(--shadow);
}
.sec-title {
  margin-bottom: 14px; text-align: center;
  font: 700 13px/1.2 var(--ff-display);
  letter-spacing: .2em; text-transform: uppercase; color: var(--royal);
}
.sec-title::after { content: ""; display: block; width: 26px; height: 2px; margin: 8px auto 0; background: var(--gold); border-radius: 2px; }
.sec-title.plain { font-size: 20px; letter-spacing: .02em; text-transform: none; }

.lace-strip {
  height: 22px; opacity: .95;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='20' viewBox='0 0 24 20'%3E%3Cpath d='M12 17C4 11 2 8 2 5.5 2 3.5 3.6 2 5.5 2 8 2 10.5 3.5 12 5.5 13.5 3.5 16 2 18.5 2 20.4 2 22 3.5 22 5.5 22 8 20 11 12 17z' fill='none' stroke='%23a6cbf0' stroke-width='1.5'/%3E%3C/svg%3E") 0 center / 24px 20px repeat-x;
}

/* ============ นับถอยหลัง: วันเกิดเป็นเลขดิจิทัลใหญ่ + Cafe/Stage ช่องเล็ก ============ */
.cd-card { padding: 12px 12px 12px; }
.cd-main { display: grid; gap: 8px; text-align: center; }
.cd-main-title { font: 700 12px/1.3 var(--ff-body); letter-spacing: .14em; text-transform: uppercase; color: var(--royal); }
.cd-digits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cd-d {
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 0 6px; color: #fff;
  background: linear-gradient(180deg, #5aa0ec, #2f6fc0); border-radius: 14px;
  box-shadow: 0 6px 14px rgba(47, 111, 192, .3), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.cd-d:not(:last-child)::after { content: ":"; position: absolute; right: -7px; top: 22%; font: 800 20px/1 var(--ff-num); color: #6aa7ee; }
.cd-d b { font: 800 clamp(26px, 8.4vw, 34px)/1 var(--ff-num); font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 rgba(27, 55, 104, .28); }
.cd-d small { font: 600 9px/1 var(--ff-body); letter-spacing: .2em; text-indent: .2em; color: rgba(255, 255, 255, .85); }
.cd-party { padding: 14px 8px; font: 800 20px/1.3 var(--ff-body); color: #fff; background: linear-gradient(135deg, #e6b94f, #c98f1f); border-radius: 14px; }
.cd-mini { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.cd-mini[hidden] { display: none; }
.cd-chip { display: grid; gap: 1px; padding: 5px 10px 6px; min-width: 0; background: #fff; border-radius: 12px; box-shadow: 0 3px 10px rgba(60, 120, 190, .10); }
.cd-chip[hidden] { display: none; }
.cd-chip.is-today { color: #fff; background: linear-gradient(150deg, #5aa0ec, var(--royal)); }
.cd-chip.is-today .cd-c-top, .cd-chip.is-today .cd-c-sub, .cd-chip.is-today .cd-c-left { color: #fff; }
.cd-c-top { display: flex; align-items: center; gap: 4px; font-size: 10.8px; line-height: 1.5; color: var(--royal); }
.cd-c-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.cd-c-top > svg { width: 13px; height: 13px; flex: none; }
.cd-c-pin { margin-left: auto; display: grid; place-items: center; width: 22px; height: 22px; flex: none; color: var(--royal-d); background: #eaf3fc; border-radius: 50%; }
.cd-c-pin svg { width: 12px; height: 12px; }
.cd-c-left { font-weight: 700; color: var(--navy); white-space: nowrap; }
.cd-c-sub { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.cd-chip.is-today .cd-c-pin { color: #fff; background: rgba(255, 255, 255, .25); }
.cd-t-place { display: inline-flex; align-items: center; gap: 2px; color: var(--royal-d); font-weight: 600; text-decoration: none; }
.cd-t-place svg { width: 11px; height: 11px; }
.cd-t-place span { text-decoration: underline; text-decoration-color: rgba(47, 111, 192, .35); text-underline-offset: 2px; }
.cd-place {
  display: inline-flex; align-items: center; gap: 3px; margin-top: 2px;
  font-size: 12px; font-weight: 500; color: var(--royal-d); text-decoration: none;
}
.cd-place svg { width: 13px; height: 13px; flex: none; }
.cd-place span { text-decoration: underline; text-decoration-color: rgba(47, 111, 192, .35); text-underline-offset: 2px; }

/* ============ ปฏิทิน ============ */
.cal-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; margin-bottom: 10px; }
.cal-head b { font: 700 17px/1.3 var(--ff-body); color: var(--navy); }
.cal-head span { font-size: 11.5px; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { padding: 2px 0 4px; text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); }
.cal-wd.is-sun { color: #d9708f; }
.cal-day {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: 0;
  font-size: 13px; color: var(--ink); background: transparent; border: 0; border-radius: 12px;
}
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--royal); font-weight: 700; }
.cal-day.has-ev {
  cursor: pointer; color: var(--royal); background: #fff; font-family: inherit;
  box-shadow: 0 3px 10px rgba(60, 120, 190, .16);
  -webkit-tap-highlight-color: transparent;
}
.cal-day.has-ev.is-today { box-shadow: 0 3px 10px rgba(60, 120, 190, .16), inset 0 0 0 1.5px var(--royal); }
.cal-day.has-ev small { position: absolute; left: 6px; top: 3px; font-size: 9.5px; font-weight: 600; color: var(--muted); }
.cal-day.has-ev svg { width: 54%; height: 54%; margin-top: 6px; }
.cal-day.has-ev.ev-bday { color: #c98f1f; }
.cal-day.has-ev.is-sel { color: #fff; background: linear-gradient(160deg, #5aa0ec, var(--royal)); }
.cal-day.has-ev.is-sel small { color: rgba(255, 255, 255, .85); }
.cal-day.has-ev.ev-bday.is-sel { background: linear-gradient(160deg, #e6b94f, #c98f1f); }
.cal-empty { aspect-ratio: 1; }
.cal-panel { margin-top: 12px; padding: 12px; background: #fff; border-radius: 16px; box-shadow: 0 3px 12px rgba(60, 120, 190, .10); }
.cal-ev { display: flex; gap: 12px; align-items: center; }
.cal-badge { display: grid; place-items: center; width: 44px; height: 44px; flex: none; color: #fff; background: linear-gradient(160deg, #5aa0ec, var(--royal)); border-radius: 14px; }
.cal-badge.ev-bday { background: linear-gradient(160deg, #e6b94f, #c98f1f); }
.cal-badge svg { width: 24px; height: 24px; }
.cal-ev-name { font: 700 14px/1.3 var(--ff-body); letter-spacing: .03em; text-transform: uppercase; color: var(--navy); }
.cal-ev-date { font-size: 12.5px; color: var(--muted); }
.cal-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cal-all { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }

/* ============ ท้องฟ้า + ใบเชกิลอย (เลื่อนเองได้) ============ */
.sky {
  position: relative; overflow: hidden; isolation: isolate;
  height: clamp(400px, 57dvh, 540px);
  border-radius: 26px; border: 1px solid rgba(255, 255, 255, .95);
  background: var(--sky-bg);
  box-shadow: var(--shadow), inset 0 0 0 5px rgba(255, 255, 255, .35);
}
.sky::before, .sky::after { content: ""; position: absolute; left: 0; right: 0; z-index: 4; height: 54px; pointer-events: none; }
.sky::before { top: 0; background: linear-gradient(rgba(190, 220, 247, .95), transparent); }
.sky::after { bottom: 0; height: 90px; background: linear-gradient(transparent, rgba(247, 251, 255, .96) 70%); }

.sky-badge {
  position: absolute; left: 12px; top: 12px; z-index: 6;
  display: flex; align-items: center; gap: 8px; padding: 4px 12px;
  font-size: 12px; font-weight: 500; color: var(--royal-d);
  background: rgba(255, 255, 255, .9); border-radius: 999px; box-shadow: 0 2px 10px rgba(60, 120, 190, .16);
}
.sky-badge span { color: var(--muted); font-weight: 400; }

.lane {
  position: absolute; inset: 0; z-index: 2; overflow-y: auto; overscroll-behavior-y: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; touch-action: pan-y;
}
.lane::-webkit-scrollbar { display: none; }
.set { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; gap: 20px 8px; align-items: start; padding: 62px 14px 0; }
.item { width: min(100%, 122px); justify-self: center; margin-top: var(--mt, 0px); animation: bob var(--bob, 7s) ease-in-out var(--bob-delay, 0s) infinite; transform: rotate(var(--tilt, 0deg)); }
.item.wide { grid-column: 1 / -1; width: min(100%, 214px); justify-self: var(--side, start); margin-top: 0; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--tilt, 0deg)); }
  50% { transform: translateY(-5px) rotate(var(--tilt, 0deg)); }
}
.sky-deco { position: absolute; z-index: 1; pointer-events: none; filter: drop-shadow(0 3px 5px rgba(55, 110, 175, .25)); }
.sky-deco.a { left: -22px; top: 30%; width: 92px; height: 92px; opacity: .8; transform: rotate(-14deg); }
.sky-deco.b { right: -18px; top: 62%; width: 78px; height: 78px; opacity: .75; transform: rotate(12deg); }
.sky-deco.c { right: 8px; top: 12%; width: 54px; height: 38px; opacity: .85; transform: rotate(14deg); }
.lane.is-static .item { animation: none; }
.sky-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; pointer-events: none; display: grid; justify-items: center; padding: 0 0 16px; }
.sky-foot .btn { pointer-events: auto; }

/* ============ ใบเชกิ (instax mini 54x86 มม. ช่องรูป 46x62 มม.) ============ */
.ck {
  position: relative; width: 100%; aspect-ratio: 54 / 86; container-type: inline-size;
  color: var(--pen, #2f9cf0); font-family: var(--ff-hand);
  background: #fff; border-radius: 3.5% / 2.2%;
  box-shadow: 0 7px 16px rgba(55, 110, 175, .3), 0 0 0 1px rgba(47, 111, 192, .07);
  -webkit-tap-highlight-color: transparent;
}
.ck.is-card, .ck.is-full { cursor: pointer; }
/* เทปกาวใสติดหัวใบ (เฉพาะใบที่ลอย/เรียงในหน้าเว็บ) */
.ck.is-card::after, .ck.is-full::after {
  content: ""; position: absolute; left: 50%; top: -6cqw; z-index: 6; width: 34cqw; height: 8cqw;
  transform: translateX(-50%) rotate(-2deg);
  background: linear-gradient(135deg, rgba(160, 205, 247, .8), rgba(208, 230, 250, .7));
  box-shadow: 0 1px 3px rgba(55, 110, 175, .25);
}
.ck-top {
  position: absolute; left: 7.4%; right: 7.4%; top: 0; height: 8.1%;
  display: flex; align-items: center; justify-content: center; gap: 1.6cqw;
  font-size: calc(var(--fs, 5) * 1cqw); line-height: 1.75; white-space: nowrap;
}
.ck-name { max-width: 40cqw; overflow: hidden; text-overflow: ellipsis; }
.ck-h { flex: none; width: 1.2em; height: 1.2em; }
.ck-win {
  position: absolute; left: 7.4%; top: 8.1%; width: 85.2%; height: 72.1%; overflow: hidden;
  background: #cfe3f7; box-shadow: inset 0 0 0 .5cqw rgba(0, 0, 0, .07);
}
.ck-win.is-empty {
  background:
    radial-gradient(28% 8% at 24% 70%, rgba(255, 255, 255, .95), transparent 100%),
    radial-gradient(34% 9% at 70% 84%, rgba(255, 255, 255, .95), transparent 100%),
    radial-gradient(30% 7% at 78% 22%, rgba(255, 255, 255, .8), transparent 100%),
    linear-gradient(180deg, #a9d3f8, #dcedfc 70%, #f5faff);
}
.ck-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ck-frame, .ck-border { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ck-wish.is-ph { opacity: .4; }
.ck-mv.is-ph b { opacity: .45; }
.ck-stickers { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.ck-st { position: absolute; height: auto; aspect-ratio: 1; color: var(--pen); }
.ck-em { display: grid; place-items: center; line-height: 1; user-select: none; -webkit-user-select: none; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.ck-st[data-k="lace"] { color: #8ec5f5; filter: drop-shadow(0 .6cqw 1cqw rgba(55, 110, 175, .3)); }
.ck.is-edit { box-shadow: 0 12px 28px rgba(55, 110, 175, .3), 0 0 0 1px rgba(47, 111, 192, .07); }
.ck.is-edit .ck-st { pointer-events: auto; cursor: grab; touch-action: none; }
/* มีชิ้นที่เลือกอยู่ = บีบสองนิ้วที่ไหนบนใบก็ได้ (หน้าไม่เลื่อน/ไม่ซูม) · ตัวหนังสือเล็กๆ ขยายพื้นที่แตะให้กว้างขึ้น */
.ck.is-edit.has-sel { touch-action: none; }
.ck.is-edit .ck-mv::after { content: ""; position: absolute; inset: -2.4cqw -2cqw; }
.ck.is-edit .ck-st.is-sel { outline: 1.5px dashed #2f6fc0; outline-offset: 2px; border-radius: 6px; }
.ck.is-edit .over-bin { opacity: .35 !important; }
.ck.is-edit .ck-win.can-pan { cursor: grab; touch-action: none; }
.ck.is-edit .ck-win .ck-photo { max-width: none; object-fit: fill; }

/* ============ หน้าต่างอ่านเต็ม ============ */
.wish-dialog { width: min(92vw, 340px); max-width: none; max-height: 94dvh; padding: 14px 8px 8px; border: 0; background: transparent; overflow: visible; color: var(--ink); }
.wish-dialog::backdrop { background: rgba(27, 55, 104, .45); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.wish-modal { display: grid; gap: 12px; max-height: calc(94dvh - 24px); overflow: auto; overscroll-behavior: contain; padding: 4px 2px 6px; scrollbar-width: none; }
.wish-modal::-webkit-scrollbar { display: none; }
.wish-modal .ck { width: min(100%, 270px); margin: 0 auto; }
.wish-full { padding: 12px 14px; background: rgba(255, 255, 255, .96); border-radius: 16px; box-shadow: 0 6px 18px rgba(27, 55, 104, .2); }
.wish-full-text { font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.wish-full-meta { margin-top: 8px; font-size: 12px; color: var(--muted); }
.dlg-close {
  position: absolute; right: 0; top: 0; z-index: 5; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; cursor: pointer;
  color: var(--royal-d); background: #fff; border: 0; border-radius: 50%; box-shadow: 0 4px 12px rgba(27, 55, 104, .3);
}
.dlg-close svg { width: 18px; height: 18px; }

/* ============ ฟอร์ม: ตกแต่งใบเชกิเอง ============ */
.write-note { margin: -4px 0 14px; text-align: center; font-size: 13px; color: var(--muted); }
.ed-stage { width: min(100%, 270px); margin: 4px auto 0; padding-top: 6px; }
.ed-tabs { display: flex; gap: 6px; margin: 18px -2px 12px; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.ed-tabs::-webkit-scrollbar { display: none; }
.ed-tab {
  flex: none; padding: 6px 14px; cursor: pointer; font: 600 13px/1.3 var(--ff-body); color: var(--royal-d);
  background: #fff; border: 1px solid rgba(47, 111, 192, .22); border-radius: 999px;
}
.ed-tab[aria-selected="true"] { color: #fff; background: var(--royal); border-color: var(--royal); }
.ed-panel { padding: 14px; background: rgba(255, 255, 255, .72); border-radius: 16px; min-height: 96px; }
.ed-hint { margin-top: 8px; font-size: 12px; color: var(--muted); }
.ed-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ed-row + .ed-row { margin-top: 10px; }
.ed-range { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 13px; color: var(--ink); }
.ed-range input { flex: 1; accent-color: var(--royal); }
.opt {
  padding: 6px 14px; cursor: pointer; font: 500 13px/1.3 var(--ff-body); color: var(--royal-d);
  background: #fff; border: 1px solid rgba(47, 111, 192, .25); border-radius: 999px;
}
.opt[aria-pressed="true"] { color: #fff; background: var(--royal); border-color: var(--royal); }
.opt:disabled { opacity: .45; cursor: default; }
.st-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.st-btn { aspect-ratio: 1; padding: 7px; cursor: pointer; color: var(--pen, var(--royal)); background: #fff; border: 1px solid rgba(47, 111, 192, .18); border-radius: 12px; }
.st-btn svg { width: 100%; height: 100%; display: block; }
.st-btn[data-k="lace"] { color: #8ec5f5; }
.pens { display: flex; flex-wrap: wrap; gap: 10px; }
.pen { width: 36px; height: 36px; padding: 0; cursor: pointer; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(47, 111, 192, .25); }
.pen[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--navy); }

.ed-fields { margin-top: 16px; display: grid; gap: 4px; }
.ed-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: block; margin-top: 10px; }
.field > span { display: flex; justify-content: space-between; align-items: baseline; font: 400 22px/1.1 var(--ff-script); color: var(--royal); }
.field > span.th { font: 600 14px/1.5 var(--ff-body); letter-spacing: .01em; }
.field > span em { font: 400 11.5px/1.6 var(--ff-body); font-style: normal; color: var(--muted); }
.field input, .field textarea {
  display: block; width: 100%; padding: 8px 2px 4px; font: inherit; font-size: 15px; line-height: 1.7; color: var(--navy);
  background: transparent; border: 0; border-bottom: 1px solid rgba(47, 111, 192, .35); border-radius: 0; outline: none; resize: none;
}
.field textarea { line-height: 28px; padding-top: 0; min-height: 112px; border-bottom: 0; background: repeating-linear-gradient(transparent 0 27px, rgba(47, 111, 192, .16) 27px 28px); }
.field ::placeholder { color: #9bb3d3; opacity: 1; }
.field input:focus { border-color: var(--royal); box-shadow: 0 1px 0 var(--royal); }
.field textarea:focus { box-shadow: 0 1px 0 var(--royal); }
.field input[aria-invalid="true"] { border-color: #d9485b; }
.field textarea[aria-invalid="true"] { box-shadow: 0 1px 0 #d9485b; }
.field .err { display: block; font-size: 12px; color: #c0334a; }
.field .err:empty { display: none; }
.ed-submit { margin-top: 18px; }

.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 50;
  width: max-content; max-width: min(92vw, 420px); padding: 11px 20px;
  font-size: 13.5px; text-align: center; color: #fff;
  background: rgba(27, 55, 104, .94); border-radius: 16px; box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
  opacity: 0; transform: translate(-50%, 16px); transition: opacity .25s, transform .25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ โปรไฟล์เอริน + ช่องทางติดตาม ============ */
.me-head { display: flex; align-items: center; gap: 12px; }
.me-av { position: relative; display: grid; place-items: center; width: 56px; height: 52px; flex: none; color: #8ec5f5; filter: drop-shadow(0 2px 4px rgba(55, 110, 175, .3)); }
.me-av svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.me-av b { position: relative; margin-top: 3px; font: 400 26px/1 var(--ff-script); color: #fff; }
.me-head h2 { font: 700 17px/1.3 var(--ff-body); color: var(--navy); }
.me-head p { font-size: 12.5px; color: var(--muted); }
.ic { display: grid; place-items: center; width: 40px; height: 40px; color: #fff; border-radius: 12px; }
.ic svg { width: 22px; height: 22px; }
.ic.x, .ic.tt { background: #1b2433; }
.ic.ig { background: linear-gradient(135deg, #8a6cf0, #ee6fa6 55%, #f4a460); }
.ic.fb { background: #2f6fd0; }
.social-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.soc { display: grid; justify-items: center; gap: 5px; padding: 10px 2px 8px; text-decoration: none; background: #fff; border-radius: 14px; box-shadow: 0 3px 12px rgba(60, 120, 190, .10); }
.soc span { font-size: 11.5px; font-weight: 600; color: var(--navy); }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.post { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: linear-gradient(160deg, var(--a), var(--b)); }
.post svg { position: absolute; right: 6px; top: 6px; width: 18px; height: 18px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }
.post span { position: absolute; left: 7px; bottom: 6px; right: 7px; font-size: 10px; line-height: 1.3; color: #fff; text-shadow: 0 1px 2px rgba(27, 55, 104, .5); }

.foot { text-align: center; font-size: 12.5px; color: var(--ink); padding: 4px 8px 0; }
.foot a { color: var(--royal-d); font-weight: 600; overflow-wrap: anywhere; }

/* ============ หน้าดูทั้งหมด ============ */
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.bar .btn { min-height: 40px; padding: 6px 18px; font-size: 14px; }
.wall-head { text-align: center; }
.wall-head p { margin-top: -6px; font-size: 13px; color: var(--muted); }
.wall { display: flex; flex-direction: column; gap: 34px; padding: 14px 4px 20px; }
.wall-item { width: min(100%, 236px); }
.wall-item:nth-child(odd) { align-self: flex-start; }
.wall-item:nth-child(even) { align-self: flex-end; }
.wall-text { margin-top: 12px; padding: 0 4px; font-size: 13px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.wall-meta { margin-top: 4px; padding: 0 4px; font-size: 11.5px; color: var(--muted); }
.wall-empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* ============ หน้าทดลองฟอนต์ ============ */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { padding: 5px 14px; cursor: pointer; font-size: 15px; color: var(--royal-d); background: #fff; border: 1px solid rgba(47, 111, 192, .3); border-radius: 999px; }
.chip[aria-pressed="true"] { color: #fff; background: var(--royal); border-color: var(--royal); }
.fonts-h { margin: 10px 0 2px; font-size: 14px; font-weight: 600; color: var(--navy); }
.fonts-sub { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.preview-box { display: grid; gap: 16px; justify-items: center; padding: 22px 12px 26px; border-radius: 18px; background: var(--sky-bg); overflow: hidden; }
.preview-box .cd-row { width: 100%; }
.preview-box .ck { width: 170px; }
.compare { display: grid; gap: 12px; }
.compare-item { padding: 12px 14px; background: #fff; border-radius: 14px; box-shadow: 0 3px 12px rgba(60, 120, 190, .1); }
.compare-item small { color: var(--muted); }
.compare-item .l1 { font-size: 26px; line-height: 1.3; }
.compare-item .l2 { font-size: 15px; line-height: 1.5; }
.compare-item .l3 { font-size: 24px; letter-spacing: .04em; }

/* ============ จอแคบมาก / ลดการเคลื่อนไหว / พิมพ์ ============ */
@media (max-width: 360px) {
  .cd-row { flex-wrap: wrap; justify-content: center; }
  .cd-label { flex-basis: 100%; text-align: center; }
  .cd-tiles { justify-content: center; }
  .st-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .item { animation: none; }
}
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; }
  body::before, body::after { display: none; }
  .no-print, .toast { display: none !important; }
  .page { width: 100%; padding: 0; }
  .wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 8px; }
  .wall-item { width: 100%; align-self: auto !important; break-inside: avoid; }
  .wall-item .ck { transform: none !important; }
  .ck::after { display: none; }
}

/* ============ ปุ่มเขียนคำอวยพร ============ */
.make-cta { display: grid; gap: 8px; justify-items: center; text-align: center; }
.make-cta p { font-size: 12.5px; color: var(--muted); }
.btn.make-btn { min-height: 56px; font-size: 17px; gap: 10px; background: linear-gradient(180deg, #ffd978, #f0b43c); color: #5a3d00; box-shadow: 0 8px 20px rgba(214, 150, 20, .38), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn.make-btn svg { width: 22px; height: 22px; }

/* ============ ปุ่มเล่นเกม (บนหน้าแรก) ============ */
.quiz-cta {
  position: relative; overflow: hidden; isolation: isolate; padding: 24px 18px 20px; text-align: center; color: #fff;
  background: linear-gradient(150deg, #66a9f0, var(--royal) 58%, #3a7ed6);
  border-radius: 24px; box-shadow: 0 14px 32px rgba(47, 111, 192, .4), inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.qz-deco { position: absolute; z-index: -1; color: rgba(255, 255, 255, .4); }
.qz-deco.d1 { left: -12px; top: -10px; width: 76px; height: 76px; opacity: .55; transform: rotate(-14deg); }
.qz-deco.d4 { right: 52px; top: 8px; width: 64px; height: 45px; opacity: .45; }
.qz-deco.d2 { right: 18px; top: 14px; width: 26px; height: 26px; }
.qz-deco.d3 { right: -10px; bottom: 56px; width: 56px; height: 56px; color: rgba(255, 255, 255, .22); transform: rotate(12deg); }
.qz-kicker { font-size: 12.5px; font-weight: 600; letter-spacing: .3em; text-indent: .3em; color: rgba(255, 255, 255, .88); }
.qz-title { margin-top: 2px; font: 800 clamp(34px, 11vw, 46px)/1.1 var(--ff-display); letter-spacing: .01em; text-transform: uppercase; text-shadow: 0 3px 12px rgba(27, 55, 104, .35); }
.qz-sub { margin-top: 6px; font-size: 14px; color: rgba(255, 255, 255, .92); }
.qz-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0 16px; padding: 0; list-style: none; }
.qz-chips li { padding: 3px 12px; font-size: 12px; font-weight: 500; background: rgba(255, 255, 255, .2); border-radius: 999px; }
.btn.qz-btn { min-height: 54px; font-size: 18px; color: var(--royal-d); background: #fff; box-shadow: 0 8px 20px rgba(27, 55, 104, .3); }

/* ============ หน้าเกม ============ */
.qz-panel { padding: 18px 16px 18px; }
.qz-warn { margin-bottom: 14px; padding: 8px 12px; font-size: 12px; color: #8a6a1c; background: #fff6d8; border-radius: 12px; }
.qz-start { display: grid; gap: 12px; }
.qz-start p { font-size: 14px; color: var(--ink); text-align: center; }
.qz-name { padding: 12px 14px; font: inherit; font-size: 16px; color: var(--navy); text-align: center; background: #fff; border: 1.5px solid rgba(47, 111, 192, .3); border-radius: 14px; outline: none; }
.qz-name:focus { border-color: var(--royal); }
.qz-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.qz-score { padding: 2px 12px; color: var(--royal-d); background: #eaf3fc; border-radius: 999px; }
.qz-timer { height: 8px; margin: 10px 0 16px; overflow: hidden; background: #dbe9f8; border-radius: 999px; }
.qz-timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #5aa0ec, var(--royal)); border-radius: inherit; transform-origin: left; }
.qz-timer.low i { background: linear-gradient(90deg, #f0a24f, #e0527a); }
.qz-q { font: 700 19px/1.4 var(--ff-body); color: var(--navy); text-align: center; min-height: 3.2em; display: grid; place-items: center; }
.qz-opts { display: grid; gap: 10px; margin-top: 14px; }
.qz-opt {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-align: left; cursor: pointer;
  font: 500 15px/1.4 var(--ff-body); color: var(--navy); background: #fff; border: 1.5px solid rgba(47, 111, 192, .22); border-radius: 14px;
  box-shadow: 0 3px 10px rgba(60, 120, 190, .1); -webkit-tap-highlight-color: transparent;
}
.qz-opt b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; font-size: 12px; color: var(--royal); background: #eaf3fc; border-radius: 50%; }
.qz-opt:active:not(:disabled) { transform: scale(.99); }
.qz-opt.pick { border-color: var(--royal); background: #eaf3fc; }
.qz-opt.ok { color: #0d6b4b; background: #dff6ec; border-color: #38b588; }
.qz-opt.ok b { color: #fff; background: #38b588; }
.qz-opt.bad { color: #a0243f; background: #fde6ec; border-color: #e0527a; }
.qz-opt.bad b { color: #fff; background: #e0527a; }
.qz-opt:disabled { cursor: default; }
.qz-pop { min-height: 5.4em; margin-top: 10px; text-align: center; font: 700 15px/1.6 var(--ff-body); color: var(--royal); }
.qz-result { display: grid; gap: 12px; text-align: center; }
.qz-big { font: 800 56px/1 var(--ff-display); color: var(--royal); }
.qz-badge { display: inline-block; margin: 0 auto; padding: 4px 16px; font: 700 14px/1.5 var(--ff-body); color: #fff; background: linear-gradient(135deg, #5aa0ec, var(--royal)); border-radius: 999px; }
.qz-facts { font-size: 13.5px; color: var(--muted); }
.qz-actions { display: grid; gap: 10px; margin-top: 4px; }
.lb-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.lb-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.lb-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; background: #fff; border-radius: 14px; box-shadow: 0 2px 8px rgba(60, 120, 190, .08); }
.lb-row.me { box-shadow: 0 0 0 1.5px var(--royal), 0 4px 12px rgba(47, 111, 192, .18); }
.lb-rank { display: grid; place-items: center; width: 30px; height: 30px; font: 700 13px/1 var(--ff-num); color: var(--royal-d); background: #eaf3fc; border-radius: 50%; }
.lb-row:nth-child(1) .lb-rank { color: #7a5200; background: #ffe08a; }
.lb-row:nth-child(2) .lb-rank { color: #4a5568; background: #e3e8ee; }
.lb-row:nth-child(3) .lb-rank { color: #7a4520; background: #f3cfa8; }
.lb-name { min-width: 0; font-weight: 600; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-pts { text-align: right; font: 700 15px/1.2 var(--ff-num); color: var(--royal); }
.lb-pts small { display: block; font: 400 11px/1.3 var(--ff-body); color: var(--muted); }
.lb-empty { text-align: center; padding: 14px 0; color: var(--muted); font-size: 13.5px; }

/* ============ แถบทางลัดติดซ้ายจอ (แบบเดิม: แถบไอคอนกลางจอ) ============ */
html { scroll-padding-top: 12px; }
section[id^="s-"] { scroll-margin-top: 14px; }
.rail {
  position: fixed; z-index: 30; top: 50%; left: max(2px, calc(50% - 240px - 58px)); transform: translateY(-50%);
  display: grid; gap: 1px; width: 50px; box-sizing: border-box; padding: 5px 3px; transition: opacity .25s; opacity: var(--rail-idle, .6); touch-action: none; user-select: none; -webkit-user-select: none;
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .95); border-radius: 28px; box-shadow: 0 8px 22px rgba(60, 120, 190, .3);
}
.rail a {
  display: grid; justify-items: center; gap: 1px; padding: 5px 0 3px; color: #5b87c4; text-decoration: none; border-radius: 22px;
  transition: background .2s, color .2s, box-shadow .2s; -webkit-tap-highlight-color: transparent;
}
.rail a svg { width: 21px; height: 21px; display: block; }
.rail-cap { max-width: 100%; font: 600 9px/1.2 var(--ff-body); text-align: center; white-space: nowrap; overflow: hidden; }
.rail a.on { color: #fff; background: linear-gradient(160deg, #5aa0ec, var(--royal)); box-shadow: 0 4px 10px rgba(47, 111, 192, .45); }
.rail a:focus-visible { outline: 2px solid var(--royal); outline-offset: 1px; }
/* ป้ายชื่อใหญ่ข้างนิ้วตอนกด/ลากแถบ */
.rail-bubble {
  position: fixed; z-index: 31; transform: translateY(-50%) scale(.92); transform-origin: left center; max-width: 60vw; padding: 8px 16px;
  font: 700 16px/1.3 var(--ff-body); color: #fff; background: rgba(27, 55, 104, .94); border-radius: 999px; box-shadow: 0 6px 18px rgba(27, 55, 104, .4);
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
.rail-bubble.show { opacity: 1; transform: translateY(-50%) scale(1); }

/* ============ โปสการ์ดแนวนอน (ไม่ใส่รูป) ============ */
.ck.pc { aspect-ratio: 3 / 2; background: none; box-shadow: none; border-radius: 0; filter: drop-shadow(0 6px 8px rgba(55, 110, 175, .3)); }
.ck.pc.is-edit { filter: drop-shadow(0 10px 14px rgba(55, 110, 175, .3)); }
.ck.pc::before {
  content: ""; position: absolute; inset: 0; background: #fff;
  -webkit-mask:
    radial-gradient(circle at 0 0, #0000 1.3cqw, #000 1.6cqw) 0 0 / 5cqw 5cqw round,
    radial-gradient(circle at 100% 100%, #0000 1.3cqw, #000 1.6cqw) 0 0 / 5cqw 5cqw round;
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle at 0 0, #0000 1.3cqw, #000 1.6cqw) 0 0 / 5cqw 5cqw round,
    radial-gradient(circle at 100% 100%, #0000 1.3cqw, #000 1.6cqw) 0 0 / 5cqw 5cqw round;
  mask-composite: intersect;
}
.ck.pc.is-card::after, .ck.pc.is-full::after { display: none; }
.pc-frame {
  position: absolute; inset: 3.4cqw; border-radius: 1cqw;
  background: repeating-linear-gradient(135deg, #5aa3ee 0 2.6cqw, #fff 2.6cqw 5.2cqw);
}
.pc-paper { position: absolute; inset: 6cqw; background: #fff; border-radius: .6cqw; overflow: hidden; font-family: var(--ff-hand); }
.pc .tag { flex: none; font: 400 7.2cqw/1 var(--ff-script); color: var(--pen); }
.pc-to, .pc-from { display: flex; align-items: baseline; gap: 1.6cqw; min-width: 0; font-size: 5.4cqw; line-height: 1.6; }
.pc-to b, .pc-from b { min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pen); }
.pc-stamp {
  display: block; width: 22cqw; padding: 1.2cqw 1cqw .8cqw; text-align: center; white-space: normal; max-width: none;
  background: #f3f9ff; border: .5cqw solid var(--pen); border-radius: .8cqw; color: var(--pen);
}
.pc-lace { display: block; width: 100%; height: auto; aspect-ratio: 114 / 106; color: #8ec5f5; }
.pc-stamp small { display: block; margin-top: .6cqw; font: 600 2.6cqw/1.2 var(--ff-body); letter-spacing: .12em; }
.pc-stamp::before {
  content: ""; position: absolute; left: -5.6cqw; top: 4.6cqw; width: 6.6cqw; height: 6.6cqw; border-radius: 50%;
  border: .5cqw dashed var(--pen); opacity: .45;
}
.pc-from { position: absolute; right: 3cqw; bottom: 1.6cqw; max-width: 42%; justify-content: flex-end; }

/* ============ หน้าต่างทำใบเชกิ (เต็มจอ) ============ */
.editor-dialog {
  width: min(100vw, 480px); max-width: none; height: 100dvh; max-height: none; margin: 0 auto; padding: 0; border: 0; overflow: hidden;
  color: var(--ink); background: linear-gradient(180deg, #d3e8fa, #eaf4fd 40%, #f7fbff);
}
.editor-dialog[open] { display: flex; flex-direction: column; }
.editor-dialog::backdrop { background: rgba(27, 55, 104, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ed-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: none;
  padding: max(12px, env(safe-area-inset-top)) 16px 10px; background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line);
}
.ed-head h2 { font: 700 17px/1.3 var(--ff-body); color: var(--navy); }
.dlg-close.inline { position: static; flex: none; box-shadow: 0 2px 8px rgba(60, 120, 190, .25); }
.ed-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 0; } /* ไม่เว้นขอบล่างที่ตัวเลื่อน: ไม่งั้นแถบที่ลอยติดล่างจะลอยสูงขึ้นตามขอบที่เว้น */

/* โหมด: ใส่รูป = ใบเชกิ / ไม่ใส่รูป = โปสการ์ด */
.ed-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.ed-mode {
  display: grid; justify-items: center; gap: 2px; padding: 10px 6px 9px; cursor: pointer; text-align: center;
  color: var(--ink); background: #fff; border: 1.5px solid rgba(47, 111, 192, .2); border-radius: 16px; box-shadow: 0 3px 10px rgba(60, 120, 190, .1);
}
.ed-mode b { font: 700 14px/1.3 var(--ff-body); color: var(--navy); }
.ed-mode small { font-size: 11.5px; color: var(--muted); }
.ed-mode i { display: block; margin-bottom: 4px; background: #dcecfb; border: 1.5px solid #8fb8e8; border-radius: 3px; }
.ed-mode i.k { width: 22px; height: 32px; }
.ed-mode i.p { width: 38px; height: 25px; background: repeating-linear-gradient(135deg, #5aa3ee 0 3px, #fff 3px 6px); border-radius: 2px; }
.ed-mode[aria-pressed="true"] { border-color: var(--royal); box-shadow: 0 0 0 2px rgba(47, 111, 192, .25), 0 6px 14px rgba(47, 111, 192, .2); background: #f1f8ff; }
.ed-stage.is-card { width: min(100%, 330px); }

/* ============ ปรับหน้าต่างอ่าน/หน้าดูทั้งหมดสำหรับโปสการ์ด ============ */
.wish-modal .ck.pc { width: 100%; }
.wall-item.is-card { width: min(100%, 300px); }
@media print {
  .rail, .top-lace { display: none; }
  .wall-item.is-card { grid-column: span 2; }
}

/* ============ ชื่อ To / From และวันที่ (ย้ายได้) ============ */
.ck-frame { transform-origin: 50% 50%; }
.ck-mv {
  position: absolute; z-index: 3; transform: translate(-50%, -50%) rotate(var(--rot, 0deg)); display: flex; align-items: baseline; gap: 1.4cqw;
  width: max-content; white-space: nowrap; font-size: calc(var(--fs, 5) * 1cqw * var(--k, 1) * var(--fit, 1)); line-height: 1.7; color: var(--pen); pointer-events: none;
}
.ck-mv.mv-to { transform: translate(0, -50%) rotate(var(--rot, 0deg)); transform-origin: 0 50%; }
.ck-mv.mv-from { transform: translate(-100%, -50%) rotate(var(--rot, 0deg)); transform-origin: 100% 50%; }
.ck-mv .tag { flex: none; font: 400 1.5em/1 var(--ff-script); color: var(--pen); }
.ck-mv b { min-width: 0; font-weight: 600; }
.ck-mv.is-cream, .ck-wish.is-cream, .pen-cream .ck-mv, .pen-cream .ck-wish { text-shadow: 0 0 .5cqw rgba(150, 105, 10, .55), 0 .15cqw .6cqw rgba(150, 105, 10, .35); } /* ตัวอักษรสีครีมบนพื้นขาว: เพิ่มเงาอุ่นๆ ให้อ่านออก */
.ck-mv.is-white, .ck-wish.is-white { text-shadow: 0 0 .7cqw rgba(27, 55, 104, .55), 0 .2cqw .8cqw rgba(27, 55, 104, .4); }
.ck-meas { position: fixed; left: -9999px; top: 0; width: 400px; height: auto; aspect-ratio: auto; visibility: hidden; pointer-events: none; box-shadow: none; background: none; }
.ck-mv.mv-date {
  font: 700 1em/1.4 var(--ff-num); font-size: calc(4.2cqw * var(--k, 1)); letter-spacing: .06em;
  text-shadow: 0 0 .9cqw #fff, 0 0 .9cqw #fff, 0 0 1.4cqw rgba(255, 255, 255, .9);
}
.ck.is-edit .ck-mv { pointer-events: auto; cursor: grab; touch-action: none; padding: 0 1cqw; border-radius: 1.2cqw; }
.ck.is-edit .ck-mv:hover, .ck.is-edit .ck-mv.is-sel { outline: 1.5px dashed #2f6fc0; outline-offset: 1px; }

.qz-prize { padding: 10px 12px; font-size: 12.5px; line-height: 1.55; text-align: left !important; color: #7a5a14; background: #fff6d8; border-radius: 14px; }
.qz-prize b { font-size: 13.5px; }

/* คำอวยพร: กล่องข้อความที่ย้ายได้ (ยึดขอบบนของกล่อง กึ่งกลางแนวนอน) */
.ck-wish {
  position: absolute; z-index: 3; transform: translate(-50%, 0) rotate(var(--rot, 0deg)); transform-origin: 50% 0; width: calc(var(--tw, 85) * 1cqw); margin: 0; pointer-events: none;
  font-size: calc(var(--fs, 6) * 1cqw); line-height: 1.32; color: var(--pen); overflow-wrap: anywhere; white-space: pre-line; padding-top: .3em;
}
.pc .ck-wish { line-height: 1.5; font-family: var(--ff-hand); }
.ck.is-edit .ck-wish { pointer-events: auto; cursor: grab; touch-action: none; }
.ck.is-edit .ck-wish:hover, .ck.is-edit .ck-wish.is-sel { outline: 1.5px dashed #2f6fc0; outline-offset: 1px; }

/* ============ ปุ่มแก้ไขเล็กๆ บนท้องฟ้า ============ */
.sky-edit {
  position: absolute; right: 12px; top: 12px; z-index: 6; display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px 4px 9px;
  font: 600 12px/1.5 var(--ff-body); text-decoration: none; color: var(--royal-d);
  background: rgba(255, 255, 255, .9); border-radius: 999px; box-shadow: 0 2px 10px rgba(60, 120, 190, .16);
}
.sky-edit svg { width: 13px; height: 13px; }

/* ============ ควิซ 60 / กระดานคะแนน 40 บนหน้าแรก ============ */
.qz-row { display: grid; grid-template-columns: 3fr 2fr; gap: 10px; }
.qz-row .quiz-cta { padding: 16px 12px 14px; display: flex; flex-direction: column; justify-content: center; }
.qz-row .qz-kicker { font-size: 10.5px; }
.qz-row .qz-title { font-size: clamp(26px, 7.8vw, 32px); }
.qz-row .qz-sub { margin-top: 4px; font-size: 12px; line-height: 1.45; }
.qz-prize-line { margin: 8px 0 10px; font-size: 11.5px; font-weight: 600; color: #fff2c4; }
.qz-row .btn.qz-btn { width: 100%; min-height: 42px; font-size: 15px; padding: 6px 12px; }
.lb-mini {
  display: flex; flex-direction: column; padding: 12px 10px 10px; min-width: 0;
  background: var(--card); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .9); border-radius: 22px; box-shadow: var(--shadow);
}
.lb-m-title { display: flex; align-items: center; justify-content: center; gap: 5px; margin-bottom: 8px; font: 700 12.5px/1.3 var(--ff-body); color: var(--royal); }
.lb-m-title svg { width: 16px; height: 16px; color: #d3a548; }
.lb-m-win { height: 132px; overflow: hidden; cursor: pointer; }
.lb-m-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; will-change: transform; }
.lb-m-row { position: relative; overflow: hidden; height: 40px; box-sizing: border-box; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 6px; padding: 0 7px; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(60, 120, 190, .08); }
.lb-m-rank { display: grid; place-items: center; width: 22px; height: 22px; font: 800 11px/1 var(--ff-num); color: var(--royal-d); background: #eaf3fc; border-radius: 50%; }
.lb-m-row.r1 .lb-m-rank { color: #7a5200; background: #ffe08a; }
.lb-m-row.r2 .lb-m-rank { color: #4a5568; background: #e3e8ee; }
.lb-m-row.r3 .lb-m-rank { color: #7a4520; background: #f3cfa8; }
.lb-m-who { display: grid; min-width: 0; line-height: 1.2; }
.lb-m-who b { font-size: 12px; font-weight: 600; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-m-who small { font-size: 10px; color: var(--muted); }
.lb-m-pts { font: 800 13px/1 var(--ff-num); color: var(--royal); }
.lb-m-more { margin-top: 8px; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--royal-d); text-decoration: none; }
@media (max-width: 340px) { .qz-row { grid-template-columns: 1fr; } }

/* ============ ก่อนส่ง: รหัสผ่าน + ยอมรับ ============ */
.ed-publish { margin-top: 18px; padding: 12px 14px; background: #fff8e1; border-radius: 16px; }
.ed-publish[hidden] { display: none; }
.ed-pub-title { font: 700 14px/1.4 var(--ff-body); color: #7a5a14; }
.ed-publish .field { margin-top: 6px; }
.accept { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; font-size: 12.5px; line-height: 1.55; color: #5a4310; }
.accept input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--royal); }
.ed-publish .err { margin-top: 2px; }

/* ============ หน้าต่างอ่านเต็ม: ปุ่มท้ายใบ + ใส่รหัสผ่านแก้ไข ============ */
.wish-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wish-acts a.opt { text-decoration: none; display: inline-block; }
.pw-dialog { width: min(88vw, 340px); padding: 0; border: 0; border-radius: 22px; color: var(--ink); background: #fff; box-shadow: 0 20px 50px rgba(27, 55, 104, .4); }
.pw-dialog::backdrop { background: rgba(27, 55, 104, .5); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.pw-box { display: grid; gap: 10px; padding: 18px 18px 16px; }
.pw-box h3 { font: 700 17px/1.3 var(--ff-body); color: var(--navy); }
.pw-msg { font-size: 13.5px; line-height: 1.6; }
.pw-field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--navy); }
.pw-field input { padding: 10px 12px; font: inherit; font-size: 16px; color: var(--navy); background: #f4f9ff; border: 1.5px solid rgba(47, 111, 192, .3); border-radius: 12px; outline: none; }
.pw-field input:focus { border-color: var(--royal); }
.pw-err { min-height: 1.2em; font-size: 12.5px; color: #c0334a; }
.pw-row { display: flex; gap: 8px; justify-content: flex-end; }
.pw-admin { font-size: 12px; color: var(--royal-d); }

/* ============ โหมดแก้ไข (หน้าดูทั้งหมด): ใบสั่นเบาๆ แบบ iPhone ============ */
.edit-banner { padding: 10px 14px; font-size: 12.5px; line-height: 1.55; color: #7a5a14; background: #fff4cc; border-radius: 16px; box-shadow: 0 3px 10px rgba(190, 140, 20, .18); }
.edit-banner[hidden] { display: none; }
.wall-item { position: relative; }
.edit-badge {
  display: none; position: absolute; left: -8px; top: -8px; z-index: 8; width: 30px; height: 30px; place-items: center;
  font-size: 15px; color: #fff; background: linear-gradient(160deg, #5aa0ec, var(--royal)); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 3px 8px rgba(27, 55, 104, .35);
}
body.editing .edit-badge { display: grid; }
.wall-item:nth-child(odd) { --rot: -1.4deg; }
.wall-item:nth-child(even) { --rot: 1.4deg; }
.wall-item .ck { transform: rotate(var(--rot, 0deg)); }
body.editing .wall-item .ck { animation: jig .32s ease-in-out infinite alternate; }
body.editing .wall-item:nth-child(even) .ck { animation-duration: .38s; }
@keyframes jig { from { transform: rotate(calc(var(--rot, 0deg) - 1.1deg)); } to { transform: rotate(calc(var(--rot, 0deg) + 1.1deg)); } }
@media (prefers-reduced-motion: reduce) { body.editing .wall-item .ck { animation: none; } }
.ck.pc .ck-mv.pc-stamp { display: block; white-space: normal; max-width: none; width: calc(14cqw * var(--k, 1)); }
.pc-stamp small { font-size: calc(1.8cqw * var(--k, 1)); }
.bar .btn svg { width: 15px; height: 15px; }
@media print { .rail, .sky-edit { display: none !important; } }

/* ============ แถบเครื่องมือของชิ้นที่เลือกอยู่บนใบ (ย่อ / ขยาย / ลบ) ============ */
/* แถบแก้ชิ้นที่เลือก (เหมือนเครื่องมือของ IG Story): แตะชิ้นบนใบแล้วแก้ตรงนี้ได้เลย · ลอยติดขอบล่างจอตอนมีชิ้นที่เลือก */
.ed-sel { display: grid; gap: 8px; margin: 14px 0 0; padding: 9px 11px; font-size: 12.5px; color: var(--muted); background: #fff; border-radius: 16px; box-shadow: 0 3px 10px rgba(60, 120, 190, .1); }
.ed-sel.has-sel { position: sticky; bottom: 8px; z-index: 12; margin-top: 10px; box-shadow: 0 8px 26px rgba(27, 55, 104, .28), 0 0 0 1.5px rgba(47, 111, 192, .22); }
.sel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ed-sel b { margin-right: auto; font-size: 13.5px; color: var(--navy); }
.ed-sel .opt { padding: 4px 10px; min-height: 32px; }
.ed-sel .opt[aria-pressed="true"] { color: var(--royal-d); background: #dcecfb; border-color: var(--royal); }
.ed-sel .opt.del { color: #c0334a; border-color: rgba(192, 51, 74, .35); }
.ed-sel .opt.done { color: #fff; background: var(--royal); border-color: var(--royal); }
.sel-text { width: 100%; padding: 8px 10px; font: 500 16px/1.4 var(--ff-body); color: var(--ink); background: #f4f9ff; border: 1.5px solid rgba(47, 111, 192, .25); border-radius: 12px; resize: none; }
.sel-wrap { position: relative; }
.sel-wrap .sel-text { padding-bottom: 20px; }
.sel-count { position: absolute; right: 10px; bottom: 5px; font-size: 11px; font-style: normal; color: var(--muted); pointer-events: none; }
.sel-text:focus { outline: none; border-color: var(--royal); background: #fff; }
.col-dots { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; overflow-x: auto; padding: 3px 2px; scrollbar-width: none; }
.col-dots::-webkit-scrollbar { display: none; }
.col-dots .dot { flex: none; width: 28px; height: 28px; padding: 0; cursor: pointer; border: 2.5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(47, 111, 192, .28); }
.col-dots .dot[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--navy); }
.col-dots .dot.auto { display: grid; place-items: center; width: auto; padding: 0 10px; font: 600 11px/26px var(--ff-body); color: var(--royal-d); background: #eaf3fc; border-radius: 999px; }
.col-dots .dot.auto[aria-pressed="true"] { color: #fff; background: var(--royal); }
.ed-sel .ed-range { font-size: 12.5px; }
.ed-sel .ed-range span { flex: none; min-width: 4.4em; }
.ed-sel .ed-range em { flex: none; min-width: 2.6em; font-style: normal; font-weight: 600; text-align: right; color: var(--royal-d); }

/* ถังขยะ: โผล่ตอนลากชิ้นที่ลบได้ ลากไปปล่อยตรงนี้เพื่อลบ (เหมือน IG Story) */
.ed-bin {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); z-index: 40; display: grid; justify-items: center; gap: 6px;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
.ed-bin.show { opacity: 1; transform: translate(-50%, 0); }
.ed-bin span { font: 600 12px/1.2 var(--ff-body); color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.ed-bin i { display: grid; place-items: center; width: 54px; height: 54px; color: #fff; background: rgba(20, 30, 50, .55); border: 2px solid rgba(255, 255, 255, .9); border-radius: 50%; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform .12s, background .12s; }
.ed-bin i svg { width: 26px; height: 26px; }
.ed-bin.is-over i { transform: scale(1.3); background: #e0364f; }

/* อิโมจิ */
.em-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; }
.em-btn { aspect-ratio: 1; padding: 0; font-size: 24px; line-height: 1; cursor: pointer; background: #fff; border: 1px solid rgba(47, 111, 192, .15); border-radius: 12px; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.em-btn:active { transform: scale(.92); }
.em-own { display: flex; gap: 8px; margin-top: 10px; }
.em-own input { flex: 1; min-width: 0; padding: 8px 12px; font-size: 16px; background: #fff; border: 1.5px solid rgba(47, 111, 192, .25); border-radius: 12px; }
.ed-seg { display: flex; gap: 6px; margin-bottom: 10px; }

/* ============ กล้องสด (ถ่ายรูปจากมือถือ) ============ */
.btn.gold { color: #5a3d00; background: linear-gradient(180deg, #ffd978, #f0b43c); box-shadow: 0 6px 16px rgba(214, 150, 20, .35), inset 0 1px 0 rgba(255, 255, 255, .6); }
.cam { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; background: #000; }
.cam[hidden] { display: none; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-guide {
  position: absolute; left: 50%; top: 44%; width: min(72%, 300px); aspect-ratio: 46 / 62; transform: translate(-50%, -50%);
  border: 2px dashed rgba(255, 255, 255, .95); border-radius: 6px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5); pointer-events: none;
}
.cam-hint { position: absolute; left: 0; right: 0; top: calc(max(14px, env(safe-area-inset-top)) + 6px); text-align: center; font-size: 13px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.cam-tools { position: absolute; left: 0; right: 0; bottom: calc(22px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-around; gap: 8px; padding: 0 18px; }
.cam-shutter { width: 74px; height: 74px; padding: 0; cursor: pointer; background: #fff; border: 5px solid rgba(255, 255, 255, .55); border-radius: 50%; box-shadow: 0 0 0 3px rgba(0, 0, 0, .25); background-clip: padding-box; }
.cam-shutter:active { transform: scale(.94); }

.lane-empty { position: absolute; left: 0; right: 0; top: 40%; margin: 0 24px; text-align: center; font-size: 14px; color: var(--royal-d); }
.lb-empty { list-style: none; }

/* ============ หน้าแอดมิน ============ */
.adm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; padding-top: 12px; }
.adm-cell { min-width: 0; }
.adm-cell.is-hidden { opacity: .5; }
.adm-meta { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.adm-meta b { color: var(--navy); }
.adm-text { margin-top: 4px; font-size: 12px; color: var(--ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.adm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 10px 12px; font-size: 13px; background: #fff; border-radius: 14px; }
.adm-row span { min-width: 0; overflow-wrap: anywhere; }
.opt.del { color: #c0334a; border-color: rgba(192, 51, 74, .35); }
.adm-body { display: grid; gap: 4px; margin-top: 10px; }

.qz-me { display: grid; gap: 4px; justify-items: center; text-align: center; }
.qz-me-hi { font-size: 14px; font-weight: 600; color: var(--navy); }
.qz-me-big { font: 800 52px/1.1 var(--ff-display); color: var(--royal); }

@keyframes qz-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.qz-q, .qz-opts { animation: qz-in .16s ease-out; }
@media (prefers-reduced-motion: reduce) { .qz-q, .qz-opts { animation: none; } }

/* ============ โซเชียลล่างสุด: พรีวิวหน้าโปรไฟล์ 2x2 (X · Instagram / Facebook · TikTok) ============ */
.me { min-width: 0; }
.me-title { margin: 0 4px 10px; font: 700 15px/1.3 var(--ff-body); color: var(--navy); }
.profiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prof {
  position: relative; display: grid; justify-items: start; align-content: start; gap: 1px; min-width: 0; padding: 0 10px 10px;
  text-decoration: none; color: var(--ink); overflow: hidden; background: #fff; border-radius: 16px; box-shadow: var(--shadow);
}
.pf-banner { display: block; width: calc(100% + 20px); height: 46px; margin: 0 -10px; overflow: hidden; background: linear-gradient(135deg, #bfe0fb, #e2d8ff); }
.pf-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-banner.ig { background: linear-gradient(135deg, #cfc0f7, #ffd0e4 60%, #ffe2c2); }
.pf-banner.tt { background: linear-gradient(135deg, #bfe0fb, #fbd2e4); }
.pf-av { display: block; width: 46px; height: 46px; margin-top: -23px; overflow: hidden; border: 2.5px solid #fff; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(60, 120, 190, .25); }
.pf-av img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); display: block; }
.pf-net { position: absolute; right: 8px; top: 52px; display: inline-flex; align-items: center; font-size: 0; }
.pf-net .ic { width: 22px; height: 22px; border-radius: 7px; }
.pf-net .ic svg { width: 13px; height: 13px; }
.pf-name { margin-top: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 13px/1.3 var(--ff-body); color: var(--navy); }
.pf-handle { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted); }
.pf-bio { margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; line-height: 1.45; color: var(--ink); min-height: 4.35em; }
.pf-go { margin-top: 6px; padding: 4px 12px; font: 600 11.5px/1.4 var(--ff-body); color: #fff; background: var(--royal); border-radius: 999px; }

/* ติดต่อแอดมิน */
.foot-btn { margin: 4px 0; padding: 6px 16px; font: 600 12.5px/1.4 var(--ff-body); color: #fff; cursor: pointer; background: var(--royal); border: 0; border-radius: 999px; }
.rq-box { max-height: 88dvh; overflow-y: auto; }
.rq-wish { font-size: 12.5px; color: var(--muted); }
.rq-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.rq-kinds .opt { padding: 4px 10px; font-size: 12.5px; }
.pw-field textarea { padding: 10px 12px; font: inherit; font-size: 16px; font-weight: 400; color: var(--navy); background: #f4f9ff; border: 1.5px solid rgba(47, 111, 192, .3); border-radius: 12px; outline: none; resize: vertical; }
.pw-field textarea:focus { border-color: var(--royal); }
button.pw-admin { padding: 0; font: inherit; font-size: 12px; text-align: left; cursor: pointer; color: var(--royal-d); background: none; border: 0; text-decoration: underline; }

.adm-req { align-items: flex-start; }
.adm-req > div:first-child { min-width: 0; flex: 1; }
.adm-acts { display: flex; flex-direction: column; gap: 6px; flex: none; }

/* ============ ชวนเพื่อน: ปุ่มแชร์ + เมนูเด้งจากล่างจอ + QR ใหญ่ ============ */
.share { text-align: center; }
.share-title { font: 700 17px/1.3 var(--ff-body); color: var(--navy); }
.share-sub { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.share-btns .btn { min-height: 46px; padding: 8px 10px; font-size: 15px; }
.sheet { width: min(100vw, 480px); max-width: none; margin: auto auto 0; padding: 0; border: 0; color: var(--ink); background: transparent; overflow: visible; }
.sheet::backdrop, .qr-dialog::backdrop { background: rgba(27, 55, 104, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet[open] { animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-box { padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); background: #fff; border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(27, 55, 104, .3); }
.sheet-grab { width: 42px; height: 5px; margin: 0 auto 10px; background: #d5e2f1; border-radius: 3px; }
.sheet-title { margin-bottom: 12px; text-align: center; font: 700 17px/1.3 var(--ff-body); color: var(--navy); }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-tile {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; text-align: left; text-decoration: none; cursor: pointer;
  font: 600 13.5px/1.3 var(--ff-body); color: var(--navy); background: #f2f8ff; border: 1px solid rgba(47, 111, 192, .14); border-radius: 16px;
}
.sheet-tile:active { transform: scale(.98); }
.sheet-tile i { flex: none; display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--royal); border-radius: 11px; }
.sheet-tile i svg { width: 19px; height: 19px; }
.sheet-close { width: 100%; margin-top: 12px; }
.qr-dialog { width: min(92vw, 360px); max-width: none; padding: 0; border: 0; border-radius: 26px; background: #fff; box-shadow: 0 20px 60px rgba(27, 55, 104, .45); }
.qr-box { display: grid; justify-items: center; gap: 8px; padding: 22px 20px 20px; text-align: center; }
.qr-title { font: 700 17px/1.4 var(--ff-body); color: var(--navy); }
.qr-img { width: min(78vw, 280px); height: auto; aspect-ratio: 1; image-rendering: pixelated; background: #fff; }
.qr-url { font: 600 15px/1.3 var(--ff-body); color: var(--royal-d); }
.qr-box .btn { margin-top: 6px; min-width: 140px; }
.sheet-tile.is-wide { grid-column: 1 / -1; }
.sheet-tile.is-hero { grid-column: 1 / -1; flex-wrap: wrap; align-content: center; min-height: 96px; padding: 12px 16px; gap: 2px 14px; font-size: 18px; background: linear-gradient(135deg, #e4f1ff, #f3f8ff); border-color: rgba(47, 111, 192, .3); }
.sheet-tile.is-hero i { width: 56px; height: 56px; border-radius: 16px; }
.sheet-tile.is-hero i svg { width: 32px; height: 32px; }
.sheet-tile.is-hero span { flex: 1; }
.sheet-tile small { flex-basis: 100%; margin: -26px 0 0 70px; font-weight: 400; font-size: 12px; color: var(--muted); }

/* ============ หน้าควิซใหม่: สถิติ + กระดาน + ปุ่มเล่นใหญ่ ============ */
.qz-hero { padding-bottom: 4px; }
.qz-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.qz-stats li { display: grid; gap: 2px; justify-items: center; padding: 10px 4px 8px; text-align: center; background: rgba(255, 255, 255, .85); border-radius: 16px; box-shadow: 0 3px 12px rgba(60, 120, 190, .12); }
.qz-stats b { font: 800 22px/1.1 var(--ff-num); color: var(--royal); }
.qz-stats span { font-size: 11px; line-height: 1.3; color: var(--muted); }
.qz-stats li.hot b { color: #e0527a; }
.lb-card { padding: 16px 14px 14px; }
.lb-card .sec-title { text-align: center; }
.lb-prize { margin: 4px 0 10px; text-align: center; font-size: 12.5px; font-weight: 600; color: #8a6a1c; }
.lb-row { grid-template-columns: 38px 1fr auto; }
.lb-rank { font-size: 15px; }
.qz-cta { position: sticky; bottom: 10px; z-index: 5; display: grid; gap: 6px; margin-top: 14px; padding: 10px; justify-items: center; background: rgba(255, 255, 255, .72); border-radius: 24px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 24px rgba(60, 120, 190, .2); }
.btn.qz-go { width: 100%; min-height: 62px; font-size: 22px; letter-spacing: .02em; color: #6b4a00; background: linear-gradient(180deg, #ffe58f, #f5bd38); box-shadow: 0 8px 20px rgba(201, 150, 20, .45), inset 0 2px 0 rgba(255, 255, 255, .6); }
.qz-rules { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 11.5px; color: var(--muted); }
.qz-login .sheet-box { max-height: 90dvh; overflow-y: auto; }
.qz-prize-mini { font-size: 12px; line-height: 1.55; text-align: left !important; color: #7a5a14; padding: 8px 12px; background: #fff6d8; border-radius: 12px; }
.lb-card .lb-row { padding: 6px 12px; }
.lb-card .lb-list { gap: 5px; }
.lb-card .lb-pts { font-size: 14px; }
.qz-stats li.gold b { color: #c98e12; }
.lb-who { display: grid; gap: 2px; min-width: 0; }
.lb-facts { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 10.5px; line-height: 1.4; color: var(--muted); }
.lb-facts span { white-space: nowrap; }
.lb-legend { margin: -4px 0 8px; text-align: center; font-size: 10.5px; color: var(--muted); }

/* ============ ปุ่มเขียนที่หาง่าย: มุมบนท้องฟ้า + ปุ่มลอย ============ */
.sky-write, .fab-write {
  display: inline-flex; align-items: center; gap: 6px; font: 700 13px/1.4 var(--ff-body); cursor: pointer; border: 0;
  color: #5a3d00; background: linear-gradient(180deg, #ffe58f, #f5bd38); border-radius: 999px;
  box-shadow: 0 5px 14px rgba(201, 150, 20, .4), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.sky-write { position: absolute; right: 12px; top: 10px; z-index: 6; padding: 6px 14px 6px 11px; }
.sky-write svg, .fab-write svg { width: 15px; height: 15px; }
.fab-write { position: fixed; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; padding: 11px 18px 11px 14px; font-size: 14px; box-shadow: 0 8px 22px rgba(201, 150, 20, .5), 0 0 0 3px rgba(255, 255, 255, .7); }
.fab-write[hidden] { display: none; }
.make-remark { font-size: 11.5px; color: var(--muted); }
.make-remark a { color: var(--royal-d); font-weight: 600; }
/* ปุ่มส่งในตัวทำใบ: ลอยติดล่างจอเสมอ (ทั้งเชกิและโปสการ์ด) */
.ed-sendbar { position: sticky; bottom: 0; z-index: 14; margin: 14px -16px 0; padding: 18px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(234, 244, 253, 0), #eaf4fd 36%); }
.ed-sendbar .ed-submit { margin-top: 0; box-shadow: 0 8px 22px rgba(47, 111, 192, .4); }
.ed-sel.has-sel { bottom: 86px; }
.foot.has-fab { padding-bottom: 84px; }
.editor-dialog.has-sheet #wish-form::after { content: ""; display: block; height: 250px; } /* เว้นที่ท้ายหน้าให้เลื่อนใบขึ้นพ้นแถบแก้ชิ้นที่เด้งขึ้นมา */

.qz-field { display: grid; gap: 5px; text-align: left; }
.qz-flabel { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--navy); }
.qz-flabel b { font-weight: 700; }
.qz-flabel em { padding: 1px 10px; font-size: 11px; font-style: normal; font-weight: 600; border-radius: 999px; }
.qz-flabel em.req { color: #fff; background: var(--royal); }
.qz-flabel em.opt { color: var(--muted); background: #e9eff6; }
.qz-name.optional { border-style: dashed; background: #fafcff; }
.qz-field .qz-name { text-align: left; }

/* ============ ปุ่มเปลี่ยนภาษา (ธง 3 ใบ) ============ */
.lang-switch { position: fixed; top: calc(8px + env(safe-area-inset-top)); right: 10px; z-index: 25; display: flex; gap: 4px; padding: 3px; background: rgba(255, 255, 255, .82); border-radius: 999px; box-shadow: 0 2px 10px rgba(27, 55, 104, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lang-switch.in-slot { position: static; box-shadow: 0 2px 8px rgba(60, 120, 190, .18); }
.lang-btn { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; cursor: pointer; background: none; border: 0; border-radius: 50%; opacity: .55; transition: opacity .12s, transform .12s; }
.lang-btn svg { width: 24px; height: 24px; display: block; }
.lang-btn:hover { opacity: .85; }
.lang-btn[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--royal); transform: scale(1.05); }
body.playing .lang-switch { display: none; }

@media print { .lang-switch { display: none !important; } }
@media (max-width: 420px) { .bar { gap: 6px; flex-wrap: nowrap; } .bar .btn { padding: 6px 12px; white-space: nowrap; } .lang-switch.in-slot .lang-btn { width: 26px; height: 26px; } .lang-switch.in-slot .lang-btn svg { width: 22px; height: 22px; } }
/* ปุ่ม QR ใหญ่ในเมนูแชร์: ชื่อกับบรรทัดเล็กเรียงในคอลัมน์เดียว (ภาษาไหนข้อความยาวก็ไม่ทับกัน) */
.sheet-tile.is-hero { display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; row-gap: 2px; align-items: center; }
.sheet-tile.is-hero i { grid-row: 1 / span 2; }
.sheet-tile.is-hero span { align-self: end; }
.sheet-tile.is-hero small { margin: 0; align-self: start; flex-basis: auto; }
.lb-showmore { display: block; margin: 12px auto 0; min-width: 160px; }
.lb-showmore[hidden] { display: none; }

/* กระดานย่อ: อันดับ 1 กรอบทอง + มงกุฎ + ประกาย · อันดับ 2-3 เบากว่า */
.lb-m-row.r1 { background: linear-gradient(135deg, #fff6cf, #ffe38a); box-shadow: 0 0 0 1.5px #f2c14e, 0 4px 14px rgba(242, 193, 78, .55); }
.lb-m-row.r1 .lb-m-pts { color: #9a6200; }
.lb-m-row.r2 { background: linear-gradient(135deg, #fff, #eef2f7); box-shadow: 0 0 0 1px #d3dae3, 0 2px 8px rgba(60, 120, 190, .1); }
.lb-m-row.r3 { background: linear-gradient(135deg, #fff, #fbeee1); box-shadow: 0 0 0 1px #ecc9a4, 0 2px 8px rgba(60, 120, 190, .1); }
.lb-m-crown { width: 15px; height: 15px; display: block; color: #9a6200; }
.lb-m-row.r1::after, .lb-m-row.r2::after, .lb-m-row.r3::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, .85) 50%, transparent 62%); transform: translateX(-130%); animation: lb-shine 4.2s ease-in-out infinite; }
.lb-m-row.r2::after { animation-delay: 1.4s; opacity: .6; }
.lb-m-row.r3::after { animation-delay: 2.6s; opacity: .45; }
@keyframes lb-shine { 0%, 55% { transform: translateX(-130%); } 80%, 100% { transform: translateX(130%); } }
.lb-m-spark { position: absolute; z-index: 1; width: 8px; height: 8px; pointer-events: none; background: #f5b928; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: lb-twinkle 2.2s ease-in-out infinite; }
@keyframes lb-twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 45% { opacity: 1; transform: scale(1) rotate(45deg); } 70% { opacity: 0; transform: scale(.4) rotate(90deg); } }
@media (prefers-reduced-motion: reduce) { .lb-m-row::after, .lb-m-spark { animation: none !important; } .lb-m-spark { opacity: .8; } }

/* กำลังไถอ่านหน้าเว็บ → แถบจางลงให้เห็นเนื้อหา · แตะ/วางเมาส์/หยุดไถ → ชัดเต็มที่ */
body.is-scrolling .rail { opacity: var(--rail-scroll, .35); }
.rail:hover, .rail:active, .rail.scrubbing { opacity: 1 !important; }

/* ============ ของที่ระลึก (Birthday Goods) ============ */
.gd { padding: 18px 14px 16px; position: relative; overflow: hidden; }
.gd-head { text-align: center; margin-bottom: 12px; }
.gd-kicker { font: 700 11px/1 var(--ff-display); letter-spacing: .24em; text-transform: uppercase; color: var(--royal); }
.gd-title { margin: 6px 0 2px; font: 600 30px/1.1 var(--ff-script); color: var(--navy); }
.gd-title small { display: block; font: 800 15px/1.2 var(--ff-display); letter-spacing: .16em; text-transform: uppercase; color: var(--royal-d); margin-top: 2px; }
.gd-title::after { content: ""; display: block; width: 26px; height: 2px; margin: 9px auto 0; background: var(--gold); border-radius: 2px; }

.gd-deadline {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  margin: 12px auto 14px; padding: 8px 14px; width: fit-content; max-width: 100%;
  font: 500 13px/1.3 var(--ff-body); color: #6a4a00;
  background: linear-gradient(180deg, #fff3cf, #ffe7a3); border: 1px solid rgba(211, 165, 72, .55); border-radius: 999px;
  box-shadow: 0 4px 12px rgba(214, 150, 20, .2);
}
.gd-deadline b { font-weight: 700; }
.gd-deadline .dot { width: 8px; height: 8px; border-radius: 50%; background: #e8504a; box-shadow: 0 0 0 0 rgba(232, 80, 74, .6); animation: gdPulse 1.8s infinite; }
@keyframes gdPulse { 70% { box-shadow: 0 0 0 7px rgba(232, 80, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 80, 74, 0); } }

/* รูปครอป: กล่องกำหนดอัตราส่วน · รูปโปสเตอร์เต็มถูกเลื่อน/ขยายด้วย JS */
.gd-pic {
  position: relative; display: block; width: 100%; padding: 0; border: 0; overflow: hidden; cursor: pointer;
  background: #dcecfb; border-radius: 16px 16px 0 0; -webkit-tap-highlight-color: transparent;
}
.gd-pic img { position: absolute; max-width: none; display: block; transition: transform .35s ease; }
.gd-band { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); overflow: hidden; }
.gd-pic:active img { transform: scale(1.03); }
.gd-zoom {
  position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); border-radius: 50%; color: var(--royal-d); box-shadow: 0 2px 8px rgba(40, 90, 160, .25);
}
.gd-zoom svg { width: 15px; height: 15px; }
.gd-tag {
  position: absolute; left: 8px; top: 8px; padding: 4px 10px; border-radius: 999px;
  font: 700 11px/1.2 var(--ff-body); color: #fff; background: linear-gradient(160deg, #ff8fb5, #f0609a); box-shadow: 0 3px 8px rgba(240, 96, 154, .4);
}
.gd-tag.gold { color: #5a3d00; background: linear-gradient(180deg, #ffd978, #f0b43c); box-shadow: 0 3px 8px rgba(214, 150, 20, .4); }

.gd-body { padding: 10px 12px 12px; display: grid; gap: 8px; }
.gd-name { font: 700 14px/1.25 var(--ff-display); color: var(--navy); }
.gd-sub { font: 400 12px/1.4 var(--ff-body); color: var(--muted); }
.gd-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gd-price { font: 700 20px/1 var(--ff-num); color: var(--navy); }
.gd-price small { font-size: 12px; font-weight: 600; margin-left: 2px; color: var(--muted); }
.gd-price s { display: block; margin-bottom: 3px; font: 500 12px/1 var(--ff-num); color: #9bb0cc; }

.gd-buy {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px; flex: none;
  font: 700 14px/1 var(--ff-body); color: #fff; text-decoration: none; border-radius: 999px;
  background: linear-gradient(180deg, #4fd37e, #1fae56); box-shadow: 0 5px 14px rgba(31, 174, 86, .38), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.gd-buy:active { transform: translateY(1px) scale(.98); }
.gd-buy svg { width: 16px; height: 16px; }

.gd-item { background: #fff; border-radius: 16px; box-shadow: 0 6px 18px rgba(60, 120, 190, .16); border: 1px solid rgba(255, 255, 255, .9); overflow: hidden; display: flex; flex-direction: column; }
.gd-item .gd-body { flex: 1; align-content: space-between; }

.gd-feature { margin-bottom: 12px; border: 2px solid rgba(211, 165, 72, .6); }
.gd-feature .gd-name { font-size: 17px; }
.gd-feature .gd-price { font-size: 26px; }
.gd-feature .gd-buy { min-height: 46px; padding: 10px 18px; font-size: 15px; }
.gd-save { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font: 700 11px/1.5 var(--ff-body); color: #0f7a3a; background: #dff6e8; vertical-align: middle; }

.gd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gd-grid .gd-item .gd-row { flex-direction: column; align-items: stretch; }
.gd-grid .gd-buy { width: 100%; }
.gd-grid .gd-price { text-align: left; }

.gd-info { margin: 14px 0 10px; display: grid; gap: 6px; padding: 12px 14px; background: rgba(255, 255, 255, .7); border-radius: 14px; font: 400 12.5px/1.5 var(--ff-body); color: var(--ink); }
.gd-info div { display: flex; gap: 8px; align-items: flex-start; }
.gd-info i { font-style: normal; flex: none; width: 20px; text-align: center; }
.gd-all { display: flex; }

/* ---------- แถบเล็กใต้นับถอยหลัง (ทางเข้ารอง) ---------- */
.gd-strip {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; text-decoration: none; color: var(--navy);
  background: linear-gradient(90deg, rgba(255, 255, 255, .92), rgba(255, 243, 207, .92)); border: 1px solid rgba(211, 165, 72, .5); border-radius: 999px;
  box-shadow: var(--shadow); font: 500 13px/1.25 var(--ff-body);
}
.gd-strip .ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(160deg, #5aa0ec, var(--royal)); color: #fff; }
.gd-strip .ic svg { width: 18px; height: 18px; }
.gd-strip b { font-weight: 700; }
.gd-strip span.go { margin-left: auto; font-weight: 700; color: var(--royal-d); white-space: nowrap; }

/* ---------- หน้าต่างรายละเอียด (bottom sheet) ---------- */
.gd-sheet {
  width: min(100%, 480px); max-width: 480px; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0; overflow: hidden;
  border-radius: 24px 24px 0 0; background: #f4f9ff; color: var(--ink); box-shadow: 0 -10px 40px rgba(20, 50, 100, .35);
}
.gd-sheet[open] { display: flex; flex-direction: column; animation: gdUp .28s ease; }
.gd-sheet::backdrop { background: rgba(20, 45, 90, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes gdUp { from { transform: translateY(40px); opacity: 0; } }
.gd-sheet-x { position: absolute; z-index: 3; right: 10px; top: 10px; width: 38px; height: 38px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .95); color: var(--navy); box-shadow: 0 3px 10px rgba(30, 70, 130, .3); cursor: pointer; }
.gd-sheet-x svg { width: 18px; height: 18px; }
.gd-sheet-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.gd-poster { display: block; width: 100%; height: auto; aspect-ratio: 3/4; background: #dcecfb; }
.gd-sheet-body { padding: 14px 18px 8px; display: grid; gap: 10px; }
.gd-sheet-body h3 { font: 700 18px/1.25 var(--ff-display); color: var(--navy); }
.gd-sheet-body p { font: 400 13.5px/1.55 var(--ff-body); }
.gd-sheet-body ul { margin: 0; padding-left: 18px; font: 400 13.5px/1.6 var(--ff-body); }
.gd-sheet-body .gd-info { margin: 0; }
.gd-size { width: 100%; border-collapse: collapse; font: 500 12.5px/1.2 var(--ff-num); text-align: center; background: #fff; border-radius: 12px; overflow: hidden; }
.gd-size th, .gd-size td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.gd-size th { background: #e4f0fc; color: var(--royal-d); font-weight: 700; }
.gd-size tr:last-child td { border-bottom: 0; }
.gd-sheet-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(60, 120, 190, .12); }
.gd-sheet-bar .gd-price { font-size: 24px; }
.gd-sheet-bar .gd-buy { min-height: 48px; padding: 10px 20px; font-size: 15px; }

@media (prefers-reduced-motion: reduce) { .gd-deadline .dot, .gd-sheet[open] { animation: none; } .gd-pic img { transition: none; } }
#gd-s-note:not([hidden]) { display: block; margin: 0; padding: 8px 12px; border-radius: 12px; font-weight: 600; }
.gd-sheet-share { right: 56px; }
.gd-more { margin-top: 12px; }
.gd-sharebig { background: linear-gradient(180deg, #4fd37e, #1fae56); box-shadow: 0 6px 16px rgba(31, 174, 86, .35), inset 0 1px 0 rgba(255, 255, 255, .45); }
.bar .btn svg, .gd-sharebig svg { width: 16px; height: 16px; }
.adm-row.is-hidden { opacity: .55; }
.adm-row .adm-acts { flex-direction: row; }
