/* 만들기 화면 — 왼쪽은 적는 자리, 오른쪽은 찍혀 나온 종이. 색은 잉크 두 가지만 쓴다. */
body.making { background: #fff; }
.mk-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.mk-top .brand { font-size: 20px; }
.mk-top .brand svg { width: 33px; height: 22px; }
.mk-state { margin: 0 0 0 auto; font-size: 15px; color: var(--sub); text-align: right; line-height: 1.35; }
.mk-state.bad { color: var(--bad); font-weight: 500; }
.mk-top .btn.main.s { border-color: var(--blue); min-width: 96px; }
.mk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 22px; background: #fff4d2; font-size: 16px; }
.mk-bar .btn { background: #fff; }
.mk { display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: clamp(24px, 4vw, 70px); max-width: 1180px; margin-inline: auto; padding: 0 22px; }
.mk-tabs { grid-column: 1; display: flex; gap: 4px; padding: 14px 0 0; border-bottom: 1.5px solid var(--ink); }
.mk-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px 10px; border: 0; background: none; font-size: 16.5px; font-weight: 500; color: var(--sub); cursor: pointer; border-radius: 8px 8px 0 0; }
.mk-tabs button:hover { background: var(--wash); }
.mk-tabs button[aria-pressed=true] { background: var(--ink); color: #fff; font-weight: 700; }
.mk-tabs svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.mk-tabs .only-s { display: none; }
.mk-pane { grid-column: 1; grid-row: 2; padding: 6px 0 90px; min-width: 0; }
.mk-view { grid-column: 2; grid-row: 1 / 3; position: sticky; top: 64px; align-self: start; height: calc(100dvh - 64px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 0; }
.mk-phone { width: 100%; max-width: 390px; flex: 1; max-height: 790px; min-height: 0; box-shadow: 0 0 0 1px var(--line), 0 18px 50px rgba(38, 47, 82, .12); background: #fff; }
.mk-phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.mk-view .note { margin: 10px 0 0; text-align: center; }
.mk-wait { padding: 40px 0; min-height: 90vh; color: var(--sub); }

/* 접었다 펴는 칸 */
.ed { border-bottom: 1px solid var(--line); scroll-margin-top: 70px; }
.ed > summary { display: flex; align-items: center; gap: 14px; padding: 17px 30px 17px 0; cursor: pointer; list-style: none; position: relative; }
.ed > summary::-webkit-details-marker { display: none; }
.ed > summary b { font: 600 19px/1.35 var(--serif); flex: none; }
.ed > summary span { color: var(--sub); font-size: 15.5px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-left: auto; text-align: right; }
.ed > summary::after { content: ''; position: absolute; right: 8px; top: 50%; margin-top: -7px; width: 8px; height: 8px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ed[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.ed[open] > summary { color: var(--blue); }
.ed[open] > summary span { display: none; }
.ed > div { padding: 4px 0 26px; }
.ed.off > summary b { color: #8c94ae; }
.row { display: grid; gap: 10px; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); }
.row.name { grid-template-columns: 84px minmax(0, 1fr) 104px; }
.row.par { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.1fr); align-items: end; }
.row.par .check { min-height: 48px; align-items: center; margin-bottom: 16px; white-space: nowrap; }
.row.par .check input { margin: 0; }
.mk .field { margin-bottom: 14px; }
.mk .field > span:first-child, .mk .label { font-size: 15px; font-weight: 500; color: var(--sub); margin-bottom: 4px; }
.who { border: 0; margin: 0 0 18px; padding: 0; }
.who legend { font: 600 17.5px/1.4 var(--serif); padding: 0; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.who legend i { width: 13px; height: 13px; border-radius: 50%; background: var(--blue); }
.who.b legend i { background: var(--coral); }
.mk .check { margin-bottom: 14px; }
.hint { font-size: 15px; color: var(--sub); line-height: 1.6; margin: 0 0 14px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; margin-bottom: 16px; background: var(--wash); border-radius: 8px; cursor: pointer; font-size: 16px; }
.switch input { appearance: none; width: 46px; height: 27px; border-radius: 99px; background: #bfc8e0; position: relative; margin: 0; flex: none; cursor: pointer; transition: background .15s; }
.switch input::after { content: ''; position: absolute; left: 3px; top: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--blue); }
.switch input:checked::after { transform: translateX(19px); }

/* 고르는 단추 */
.picks { border: 0; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.picks legend { font-size: 15px; font-weight: 500; color: var(--sub); padding: 0; margin-bottom: 6px; }
.picks label { position: relative; cursor: pointer; }
.picks input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.picks label > span { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 7px 14px; border: 1.5px solid #bfc8e0; border-radius: 8px; font-size: 16px; line-height: 1.3; background: #fff; }
.picks input:checked + span { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: var(--wash); font-weight: 700; }
.picks input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 2px; }
.picks i { width: 27px; height: 18px; position: relative; flex: none; }
.picks i::before, .picks i::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; top: 0; left: 0; background: var(--x); box-shadow: 0 0 0 1px rgba(38, 47, 82, .1); }
.picks i::after { left: 9px; background: var(--y); }
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; border: 0; padding: 0; margin: 0 0 18px; }
.themes legend { font-size: 15px; font-weight: 500; color: var(--sub); padding: 0; margin-bottom: 6px; }
.themes label { position: relative; cursor: pointer; display: block; text-align: center; font-size: 15.5px; }
.themes input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.themes img { display: block; width: 100%; aspect-ratio: 390 / 700; object-fit: cover; background: var(--wash); box-shadow: 0 0 0 1px var(--line); margin-bottom: 6px; }
.themes input:checked + span img { box-shadow: 0 0 0 3px var(--blue); }
.themes input:checked + span { font-weight: 700; }
.themes input:focus-visible + span img { outline: 3px solid var(--coral); outline-offset: 4px; }
.themes small { display: block; font-size: 13.5px; color: var(--sub); font-weight: 400; line-height: 1.3; }
input[type=range] { width: 100%; accent-color: var(--blue); }

/* 사진 */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; }
.shots li { position: relative; aspect-ratio: 1; background: var(--wash); touch-action: manipulation; }
.shots img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shots li.drag { opacity: .4; }
.shots li.over { box-shadow: 0 0 0 3px var(--coral); }
.shots .tools { position: absolute; inset: auto 0 0 0; display: flex; background: rgba(28, 36, 70, .72); }
.shots .tools button { flex: 1; min-height: 36px; border: 0; background: none; color: #fff; font-size: 15px; cursor: pointer; }
.shots .tools button:hover { background: rgba(255, 255, 255, .18); }
.shots .tools button[disabled] { opacity: .35; }
.shots .up { position: absolute; left: 6px; top: 6px; padding: 1px 8px; border-radius: 99px; background: #fff; font-size: 13px; }
.shots .up.bad { background: var(--bad); color: #fff; border: 0; cursor: pointer; }
.onepic { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; }
.onepic img { width: 120px; height: 150px; object-fit: cover; background: var(--wash); }
.onepic.wide img { width: 220px; height: 160px; }
.onepic .btns { flex: 1; min-width: 180px; }
.file { position: relative; overflow: hidden; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.file:focus-within { outline: 3px solid var(--coral); outline-offset: 2px; }

/* 여러 개 적는 칸 */
.item { border: 1.5px solid var(--line); border-radius: 10px; padding: 14px 14px 2px; margin-bottom: 12px; position: relative; }
.item .x { position: absolute; right: 8px; top: 8px; border: 0; background: none; font-size: 15px; color: var(--sub); padding: 6px 8px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; z-index: 1; }
.item .picks { margin-bottom: 12px; }
.mk textarea { min-height: 96px; }
.mk textarea.tall { min-height: 220px; }
.olist { list-style: none; margin: 0; padding: 0; }
.olist li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.olist b { font-weight: 500; flex: 1; min-width: 0; }
.olist button { width: 42px; height: 42px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.olist button:hover { border-color: var(--ink); }
.olist button[disabled] { opacity: .35; }
.olist .switch { padding: 0; margin: 0; background: none; }

/* 예문 고르기 */
.pickwords { display: grid; gap: 10px; max-height: 60dvh; overflow: auto; margin: 0 -6px; padding: 2px 6px; }
.pickwords button { text-align: left; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; padding: 14px 16px; cursor: pointer; line-height: 1.7; white-space: pre-line; font-size: 16px; }
.pickwords button:hover { border-color: var(--blue); background: var(--wash); }
.pickwords b { display: block; font-weight: 700; margin-bottom: 4px; }

/* 약도 */
dialog.map { width: min(860px, 100% - 20px); }
dialog.map .in { padding: 20px; }
.mapbox { position: relative; touch-action: none; overflow: hidden; background: var(--wash); aspect-ratio: 800 / 580; cursor: grab; }
.mapbox:active { cursor: grabbing; }
.mapbox canvas { width: 100%; height: 100%; display: block; }
.mapbox .zoom { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; }
.mapbox .zoom button { width: 46px; height: 46px; border: 1.5px solid var(--ink); border-radius: 8px; background: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.mapbox .osm { position: absolute; left: 8px; bottom: 6px; font-size: 13px; background: rgba(255, 255, 255, .85); padding: 1px 7px; color: #333; }
dialog.map .row { margin-bottom: 10px; }

/* 보내기 */
.big { font: 600 25px/1.35 var(--serif); margin: 22px 0 8px; }
.link { display: flex; align-items: center; gap: 10px; padding: 13px 15px; background: var(--wash); border-radius: 8px; margin: 12px 0 12px; font-size: 17px; overflow-wrap: anywhere; font-weight: 500; }
.part2 { padding: 24px 0; border-bottom: 1px solid var(--line); }
.part2:last-child { border-bottom: 0; }
.part2 h2 { font-size: 21px; margin-bottom: 8px; }
.katalk { background: #b9cbe2; padding: 16px; border-radius: 10px; max-width: 360px; }
.katalk div { background: #fff; border-radius: 8px; overflow: hidden; font-size: 15px; line-height: 1.45; }
.katalk img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--wash); }
.katalk p { padding: 11px 13px; margin: 0; }
.katalk b { display: block; font-weight: 500; font-size: 16px; }
.katalk span { color: #666; font-size: 14px; display: block; }
.pay { background: var(--ink); color: #fff; padding: 24px; margin: 20px 0 4px; }
.pay .won { font: 600 40px/1.1 var(--serif); letter-spacing: -.02em; display: block; margin: 4px 0 10px; }
.pay p { color: #d8ddf0; }
.pay .btn.main { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.pay .btn.main:hover { background: #ffe684; }
.pay a { color: #fff; }
.slug { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.slug span { color: var(--sub); font-size: 15px; }
.slug input[type=text] { flex: 1; min-width: 150px; width: auto; }

/* 하객 */
.sums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0 18px; }
.sums div { background: var(--wash); padding: 12px 14px; }
.sums b { display: block; font: 600 28px/1.2 var(--serif); }
.sums span { font-size: 14.5px; color: var(--sub); }
.tscroll { overflow-x: auto; }
.mk-pane table { font-size: 16px; }
.mk-pane td, .mk-pane th { padding: 9px 12px 9px 0; }
.mk-pane td button { border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; color: var(--sub); cursor: pointer; padding: 4px; white-space: nowrap; }
.gnote { color: var(--sub); font-size: 15px; display: block; }
.empty { padding: 26px 0; color: var(--sub); }
.making .foot { margin-top: 0; }

@media (max-width: 980px) {
  .mk { grid-template-columns: minmax(0, 1fr); padding: 0 18px; max-width: 680px; }
  .mk-top { padding: 8px 14px; gap: 10px; }
  .mk-top .brand span { display: none; }
  .mk-bar { padding: 10px 18px; }
  .mk-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); border-bottom: 0; padding: 0 4px env(safe-area-inset-bottom); justify-content: space-around; gap: 0; }
  .mk-tabs button { flex: 1; flex-direction: column; gap: 2px; padding: 7px 2px 8px; font-size: 14px; border-radius: 0; justify-content: center; }
  .mk-tabs button[aria-pressed=true] { background: none; color: var(--blue); box-shadow: inset 0 3px 0 var(--blue); }
  .mk-tabs .only-s { display: inline-flex; }
  .mk-tabs svg { width: 22px; height: 22px; }
  .mk-view { display: none; }
  .mk[data-tab=view] .mk-view { display: flex; grid-column: 1; grid-row: 2; position: static; height: calc(100dvh - 128px - env(safe-area-inset-bottom)); padding: 8px 0 0; }
  .mk[data-tab=view] .mk-pane { display: none; }
  .mk-phone { max-height: none; max-width: 420px; }
  .mk-view .note { margin: 6px 0; font-size: 14.5px; }
  .mk-pane { padding-bottom: 40px; }
  .making .foot { padding-bottom: 110px; }
  .making .toast { bottom: 88px; }
}
@media (max-width: 560px) {
  .themes { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .themes small { display: none; }
  .shots { grid-template-columns: repeat(3, 1fr); }
  .row.par { grid-template-columns: minmax(0, 1fr) auto; }
  .row.par .field:last-child { grid-column: 1 / -1; }
  .row.name { grid-template-columns: 64px minmax(0, 1fr) 92px; }
  .sums { grid-template-columns: 1fr 1fr; }
  .pay { margin-inline: -18px; }
  .mk-state { font-size: 14px; }
}
