/* 세 템플릿 공통 기계 장치. 색·글꼴·배치는 템플릿 CSS 가 정한다. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100svh; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: break-word; -webkit-tap-highlight-color: transparent; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul, ol, figure, table { margin: 0; }
ul, ol { list-style: none; padding: 0; }
.sheet { max-width: 480px; margin-inline: auto; position: relative; overflow-x: clip; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 계좌 묶음 펼침: JS 가 있을 때만 접는다 */
.js [data-collapsible] { display: none; }
.js [data-collapsible].is-open { display: block; }

/* 누르는 것은 모두 44px 이상 */
.acc-copy, .address-copy, .contact-btn, .map-app, .share-btn, .acc-toggle, .pay, .bgm, .g-item { min-height: 44px; min-width: 44px; }
.map-app, .contact-btn, .share-btn, .pay, .address-copy, .acc-copy { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.acc-number { white-space: nowrap; -webkit-user-select: all; user-select: all; font-variant-numeric: tabular-nums; }
.g-item { display: block; width: 100%; overflow: hidden; }
.g-item img { width: 100%; height: 100%; object-fit: cover; }

/* 알림 */
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 40; max-width: min(440px, calc(100% - 32px)); padding: 13px 18px; font-size: 16px; line-height: 1.45; text-align: center; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity 200ms cubic-bezier(.16, 1, .3, 1), transform 240ms cubic-bezier(.16, 1, .3, 1); }
.toast:empty { display: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* 확대 보기 */
.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; }
.lightbox[open] { display: block; }
.lightbox::backdrop { background: transparent; }
.lb-stage { position: absolute; inset: max(60px, env(safe-area-inset-top)) 12px 84px; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb-close, .lb-prev, .lb-next { position: absolute; width: 52px; height: 52px; display: grid; place-items: center; }
.lb-close svg, .lb-prev svg, .lb-next svg { width: 26px; height: 26px; }
.lb-close { top: max(6px, env(safe-area-inset-top)); right: 6px; }
.lb-prev { left: 8px; bottom: max(14px, env(safe-area-inset-bottom)); }
.lb-next { right: 8px; bottom: max(14px, env(safe-area-inset-bottom)); }
.lb-count { position: absolute; left: 70px; right: 70px; bottom: max(28px, env(safe-area-inset-bottom)); text-align: center; font-variant-numeric: tabular-nums; }

/* 배경음악 */
.bgm { position: fixed; z-index: 30; top: max(12px, env(safe-area-inset-top)); right: max(12px, calc(50% - 228px)); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; }
.bgm-icon { width: 22px; height: 22px; }
.bgm[aria-pressed="true"] .bgm-off, .bgm[aria-pressed="false"] .bgm-on { display: none; }
.bgm-error { position: fixed; z-index: 30; top: calc(max(12px, env(safe-area-inset-top)) + 52px); right: max(12px, calc(50% - 228px)); padding: 6px 10px; font-size: 14px; }

.cal { width: 100%; border-collapse: collapse; text-align: center; font-variant-numeric: tabular-nums; }
.cal th { font-weight: 400; }
.late { font-size: .8em; }
.map-web-hint[hidden], .bgm-error[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
