/* 總管首頁（水墨直書）。整層蓋滿畫面，一頁一個品牌，上下滑會一頁一頁停。
   尺寸用 svh（扣掉手機瀏覽器工具列後的高度），小手機也塞得下。 */
.pt { position: fixed; inset: 0; z-index: 50; font-family: "Noto Serif TC", serif; color: #2B2824; background: #F1DECF; }
.pt-scroll { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pt-page { position: relative; overflow: hidden; height: 100%; min-height: 540px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; }
.pt button { font-family: inherit; color: inherit; cursor: pointer; }
.pt button:focus-visible, .pt a:focus-visible { outline: 2px solid #B98A42; outline-offset: 3px; }

.pt-relax { background: #F4EAE1; }
.pt-floor { background: #EDE2CF; --w1: #CBA97B; --w2: #D8BB91; --w3: #BE9A6A; }
.pt-temple { background: #2E2724; color: #EFE5D2; }
.pt-shop { background: #E8E6D4; }

.pt-inner { width: 100%; max-width: 440px; height: 100%; padding: clamp(24px, 5.2svh, 48px) 40px clamp(34px, 4.6svh, 42px); display: flex; flex-direction: column; justify-content: space-between; gap: clamp(8px, 1.6svh, 16px); position: relative; }
.pt-kicker { margin: 0; font-size: 13px; letter-spacing: 4px; color: #8E4A3A; }
.pt-floor .pt-kicker { color: #75562F; }
.pt-temple .pt-kicker { color: #D8B57A; }
.pt-shop .pt-kicker { color: #4C5638; }

.pt-art { position: relative; flex: 1 1 auto; min-height: 0; max-height: 440px; margin: auto 0; display: flex; justify-content: flex-end; align-items: flex-start; height: 100%; }
.pt-vertical { margin: 0; writing-mode: vertical-rl; font-size: min(29px, 3.5svh, 7.6vw); font-weight: 600; letter-spacing: .17em; line-height: 2; white-space: nowrap; }

.pt-desc { margin: 0; font-size: 14px; line-height: 2; color: #524C43; }
.pt-temple .pt-desc { color: #D9CDB8; }
.pt-shop .pt-desc { color: #464B38; }

.pt-enter { align-self: flex-start; min-height: 44px; display: flex; flex-shrink: 0; align-items: center; gap: 14px; color: inherit; text-decoration: none; font-size: 15px; font-weight: 600; letter-spacing: 4px; }
.pt-enter span[aria-hidden] { width: 56px; height: 1px; background: currentColor; }

.pt-ring { position: absolute; width: 220px; height: 220px; right: -130px; top: -130px; color: #B98A42; pointer-events: none; }
.pt-temple .pt-ring { color: #D9B36A; }

/* ---------- 第一頁 ---------- */
.pt-next { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); white-space: nowrap; min-height: 56px; display: flex; flex-direction: column; align-items: center; padding: 0 20px; border: 0; background: transparent; font-size: 12px; letter-spacing: 6px; color: #6B5B4B !important; }
.pt-next-line { width: 1px; height: 28px; margin-top: 6px; background: currentColor; animation: pt-drift 2.4s ease-in-out infinite; }

/* 團扇名片：所有尺寸跟著扇面寬度 --fan 走，小手機自動縮小 */
.pt-top { --fan: min(84vw, 40svh, 340px); justify-content: center; gap: calc(var(--fan) * .04); padding: 12px 12px 90px; }
.pt-fan { position: relative; width: var(--fan); flex-shrink: 0; display: flex; flex-direction: column; animation: pt-wave 5s ease-in-out infinite; transform-origin: 50% 100%; }
.pt-fan-face { position: relative; z-index: 1; width: var(--fan); height: calc(var(--fan) * 1.03); display: flex; align-items: center; justify-content: center; padding: 0; border: 3px solid #B98A52; border-radius: 50% 50% 48% 48%; background: #FBF4EC; box-shadow: 0 20px 40px rgba(100, 66, 30, .22); }
.pt-fan-face img { display: block; width: 90%; height: auto; aspect-ratio: 1; object-fit: cover; -webkit-mask-image: radial-gradient(circle closest-side, #000 90%, transparent 100%); mask-image: radial-gradient(circle closest-side, #000 90%, transparent 100%); }
.pt-fan-handle { display: block; width: var(--fan); height: calc(var(--fan) * .5294); margin-top: calc(var(--fan) * -.03); }
.pt-greet { position: absolute; z-index: 2; left: 50%; top: calc(var(--fan) * .9); transform: translateX(-50%); margin: 0; padding: 6px 16px; border-radius: 18px; background: #7A4A1A; color: #FFF6E6; font-size: 14px; letter-spacing: 2px; white-space: nowrap; }
.pt-greet:empty { display: none; }
.pt-name { margin: 0; display: flex; flex-direction: column; align-items: center; gap: calc(var(--fan) * .02); font-weight: 600; color: #7A4A1A; line-height: 1.4; }
.pt-name-big { font-size: calc(var(--fan) * .13); letter-spacing: .32em; padding-left: .32em; }
.pt-name-sub { font-size: calc(var(--fan) * .064); letter-spacing: .33em; padding-left: .33em; }
.pt-card-line { min-height: 32px; display: flex; align-items: center; font-size: 13px; letter-spacing: 2px; color: #7A5C34; text-decoration: none; }
@keyframes pt-wave { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

/* ---------- 深呼吸 ---------- */
.pt-breath { position: absolute; left: -12px; top: 24%; width: min(176px, 42vw, 25svh); aspect-ratio: 1; padding: 0; border: 0; background: transparent; font-size: 14px; letter-spacing: 3px; line-height: 2; }
.pt-breath svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pt-breath span { position: relative; }
.pt-breath.is-on svg { animation: pt-breathe 8s ease-in-out infinite; }

/* ---------- 木地板 ---------- */
.pt-planks { position: absolute; left: 0; top: 3%; bottom: 3%; width: min(118px, 30vw); display: flex; gap: 2px; background: #B7A98F; }
.pt-planks i { flex: 1; background: var(--w1); transition: background-color .4s; }
.pt-planks i:nth-child(2) { background: var(--w2); }
.pt-planks i:nth-child(3) { background: var(--w3); }
.pt-woods { display: flex; gap: 26px; flex-shrink: 0; }
.pt-wood { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 0 8px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 14px; }
.pt-wood[aria-pressed="true"] { border-bottom-color: #2B2824; }
.pt-wood i { width: 18px; height: 18px; border-radius: 50%; }

/* ---------- 心燈 ---------- */
.pt-lamp { position: absolute; left: -6px; top: 14%; width: min(150px, 38vw); height: min(240px, 80%); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 14px; padding: 0; border: 0; background: transparent; font-size: 14px; letter-spacing: 3px; }
.pt-lamp svg { position: relative; flex: 1; min-height: 0; width: 100%; }
.pt-lamp span { position: relative; }
.pt-flame { fill: #5A4A40; transition: fill .5s; }
.pt-lamp .pt-lamp-glow { position: absolute; left: 10%; top: 0; width: 80%; aspect-ratio: 1; border-radius: 50%; background: #F2B54A; filter: blur(34px); opacity: 0; transition: opacity .6s; }
.pt-lamp.is-on .pt-flame { fill: #FFC94F; }
.pt-lamp.is-on .pt-lamp-glow { animation: pt-flicker 2.6s ease-in-out infinite; }

/* ---------- 選物 ---------- */
.pt-vase { position: absolute; left: -10px; bottom: 0; height: 82%; max-width: 46%; }
.pt-draw { min-height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0; border: 0; border-top: 1px solid #4C5638; border-bottom: 1px solid #4C5638; background: transparent; text-align: left; font-size: 15px; }
.pt-draw-hint { flex-shrink: 0; font-size: 12px; letter-spacing: 2px; color: #4C5638; }
.pt-back-top { align-self: center; min-height: 40px; flex-shrink: 0; padding: 0 16px; border: 0; background: transparent; font-size: 12px; letter-spacing: 5px; color: #4C5638 !important; }

/* ---------- 右側墨線 ---------- */
.pt-dots { position: absolute; right: max(4px, calc(50% - 236px)); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; padding: 6px 0; border-radius: 14px; background: rgba(238, 234, 224, .8); }
.pt-dots button { width: 24px; height: 30px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; }
.pt-dots i { width: 2px; height: 8px; background: #2B2824; transition: height .25s; }
.pt-dots button[aria-current="true"] i { height: 22px; }

/* ---------- 側邊小蓮花（官方 LINE） ---------- */
.pt-line { position: absolute; right: max(10px, calc(50% - 232px)); bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; }
.pt-line-circle { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border: 1px solid #C79A52; border-radius: 50%; background: #FFF8EC; box-shadow: 0 4px 14px rgba(120, 82, 36, .22); animation: pt-glow 3.6s ease-in-out infinite; }
.pt-line svg { width: 36px; height: 23px; }
.pt-line-label { padding: 1px 7px; border-radius: 9px; background: rgba(255, 248, 236, .92); font-size: 10px; letter-spacing: 1px; color: #6E4E1C; }
.pt-line:active .pt-line-circle { transform: scale(.94); }
@keyframes pt-glow { 0%, 100% { box-shadow: 0 4px 14px rgba(120, 82, 36, .22), 0 0 0 0 rgba(231, 184, 96, .55); } 50% { box-shadow: 0 4px 14px rgba(120, 82, 36, .22), 0 0 0 9px rgba(231, 184, 96, 0); } }

@keyframes pt-drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@keyframes pt-breathe { 0%, 100% { transform: scale(.7); } 45%, 55% { transform: scale(1.08); } }
@keyframes pt-flicker { 0%, 100% { opacity: .45; } 50% { opacity: .8; } }
@media (prefers-reduced-motion: reduce) {
  .pt *, .pt *::before { animation: none !important; transition: none !important; }
}
