/* 안내방송 소개 페이지 — 공지문·가격표 구역(2026-11-21 A안 '네 칸 진열판')
   마크업: views/include/announce_docs.ejs · 동작: announce-docs.js
   칸 안 위치·크기는 칸 폭 기준(cqw)이라 화면 폭이 바뀌어도 그림처럼 같이 줄고 는다.
   CSS 기본값 = 다 놓인 장면(움직임 줄이기·JS 없음). JS 가 구역에 dk-armed(놓이기 전) → dk-in(놓이는 중)을 붙였다 떼고,
   그 뒤에는 종이 자리 이름(s0·s1·s2)만 바꾼다 — 옮기는 일은 아래 transition 이 한다. */

.dk {
  --dk-ink: var(--w-cool-10, #181a1f);
  --dk-sub: var(--w-cool-30, #50535a);
  --dk-muted: #6b6e76;
  --dk-line: var(--w-cool-90, #e2e3e6);
  --dk-brand: var(--w-blue-50, #4f37ff);
  --dk-shadow: 0 1px 2px rgba(24, 26, 31, .10), 0 14px 28px -14px rgba(24, 26, 31, .34);
  background: #fff;
  color: var(--dk-ink);
}
.dk small { font: inherit; color: inherit; letter-spacing: inherit; }

/* ── 머리 ── */
.dk-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px; }
.dk-head-copy { max-width: 860px; }
.dk-kicker { margin: 0; font: 600 15px/1.4 var(--font-sans); color: var(--dk-brand); }
.dk-title { margin: 12px 0 0; font: 700 clamp(28px, 3.2vw, 42px)/1.22 var(--font-sans); letter-spacing: -0.035em; color: var(--dk-ink); text-wrap: balance; }
.dk:lang(ko) .dk-title, .dk:lang(ko) .dk-label { word-break: keep-all; }
/* 일본어는 낱말 가운데서 줄이 끊기지 않게(아는 브라우저만 — 구절 단위 줄바꿈) */
.dk:lang(ja) .dk-title, .dk:lang(ja) .dk-label { word-break: auto-phrase; }
.dk-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.dk-pause {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px;
  border: 1px solid var(--dk-line); border-radius: 10px;
  background: #fff; color: var(--dk-sub);
  font: 600 15px/1 var(--font-sans); white-space: nowrap; cursor: pointer;
}
.dk-pause:hover { color: var(--dk-ink); border-color: #c9ccd2; }
.dk-pause:focus-visible { outline: 3px solid var(--dk-brand); outline-offset: 2px; }
.dk-pause[hidden] { display: none; }
/* 멈춤(막대 둘) ↔ 켜기(세모) */
.dk-pause-ico { position: relative; width: 12px; height: 14px; }
.dk-pause-ico::before, .dk-pause-ico::after { content: ''; position: absolute; top: 0; width: 4px; height: 14px; border-radius: 1.5px; background: currentColor; }
.dk-pause-ico::before { left: 0; }
.dk-pause-ico::after { right: 0; }
.dk-pause[aria-pressed="true"] .dk-pause-ico::before { left: 1px; width: 0; height: 0; border-radius: 0; background: none; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.dk-pause[aria-pressed="true"] .dk-pause-ico::after { display: none; }

/* ── 네 칸 + 아래 넓은 칸 ── */
.dk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.dk-cell { position: relative; overflow: hidden; border-radius: 24px; container-type: inline-size; aspect-ratio: 1.575; }
.dk-cell[data-k="apt"] { background: #e7f0ea; --dk-c: #2f6b4f; }
.dk-cell[data-k="care"] { background: #f8eaef; --dk-c: #8b2346; }
.dk-cell[data-k="mart"] { background: #fdebe6; --dk-c: #c8261a; }
.dk-cell[data-k="living"] { background: #e6eefb; --dk-c: #1d5bb4; }
.dk-label { position: absolute; left: 6cqw; top: 7cqw; width: 29cqw; }
.dk-label h3 { margin: 0; font: 800 max(17px, 4.6cqw)/1.22 var(--font-sans); letter-spacing: -0.03em; color: var(--dk-ink); }
.dk-label p { margin: 1.6cqw 0 0; font: 400 max(12px, 2.7cqw)/1.5 var(--font-sans); color: var(--dk-sub); }
.dk-label p span { display: block; }
/* 로마자·베트남어는 낱말이 길다 — 이름을 조금 작게, 그래도 넘치는 낱말은 꺾는다(종이 밑으로 들어가지 않게) */
.dk-label { overflow-wrap: break-word; }
.dk:lang(en) .dk-cell .dk-label h3, .dk:lang(es) .dk-cell .dk-label h3, .dk:lang(vi) .dk-cell .dk-label h3 { font-size: max(15px, 3.9cqw); }
.dk-from { position: absolute; left: 6cqw; bottom: 6cqw; z-index: 5; display: inline-flex; align-items: center; gap: 1.2cqw; padding: 1.3cqw 2.4cqw; border-radius: 999px; background: #fff; color: var(--dk-c); font: 700 max(11px, 2.5cqw)/1 var(--font-sans); white-space: nowrap; }
.dk-from svg { width: max(13px, 3cqw); height: max(13px, 3cqw); flex-shrink: 0; }

/* 종이 석 장 — 자리 s0(맨 앞)·s1·s2. 넘길 때: 앞 장이 옆으로 빠지고(is-out) 자리 이름이 한 칸씩 돈다 */
.dk-cell { --w: 29cqw; --x0: 64cqw; --y0: 8.5cqw; --r0: 4deg; --x1: 51cqw; --y1: 11.5cqw; --r1: -2.5deg; --x2: 38.5cqw; --y2: 14.5cqw; --r2: -6deg; }
.dk-cell[data-k="living"] { --w: 19.6cqw; --x0: 74.5cqw; --y0: 9cqw; --r0: 3deg; --x1: 57cqw; --y1: 10.5cqw; --r1: -1.5deg; --x2: 39.5cqw; --y2: 12cqw; --r2: -4deg; }
.dk-doc { position: absolute; margin: 0; width: var(--w); transition: left .62s cubic-bezier(.4, 0, .2, 1), top .62s cubic-bezier(.4, 0, .2, 1), rotate .62s cubic-bezier(.4, 0, .2, 1), translate .34s cubic-bezier(.3, .7, .3, 1); }
.dk-doc img { display: block; width: 100%; height: auto; background: #fff; box-shadow: var(--dk-shadow); }
.dk-doc.s0 { left: var(--x0); top: var(--y0); rotate: var(--r0); z-index: 3; }
.dk-doc.s1 { left: var(--x1); top: var(--y1); rotate: var(--r1); z-index: 2; }
.dk-doc.s2 { left: var(--x2); top: var(--y2); rotate: var(--r2); z-index: 1; }
.dk-doc.is-out { translate: 64% -3%; rotate: calc(var(--r0) + 9deg); }

/* 아래 넓은 칸 — 매장 TV 두 대 */
.dk-tv { grid-column: 1 / -1; position: relative; overflow: hidden; border-radius: 24px; background: #eceef2; container-type: inline-size; aspect-ratio: 4.6; }
.dk-tv .dk-label { left: 3cqw; top: 3.2cqw; width: 31cqw; }
.dk-tv .dk-label h3 { font-size: max(17px, 2.3cqw); }
.dk-tv .dk-label p { margin-top: .8cqw; font-size: max(12px, 1.35cqw); }
.dk-tv .dk-label .dk-plan { margin-top: 1.6cqw; font-size: max(11px, 1.1cqw); color: var(--dk-muted); }
.dk-screen { position: absolute; top: 2.4cqw; width: 27cqw; padding: .5cqw; border-radius: .7cqw; background: #15171c; box-shadow: var(--dk-shadow); }
.dk-screen.a { left: 38cqw; }
.dk-screen.b { left: 68.5cqw; }
.dk-screen > div { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: .2cqw; background: #0b0c0f; }
.dk-screen img { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .7s cubic-bezier(.65, 0, .35, 1); }
.dk-screen img + img { transform: translateX(100%); }
.dk-screen.is-b img:first-child { transform: translateX(-100%); }
.dk-screen.is-b img + img { transform: none; }

@media (max-width: 760px) {
  .dk-actions { width: 100%; }
  .dk-actions .btn { flex: 1 1 auto; }
  .dk-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .dk-cell, .dk-tv { border-radius: 20px; }
  .dk-tv { aspect-ratio: 1.72; }
  .dk-tv .dk-label { left: 6cqw; top: 6cqw; width: 88cqw; }
  .dk-tv .dk-label h3 { font-size: max(17px, 4.6cqw); }
  .dk-tv .dk-label p { margin-top: 1.4cqw; font-size: max(12px, 2.7cqw); }
  .dk-tv .dk-label .dk-plan { margin-top: 1.2cqw; font-size: max(11px, 2.4cqw); }
  .dk-screen { top: 29cqw; width: 43cqw; padding: .8cqw; border-radius: 1.2cqw; }
  .dk-screen.a { left: 5.5cqw; }
  .dk-screen.b { left: 51.5cqw; }
}

/* ── 처음 놓이는 움직임(JS 가 붙였다 뗀다) ── */
.dk.dk-armed .dk-label, .dk.dk-armed .dk-from { opacity: 0; transform: translateY(14px); }
.dk.dk-armed .dk-doc img { opacity: 0; transform: translate(18%, 34%) rotate(14deg); }
.dk.dk-armed .dk-screen { opacity: 0; transform: translateY(24px); }
.dk.dk-armed.dk-in .dk-label, .dk.dk-armed.dk-in .dk-from { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--c) * 280ms); }
.dk.dk-armed.dk-in .dk-from { transition-delay: calc(var(--c) * 280ms + 80ms); }
.dk.dk-armed.dk-in .dk-doc img { opacity: 1; transform: none; transition: opacity .45s ease, transform .8s cubic-bezier(.34, 1.5, .64, 1); transition-delay: calc(var(--c) * 280ms + 100ms + var(--n) * 110ms); }
.dk.dk-armed.dk-in .dk-screen { opacity: 1; transform: none; transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(1300ms + var(--n) * 120ms); }

@media (prefers-reduced-motion: reduce) {
  .dk-pause { display: none !important; }
  .dk-doc, .dk-doc img, .dk-screen, .dk-screen img, .dk-label, .dk-from { transition: none !important; }
}
/* 칸 폭 단위(cqw)나 낱개 변형 속성(rotate)을 모르는 옛 브라우저(크롬 105·사파리 16 이전) — 종이 자리가 흩어지니 그림은 숨기고 이름만 */
@supports not ((width: 1cqw) and (rotate: 1deg)) {
  .dk-doc, .dk-screen, .dk-from, .dk-pause { display: none !important; }
  .dk-cell, .dk-tv { aspect-ratio: auto; padding: 24px; }
  .dk-label, .dk-tv .dk-label { position: static; width: auto; }
  .dk-label h3 { font-size: 20px; }
  .dk-label p { margin-top: 6px; font-size: 15px; }
}
