/* ============ Mac จำลอง — macOS วินเทจ (Aqua) x กรอบ SHOWREEL.EXE สีมะนาว ============ */
.mac {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  transform-origin: 0 0;
  visibility: hidden; opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
  overflow: hidden;
  background: #2a62d8;
  font-family: var(--font-ui);
  font-size: 13px;
  color: #111;
  z-index: 8;
  /* ฟอนต์หัวข้อในหน้าต่าง Mac (Finder/About/Skills/Contact) เป็นของตัวเอง ไม่ตาม --font-display ที่ใช้กับชื่อ METAWIN (เปลี่ยนไปมาตามที่เจ้าของเลือก) */
  --font-mac-title: "Bagel Fat One", "Mitr", system-ui, sans-serif;
}
.mac.is-live { pointer-events: auto; touch-action: none; }
.mac-ui { position: absolute; inset: 0; z-index: 1; }
.mac-ui[inert] { pointer-events: none; }

/* ---------- วอลเปเปอร์: ฟ้าโคบอลต์ + ตารางขาว + ก้อนมะนาว ---------- */
.mac-wall {
  position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 120%, rgba(255, 255, 255, .0) 40%, rgba(5, 20, 120, .5) 100%),
    linear-gradient(rgba(255, 255, 255, .22) 1.5px, transparent 1.5px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(255, 255, 255, .22) 1.5px, transparent 1.5px) 0 0 / 64px 64px,
    linear-gradient(180deg, #0f3fd0 0%, #1d5cea 38%, #3a8be8 78%, #67b0ee 100%);
}
.wl-blob { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #efffa8 0, var(--lime) 40%, #6fd13b 100%); box-shadow: 0 30px 60px -20px rgba(0, 40, 0, .5), inset 0 -14px 24px rgba(30, 130, 40, .35); }
.wl-blob-a { width: 36vmax; height: 36vmax; right: -12vmax; top: -16vmax; }
.wl-blob-b { width: 20vmax; height: 20vmax; left: -8vmax; bottom: -9vmax; }
.wl-blob-c { width: 6vmax; height: 6vmax; right: 14%; bottom: 17%; opacity: .9; }
.wl-name {
  position: absolute; right: 3.2%; bottom: 13%;
  font-family: var(--font-display); font-size: clamp(54px, 10vw, 150px); line-height: 1; letter-spacing: .01em;
  color: rgba(255, 255, 255, .16);
  user-select: none; pointer-events: none;
}

/* ---------- เมนูบาร์ Aqua ---------- */
.mb {
  position: absolute; left: 0; right: 0; top: 0; height: 28px; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 0 4px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .0) 0 1px, rgba(255, 255, 255, .28) 1px 2px),
    linear-gradient(180deg, #fcfdff 0%, #eef1f8 46%, #d9deec 54%, #cdd3e4 100%);
  border-bottom: 1px solid #7e89ad;
  box-shadow: 0 2px 8px rgba(5, 20, 80, .35), inset 0 1px 0 #fff;
}
.mb-left, .mb-right { display: flex; align-items: center; gap: 2px; min-width: 0; }
.mb-right { gap: 12px; }
.mb-btn {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border: 0; border-radius: 5px;
  background: transparent; font: inherit; font-size: 13px; color: #111; cursor: default;
}
.mb-logo { color: var(--cobalt); padding: 0 8px; }
.mb-btn:hover, .mb-btn[aria-expanded="true"] {
  color: #fff;
  background: linear-gradient(180deg, #7eb0ff 0%, #2f6bff 50%, #1a4fe0 52%, #4d8bff 100%);
  box-shadow: inset 0 0 0 1px rgba(10, 40, 160, .5), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.mb-app { font-weight: 700; padding: 0 10px; font-size: 13px; }
.mb-menu { position: relative; display: inline-block; }
.mb-drop {
  position: absolute; left: 0; top: 24px; min-width: 210px; padding: 4px;
  display: flex; flex-direction: column;
  border-radius: 0 0 8px 8px; background: rgba(247, 249, 255, .96);
  box-shadow: 0 14px 30px -6px rgba(5, 20, 80, .55), inset 0 0 0 1px rgba(80, 95, 150, .45);
  backdrop-filter: blur(14px);
}
.mb-drop[hidden] { display: none; }
.mb-drop button {
  text-align: left; border: 0; background: transparent; font: inherit; font-size: 13px; color: #111;
  padding: 5px 12px; border-radius: 4px; cursor: default;
}
.mb-drop button:hover, .mb-drop button:focus-visible {
  color: #fff; outline: 0; box-shadow: none;
  background: linear-gradient(180deg, #7eb0ff, #2f6bff 50%, #1a4fe0 52%, #4d8bff);
}
.mb-sys { display: inline-flex; align-items: center; gap: 10px; color: #222; }
.mb-clock { font-size: 13px; color: #111; white-space: nowrap; }
.mb .pill-sm { min-height: 22px; padding: 0 12px; font-size: 12px; }

/* ---------- เดสก์ท็อป + ไอคอน ---------- */
.desk { position: absolute; left: 0; right: 0; top: 28px; bottom: 0; }
.icons {
  position: absolute; left: 22px; top: 88px;   /* เผื่อบน = การ์ดพัดที่ลอยขึ้น ~70px ต้องไม่ชนเมนูบาร์ */
  --fan-x: 36px; --fan-y1: 50px; --fan-y2: 62px; --fan-y3: 48px;   /* ระยะพัดของการ์ดพรีวิว (มือถือย่อให้พอดีจอ) */
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, 148px); grid-auto-columns: 136px; gap: 4px 6px;
}
.dicon {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 4px 6px; border: 0; background: transparent; cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent; border-radius: 16px;
}
.dicon:hover, .dicon:focus-visible { z-index: 5; }
.dicon:focus-visible { outline-offset: -2px; }
.ico { position: relative; display: block; width: 108px; height: 84px; perspective: 340px; transition: transform .45s var(--ease-spring); }
.dicon:hover .ico, .dicon:focus-visible .ico { transform: translateY(-9px) scale(1.07); }
.dicon:active .ico { transform: translateY(-2px) scale(.97); transition-duration: .1s; }
.dlabel {
  max-width: 128px; padding: 3px 11px 4px; border-radius: 999px;
  font-size: 13px; line-height: 1.25; color: #fff; text-align: center;
  text-shadow: 0 1px 2px rgba(0, 20, 90, .85);
  transition: background .25s, color .25s, box-shadow .25s, transform .35s var(--ease-spring);
}
.dicon:hover .dlabel, .dicon:focus-visible .dlabel {
  color: var(--ink); text-shadow: none; transform: translateY(-3px) scale(1.06);
  background: linear-gradient(180deg, #fff, #dfe9ff); box-shadow: var(--puff), inset 0 0 0 1.5px #fff;
}
.dicon.is-sel .dlabel { color: #fff; text-shadow: 0 1px 1px rgba(0, 20, 90, .6); background: linear-gradient(180deg, #7eb0ff, #2f6bff 50%, #1a4fe0 52%, #4d8bff); box-shadow: inset 0 0 0 1px rgba(10, 40, 160, .6), inset 0 1px 0 rgba(255, 255, 255, .6); }
.dbadge {
  position: absolute; right: -8px; top: -10px; z-index: 6; min-width: 28px; height: 28px; padding: 0 7px;
  display: grid; place-items: center; border-radius: 999px;
  font-family: var(--font-pixel); font-size: 12px; font-weight: 700; color: var(--ink);
  background: linear-gradient(180deg, #f0ffb0, var(--lime) 50%, #9bd820 52%, #c4f23a);
  box-shadow: var(--puff), inset 0 0 0 1.5px #fff;
  transition: transform .4s var(--ease-spring);
}
.dicon:hover .dbadge, .dicon:focus-visible .dbadge { transform: translateY(-6px) rotate(8deg) scale(1.12); }

/* โฟลเดอร์ Aqua (วาดด้วย CSS) + การ์ดพรีวิวพัดออก */
.fo-back, .fo-front { position: absolute; left: 0; right: 0; border-radius: 14px; }
.fo-back {
  top: 8px; bottom: 0;
  background: linear-gradient(180deg, var(--fb1), var(--fb2));
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55), 0 14px 18px -8px rgba(0, 20, 100, .6);
}
.fo-back::before { content: ""; position: absolute; left: 8px; top: -8px; width: 44px; height: 14px; border-radius: 9px 9px 0 0; background: linear-gradient(180deg, var(--fb1), var(--fb2)); }
.fo-front {
  top: 22px; bottom: 0;
  transform-origin: 50% 100%;
  transition: transform .5s var(--ease-spring);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .85) 0, rgba(255, 255, 255, .15) 46%, rgba(255, 255, 255, 0) 50%),
    linear-gradient(180deg, var(--ff1), var(--ff2));
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7), inset 0 -6px 10px rgba(0, 20, 100, .2), 0 -2px 6px rgba(0, 20, 100, .18);
}
.dicon:hover .fo-front, .dicon:focus-visible .fo-front { transform: rotateX(-30deg); }
.tone-sky { --fb1: #4d8bff; --fb2: #1c4fe0; --ff1: #9cc7ff; --ff2: #3b79f0; }
.tone-lime { --fb1: #a9e02a; --fb2: #6fb312; --ff1: #e8ffa0; --ff2: #b4ea34; }
.fo-card {
  position: absolute; left: 50%; bottom: 14px; width: 62px; height: 78px; margin-left: -31px;
  overflow: hidden; border: 3px solid #fff; border-radius: 8px; background: #fff;
  box-shadow: 0 6px 12px -2px rgba(0, 20, 100, .5);
  transform: translate3d(0, 0, 0) rotate(0) scale(.9);
  transition: transform .55s var(--ease-spring);
}
.fo-card img { width: 100%; height: 100%; object-fit: cover; }
.dicon:hover .fo-c1, .dicon:focus-visible .fo-c1 { transform: translate3d(calc(var(--fan-x) * -1), calc(var(--fan-y1) * -1), 0) rotate(-16deg) scale(1); transition-delay: 0s; }
.dicon:hover .fo-c2, .dicon:focus-visible .fo-c2 { transform: translate3d(0, calc(var(--fan-y2) * -1), 0) rotate(2deg) scale(1); transition-delay: .04s; }
.dicon:hover .fo-c3, .dicon:focus-visible .fo-c3 { transform: translate3d(var(--fan-x), calc(var(--fan-y3) * -1), 0) rotate(17deg) scale(1); transition-delay: .08s; }
.fo-card.tool img { object-fit: contain; padding: 4px; background: linear-gradient(180deg, #fff, #dfe9ff); }

/* ไอคอนไฟล์วิดีโอ / เอกสาร / จดหมาย */
.film {
  position: absolute; left: 4px; right: 4px; top: 4px; bottom: 4px; overflow: hidden; border: 4px solid #fff; border-radius: 10px;
  background: #1d5cea url("../assets/showreel-poster.webp") center / cover; transform: rotate(-4deg);
  box-shadow: 0 12px 18px -6px rgba(0, 20, 100, .6), -2px 0 0 1px rgba(255, 79, 216, .6), 2px 0 0 1px rgba(79, 224, 255, .7);
  transition: transform .5s var(--ease-spring);
}
.dicon:hover .film, .dicon:focus-visible .film { transform: rotate(2deg) scale(1.06); }
.film .tri {
  position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: 50%;
  background: linear-gradient(180deg, #f0ffb0, var(--lime) 50%, #9bd820 52%, #c4f23a); box-shadow: var(--puff);
}
.film .tri::after { content: ""; position: absolute; left: 12px; top: 8px; border-left: 11px solid var(--ink); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.paper {
  position: absolute; left: 14px; right: 14px; top: -6px; bottom: 0; border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, transparent 0 9px, rgba(34, 80, 244, .18) 9px 10px) 0 40px / 100% 100% no-repeat,
    linear-gradient(180deg, #fff, #e6edff);
  clip-path: polygon(0 0, 78% 0, 100% 22%, 100% 100%, 0 100%);
  box-shadow: inset 0 0 0 2px #fff;
  transition: transform .5s var(--ease-spring);
}
.paper-wrap { position: absolute; inset: 0; filter: drop-shadow(0 10px 8px rgba(0, 20, 100, .5)); }
.paper .av { position: absolute; left: 50%; top: 10px; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 2px var(--lime); }
.paper .av img { position: absolute; width: 172.5%; left: -36.9%; top: -103.5%; max-width: none; height: auto; }
.dicon:hover .paper, .dicon:focus-visible .paper { transform: translateY(-8px) rotate(4deg); }
/* ซองจดหมาย Contact = SVG ชิ้นเดียว (mac.js envelopeArt): ชั้น หลังซอง → ฝาเปิด → จดหมาย → หน้าซอง → ฝาปิด
   ปิด: ฝาปิดคลุมรอยบากรูป V · ชี้: ฝาปิดพับเหลือเส้นบานพับ (scaleY→0 รอบขอบบน) แล้วฝาเปิดกางขึ้นจากเส้นเดียวกัน (scaleY 0→1) จดหมายเลื่อนขึ้น — ทุกอย่าง transform/opacity */
.env { position: absolute; left: 2px; top: 0; width: 104px; height: 84px; overflow: visible; filter: drop-shadow(0 12px 8px rgba(0, 20, 100, .45)); }
.env-flap, .env-flap-open, .env-letter { transform-box: fill-box; }
.env-flap { transform-origin: 50% 0; transition: transform .2s var(--ease-smooth-out, ease), opacity 0s linear .2s; }
.env-flap-open { transform-origin: 50% 100%; transform: scaleY(0); opacity: 0; transition: transform .26s var(--ease-smooth-out, ease) .16s, opacity 0s linear .16s; }
.env-letter { opacity: 0; transition: transform .45s var(--ease-spring), opacity .1s linear; }
.dicon:hover .env-flap, .dicon:focus-visible .env-flap { transform: scaleY(0); opacity: 0; }
.dicon:hover .env-flap-open, .dicon:focus-visible .env-flap-open { transform: scaleY(1); opacity: 1; }
.dicon:hover .env-letter, .dicon:focus-visible .env-letter { transform: translateY(-12px); opacity: 1; transition: transform .45s var(--ease-spring) .12s, opacity .1s linear .12s; }

/* ไอคอนไฟล์ PDF แบบ Aqua (Resume.pdf): กระดาษมีมุมพับ + แถบ PDF แดงเจล + เส้นข้อความ · ชี้แล้วกระดาษเด้งขึ้น
   ยึดตำแหน่งเดิมของ Showreel (ซ้ายล่างของพื้นที่ไอคอน) · ถ้าเปิด Showreel กลับมา (SHOW_SHOWREEL_ICON) Resume ไปท้ายสุด = มุมขวาบน */
.pdf-wrap { position: absolute; inset: 0; filter: drop-shadow(0 10px 8px rgba(0, 20, 100, .5)); }
.pdf {
  position: absolute; left: 20px; right: 20px; top: -6px; bottom: 0; border-radius: 6px;
  background: linear-gradient(180deg, #fff, #e6edff); clip-path: polygon(0 0, 74% 0, 100% 24%, 100% 100%, 0 100%);
  box-shadow: inset 0 0 0 2px #fff; transition: transform .5s var(--ease-spring);
}
.pdf-fold { position: absolute; left: 74%; top: 0; width: 26%; height: 24%; background: linear-gradient(135deg, #cddcfb, #a9bff0); clip-path: polygon(0 0, 100% 100%, 0 100%); }
.pdf-tag {
  position: absolute; left: 6px; right: 6px; top: 26px; height: 20px; border-radius: 5px; display: grid; place-items: center;
  font-family: var(--font-pixel); font-style: normal; font-weight: 700; font-size: 11px; letter-spacing: .12em; color: #fff;
  background: linear-gradient(180deg, #ff9a80, #ff4b34 52%, #d92c14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), 0 2px 3px rgba(120, 20, 0, .35);
}
.pdf-ln { position: absolute; left: 8px; right: 8px; top: 56px; height: 3px; border-radius: 2px; background: rgba(34, 80, 244, .28); }
.pdf-ln + .pdf-ln { top: 64px; }
.pdf-ln.s { top: 72px; right: 24px; }
.dicon:hover .pdf, .dicon:focus-visible .pdf { transform: translateY(-8px) rotate(-4deg); }

.mw-card { display: none; }   /* การ์ดเติมเดสก์ท็อปมือถือ (mac.js buildMobileWidgets) — แสดงเฉพาะจอ < 768px */

/* ---------- หน้าต่าง: กรอบมะนาว SHOWREEL.EXE + ปุ่มเจล Aqua ---------- */
.wins { position: absolute; inset: 0; pointer-events: none; }
.win {
  position: absolute; left: 0; top: 0; display: flex; flex-direction: column; pointer-events: auto;
  border-radius: 14px; background: #fff; overflow: hidden;
  box-shadow:
    0 0 0 2px #fff, -3px 0 0 2px rgba(255, 79, 216, .6), 3px 0 0 2px rgba(79, 224, 255, .7),
    0 30px 60px -12px rgba(4, 16, 70, .65), 0 12px 24px -8px rgba(4, 16, 70, .4);
}
.win:focus { outline: 0; }
.win-bar {
  position: relative; flex: none; height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .55) 0, rgba(255, 255, 255, 0) 50%),
    linear-gradient(180deg, #e2ff7e 0%, var(--lime) 50%, #98d61c 52%, #b6ea2e 100%);
  border-bottom: 2px solid #5d9a0e;
  cursor: grab; touch-action: none; user-select: none;
}
.win-bar:active { cursor: grabbing; }
.win:not(.is-active) .win-bar { filter: saturate(.5) brightness(1.06); }
.win-lights { display: flex; gap: 8px; z-index: 2; }
.tl {
  position: relative; width: 15px; height: 15px; padding: 0; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .38); cursor: default;
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .25), 0 1px 0 rgba(255, 255, 255, .6);
}
.tl::before { content: ""; position: absolute; left: 3px; right: 3px; top: 1px; height: 6px; border-radius: 50%; background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .15)); }
.tl::after { content: ""; position: absolute; inset: -9px -3px; } /* ขยายพื้นที่กด */
.tl-c { background: radial-gradient(circle at 50% 120%, #ffc1b3 0 8%, #ff4b34 50%, #b3190a 100%); }
.tl-m { background: radial-gradient(circle at 50% 120%, #ffeaa0 0 8%, #ffbf1f 50%, #c68500 100%); }
.tl-z { background: radial-gradient(circle at 50% 120%, #c8ffb5 0 8%, #35cf3d 50%, #167a1b 100%); }
.win-title {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; margin: 0;
  display: block; padding: 0 90px; line-height: 38px; text-align: center;
  font-family: var(--font-pixel); font-size: 13px; font-weight: 700; letter-spacing: .04em; color: #1a3406;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7); text-transform: uppercase;
  pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.win-body {
  position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-y;
  background: repeating-linear-gradient(0deg, #f7f9fe 0 2px, #eef2fb 2px 4px);
}
.win.is-max { border-radius: 0; }
/* โหมดดูกลางจอ (ปุ่มเขียวของหน้าต่างคลิป/รูป): ฉากดำ 70% ทับทั้งจอ (รวมเมนูบาร์/Dock) · หน้าต่างอยู่เหนือฉาก */
.theater-dim { position: absolute; inset: 0; z-index: 100; background: rgba(0, 0, 0, .7); opacity: 0; pointer-events: none; transition: opacity var(--duration-quick, 150ms) linear; }
.theater-dim.is-on { opacity: 1; pointer-events: auto; transition-duration: var(--duration-fast, 250ms); }
.win.is-theater { z-index: 101 !important; }
.win.is-theater .win-bar { cursor: default; }

/* ---------- Finder ---------- */
.fd { display: flex; height: 100%; min-height: 0; }
.fd-side {
  flex: none; width: 188px; padding: 12px 8px; display: flex; flex-direction: column; gap: 3px; overflow: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, #e3eafc, #cbd8f6); border-right: 1px solid #8fa0cf;
}
.fd-side h3 { margin: 8px 8px 4px; font-size: 11px; font-weight: 700; color: #5a6aa0; letter-spacing: .04em; }
.fd-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 0; border-radius: 7px;
  background: transparent; font: inherit; font-size: 13px; text-align: left; color: #111; cursor: default;
}
.fd-item:hover { background: rgba(255, 255, 255, .55); }
.fd-item[aria-current="true"] { color: #fff; background: linear-gradient(180deg, #7eb0ff 0%, #2f6bff 50%, #1a4fe0 52%, #4d8bff 100%); box-shadow: inset 0 0 0 1px rgba(10, 40, 160, .55), inset 0 1px 0 rgba(255, 255, 255, .6); }
.fd-item .mini { width: 18px; height: 14px; border-radius: 3px; flex: none; background: linear-gradient(180deg, #9cc7ff, #3b79f0); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7); }
.fd-item .mini.lime { background: linear-gradient(180deg, #e8ffa0, #b4ea34); }
.fd-item .cnt { margin-left: auto; font-size: 11px; opacity: .75; }
.fd-resume { margin-top: 2px; }
.fd-resume .mini-pdf { display: grid; place-items: center; width: 20px; height: 20px; flex: none; }
.fd-resume .cnt { display: grid; opacity: .6; }
.fd-resume:hover .cnt { opacity: 1; }
.fd-main { flex: 1; min-width: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 18px 20px 26px; background: #fff; }
.fd-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; }
.fd-head h2 { margin: 0; font-family: var(--font-mac-title); font-size: 30px; font-weight: 400; line-height: 1.1; color: var(--ink); }
.fd-head span { font-size: 12px; color: #5a6aa0; }
.fd-note { margin: 0 0 16px; max-width: 62ch; padding: 12px 16px; border-radius: 22px; background: linear-gradient(180deg, #f3f8d8, #e9f6b0); box-shadow: inset 0 0 0 1.5px #fff, 0 6px 14px -8px rgba(60, 100, 10, .5); font-family: var(--font-body); font-size: 14px; line-height: 1.6; color: #22300a; }
.masonry { list-style: none; margin: 0; padding: 0; columns: 3 150px; column-gap: 14px; }
.masonry li { break-inside: avoid; margin: 0 0 14px; }
.tile, .ptile { position: relative; display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; cursor: default; font-family: inherit; }
.tile-img { position: relative; display: block; overflow: hidden; border-radius: 18px; border: 4px solid #fff; background: #cfdcff; box-shadow: 0 8px 18px -6px rgba(16, 22, 52, .45), 0 0 0 1px rgba(80, 100, 170, .35); transition: transform .4s var(--ease-spring), box-shadow .3s; }
.tile-img img, .ptile-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.tile:hover .tile-img, .tile:focus-visible .tile-img, .ptile:hover .ptile-img, .ptile:focus-visible .ptile-img { transform: translateY(-4px) scale(1.03); box-shadow: var(--puff), 0 0 0 2px var(--lime); }
.dur {
  position: absolute; left: 10px; bottom: 10px; padding: 3px 9px 4px; border-radius: 999px;
  font-family: var(--font-pixel); font-size: 12px; font-weight: 700; color: #fff; background: rgba(16, 22, 52, .78);
}
.tile-play { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #f0ffb0, var(--lime) 50%, #9bd820 52%, #c4f23a); box-shadow: var(--puff); opacity: 0; transform: scale(.6); transition: opacity .25s, transform .4s var(--ease-spring); }
.tile:hover .tile-play, .tile:focus-visible .tile-play { opacity: 1; transform: scale(1); }
.tile-name { display: block; margin: 7px 4px 0; font-size: 12px; color: #34406e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile-img { position: relative; display: block; overflow: hidden; border-radius: 18px; border: 4px solid #fff; background: #cfdcff; box-shadow: 0 8px 18px -6px rgba(16, 22, 52, .45), 0 0 0 1px rgba(80, 100, 170, .35); transition: transform .4s var(--ease-spring), box-shadow .3s; }

/* ---------- เนื้อหาเอกสาร (About / Skills / Contact) ---------- */
.doc { padding: 22px 26px 30px; background: #fff; min-height: 100%; }
.doc h2 { margin: 0 0 6px; font-family: var(--font-mac-title); font-weight: 400; font-size: 34px; line-height: 1.05; color: var(--ink); }
.doc h3 { margin: 22px 0 8px; font-family: var(--font-pixel); font-size: 13px; letter-spacing: .05em; color: var(--cobalt); }
.doc p { margin: 0 0 10px; font-family: var(--font-body); font-size: 14.5px; line-height: 1.7; color: #1b2147; max-width: 62ch; }
.who { display: flex; gap: 32px; align-items: center; margin: 24px 0 8px; }   /* เว้นบน 24px ให้หัวใจ/กล้องของหัวขยับไม่ถูกตัดขอบหน้าต่าง */
.who-av { position: relative; flex: none; width: 128px; height: 128px; overflow: hidden; border-radius: 50%; background: radial-gradient(circle at 36% 28%, #fff, #dbe8ff); box-shadow: 0 0 0 5px var(--lime), 0 0 0 8px #fff, 0 14px 22px -8px rgba(16, 22, 52, .5); }
.who-av img { position: absolute; width: 172.5%; left: -36.9%; top: -103.5%; max-width: none; height: auto; }
/* หัว Memoji ขยับ (video.head-vid / รูปนิ่งตอน reduced-motion): พื้นโปร่ง ไม่ถูกตัดด้วยวงกลม — หัวใจ/กล้อง/หลอดไฟโผล่เลยขอบแผ่นกลมได้ · หัวอยู่กลางแผ่น (ตัวหัวต่ำกว่ากลางเฟรมเล็กน้อย) */
.who-av { overflow: visible; }
.who-av .head-vid, .who-av .head-still { position: absolute; left: 50%; top: 50%; width: 176px; height: 176px; max-width: none; margin: -100px 0 0 -88px; object-fit: contain; background: transparent; pointer-events: none; }
.role { margin: 0; font-family: var(--font-body); font-size: 15px; color: #34406e; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; padding: 0; list-style: none; }
.chips li { padding: 5px 14px 6px; border-radius: 999px; font-family: var(--font-body); font-size: 13.5px; background: linear-gradient(180deg, #f1ffb8, var(--lime) 55%, #a9de25); box-shadow: inset 0 0 0 1.5px #fff, 0 4px 10px -4px rgba(60, 100, 10, .55); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.timeline li { padding: 12px 16px; border-radius: 22px; background: linear-gradient(180deg, #f6f9ff, #e6eeff); box-shadow: inset 0 0 0 1.5px #fff, 0 6px 14px -8px rgba(16, 22, 52, .45); font-family: var(--font-body); font-size: 14px; line-height: 1.5; }
.timeline b { display: block; font-weight: 500; color: var(--ink); }
.timeline .bul { margin: 8px 0 0; padding: 0 0 0 18px; list-style: disc; display: grid; gap: 3px; font-size: 13.5px; color: #1b2147; }
.timeline .bul li { padding: 0; border-radius: 0; background: none; box-shadow: none; font-size: 13.5px; line-height: 1.55; }
.timeline span { color: #4a5688; font-size: 13px; }
.linkrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.linkrow a, .biglink {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px;
  font-family: var(--font-body); font-size: 15px; text-decoration: none; color: var(--ink);
  background: linear-gradient(180deg, #fff, #dfe9ff 54%, #cddcfb); box-shadow: var(--puff), inset 0 0 0 1.5px #fff;
  transition: transform .3s var(--ease-spring);
}
.linkrow a:hover, .biglink:hover { transform: translateY(-2px) scale(1.04); }
.linkrow a.lime, .biglink.lime { background: linear-gradient(180deg, #ecffa4, var(--lime) 46%, #a4dc22 54%, #c9f545); }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; border-radius: 22px; background: linear-gradient(180deg, #f6f9ff, #e4ecff); box-shadow: inset 0 0 0 1.5px #fff, 0 6px 14px -8px rgba(16, 22, 52, .45); font-family: var(--font-body); font-size: 13px; text-align: center; transition: transform .4s var(--ease-spring), box-shadow .3s; }
.tool img { width: 56px; height: 56px; }
.tool.is-hl { animation: hl 1.4s var(--ease-spring) 2; box-shadow: 0 0 0 3px var(--lime), var(--puff); }
.tool:hover { transform: translateY(-4px) scale(1.05); }
@keyframes hl { 0%, 100% { transform: scale(1); } 40% { transform: translateY(-8px) scale(1.1); } }
.quote { margin: 0 0 6px; padding: 14px 18px; border-radius: 22px; background: linear-gradient(180deg, #f3f8d8, #e9f6b0); box-shadow: inset 0 0 0 1.5px #fff; font-family: var(--font-body); font-size: 14px; line-height: 1.65; color: #22300a; }
.contact-lead { font-size: 15px; }
.contact-list { display: grid; gap: 12px; margin-top: 16px; max-width: 420px; }

/* ---------- Resume.pdf: ภาพพรีวิว A4 พอดีหน้าต่าง + แถบปุ่มใต้ภาพ ---------- */
.rs { display: flex; flex-direction: column; height: 100%; background: #0b1a38; }
.rs-view { flex: 1; min-height: 0; display: grid; place-items: center; background: #0b1a38; }
.rs-img { width: 100%; height: 100%; object-fit: contain; user-select: none; }
.rs-bar { flex: none; height: 58px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px; background: linear-gradient(180deg, #f7f9fe, #dfe8fc); border-top: 1px solid #8fa0cf; }
.rs-btn { flex: 0 1 auto; min-width: 0; min-height: 38px; padding: 0 12px; font-size: 13.5px; text-decoration: none; white-space: nowrap; }   /* หน้าต่างแคบ (~340px) ปุ่มสองอันต้องพอดีแถบ */

/* ---------- Player / Preview ---------- */
.player { position: relative; height: 100%; background: #0a0f2a; display: grid; place-items: center; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #0a0f2a; }
.player-msg { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; color: #fff; background: rgba(10, 15, 42, .88); font-family: var(--font-body); }
.player.has-error .player-msg { display: flex; }
.pv { position: relative; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #1b2a6b, #0a0f2a); }
.pv img { width: 100%; height: 100%; object-fit: contain; transition: opacity .25s; }   /* หน้าต่างถูกปรับให้ตรงสัดส่วนรูปจริงแล้ว (mac.js photoGeom) → เต็มกรอบพอดี ไม่มีแถบ */
.pv-nav {
  position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; border: 0; border-radius: 50%; display: grid; place-items: center; color: var(--ink); cursor: default;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(210, 225, 255, .9)); box-shadow: var(--puff), inset 0 0 0 1.5px #fff;
  transition: transform .3s var(--ease-spring);
}
.pv-nav:hover { transform: scale(1.12); }
.pv-prev { left: 14px; } .pv-next { right: 14px; }
.pv-count { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; padding: 4px 14px 5px; border-radius: 999px; font-family: var(--font-pixel); font-size: 12px; font-weight: 700; color: var(--ink); background: rgba(255, 255, 255, .92); }

/* ---------- Dock (กระจกใส + เงาสะท้อน) ---------- */
.dock {
  position: absolute; left: 50%; bottom: 8px; translate: -50% 0; z-index: 55;
  display: flex; align-items: flex-end; gap: 8px; height: 66px; padding: 5px calc(14px + var(--dk-gx, 0px) / 2) 6px;   /* ความสูงกรอบคงที่ตลอด · --dk-gx: ตอนชี้ กรอบกว้างออกซ้าย-ขวาตามไอคอนที่ขยาย (mac.js magnify) ไม่ยืดขึ้นบน */
  border-radius: 20px 20px 10px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(176, 208, 255, .38) 50%, rgba(255, 255, 255, .5));
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 18px 30px -10px rgba(4, 16, 70, .6), inset 0 1px 0 #fff, inset 0 -8px 14px rgba(255, 255, 255, .25);
  backdrop-filter: blur(14px) saturate(1.5);
}
.dk { position: relative; flex: none; width: 42px; height: 42px; padding: 0; border: 0; background: transparent; cursor: default; transform-origin: 50% 100%; -webkit-box-reflect: below -2px linear-gradient(transparent 62%, rgba(255, 255, 255, .32)); will-change: transform; }
.dk img, .dk .dk-ico { width: 100%; height: 100%; display: block; object-fit: contain; }   /* สัดส่วนจริง ไม่บีบ */
.dk-invert img { filter: invert(1); }   /* CapCut: พื้นขาว → พื้นดำอักษรขาว ให้เข้าชุดกับ Adobe */
.dk-plated { border-radius: 22%; background: linear-gradient(180deg, #46527c 0%, #1b2447 52%, #0d1230 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .45); }
.dk-plated img { box-sizing: border-box; padding: 13%; }
.dk-ico { border-radius: 22%; display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .8), inset 0 -8px 12px rgba(0, 20, 120, .25), 0 4px 8px rgba(4, 16, 70, .4); background: linear-gradient(180deg, #8ec0ff, #2f6bff 55%, #1a4fe0); position: relative; overflow: hidden; }
.dk-ico::before { content: ""; position: absolute; left: 4px; right: 4px; top: 2px; height: 46%; border-radius: 10px 10px 18px 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .05)); }
.dk-ico.lime { color: var(--ink); background: linear-gradient(180deg, #efffa8, var(--lime) 55%, #8fd62a); }
.dk-ico svg { position: relative; filter: drop-shadow(0 1px 1px rgba(0, 30, 120, .45)); }
.dk-ico.dk-art { background: none; box-shadow: none; border-radius: 0; overflow: visible; }   /* ไอคอนที่วาดแผ่นมนเองใน SVG (Finder) */
.dk-ico.dk-art::before { display: none; }
.dk-ico.dk-art svg { filter: drop-shadow(0 3px 4px rgba(4, 16, 70, .4)); }
.dk-sep { flex: none; width: 2px; height: 36px; margin: 0 4px; align-self: center; border-radius: 2px; background: linear-gradient(180deg, rgba(255, 255, 255, .0), rgba(255, 255, 255, .9), rgba(255, 255, 255, 0)); }
.dk .dot { position: absolute; left: 50%; bottom: -4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #fff; opacity: 0; box-shadow: 0 0 4px #fff; }
.dk.is-open .dot { opacity: 1; }
.dk-min { width: 34px; height: 34px; }
.dk-min .dk-ico { border-radius: 9px; }
.dock-tip {
  position: absolute; z-index: 70; left: 0; top: 0; padding: 4px 12px 5px; border-radius: 999px; pointer-events: none; opacity: 0;
  font-size: 13px; color: #fff; white-space: nowrap; background: linear-gradient(180deg, rgba(40, 60, 130, .92), rgba(12, 22, 70, .94));
  box-shadow: 0 8px 16px -4px rgba(4, 16, 70, .6), inset 0 0 0 1px rgba(255, 255, 255, .35);
  transition: opacity .15s;
}

/* ---------- ลำดับวิดีโอโชว์รีล ---------- */
.reel { position: absolute; inset: 0; z-index: 40; background: linear-gradient(180deg, #0f43d0 0%, #1a56e0 45%, #3a97da 100%); transition: opacity .6s linear; }
.reel-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; transform: scale(var(--reel-cover, 1)); transition: transform .5s cubic-bezier(.3, .7, .2, 1); }
/* reel.js ตั้ง --reel-cover = ตัวคูณที่ทำให้ contain เท่ากับ cover (ก่อน live/จอใกล้ 16:9) หรือ 1 (contain จริง)
   จอต่างจาก 16:9 มาก: ตอน live เติมที่ว่างด้วยเฟรมเดียวกันแบบเบลอจริง + มืดลง (canvas.reel-bg + .reel-shade ที่ reel.js สร้าง) — ก่อน live ไม่แสดงเลย (ชั้นเดียว) */
.reel-bg, .reel-shade { display: none; position: absolute; pointer-events: none; opacity: 0; transition: opacity .45s linear; }
.reel-bg { left: -12%; top: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(30px) saturate(1.2) brightness(.82); }   /* กว้าง/สูง 124% (ซูม ~1.1+) กันขอบเบลอโปร่งใส */
.reel-shade { inset: 0; background: rgba(4, 14, 60, .42); }
.reel.fit-blur .reel-bg, .reel.fit-blur .reel-shade { display: block; }
.reel.is-fitlive .reel-bg, .reel.is-fitlive .reel-shade { opacity: 1; }
.reel.is-fitlive.is-flash .reel-shade { opacity: 0; transition-duration: .35s; }
.reel-white { position: absolute; inset: 0; background: #fff; opacity: 0; transition: opacity .1s linear; pointer-events: none; }
.reel.is-white .reel-white { opacity: 1; }
.reel.is-out { opacity: 0; pointer-events: none; }
.reel.is-fast { transition-duration: .28s; }
.reel.is-hidden { visibility: hidden; }
.reel-skip { position: absolute; right: 20px; bottom: 20px; z-index: 3; }

/* ---------- มือถือ (<768px): ไอคอนกริดแบบ iOS + หน้าต่างเต็มจอ ---------- */
@media (max-width: 767px) and (min-height: 880px) { .icons { grid-template-rows: repeat(2, 196px); grid-auto-rows: 196px; } .mw-profile { min-height: 124px; } .mw-thumb { height: 100px; } }
@media (max-width: 767px) {
  .mb { height: 44px; padding: 0 8px 0 2px; }
  .mb-left .mb-menu, .mb-app, .mb-sys { display: none; }
  .mb-logo { height: 40px; padding: 0 14px; }
  .mb-right { gap: 8px; }
  .mb .pill-sm { min-height: 34px; padding: 0 16px; font-size: 13px; }
  .mb .pill-sm::before { content: ""; position: absolute; inset: -6px -4px; }
  /* เดสก์ท็อปมือถือ (รอบ 4 ข้อ 2): เรียงเป็นชั้นตามความสูงจอ — การ์ดโปรไฟล์ (หัวขยับ) → ไอคอน 3 คอลัมน์ x 2 แถวขนาดใหญ่ → การ์ดงานล่าสุด → Dock ล่างพอดี
     ส่วนที่เหลือของความสูงแบ่งเท่าๆ กันระหว่างชั้น (space-between) · จอสูง ≥ 880px ขยายแถวไอคอน */
  .desk { top: 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 12px 12px calc(58px + max(8px, env(safe-area-inset-bottom)) + 12px); }
  .icons { --fan-x: clamp(6px, calc((100vw - 28px) / 6 - 40px), 24px); --fan-y1: 40px; --fan-y2: 50px; --fan-y3: 38px; position: static; flex: none; grid-auto-flow: row; grid-template-rows: repeat(2, 172px); grid-template-columns: repeat(3, 1fr); grid-auto-rows: 172px; padding: 0; gap: 6px 4px; }
  .dicon { padding-top: 30px; gap: 12px; }
  .dbadge { top: 20px; right: 2px; }   /* เจ้าของ 2026-10-31: มือถือป้ายจำนวนลอยห่างโฟลเดอร์ (เว้นบน 30px) → เกาะมุมขวาบนของโฟลเดอร์ */
  .ico { transform: scale(1.06); }
  .dlabel { font-size: 13px; padding: 3px 8px 4px; white-space: nowrap; }
  .mw-card { display: block; position: relative; z-index: 1; flex: none; border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(222, 234, 255, .76)); box-shadow: var(--puff), inset 0 0 0 1.5px #fff; }
  .mw-profile { display: flex; align-items: center; gap: 22px; padding: 14px 16px 14px 14px; min-height: 112px; }
  .mw-av { position: relative; flex: none; width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle at 36% 28%, #fff, #dbe8ff); box-shadow: 0 0 0 4px var(--lime), 0 0 0 6px #fff, 0 10px 16px -8px rgba(16, 22, 52, .5); }
  .mw-av .head-vid, .mw-av .head-still { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -68px 0 0 -60px; max-width: none; object-fit: contain; pointer-events: none; }
  .mw-id { min-width: 0; }
  .mw-id h2 { margin: 0; font-family: var(--font-mac-title); font-size: 19px; line-height: 1.1; color: var(--ink); }
  .mw-id p { margin: 3px 0 9px; font-family: var(--font-body); font-size: 12.5px; color: #34406e; }
  .mw-cta .pill { min-height: 34px; padding: 0 14px; font-size: 13px; text-decoration: none; }
  .mw-latest { padding: 10px 12px 12px; }
  .mw-latest header { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 6px; }
  .mw-latest h3 { margin: 0; font-family: var(--font-pixel); font-size: 12px; letter-spacing: .05em; color: var(--cobalt); }
  .mw-more { min-height: 36px; padding: 0 6px; border: 0; background: none; font-family: var(--font-body); font-size: 13px; color: var(--cobalt); text-decoration: underline; text-underline-offset: 3px; }
  .mw-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .mw-thumb { position: relative; display: block; height: 86px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #cfdcff; box-shadow: 0 0 0 2px #fff, 0 6px 12px -6px rgba(16, 22, 52, .5); }
  .mw-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .mw-play { position: absolute; right: 5px; bottom: 5px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(180deg, #f0ffb0, var(--lime) 50%, #9bd820 52%, #c4f23a); }
  .mw-play svg { width: 12px; height: 12px; }
  .win { left: 0 !important; top: 0 !important; width: 100% !important; height: calc(100% - 72px) !important; border-radius: 16px 16px 8px 8px; transform: none !important; box-shadow: 0 -8px 30px rgba(4, 16, 70, .45); }
  .win-bar { cursor: default; height: 46px; }
  .tl { width: 22px; height: 22px; }
  .tl::before { left: 4px; right: 4px; height: 9px; }
  .tl::after { inset: -12px -6px; }
  .win-lights { gap: 12px; }
  .win-title { padding: 0 108px; font-size: 12px; line-height: 46px; }
  .fd { flex-direction: column; }
  .fd-side { width: 100%; flex: none; flex-direction: row; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid #8fa0cf; gap: 4px; }
  .fd-side h3 { display: none; }
  .fd-item { width: auto; flex: none; white-space: nowrap; padding: 8px 12px; min-height: 44px; }
  .fd-item .cnt { margin-left: 6px; }
  .fd-side .fd-resume { order: -1; margin-top: 0; }   /* มือถือ: แถบข้างเลื่อนแนวนอน → ให้ Resume.pdf มาก่อน เห็นทันทีไม่ต้องเลื่อน */
  .fd-main { padding: 14px 14px 24px; }
  .masonry { columns: 2 130px; column-gap: 10px; }
  .fd-head h2 { font-size: 24px; }
  .dock { height: 58px; bottom: max(8px, env(safe-area-inset-bottom)); padding: 6px 8px 5px; gap: 4px; max-width: calc(100% - 12px); border-radius: 18px; }
  .dk { width: 40px; height: 40px; }
  .dk-sep, .dk-fin, .dk-con { display: none; }
  .doc { padding: 18px 18px 28px; }
  .who { flex-direction: column; text-align: center; }
  .reel-skip { right: 12px; bottom: 14px; }
  .pv-nav { width: 52px; height: 52px; margin-top: -26px; }
}
/* มือถือ + แท็บเล็ต (เจ้าของ 2026-10-31): เอาแถบ Dock ไอคอนโปรแกรมออก (บัง "งานล่าสุด") — เหลือ Dock เฉพาะตอนมีหน้าต่างย่อเก็บไว้ (ปุ่มเรียกคืน) */
@media (max-width: 767px), (pointer: coarse) and (max-width: 1366px) {
  .dk-tool, .dk-sep, .dk-fin, .dk-con { display: none; }
  .dock:not(:has(.dk-min)) { display: none; }
}
@media (max-aspect-ratio: 1/1) {
  .reel { background:
    linear-gradient(rgba(255, 255, 255, .22) 1.5px, transparent 1.5px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, .22) 1.5px, transparent 1.5px) 0 0 / 56px 56px,
    linear-gradient(180deg, #1d4fe8, #67b0ee); }
}
@media (prefers-reduced-motion: reduce) {
  .ico, .dlabel, .fo-front, .fo-card, .film, .paper, .pdf, .env-flap, .env-flap-open, .env-letter, .dbadge, .tile-img, .ptile-img, .tool, .pill { transition: none !important; }
  .reel, .reel-video, .reel-bg, .reel-shade, .theater-dim { transition: none; }
  .tool.is-hl { animation: none; }
}

/* ---------- สติกเกอร์ 3D emoji (Microsoft Fluent Emoji, MIT) ---------- */
.ico-emoji {
  position: absolute; right: -10px; bottom: -8px; z-index: 4; width: 44px; height: 44px;
  filter: drop-shadow(0 4px 4px rgba(0, 20, 100, .45));
  transition: transform .5s var(--ease-spring); pointer-events: none;
}
.dicon:hover .ico-emoji, .dicon:focus-visible .ico-emoji { transform: translateY(-5px) rotate(-10deg) scale(1.16); }
.mini-emo { width: 20px; height: 20px; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 20, 100, .35)); }
.doc { position: relative; }
/* emoji ตกแต่งหัวเอกสาร: ลอยขวาในโฟลว์ (float) → ข้อความไหลเลี่ยง ไม่ถูกทับทุกขนาดจอ · ใน About (.who) เป็นไอเทมท้ายแถวชื่อ */
.doc-emo { float: right; width: 72px; height: 72px; margin: 0 0 6px 14px; filter: drop-shadow(0 6px 6px rgba(0, 20, 100, .35)); transform: rotate(8deg); pointer-events: none; }
.who { position: relative; }
.who .doc-emo { float: none; flex: none; margin: 0 0 0 auto; }
@media (max-width: 767px) {   /* ต้องอยู่หลังกฎ .doc-emo ด้านบน ไม่งั้นถูกทับ */
  .doc-emo { width: 56px; height: 56px; }
  .who .doc-emo { position: absolute; right: 0; top: 0; margin: 0; }
}
.credit { margin: 22px 0 0; font-family: var(--font-body); font-size: 12px; }
.credit a { color: #34406e; text-decoration: underline; text-underline-offset: 3px; }
.credit-2 { margin-top: 6px; }

/* ---------- ชีวิตชีวาบนเดสก์ท็อป (เบาๆ) ----------
   ใช้เฉพาะ translate / rotate / scale / opacity (property แยกจาก transform ของ hover, พัดการ์ด, Dock magnify จึงไม่ซ้อนทับกัน)
   เดินเฉพาะตอน #mac.is-live.is-desk (เดสก์ท็อปโผล่แล้ว) · นอกนั้น paused · reduced-motion ปิดหมด */
@keyframes ico-float { 0%, 100% { translate: 0 0; rotate: -2.4deg; } 50% { translate: 0 -4px; rotate: 2.4deg; } }
@keyframes emo-dance { 0%, 100% { translate: 0 0; rotate: -8deg; scale: 1; } 25% { translate: 1px -4px; rotate: 6deg; scale: 1.06; } 50% { translate: 0 -2px; rotate: 9deg; scale: 1; } 75% { translate: -1px -4px; rotate: -5deg; scale: 1.06; } }
@keyframes dicon-wiggle { 0% { rotate: 0deg; } 18% { rotate: -3.6deg; } 42% { rotate: 3deg; } 66% { rotate: -1.6deg; } 100% { rotate: 0deg; } }
/* ก้อนกลมมะนาว: เลื่อนผ่านช้าๆ จากซ้ายไปขวาอย่างเดียว (ไม่หมุน ไม่ย่อขยาย) — เริ่มที่ตำแหน่งเดิมบนวอลเปเปอร์ → ไหลออกขอบขวา → โผล่จากขอบซ้ายแล้วเลื่อนกลับมาตำแหน่งเดิม
   จุดกระโดด (xx.01%) เกิดตอนก้อนอยู่นอกจอทั้งสองฝั่ง จึงเนียน · เปอร์เซ็นต์คิดตามระยะทางที่ 16:10 ให้ความเร็วคงที่ */
@keyframes wl-slide-a { 0% { translate: 0 0; } 19.4% { translate: 28vmax 0; } 19.41% { translate: calc(-100vw - 16vmax) 0; } 100% { translate: 0 0; } }
@keyframes wl-slide-b { 0% { translate: 0 0; } 87.5% { translate: calc(100vw + 12vmax) 0; } 87.51% { translate: -16vmax 0; } 100% { translate: 0 0; } }
@keyframes wl-slide-c { 0% { translate: 0 0; } 20.5% { translate: calc(14vw + 9vmax) 0; } 20.51% { translate: calc(-86vw - 3vmax) 0; } 100% { translate: 0 0; } }
@keyframes wl-shine { 0%, 62% { background-position: 100% 0; } 82%, 100% { background-position: 0 0; } }

.dicon .ico, .dicon .dbadge { animation: ico-float var(--fl-t, 5.6s) ease-in-out var(--fl-d, 0s) infinite; animation-play-state: paused; }
.dicon .ico-emoji { animation: emo-dance calc(var(--fl-t, 5.6s) * .48) ease-in-out var(--fl-d, 0s) infinite; animation-play-state: paused; }
.dicon:nth-child(1) { --fl-t: 5.2s; --fl-d: -.6s; }
.dicon:nth-child(2) { --fl-t: 6.1s; --fl-d: -2.1s; }
.dicon:nth-child(3) { --fl-t: 5.6s; --fl-d: -3.4s; }
.dicon:nth-child(4) { --fl-t: 6.4s; --fl-d: -1.2s; }
.dicon:nth-child(5) { --fl-t: 5s; --fl-d: -4.4s; }
.dicon:nth-child(6) { --fl-t: 5.9s; --fl-d: -2.8s; }
.dicon:nth-child(7) { --fl-t: 5.4s; --fl-d: -3.9s; }
.dicon:hover, .dicon:focus-visible { animation: dicon-wiggle .7s ease-out; transform-origin: 50% 70%; }   /* ชี้แล้ววิกเกิลสั้นๆ (ซ้อนกับพัดการ์ดที่มีอยู่) */
.wl-blob-a { animation: wl-slide-a 170s linear infinite; animation-play-state: paused; }
.wl-blob-b { animation: wl-slide-b 130s linear infinite; animation-play-state: paused; }
.wl-blob-c { animation: wl-slide-c 70s linear infinite; animation-play-state: paused; }
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .wl-name {
    color: transparent; -webkit-background-clip: text; background-clip: text;
    background-image: linear-gradient(105deg, rgba(255, 255, 255, .16) 0 40%, rgba(255, 255, 255, .6) 50%, rgba(255, 255, 255, .16) 60% 100%);
    background-size: 280% 100%; background-repeat: no-repeat; background-position: 100% 0;
    animation: wl-shine 11s ease-in-out infinite; animation-play-state: paused;
  }
}
.mac.is-live.is-desk .dicon .ico, .mac.is-live.is-desk .dicon .dbadge, .mac.is-live.is-desk .dicon .ico-emoji,
.mac.is-live.is-desk .wl-blob-a, .mac.is-live.is-desk .wl-blob-b, .mac.is-live.is-desk .wl-blob-c, .mac.is-live.is-desk .wl-name { animation-play-state: running; }
@media (prefers-reduced-motion: reduce) {
  .dicon .ico, .dicon .dbadge, .dicon .ico-emoji, .dicon:hover, .dicon:focus-visible, .wl-blob, .wl-name { animation: none !important; }
}
