/* taste deal: moss-sand + outfit, radius soft. 기획 = 종이(밝음), 현장 = 슬레이트(inverse) */
:root {
  --bg: #ddd6c6; --surface: #e8e2d4; --paper: #f2efe6; --ink: #2a2a26; --muted: #55534b;
  --line: rgb(42 42 38 / .14); --accent: #4f6238; --accent-ink: #fff;
  --inv-bg: #2a2a26; --inv-surface: #353430; --inv-ink: #ece7db; --inv-muted: #a39e92; --inv-line: rgb(236 231 219 / .14);
  --ok: #7fa35a; --ng: #d0624a; --keep: #d9a441;
  --gut: max(16px, min(6vw, 120px)); /* 헤더와 본문이 같은 좌우 여백 */
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --btn-h: 48px;
  --font: "Outfit", "Pretendard Variable", Pretendard, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: "DM Mono", "Pretendard Variable", Pretendard, ui-monospace, Menlo, monospace; /* DM Mono에 한글 없음 */
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: var(--font);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); min-height: 100dvh; -webkit-font-smoothing: antialiased; transition: background .4s var(--ease); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link { position: absolute; left: var(--gut); top: -60px; z-index: 30; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }

/* ---------- 상단바: 불투명, 헤어라인 1px ---------- */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: 64px;
  padding: 0 var(--gut); background: var(--bg); border-bottom: 1px solid var(--line); transition: background .4s var(--ease); }
.mark { display: block; width: 28px; height: 28px; border-radius: 7px; background: var(--ink); position: relative; overflow: hidden; }
.mark::before { content: ""; position: absolute; inset: 0 0 auto; height: 9px;
  background: repeating-linear-gradient(-55deg, var(--bg) 0 4px, var(--ink) 4px 8px); border-bottom: 2px solid var(--bg); }
.title { flex: 1; min-width: 0; background: none; border: 0; font-weight: 500; font-size: 17px; letter-spacing: -.01em; padding: 8px 0; border-radius: 6px; }
.title:hover { box-shadow: inset 0 -1px 0 var(--line); }
.mode { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.mode button { min-height: 38px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--muted); transition: color .2s, background .25s var(--ease); }
.mode button:hover { color: var(--ink); }
.mode button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); }
.icon svg { fill: currentColor; stroke: none; }
.icon:hover { background: var(--surface); }
.menu { position: absolute; right: var(--gut); top: 60px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 6px; display: flex; flex-direction: column; min-width: 230px; box-shadow: 0 16px 40px rgb(42 42 38 / .16); }
.menu button { text-align: left; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); font-size: 15px; }
.menu button:hover { background: var(--surface); }
.danger { color: #a63d28; }

main { padding: 24px var(--gut) 64px; }

/* ---------- 버튼 (한 쌍) ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--btn-h); padding: 0 24px;
  border-radius: var(--r-sm); font-size: 16px; font-weight: 500; transition: transform .15s var(--ease), background .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: #435431; }
.btn--secondary { border: 1px solid rgb(42 42 38 / .3); }
.btn--secondary:hover { background: var(--surface); }

/* ---------- 첫 화면 (빈 프로젝트) ---------- */
.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; min-height: calc(100dvh - 64px - 88px); padding: 24px 0 32px; }
.hero > * { animation: enter .8s var(--ease) both; }
.hero > :last-child { animation-delay: .12s; }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } }
.eyebrow { margin: 0 0 16px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.hero h1 { margin: 0; font-weight: 500; font-size: clamp(40px, 5.2vw, 72px); line-height: 1.08; letter-spacing: -.04em; word-break: keep-all; }
.lead { margin: 24px 0 32px; font-size: 18px; line-height: 1.65; max-width: 30em; word-break: keep-all; }
.fact { margin: 24px 0 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }

.board { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px; position: relative; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 24px 60px -30px rgb(42 42 38 / .45);
  transition: transform .3s var(--ease), box-shadow .3s; }
.board:hover, .over .board { transform: translateY(-2px); box-shadow: 0 30px 70px -30px rgb(42 42 38 / .55); }
.panel { aspect-ratio: 16/9; border: 1.5px dashed rgb(42 42 38 / .35); border-radius: var(--r-sm); position: relative;
  background-image: linear-gradient(rgb(42 42 38 / .06) 1px, transparent 1px), linear-gradient(90deg, rgb(42 42 38 / .06) 1px, transparent 1px);
  background-size: 33.34% 33.34%; animation: pulse 3.2s var(--ease) infinite; }
.panel:nth-child(2) { animation-delay: .8s; } .panel:nth-child(3) { animation-delay: 1.6s; } .panel:nth-child(4) { animation-delay: 2.4s; }
@keyframes pulse { 0%, 70%, 100% { border-color: rgb(42 42 38 / .35); } 20% { border-color: var(--accent); background-color: rgb(79 98 56 / .08); } }
.panel i { position: absolute; left: 8px; bottom: 6px; font: 500 13px var(--mono); font-style: normal; color: var(--muted); }
.board-hint { grid-column: 1 / -1; margin-top: 8px; text-align: center; font-size: 15px; color: var(--muted); }
.over .panel { border-color: var(--accent); background-color: rgb(79 98 56 / .1); }

/* 컷이 있을 때: 추가 바 */
.drop { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border: 1.5px dashed rgb(42 42 38 / .3);
  border-radius: var(--r-md); cursor: pointer; font-weight: 500; transition: border-color .2s, background .2s; }
.drop small { font-size: 14px; font-weight: 400; color: var(--muted); }
.drop:hover, .over .drop { border-color: var(--accent); background: rgb(79 98 56 / .07); }

/* ---------- 기획: 카드 ---------- */
.grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s; animation: flyin .6s cubic-bezier(.2, .9, .3, 1.15) both; animation-delay: calc(var(--i, 0) * 80ms); }
.card:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -24px rgb(42 42 38 / .5); }
@keyframes flyin { from { opacity: 0; transform: translateY(48px) scale(.9) rotate(-2deg); } }
.card .img { position: relative; aspect-ratio: 16/9; background: var(--ink); cursor: grab; overflow: hidden; border-bottom: 1px solid var(--line); }
.card img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; transition: transform .4s var(--ease); }
.card:hover img { transform: scale(1.025); }
.badge { position: absolute; left: 8px; top: 8px; background: var(--paper); color: var(--ink); padding: 2px 8px; border-radius: 6px; font: 500 13px var(--mono); }
.dot { position: absolute; right: 8px; top: 8px; padding: 2px 8px; border-radius: 6px; font: 500 13px var(--mono); color: var(--ink); }
.dot.OK { background: var(--ok); } .dot.NG { background: var(--ng); } .dot.KEEP { background: var(--keep); }
.card .body { padding: 12px; display: grid; gap: 8px; }
.card .row { display: flex; gap: 8px; }
.card input, .card textarea { width: 100%; background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); padding: 8px; font-size: 16px; line-height: 1.5; transition: border-color .2s, background .2s; }
.card input:hover, .card textarea:hover { border-color: var(--line); }
.card input:focus, .card textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.card ::placeholder { color: #8a867b; }
.card textarea { resize: vertical; min-height: 64px; }
.card .scene { font-family: var(--mono); font-weight: 500; }
.del { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); }
.del:hover { color: #a63d28; background: rgb(166 61 40 / .08); }
.sortable-ghost { opacity: .35; }
.sortable-chosen { box-shadow: 0 24px 50px -20px rgb(42 42 38 / .6); }

/* ---------- 현장 모드: 슬레이트 ---------- */
body[data-mode="field"] { background: var(--inv-bg); color: var(--inv-ink); color-scheme: dark; }
body[data-mode="field"] .top { background: var(--inv-bg); border-color: var(--inv-line); }
body[data-mode="field"] .mark { background: var(--inv-ink); }
body[data-mode="field"] .mark::before { background: repeating-linear-gradient(-55deg, var(--inv-bg) 0 4px, var(--inv-ink) 4px 8px); border-color: var(--inv-bg); }
body[data-mode="field"] .mode { background: var(--inv-surface); border-color: var(--inv-line); }
body[data-mode="field"] .mode button { color: var(--inv-muted); }
body[data-mode="field"] .mode button[aria-selected="true"] { background: var(--inv-ink); color: var(--inv-bg); }
body[data-mode="field"] .icon:hover { background: var(--inv-surface); }
body[data-mode="field"] :focus-visible { outline-color: var(--inv-ink); }

.prog { position: relative; height: 32px; background: var(--inv-surface); border-radius: var(--r-sm); overflow: hidden; margin: 0 auto 16px; max-width: 680px; }
#progBar { height: 100%; width: 0; background: var(--ok); transition: width .6s var(--ease); }
#progTxt { position: absolute; inset: 0; display: grid; place-items: center; font: 500 14px var(--mono); }
.empty { text-align: center; color: var(--inv-muted); padding: 96px 0; font-size: 16px; }
.shot { max-width: 680px; margin: 0 auto; display: grid; gap: 12px; }
.frame { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--r-md); overflow: hidden; touch-action: pan-y; border: 1px solid var(--inv-line); }
.frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.frame.slide img { animation: slide .3s var(--ease); }
@keyframes slide { from { opacity: 0; transform: translateX(var(--dx, 30px)); } }
.nav { position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 64px; display: grid; place-items: center; background: rgb(20 20 18 / .55); color: #fff; transition: background .2s; }
.nav:hover { background: rgb(20 20 18 / .8); }
.nav svg { width: 22px; height: 22px; }
.prev { left: 0; border-radius: 0 var(--r-sm) var(--r-sm) 0; } .next { right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); }
.stamp { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font: 500 clamp(48px, 15vw, 112px) var(--mono); letter-spacing: .02em; opacity: 0; }
.stamp span { border: 6px solid currentColor; border-radius: var(--r-md); padding: 0 24px; transform: rotate(-10deg); background: rgb(20 20 18 / .45); }
.stamp.go { animation: stamp .9s ease-out; }
@keyframes stamp { 0% { opacity: 0; transform: scale(2.4); } 18% { opacity: 1; transform: scale(.94); } 28% { transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }
.frame.shake { animation: shake .3s; }
@keyframes shake { 30% { transform: translate(-4px, 2px); } 60% { transform: translate(3px, -2px); } }
.shot-info b { font: 500 18px var(--mono); letter-spacing: -.01em; }
.shot-info p { margin: 4px 0 0; color: var(--inv-muted); white-space: pre-wrap; font-size: 16px; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags button { min-height: 44px; padding: 0 16px; border: 1px solid var(--inv-line); border-radius: 999px; font-size: 15px; color: var(--inv-muted); transition: border-color .2s, color .2s, background .2s; }
.tags button:hover { color: var(--inv-ink); border-color: rgb(236 231 219 / .35); }
.tags button[aria-pressed="true"] { border-color: var(--ng); color: #f0a08f; background: rgb(208 98 74 / .14); }
.memo { background: var(--inv-surface); border: 1px solid var(--inv-line); border-radius: var(--r-sm); padding: 0 12px; min-height: 48px; font-size: 16px; }
.memo::placeholder { color: var(--inv-muted); }
.rec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.st { min-height: 72px; border-radius: var(--r-md); font: 500 24px var(--mono); color: #1d1d1a; transition: transform .12s var(--ease), filter .2s; }
.st:hover { filter: brightness(1.08); transform: translateY(-1px); }
.st:active { transform: scale(.95); }
.ok { background: var(--ok); } .ng { background: var(--ng); } .keep { background: var(--keep); }
.takes { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.takes li { display: flex; align-items: center; gap: 12px; padding: 4px 0 4px 4px; border-bottom: 1px solid var(--inv-line); font-size: 15px; animation: rowin .35s var(--ease); }
.takes li:first-child { animation-name: rowin; }
@keyframes rowin { from { opacity: 0; transform: translateY(-6px); } }
.takes .s { font: 500 15px var(--mono); width: 40px; }
.takes .s.OK { color: var(--ok); } .takes .s.NG { color: var(--ng); } .takes .s.KEEP { color: var(--keep); }
.takes .m { flex: 1; color: var(--inv-ink); min-width: 0; overflow-wrap: anywhere; }
.takes time { color: var(--inv-muted); font: 13px var(--mono); }
.takes button { width: 44px; height: 44px; color: var(--inv-muted); border-radius: var(--r-sm); }
.takes button:hover { color: var(--inv-ink); background: var(--inv-surface); }
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 16px 4px 4px; max-width: 680px; margin: 0 auto; scrollbar-width: thin; }
.strip button { flex: none; width: 88px; aspect-ratio: 16/9; border-radius: var(--r-sm); overflow: hidden; position: relative;
  border: 2px solid var(--inv-line); background: #000; padding: 0; transition: transform .2s var(--ease); }
.strip button:hover { transform: translateY(-2px); }
.strip button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip button span { position: absolute; left: 4px; bottom: 2px; font: 500 13px var(--mono); color: #fff; text-shadow: 0 0 4px #000; }
.strip .OK { border-color: var(--ok); } .strip .NG { border-color: var(--ng); } .strip .KEEP { border-color: var(--keep); }
.strip .cur { outline: 2px solid var(--inv-ink); outline-offset: 2px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); background: var(--ink); color: var(--paper);
  padding: 12px 20px; border-radius: var(--r-sm); font-size: 15px; font-weight: 500; opacity: 0; transition: .3s var(--ease); pointer-events: none; z-index: 20; }
body[data-mode="field"] .toast { background: var(--inv-ink); color: var(--inv-bg); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 홈 / 프로젝트 화면 전환 ---------- */
body[data-view="home"] .home-only-hide { display: none !important; }
body[data-view="project"] .brand, body[data-view="project"] .spacer { display: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-height: 44px; }
.brand-name { font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
.spacer { flex: 1; }
.auth { min-height: 40px; padding: 0 14px; border: 1px solid rgb(42 42 38 / .3); border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .2s; }
.auth:hover { background: var(--surface); }
.auth.avatar { width: 40px; padding: 0; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 16px; }
body[data-mode="field"] .auth { border-color: var(--inv-line); }
body[data-mode="field"] .auth:hover { background: var(--inv-surface); }
body.signed-in .guest-only { display: none; }
.login-hint { margin: 16px 0 0; font-size: 15px; color: var(--muted); line-height: 1.6; }
.link { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.link:hover { text-decoration-thickness: 2px; }

.projects { padding-top: 32px; }
.projects-head h1 { margin: 0; font-size: clamp(32px, 4vw, 44px); font-weight: 500; letter-spacing: -.03em; }
.projects-head .login-hint { margin-top: 8px; }
.foot { padding: 0 var(--gut) 32px; font-size: 14px; }
.foot a { color: var(--muted); }
body:not([data-view="home"]) .foot { display: none; }
.migrate-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding: 16px 20px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 15px; line-height: 1.5; }
.pgrid { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pgrid li { position: relative; }
.pcard { display: flex; flex-direction: column; height: 100%; width: 100%; text-align: left; color: inherit; text-decoration: none; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s; }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -24px rgb(42 42 38 / .5); }
.pthumb { position: relative; aspect-ratio: 16/9; background: var(--surface); overflow: hidden; border-bottom: 1px solid var(--line); }
.pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.pcard:hover .pthumb img { transform: scale(1.025); }
.pbadge { position: absolute; left: 8px; top: 8px; background: var(--ink); color: var(--paper); font: 500 13px var(--font); padding: 2px 8px; border-radius: 6px; }
.pbody { display: grid; gap: 4px; padding: 14px 16px 16px; }
.pbody b { font-size: 17px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 32px; }
.pbody small { font: 13px var(--mono); color: var(--muted); }
.pnew { align-items: center; justify-content: center; gap: 6px; min-height: 220px; background: transparent; border: 1.5px dashed rgb(42 42 38 / .3); }
.pnew:hover { border-color: var(--accent); background: rgb(79 98 56 / .06); box-shadow: none; }
.pnew-plus { font-size: 40px; line-height: 1; font-weight: 300; color: var(--accent); }
.pnew b { font-size: 17px; font-weight: 500; }
.pnew small { font-size: 14px; color: var(--muted); }
.over .pnew { border-color: var(--accent); background: rgb(79 98 56 / .1); }
.pdel { position: absolute; right: 6px; bottom: 10px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); }
.pdel:hover { color: #a63d28; background: rgb(166 61 40 / .08); }

/* ---------- 샷 정보 칩 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-sel { appearance: none; -webkit-appearance: none; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; font: 500 13px var(--mono); color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.chip-sel:hover { border-color: rgb(42 42 38 / .35); color: var(--ink); }
.chip-sel.set { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-sel:disabled { cursor: default; }
.chip-sel.dur { display: inline-flex; align-items: center; gap: 2px; cursor: text; }
.card .chip-sel.dur input { width: 3.2em; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: right; -moz-appearance: textfield; }
.card .chip-sel.dur input::-webkit-inner-spin-button { -webkit-appearance: none; }
.card .chip-sel.dur input:focus { background: none; }
.card .chip-sel.dur input::placeholder { color: inherit; opacity: .6; }
.plan-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font: 500 14px var(--mono); color: var(--muted); }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; gap: 8px; }

/* ---------- 오버레이 공통 (애니매틱·슬레이트) ---------- */
.ov-open { overflow: hidden; }
.overlay { position: fixed; inset: 0; z-index: 40; background: #121210; color: #ece7db; display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.ov-btn { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 999px; color: #ece7db; transition: background .2s, transform .12s; }
.ov-btn:hover { background: rgb(236 231 219 / .12); }
.ov-btn:active { transform: scale(.94); }
.ov-btn svg { width: 22px; height: 22px; }
.ov-btn--main { background: #ece7db; color: #121210; width: 56px; height: 56px; }
.ov-btn--main:hover { background: #fff; }
.overlay :focus-visible { outline-color: #ece7db; }

.anim-segs { display: flex; gap: 4px; }
.anim-segs span { height: 4px; border-radius: 2px; background: rgb(236 231 219 / .2); overflow: hidden; flex-basis: 0; }
.anim-segs i { display: block; height: 100%; width: 0; background: #ece7db; }
.anim-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 16px 0; }
.anim-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-md); }
.anim-stage img.in { animation: animIn .5s var(--ease); }
@keyframes animIn { from { opacity: 0; transform: scale(1.03); } }
.anim-cap { max-width: 760px; width: 100%; margin: 0 auto; min-height: 84px; }
.anim-cap b { font: 500 15px var(--mono); color: #a39e92; }
.anim-cap p { margin: 6px 0 0; font-size: 18px; line-height: 1.55; white-space: pre-wrap; }
.anim-ctrl { display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 8px; }
.anim-time { font: 500 14px var(--mono); color: #a39e92; min-width: 96px; text-align: center; }

.slate-ov { align-items: center; justify-content: center; gap: 16px; }
.sl-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; }
.sl-board { width: min(560px, 100%); padding: 0; text-align: left; color: #ece7db; display: block; cursor: pointer; }
.sl-clap { display: block; height: 52px; transform-origin: 6px 100%; transform: rotate(-16deg); transition: transform .2s; }
.sl-clap i, .sl-bar { display: block; height: 52px; border-radius: 6px 6px 0 0;
  background: repeating-linear-gradient(-60deg, #ece7db 0 28px, #1d1d1a 28px 56px); border: 3px solid #ece7db; }
.sl-bar { height: 40px; border-radius: 0; margin-top: 4px; background: repeating-linear-gradient(60deg, #ece7db 0 28px, #1d1d1a 28px 56px); }
.sl-clap.shut { transform: rotate(0); animation: clap .28s cubic-bezier(.6, 0, .9, .4) forwards; }
@keyframes clap { 0% { transform: rotate(-16deg); } 85% { transform: rotate(1deg); } 100% { transform: rotate(0); } }
.sl-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 3px solid #ece7db; border-top: 0; background: #1d1d1a; }
.sl-cell { padding: 10px 14px 12px; border-right: 1px solid rgb(236 231 219 / .25); border-bottom: 1px solid rgb(236 231 219 / .25); display: grid; gap: 2px; min-width: 0; }
.sl-cell:nth-child(3n + 1) { border-right: 1px solid rgb(236 231 219 / .25); }
.sl-cell small { font: 500 13px var(--mono); color: #a39e92; }
.sl-cell b { font: 500 clamp(28px, 9vw, 52px) var(--mono); letter-spacing: -.02em; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-prod { grid-column: 1 / -1; }
.sl-cell:last-child { grid-column: span 2; }
.sl-date b { font-size: clamp(22px, 6.5vw, 44px); }
.sl-prod b { font-size: clamp(20px, 5vw, 28px); font-family: var(--font); font-weight: 500; }
.sl-hint { margin: 0; font-size: 15px; color: #a39e92; text-align: center; }
.sl-nav { display: flex; align-items: center; gap: 8px; width: min(560px, 100%); }
.sl-rec { flex: 1; }

/* ---------- 현장 상단: 진행률 + 슬레이트 버튼 ---------- */
.field-top { display: flex; gap: 8px; align-items: center; max-width: 680px; margin: 0 auto 16px; }
.field-top .prog { flex: 1; margin: 0; }
.slate-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: var(--r-sm); background: var(--inv-surface); color: var(--inv-ink); font-weight: 500; font-size: 15px; transition: background .2s; }
.slate-btn:hover { background: #45443f; }

/* ---------- 공유 ---------- */
.sync { flex: none; font: 500 13px var(--mono); color: var(--accent); background: rgb(79 98 56 / .12); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
body[data-mode="field"] .sync { color: var(--ok); background: rgb(127 163 90 / .14); }
.readonly .chip-sel:not(.set) { display: none; }
.readonly .del, .readonly .rec, .readonly .tags, .readonly .memo, .readonly .takes button, .readonly .edit-only { display: none !important; }
.readonly .card .img { cursor: default; }
.empty-shared { text-align: center; color: var(--muted); padding: 96px 0; font-size: 16px; }
.dlg { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); }
.dlg::backdrop { background: rgb(42 42 38 / .45); }
.dlg form { display: grid; gap: 20px; padding: 24px; }
.dlg h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.link-row { display: grid; gap: 8px; }
.link-row label { font-weight: 500; font-size: 16px; }
.link-row small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 2px; }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; min-width: 0; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font: 14px var(--mono); }
.dlg-note { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.dlg-close { justify-self: end; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; min-height: 0; padding-top: 16px; }
  .board { padding: 16px; gap: 12px; }
}
@media (max-width: 520px) {
  .top { gap: 8px; }
  .sync { padding: 4px 8px; font-size: 13px; }
  .pnew { min-height: 120px; }
  .auth:not(.avatar) { padding: 0 12px; }
  .mode button { padding: 0 12px; }
  .btn-row .btn { flex: 1 1 100%; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .lead { font-size: 17px; }
  .st { min-height: 64px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .stamp.go { animation: fade 1s !important; } /* 기록 피드백은 움직임 없이 유지 */
}
@keyframes fade { 0%, 70% { opacity: 1; } }
