/* Shared parts of the redesign drafts. Each draft sets the tokens: --bg --panel --panel2 --line --text --sub --mute --accent --on-accent */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Pretendard Variable', Pretendard, 'Noto Sans KR', 'Malgun Gothic', sans-serif; -webkit-font-smoothing: antialiased; color: var(--text); background: transparent; line-height: 1.6; word-break: keep-all; }
html:not([data-embed]) body { background: #08090a; padding: 28px 12px 64px; }
button { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
.loading { padding: 120px 20px; text-align: center; color: #8f9b94; }

/* grid of works */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); align-items: start; }
@media (min-width: 601px) { .grid:not([style*="--cw:0"]) { grid-template-columns: repeat(var(--cw), minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .grid { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid:not([style*="--cm:0"]) { grid-template-columns: repeat(var(--cm), minmax(0, 1fr)); }
}
.subhead { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 13.5px; font-weight: 700; letter-spacing: .06em; color: var(--accent); }
.subhead:first-child { margin-top: 0; }
.subhead i { width: 3px; height: 14px; border-radius: 2px; background: var(--accent); }
.subhead span { font-weight: 500; letter-spacing: 0; color: var(--mute); }
.tile { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); cursor: zoom-in; transition: transform .25s ease, border-color .25s ease; }
.tile[hidden] { display: none; } /* works past the first few, until "더 보기" */
.tile:hover { transform: translateY(-3px); border-color: var(--accent); }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.frame { position: relative; display: block; overflow: hidden; }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.play { position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(15,20,18,.75); color: var(--accent); font-size: 11px; line-height: 26px; text-align: center; }
.more-btn { display: block; margin: 22px auto 0; padding: 12px 26px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text); font-size: 14px; cursor: pointer; }
.more-btn:hover { border-color: var(--accent); }

/* lightbox: fixed when standalone; inside the iframe it sits on the slice the parent says is on screen */
#lb { position: fixed; inset: 0; z-index: 9999; background: rgba(8,10,9,.95); }
html[data-embed] #lb { position: absolute; top: var(--vp-top, 0px); bottom: auto; height: var(--vp-h, 100vh); }
#lb[hidden] { display: none; }
.lb-back { position: absolute; inset: 0; }
.lb-fig { position: absolute; inset: 56px 64px; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; pointer-events: none; }
.lb-media { min-height: 0; display: flex; justify-content: center; }
.lb-media img, .lb-media video { max-width: 100%; max-height: calc(var(--vp-h, 100vh) - 150px); width: auto; height: auto; border-radius: 10px; pointer-events: auto; }
html:not([data-embed]) .lb-media img, html:not([data-embed]) .lb-media video { max-height: calc(100vh - 150px); }
.lb-fig figcaption { font-size: 13px; color: #9aa59e; }
.lb-x, .lb-nav { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #3a4640; background: #1d2622; color: #d6e6a3; font-size: 24px; line-height: 40px; cursor: pointer; z-index: 2; }
.lb-x { top: 14px; right: 16px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
@media (max-width: 600px) { .lb-fig { inset: 64px 12px 56px; } .lb-nav { top: auto; bottom: 8px; transform: none; } }

/* inquiry form */
.ask fieldset { margin: 0 0 18px; padding: 0; border: 0; }
.ask legend { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 700; font-size: 15px; }
.ask legend b { font-size: 12px; color: var(--accent); letter-spacing: .1em; }
.ask em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--on-accent); background: var(--accent); padding: 1px 6px; border-radius: 4px; margin-left: 4px; vertical-align: 1px; }
/* items are toggle pills, grouped under their price title */
.picks { display: flex; flex-direction: column; gap: 12px; }
.pick-group, .opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pick-title { flex-basis: 100%; font-size: 12.5px; font-weight: 700; color: var(--sub); }
.pick-group.hl .pick-title { color: var(--accent); }
.pick-group.hl .pick-title::after { content: ' · 선택한 항목'; font-weight: 500; }
.pick { position: relative; display: inline-flex; cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick span { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel2); font-size: 13.5px; transition: background .15s, border-color .15s; }
.pick small { color: var(--mute); font-size: 11.5px; white-space: nowrap; }
.pick:hover span { border-color: var(--accent); }
.pick input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.pick input:checked + span small { color: inherit; opacity: .7; }
.pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: block; margin-bottom: 10px; }
.field > span { display: block; font-size: 13px; color: var(--sub); margin-bottom: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field textarea, .field .contact, .ask-out { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); color: var(--text); font: inherit; font-size: 14px; resize: vertical; }
.field textarea:focus, .field .contact:focus { outline: none; border-color: var(--accent); }
.copy-btn[disabled] { opacity: .6; cursor: wait; }
.note { margin: 10px 0 0; font-size: 12.5px; color: var(--mute); }
.agree { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; font-size: 14px; cursor: pointer; }
.agree input { accent-color: var(--accent); width: 18px; height: 18px; }
.copy-btn { width: 100%; padding: 15px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15.5px; cursor: pointer; }
.copy-btn:hover { filter: brightness(1.05); }
.ask-msg { min-height: 1.4em; margin: 10px 0 0; font-size: 13.5px; text-align: center; color: var(--sub); }
.ask-msg.warn { color: #f0b48a; } .ask-msg.ok { color: var(--accent); }
.ask-out { margin-top: 8px; min-height: 160px; }

/* works can't be dragged out, selected or long-pressed to save (iOS / Android); the right-click menu is blocked in artmug-draft.js.
   Images ignore the pointer, so a right-click or long-press lands on the frame around them, never on the picture itself. */
#page img, #page video, #lb img, #lb video { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; pointer-events: none; }
#page .frame, #page .rows, #lb .lb-media { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
#lb .lb-media { pointer-events: auto; }
#lb .lb-media video { pointer-events: auto; } /* the enlarged video keeps its play controls */
.guard-toast { position: fixed; left: 50%; bottom: 28px; z-index: 10000; transform: translate(-50%, 10px); padding: 10px 18px; border-radius: 999px; background: rgba(21,28,25,.95); border: 1px solid #3a4640; color: #eef3ea; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
html[data-embed] .guard-toast { position: absolute; bottom: auto; top: calc(var(--vp-top, 0px) + var(--vp-h, 100vh) - 70px); }
.guard-toast.on { opacity: 1; transform: translate(-50%, 0); }
@media print { #page img, #page video, #page .rows, #lb { visibility: hidden !important; } }

.draft-tag { position: absolute; top: 12px; left: 12px; z-index: 5; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 11.5px; letter-spacing: .04em; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
