/* 종이서랍 v2 */
@property --fold { syntax: '<length>'; inherits: false; initial-value: 0px; }

:root {
  --desk: #E6E8E1;
  --desk-deep: #D7DAD0;
  --paper: #FCFBF7;
  --paper-back: #ECE7DA;
  --ink: #363B44;
  --ink-soft: #6A707A;
  --line: #C9CDC2;
  --cobalt: #3B63A6;
  --tape: #E9C460;
  --tape-soft: rgba(233, 196, 96, .55);
  --kraft: #D9B98A;
  --shadow: 0 1px 0 rgba(54, 59, 68, .08), 0 12px 22px -14px rgba(54, 59, 68, .45);
  --shadow-up: 0 1px 0 rgba(54, 59, 68, .08), 0 22px 30px -16px rgba(54, 59, 68, .5);
  --drop: drop-shadow(0 2px 0 rgba(54, 59, 68, .08)) drop-shadow(0 8px 6px rgba(54, 59, 68, .16));
  --serif: 'Hahmlet', 'Pretendard Variable', serif;
  --sans: 'Pretendard Variable', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .28 0 0 0 0 .24 .22 0 0 0 -.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --fiber: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .09' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .36 0 0 0 0 .3 .16 0 0 0 -.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --hand: url('../assets/cursor-hand.png') 3 1;
  --hand-press: url('../assets/cursor-press.png') 7 2;
  --tile: 112px;
}

* { box-sizing: border-box; }
/* 페이지 바깥(휴대폰 사파리의 아래 막대 뒤, 당겨 늘인 곳)은 무늬 없이 단색으로 칠해진다.
   그 단색을 결 무늬가 덮인 바탕의 평균 색에 맞춰 경계가 보이지 않게 한다 */
html { -webkit-text-size-adjust: 100%; background-color: #E0E1DA; }
html, body { overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; padding-bottom: 60px;
  font-family: var(--sans); color: var(--ink); line-height: 1.6;
  background-color: var(--desk);
  /* 맨 아래 120px은 결 무늬가 페이지 바깥 단색으로 천천히 스며들게 한다 (잘린 느낌을 없애려고) */
  background-image: linear-gradient(to bottom, rgba(224, 225, 218, 0) calc(100% - 120px), #E0E1DA), var(--fiber), var(--grain);
  word-break: keep-all; overflow-wrap: break-word;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
img { display: block; }
[hidden] { display: none !important; }

/* 손가락 커서 */
@media (pointer: fine) {
  body, body * { cursor: var(--hand), auto; }
  body.pressing, body.pressing * { cursor: var(--hand-press), auto; }
  input[type='search'], input[type='number'] { cursor: text; }
}

/* ---------- 스톱모션 움직임 ---------- */
/* 한 장씩 넘기는 그림처럼 3~5장면으로 끊어 움직인다 */
@keyframes boil {
  0%   { transform: translate(0, 0) rotate(var(--r, 0deg)); }
  33%  { transform: translate(.6px, -.5px) rotate(calc(var(--r, 0deg) + .8deg)); }
  66%  { transform: translate(-.5px, .4px) rotate(calc(var(--r, 0deg) - .6deg)); }
  100% { transform: translate(0, 0) rotate(var(--r, 0deg)); }
}
@keyframes hop {
  0%   { transform: translateY(0) rotate(var(--r, 0deg)); }
  34%  { transform: translateY(-7px) rotate(calc(var(--r, 0deg) - 3deg)); }
  67%  { transform: translateY(-13px) rotate(calc(var(--r, 0deg) + 2deg)); }
  100% { transform: translateY(-10px) rotate(0deg); }
}
@keyframes drop-in {
  0%   { opacity: 0; transform: translateY(-16px) rotate(calc(var(--tr, 0deg) * 4)); }
  40%  { opacity: 1; transform: translateY(-6px) rotate(calc(var(--tr, 0deg) * -2)); }
  70%  { opacity: 1; transform: translateY(2px) rotate(var(--tr, 0deg)); }
  100% { opacity: 1; transform: translateY(0) rotate(var(--tr, 0deg)); }
}
@keyframes paper-in {
  0%   { opacity: 0; transform: translateY(24px) rotate(-3deg); }
  34%  { opacity: 1; transform: translateY(10px) rotate(1.5deg); }
  67%  { opacity: 1; transform: translateY(-3px) rotate(-.6deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes wobble {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-5deg) translateX(-3px); }
  50% { transform: rotate(4deg) translateX(3px); }
  75% { transform: rotate(-3deg) translateX(-2px); }
}

/* ---------- 머리 ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1240px; margin: 0 auto; padding: 16px 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 800; font-size: 23px; color: var(--ink); }
.logo-ico { width: 42px; height: auto; filter: var(--drop); }
.logo span { position: relative; top: -2px; } /* Hahmlet 글자가 아이콘보다 처져 보여 눈높이를 맞춘다 */
.logo:hover .logo-ico { animation: boil .5s steps(1) infinite; }
.top-actions { display: flex; gap: 4px; }
.top-btn { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.top-btn img { width: 30px; height: 30px; object-fit: contain; }
.top-btn:hover { background: rgba(252, 251, 247, .55); color: var(--ink); }
.top-btn:hover img { animation: boil .5s steps(1) infinite; }
.top-btn.icon-only { padding: 6px; }

/* ---------- 첫 화면 ---------- */
.scene { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
#home { padding-top: clamp(8px, 3.5vh, 40px); }
.home-head { text-align: center; }
.title-paper { position: relative; display: inline-block; padding: 21px 64px 35px; margin-top: 6px;
  background: url('../assets/icons/torn-cream.webp') center / 100% 100% no-repeat; }
.title-paper::before { content: ''; position: absolute; top: -12px; left: 50%; width: 110px; height: 34px; margin-left: -55px; background: url('../assets/icons/tape-yellow.webp') center / 100% 100% no-repeat; transform: rotate(-3deg); }
.title-paper h1 { color: var(--ink); }
.home-head h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(34px, 5.4vw, 60px); letter-spacing: -0.02em; line-height: 1.2; }
.lede { margin: 14px 0 0; font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-soft); }

.shelf-wrap { position: relative; max-width: 1100px; margin: clamp(26px, 5vh, 48px) auto 0; }
.shelf { position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: 0 18px; }
.shelf-plank { position: absolute; left: 0; right: 0; top: calc(16px + var(--tile) - 22px); height: 48px; z-index: 0; pointer-events: none;
  background: url('../assets/icons/plank.webp') center / 100% 100% no-repeat; filter: drop-shadow(0 10px 8px rgba(80, 60, 30, .25)); }
@media (min-width: 721px) { .item::after { display: none; } }
.item { position: relative; width: 136px; display: flex; flex-direction: column; align-items: center; padding-top: 16px; }
.item::after { /* 선반 판: 판마다 이어 붙여 한 줄 선반이 되게 */
  content: ''; position: absolute; left: -10px; right: -10px; top: calc(16px + var(--tile) - 6px); height: 16px; z-index: 0;
  background: linear-gradient(#E1C597, #CFAE7C 60%, #BE9A66);
  border-top: 1.5px solid rgba(122, 91, 58, .35); border-bottom: 2.5px solid #A98458;
  box-shadow: 0 10px 12px -9px rgba(80, 60, 30, .6);
}
.item:first-child::after { border-radius: 7px 0 0 7px; left: -4px; }
.item:last-child::after { border-radius: 0 7px 7px 0; right: -4px; }
.item-btn { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: 100%; }
.item-ico { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: var(--tile); transform: rotate(var(--r, 0deg)); }
.item-ico img { max-width: 108px; max-height: 104px; width: auto; height: auto; filter: var(--drop); }
.item-name {
  position: relative; margin-top: 44px; padding: 11px 16px 9px; min-width: 92px; line-height: 1.4; font-size: 15px; font-weight: 700; text-align: center;
  background: var(--paper) var(--grain); border-radius: 9px; box-shadow: 0 3px 4px rgba(54, 59, 68, .16);
  transform: rotate(var(--lr, 0deg)); transform-origin: 50% -24px;
}
.item-name::before { /* 색연필 점선 테두리 */
  content: ''; position: absolute; inset: 3px; border: 1.8px dashed var(--cobalt); border-radius: 7px; opacity: .8; filter: url(#pencil-ui); }
.item-name::after { /* 구멍과 노란 끈 */
  content: ''; position: absolute; left: 50%; top: -24px; width: 8px; height: 31px; margin-left: -4px;
  background: radial-gradient(circle at 50% 27px, var(--desk) 0 3.2px, #C9A23F 3.6px 4.4px, transparent 4.8px), linear-gradient(#D8B24A, #D8B24A) 50% 0 / 2px 24px no-repeat; }
.item:hover .item-name, .item.open .item-name { animation: swing .4s steps(4); }
@keyframes swing { 0% { transform: rotate(var(--lr, 0deg)); } 25% { transform: rotate(6deg); } 50% { transform: rotate(-4deg); } 75% { transform: rotate(2deg); } 100% { transform: rotate(var(--lr, 0deg)); } }
.item:hover .item-ico, .item.open .item-ico, .item-btn:focus-visible .item-ico { animation: hop .3s steps(3) forwards; }

/* 크기 꼬리표 */
.sizes { position: absolute; top: calc(100% + 8px); left: 50%; z-index: 20; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translateX(-50%); pointer-events: none; }
.sizes li { opacity: 0; }
.sizes::before { content: ''; position: absolute; left: -24px; right: -24px; top: -16px; height: 18px; } /* 이름표와 꼬리표 사이 틈을 메워 메뉴가 닫히지 않게 */
.item.open { z-index: 30; }
.item:hover .sizes, .item.open .sizes, .item:focus-within .sizes { pointer-events: auto; }
.item:hover .sizes li, .item.open .sizes li, .item:focus-within .sizes li { animation: drop-in .28s steps(3) both; animation-delay: calc(var(--i) * 70ms); }
.size-tag {
  position: relative; display: flex; align-items: baseline; gap: 8px; white-space: nowrap;
  padding: 6px 16px 6px 26px; background: var(--paper) var(--grain); font-size: 14px; font-weight: 700;
  filter: drop-shadow(0 2px 2px rgba(54, 59, 68, .2));
  clip-path: polygon(10px 0, 100% 2%, 99% 50%, 100% 98%, 10px 100%, 0 50%);
}
.size-tag small { font-weight: 500; font-size: 12px; color: var(--ink-soft); }
.size-tag::before { content: ''; position: absolute; left: 12px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--desk); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .3); }
.size-tag:hover, .size-tag:focus-visible { background-color: #FFF3CC; }
.size-tag.all { color: var(--cobalt); }
.sizes.two { display: grid; grid-template-columns: auto auto; gap: 6px 8px; justify-items: start; }
.sizes.two li:last-child { grid-column: 1 / -1; justify-self: center; }

.home-more { display: flex; justify-content: center; align-items: baseline; gap: 12px; margin-top: 24px; }
.home-count { font-size: 14px; color: var(--ink-soft); }
.link-btn { font-size: 15px; font-weight: 600; color: var(--cobalt); padding: 4px 2px; background: linear-gradient(var(--cobalt), var(--cobalt)) 0 92% / 100% 1.5px no-repeat; }
.link-btn.small { font-size: 13.5px; }

/* 끈에 매달린 견본 종이패 */
.swatch-wrap { position: relative; height: 210px; margin: 22px -24px 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.swatch-wrap::before { content: ''; position: absolute; left: 0; right: 0; top: 18px; height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 22' preserveAspectRatio='none'%3E%3Cpath d='M0 4 Q500 26 1000 4' fill='none' stroke='%233B63A6' stroke-width='2.6' stroke-dasharray='9 3'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.swatch-track { position: absolute; inset: 0; }
.swatch { position: absolute; top: 20px; left: 0; width: 100px; height: 150px; transform-origin: 50% 8px; }
.swatch-card { position: absolute; inset: 0; background-size: cover; background-position: center; clip-path: var(--tag-shape); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2)); }
.swatch::before { /* 빨래집게 */
  content: ''; position: absolute; top: -10px; left: 50%; width: 11px; height: 26px; margin-left: -5.5px; z-index: 2; border-radius: 2px;
  background: linear-gradient(90deg, #E6BE52 0 45%, #B98F2E 45% 55%, #E6BE52 55%); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.swatch::after { /* 고른 견본 뒤에 번지는 따뜻한 빛 */
  content: ''; position: absolute; inset: -14px -46px -18px; z-index: -1; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 208, 120, .95), rgba(255, 196, 104, .6) 45%, rgba(255, 190, 96, .2) 75%, rgba(255, 190, 96, 0)); }
.swatch.lit::after { opacity: 1; }
.swatch.lit .swatch-card { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .18)) drop-shadow(0 0 10px rgba(255, 196, 104, .75)); }
.swatch-track .swatch { transition: opacity .3s steps(3); }
.swatch-track.holding .swatch:not(.lit) { opacity: .68; }
.swatch:focus-visible { outline: none; }

/* ---------- 고르기 장면 ---------- */
#pick { padding-top: 6px; }
.kind-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 12px; scrollbar-width: none; }
.kind-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 6px 14px 6px 8px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--ink-soft); background: rgba(252, 251, 247, .5); }
.kind-tab img { width: 30px; height: 30px; object-fit: contain; }
.kind-tab:hover img { animation: boil .5s steps(1) infinite; }
.kind-tab[aria-selected='true'] { background: var(--paper) var(--grain); color: var(--ink); box-shadow: var(--shadow); font-weight: 700; }
.kind-tab[aria-selected='true']::before { content: ''; position: absolute; top: -8px; left: 50%; width: 44px; height: 15px; margin-left: -22px; background: url('../assets/icons/tape-yellow.webp') center / 100% 100% no-repeat; transform: rotate(-3deg); }
.pick-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.pick-title-row h2 { font-family: var(--serif); font-weight: 800; font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.015em; }
.pick-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; background: var(--paper) var(--grain); border-radius: 10px; box-shadow: inset 0 0 0 1.5px rgba(54, 59, 68, .12); }
.search img { width: 24px; height: 24px; object-fit: contain; }
.search input { width: 200px; border: 0; background: none; font: inherit; font-size: 15px; padding: 6px 0; color: var(--ink); outline: none; }
.lucky-mini { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px 5px 8px; border-radius: 10px; font-weight: 700; font-size: 15px; color: var(--cobalt); background: var(--paper) var(--grain); box-shadow: var(--shadow); }
.lucky-mini img { width: 30px; height: 30px; object-fit: contain; }
.lucky-mini:hover img { animation: wobble .4s steps(4); }

/* 자 모양 크기 고르기 */
.ruler { position: relative; display: flex; align-items: flex-end; gap: 4px; margin-top: 14px; padding: 26px 10px 10px; overflow-x: auto; scrollbar-width: thin;
  background: repeating-linear-gradient(90deg, rgba(54, 59, 68, .55) 0 1px, transparent 1px 50px) 10px 0 / auto 16px no-repeat,
              repeating-linear-gradient(90deg, rgba(54, 59, 68, .45) 0 1px, transparent 1px 10px) 10px 0 / auto 9px no-repeat,
              linear-gradient(#F1DFB9, #E7CF9E);
  border: 1.5px solid rgba(122, 91, 58, .35); border-radius: 6px; box-shadow: var(--shadow); }
.ruler-chip { flex: none; display: flex; flex-direction: column; align-items: center; padding: 6px 14px; border-radius: 6px; font-weight: 700; font-size: 15px; line-height: 1.3; }
.ruler-chip small { font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.ruler-chip:hover { background: rgba(252, 251, 247, .45); }
.ruler-chip[aria-pressed='true'] { background: var(--paper) var(--grain); box-shadow: 0 2px 4px rgba(80, 60, 30, .2); }
.ruler-read { flex: none; margin-left: auto; display: flex; align-items: flex-end; gap: 14px; padding: 0 8px 4px 20px; }
.ruler-read .mini { border: 1.6px solid var(--cobalt); background: var(--paper); border-radius: 2px; box-shadow: 2px 2px 0 rgba(59, 99, 166, .2); }
.ruler-read p { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1.25; white-space: nowrap; }
.ruler-read p small { display: block; font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink-soft); }

.filters { margin-top: 18px; }
.tag-groups { display: flex; flex-direction: column; gap: 8px; }
.tag-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tag-group > span { flex: none; width: 64px; font-size: 13px; color: var(--ink-soft); }
.tag-group.extra { display: none; }
.filters.open .tag-group.extra { display: flex; }
.tape-chip { display: inline-flex; align-items: center; justify-content: center; line-height: 1.3; padding: 4px 13px; font-size: 14px; font-weight: 600; color: var(--ink); background: rgba(252, 251, 247, .72);
  clip-path: polygon(0 0, 100% 0, 97% 25%, 100% 50%, 97% 75%, 100% 100%, 0 100%, 3% 75%, 0 50%, 3% 25%); }
.tape-chip:hover { background: rgba(233, 196, 96, .3); }
.tape-chip[aria-pressed='true'] { background: var(--tape); font-weight: 700; }
.tape-chip small { font-size: 11.5px; color: var(--ink-soft); margin-left: 3px; }
.filter-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.sort { display: flex; gap: 4px; }
.sort button { padding: 6px 10px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.sort button[aria-checked='true'] { color: var(--ink); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5 C20 2 40 7 60 4 S90 3 98 5' fill='none' stroke='%233B63A6' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center bottom / 90% 7px no-repeat; }

.foryou { margin-top: 24px; padding: 18px 20px 6px; background: rgba(252, 251, 247, .5); border-radius: 10px; }
.foryou h3 { font-size: 16px; font-weight: 700; }
.foryou-tags { display: flex; gap: 6px; margin-top: 8px; }
.foryou-row { display: flex; gap: 18px; overflow-x: auto; padding: 16px 4px 14px; }
.foryou-row .card { width: 150px; flex: none; }
.foryou-row .thumb { height: 170px; }
.foryou-row .thumb-paper img { max-height: 150px; }

.result-count { margin: 20px 0 0; font-size: 14px; color: var(--ink-soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 30px 22px; margin-top: 12px; }
.grid.wide .thumb { height: 170px; }
.grid-more { display: flex; justify-content: center; margin-top: 30px; }
.card { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.card.enter { animation: paper-in .32s steps(4) both; animation-delay: calc(var(--i, 0) * 30ms); }
.thumb { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 250px; padding-bottom: 4px; }
.thumb-paper { position: relative; transform: rotate(var(--r, 0deg)); filter: drop-shadow(0 1px 0 rgba(54, 59, 68, .1)) drop-shadow(0 10px 10px rgba(54, 59, 68, .2)); --fold: 0px; transition: --fold .24s steps(3); }
.thumb-paper img { max-width: 100%; max-height: 228px; width: auto; height: auto; clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%); }
.thumb-paper::after { content: ''; position: absolute; top: 0; right: 0; width: var(--fold); height: var(--fold); background: linear-gradient(225deg, transparent 50%, var(--paper-back) 50%, #F7F4EC 100%); filter: drop-shadow(-2px 2px 2px rgba(54, 59, 68, .25)); }
.card:hover .thumb-paper, .card:focus-visible .thumb-paper { --fold: 26px; animation: hop .3s steps(3) forwards; }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.4; }
.card-meta { display: flex; justify-content: center; gap: 12px; font-size: 13px; color: var(--ink-soft); margin-top: -4px; }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-meta img { width: 17px; height: 17px; object-fit: contain; }
.card-meta .off img { filter: grayscale(1) opacity(.55); }
.new-tape { position: absolute; top: 4px; left: 4px; z-index: 2; padding: 3px 12px; font-size: 12px; font-weight: 700; background: url('../assets/icons/tape-yellow.webp') center / 100% 100% no-repeat; transform: rotate(-7deg); }

.empty { text-align: center; padding: 60px 0; color: var(--ink-soft); }

/* ---------- 맨 아래: 만든 사람, 의견 보내기 ---------- */
.credit { max-width: 1240px; margin: 56px auto 0; padding: 18px 24px 28px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 30px; font-size: 13.5px; color: var(--ink-soft); }
.credit p { margin: 0; display: inline-flex; align-items: baseline; gap: 8px; }
.credit .c-k { font-weight: 700; color: var(--ink); opacity: .7; }
.credit a { color: inherit; text-decoration: underline; text-decoration-style: wavy; text-decoration-color: color-mix(in srgb, var(--cobalt) 55%, transparent); text-underline-offset: 4px; }
.credit a:hover { color: var(--cobalt); }
@media (max-width: 720px) {
  /* 휴대폰: 이름표는 오른쪽, 내용은 왼쪽에 맞춰 두 줄 칸으로 (덩어리째 가운데) */
  .credit { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 8px 12px; margin-top: 40px; padding: 16px 16px 26px; }
  .credit p { display: contents; }
  .credit .c-k { text-align: right; }
}

/* ---------- 공통 단추 ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px 9px 12px; border-radius: 10px; font-weight: 700; font-size: 15px; background: var(--paper); }
.btn img { width: 26px; height: 26px; object-fit: contain; }
.btn::before { content: ''; position: absolute; inset: 0; border: 2px solid currentColor; border-radius: inherit; opacity: .5; filter: url(#pencil-ui); pointer-events: none; }
.btn.primary { background: var(--cobalt); color: #fff; }
.btn.primary::before { opacity: 0; }
.btn:hover img { animation: boil .5s steps(1) infinite; }
.btn:active { transform: translateY(1px) rotate(-.5deg); }
.btn:disabled { opacity: .5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; background: rgba(230, 232, 225, .75); line-height: 1.35; text-align: center; }
.chip small { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-soft); }
.chip[aria-pressed='true'] { background: var(--tape); }
.chip:hover { background: rgba(233, 196, 96, .45); }
.chip:disabled { opacity: .4; }
.chip.more { background: none; color: var(--cobalt); text-decoration: underline; text-underline-offset: 3px; }
.seg { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 2px; background: rgba(230, 232, 225, .85); border-radius: 9px; }
.seg button { padding: 6px 12px 4px; border-radius: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.seg button[aria-pressed='true'] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.seg button:disabled { opacity: .35; }

/* ---------- 자세히 보기 ---------- */
dialog { border: 0; padding: 0; color: var(--ink); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(54, 59, 68, .45); }
dialog[open] .d-wrap, dialog[open] .l-wrap { animation: paper-in .32s steps(4) both; }
#detail { width: min(1180px, 95vw); height: min(800px, 94vh); }
.d-wrap { display: grid; grid-template-columns: 1.1fr 1fr; height: 100%; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); }
.d-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 34px 28px 18px; background: var(--desk) var(--fiber); min-height: 0; }
.d-stage::before { content: ''; position: absolute; top: 12px; left: 28px; right: 28px; height: 14px;
  background: repeating-linear-gradient(90deg, rgba(54, 59, 68, .5) 0 1px, transparent 1px 40px) 0 0 / auto 14px no-repeat,
              repeating-linear-gradient(90deg, rgba(54, 59, 68, .35) 0 1px, transparent 1px 8px) 0 0 / auto 7px no-repeat;
  border-top: 1.5px solid rgba(54, 59, 68, .3); }
.d-stage::after { content: ''; position: absolute; top: 30px; bottom: 60px; left: 10px; width: 14px;
  background: repeating-linear-gradient(180deg, rgba(54, 59, 68, .5) 0 1px, transparent 1px 40px) 0 0 / 14px auto no-repeat,
              repeating-linear-gradient(180deg, rgba(54, 59, 68, .35) 0 1px, transparent 1px 8px) 0 0 / 7px auto no-repeat;
  border-left: 1.5px solid rgba(54, 59, 68, .3); }
.d-paper { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.d-paper img { max-width: 100%; max-height: 100%; box-shadow: var(--shadow-up); background: #fff; }
.d-paper img.loading { opacity: .5; }
.d-stage-foot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.m-br { display: none; }
.d-size-note { word-break: keep-all; margin: 0; font-size: 13px; color: var(--ink-soft); text-align: center; max-width: 520px; }
.d-guides { font-size: 13px; color: var(--ink-soft); display: inline-flex; gap: 6px; align-items: center; }
.d-panel { position: relative; overflow-y: auto; padding: 30px 28px 26px; background: var(--paper) var(--grain); }
.d-close { position: absolute; top: 14px; right: 16px; padding: 6px 10px; font-size: 14px; font-weight: 600; color: var(--ink-soft); border-radius: 8px; }
.d-close:hover { background: rgba(230, 232, 225, .8); }
.d-kind { margin: 0; font-size: 14px; color: var(--cobalt); font-weight: 700; }
.d-panel h2 { font-family: var(--serif); font-weight: 800; font-size: 27px; line-height: 1.3; margin-top: 2px; padding-right: 56px; }
#d-title:focus { outline: none; }
.d-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.d-tags span { padding: 2px 10px; font-size: 12.5px; font-weight: 600; background: rgba(233, 196, 96, .35); clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%); }

/* 접힌 종이처럼 펼치는 설정 묶음 */
.fold { margin-top: 14px; background: #FFFEFA; border-radius: 4px; box-shadow: 0 1px 0 rgba(54, 59, 68, .08), 0 6px 12px -10px rgba(54, 59, 68, .5); position: relative; }
.fold::after { content: ''; position: absolute; top: 0; right: 0; width: 16px; height: 16px; background: linear-gradient(225deg, var(--paper) 50%, var(--paper-back) 50%); }
.fold > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; font-weight: 700; font-size: 15px; border-radius: 4px;
  background: linear-gradient(180deg, #EBD7B2 0%, #E2C99B 48%, #D9BD8B 52%, #E6CFA4 100%) ; box-shadow: inset 0 -1px 0 rgba(122, 91, 58, .25); }
.fold:nth-of-type(even) > summary { background: linear-gradient(0deg, #EBD7B2 0%, #E2C99B 48%, #D9BD8B 52%, #E6CFA4 100%); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary img { width: 28px; height: 28px; object-fit: contain; }
.fold > summary small { margin-left: auto; padding-right: 10px; font-weight: 500; font-size: 12.5px; color: var(--ink-soft); text-align: right; }
.fold > summary::after { content: ''; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(-45deg); margin-right: 8px; }
.fold[open] > summary::after { transform: rotate(45deg); }
.fold[open] > .fold-body { animation: fold-open .24s steps(3) both; transform-origin: top; }
@keyframes fold-open { 0% { transform: scaleY(.2) skewX(-4deg); opacity: 0; } 50% { transform: scaleY(.7) skewX(2deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
.fold-body { padding: 4px 14px 14px; border-top: 1.5px dashed rgba(54, 59, 68, .15); }
.fold-body > .chips { margin-top: 10px; }
.row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.row-label { flex: none; width: 82px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.row .chips { flex: 1; }
.row input[type='range'] { flex: 1; max-width: 220px; accent-color: var(--cobalt); }
.row output { font-size: 13px; font-weight: 600; width: 40px; }
.custom-size { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; font-size: 13.5px; }
.custom-size input { width: 70px; padding: 5px 8px; border: 1.5px solid var(--line); border-radius: 6px; font: inherit; background: #fff; }
.spec { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 14px 0 0; padding: 10px 12px; font-size: 12.5px; background: rgba(230, 232, 225, .45); border-radius: 6px; }
.spec dt { color: var(--ink-soft); }
.spec dd { margin: 0; font-weight: 600; }
/* 어디서 인쇄하나요? */
.d-where { margin-top: 20px; }
.d-where[hidden] { display: none; }
.d-where-q { margin: 0 0 8px; font-weight: 800; font-size: 15px; text-align: center; }
.where-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.where-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px 12px; border-radius: 12px; background: #FFFEFA var(--grain); box-shadow: 0 1px 0 rgba(54, 59, 68, .08), 0 8px 14px -12px rgba(54, 59, 68, .55); text-align: center; }
.where-card::before { content: ''; position: absolute; inset: 0; border: 2px dashed rgba(59, 99, 166, .28); border-radius: inherit; pointer-events: none; }
.where-card img { width: 92px; height: 74px; object-fit: contain; margin-bottom: 4px; }
.where-card img.hop { animation: hop .36s steps(3); }
.where-card:hover img { animation: boil .5s steps(1) infinite; }
.where-name { font-weight: 800; font-size: 15px; line-height: 1.3; word-break: keep-all; }
.where-desc { font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); word-break: keep-all; }
.where-card[aria-checked='true'] { background-color: rgba(233, 196, 96, .3); transform: rotate(-.6deg); }
.where-card[aria-checked='true']::before { border: 2px solid var(--cobalt); filter: url(#pencil-ui); }
.where-card[aria-checked='true']::after { content: ''; position: absolute; top: -9px; left: 50%; width: 46px; height: 16px; margin-left: -23px; background: var(--tape-soft); transform: rotate(-3deg); box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.where-card:nth-child(2)[aria-checked='true'] { transform: rotate(.6deg); }
.where-note { white-space: pre-line; margin: 10px 2px 0; font-size: 13px; line-height: 1.55; color: var(--cobalt); text-align: center; word-break: keep-all; }
.where-note:empty { display: none; }
.d-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.d-react { display: flex; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.like-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px 5px 8px; border-radius: 20px; font-weight: 700; font-size: 14px; background: rgba(230, 232, 225, .8); }
.like-btn img { width: 24px; height: 24px; object-fit: contain; filter: grayscale(1) opacity(.6); }
.like-btn[aria-pressed='true'] { background: #F6DDE3; }
.like-btn[aria-pressed='true'] img { filter: none; animation: hop .3s steps(3); }
.d-downs { font-size: 13px; color: var(--ink-soft); }
#d-reset { margin-left: auto; }
.d-status { min-height: 1.4em; margin: 10px 0 0; font-size: 13px; color: var(--cobalt); }

/* ---------- 럭키 박스 ---------- */
#lucky { width: min(600px, 94vw); }
.l-wrap { position: relative; padding: 28px 30px 24px; border-radius: 14px; background: var(--paper) var(--grain); text-align: center; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); }
.l-wrap h2 { font-family: var(--serif); font-weight: 800; font-size: 28px; }
.l-lede { margin: 6px 0 0; color: var(--ink-soft); font-size: 15px; }
.l-kinds { justify-content: center; margin-top: 14px; }
.l-stage { position: relative; height: 340px; margin-top: 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.l-stage:focus-visible { outline: 2px dashed var(--cobalt); outline-offset: 4px; border-radius: 12px; }
@media (hover: hover) { .l-stage:not(.open):not(.shake):hover .l-box.closed { transform: translateY(-4px) rotate(-1deg); } }
.l-box.closed { transition: transform .2s steps(2); }
.l-box { position: absolute; left: 50%; bottom: 6px; width: 220px; margin-left: -110px; z-index: 2; filter: var(--drop); }
.l-box.open { opacity: 0; width: 214px; margin-left: -107px; z-index: 1; } /* 상자 안쪽과 뒷벽 */
.l-box.open.front { z-index: 3; filter: none; } /* 앞벽: 종이 아랫부분을 가린다 */
.l-box.closed { z-index: 4; }
.l-lid { position: absolute; left: 50%; bottom: 107px; width: 220px; margin-left: -110px; z-index: 6; opacity: 0; filter: var(--drop); transform-origin: 30% 90%; } /* 닫힌 상자의 윗부분과 같은 자리 */
/* 종이 구덩이: 상자 바닥보다 아래로 내려간 종이는 보이지 않게 자른다 (상자 밑으로 종이가 비치지 않게) */
.l-pit { position: absolute; left: 0; right: 0; top: -400px; bottom: 26px; overflow: hidden; pointer-events: none; }
.l-paper { position: absolute; left: 50%; bottom: 30px; width: 150px; margin-left: -75px; z-index: 2; opacity: 0; transform: translateY(150px); }
.l-paper img { width: 100%; height: auto; box-shadow: var(--shadow-up); }
.l-stage.shake .l-box.closed { animation: wobble .5s steps(5); }
.l-stage.open .l-box.closed { opacity: 0; }
.l-stage.open .l-box.open { opacity: 1; }
.l-stage.open .l-lid { animation: lid-off .5s steps(4) forwards; }
.l-stage.open .l-paper { animation: rise 1s steps(8) .1s forwards; }
/* 뚜껑: 상자 위에서 살짝 들렸다가, 한쪽으로 젖혀지며 위로 사라진다 */
@keyframes lid-off { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 30% { opacity: 1; transform: translate(-4px, -22px) rotate(-6deg); } 65% { opacity: .75; transform: translate(-26px, -64px) rotate(-16deg) scale(.94); } 100% { opacity: 0; transform: translate(-48px, -104px) rotate(-24deg) scale(.86); } }
/* 상자 속(앞벽 뒤)에서 솟아올라 위로 빠져나온 뒤, 상자 앞으로 내려앉는다 */
@keyframes rise { 0% { opacity: 1; z-index: 2; transform: translateY(150px) rotate(0); } 45% { opacity: 1; z-index: 2; transform: translateY(var(--peak, -96px)) rotate(4deg); } 55% { opacity: 1; z-index: 4; transform: translateY(calc(var(--peak, -96px) + 8px)) rotate(2deg) scale(1.08); } 100% { opacity: 1; z-index: 4; transform: translateY(-14px) rotate(-3deg) scale(1.22); } }
.l-recipe { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; min-height: 34px; margin-top: 12px; align-items: center; font-size: 14px; color: var(--ink-soft); }
.l-recipe .tape-chip { background: rgba(233, 196, 96, .45); }
.l-actions { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }

/* ---------- 가위로 자르며 넘어가기 ---------- */
.cut { position: fixed; inset: 0; z-index: 1000; pointer-events: none; display: none; }
.cut.on { display: block; }
.cut-half { position: absolute; inset: 0; background: var(--paper) var(--fiber); }
.cut-half.cut-a { filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .14)); }
.cut-half::after { content: ''; position: absolute; inset: 0; background: var(--grain); opacity: .8; }
.cut-half.cut-b { }
.cut-line, .cut-slit { display: none; }
.cut-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cut-guide { fill: none; stroke: #8A8F98; stroke-width: 1.8; stroke-dasharray: 7 5 3 5; stroke-linecap: round; opacity: .85; }
.cut-gap { fill: none; stroke: #C9CCC2; stroke-width: 4.2; stroke-linejoin: round; stroke-linecap: round; }
.cut-fiber { fill: none; stroke: #FFFFFF; stroke-width: 1.8; stroke-dasharray: 2 2 1 3 4 1; opacity: 1; }
.cut-slit { position: absolute; left: 0; top: 50%; width: 0; height: 3px; margin-top: -.5px; background: var(--desk-deep); box-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.cut-scissors { position: absolute; top: 50%; left: -170px; width: 170px; margin-top: -64px; filter: var(--drop); transform-origin: 85% 50%; }
.cut.split .cut-half.cut-a { animation: half-up .5s steps(5) forwards; }
.cut.split .cut-half.cut-b { animation: half-down .5s steps(5) forwards; }
.cut.split .cut-svg, .cut.split .cut-scissors { opacity: 0; }
@keyframes half-up { to { transform: translateY(-104%) rotate(-2.5deg); } }
@keyframes half-down { to { transform: translateY(104%) rotate(2deg); } }

/* ---------- 좁은 화면 ---------- */
/* ---------- 나만의 서랍 ---------- */
.drawer-btn { position: relative; white-space: nowrap; color: var(--ink); }
.drawer-btn::before { content: ''; position: absolute; inset: 2px; border: 1.5px dashed var(--cobalt); border-radius: 9px; opacity: .4; filter: url(#pencil-ui); pointer-events: none; }
.drawer-btn:hover::before { opacity: .7; }
.drawer-btn img.bump { animation: hop .36s steps(3) 2; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; font-weight: 800; line-height: 1; color: var(--ink); background: var(--tape); box-shadow: 0 1px 2px rgba(54, 59, 68, .25); transform: rotate(4deg); }
.badge[hidden] { display: none; }
.d-keep { margin-top: 12px; }
.keep-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 9px 14px; border-radius: 10px; font-size: 15px; font-weight: 700; color: var(--ink); background: rgba(217, 185, 138, .38) var(--fiber); position: relative; }
.keep-btn::before { content: ''; position: absolute; inset: 0; border: 2px dashed rgba(122, 92, 52, .45); border-radius: inherit; pointer-events: none; }
.keep-btn img { width: 28px; height: 28px; object-fit: contain; }
.keep-btn:hover { background-color: rgba(217, 185, 138, .55); }
.keep-btn:hover img { animation: boil .5s steps(1) infinite; }

dialog.side { margin: 0 0 0 auto; width: min(460px, 100vw); height: 100vh; height: 100dvh; }
dialog.side[open] .m-wrap { animation: slide-in .3s steps(4) both; }
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
.m-wrap { display: flex; flex-direction: column; height: 100%; background: var(--paper) var(--grain); box-shadow: -20px 0 40px -20px rgba(0, 0, 0, .45); }
.m-front { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px 20px 26px; background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(0, 0, 0, .06)), var(--kraft) var(--fiber); border-bottom: 3px solid rgba(122, 92, 52, .35); }
.m-front::after { content: ''; position: absolute; left: 50%; bottom: 9px; width: 84px; height: 9px; margin-left: -42px; border-radius: 5px; background: rgba(122, 92, 52, .55); box-shadow: inset 0 2px 2px rgba(0, 0, 0, .25), 0 1px 0 rgba(255, 255, 255, .35); }
.m-front-ico { width: 40px; height: 40px; object-fit: contain; }
.m-front h2 { margin: 0; font-family: var(--serif); font-weight: 800; font-size: 25px; }
.m-front .d-close { top: 50%; transform: translateY(-62%); }
.m-front .d-close:hover { background: rgba(252, 251, 247, .5); }
.m-lede { margin: 14px 22px 0; font-size: 14px; line-height: 1.55; color: var(--ink-soft); text-align: center; }
.m-tabs { display: flex; gap: 4px; margin: 16px 18px 0; border-bottom: 1.5px solid var(--line); }
.m-tabs button { flex: 1; padding: 9px 4px 8px; font-size: 14px; font-weight: 700; color: var(--ink-soft); border-radius: 9px 9px 0 0; text-align: center; margin-bottom: -1.5px; border: 1.5px solid transparent; border-bottom: 0; }
.m-tabs button small { font-size: 12px; font-weight: 600; color: var(--cobalt); }
.m-tabs button[aria-selected='true'] { color: var(--ink); background: var(--paper); border-color: var(--line); }
.m-sort { align-self: center; margin-top: 12px; }
.m-sort[hidden] { display: none; }
.m-list { list-style: none; margin: 0; padding: 12px 18px 8px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.m-item { display: grid; grid-template-columns: 108px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; background: rgba(230, 232, 225, .55); animation: drop-in .3s steps(3) both; animation-delay: calc(var(--i) * 40ms); }
.m-item:hover { background: rgba(233, 196, 96, .22); }
.m-thumb { width: 108px; height: 108px; display: flex; align-items: center; justify-content: center; }
.m-thumb canvas { max-width: 104px; max-height: 104px; width: auto; height: auto; background: #fff; box-shadow: var(--shadow); transform: rotate(-1.5deg); }
.m-item:nth-child(even) .m-thumb canvas { transform: rotate(1.5deg); }
.m-info { min-width: 0; }
.m-name { margin: 0; font-weight: 700; font-size: 15.5px; line-height: 1.35; word-break: keep-all; }
.m-rename { width: 100%; font: inherit; padding: 3px 8px; border: 1.5px solid var(--cobalt); border-radius: 7px; background: #fff; color: var(--ink); }
.m-sum { margin: 3px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink); word-break: keep-all; }
.m-sum .nw { white-space: nowrap; }
.m-meta { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.m-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; }
.m-main, .m-sub { display: inline-flex; align-items: center; gap: 6px 10px; }
#m-title:focus { outline: none; }
.btn.sm { padding: 5px 12px; font-size: 13.5px; border-radius: 8px; }
.m-empty { margin: 26px 30px; padding: 26px 20px; text-align: center; font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); border: 2px dashed var(--line); border-radius: 14px; word-break: keep-all; }
.m-empty[hidden], .m-list[hidden] { display: none; }
.m-empty:not([hidden]) + .m-foot { margin-top: auto; }
.m-foot { padding: 12px 22px 18px; border-top: 1.5px dashed var(--line); text-align: center; }
.m-foot-btns { display: flex; justify-content: center; gap: 22px; }
.m-import { cursor: pointer; }
.m-import input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.m-note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); word-break: keep-all; }
.m-status { margin: 6px 0 0; min-height: 1.2em; font-size: 13px; font-weight: 600; color: var(--cobalt); }

@media (max-width: 900px) {
  .d-wrap { grid-template-columns: 1fr; grid-template-rows: 40vh 1fr; border-radius: 0; }
  #detail { width: 100vw; height: 100dvh; }
  .d-panel { padding: 22px 18px 30px; }
}
@media (max-width: 720px) {
  :root { --tile: 86px; }
  .top { padding: 12px 16px; }
  .top-btn span { display: none; }
  .drawer-btn span { display: inline; }
  .scene { padding: 0 16px; }
  .shelf { gap: 0 4px; }
  .item { width: 108px; }
  .item-ico img { max-width: 84px; max-height: 80px; }
  .item:first-child::after, .item:last-child::after { border-radius: 0; left: -10px; right: -10px; }
  .item:nth-child(3n+1)::after { border-radius: 7px 0 0 7px; left: -4px; }
  .item:nth-child(3n)::after { border-radius: 0 7px 7px 0; right: -4px; }
  .item.lucky { width: auto; flex-basis: 100%; margin-top: 14px; }
  .item.lucky::after { display: none; }
  .item.lucky .item-btn { flex-direction: row; gap: 10px; width: auto; padding: 6px 18px 6px 8px; background: rgba(252, 251, 247, .6); border-radius: 12px; }
  .item.lucky .item-ico { width: 56px; height: 56px; }
  .item.lucky .item-ico img { max-width: 52px; max-height: 52px; }
  .item.lucky .item-name { margin-top: 0; padding: 0; min-width: 0; background: none; box-shadow: none; }
  .item.lucky .item-name::before, .item.lucky .item-name::after { display: none; }
  .item-name { font-size: 13.5px; margin-top: 40px; min-width: 80px; }
  .shelf-plank { display: none; }
  .title-paper { padding: 16px 26px 28px; }
  .swatch-wrap { margin: 20px -16px 0; height: 200px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
  .thumb { height: 200px; }
  .thumb-paper img { max-height: 184px; }
  .grid.wide .thumb { height: 120px; }
  .ruler-read { display: none; }
  .search input { width: 140px; }
  .tag-group > span { width: 100%; }
  .row-label { width: 100%; }
}

@media (max-width: 560px) {
  .drawer-btn { padding: 5px 10px 5px 6px; gap: 4px; font-size: 14px; }
  .top { gap: 8px; }
  .logo { gap: 6px; font-size: 21px; }
  .logo-ico { width: 36px; }
  .drawer-btn img { width: 26px; height: 26px; }
  .m-item { grid-template-columns: 76px 1fr; gap: 10px; }
  .m-thumb { width: 76px; height: 76px; }
  .m-thumb canvas { max-width: 72px; max-height: 72px; }
}

/* 옵션 줄: 인덱스 카드처럼 줄을 긋고, 이름 칸 옆에 연분홍 여백선 */
.fold-body .row { margin-top: 0; gap: 0 14px; align-items: stretch; border-top: 1px solid rgba(59, 99, 166, .13); }
.fold-body > .row:first-child { border-top: 0; }
.fold-body .row > :not(.row-label) { align-self: center; margin: 9px 0; }
.fold-body .row-label { display: flex; align-items: center; width: 96px; padding: 10px 0; font-size: 13.5px; font-weight: 700; color: var(--ink); letter-spacing: .01em;
  border-right: 1.5px solid rgba(239, 163, 180, .6); word-break: keep-all; }
.fold-body .row-label::before { content: ''; flex: none; width: 3px; height: 13px; margin-right: 7px; border-radius: 2px; background: rgba(239, 163, 180, .85); }
.fold-body .spec { margin-top: 12px; }
@media (max-width: 720px) {
  .fold-body .row-label { width: 100%; padding: 10px 0 0; border-right: 0; }
  .fold-body .row > :not(.row-label) { margin: 7px 0 11px; }
}

/* ---------- 작은 단추 다듬기 ---------- */
/* 닫기: 종이 꼬리표에 색연필로 그은 X */
.d-close { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px 6px 19px; border-radius: 4px 9px 9px 4px; font-size: 13.5px; font-weight: 700; color: var(--ink-soft);
  background: #FFFEFA var(--grain); box-shadow: 0 1px 0 rgba(54, 59, 68, .08), 0 5px 9px -6px rgba(54, 59, 68, .5); transform: rotate(2deg); }
.d-close::before { content: ''; position: absolute; top: 50%; left: 7px; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--desk-deep); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .2); }
.d-close .x-mark { width: 17px; height: 17px; fill: none; stroke: var(--cobalt); stroke-width: 2.4; stroke-linecap: round; filter: url(#pencil-ui); }
.d-close:hover { background-color: #FFFEFA; color: var(--ink); }
.d-close:hover .x-mark { animation: wobble .4s steps(4); }
.d-close:active { transform: rotate(2deg) translateY(1px); }
.m-front .d-close { background-color: rgba(252, 251, 247, .9); }

/* 선택 단추: 크라프트 띠 위에 고른 종이 조각을 얹고 색연필 밑줄 */
.seg { background: rgba(217, 185, 138, .3) var(--fiber); padding: 4px; gap: 3px; border-radius: 10px; box-shadow: inset 0 1px 2px rgba(122, 92, 52, .2); }
.seg button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 7px; color: #6F6250; }
.seg button:hover:not(:disabled):not([aria-pressed='true']) { background: rgba(252, 251, 247, .45); color: var(--ink); }
.seg button[aria-pressed='true'] { color: var(--ink); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='6' viewBox='0 0 40 6'%3E%3Cpath d='M1.5 3.6C7 1.6 12 2 17 3.2S27 4.8 31.5 3.1 37 1.9 38.5 2.8' fill='none' stroke='%233B63A6' stroke-width='1.8' stroke-linecap='round' opacity='.9'/%3E%3C/svg%3E") 50% calc(100% - 3px) / 70% 6px no-repeat, var(--paper) var(--grain);
  box-shadow: 0 1px 0 rgba(54, 59, 68, .08), 0 4px 7px -4px rgba(54, 59, 68, .45); transform: rotate(-.8deg); }
.seg button:nth-child(even)[aria-pressed='true'] { transform: rotate(.8deg); }

/* 방향: 작은 종이 그림 */
.ori { display: inline-block; flex: none; background: #FFFEFA; border: 1.5px solid currentColor; border-radius: 1.5px; opacity: .75;
  background-image: linear-gradient(225deg, var(--desk-deep) 0 3px, transparent 3px); }
.ori-p { width: 11px; height: 15px; }
.ori-l { width: 15px; height: 11px; }
.seg button[aria-pressed='true'] .ori { border-color: var(--cobalt); opacity: 1; background-color: #FDF3D2; }

/* 글자 단추: 곧은 줄 대신 색연필 물결 밑줄 */
.link-btn { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='6' viewBox='0 0 24 6'%3E%3Cpath d='M0 3.2C3 1.2 5.6 1.4 8.2 3.1S13.8 5 16.4 3.2 21.2 1.3 24 3.1' fill='none' stroke='%233B63A6' stroke-width='1.6' stroke-linecap='round' opacity='.85'/%3E%3C/svg%3E") 0 100% / 24px 6px repeat-x; padding-bottom: 6px; }
.link-btn:hover { background-position-x: 6px; }

/* 체크 상자: 손그림 네모와 체크 */
.d-guides { cursor: inherit; }
.d-guides input { appearance: none; -webkit-appearance: none; margin: 0; width: 20px; height: 20px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M3.2 3.6C7.6 3 12.4 3.1 16.7 3.4c.4 4.3.5 8.7.1 13.1-4.4.4-8.9.3-13.3-.1-.4-4.2-.6-8.5-.3-12.8z' fill='%23FFFEFA' stroke='%233B63A6' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.d-guides input:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M3.2 3.6C7.6 3 12.4 3.1 16.7 3.4c.4 4.3.5 8.7.1 13.1-4.4.4-8.9.3-13.3-.1-.4-4.2-.6-8.5-.3-12.8z' fill='%23F6E3A6' stroke='%233B63A6' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M5.6 10.4c1.3 1.1 2.4 2.4 3.3 3.8 2-3.9 4.6-7.4 8-10.6' fill='none' stroke='%233B63A6' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); animation: hop .3s steps(3); }
.d-guides input:focus-visible { outline: 2px solid var(--tape); outline-offset: 2px; }

/* 무늬 진하기: 자 눈금 위를 미는 코발트 압정 */
#d-alpha, .paper-range { -webkit-appearance: none; appearance: none; background: none; height: 28px; }
#d-alpha::-webkit-slider-runnable-track, .paper-range::-webkit-slider-runnable-track { height: 10px; border-radius: 2px; background: repeating-linear-gradient(90deg, rgba(54, 59, 68, .45) 0 1px, transparent 1px 10%) 0 0 / 100% 5px no-repeat, #EFE4CC var(--fiber); box-shadow: inset 0 0 0 1px rgba(122, 92, 52, .25); }
#d-alpha::-moz-range-track, .paper-range::-moz-range-track { height: 10px; border-radius: 2px; background: repeating-linear-gradient(90deg, rgba(54, 59, 68, .45) 0 1px, transparent 1px 10%) 0 0 / 100% 5px no-repeat, #EFE4CC; box-shadow: inset 0 0 0 1px rgba(122, 92, 52, .25); }
#d-alpha::-webkit-slider-thumb, .paper-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -6px; border-radius: 50%; background: radial-gradient(circle at 35% 32%, #8FAAD8 0 18%, #3B63A6 45%, #2D4F88 100%); box-shadow: 0 2px 3px rgba(0, 0, 0, .3); }
#d-alpha::-moz-range-thumb, .paper-range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: radial-gradient(circle at 35% 32%, #8FAAD8 0 18%, #3B63A6 45%, #2D4F88 100%); box-shadow: 0 2px 3px rgba(0, 0, 0, .3); }

/* 휴대폰: 미리보기를 위쪽에 낮게 두 단으로 (왼쪽 종이, 오른쪽 안내) */
@media (max-width: 560px) {
  :root { --torn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='16' viewBox='0 0 240 16'%3E%3Cpath d='M0 16 L0 3.6 L3.4 6.8 L6.8 2.7 L10.2 3.6 L18.2 3.5 L26.8 7.0 L35.7 3.3 L40.4 2.2 L48.3 4.3 L55.2 5.6 L58.6 3.7 L64.1 5.2 L69.8 5.1 L77.0 4.7 L83.2 9.1 L87.9 2.7 L95.5 4.1 L98.7 7.7 L105.1 9.1 L112.3 7.2 L118.0 8.9 L123.9 3.8 L130.8 10.0 L135.5 5.7 L138.6 1.5 L142.0 2.0 L147.3 2.8 L153.6 9.2 L161.8 4.9 L166.9 9.2 L170.8 1.9 L176.8 7.1 L179.8 5.9 L186.2 9.7 L192.3 7.3 L195.6 9.3 L203.8 8.6 L209.2 3.7 L212.6 1.6 L217.6 1.6 L221.3 4.5 L227.9 4.0 L233.0 4.4 L240 3.6 L240 16 Z' fill='black'/%3E%3C/svg%3E"); }
  .d-wrap { grid-template-rows: auto 1fr; }
  .d-stage { flex-direction: row; align-items: center; gap: 16px; padding: 12px 18px 24px; }
  .d-stage::before { content: ''; display: block; top: auto; left: 0; right: 0; bottom: 2px; height: 16px; border: 0;
    background: rgba(255, 255, 255, .85); -webkit-mask: var(--torn) 3px 0 / 240px 16px repeat-x; mask: var(--torn) 3px 0 / 240px 16px repeat-x; z-index: 1; }
  .d-stage::after { content: ''; top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 16px; border: 0;
    background: var(--paper) var(--grain); -webkit-mask: var(--torn) 0 0 / 240px 16px repeat-x; mask: var(--torn) 0 0 / 240px 16px repeat-x; z-index: 2; }
  .d-paper { flex: 0 0 36%; height: 128px; }
  .d-paper img { max-height: 128px; box-shadow: var(--shadow); transform: rotate(-1.2deg); }
  .d-stage-foot { flex: 1; min-width: 0; align-items: flex-start; gap: 6px; position: relative; z-index: 3; }
  .d-size-note { text-align: left; font-size: 13px; line-height: 1.5; word-break: keep-all; }
  #d-close { position: fixed; top: 10px; right: 12px; z-index: 6; }
  .d-stage-foot { margin-top: 26px; }
  .d-panel::before { content: ''; position: sticky; top: -22px; display: block; height: 18px; margin: -22px -18px 4px; background: var(--paper) var(--grain); -webkit-mask: linear-gradient(#000 30%, transparent); mask: linear-gradient(#000 30%, transparent); z-index: 5; pointer-events: none; }
  .m-br { display: inline; }
  .d-size-note::first-line { font-weight: 700; color: var(--ink); font-size: 14px; }
  .d-guides { font-size: 13px; }
}

/* 휴대폰: 받기 단추는 큰 단추 하나와 나란한 두 개로 */
@media (max-width: 560px) {
  .d-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .d-actions .btn { padding-left: 8px; padding-right: 10px; }
  .d-actions .btn.primary { grid-column: 1 / -1; order: -1; padding-top: 12px; padding-bottom: 12px; font-size: 16px; }
  .d-actions .btn[hidden] { display: none; }
  .d-panel .seg { display: flex; flex-wrap: nowrap; width: 100%; }
  .d-panel .seg button { flex: 1 1 0; min-width: 0; padding-left: 4px; padding-right: 4px; white-space: nowrap; }
}
/* 손가락으로 누르는 기기: 누르는 자리를 넉넉하게 */
@media (pointer: coarse) {
  .chip, .tape-chip, .seg button { min-height: 40px; }
  .d-close { min-height: 40px; min-width: 48px; }
  .link-btn.small { min-height: 36px; display: inline-flex; align-items: center; }
  .d-guides { min-height: 40px; }
  .d-guides input { width: 20px; height: 20px; }
  input[type='range'] { height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
#l-title:focus { outline: none; }
.sizes.two li:last-child { grid-column: 1 / -1; justify-self: center; }

/* 크기 메뉴가 열리면 아래 견본 줄은 멈추고 가라앉아 옅어진다 (메뉴가 앞에 또렷하게) */
.swatch-wrap, .home-more { transition: opacity .3s steps(3), transform .3s steps(3), filter .3s steps(3); }
#home.menu-open .swatch-wrap { opacity: .2; transform: translateY(26px); filter: saturate(.5); pointer-events: none; }
#home.menu-open .home-more { opacity: .25; }

/* 휴대폰: 크기 꼬리표는 화면 아래에서 올라오는 종이 한 장으로 (옆 아이콘을 가리거나 화면 밖으로 나가지 않게) */
@media (max-width: 720px) {
  #home.menu-open::after { content: ''; position: fixed; inset: 0; z-index: 25; background: rgba(54, 59, 68, .28); cursor: pointer; }
  .item.open { z-index: 40; }
  .item.open .sizes { position: fixed; top: auto; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); transform: none; z-index: 41;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 46px 14px 16px; max-height: 70dvh; overflow-y: auto;
    background: var(--paper) var(--grain); border-radius: 14px; box-shadow: 0 -10px 30px -10px rgba(0, 0, 0, .35); animation: paper-in .28s steps(4) both; }
  .item.open .sizes::before { content: attr(data-title); position: absolute; left: 0; right: 0; top: 14px; height: auto; text-align: center; font-weight: 800; font-size: 16px; color: var(--ink); }
  .item.open .sizes li { width: 100%; animation: none !important; opacity: 1 !important; }
  .item.open .sizes li:last-child { grid-column: 1 / -1; }
  .item.open .size-tag { width: 100%; min-height: 58px; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 8px 6px; font-size: 15px; line-height: 1.3;
    white-space: nowrap; clip-path: none; filter: none; border-radius: 10px; background: #FFFEFA; box-shadow: inset 0 0 0 1.5px rgba(59, 99, 166, .16); }
  .item.open .size-tag::before { display: none; }
  .item.open .size-tag small { font-size: 12.5px; }
  .item.open .size-tag.all { min-height: 44px; background: none; box-shadow: none; color: var(--cobalt); text-decoration: underline; text-underline-offset: 4px; }
  .item.open .sizes::after { content: '바깥을 누르면 닫혀요'; grid-column: 1 / -1; justify-self: center; text-align: center; font-size: 12.5px; color: var(--ink-soft); }
  /* 럭키박스: 아래에서 올라오는 종이 한 장. 아래로 쓸어내리거나 바깥을 누르면 닫힌다 */
  #lucky { width: 100vw; max-width: 100vw; margin: auto 0 0; max-height: 94dvh; overflow: visible; } /* 창이 미끄러질 때 창 틀이 따로 스크롤되며 띠처럼 잘려 보이지 않게 */
  #lucky::backdrop { background: rgba(54, 59, 68, .5); }
  .l-wrap { max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain; padding: 30px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; touch-action: pan-y; }
  .l-wrap::before { content: ''; position: absolute; top: 9px; left: 50%; width: 42px; height: 5px; margin-left: -21px; border-radius: 3px; background: rgba(54, 59, 68, .22); }
  dialog[open] .l-wrap { animation: sheet-up .36s steps(5) both; }
  .l-wrap.dragging { animation: none !important; transition: none; }
  .l-wrap.leaving { animation: sheet-down .26s steps(4) forwards !important; }
  #l-close { top: 14px; right: 12px; }
  .l-wrap h2 { font-size: 23px; margin-top: 4px; }
  .l-lede { font-size: 13.5px; }
  .l-kinds { gap: 6px; }
  .l-kinds .chip { padding: 6px 11px; font-size: 13.5px; min-height: 36px; }
  .l-stage { height: 250px; margin-top: 6px; }
  .l-box { width: 160px; margin-left: -80px; }
  .l-box.open { width: 156px; margin-left: -78px; }
  .l-lid { width: 160px; margin-left: -80px; bottom: 80px; }
  .l-pit { bottom: 20px; }
  .l-paper { width: 112px; margin-left: -56px; bottom: 20px; }
  .l-paper img { width: auto; max-width: 100%; max-height: 140px; margin: 0 auto; display: block; }
  /* 휴대폰은 더 많은 장면으로 천천히: 상자가 흔들리고, 뚜껑이 열리고, 종이가 솟았다가 앞으로 내려앉는다 */
  .l-stage.open .l-lid { animation: lid-off .7s steps(6) forwards; }
  .l-stage.open .l-paper { animation: rise-m 1.3s steps(12) .2s forwards; }
  @keyframes rise-m { 0% { opacity: 1; z-index: 2; transform: translateY(130px) rotate(0); } 50% { opacity: 1; z-index: 2; transform: translateY(-70px) rotate(4deg); } 58% { opacity: 1; z-index: 4; transform: translateY(-62px) rotate(2deg) scale(1.03); } 100% { opacity: 1; z-index: 4; transform: translateY(0) rotate(-3deg) scale(1.08); } }
  .l-recipe { gap: 4px; font-size: 13px; margin-top: 8px; }
  .l-recipe .tape-chip { padding: 4px 10px; }
  .l-actions { display: grid; grid-template-columns: 1fr 1fr; margin-top: 12px; }
  .l-actions .btn { white-space: nowrap; padding-left: 10px; padding-right: 12px; }
  .l-actions:has(#l-use[hidden]) #l-draw { grid-column: 1 / -1; justify-self: center; min-width: 60%; }
  .l-actions #l-save { grid-column: 1 / -1; }
}
@keyframes sheet-up { 0% { transform: translateY(100%); } 60% { transform: translateY(-2%); } 100% { transform: none; } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@media (max-width: 720px) and (max-height: 700px) {
  .l-lede { display: none; }
  .l-stage { height: 226px; }
  .l-box { width: 142px; margin-left: -71px; }
  .l-box.open { width: 138px; margin-left: -69px; }
  .l-lid { width: 142px; margin-left: -71px; bottom: 72px; }
  .l-paper img { max-height: 120px; }
  .l-pit { bottom: 18px; }
  .l-paper { width: 100px; margin-left: -50px; bottom: 18px; }
  .l-recipe > span[aria-hidden] { display: none; }
}

/* 손가락으로 쓰는 화면: 마우스 올림 효과가 눌린 뒤에도 남아 꼬리표가 엉뚱하게 펼쳐지지 않게 */
@media (hover: none), (max-width: 720px) {
  .item:not(.open) .sizes { display: none; }
  .item:hover .item-name, .item:hover .item-ico { animation: none; }
  .swatch-track.holding .swatch:not(.lit) { opacity: 1; }
}

/* 줄 간격 게이지: 자 위를 미는 압정과 자주 쓰는 간격 단추 */
.sp-box { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.sp-gauge { display: flex; align-items: center; gap: 10px; }
.sp-gauge .paper-range { flex: 1; min-width: 0; }
/* 숫자는 줄어들지 않게: 끌 때 자릿수가 바뀌어도 'mm'가 다음 줄로 밀리거나 눈금이 흔들리지 않는다 */
.sp-gauge output { flex: none; min-width: 4.4em; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 800; color: var(--ink); }
/* 표준 다섯 가지: 같은 너비 다섯 칸, 이름 아래 숫자 */
#d-spacing { display: grid; grid-template-columns: repeat(5, 1fr); }
#d-spacing button { flex-direction: column; gap: 1px; padding: 6px 2px 9px; line-height: 1.25; white-space: nowrap; }
@media (max-width: 360px) { #d-spacing button { font-size: 12.5px; letter-spacing: -0.02em; } }
#d-spacing button small { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .sp-gauge .paper-range { max-width: none; } }

/* 창이 열린 동안 뒤 화면이 같이 스크롤되지 않게 (휴대폰 사파리) */
html:has(dialog[open]), html:has(dialog[open]) body { overflow: hidden; overscroll-behavior: none; }
