/* Pyroculinary : 재(ash)의 종이, 먹의 글자, 인주(印朱)의 낙관 하나 */
:root {
  --paper: #f6f5f2;
  --ink: #23211f;
  --smoke: #6f6b66;
  --line: #dcd9d3;
  --seal: #a3312b;
  --measure: 34em;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Serif KR", "Nanum Myeongjo", serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.9;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
a:hover { color: var(--seal); }
a:focus-visible { outline: 2px solid var(--seal); outline-offset: 4px; }

/* 머리와 꼬리 */
.site-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.75rem clamp(1.25rem, 5vw, 4rem);
}
.site-head .brand {
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.site-head nav { display: flex; gap: 1.5rem; font-size: 0.95rem; }
.site-head nav a { text-decoration: none; color: var(--smoke); }
.site-head nav a:hover, .site-head nav a[aria-current="page"] { color: var(--ink); }

.site-foot {
  padding: 3rem clamp(1.25rem, 5vw, 4rem) 2.5rem;
  color: var(--smoke);
  font-size: 0.85rem;
}

/* 대문 */
.gate {
  min-height: calc(100vh - 10rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(2rem, 8vw, 9rem);
  padding: 2rem clamp(1.25rem, 5vw, 4rem) 4rem;
  max-width: 72rem;
  margin: 0 auto;
}

.gate-words { max-width: 26em; }
.gate-words .reading {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 300;
  line-height: 1.75;
  margin: 0 0 0.75rem;
}
.gate-words .source { color: var(--smoke); font-size: 0.9rem; margin: 0 0 3.5rem; }

.doors { list-style: none; margin: 0; padding: 0; }
.doors li { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.doors li:last-child { border-bottom: 1px solid var(--line); }
.doors a { display: block; text-decoration: none; }
.doors .door-name { display: block; font-weight: 600; font-size: 1.15rem; }
.doors .door-note { display: block; color: var(--smoke); font-size: 0.92rem; }
.doors a:hover .door-name { color: var(--seal); }
.doors .closed .door-name { color: var(--smoke); font-weight: 400; }

.verse {
  position: relative;
  writing-mode: vertical-rl;
  font-weight: 300;
  font-size: clamp(3.2rem, 7vw, 5.6rem);
  line-height: 1.45;
  letter-spacing: 0.18em;
  margin: 0;
  justify-self: end;
}
.verse .ch { display: inline-block; opacity: 1; }
.seal {
  writing-mode: horizontal-tb;
  position: absolute;
  left: -3.2rem;
  bottom: 0.4rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--seal);
  color: var(--seal);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  border-radius: 3px;
  transform: rotate(-4deg);
}

@media (prefers-reduced-motion: no-preference) {
  .verse .ch { opacity: 0; animation: ink-in 900ms ease forwards; }
  .seal { opacity: 0; animation: stamp 500ms ease-out forwards; animation-delay: 2.2s; }
}
@keyframes ink-in { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: blur(0); } }
@keyframes stamp { from { opacity: 0; transform: rotate(-4deg) scale(1.25); } to { opacity: 1; transform: rotate(-4deg) scale(1); } }

@media (max-width: 760px) {
  .gate { grid-template-columns: 1fr; min-height: auto; padding-top: 1rem; }
  .verse { order: -1; justify-self: center; font-size: clamp(2.6rem, 14vw, 3.6rem); }
  .seal { left: -2.6rem; width: 2rem; height: 2rem; font-size: 1.1rem; }
  .site-head nav { gap: 1rem; }
}

/* 읽는 페이지 */
.reading-page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem clamp(1.25rem, 5vw, 2rem) 2rem;
}
.reading-page h1 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 600;
  line-height: 1.4;
  margin: 1.5rem 0 0.5rem;
}
.reading-page h1 .title-en { display: block; font-size: 0.5em; font-weight: 400; color: var(--smoke); letter-spacing: 0.02em; margin-top: 0; line-height: 1.3; }
.reading-page .byline { color: var(--smoke); font-size: 0.92rem; margin: 0 0 3.5rem; }
.reading-page h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 4.5rem 0 1.5rem;
  line-height: 1.5;
}
.reading-page p {
  margin: 0 0 1.1em;
  text-align: justify;
  text-indent: 1em;
  word-break: normal;
  line-break: strict;
}
.reading-page .byline { text-indent: 0; text-align: left; }
.reading-page .epigraph {
  margin: 0 0 3rem;
  padding: 0;
  text-align: center;
}
.reading-page .epigraph p { text-indent: 0; text-align: center; margin: 0; }
.reading-page .epigraph .hanja { font-size: 1.6rem; font-weight: 600; letter-spacing: 0.12em; margin-bottom: 0.4rem; }
.reading-page .epigraph::after { content: ""; display: block; width: 100%; height: 1px; margin: 2.2rem auto 0; background: var(--line); }
.reading-page .epigraph .src { color: var(--smoke); font-size: 0.9rem; margin-top: 0.4rem; }

.law {
  margin: 2.2rem 0 0;
  padding: 0;
  font-size: 1.12rem;
  font-weight: 600;
  text-align: center;
}
.law p { text-indent: 0; text-align: center; margin: 0; }

.reading-page ol { padding-left: 1.6em; margin: 0 0 1.4em; }
.reading-page ol li { margin: 0.3em 0; }

/* 헌장 조문 */
.article { text-indent: 0 !important; }
.article .no { font-weight: 600; }
.charter-list { padding-left: 2.6em !important; }

.back { margin-top: 4rem; font-size: 0.95rem; }

/* ───────── 시장 ───────── */
.market { max-width: 64rem; margin: 0 auto; padding: 1rem clamp(1.25rem, 5vw, 3rem) 2rem; }
.page-title { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 600; line-height: 1.4; margin: 1.5rem 0 0.3rem; }
.page-lead { color: var(--smoke); margin: 0 0 2.5rem; }
.sample-note { display: inline-block; font-size: 0.82rem; color: var(--seal); border: 1px solid var(--seal); border-radius: 3px; padding: 0 0.5em; line-height: 1.7; }

/* 평가 기준 공개 (헌장 제18조) */
.criteria-strip { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); padding: 1.2rem 0 1.3rem; margin: 0 0 3rem; }
.criteria-strip h2 { font-size: 0.95rem; font-weight: 600; margin: 0 0 0.8rem; }
.criteria-strip dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem 1.6rem; margin: 0; font-size: 0.86rem; line-height: 1.7; }
.criteria-strip dt { font-weight: 600; }
.criteria-strip dd { margin: 0; color: var(--smoke); }
.criteria-strip .more { margin: 0.9rem 0 0; font-size: 0.86rem; }

.area-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin: 0 0 1rem; font-size: 0.95rem; }
.area-nav a { text-decoration: none; color: var(--smoke); }
.area-nav a:hover { color: var(--ink); }

.area { padding: 2.5rem 0 1rem; border-top: 1px solid var(--line); }
.area-head { display: flex; align-items: baseline; gap: 0.8rem; margin: 0 0 1.6rem; }
.area-head .mark { color: var(--seal); font-weight: 600; font-size: 1.25rem; }
.area-head h2 { font-size: 1.3rem; font-weight: 600; margin: 0; }
.area-head .en { color: var(--smoke); font-size: 0.85rem; }
.area-head .note { color: var(--smoke); font-size: 0.9rem; margin-left: auto; }

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 2.4rem 2rem; list-style: none; margin: 0; padding: 0; }
.card a { display: block; text-decoration: none; }
.plate { aspect-ratio: 1 / 1; background: #ecebe7; border: 1px solid var(--line); display: grid; place-items: center; color: #c9c5be; font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 300; margin: 0 0 0.9rem; position: relative; }
.plate .tag { position: absolute; top: 0.6rem; left: 0.6rem; font-size: 0.72rem; color: var(--smoke); letter-spacing: 0.04em; }
.card .name { display: block; font-weight: 600; font-size: 1.02rem; }
.card .line { display: block; color: var(--smoke); font-size: 0.88rem; line-height: 1.6; margin: 0.15rem 0 0.35rem; }
.card .price { display: block; font-size: 0.98rem; }
.card a:hover .name { color: var(--seal); }
.empty-shelf { color: var(--smoke); font-size: 0.92rem; }

/* 상품 화면 : 사진 한 장, 글 한 편, 값 하나, 버튼 하나 (헌장 제25조) */
.item { max-width: 64rem; margin: 0 auto; padding: 1rem clamp(1.25rem, 5vw, 3rem) 2rem; }
.item-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; margin: 1.5rem 0 4rem; }
.item-top .plate { font-size: clamp(5rem, 12vw, 9rem); margin: 0; }
.crumb { font-size: 0.86rem; color: var(--smoke); margin: 0 0 0.6rem; }
.crumb a { text-decoration: none; }
.item h1 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); font-weight: 600; line-height: 1.4; margin: 0 0 0.3rem; }
.item .partner { color: var(--smoke); font-size: 0.92rem; margin: 0 0 1.6rem; }
.item .the-price { font-size: 1.5rem; font-weight: 600; margin: 0; }
.item .price-sub { color: var(--smoke); font-size: 0.86rem; margin: 0.1rem 0 1.6rem; }
.item .item-line { font-size: 1.05rem; margin: 0 0 1.8rem; }

.btn { display: block; width: 100%; border: 0; border-radius: 4px; background: var(--ink); color: var(--paper); font: inherit; font-size: 1.02rem; font-weight: 600; padding: 0.9rem 1rem; cursor: pointer; text-align: center; text-decoration: none; }
.btn:hover { background: var(--seal); color: var(--paper); }
.btn[disabled] { background: #bdb9b2; cursor: not-allowed; }
.btn-note { color: var(--smoke); font-size: 0.84rem; margin: 0.6rem 0 0; line-height: 1.6; }

.progress { height: 3px; background: var(--line); margin: 0.2rem 0 0.4rem; }
.progress span { display: block; height: 100%; background: var(--seal); }
.group-count { font-size: 0.92rem; margin: 0 0 1.4rem; }

.tariff { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: 0.95rem; }
.tariff td { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.tariff td:last-child { text-align: right; }
.tariff label { cursor: pointer; display: flex; gap: 0.6rem; align-items: center; }

.checked-badge { display: inline-block; font-size: 0.8rem; border: 1px solid var(--ink); border-radius: 3px; padding: 0 0.5em; margin: 0 0 1rem; }

.item-body { max-width: var(--measure); margin: 0 auto; }
.item-body h2 { font-size: 1.15rem; font-weight: 600; margin: 3.2rem 0 1rem; }
.item-body p { text-align: justify; text-indent: 1em; word-break: normal; line-break: strict; margin: 0 0 1.1em; }
.item-body .interest { text-indent: 0; color: var(--smoke); font-size: 0.9rem; border-left: 2px solid var(--line); padding-left: 0.9rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.6rem; margin: 0; font-size: 0.93rem; }
.facts dt { color: var(--smoke); }
.facts dd { margin: 0; }
.broker-notice { font-size: 0.86rem; color: var(--smoke); border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 3rem; }

/* 결제 시트 : 세 번의 결정 (헌장 제27조) */
.sheet { border: 0; padding: 0; width: min(30rem, 100vw - 2rem); border-radius: 6px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px rgba(35,33,31,0.18); }
.sheet::backdrop { background: rgba(35,33,31,0.35); }
.sheet form { padding: 1.6rem 1.6rem 1.4rem; }
.sheet h2 { font-size: 1.1rem; font-weight: 600; margin: 0 0 0.2rem; }
.sheet .sum { color: var(--smoke); font-size: 0.9rem; margin: 0 0 1.4rem; }
.step { margin: 0 0 1.3rem; }
.step-no { font-size: 0.78rem; color: var(--seal); font-weight: 600; letter-spacing: 0.05em; }
.step label { display: block; font-weight: 600; font-size: 0.95rem; margin: 0 0 0.4rem; }
.field { width: 100%; font: inherit; font-size: 0.95rem; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); }
.pays { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.pays label { font-weight: 400; display: flex; align-items: center; gap: 0.5rem; border: 1px solid var(--line); border-radius: 4px; padding: 0.55rem 0.7rem; margin: 0; cursor: pointer; background: #fff; }
.pays input { accent-color: var(--seal); }
.sheet .close { position: absolute; top: 0.8rem; right: 1rem; background: none; border: 0; font: inherit; font-size: 1.3rem; color: var(--smoke); cursor: pointer; }

/* 안내 페이지의 표 */
.plain-list { padding-left: 1.4em; margin: 0 0 1.4em; }
.plain-list li { margin: 0.35em 0; }
.flow { list-style: none; counter-reset: f; padding: 0; margin: 0 0 1.6em; }
.flow li { counter-increment: f; padding: 0.5rem 0 0.5rem 2.4rem; position: relative; border-bottom: 1px solid var(--line); }
.flow li::before { content: counter(f); position: absolute; left: 0.2rem; top: 0.5rem; color: var(--seal); font-weight: 600; }
.reading-page .form-box { border: 1px solid var(--line); border-radius: 6px; padding: 1.4rem; margin: 1.5rem 0 2rem; background: #fbfaf8; }
.reading-page .form-box p { text-indent: 0; }
.reading-page .form-box label { display: block; font-weight: 600; font-size: 0.95rem; margin: 0 0 0.35rem; }
.reading-page .form-box .field { margin: 0 0 1rem; }

/* 공통 꼬리 : 중개자 고지 (헌장 제6조) */
.site-foot .legal { max-width: 46rem; line-height: 1.75; margin: 0 0 0.8rem; }
.site-foot .foot-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; margin: 0 0 0.8rem; }
.site-foot .foot-links a { text-decoration: none; }

@media (max-width: 860px) {
  .criteria-strip dl { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .item-top { grid-template-columns: 1fr; }
  .area-head { flex-wrap: wrap; }
  .area-head .note { margin-left: 0; width: 100%; }
  .criteria-strip dl { grid-template-columns: 1fr; }
  .shelf { grid-template-columns: 1fr 1fr; gap: 1.8rem 1rem; }
  .pays { grid-template-columns: 1fr; }
}
.item-body .broker-notice { text-indent: 0; margin-top: 2.4rem; }
.item-body .facts + h2 { margin-top: 3.2rem; }
.tariff input { accent-color: var(--seal); }
@media (max-width: 420px) { .site-head { flex-wrap: wrap; gap: 0.4rem 1rem; } .site-head nav { gap: 0.9rem; font-size: 0.9rem; } }

/* ───────── 대문 : 붓이 쓰고 먹이 번진다 ───────── */
.ink-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.gate-page {
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .39 0 0 0 0 .34 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.gate-page .verse {
  writing-mode: horizontal-tb;
  display: flex;
  flex-direction: row-reverse;
  gap: clamp(0.4rem, 1.6vw, 1.4rem);
  letter-spacing: 0;
  font-size: inherit;
  line-height: 1;
}
.gate-page .verse .col { display: flex; flex-direction: column; }
.gate-page .verse .ch {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 42%, transparent 58%);
          mask-image: linear-gradient(to bottom, #000 0, #000 42%, transparent 58%);
  -webkit-mask-size: 100% 260%; mask-size: 100% 260%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 0 100%; mask-position: 0 100%;
  opacity: 1;
  animation: brush-write 0.9s cubic-bezier(.5,.05,.4,1) var(--d) forwards;
}
.gate-page .verse .ink { fill: #1b1917; }
.gate-page .verse .bleed {
  fill: #1b1917;
}
.gate-page .verse .seal {
  position: absolute;
  left: clamp(-4.2rem, -6vw, -3.2rem);
  bottom: 0.2rem;
  width: clamp(2.8rem, 4.6vw, 3.8rem);
  height: auto;
  display: block;
  border: 0;
  border-radius: 0;
  transform: rotate(-3deg);
  opacity: 1;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(circle at 46% 52%, #000 0, #000 30%, rgba(0,0,0,.45) 42%, transparent 56%);
          mask-image: radial-gradient(circle at 46% 52%, #000 0, #000 30%, rgba(0,0,0,.45) 42%, transparent 56%);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 50% 50%; mask-position: 50% 50%;
  -webkit-mask-size: 0% 0%; mask-size: 0% 0%;
  animation: seal-drop 2.8s cubic-bezier(.1,.55,.25,1) var(--seal, 8s) forwards;
}
.gate-page .verse-text { font-size: clamp(3.2rem, 7vw, 5.6rem); writing-mode: vertical-rl; }
.gate-page .gate-words { opacity: 0; animation: words-in 1.2s ease var(--after, 6.5s) forwards; }
.gate-words .reading-en { color: var(--smoke); font-size: 0.82rem; font-style: italic; letter-spacing: 0.01em; margin: -2.8rem 0 3.2rem; }

@keyframes brush-write { from { -webkit-mask-position: 0 100%; mask-position: 0 100%; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes ink-bleed { 0% { opacity: 0; transform: scale(0.94); } 18% { opacity: 0.42; } 100% { opacity: 0.2; transform: scale(1.07); } }
@keyframes seal-press { 0% { opacity: 0; transform: rotate(-3deg) scale(1.25); } 60% { opacity: 1; transform: rotate(-3deg) scale(0.97); } 100% { opacity: 1; transform: rotate(-3deg) scale(1); } }
@keyframes words-in { to { opacity: 1; } }

.gate-done .gate-page .verse .ch, html.gate-done .verse .ch { animation: none; -webkit-mask-image: none; mask-image: none; }

html.gate-done .verse .seal { animation: none; opacity: 1; transform: rotate(-3deg); }
html.gate-done .gate-words { animation: none; opacity: 1; }

@media (max-width: 760px) {
  .gate-page .verse { justify-self: center; }
  
  .gate-page .verse .seal { left: -2.9rem; width: 2.6rem; }
  .gate-page .gate-words { animation-delay: 0.6s; }
}

/* 헌장의 항, 서사의 짧은 단락 */
.reading-page .clause { text-indent: -1.3em; padding-left: 2.3em; margin: 0 0 0.45em; }  /* ① 다음 첫 글자 아래로 줄을 맞춘다 */
.reading-page .article + .clause, .reading-page .article + p { margin-top: -0.3em; }
.reading-page .article { margin-top: 1.6em; }
.epic p { text-indent: 0; text-align: left; margin: 0 0 1.4em; }
.epic .law { margin: 2.4rem 0 0; }

.gate-page .verse .seal-soak {
  position: absolute; left: clamp(-4.2rem, -6vw, -3.2rem); bottom: 0.2rem;
  width: clamp(2.8rem, 4.6vw, 3.8rem); height: auto; transform: rotate(-3deg);
  mix-blend-mode: multiply; filter: blur(5px); opacity: 0;
  animation: seal-soak 4.5s cubic-bezier(.1,.55,.25,1) calc(var(--seal, 8s) + 0.4s) forwards;
}
@keyframes seal-soak { 0% { opacity: 0; transform: rotate(-3deg) scale(0.96); } 20% { opacity: 0.35; } 100% { opacity: 0.18; transform: rotate(-3deg) scale(1.08); } }
html.gate-done .verse .seal-soak { animation: none; opacity: 0.18; transform: rotate(-3deg) scale(1.08); }
@media (max-width: 760px) { .gate-page .verse .seal-soak { left: -2.9rem; width: 2.6rem; } }

@keyframes seal-drop {
  0%   { -webkit-mask-size: 0% 0%; mask-size: 0% 0%; filter: blur(3px); }
  35%  { filter: blur(1.2px); }
  100% { -webkit-mask-size: 320% 320%; mask-size: 320% 320%; filter: blur(0); }
}
html.gate-done .verse .seal { -webkit-mask-image: none; mask-image: none; filter: none; }

.gate-page .verse .cell { position: relative; display: block; width: clamp(4.4rem, 9.6vw, 8.2rem); margin: -0.35rem 0; }
.gate-page .verse .bleed-svg { position: absolute; inset: 0; width: 100%; height: auto; overflow: visible; opacity: 0; transform-origin: 50% 50%; will-change: transform, opacity; animation: ink-bleed 5s cubic-bezier(.15,.6,.3,1) calc(var(--d) + 0.85s) forwards; }
html.gate-done .verse .bleed-svg { animation: none; opacity: 0.2; transform: scale(1.07); }
@media (max-width: 760px) { .gate-page .verse .cell { width: clamp(3.4rem, 17vw, 4.6rem); } }

/* 머리 메뉴는 어느 페이지에서나 위에 떠 있다 */
.site-head {
  position: sticky; top: 0; z-index: 50;
  padding-top: 1.1rem; padding-bottom: 1.1rem;
  background: rgba(246,245,242,0.94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-head.scrolled { border-bottom-color: var(--line); }
html { scroll-padding-top: 4.5rem; }

/* 시장의 영역 메뉴 : 시장 안에서는 어디를 보든 머리 메뉴 아래에 떠 있다 */
.area-nav {
  position: sticky; top: var(--head-h, 4.3rem); z-index: 40;
  margin: 0 0 1rem; padding: 0.75rem 0;
  background: rgba(246,245,242,0.94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.area-nav a.on { color: var(--ink); font-weight: 600; }
.market-page { scroll-padding-top: calc(var(--head-h, 4.3rem) + 3.6rem); }
.item .area-nav { margin-bottom: 0.5rem; }
@media (max-width: 760px) {
  .area-nav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .area-nav::-webkit-scrollbar { display: none; }
}

/* 언어 전환 */
.site-head nav { align-items: baseline; }
.site-head .langs { display: inline-flex; gap: 0.55rem; margin-left: 0.6rem; padding-left: 1rem; border-left: 1px solid var(--line); font-size: 0.82rem; }
.site-head .langs a { color: var(--smoke); text-decoration: none; }
.site-head .langs a[aria-current] { color: var(--ink); font-weight: 600; }
html[lang="zh-Hans"] body { font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "Noto Serif KR", serif; }
html[lang="ja"] body { font-family: "Noto Serif JP", "Noto Serif KR", serif; }
html[lang="en"] .reading-page p, html[lang="en"] .item-body p { word-break: normal; text-indent: 0; text-align: left; hyphens: auto; }
html[lang="zh-Hans"] .reading-page p, html[lang="ja"] .reading-page p { line-break: strict; }
.reading-page .epigraph .pron { color: var(--smoke); font-size: 0.92rem; margin-bottom: 0.3rem; }
@media (max-width: 760px) {
  .site-head { flex-wrap: wrap; gap: 0.3rem 1rem; }
  .site-head nav { flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.88rem; }
  .site-head .langs { margin-left: 0; padding-left: 0; border-left: 0; }
}

/* 서가 */
.shelf-page { max-width: 64rem; margin: 0 auto; padding: 1rem clamp(1.25rem, 5vw, 3rem) 2rem; }
.shelf-page .shelf-row { border-top: 1px solid var(--line); padding: 2rem 0 1rem; }
.shelf-page .shelf-row h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 1.4rem; }
.books { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 2rem 1.6rem; }
.book .spine { aspect-ratio: 3 / 4; background: #ecebe7; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; padding: 0.9rem; margin: 0 0 0.8rem; position: relative; }
.book .spine .btitle { font-weight: 600; font-size: 1rem; line-height: 1.45; }
.book .spine .bauthor { font-size: 0.78rem; color: var(--smoke); }
.book .spine .own { position: absolute; top: 0.55rem; right: 0.6rem; width: 1.5rem; height: 1.5rem; border: 1.5px solid var(--seal); color: var(--seal); font-size: 0.72rem; display: grid; place-items: center; border-radius: 2px; transform: rotate(-4deg); }
.book .orig { font-size: 0.78rem; color: var(--smoke); margin: 0 0 0.2rem; }
.book .bline { font-size: 0.86rem; line-height: 1.6; margin: 0 0 0.4rem; }
.book .soon { font-size: 0.78rem; color: var(--smoke); }
.shelf-page .own-note { font-size: 0.86rem; color: var(--smoke); margin: 0 0 2rem; }
.book .spine .btitle { padding-right: 1.9rem; }

/* 파트너와 관리 화면 */
.partner-page, .admin-page { max-width: 44rem; }
.reading-page .form-box h2.box-title { margin-top: 0; font-size: 1.15rem; }
.reading-page .form-box .help, .reading-page .help { display: block; font-size: 0.82rem; color: var(--smoke); margin: -0.2rem 0 0.4rem; text-indent: 0; }
.reading-page .form-box select.field, .reading-page .form-box textarea.field { font-family: inherit; }
.req { color: var(--seal); font-size: 0.72rem; font-weight: 600; margin-left: 0.3rem; }
.form-msg { color: var(--seal); font-size: 0.9rem; min-height: 1.2em; text-indent: 0; }
.form-msg.ok { color: #2f6b3a; }
.row2, .row3 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.row3 { grid-template-columns: 1fr 1fr 1fr; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }
.actions .btn { width: auto; padding: 0.7rem 1.4rem; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.danger { border-color: var(--seal); color: var(--seal); }
.btn.small { display: inline-block; width: auto; padding: 0.4rem 1rem; font-size: 0.88rem; }
.preview { display: block; max-width: 12rem; margin: 0.6rem 0; border: 1px solid var(--line); }
.consent-title { font-size: 1rem; margin: 2rem 0 0.4rem; }
.consent { border-top: 1px solid var(--line); padding: 0.7rem 0; }
.consent .check { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 400; cursor: pointer; }
.consent .check input { margin-top: 0.35rem; accent-color: var(--seal); }
.consent details { margin: 0.4rem 0 0 1.5rem; font-size: 0.85rem; }
.consent summary { cursor: pointer; color: var(--smoke); }
.legal-table { width: 100%; border-collapse: collapse; margin: 0.6rem 0 1rem; font-size: 0.86rem; }
.legal-table th, .legal-table td { border: 1px solid var(--line); padding: 0.45rem 0.6rem; text-align: left; vertical-align: top; }
.legal-table th { background: #efede9; font-weight: 600; white-space: nowrap; }
.draft-note { text-indent: 0 !important; color: var(--seal); border: 1px solid var(--seal); padding: 0.5rem 0.8rem; font-size: 0.88rem; }
.legal-page p { text-align: justify; }
.legal-page .back, .legal-page .byline { text-align: left; }
.item-list { list-style: none; padding: 0; }
.item-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: baseline; }
.item-list a { text-decoration: none; font-weight: 600; }
.kind { font-size: 0.75rem; color: var(--smoke); border: 1px solid var(--line); padding: 0 0.4em; border-radius: 3px; font-weight: 400; }
.st { font-size: 0.78rem; padding: 0 0.5em; border-radius: 3px; background: #ecebe7; }
.st-published, .st-approved { background: #e3efe5; color: #2f6b3a; }
.st-review, .st-pending { background: #f6ecd9; color: #8a5a12; }
.st-rejected { background: #f6e1df; color: var(--seal); }
.note { width: 100%; font-size: 0.82rem; color: var(--seal); }
.who { font-size: 0.9rem; color: var(--smoke); text-indent: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; border-bottom: 1px solid var(--line); padding-bottom: 0.6rem; margin-bottom: 1.4rem; }
.tabs a { text-decoration: none; color: var(--smoke); }
.tabs a.on { color: var(--ink); font-weight: 600; }
.card { border: 1px solid var(--line); border-radius: 6px; padding: 1rem 1.2rem; margin: 0 0 1rem; background: #fbfaf8; }
.card p { text-indent: 0; margin: 0 0 0.6rem; }
.card .field { margin: 0.6rem 0; }
@media (max-width: 760px) { .row2, .row3 { grid-template-columns: 1fr; } }
.spine.has-cover { background-size: cover; background-position: center; }
.spine.has-cover .btitle, .spine.has-cover .bauthor, .spine.has-cover .own { visibility: hidden; }
.buy-links { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; font-size: 0.85rem; text-indent: 0; margin: 0.3rem 0 0; }
.sheet .agree { display: flex; gap: 0.45rem; align-items: flex-start; font-size: 0.85rem; margin: 0.35rem 0; font-weight: 400; }
.sheet .agree input { margin-top: 0.3rem; accent-color: var(--seal); }
.sheet .agree a { color: inherit; }
.reading-page .form-box .f label { margin-top: 0.9rem; }

/* 책 소개 화면 */
.book-page { max-width: 60rem; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.book-page .crumb { font-size: 0.9rem; margin: 0 0 1.6rem; }
.book-page .crumb a { color: var(--smoke); text-decoration: none; }
.book-detail { display: grid; grid-template-columns: minmax(12rem, 18rem) 1fr; gap: 2.4rem; align-items: start; }
.book-cover img { width: 100%; display: block; border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0,0,0,0.12); }
.book-cover .spine.big { aspect-ratio: 3 / 4; background: #ecebe7; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; padding: 1.4rem; }
.book-cover .spine.big .btitle { font-weight: 600; font-size: 1.3rem; line-height: 1.45; }
.book-cover .spine.big .bauthor { font-size: 0.85rem; color: var(--smoke); }
.book-info h1 { font-size: 1.9rem; margin: 0 0 0.3rem; line-height: 1.35; }
.book-info .orig, .book-info .subtitle { color: var(--smoke); margin: 0 0 0.3rem; }
.book-info .author { margin: 0 0 1.4rem; }
.book-info .line { font-size: 1.1rem; line-height: 1.8; border-left: 2px solid var(--seal); padding-left: 1rem; margin: 0 0 1.6rem; }
.book-info h2 { font-size: 1rem; margin: 2rem 0 0.7rem; }
.buy-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.buy-row .btn { width: auto; padding: 0.7rem 1.3rem; }
.book-info .btn-note { margin-top: 0.8rem; }
.book-info .own-note { margin-top: 1.6rem; font-size: 0.85rem; }
.book .spine, .book .bline { cursor: pointer; }
.book a.book-link { color: inherit; text-decoration: none; display: block; }
@media (max-width: 760px) { .book-detail { grid-template-columns: 1fr; } .book-cover { max-width: 14rem; } }
.book-info .soon { font-size: 0.95rem; color: var(--smoke); margin: 0; }
/* 시장 안의 서가 칸 */
.market .shelf-how { font-size: 0.88rem; color: var(--smoke); margin: -0.4rem 0 1rem; }
.book-card .plate.has-cover { background-size: cover; background-position: center; aspect-ratio: 3 / 4; }
.book-card .price { color: var(--smoke); font-weight: 400; }
/* 사업자 정보 명판 */
.site-foot .biz { display: flex; flex-wrap: wrap; gap: 0.15rem 1.2rem; font-size: 0.78rem; color: var(--smoke); line-height: 1.7; max-width: 60rem; }
.site-foot .biz b { font-weight: 600; }
.site-foot .biz a { color: inherit; }
/* 첫 화면 문구 : 上品 */
.gate-words .motto { font-size: 1.5rem; font-weight: 600; line-height: 1.75; letter-spacing: -0.01em; margin: -1rem 0 3.4rem; padding-top: 1.3rem; position: relative; }
.gate-words .motto::before { content: ""; position: absolute; top: 0; left: 0; width: 2.2rem; height: 2px; background: var(--seal); }
.gate-words .motto ruby.jp { ruby-position: over; color: var(--seal); font-size: 1.55em; font-weight: 600; letter-spacing: 0.02em; margin: 0 0.02em 0 0.1em; }
.gate-words .motto ruby.jp rt { font-size: 0.34em; font-weight: 400; color: var(--smoke); letter-spacing: 0.08em; }
@media (max-width: 760px) { .gate-words .motto { font-size: 1.3rem; } }
/* 첫 화면 한 장 : 본문을 화면 높이 한 장 안 세로 가운데에 둔다 */
@media (min-width: 761px) {
  .gate-page .gate { min-height: calc(100vh - var(--head-h, 4.4rem)); box-sizing: border-box; padding-top: 2rem; padding-bottom: 2rem; align-items: center; }
  .gate-page .verse { align-self: start; margin-top: 0.4rem; }
  .gate-page .gate-words .reading { margin-bottom: 0.4rem; }
  .gate-page .gate-words .source { margin: 0 0 0.2rem; font-size: 0.82rem; }
  .gate-page .gate-words .reading-en { margin: 0 0 1.8rem; font-size: 0.78rem; }
  .gate-page .gate-words .motto { margin: 0 0 1.8rem; padding-top: 1rem; }
  .gate-page .doors li { padding: 0.75rem 0; }
  .gate-page .doors .door-name { font-size: 1.08rem; }
  .gate-page .doors .door-note { font-size: 0.86rem; }
}
@media (min-width: 761px) {
  .gate-page .gate { align-items: start; align-content: center; }
  .gate-page .verse { margin-top: 0.9rem; }
}
@media (min-width: 761px) and (max-height: 840px) {
  .gate-page .gate { padding-top: 1.2rem; padding-bottom: 1.2rem; }
  .gate-page .gate-words .reading { font-size: 1.4rem; line-height: 1.6; }
  .gate-page .gate-words .reading-en { margin-bottom: 1.3rem; }
  .gate-page .gate-words .motto { font-size: 1.35rem; margin-bottom: 1.3rem; padding-top: 0.8rem; line-height: 1.65; }
  .gate-page .doors li { padding: 0.6rem 0; }
}

/* 上品 문구 : 한 줄, 큰따옴표 */
@media (min-width: 761px) { .gate-page .gate-words .motto { white-space: nowrap; } }
.gate-page .gate-words .motto { position: relative; padding-top: 0.6rem; }
.gate-page .gate-words .motto::before { display: none; }
.gate-words .motto .q { font-family: Georgia, "Times New Roman", serif; color: var(--seal); font-weight: 400; line-height: 0; font-size: 2.6em; position: relative; }
.gate-words .motto .q-open { position: absolute; left: -0.5em; top: 0.86em; }
.gate-words .motto .q-close { top: 0.34em; margin-left: 0.08em; }
@media (max-width: 760px) { .gate-words .motto .q-open { position: relative; left: 0; top: 0.42em; margin-right: 0.06em; } .gate-page .gate-words .motto { font-size: 1.2rem; } }
html[lang^="zh"] .gate-words .motto, html[lang^="ja"] .gate-words .motto { font-size: 1.3rem; }
/* 초서를 조금 굵게 */
.gate-page .verse .ink { stroke: #1b1917; stroke-width: 16; stroke-linejoin: round; paint-order: stroke; }
/* 첫 화면 : 장터로 들어가는 문지방, 바랜 금색 한 줄 */
.gate-page .doors li:first-child { border-top: 2px solid #a8894e; }
/* 격식 : 두인, 관지, 성명인 */
.gate-page .verse .duin, .gate-page .verse .gwanji, .gate-page .verse .name-seal { position: absolute; display: block; height: auto; mix-blend-mode: multiply; opacity: 0; animation: words-in 1s ease forwards; }
.gate-page .verse .duin { right: clamp(-2.8rem, -3.4vw, -2rem); top: 6%; width: clamp(1.4rem, 2.1vw, 1.8rem); animation-delay: 0.3s; }
.gate-page .verse .gwanji { left: clamp(-2.95rem, -3.7vw, -2.25rem); bottom: calc(clamp(2.8rem, 4.6vw, 3.8rem) + clamp(2.1rem, 3.2vw, 2.8rem) + 2rem); width: clamp(1.05rem, 1.5vw, 1.3rem); animation-delay: calc(var(--seal, 8s) - 1.2s); }
.gate-page .verse .name-seal { left: clamp(-3.4rem, -4.3vw, -2.65rem); bottom: calc(clamp(2.8rem, 4.6vw, 3.8rem) + 1rem); width: clamp(2.1rem, 3.2vw, 2.8rem); transform: rotate(1.5deg); animation-delay: calc(var(--seal, 8s) - 0.4s); }
html.gate-done .verse .duin, html.gate-done .verse .gwanji, html.gate-done .verse .name-seal { animation: none; opacity: 1; }
@media (max-width: 760px) {
  .gate-page .verse .gwanji { width: 0.5rem; left: -1.7rem; bottom: calc(2.6rem + 1.9rem + 1.3rem); }
  .gate-page .verse .name-seal { width: 1.9rem; left: -2.3rem; bottom: calc(2.6rem + 0.7rem); }
  .gate-page .verse .duin { width: 1.05rem; right: -1.6rem; }
}
/* 서가 카드 : 긴 제목이 칸을 밀어내지 않게 */
.books .book { min-width: 0; }
.books .book .btitle, .books .book .bline { overflow-wrap: anywhere; }
.book .to-book { font-size: 0.82rem; margin: 0.4rem 0 0; text-indent: 0; }
.book .to-book a { color: var(--smoke); text-decoration: none; }
.book .to-book a:hover { color: var(--seal); }
html.shelf-loading .book .soon { visibility: hidden; }

/* 입장 */
.enter-box .remember { display: flex; gap: 0.5rem; align-items: center; font-weight: 400; margin: 0.6rem 0 1rem; }
.enter-box .new-only[hidden] { display: none; }
.enter-box .agree { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 400; margin: 0.35rem 0; font-size: 0.92rem; }
.enter-box .agree input { margin-top: 0.35rem; accent-color: var(--seal); }
.site-head nav .enter { color: var(--ink); }
/* 입점 계약 서명 */
.contract-sheet { max-height: 60vh; overflow-y: auto; border: 1px solid var(--line); padding: 1rem 1.2rem; margin: 1rem 0; background: #fbfaf8; }
.contract-sheet h1 { font-size: 1.2rem; }
.contract-sheet .back { display: none; }
.rate { font-weight: 600; }
.sign-record { font-size: 0.86rem; color: var(--smoke); }
.warn-list li { margin: 0.3rem 0; }
.card .warn { color: var(--seal); }
/* 계약서 서명란 : 두 당사자의 칸을 같은 너비로 */
.legal-table.sign { table-layout: fixed; }
.legal-table.sign th:first-child, .legal-table.sign tr > th { width: 22%; }
.legal-table.sign td, .legal-table.sign tr:first-child th:not(:first-child) { width: 39%; }
.legal-table.sign td[data-p] { min-height: 2.2em; height: 2.6em; }

/* 실제 상품 사진 : 시장 전체가 한 갤러리처럼 보이도록 아주 옅은 같은 톤을 입힌다 */
.plate.has-cover { background-size: cover; background-position: center; filter: saturate(0.94) contrast(1.02) sepia(0.05); }
.item-top .plate.has-cover { font-size: 0; }
/* 사진 보정 화면 */
.tune .compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin: 0.6rem 0; }
.tune figure { margin: 0; }
.tune img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #ecebe7; border: 1px solid var(--line); }
.tune figcaption { font-size: 0.8rem; color: var(--smoke); text-align: center; margin-top: 0.3rem; }
.tune .sliders { display: grid; gap: 0.4rem; margin: 0.4rem 0 1rem; }
.tune .sliders label { display: grid; grid-template-columns: 4.5em 1fr; align-items: center; font-weight: 400; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.extra-note { white-space: normal; border-left: 3px solid var(--seal); padding: 0.2rem 0 0.2rem 1rem; text-indent: 0; }
.item-body p.extra-note { text-indent: 0; }

/* ── 꼬리말 : 헌장과 창립 서사는 명판 아래 ── */
.site-foot .foot-docs { display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; margin: 0 0 0.8rem; }
.site-foot .foot-docs a { text-decoration: none; font-weight: 600; }

/* ── 멤버십 : 회비 카드, 회비 고르기, 입금 안내 ── */
.fee-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.9rem; margin: 1.2rem 0 1.4rem; }
.fee-card { display: flex; flex-direction: column; gap: 0.25rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); background: #fff; text-decoration: none; color: inherit; }
.fee-card:hover { border-color: var(--ink); }
.fee-name { font-size: 0.9rem; color: var(--smoke); }
.fee-amt { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.01em; }
.fee-note { font-size: 0.85rem; color: var(--smoke); }
.plans { border: 0; padding: 0; margin: 0 0 1rem; }
.plans legend { font-weight: 600; margin-bottom: 0.4rem; padding: 0; }
.plan { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.7rem 0.8rem; border: 1px solid var(--line); background: #fff; margin-bottom: 0.5rem; cursor: pointer; }
.plan:has(input:checked) { border-color: var(--ink); }
.plan span { display: flex; flex-direction: column; }
.plan small { color: var(--smoke); }
.pay-box .facts.pay dd b { font-size: 1.1rem; }

/* ── 사진 처리 중 ── */
.help.busy { color: var(--seal); }

/* ── 잡지 지면 편집기 ── */
.blocks .block { border: 1px solid var(--line); background: #fff; padding: 0.8rem; margin: 0 0 0.7rem; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; }
.block-head span { display: flex; gap: 0.3rem; }
.blocks .block .field { margin-bottom: 0.5rem; }
.blocks .preview { max-width: 12rem; }
.add-blocks { flex-wrap: wrap; }

/* ── 잡지 지면 : 프리미엄 브로커리지 ── */
.mag { max-width: 60rem; margin: 0 auto; }
.mag-head { margin-bottom: 2.5rem; }
.mag-hero { width: 100%; aspect-ratio: 16 / 9; background: #ecebe7 center / cover no-repeat; margin: 0 0 1.6rem; }
.mag-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin: 0.3rem 0 0.9rem; letter-spacing: -0.02em; }
.mag-lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.7; max-width: 38em; margin: 0 0 1.2rem; }
.mag-body { max-width: var(--measure); margin: 0 auto 2.5rem; }
.mag-text h2 { font-size: 1.35rem; margin: 2.2rem 0 0.8rem; }
.mag-text p { line-height: 1.95; text-align: justify; }
.mag-photo { margin: 2.2rem 0; }
.mag-photo img { width: 100%; height: auto; display: block; }
.mag-photo figcaption { font-size: 0.85rem; color: var(--smoke); margin-top: 0.5rem; }
.mag-quote { margin: 2.4rem 0; padding: 0 0 0 1.2rem; border-left: 3px solid var(--seal); }
.mag-quote p { font-size: 1.3rem; line-height: 1.6; margin: 0 0 0.5rem; }
.mag-quote cite { font-style: normal; color: var(--smoke); font-size: 0.9rem; }
.mag-quote cite::before { content: '— '; }
.mag-spec { display: grid; grid-template-columns: minmax(7rem, auto) 1fr; gap: 0.45rem 1.2rem; margin: 2rem 0; padding: 1.1rem 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.mag-spec dt { color: var(--smoke); }
.mag-spec dd { margin: 0; }
.mag-spec dd.wide { grid-column: 1 / -1; }
/* 화보형 : 사진이 지면 밖으로 넓게 나간다 */
.mag-gallery .mag-photo { margin-left: calc(50% - min(30rem, 50vw)); margin-right: calc(50% - min(30rem, 50vw)); }
.mag-gallery .mag-hero { aspect-ratio: 3 / 2; }
/* 대담형 : 인용이 크게 선다 */
.mag-interview .mag-quote { border-left: 0; padding: 0; text-align: center; }
.mag-interview .mag-quote p { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.mag-interview .mag-quote cite::before { content: ''; }
.mag-interview .mag-text p:first-child::first-letter { font-size: 2.6em; float: left; line-height: 0.9; margin: 0.08em 0.1em 0 0; }
/* 기술 노트형 : 제원이 앞에 선다 */
.mag-technical .mag-spec { background: #fff; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-top: 3px solid var(--ink); font-variant-numeric: tabular-nums; }
.mag-technical .mag-text h2 { font-size: 1.05rem; text-transform: none; letter-spacing: 0.04em; border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; }
.mag-technical .mag-hero { aspect-ratio: 21 / 9; }
.mag .item-body { max-width: var(--measure); margin: 0 auto; }

/* ── 파트너 화면 : 누르는 순간 반응한다 ── */
#view { transition: opacity 0.15s; }
#view.loading { opacity: 0.45; pointer-events: none; cursor: progress; }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.tpl-help { font-size: 0.88rem; color: var(--smoke); margin: -0.4rem 0 1rem; }
.tpl-help p { margin: 0.2rem 0; }

/* ── 목록 번호 ── */
.serial { font-size: 0.78rem; letter-spacing: 0.12em; color: var(--smoke); margin: 0 0 0.2rem; font-variant-numeric: tabular-nums; }
.card .serial { margin: 0; }

/* ── 사물의 글 : 실제 사진 아래, 제원 위 ── */
.essay { max-width: var(--measure); margin: 2.4rem auto 2.6rem; padding: 2rem 0 1.6rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.essay-lab { font-size: 0.78rem; letter-spacing: 0.14em; color: var(--seal); margin: 0 0 0.6rem; }
.essay h2 { font-size: 1.5rem; margin: 0 0 1.2rem; letter-spacing: -0.01em; }
.essay p { line-height: 2; text-align: justify; margin: 0 0 1em; }

/* ── 편집 칸 (관리자) ── */
.edit-box { border: 1px dashed var(--seal); padding: 0.9rem 1rem; margin: 1.4rem 0; background: #fffdfb; }
.edit-box details { margin: 0.6rem 0 1rem; }
.edit-box .label { font-weight: 600; margin: 0.8rem 0 0.3rem; }
.tag-picks { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin-bottom: 0.8rem; }

/* ── 색인 ── */
.catalog-link { margin: 0 0 1.2rem; }
.catalog-link a { font-size: 0.92rem; }
.catalog-page { max-width: 56rem; }
.cat-lead { color: var(--smoke); }
.cat-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 0.6rem 0 2rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.cat-nav a { text-decoration: none; font-weight: 600; }
.catalog-page section { margin: 0 0 2.6rem; }
.cat-cols { column-count: 2; column-gap: 2.6rem; }
@media (max-width: 640px) { .cat-cols { column-count: 1; } }
.cat-group, .cat-dim { break-inside: avoid; margin: 0 0 1.2rem; }
.cat-group h3, .cat-dim h3 { font-size: 0.95rem; color: var(--seal); margin: 0 0 0.4rem; letter-spacing: 0.06em; }
.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list li { display: flex; align-items: baseline; gap: 0.4rem; padding: 0.18rem 0; font-size: 0.95rem; }
.cat-list li a { text-decoration: none; }
.cat-list .dots { flex: 1; border-bottom: 1px dotted #c9c5be; transform: translateY(-0.25em); }
.cat-list .no { font-size: 0.78rem; color: var(--smoke); font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.cat-list.num li { gap: 1rem; }
.cat-dim dl { margin: 0; }
.cat-dim dt { font-weight: 600; margin-top: 0.5rem; }
.cat-dim dt .cnt { font-weight: 400; font-size: 0.78rem; color: var(--smoke); }
.cat-dim dd { margin: 0.1rem 0 0; font-size: 0.93rem; line-height: 1.7; }
.cat-dim dd a { text-decoration: none; border-bottom: 1px solid var(--line); }

/* ── 관리 아이콘 : 관리자 기기에서만 ── */
.site-head .admin-icon { display: inline-flex; align-items: center; color: var(--seal); opacity: 0.75; }
.site-head .admin-icon:hover { opacity: 1; }

/* ── 관리자 작업대 ── */
.reading-page.admin-page { max-width: 80rem; }
.bench { display: grid; grid-template-columns: 19rem 1fr; gap: 1.6rem; align-items: start; }
@media (max-width: 860px) { .bench { grid-template-columns: 1fr; } }
.bench-list { position: sticky; top: calc(var(--head-h, 64px) + 0.6rem); max-height: calc(100vh - var(--head-h, 64px) - 1.2rem); display: flex; flex-direction: column; gap: 0.5rem; }
.bench-list .field { margin: 0; }
.bench-new { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.bench-items { list-style: none; margin: 0.3rem 0 0; padding: 0; overflow-y: auto; border-top: 1px solid var(--line); flex: 1; }
.bench-items li { padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 0.1rem; }
.bench-items li:hover { background: #fff; }
.bench-items li.on { background: #fff; box-shadow: inset 3px 0 0 var(--seal); }
.bench-items li.empty { cursor: default; color: var(--smoke); }
.bi-no { font-size: 0.72rem; letter-spacing: 0.1em; color: var(--smoke); }
.bi-sub { font-size: 0.8rem; color: var(--smoke); }
.bench-pane { min-width: 0; }
.bench-pane .form-box { max-width: none; margin-top: 0; }
.pane-bar { border: 1px solid var(--line); background: #fff; padding: 0.7rem 0.9rem; margin: 0 0 0.9rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem; }
.pane-bar p { margin: 0; }
.sec-nav { position: sticky; top: var(--head-h, 64px); z-index: 3; display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; background: #fbfaf8; padding: 0.55rem 0; margin: -0.3rem 0 1rem; border-bottom: 1px solid var(--line); }
.sec-nav a { text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.sec, #terms_box, #facts_box, #mag_box, #sec_photo, #sec_top { scroll-margin-top: calc(var(--head-h, 64px) + 3.4rem); }
.save-bar { position: sticky; bottom: 0; background: #fbfaf8; padding: 0.7rem 0; border-top: 1px solid var(--line); z-index: 2; }
textarea.ghost-guide::placeholder { color: #b9b3aa; font-style: italic; }
.tell-view { background: #fff; border-left: 3px solid var(--line); padding: 0.6rem 0.9rem; margin: 0 0 1rem; font-size: 0.93rem; }
.tell-view .label { margin: 0 0 0.3rem; font-weight: 600; }

/* ── 상품 화면 : 카피 한 줄과 고시 표 ── */
.item-top .headline { font-size: 1.12rem; line-height: 1.6; margin: -0.2rem 0 0.8rem; }
.notice-table th { width: 38%; }

/* ── 작업대 목록 : 한 줄에 하나 ── */
.bench { grid-template-columns: 24rem 1fr; }
.bench-list .field, .bench-list select.field { font-size: 0.82rem; padding: 0.4rem 0.55rem; height: auto; }
.bench-new .btn.small { font-size: 0.78rem; padding: 0.35rem 0.65rem; }
.bench-items li { flex-direction: row; align-items: center; gap: 0.45rem; padding: 0.38rem 0.45rem; font-size: 0.8rem; line-height: 1.3; white-space: nowrap; }
.bench-items .bi-no { flex: 0 0 4.3em; font-size: 0.7rem; letter-spacing: 0.04em; }
.bench-items .bi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.bench-items .bi-kind { flex: 0 0 auto; font-size: 0.7rem; color: var(--smoke); }
.bench-items .st { flex: 0 0 auto; font-size: 0.68rem; padding: 0.05rem 0.35rem; }
.bench-pane > .help { font-size: 0.85rem; }
.mag-story p { font-size: 1.06rem; line-height: 2.05; }
details.more { border-top: 1px solid var(--line); margin: 1.2rem 0; padding-top: 0.8rem; }
details.more > summary { cursor: pointer; font-weight: 600; margin-bottom: 0.8rem; }

/* ── 글 속 사진 : 지면 분위기에 맞춰 옅은 색조를 입힌다. 원본은 누르면 열린다 ── */
.mag-story { overflow: visible; }
.mag-story .sp { display: block; }
.mag-story .sp img { display: block; width: 100%; height: auto; filter: saturate(0.86) contrast(0.95) brightness(1.03) sepia(0.07); transition: filter 0.3s; }
.mag-story .sp:hover img { filter: none; }
.mag-story figure { margin: 2rem 0; }
.sp-float { width: 42%; margin-top: 0.4rem !important; margin-bottom: 1rem !important; }
.sp-left { float: left; margin-right: 1.6rem !important; margin-left: -3rem; }
.sp-right { float: right; margin-left: 1.6rem !important; margin-right: -3rem; }
.sp-wide, .sp-row { margin-left: calc(50% - min(30rem, 48vw)) !important; margin-right: calc(50% - min(30rem, 48vw)) !important; }
.sp-row { display: grid; gap: 0.6rem; }
.sp-row-1 { grid-template-columns: 1fr; }
.sp-row-2 { grid-template-columns: 1fr 1fr; }
.sp-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.sp-row-3.sp-mixed { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.sp-row-3.sp-mixed .sp:first-child { grid-row: span 2; }
.sp-row .sp img, .sp-row-3.sp-mixed .sp img { height: 100%; object-fit: cover; }
.sp-row-2 .sp img, .sp-row-3:not(.sp-mixed) .sp img { aspect-ratio: 4 / 3; }
.sp-clear { clear: both; }
@media (max-width: 700px) {
  .sp-float { float: none; width: auto; margin-left: 0 !important; margin-right: 0 !important; }
  .sp-wide, .sp-row { margin-left: 0 !important; margin-right: 0 !important; }
  .sp-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0.5rem; }
  .sp-row .sp { flex: 0 0 85%; scroll-snap-align: center; }
  .sp-row-1 .sp { flex-basis: 100%; }
}
/* 양식 : 사진 단추와 미리보기 */
.pic-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0.2rem 0 0.4rem; }
.pic-bar select { font-size: 0.82rem; padding: 0.25rem 0.4rem; }
.pic-btn { cursor: pointer; }
.pic-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.pic-strip figure { margin: 0; width: 5.5rem; }
.pic-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.pic-strip figcaption { font-size: 0.7rem; color: var(--smoke); text-align: center; }

/* 머리 메뉴의 검색 */
.site-head nav .search-ico { display: inline-flex; align-items: center; gap: 0.3rem; }
.site-head nav .search-ico svg { position: relative; top: 0.1em; }
.site-head nav .search-ico span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 대문의 문 : 한글 이름은 굵게, 원어는 가늘게 기울여, 그 아래 한 줄 */
.doors .door-name { display: inline; }
.doors .door-en { display: inline; margin-left: 0.55rem; font-style: italic; font-weight: 400; color: #8f8a83; font-size: 0.95rem; font-family: Georgia, "Times New Roman", serif; letter-spacing: 0.01em; }
.doors .door-note { margin-top: 0.15rem; }

/* 양식 : 사진 관리. 고르고, 누르면 자리, X로 지운다. 화면은 움직이지 않는다 */
.pics { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.6rem; margin: 0.5rem 0 1.4rem; }
.pic { position: relative; width: 6.2rem; cursor: pointer; }
.pic img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border: 1px solid var(--line); }
.pic-x { position: absolute; top: -0.45rem; right: -0.45rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 1rem; line-height: 1; cursor: pointer; padding: 0; }
.pic-x:hover { color: #fff; background: var(--seal); border-color: var(--seal); }
.pic-pos { display: block; text-align: center; font-size: 0.75rem; color: var(--smoke); margin-top: 0.15rem; }
.pic-menu { position: absolute; z-index: 5; left: 0; top: 100%; margin-top: 0.2rem; background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.08); display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; width: 8.5rem; }
.pic-menu button { font: inherit; font-size: 0.8rem; padding: 0.3rem 0; border: 0; background: #f4f2ee; cursor: pointer; }
.pic-menu button.on, .pic-menu button:hover { background: var(--ink); color: #fff; }
.pic-add { width: 6.2rem; aspect-ratio: 1; display: grid; place-items: center; text-align: center; border: 1px dashed #bdb8b0; color: var(--smoke); font-size: 0.8rem; cursor: pointer; line-height: 1.4; padding: 0.3rem; }
.pic-add:hover { border-color: var(--ink); color: var(--ink); }
.pic-help { flex-basis: 100%; }

/* 프리미엄 : 파스텔 지면. 쇠의 차가움을 분필과 수채의 온기로 감싼다 */
body.pastel { --paper: #fbf6ef; --line: #eadfd2; --seal: #b5735f; --smoke: #8a7f76;
  background: radial-gradient(1200px 700px at 8% -5%, #fde8dc 0%, rgba(253,232,220,0) 60%), radial-gradient(1000px 800px at 105% 30%, #e3eedf 0%, rgba(227,238,223,0) 55%), radial-gradient(900px 700px at 40% 115%, #e6e4f3 0%, rgba(230,228,243,0) 60%), #fbf6ef;
  background-attachment: fixed; }
.pastel .mag-hero { border-radius: 4px; filter: saturate(.82) brightness(1.04) contrast(.94); }
.pastel .mag-pastel h1 { font-weight: 600; letter-spacing: 0.01em; }
.pastel .mag-lead { color: #7b5d52; font-style: normal; border-left: 3px solid #f2c9b6; padding-left: 1rem; }
.pastel .mag-story p { line-height: 2.05; }
.pastel .sp img { border-radius: 3px; filter: saturate(.85) brightness(1.03); }
.pastel .story-part + .story-part { margin-top: 2.2rem; padding-top: 2rem; border-top: 1px dashed #e7d6c8; }
.pastel .item-body { background: rgba(255,255,255,.55); border: 1px solid var(--line); border-radius: 6px; padding: 1.4rem clamp(1rem, 3vw, 2rem); margin-top: 2.5rem; }
.more-story { margin: 2.6rem 0 0; padding: 1.4rem 1.6rem; background: rgba(255,250,244,.85); border: 1px solid #efdccd; border-radius: 6px; color: #5d4e46; font-size: 0.97rem; position: relative; }
.more-story .more-mark { position: absolute; top: -0.9rem; left: 1.2rem; margin: 0; background: #fbf6ef; padding: 0 0.4rem; color: var(--seal); font-size: 1.1rem; line-height: 1.6; }
.sp-float.sp-left { float: left; }
.sp-float.sp-right { float: right; }
.sp-float .sp img, .sp-row .sp img { width: 100%; display: block; }
.sp-float, .sp-row { margin: 0.4rem 0 1rem; }

/* 큐레이션과 프리미엄의 목록 */
.board-page { max-width: 64rem; }
.post-list, .pre-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 2rem 1.6rem; }
.post-list a, .pre-list a { display: block; text-decoration: none; }
.post-card.first { grid-column: 1 / -1; }
.post-card.first .pc-img { aspect-ratio: 21 / 9; }
.post-card.first .pc-title { font-size: 1.6rem; }
.pc-img { display: block; aspect-ratio: 4 / 3; background: #ecebe7 center / cover no-repeat; margin-bottom: 0.7rem; }
.pc-none { display: grid; place-items: center; color: #c9c5be; font-size: 3rem; }
.pc-meta { display: block; font-size: 0.78rem; color: var(--smoke); letter-spacing: 0.04em; }
.pc-title { display: block; font-weight: 600; font-size: 1.15rem; line-height: 1.5; }
.pc-sub { display: block; color: var(--smoke); font-size: 0.92rem; line-height: 1.6; margin-top: 0.2rem; }
.post-list a:hover .pc-title, .pre-list a:hover .pc-title { color: var(--seal); }
.pastel .pre-list .pc-img { border-radius: 5px; filter: saturate(.85) brightness(1.04); }
.pastel .pre-card { background: rgba(255,255,255,.5); border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 0.8rem 1.1rem; }

/* 글 한 편 : 에세이, 화보, 노트 */
.post-page { padding: 0 clamp(1.25rem, 5vw, 4rem) 3rem; }
.post { max-width: 60rem; margin: 0 auto; }
.post figure { margin: 0; }
.post img { width: 100%; display: block; }
.pt-head { max-width: var(--measure); margin: 1.6rem auto 2rem; }
.pt-kind { font-size: 0.8rem; color: var(--smoke); letter-spacing: 0.05em; margin: 0; }
.pt-kind a { text-decoration: none; }
.pt-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.35; margin: 0.4rem 0 0.6rem; }
.pt-sub { color: var(--smoke); font-size: 1.05rem; margin: 0; }
.pt-body { max-width: var(--measure); margin: 0 auto; }
.pt-hero img { max-height: 78vh; object-fit: cover; }
.pt-in { margin: 2rem -6rem !important; }
.pt-in.pt-alt { margin: 2rem -2rem 2rem 6rem !important; }
.pt-gallery .pt-head { text-align: center; }
.pt-gallery .pt-full { margin: 0 calc(50% - 50vw) !important; }
.pt-gallery .pt-full img { max-height: 88vh; }
.pt-pair, .pt-grid { display: grid; gap: 0.6rem; margin: 2rem -8rem; }
.pt-pair.pt-n2 { grid-template-columns: 1fr 1fr; }
.pt-pair img, .pt-grid img { aspect-ratio: 4 / 5; object-fit: cover; }
.pt-pair.pt-n1 img { aspect-ratio: auto; }
.pt-grid { grid-template-columns: repeat(3, 1fr); }
.pt-grid.pt-small { margin: 2rem 0; }
.pt-note .pt-body { font-size: 0.97rem; }
.pt-note .pt-side { float: right; clear: right; width: 38%; margin: 0.3rem -10rem 1rem 1.4rem !important; }
.pt-note .pt-side img { filter: grayscale(.15); }
.pt-rel { clear: both; max-width: var(--measure); margin: 3rem auto 0; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.pt-rel h2 { font-size: 0.95rem; color: var(--smoke); font-weight: 400; }
.pt-rel .shelf { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.post-page .back { max-width: var(--measure); margin: 2rem auto 0; }
@media (max-width: 64rem) { .pt-in, .pt-in.pt-alt, .pt-pair, .pt-grid { margin-left: 0 !important; margin-right: 0 !important; } .pt-note .pt-side { margin-right: 0 !important; } }
@media (max-width: 40rem) { .pt-note .pt-side { float: none; width: auto; margin: 1rem 0 !important; } .pt-grid { grid-template-columns: 1fr 1fr; } }

/* 검색 */
.search-form { display: flex; border-bottom: 2px solid var(--ink); margin: 1rem 0 1.6rem; }
.search-form input { flex: 1; font: inherit; font-size: 1.15rem; border: 0; background: transparent; padding: 0.5rem 0; outline: none; }
.search-form button { border: 0; background: transparent; cursor: pointer; color: var(--ink); padding: 0 0.3rem; }
.search-count { color: var(--smoke); font-size: 0.85rem; }
.search-group h2 { font-size: 1rem; margin: 1.6rem 0 0.4rem; border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; }
.search-group .cnt { color: var(--smoke); font-weight: 400; font-size: 0.85rem; }
.search-group ul { list-style: none; margin: 0; padding: 0; }
.search-group li { display: flex; gap: 0.8rem; align-items: baseline; padding: 0.3rem 0; flex-wrap: wrap; }
.search-group li a { font-weight: 600; text-decoration: none; }
.search-group .s-sub { color: var(--smoke); font-size: 0.88rem; flex: 1; }
.search-group .no { color: var(--smoke); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.search-miss { color: var(--smoke); }
.market .criteria-strip { margin-top: 3.5rem; }

/* 큐레이션 본문의 모양 */
.post h2 { font-size: 1.25rem; margin: 2.4rem 0 0.8rem; line-height: 1.5; }
.pt-quote { margin: 1.8rem 0; padding: 0.2rem 0 0.2rem 1.3rem; border-left: 3px solid var(--seal); color: #4a4642; font-size: 1.05rem; }
.pt-quote p { margin: 0; }
.pt-list { margin: 1rem 0; padding-left: 1.2rem; }
.pt-list li { margin: 0.2rem 0; }
.pt-hr { border: 0; text-align: center; margin: 2.4rem 0; }
.pt-hr::after { content: "火"; color: var(--seal); font-size: 0.95rem; letter-spacing: 0; }
.post strong { font-weight: 600; }

/* 관리 화면 : 본문 편집 단추 */
.ed-bar { display: flex; flex-wrap: wrap; gap: 2px; border: 1px solid var(--line); border-bottom: 0; background: #f1efeb; padding: 3px; position: sticky; top: 0; z-index: 3; }
.ed-bar button { font: inherit; font-size: 0.85rem; border: 0; background: transparent; padding: 0.35rem 0.75rem; cursor: pointer; color: var(--ink); }
.ed-bar button:hover { background: #fff; }
.ed-bar .ed-pv { margin-left: auto; color: var(--smoke); }
.ed-bar .ed-pv.on { background: var(--ink); color: #fff; }
.ed-bar + textarea { border-top-left-radius: 0; border-top-right-radius: 0; }
.ed-preview { border: 1px solid var(--line); background: #fff; padding: 1rem 1.4rem; min-height: 18rem; max-width: none; }

/* 머리의 검색창 : 이름과 메뉴 사이에 넓게 */
.site-head { align-items: center; }
.head-search { flex: 1; max-width: 30rem; margin: 0 auto; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.7); padding: 0 0.4rem 0 1rem; }
.head-search:focus-within { border-color: var(--ink); background: #fff; }
.head-search input { flex: 1; min-width: 0; font: inherit; font-size: 0.92rem; border: 0; background: transparent; padding: 0.5rem 0; outline: none; color: var(--ink); }
.head-search input::-webkit-search-cancel-button { display: none; }
.head-search button { border: 0; background: transparent; cursor: pointer; color: var(--smoke); padding: 0.35rem; display: grid; place-items: center; }
.head-search button:hover { color: var(--ink); }
.search-page .search-form { display: none; }
@media (max-width: 860px) {
  .site-head { flex-wrap: wrap; row-gap: 0.7rem; }
  .head-search { order: 3; flex-basis: 100%; max-width: none; }
}
/* 대문 : 황금선과 첫 문 사이를 넉넉히 */
.gate-page .doors li:first-child { padding-top: 1.9rem; }
@media (max-width: 760px) { .gate-page .doors li:first-child { padding-top: 1.4rem; } }

/* 큐레이션 본문 : 정렬, 밑줄, 강조, 본문 사진, 동영상 */
.pt-al-center { text-align: center; }
.pt-al-right { text-align: right; }
.pt-al-center .pt-quote, .pt-al-right .pt-quote { border-left: 0; padding-left: 0; }
.post mark, .ed-preview mark { background: linear-gradient(transparent 58%, #f4d9c9 58%); color: inherit; padding: 0 0.05em; }
.post u { text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
.post ol.pt-list { padding-left: 1.4rem; }
.pt-inline { margin: 2rem 0 !important; }
.pt-inline figcaption { font-size: 0.82rem; color: var(--smoke); text-align: center; margin-top: 0.5rem; }
.pt-video { margin: 2rem 0 !important; position: relative; aspect-ratio: 16 / 9; background: #111; }
.pt-video.tall { aspect-ratio: 9 / 16; max-width: 22rem; margin-left: auto !important; margin-right: auto !important; }
.pt-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 편집 단추 묶음 */
.ed-bar { gap: 0; align-items: center; padding: 2px 3px; }
.ed-g { display: inline-flex; padding: 0 0.25rem; border-right: 1px solid #ddd8d0; }
.ed-g:last-of-type { border-right: 0; }
.ed-bar button { padding: 0.35rem 0.55rem; }
.ed-bar button[data-ed="undo"], .ed-bar button[data-ed="redo"] { font-size: 1rem; padding: 0.2rem 0.5rem; }
.ed-end { margin-left: auto; border-right: 0; align-items: center; gap: 0.5rem; }
.ed-count { font-size: 0.75rem; color: var(--smoke); font-variant-numeric: tabular-nums; }
.ed-bar.previewing .ed-g:not(.ed-end) { opacity: 0.35; pointer-events: none; }
.ed-bar mark { background: linear-gradient(transparent 58%, #f4d9c9 58%); color: inherit; }

/* 본문 양쪽 맞춤 : 큐레이션 글과 프리미엄 이야기. 어절은 자르지 않는다 */
.pt-body p, .pt-body li, .mag-story p, .more-story p { text-align: justify; word-break: keep-all; overflow-wrap: break-word; }
.pt-body .pt-quote p { text-align: left; }
.pt-al-center p, .pt-al-center li { text-align: center; }
.pt-al-right p, .pt-al-right li { text-align: right; }

/* 큐레이션 편집기 : 쓰는 화면이 곧 공개 화면이다 */
.ed-wrap > label { display: block; }
.ed-bar { position: sticky; top: 0; z-index: 6; border-bottom: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0,0,0,.04); }
.ed-count.over { color: var(--seal); font-weight: 600; }
.ed-doc { border: 1px solid var(--line); border-top: 0; background: #fff; min-height: 26rem; padding: 1.6rem clamp(1rem, 4vw, 2.6rem) 3rem; max-width: none; outline: none; font-size: 1.02rem; line-height: 1.95; cursor: text; }
.ed-doc:focus { box-shadow: inset 0 0 0 1px #d8d2c8; }
.ed-doc.empty::before { content: attr(data-ph); color: #b7b1a8; position: absolute; pointer-events: none; }
.ed-doc p { margin: 0 0 1.1rem; }
.ed-doc h2 { margin: 2rem 0 0.8rem; }
.ed-doc a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; }
.ed-media { position: relative; margin: 1.6rem 0 !important; user-select: none; }
.ed-media img { width: 100%; display: block; }
.ed-media .ed-x { position: absolute; top: 0.5rem; right: 0.5rem; width: 2rem; height: 2rem; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.ed-media .ed-x:hover { background: var(--seal); }
.ed-media .ed-cap { font-size: 0.82rem; color: var(--smoke); text-align: center; margin-top: 0.5rem; cursor: pointer; text-indent: 0; }
.ed-cap-ph { color: #c2bcb3; border-bottom: 1px dashed #c2bcb3; }
.pt-video-ed { background: #111; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.pt-video-ed img { position: absolute; inset: 0; height: 100%; object-fit: cover; opacity: .85; }
.pt-video-ed .ed-play { position: relative; width: 4rem; height: 4rem; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; font-size: 1.4rem; padding-left: 0.2rem; }
.pt-video-ed .ed-vimeo { color: #ddd; }
.pt-video-ed .ed-cap-v { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #eee; font-size: 0.75rem; padding: 0.3rem 0.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 문단 첫 줄 한 글자 들여쓰기 : 큐레이션 본문과 편집기. 가운데와 오른쪽 문단, 인용은 들이지 않는다 */
.pt-body p, .ed-doc p { text-indent: 1em; }
.pt-body .pt-quote p, .ed-doc blockquote p, .pt-al-center p, .pt-al-right p, .ed-doc p[style*="center"], .ed-doc p[style*="right"] { text-indent: 0; }
.ed-doc p, .ed-doc li { text-align: justify; word-break: keep-all; overflow-wrap: break-word; }
.ed-doc blockquote { margin: 1.8rem 0; padding: 0.2rem 0 0.2rem 1.3rem; border-left: 3px solid var(--seal); color: #4a4642; }

/* ── 잡지 지면 : 큐레이션 글과 프리미엄. 쓰는 사람은 제목, 글, 사진만 넣고 지면은 여기서 짠다 ── */
.post { --mz-ink: #2a1d16; --mz-kick: #a5352a; --mz-sub: #9c5a3c; --mz-gold: #b08d57; --mz-quote: #8b4a30; --mz-text: #2f2925; }
.post .pt-head { max-width: 44rem; margin: 3.2rem auto 2.6rem; text-align: center; }
.post .pt-kind { margin: 0; font-size: 0.78rem; letter-spacing: 0.24em; font-weight: 600; color: var(--mz-kick); }
.post .pt-kind a { color: inherit; text-decoration: none; }
.post .pt-kind span { margin-left: 0.9rem; padding-left: 0.9rem; border-left: 1px solid #d8c9b8; color: var(--smoke); font-weight: 400; letter-spacing: 0.12em; }
.post .pt-head h1 { font-size: clamp(2.1rem, 4.8vw, 3.3rem); line-height: 1.28; letter-spacing: -0.01em; font-weight: 600; color: var(--mz-ink); margin: 0.9rem 0 1rem; word-break: keep-all; }
.post .pt-sub { color: var(--mz-sub); font-size: clamp(1.05rem, 2vw, 1.28rem); line-height: 1.65; margin: 0 auto; max-width: 36rem; word-break: keep-all; }
.post .pt-rule { display: block; width: 3.2rem; height: 2px; background: var(--mz-gold); margin: 1.7rem auto 0.9rem; }
.post .pt-date { margin: 0; font-size: 0.8rem; letter-spacing: 0.1em; color: var(--smoke); }
.post .pt-hero { max-width: 64rem; margin: 0 auto 3.2rem !important; }
.post .pt-hero img { max-height: 74vh; object-fit: cover; }
.pt-gallery .pt-hero { margin-bottom: 0 !important; }
.post .pt-body { font-size: 1.08rem; line-height: 2.05; color: var(--mz-text); }
.post .pt-body a { color: var(--mz-kick); text-underline-offset: 0.2em; }
/* 첫 문단 : 첫 글자를 크게 세운다 */
.post .pt-body > p:first-child { text-indent: 0; }
.post .pt-body > p:first-child::first-letter { float: left; font-size: 3.5em; line-height: 0.88; margin: 0.1em 0.14em 0 0; font-weight: 600; color: var(--mz-kick); }
/* 소제목 : 금빛 짧은 줄 아래 */
.post .pt-body h2, .ed-doc h2 { font-size: 1.32rem; line-height: 1.5; color: #6e3a24; margin: 3rem 0 1rem; text-indent: 0; }
.post .pt-body h2::before, .ed-doc h2::before { content: ""; display: block; width: 1.7rem; height: 2px; background: var(--mz-gold, #b08d57); margin-bottom: 0.8rem; }
/* 인용 : 지면 가운데 크게 뽑아 세운다 */
.post .pt-body .pt-quote, .ed-doc blockquote { border-left: 0; text-align: center; font-size: 1.32rem; line-height: 1.8; color: var(--mz-quote, #8b4a30); margin: 3rem 0; padding: 2rem 1rem 1.6rem; border-top: 1px solid #e6d8c6; border-bottom: 1px solid #e6d8c6; position: relative; }
.post .pt-body .pt-quote::before, .ed-doc blockquote::before { content: "\201C"; position: absolute; top: -0.85rem; left: 50%; transform: translateX(-50%); background: var(--paper, #f6f4f0); padding: 0 0.6rem; font-size: 2.6rem; line-height: 1; color: var(--mz-gold, #b08d57); font-family: Georgia, serif; }
.ed-doc blockquote::before { background: #fff; }
.post .pt-body .pt-quote p { text-indent: 0; text-align: center; }
/* 사진 : 글 단보다 넓게 */
.post .pt-body .pt-inline { margin: 2.8rem -5rem !important; }
.post .pt-body .pt-inline figcaption { font-size: 0.82rem; color: var(--smoke); margin-top: 0.7rem; letter-spacing: 0.02em; }
.post .pt-body .pt-video { margin: 2.8rem -5rem !important; }
.post .pt-body ul.pt-list, .post .pt-body ol.pt-list { padding-left: 1.6rem; }
.post .pt-body ul.pt-list li::marker { color: var(--mz-gold); }
/* 글이 끝나는 자리 */
.post .pt-body::after { content: "火"; display: block; text-align: center; color: var(--mz-kick); font-size: 0.95rem; margin-top: 2.8rem; clear: both; }
@media (max-width: 64rem) { .post .pt-body .pt-inline, .post .pt-body .pt-video { margin-left: 0 !important; margin-right: 0 !important; } }
@media (max-width: 40rem) { .post .pt-head { margin-top: 2rem; } .post .pt-body { font-size: 1.02rem; } }

/* 프리미엄 : 같은 지면을 파스텔로 */
.mz-premium { --mz-ink: #3b2a23; --mz-kick: #c0735a; --mz-sub: #b07d66; --mz-gold: #e2b49a; --mz-quote: #a0614c; --mz-text: #3a302b; max-width: 64rem; margin: 0 auto; }
.mz-premium .pt-body { max-width: var(--measure); margin: 0 auto; }
.mz-premium .pt-hero img { border-radius: 6px; filter: saturate(.86) brightness(1.03); }
.mz-premium .pt-body .pt-inline img { border-radius: 4px; filter: saturate(.88) brightness(1.03); }
.mz-premium .pt-body .pt-quote::before { background: #fbf6ef; }
.mz-premium .mz-ask { max-width: var(--measure); margin: 2.4rem auto 0; text-align: center; }
.mz-premium .item-body { max-width: var(--measure); margin-left: auto; margin-right: auto; }
/* 세로 사진이 지면을 다 덮지 않게 : 화면 높이 안에서 가운데 */
.post .pt-body figure img, .ed-doc .ed-media.pt-inline img { width: auto; max-width: 100%; max-height: 82vh; margin: 0 auto; }
.post .pt-hero img { width: 100%; max-height: 74vh; object-fit: cover; }
.post .pt-body > p:first-child { display: flow-root; }
.fx { font-size: 0.78em; color: var(--smoke); font-weight: 400; white-space: nowrap; margin-left: 0.25em; }
.pt-vlink { text-align: center; margin: 2rem 0; } .pt-vlink a { display: inline-block; border: 1px solid var(--line); padding: 0.6rem 1.2rem; text-decoration: none; }
.tr-box fieldset { border: 1px solid var(--line); padding: 0.8rem 1rem 1rem; margin: 0.8rem 0; }
.tr-box legend { font-weight: 600; padding: 0 0.4rem; }
.tr-box label { display: block; font-size: 0.82rem; color: var(--smoke); margin: 0.5rem 0 0.2rem; }
.tr-box textarea { font-size: 0.9rem; }
.tr-lock, .tr-auto, .tr-none { font-size: 0.72rem; font-weight: 400; padding: 0.1rem 0.4rem; margin-left: 0.4rem; border-radius: 3px; }
.tr-lock { background: #f4d9c9; color: #8b4a30; } .tr-auto { background: #e7efe3; color: #4d6b45; } .tr-none { background: #eee; color: #888; }
.tr-reset { color: var(--seal) !important; }
.pt-orig-note { text-align: center; font-size: 0.8rem; color: var(--smoke); margin: -1.4rem 0 2rem; }
.tr-legal-note { border: 1px solid #e6d8c6; background: #fbf6ef; padding: 0.8rem 1rem; font-size: 0.9rem; color: #6b5245; margin: 0 0 2rem; }

/* ── 우리 공구해요 : 사진 번호, 불씨, 추천 칸 ── */
.ember { width: 1em; height: 1em; fill: currentColor; vertical-align: -0.12em; }
.ember .ember-core { fill: #f6c26b; }
.wish-hint { max-width: 44rem; margin: -1.2rem auto 2.4rem; text-align: center; font-size: 0.86rem; color: var(--smoke); letter-spacing: 0.02em; }
.wish-hint .ember { color: #c0573a; margin-right: 0.4em; font-size: 1.05em; }
.wish-fig { position: relative; cursor: pointer; }
.wish-fig > a { cursor: pointer; }
.wish-fig img { transition: filter .35s ease, transform .35s ease; }
.wish-fig:hover img, .wish-fig:focus-visible img { filter: brightness(1.05) saturate(1.04); }
.wish-fig:focus-visible { outline: 2px solid #c0573a; outline-offset: 4px; }
.wish-no { position: absolute; top: 0.7rem; left: 0.7rem; min-width: 1.75rem; height: 1.75rem; padding: 0 0.45rem; border-radius: 1rem; background: rgba(251, 246, 239, 0.86); color: #6d4b3a; font: 600 0.78rem/1.75rem "Noto Serif KR", serif; text-align: center; box-shadow: 0 1px 6px rgba(42, 29, 22, 0.12); pointer-events: none; backdrop-filter: blur(3px); }
.wish-count { position: absolute; top: 0.7rem; right: 0.7rem; display: inline-flex; align-items: center; gap: 0.3rem; height: 1.75rem; padding: 0 0.6rem; border-radius: 1rem; background: rgba(42, 29, 22, 0.62); color: #ffd9a8; font: 600 0.8rem/1 "Noto Serif KR", serif; pointer-events: none; backdrop-filter: blur(3px); }
.wish-count .ember { color: #ff8a4c; }
.wish-fig.wished .wish-count { background: rgba(165, 53, 42, 0.82); color: #fff3df; }
html.wish-lock { overflow: hidden; }
.wish-veil { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1.2rem; background: rgba(32, 22, 16, 0); backdrop-filter: blur(0); transition: background .25s ease, backdrop-filter .25s ease; }
.wish-veil.on { background: rgba(32, 22, 16, 0.55); backdrop-filter: blur(4px); }
.wish-card { position: relative; width: min(28rem, 100%); max-height: calc(100vh - 2.4rem); overflow: auto; background: #fbf6ef; color: #2a1d16; border-radius: 14px; box-shadow: 0 24px 60px rgba(32, 22, 16, 0.35); opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .25s ease, transform .3s ease; }
.wish-veil.on .wish-card { opacity: 1; transform: none; }
.wish-x { position: absolute; top: 0.55rem; right: 0.7rem; z-index: 2; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: rgba(251, 246, 239, 0.85); color: #6d4b3a; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.wish-pic { position: relative; margin: 0; }
.wish-pic img { display: block; width: 100%; max-height: 15rem; object-fit: cover; border-radius: 14px 14px 0 0; filter: saturate(.9) brightness(1.03); }
.wish-pno { position: absolute; left: 0.9rem; bottom: 0.8rem; padding: 0.15rem 0.6rem; border-radius: 1rem; background: rgba(251, 246, 239, 0.88); font-size: 0.78rem; color: #6d4b3a; }
.wish-form { padding: 1.3rem 1.6rem 1.5rem; }
.wish-form h2 { margin: 0 0 0.25rem; font-size: 1.45rem; font-weight: 600; letter-spacing: 0.01em; color: #2a1d16; }
.wish-sub { margin: 0 0 1.1rem; font-size: 0.88rem; line-height: 1.7; color: #9c5a3c; }
.wish-f { display: block; margin: 0 0 0.9rem; }
.wish-f span { display: block; font-size: 0.76rem; color: #8a7f76; letter-spacing: 0.03em; }
.wish-f input { width: 100%; border: 0; border-bottom: 1px solid #d9c4b0; background: transparent; padding: 0.4rem 0 0.35rem; font: inherit; font-size: 1rem; color: #2a1d16; border-radius: 0; }
.wish-f input:focus { outline: none; border-bottom-color: #b08d57; box-shadow: 0 1px 0 #b08d57; }
.wish-f input::placeholder { color: #bfb1a4; }
.wish-agree { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.6rem 0 1rem; font-size: 0.72rem; line-height: 1.6; color: #8a7f76; }
.wish-agree input { margin-top: 0.25rem; accent-color: #a5352a; }
.wish-send { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.wish-go { width: 3.6rem; height: 3.6rem; border-radius: 50%; border: 1px solid #e3cdb8; background: #fff9f1; color: #c9b3a1; font-size: 1.9rem; display: grid; place-items: center; cursor: pointer; transition: color .3s ease, box-shadow .3s ease, transform .2s ease; }
.wish-go .ember-core { fill: #ead9c6; transition: fill .3s ease; }
.wish-go:hover, .wish-go:focus-visible { color: #d8603a; box-shadow: 0 0 0 6px rgba(216, 96, 58, 0.1), 0 0 22px rgba(255, 138, 76, 0.35); outline: none; }
.wish-go:hover .ember-core, .wish-go:focus-visible .ember-core { fill: #f6c26b; }
.wish-go:active { transform: scale(.95); }
.wish-go:disabled { opacity: .6; cursor: wait; }
.wish-go-lab { font-size: 0.74rem; color: #8a7f76; letter-spacing: 0.04em; }
.wish-msg { min-height: 1.2em; margin: 0.6rem 0 0; text-align: center; font-size: 0.8rem; color: #a5352a; }
.wish-done { text-align: center; padding: 1rem 0 0.6rem; }
.wish-done .ember { font-size: 3.4rem; color: #e0663e; filter: drop-shadow(0 0 14px rgba(255, 138, 76, 0.65)); animation: wish-glow 1.6s ease-in-out infinite alternate; }
.wish-thanks { margin: 0.9rem 0 0.3rem; font-size: 1.08rem; color: #2a1d16; }
.wish-together { margin: 0; font-size: 0.82rem; color: #9c5a3c; }
@keyframes wish-glow { from { transform: scale(.94); filter: drop-shadow(0 0 8px rgba(255, 138, 76, 0.45)); } to { transform: scale(1.06); filter: drop-shadow(0 0 20px rgba(255, 150, 80, 0.85)); } }
@media (prefers-reduced-motion: reduce) { .wish-done .ember { animation: none; } .wish-card, .wish-veil { transition: none; } }
/* 관리자 : 글 끝의 고치기 단추 */
.edit-end { max-width: 44rem; margin: 2.4rem auto 1rem; padding-top: 1.4rem; border-top: 1px dashed var(--line); text-align: center; }
.edit-end .btn { display: inline-flex; width: auto; align-items: center; gap: 0.45rem; padding: 0.6rem 1.4rem; font-size: 0.92rem; }
.wish-group .wg-head { display: flex; gap: 1rem; align-items: center; }
.wish-group .wg-pic { width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: 6px; }
.wish-group .wg-head p { margin: 0.1rem 0; }
.wg-rows { width: 100%; border-collapse: collapse; font-size: 0.86rem; margin: 0.8rem 0; }
.wg-rows td { border-top: 1px solid var(--line); padding: 0.45rem 0.4rem; vertical-align: top; }
.wg-rows tr.done td { color: var(--smoke); }
.wg-rows tr.done td:nth-child(2) { text-decoration: line-through; }
.gb-link { text-align: center; margin: 2.6rem 0 0; font-size: 0.86rem; }
.gb-link a { color: var(--smoke); }
.wish-count[hidden] { display: none; }
/* 판매자 화면 : 계약 칸과 공구 개별계약서 */
.contract-card .box-title .st { margin-left: 0.6rem; font-size: 0.78rem; }
.contract-card dd .btn.small { margin-left: 0.4rem; }
.gb-items { font-size: 0.86rem; }
.gb-items td .field { margin: 0; padding: 0.35rem 0.45rem; font-size: 0.86rem; }
.gb-pane:not(:empty) { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.seller-box:not(:empty) { margin: 1.2rem 0; padding-top: 1rem; border-top: 1px solid var(--line); }
/* 편집기 : 공구 사진 고르기 */
.ed-media .ed-gb, .pic .pic-gb { position: absolute; top: 0.5rem; left: 0.5rem; z-index: 2; padding: 0.2rem 0.6rem; border: 1px solid rgba(42, 29, 22, 0.25); border-radius: 1rem; background: rgba(251, 246, 239, 0.9); color: #8a7f76; font-size: 0.74rem; cursor: pointer; }
.ed-media .ed-gb.on, .pic .pic-gb.on { background: #a5352a; border-color: #a5352a; color: #fff; }
.pic .pic-gb { top: auto; bottom: 0.35rem; left: 0.35rem; padding: 0.1rem 0.45rem; font-size: 0.68rem; }

/* ───────── 대문 : 도리화(桃李花) 위에 글씨가 앉는다 ───────── */
.gate.gate-dori { display: block; max-width: none; min-height: 0; padding: 0 0 3rem; }
.dori { position: relative; width: 100%; max-width: 1600px; margin: 0 auto; aspect-ratio: 1376 / 708; min-height: 34rem; overflow: hidden; }
.dori-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 88%, transparent 100%), linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 88%, transparent 100%), linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%); mask-composite: intersect; }
.dori .verse { position: absolute; left: 13%; top: 7%; margin: 0; z-index: 2; }
.dori .gate-words { position: absolute; right: 6%; bottom: 9%; max-width: 30rem; text-align: right; z-index: 2; }
.dori .gate-words .reading { font-size: clamp(1.35rem, 2.15vw, 2.05rem); font-weight: 400; line-height: 1.7; color: #2a1d16; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.dori-path { color: #b23a2a; }
.dori .gate-words .source { margin: 0 0 0.4rem; }
.dori .gate-words .reading-en { margin: 0; }
.gate-tail { max-width: 74rem; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 4rem); }
.gate-tail .motto { text-align: center; margin: 1.2rem 0 2.2rem; }
.gate-dori .doors { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gate-dori .doors li { border: 0; padding: 1.5rem 1rem; text-align: center; }
.gate-dori .doors li + li { border-left: 1px solid var(--line); }
.gate-dori .doors li:last-child { border-bottom: 0; }
.gate-dori .doors .door-en { display: block; font-size: 0.74rem; letter-spacing: 0.06em; color: var(--smoke); margin: 0.15rem 0 0.5rem; }
.gate-page .gate-tail { opacity: 0; animation: words-in 1.2s ease var(--after, 6.5s) forwards; }
html.gate-done .gate-tail { animation: none; opacity: 1; }
/* 꽃잎 두 장이 아주 천천히 진다 */
.petal { position: absolute; z-index: 1; width: 0.9rem; height: 0.6rem; border-radius: 60% 40% 60% 40%; opacity: 0; pointer-events: none; }
.petal-1 { left: 52%; top: 38%; background: #f2c3c6; animation: petal-fall 17s ease-in-out 3s infinite; }
.petal-2 { left: 76%; top: 52%; width: 0.7rem; height: 0.5rem; background: #fbf8f1; box-shadow: 0 0 0 1px rgba(120, 110, 90, 0.18); animation: petal-fall 23s ease-in-out 11s infinite; }
@keyframes petal-fall {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  8% { opacity: 0.9; }
  50% { transform: translate(-3rem, 9rem) rotate(140deg); }
  85% { opacity: 0.8; }
  100% { opacity: 0; transform: translate(-6.5rem, 19rem) rotate(300deg); }
}
@media (prefers-reduced-motion: reduce) { .petal { display: none; } }
@media (max-width: 900px) {
  .dori { aspect-ratio: auto; min-height: 0; overflow: visible; display: flex; flex-direction: column; align-items: center; padding: 0 1.25rem; }
  .dori-art { display: block; width: calc(100% + 2.5rem); height: 58vw; position: relative; overflow: hidden; }
  .dori-art img { object-position: 92% 12%; }
  .dori .verse { position: relative; left: auto; top: auto; margin: 1.5rem 0 0 3rem; }
  .dori .verse .cell { width: 16vw; }
  .dori .gate-words { position: static; text-align: center; margin: 2rem 0 0; max-width: 24rem; }
  .petal { display: none; }
  .gate-dori .doors { grid-template-columns: 1fr 1fr; }
  html[lang="ko"] .gate-dori .reading-en { white-space: nowrap; letter-spacing: 0; font-size: min(0.82rem, 2.9vw); }
  .gate-dori .doors li:nth-child(3) { border-left: 0; }
  .gate-dori .doors li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
/* 넓은 화면 : 그림, 글씨, 격언, 네 문이 한 화면에 든다 */
@media (min-width: 901px) {
  .gate.gate-dori { padding-bottom: 0; }
  .dori { aspect-ratio: auto; height: calc(100vh - 82px - 11.6rem); min-height: 25rem; max-height: 52rem; }
  .gate-page .dori .verse .cell { width: clamp(3.4rem, 9.2vh, 7.6rem); }
  .dori .verse { top: 6%; }
  .dori .gate-words { bottom: 7%; }
  .dori .gate-words .reading { font-size: clamp(1.2rem, 3.3vh, 1.9rem); }
  .gate-tail .motto { margin: 0.6rem 0 0.9rem; font-size: 0.98rem; }
  .gate-dori .doors li { padding: 0.85rem 0.8rem; }
  .gate-dori .doors .door-name { font-size: 1.02rem; }
  .gate-dori .doors .door-en { margin: 0.05rem 0 0.2rem; font-size: 0.7rem; }
  .gate-dori .doors .door-note { font-size: 0.82rem; line-height: 1.45; }
}
/* 네 문은 같은 높이로 선다. 금빛 선은 문 줄 전체 위에 둔다 */
.gate-page .gate-dori .doors li:first-child { padding-top: inherit; border-top: 0; }
.gate-dori .doors { border-top: 1px solid #a8894e; }
.gate-dori .doors li { padding-top: 1.5rem; }
@media (min-width: 901px) {
  .gate-dori .doors li, .gate-page .gate-dori .doors li:first-child { padding-top: 0.85rem; }
  .dori-art img { object-position: 70% 72%; }
  .gate-page .dori .verse .seal, .gate-page .dori .verse .seal-soak { width: clamp(2.2rem, 4.4vh, 3.8rem); left: clamp(-4.2rem, -5.6vh, -2.8rem); }
  .gate-page .dori .verse .name-seal { width: clamp(1.7rem, 3.2vh, 2.8rem); left: clamp(-3.4rem, -4vh, -2.2rem); bottom: calc(clamp(2.2rem, 4.4vh, 3.8rem) + 1rem); }
  .gate-page .dori .verse .gwanji { width: clamp(0.6rem, 1.25vh, 1.3rem); left: clamp(-2.95rem, -3.4vh, -1.9rem); bottom: calc(clamp(2.2rem, 4.4vh, 3.8rem) + clamp(1.7rem, 3.2vh, 2.8rem) + 1.6rem); }
  .gate-page .dori .verse .duin { width: clamp(1.1rem, 2vh, 1.8rem); right: clamp(-2.8rem, -3.2vh, -1.6rem); }
}
/* 도리화 전체 보이기 : 그림은 잘리지 않고 통째로 줄어든다. 바탕은 그림 종이색과 같게 해 여백이 이어진다 */
body.gate-page { background: #f6f2e6; }
.gate-page .site-head { background: rgba(246,242,230,0.94); }
.dori-art img { object-fit: contain;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%), linear-gradient(to bottom, #000 95%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 9%), linear-gradient(to bottom, #000 95%, transparent 100%);
  mask-composite: intersect; }
@media (min-width: 901px) {
  .dori { width: 100%; max-width: none; min-height: 0; max-height: none; aspect-ratio: auto;
    height: min(calc(100vh - 82px - 11.6rem), calc(100vw * 708 / 1376)); margin: 0; }
  .dori-art { position: absolute; top: 0; right: 0; height: 100%; aspect-ratio: 1376 / 708; }
  .dori-art img { object-position: center; }
  .dori .verse { left: max(8%, calc((100% - (100vh - 82px - 11.6rem) * 1.9435) * 0.42)); }
}
@media (max-width: 900px) {
  .dori-art { height: auto; aspect-ratio: 1376 / 708; }
  .dori-art img { object-position: center;
    -webkit-mask-image: linear-gradient(to bottom, #000 94%, transparent 100%); mask-image: linear-gradient(to bottom, #000 94%, transparent 100%); }
}

/* 미리보기 : 가운데 병풍 구도 */
@media (min-width: 901px) {
  .dori { --H: calc(100vh - 82px - 8.6rem); --W: min(100vw, calc(var(--H) * 1.9435)); --M: calc((100% - var(--W)) / 2); height: min(var(--H), calc(100vw * 708 / 1376)); }
  .dori-art { left: 50%; right: auto; transform: translateX(-50%); }
  .dori-art img {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 94%, transparent 100%), linear-gradient(to bottom, #000 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 94%, transparent 100%), linear-gradient(to bottom, #000 95%, transparent 100%); }
  .dori .verse { left: calc(var(--M) + var(--W) * 0.09); top: 7%; }
  .dori .gate-words { right: calc(var(--M) + var(--W) * 0.05); bottom: 5%; max-width: none; }
  .dori .gate-words .reading { margin-bottom: 0.3rem; }
  .dori .gate-words .reading-en { margin: 0; }
  .dori .gate-words .motto { position: relative; margin: 1.1rem 0 0; padding: 1rem 0 0; white-space: nowrap;
    font-size: clamp(1.15rem, 2.9vh, 1.7rem); font-weight: 600; line-height: 1.6; text-align: right; }
  .dori .gate-words .motto::before { display: block; content: ""; position: absolute; top: 0; right: 0; left: auto; width: 2.6rem; height: 1px; background: #a8894e; }
  .gate-tail { padding-top: 0.6rem; }
}

@media (min-width: 901px) {
  .dori .gate-words { bottom: 4.5%; }
  .dori .gate-words .reading { font-size: clamp(1.1rem, 2.9vh, 1.75rem); line-height: 1.55; }
  .dori .gate-words .source { font-size: 0.8rem; margin: 0.2rem 0 0.1rem; }
  .dori .gate-words .reading-en { font-size: 0.74rem; }
  .dori .gate-words .motto { font-size: clamp(1.05rem, 2.6vh, 1.55rem); margin-top: 0.8rem; padding-top: 0.75rem; }
  .dori .gate-words .motto .q { position: static; font-size: 1em; color: inherit; font-weight: 600; margin: 0; vertical-align: baseline; }
  .dori .gate-words .motto ruby.jp { font-size: 1.3em; }
}

@media (min-width: 901px) {
  .dori .gate-words { bottom: 15%; }
  .dori .dori-motto { position: absolute; left: 50%; bottom: 3.2%; transform: translateX(-50%); margin: 0; padding: 0; z-index: 2; white-space: nowrap; text-align: center;
    font-size: clamp(1.15rem, 3vh, 1.75rem); font-weight: 600; line-height: 1.6; }
  .dori .dori-motto::before { display: none; }
  .dori .dori-motto .q { position: static; font-size: 1em; color: inherit; margin: 0; }
  .dori .dori-motto ruby.jp { font-size: 1.3em; color: var(--seal); }
}
@media (min-width: 901px) { .dori .gate-words { bottom: 13%; } .dori .dori-motto ruby.jp rt { color: var(--smoke); font-weight: 400; } }
@media (min-width: 901px) { .dori .gate-words { bottom: 10.5%; } .dori .dori-motto { bottom: 1%; } }
/* 네 문은 어느 화면에서도 온전히 보인다 */
.gate-dori .doors li { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 901px) and (max-width: 1180px) {
  .dori { --H: calc(100vh - 82px - 10.4rem); }
}

/* 그림 아래 빈 띠를 덜어 냈다. 격언은 그림 아래, 네 문 위에 선다. 글씨는 한 단계 줄인다 */
@media (min-width: 901px) {
  .dori { --H: calc(100vh - 82px - 11.2rem); }
  .dori .gate-words { bottom: 6%; }
  .dori .gate-words .reading { font-size: clamp(1rem, 2.4vh, 1.45rem); }
  .gate-tail .dori-motto { position: static; transform: none; text-align: center; white-space: nowrap; margin: 0.35rem 0 0.7rem; padding: 0;
    font-size: clamp(1rem, 2.3vh, 1.35rem); font-weight: 600; line-height: 1.6; }
  .gate-tail .dori-motto::before { display: none; }
  .gate-tail .dori-motto .q { position: static; font-size: 1em; color: inherit; margin: 0; }
  .gate-tail .dori-motto ruby.jp { font-size: 1.2em; color: var(--seal); }
  .gate-tail .dori-motto ruby.jp rt { color: var(--smoke); font-weight: 400; }
  .gate-tail { padding-top: 0; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .dori { --H: calc(100vh - 82px - 13rem); }
}
/* 네 문을 넉넉하게 : 그림에서 덜어 낸 높이를 문에 돌려준다 */
@media (min-width: 901px) {
  .dori { --H: calc(100vh - 82px - 12.8rem); }
  .gate-dori .doors li, .gate-page .gate-dori .doors li:first-child { padding-top: 1.15rem; padding-bottom: 1.15rem; }
  .gate-dori .doors .door-name { font-size: 1.1rem; }
  .gate-dori .doors .door-en { margin: 0.15rem 0 0.35rem; }
  .gate-dori .doors .door-note { font-size: 0.86rem; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .dori { --H: calc(100vh - 82px - 14.8rem); }
}
@media (min-width: 901px) { html[lang="ja"] .gate-dori .doors .door-name { font-size: 0.96rem; letter-spacing: -0.02em; } }
/* 「우리 공구해요」 창 : 오른쪽 스크롤 막대를 보이지 않게 한다. 아주 작은 화면에서는 손가락으로 그대로 내려 읽힌다 */
.wish-card { scrollbar-width: none; -ms-overflow-style: none; }
.wish-card::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ───── 메뉴 화면 한 화면 맞춤 : 큐레이션, 프리미엄, 엠포리움, 서재. 넘치면 쪽 번호로 넘긴다 ───── */
.pager { display: flex; justify-content: center; align-items: center; gap: 0.25rem; margin: 1rem 0 0; font-size: 0.95rem; }
.pager a, .pager span { min-width: 2rem; height: 2rem; display: inline-grid; place-items: center; border-radius: 1rem; text-decoration: none; color: var(--smoke); }
.pager a:hover { color: var(--ink); background: rgba(0,0,0,0.04); }
.pager .on { color: #fff; background: var(--seal); font-weight: 600; }
.pager .pg-arrow { font-size: 1.15rem; }
.pager .pg-arrow.off { opacity: 0.3; }
.pg-off { display: none !important; }
.books-all .bcat { font-size: 0.74rem; color: var(--seal); letter-spacing: 0.04em; margin: 0 0 0.2rem; }

@media (min-width: 901px) and (min-height: 560px) {
  /* 큐레이션 : 맨 위에 최신 글 하나를 크게, 아래에 같은 꼴의 카드 네 장을 가로로 */
  .board-page { max-width: 76rem; height: calc(100vh - 82px); box-sizing: border-box; display: flex; flex-direction: column; padding: 1.4rem clamp(1.25rem, 4vw, 2.5rem) 0.9rem; }
  .board-page h1 { font-size: 1.7rem; margin: 0; line-height: 1.3; }
  .board-page .byline { margin: 0.2rem 0 1rem; }
  #curation, #premium { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .post-list, .pre-list { flex: 1; min-height: 0; margin: 0; }
  .post-list { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr) auto; gap: 1rem 1.4rem; }
  .post-card.first { grid-column: 1 / -1; min-height: 0; }
  .post-card.first a { height: 100%; display: flex; flex-direction: column; }
  .post-card.first .pc-img { flex: 1; min-height: 0; aspect-ratio: auto; margin-bottom: 0.5rem; }
  .post-card.first .pc-title { font-size: 1.4rem; }
  .post-card:not(.first) .pc-img { aspect-ratio: auto; height: clamp(5rem, 14vh, 9.5rem); margin-bottom: 0.45rem; }
  .post-list .pc-title, .post-list .pc-sub, .pre-list .pc-title, .pre-list .pc-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .post-card:not(.first) .pc-title { font-size: 1rem; }
  .post-card:not(.first) .pc-sub { font-size: 0.85rem; }

  /* 프리미엄 : 왼쪽에 큰 그림과 제목, 오른쪽에 위아래 두 칸씩 */
  .pre-list { grid-template-columns: 1.5fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .pre-card { min-height: 0; }
  .pre-card.first { grid-row: 1 / 3; }
  .pre-card a { height: 100%; display: flex; flex-direction: column; }
  .pre-card .pc-img { flex: 1; min-height: 0; aspect-ratio: auto; margin-bottom: 0.45rem; }
  .pre-card.first .pc-title { font-size: 1.4rem; }
  .pre-card:not(.first) .pc-title { font-size: 1rem; }
  .pre-card:not(.first) .pc-sub { font-size: 0.85rem; }
  .pastel .pre-card { padding: 0.6rem 0.6rem 0.7rem; }
  .premium-page .gb-link { margin: 0.4rem 0 0; text-align: right; font-size: 0.85rem; }

  /* 엠포리움 : 칸은 그대로, 칸마다 상품을 가로 한 줄로 */
  .market { max-width: 76rem; height: calc(100vh - 82px); box-sizing: border-box; display: flex; flex-direction: column; padding: 1.2rem clamp(1.25rem, 4vw, 2.5rem) 0.9rem; }
  .market .page-title { font-size: 1.7rem; margin: 0; line-height: 1.3; }
  .market .page-lead { margin: 0.2rem 0 0.8rem; }
  .market .area-nav { display: flex; margin: 0 0 0.2rem; padding: 0.45rem 0; font-size: 0.9rem; }
  .market #areas { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .market .area { flex: 1; min-height: 0; display: grid; grid-template-columns: 11rem minmax(0, 1fr); align-items: center; gap: 1.2rem; padding: 0.55rem 0; }
  .market .area-head { display: block; margin: 0; }
  .market .area-head .mark { display: inline-block; margin-right: 0.4rem; }
  .market .area-head h2 { display: inline; font-size: 1.05rem; }
  .market .area-head .en { display: block; font-size: 0.75rem; margin-top: 0.15rem; }
  .market .area-head .note, .market .area .shelf-how, .market .area .more { display: none; }
  .market .area > *:not(.area-head):not(ul) { grid-column: 2; }
  .market .area .empty-shelf { margin: 0; font-size: 0.88rem; color: var(--smoke); }
  .market .area ul.shelf { height: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: 1rem; align-items: stretch; }
  .market .area ul.shelf > li { min-height: 0; margin: 0; padding: 0; border: 0; background: none; }
  .market .area ul.shelf > li > a { height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 0.75rem; align-content: center; }
  .market .area .plate { grid-row: 1 / 4; height: 100%; max-height: 9rem; aspect-ratio: 1; width: auto; margin: 0; }
  .market .area .card .name { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .market .area .card .line { font-size: 0.8rem; margin: 0.1rem 0 0.2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .market .area .card .price { font-size: 0.88rem; }
  .market .criteria-strip { display: none; }
  #market-pager .pager { margin: 0.5rem 0 0; }

  /* 서재 : 칸을 풀어 책을 한 줄로 쭉, 두 줄씩 */
  .shelf-page { max-width: 76rem; height: calc(100vh - 82px); box-sizing: border-box; display: flex; flex-direction: column; padding: 1.2rem clamp(1.25rem, 4vw, 2.5rem) 0.9rem; }
  .shelf-page .page-title { font-size: 1.7rem; margin: 0; line-height: 1.3; }
  .shelf-page .page-lead { margin: 0.2rem 0 0.4rem; }
  .shelf-page .own-note { margin: 0 0 0.8rem; font-size: 0.8rem; }
  .shelf-page .own-note:last-child { display: none; }
  .books-all { flex: 1; min-height: 0; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; }
  .books-all .book { min-height: 0; display: flex; flex-direction: column; }
  .books-all .book .spine { flex: 1; min-height: 0; aspect-ratio: auto; margin: 0 0 0.4rem; padding: 0.7rem; }
  .books-all .book .spine .btitle { font-size: 0.92rem; }
  .books-all .book .bline { font-size: 0.78rem; line-height: 1.5; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .books-all .book .soon, .books-all .book .buy-links, .books-all .book .orig { display: none; }
}
@media (min-width: 901px) and (min-height: 560px) {
  .premium-page { position: relative; }
  .premium-page .gb-link { position: absolute; right: clamp(1.25rem, 4vw, 2.5rem); bottom: 1.35rem; margin: 0; }
  .books-all .book .bline { min-height: 0; height: 1.5em; }
}
/* 책 표지는 A4 비율(210 : 297)로 세운다. 표지가 잘리지 않는다 */
.book .spine, .book-cover .spine.big { aspect-ratio: 210 / 297; }
.spine.has-cover { background-size: cover; background-position: center top; }
.book-card .plate { aspect-ratio: 210 / 297; }
@media (min-width: 901px) and (min-height: 560px) {
  .books-all .book { align-items: flex-start; }
  .books-all .book .spine { flex: 1 1 0; min-height: 0; height: auto; width: auto; max-width: 100%; aspect-ratio: 210 / 297; }
  .books-all .book .bcat, .books-all .book .bline { align-self: stretch; }
  .market .area .book-card .plate { aspect-ratio: 210 / 297; }
}
@media (min-width: 901px) and (min-height: 560px) {
  .books-all { grid-template-rows: repeat(2, auto); align-content: start; }
  .books-all .book .spine { flex: none; height: auto; max-width: none; width: min(100%, calc(((100vh - 82px - 13rem) / 2 - 3.4rem) * 0.7071)); aspect-ratio: 210 / 297; }
}
@media (min-width: 901px) and (min-height: 560px) {
  .books-all { --cw: calc(((100vh - 82px - 11rem) / 2 - 3rem) * 0.7071); grid-template-columns: repeat(6, minmax(0, var(--cw))); justify-content: space-between; gap: 0.9rem 1rem; }
  .books-all .book { width: 100%; }
  .books-all .book .spine { width: 100%; }
  .books-all .book .spine .btitle { font-size: 0.86rem; word-break: keep-all; }
}
/* 로고 */
.site-head .brand { display: inline-flex; align-items: center; line-height: 0; }
.site-head .brand img { display: block; height: 30px; width: auto; }
@media (max-width: 600px) { .site-head .brand img { height: 26px; } }
.site-foot .foot-logo { margin: 0 0 1.2rem; line-height: 0; }
.site-foot .foot-logo img { display: block; height: 26px; width: auto; }
/* 엠포리움 : 왼쪽 칸 이름도 누르면 그 칸으로 들어간다. 칸 하나만 보는 화면 */
a.area-head { color: inherit; text-decoration: none; }
a.area-head:hover h2, a.area-head:hover .mark { color: var(--seal); }
.area-off { display: none !important; }
.one-area .area { border-top: 0; padding-top: 0.5rem; }
.one-area .area-head { display: none !important; }
@media (min-width: 901px) and (min-height: 560px) {
  .market.one-area .area { display: flex; flex-direction: column; padding: 0.6rem 0 0; }
  .market.one-area .area ul.shelf { flex: 1; min-height: 0; height: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 1.2rem 1.4rem; }
  .market.one-area .area .plate { max-height: 13rem; }
  .market.one-area .area .card .name { font-size: 1rem; }
  .market.one-area .area .card .line { font-size: 0.85rem; -webkit-line-clamp: 3; }
  .market.one-area .area .empty-shelf { grid-column: auto; }
}
@media (min-width: 901px) and (min-height: 560px) {
  /* 칸 하나 보기 : 카드는 그림 위, 글 아래 */
  .market.one-area .area ul.shelf > li > a { display: flex; flex-direction: column; height: 100%; }
  .market.one-area .area .plate { flex: 1 1 0; min-height: 0; max-height: none; width: 100%; aspect-ratio: auto; height: auto; margin: 0 0 0.5rem; }
  .market.one-area .area .book-card .plate.has-cover { background-size: contain; background-repeat: no-repeat; background-color: transparent; border-color: transparent; }
  .market.one-area .area .card .line { -webkit-line-clamp: 1; white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; }
}
@media (min-width: 901px) and (min-height: 560px) {
  .market.one-area .area .book-card .plate { width: auto; max-width: 100%; aspect-ratio: 210 / 297; align-self: flex-start; }
  .market.one-area .area .card .line { min-height: 1.5em; }
  .market.one-area .area .book-card .plate.has-cover { background-size: cover; border-color: var(--line); }
}
@media (min-width: 901px) and (min-height: 560px) {
  /* 엠포리움의 화식서재 칸 : 서재 화면처럼 A4 표지를 여섯 권씩 두 줄 */
  .market.one-area #shelf ul.shelf { --cw: calc(((100vh - 82px - 15rem) / 2 - 3.6rem) * 0.7071); grid-template-columns: repeat(6, minmax(0, var(--cw))); grid-template-rows: repeat(2, auto); justify-content: space-between; align-content: start; gap: 0.9rem 1rem; }
  .market.one-area #shelf .book-card .plate { flex: none; width: 100%; height: auto; aspect-ratio: 210 / 297; align-self: stretch; }
  .market.one-area #shelf .card .name { font-size: 0.86rem; }
  .market.one-area #shelf .card .line { font-size: 0.76rem; }
  .market.one-area #shelf .card .price { font-size: 0.8rem; }
}
@media (min-width: 901px) and (min-height: 560px) { .market.one-area .area { align-items: stretch; } .market.one-area .area ul.shelf { width: 100%; } }
/* 글 끝 낙관 : 서예 작품 끝에 찍듯, 본문이 끝나는 자리 오른쪽에 하나 */
.pt-body .end-seal { text-align: right; margin: 2.4rem 0 0; text-indent: 0; line-height: 0; }
.pt-body .end-seal img { width: 44px; height: auto; transform: rotate(-3deg); opacity: 0.92; }
.post .pt-body::after { content: none; }
.post .pt-body p.end-seal, .pt-body p.end-seal { text-align: right !important; text-indent: 0 !important; clear: both; }
.pt-body p.end-seal { display: flex !important; justify-content: flex-end; width: 100%; max-width: none; padding: 0; float: none; }
/* 「저절로 길이 난다」에만 옅은 기운 : 한지색으로 둘레를 감싸고, 아주 엷은 그늘을 아래로 둔다. 글씨 크기와 자리는 그대로다 */
.dori-path { text-shadow: 0 0 3px rgba(246,242,230,0.95), 0 0 8px rgba(246,242,230,0.8), 0 1px 3px rgba(90,40,30,0.16); }
/* 붉은 글씨 음영 B : 한지색 둘레에 엷은 붉은 갈색 그늘 */
.dori-path { text-shadow: 0 0 3px rgba(246,242,230,0.95), 1px 1px 3px rgba(70,30,20,0.32); }
/* 휴대폰 : 그림 아래로 내려온 한글 풀이를 가운데로 */
@media (max-width: 900px) {
  .dori .gate-words { text-align: center; margin-left: auto; margin-right: auto; align-items: center; justify-content: center; }
  .dori .gate-words .reading, .dori .gate-words .source, .dori .gate-words .reading-en { text-align: center; margin-left: auto; margin-right: auto; }
}
@media (max-width: 900px) {
  /* 네 문의 윗여백을 똑같이 : 첫 문만 위로 붙던 것을 바로잡는다 */
  .gate-dori .doors li, .gate-page .gate-dori .doors li:first-child { padding-top: 1.5rem; }
  /* 영어 풀이 : 아이폰 글꼴에서도 한 줄 안에 들도록 조금 더 줄인다 */
  html[lang="ko"] .gate-dori .reading-en { font-size: min(0.82rem, 2.65vw); max-width: 100%; overflow: hidden; }
}
@media (max-width: 900px) {
  /* 큐레이션 바비큐도 프리미엄 브로커리지처럼 두 줄로 */
  .gate-dori .doors li:first-child .door-name { max-width: 5.2em; margin-left: auto; margin-right: auto; word-break: keep-all; }
}
@media (max-width: 900px) {
  .gate-dori .doors li:nth-child(-n+2) .door-name { display: block; max-width: 5.3em; margin-left: auto; margin-right: auto; word-break: keep-all; }
  html:not([lang="ko"]) .gate-dori .doors li:nth-child(-n+2) .door-name { max-width: none; }
}
/* 전시판매 소제목 */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 0.2rem 1.3rem; margin: 0 0 0.7rem; padding: 0 0 0.5rem; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.cat-tabs a { color: var(--smoke); text-decoration: none; padding: 0.15rem 0; border-bottom: 2px solid transparent; }
.cat-tabs a:hover { color: var(--ink); }
.cat-tabs a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--seal); }
.cat-empty { margin: 0.6rem 0; }
@media (min-width: 901px) and (min-height: 560px) { .market.one-area #new { gap: 0; } .market.one-area #new .cat-tabs { flex: none; } }
/* 상세보기 */
.detail-link { margin: 0.8rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; }
.detail-link .btn { width: auto; }
.detail-link .btn-note { font-size: 0.8rem; color: var(--smoke); }
/* 양식 안의 글은 가운데 정렬 : 칸이 그어진 표(고시표 같은 것)만 해당한다 */
.legal-table th, .legal-table td { text-align: center; vertical-align: middle; }
/* 상세 설명 */
.detail-desc p { margin: 0 0 0.9rem; line-height: 1.85; }
.detail-desc + .detail-link { margin-top: 0.2rem; }
/* 견본 그림 위의 「견본」 표시 */
.plate.has-cover .tag { font-size: 0.72rem; background: rgba(247, 243, 236, 0.88); padding: 0.1rem 0.4rem; border-radius: 2px; }
.sample-note { color: var(--seal); }

/* 큐레이션 원칙 */
details.curation-rule { margin: 0.2rem 0 0.6rem; font-size: 0.86rem; color: var(--smoke); }
details.curation-rule summary { cursor: pointer; display: inline-block; }
details.curation-rule ol, .partner-page .curation-rule ol { margin: 0.4rem 0 0; padding-left: 1.3rem; line-height: 1.7; }
.partner-page .curation-rule { margin: 0 0 1.2rem; padding: 0.8rem 1rem; border: 1px solid var(--line); font-size: 0.9rem; }
/* 정산 */
.settle-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 0.6rem 0 1.2rem; }
.settle-table th, .settle-table td { border-bottom: 1px solid var(--line); padding: 0.4rem 0.5rem; text-align: left; }
.settle-table td.num, .settle-table th.num { text-align: right; }
.settle-calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.6rem 1rem; align-items: end; }
.settle-out { font-size: 1.05rem; margin-top: 0.6rem; }
