/* 산지직귤 — 오일장 귤 좌판
   골판지 바닥, 흰 종이 가격표, 검정 매직 손글씨, 빨간 매직은 '주문'에만. 모바일이 먼저, 넓은 화면은 좌판을 옆으로 편다. */

:root {
  --kraft: #c9a57b;
  --kraft-deep: #b08a5e;
  --kraft-light: #d9bf98;
  --paper: #fbf7ee;
  --paper-edge: #e9dfcb;
  --ink: #1f1b17;
  --ink-soft: #4a3f33;
  --ink-on-kraft: #2b231b;
  --marker-red: #c4261c;
  --marker-red-deep: #9e1c14;
  --tape: rgba(244, 236, 210, 0.86);
  --leaf: #3e7b33;
  --focus: #1f5fbf;

  --brush: "Nanum Brush Script", "Pretendard Variable", cursive;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;

  --gutter: 16px;
  --unit: 8px;
  --radius: 3px;
  --shadow-card: 0 1px 1px rgba(60, 38, 16, 0.14), 0 8px 18px -6px rgba(60, 38, 16, 0.32);
  --shadow-lift: 0 2px 2px rgba(60, 38, 16, 0.16), 0 14px 26px -8px rgba(60, 38, 16, 0.38);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* 골판지: 잔 얼룩 + 세로 골 */
  --kraft-texture:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .24 0 0 0 0 .12 0 0 0 .28 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(90deg, rgba(70, 45, 20, 0.05) 0 2px, transparent 2px 10px);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-on-kraft);
  background-color: var(--kraft);
  background-image: var(--kraft-texture);
  word-break: keep-all;
  overflow-wrap: break-word;
}

::selection { background: #f2b33a; color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1.5px; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: min(100% - var(--gutter) * 2, 1160px); margin-inline: auto; }

/* ── 손글씨 ── */
.brush { font-family: var(--brush); font-weight: 400; letter-spacing: 0; line-height: 1.05; }

/* ── 종이와 테이프 ── */
.paper {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.tape::before, .tape::after {
  content: "";
  position: absolute;
  width: 74px; height: 24px;
  background: var(--tape);
  box-shadow: 0 1px 1px rgba(60, 38, 16, 0.12);
  top: -11px;
  z-index: 2;
}
.tape::before { left: 14px; transform: rotate(-6deg); }
.tape::after { right: 14px; transform: rotate(5deg); }
.tape-one::after { display: none; }
.tape-one::before { left: 50%; translate: -50% 0; }

/* ── 머리말 ── */
.site-header { padding-top: 14px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 14px 4px;
  text-decoration: none;
  transform: rotate(-2deg);
}
.logo .brush { font-size: 34px; color: var(--ink); }
.logo small { font-size: 12px; color: var(--ink-soft); font-weight: 600; }

.nav { display: flex; gap: 6px; }
.nav a {
  display: inline-block;
  padding: 10px 12px;
  font-size: 15px; font-weight: 700;
  text-decoration: none;
  color: var(--ink-on-kraft);
  border-radius: var(--radius);
}
.nav a:hover { background: rgba(255, 250, 238, 0.45); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--marker-red); }
@media (max-width: 559px) {
  .nav .nav-wide { display: none; }
  .nav a { padding: 10px 8px; font-size: 14px; }
  .logo .brush { font-size: 30px; }
  .logo small { display: none; }
}

/* ── 버튼: 빨간 매직 꼬리표 ── */
.btn {
  --tilt: -1.2deg;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px;
  padding: 10px 26px 8px;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--brush);
  font-size: 30px; line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transform: rotate(var(--tilt));
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.2s;
}
.btn-order { background: var(--marker-red); color: #fff8ef; box-shadow: var(--shadow-card); }
.btn-order:hover { background: var(--marker-red-deep); transform: rotate(0deg) translateY(-1px); box-shadow: var(--shadow-lift); }
.btn-order:active { transform: rotate(0deg) translateY(1px); }
.btn-plain { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-card); }
.btn-plain:hover { transform: rotate(0deg) translateY(-1px); box-shadow: var(--shadow-lift); }
.btn[disabled], .btn[aria-disabled="true"] { background: #a89a88; color: #f3ede2; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-wide { width: 100%; }
.btn .hole { width: 10px; height: 10px; border-radius: 50%; background: var(--kraft); box-shadow: inset 0 1px 2px rgba(0,0,0,.35); }

.link-btn {
  background: none; border: 0; padding: 8px 4px; cursor: pointer;
  font-weight: 700; text-decoration: underline; text-underline-offset: 0.2em;
}

/* ── 첫 화면: 좌판 ── */
.stall { padding: 22px 0 40px; }
.stall .wrap { display: grid; gap: 28px; }
.sign {
  padding: 30px 22px 24px;
  transform: rotate(-1deg);
}
.sign h1 {
  margin: 0;
  font-size: clamp(50px, 14vw, 96px);
  color: var(--ink);
}
.sign h1 .red { color: var(--marker-red); }
.sign p { margin: 14px 0 0; font-size: 17px; color: var(--ink-soft); max-width: 30ch; }
.sign .who { margin-top: 18px; font-weight: 700; color: var(--ink); }

.today { position: relative; }
.today-label { margin: 0 0 6px 6px; font-size: 15px; font-weight: 800; color: var(--ink-on-kraft); }

@media (min-width: 880px) {
  .stall { padding: 44px 0 64px; }
  .stall .wrap { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; }
  .sign { padding: 46px 40px 36px; }
}

/* ── 귤 상자 ── */
.crate {
  position: relative;
  display: grid;
  text-decoration: none;
  color: inherit;
}
.crate-pile { position: relative; z-index: 1; margin: 0 6% -16%; }
.crate-pile img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(60, 30, 5, 0.28)); }
.crate-box {
  position: relative;
  padding: 16% 16px 18px;
  background-color: var(--kraft-light);
  background-image: var(--kraft-texture), linear-gradient(180deg, rgba(255,255,255,.16) 0, rgba(255,255,255,0) 18%, rgba(0,0,0,0) 82%, rgba(80,52,22,.14) 100%);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
}
.crate-box::before {
  /* 손잡이 구멍 */
  content: "";
  position: absolute; left: 50%; top: 9%;
  width: 64px; height: 14px;
  translate: -50% 0;
  border-radius: 8px;
  background: #6d5032;
  box-shadow: inset 0 3px 4px rgba(0,0,0,.5);
}
.crate-name {
  margin: 0;
  font-family: var(--brush);
  font-size: 46px; line-height: 1;
  color: var(--ink);
}
.crate-sub { margin: 4px 0 0; font-size: 15px; color: var(--ink-on-kraft); font-weight: 600; }

.price-card {
  position: absolute; z-index: 3;
  right: 10px; bottom: 16px;
  padding: 14px 14px 8px;
  min-width: 132px;
  transform: rotate(3deg);
  text-align: center;
}
.price-card .w { display: block; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.price-card .p { display: block; font-family: var(--brush); font-size: 38px; line-height: 1.05; color: var(--ink); }
.price-card .p small { font-size: 0.62em; }

.state-note {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px 2px;
  font-family: var(--brush); font-size: 26px; line-height: 1.1;
  color: var(--ink);
  border: 2px dashed var(--ink);
  border-radius: 999px;
  transform: rotate(-2deg);
}
.crate[data-status="sold_out"] .price-card .p,
.crate[data-status="coming"] .price-card .p { position: relative; color: var(--ink-soft); }
.crate[data-status="sold_out"] .price-card .p::after {
  content: "";
  position: absolute; left: -6px; right: -6px; top: 48%;
  height: 4px; background: var(--marker-red); border-radius: 2px; transform: rotate(-6deg);
}
/* 귤 색은 절대 죽이지 않는다 (탁한 귤은 상한 귤처럼 보인다). 품절만 살짝 물러난다 */
.crate[data-status="sold_out"] .crate-pile img { opacity: 0.7; }

a.crate { transition: transform 0.35s var(--ease-out); }
a.crate:hover { transform: translateY(-4px); }
a.crate:hover .crate-name { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.12em; }

/* ── 구역 제목 (판지에 붙인 이름표) ── */
.section { padding: 48px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 20px; margin-bottom: 26px; }
.section-title {
  display: inline-block;
  margin: 0;
  padding: 10px 18px 4px;
  font-family: var(--brush); font-weight: 400;
  font-size: clamp(40px, 9vw, 58px); line-height: 1;
  color: var(--ink);
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transform: rotate(-1.5deg);
}
.section-lead { margin: 0; max-width: 40ch; font-size: 16px; font-weight: 600; color: var(--ink-on-kraft); }

/* 상자 칸: 상자는 언제나 통째로 들어간다 */
.crates { display: grid; gap: 40px 22px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .crates { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .crates { grid-template-columns: repeat(3, 1fr); } }

/* ── 출하 달력 ── */
.calendar { padding: 20px 14px 18px; overflow-x: auto; }
.calendar table { width: 100%; min-width: 560px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.calendar th, .calendar td { padding: 8px 0; text-align: center; font-size: 14px; }
.calendar thead th { font-weight: 800; color: var(--ink-soft); border-bottom: 2px solid var(--ink); }
.calendar thead th.now { color: var(--marker-red); position: relative; }
.calendar thead th.now::after {
  content: ""; position: absolute; inset: 2px 50% auto; width: 34px; height: 30px; translate: -50% 0;
  border: 2.5px solid var(--marker-red); border-radius: 50%; transform: rotate(-8deg);
}
.calendar tbody th { text-align: left; padding-right: 12px; font-family: var(--brush); font-size: 28px; font-weight: 400; white-space: nowrap; }
.calendar tbody tr + tr { border-top: 1px dashed var(--paper-edge); }
.calendar .bar { display: block; height: 14px; margin: 0 -1px; background: var(--c, #f29a1f); }
.calendar .bar.start { border-radius: 8px 0 0 8px; margin-left: 4px; }
.calendar .bar.end { border-radius: 0 8px 8px 0; margin-right: 4px; }
.calendar .bar.start.end { border-radius: 8px; }
.calendar-note { margin: 10px 2px 0; font-size: 14px; color: var(--ink-soft); }

/* ── 이렇게 보내요 ── */
.steps { list-style: none; margin: 0; padding: 26px 20px 22px; display: grid; gap: 22px; }
.steps li { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: start; }
.steps .n {
  display: grid; place-items: center;
  width: 50px; height: 50px;
  font-family: var(--brush); font-size: 34px; line-height: 1;
  border: 2.5px solid var(--ink); border-radius: 50%;
  transform: rotate(-6deg);
}
.steps h3 { margin: 4px 0 2px; font-size: 19px; color: var(--ink); }
.steps p { margin: 0; color: var(--ink-soft); font-size: 16px; }
@media (min-width: 880px) {
  .steps { grid-template-columns: repeat(4, 1fr); padding: 32px 28px; gap: 26px; }
  .steps li { grid-template-columns: 1fr; }
}

/* ── 자주 묻는 질문 ── */
.faq { padding: 8px 20px; }
.faq details { border-bottom: 1px dashed var(--paper-edge); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 18px 0;
  font-weight: 800; font-size: 17px; color: var(--ink);
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--brush); font-size: 32px; line-height: 0.7; transition: transform 0.3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--ink-soft); max-width: 65ch; }

/* ── 맺음 ── */
.closing { padding: 30px 0 60px; text-align: center; }
.closing .paper { display: inline-block; padding: 28px 26px 26px; transform: rotate(1deg); max-width: 520px; }
.closing h2 { margin: 0 0 18px; font-family: var(--brush); font-weight: 400; font-size: 48px; line-height: 1.05; color: var(--ink); }

/* ── 바닥글 ── */
.site-footer {
  padding: 34px 0 calc(40px + env(safe-area-inset-bottom));
  background: rgba(43, 35, 27, 0.92);
  color: #eadfcb;
  font-size: 14px; line-height: 1.8;
}
.site-footer a { color: #fff3dc; }
.site-footer .brush { font-size: 32px; color: #fff3dc; }
.footer-grid { display: grid; gap: 22px; }
.footer-grid dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0 14px; }
.footer-grid dt { color: #bfae93; }
.footer-grid dd { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-weight: 700; }
.pending { color: #bfae93; }
@media (min-width: 880px) { .footer-grid { grid-template-columns: 1fr 1.6fr; } }

/* ── 상품 상세 ── */
.detail { padding: 22px 0 56px; }
.detail .wrap { display: grid; gap: 32px; }
.detail .crate { max-width: 520px; width: 100%; margin-inline: auto; }
.buy { padding: 26px 20px 22px; }
.buy h1 { margin: 0; font-family: var(--brush); font-weight: 400; font-size: 64px; line-height: 1; color: var(--ink); }
.buy .sub { margin: 6px 0 0; font-size: 18px; font-weight: 700; color: var(--ink); }
.buy .desc { margin: 14px 0 0; color: var(--ink-soft); max-width: 60ch; }
.buy .season { margin: 12px 0 0; font-size: 15px; font-weight: 700; color: var(--ink-soft); }
@media (min-width: 880px) {
  .detail .wrap { grid-template-columns: 1fr 1fr; align-items: start; gap: 48px; }
  .buy { padding: 34px 32px 30px; position: sticky; top: 20px; }
}

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

.options { display: grid; gap: 10px; margin-top: 22px; }
.options legend { margin-bottom: 8px; font-weight: 800; font-size: 15px; color: var(--ink); }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt-face {
  position: relative;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 14px 16px 12px;
  border: 1.5px solid var(--paper-edge);
  border-radius: var(--radius);
  background: #fff;
}
.opt-face .l { font-weight: 700; font-size: 17px; }
.opt-face .p { font-family: var(--brush); font-size: 32px; line-height: 1; }
.opt-face svg.circle { position: absolute; inset: -6px -8px; width: calc(100% + 16px); height: calc(100% + 12px); max-width: none; pointer-events: none; overflow: visible; }
.opt-face svg.circle { clip-path: inset(0 100% 0 0); transition: clip-path 0.5s var(--ease-out); }
.opt-face svg.circle path { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; }
.opt input:checked + .opt-face { border-color: transparent; }
.opt input:checked + .opt-face svg.circle { clip-path: inset(0 0 0 0); }
.opt input:focus-visible + .opt-face { outline: 3px solid var(--focus); outline-offset: 3px; }
.opt input:disabled + .opt-face { opacity: 0.55; cursor: not-allowed; }

.qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.qty-label { font-weight: 800; font-size: 15px; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: var(--radius); background: #fff; }
.stepper button { width: 48px; height: 48px; border: 0; background: none; font-size: 24px; font-weight: 700; cursor: pointer; }
.stepper button:disabled { opacity: 0.3; cursor: not-allowed; }
.stepper output, .stepper input { width: 46px; text-align: center; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; border: 0; background: none; }

.sum { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 0 16px; padding-top: 16px; border-top: 2px solid var(--ink); }
.sum .t { font-weight: 800; }
.sum .v { font-family: var(--brush); font-size: 44px; line-height: 1; }
.fine { margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); }

/* 휴대폰: 주문 버튼을 아래에 붙인다 */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--paper);
  box-shadow: 0 -8px 20px -6px rgba(60, 38, 16, 0.35);
  transform: translateY(110%);
  transition: transform 0.35s var(--ease-out);
}
.buybar.show { transform: none; }
.buybar .v { flex: 1; font-family: var(--brush); font-size: 34px; line-height: 1; color: var(--ink); }
.buybar .v small { display: block; font-family: var(--sans); font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.buybar .btn { min-height: 50px; font-size: 28px; padding-inline: 22px; }
@media (min-width: 880px) { .buybar { display: none; } }
body.has-buybar { padding-bottom: 84px; }
@media (min-width: 880px) { body.has-buybar { padding-bottom: 0; } }

/* ── 주문서 (흰 종이 한 장) ── */
.sheet-page { padding: 22px 0 64px; }
.sheet { width: min(100% - var(--gutter) * 2, 720px); margin-inline: auto; padding: 30px 20px 26px; }
.sheet h1 { margin: 0; font-family: var(--brush); font-weight: 400; font-size: 58px; line-height: 1; color: var(--ink); }
.sheet .lead { margin: 8px 0 0; color: var(--ink-soft); }
@media (min-width: 640px) { .sheet { padding: 40px 40px 34px; } }

.block { margin-top: 30px; }
.block > h2, .block > legend {
  display: flex; align-items: baseline; gap: 10px;
  width: 100%;
  margin: 0 0 14px; padding-bottom: 6px;
  font-size: 19px; font-weight: 800; color: var(--ink);
  border-bottom: 2px solid var(--ink);
}
.block > legend .aside, .block > h2 .aside { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--ink-soft); }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-weight: 700; font-size: 15px; color: var(--ink); }
.field .req { color: var(--marker-red); font-weight: 800; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  font-size: 17px;
  background: #fff;
  border: 1.5px solid #cdbfa6;
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8a7c69; }
.field input:hover, .field textarea:hover { border-color: #a8977b; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 95, 191, 0.35); }
.field .hint { font-size: 14px; color: var(--ink-soft); }
.field .err { display: none; font-size: 14px; font-weight: 700; color: var(--marker-red-deep); }
.field.invalid input, .field.invalid textarea { border-color: var(--marker-red); }
.field.invalid .err { display: block; }
.row2 { display: grid; gap: 0 14px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
.zip { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.zip button { min-height: 50px; padding: 0 16px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--ink); color: var(--paper); font-weight: 700; cursor: pointer; }
.zip button:hover { background: #3a3129; }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }

/* 주문 줄 */
.lines { display: grid; gap: 12px; }
.line {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px 14px;
  padding: 14px;
  background: #fff;
  border: 1.5px solid var(--paper-edge);
  border-radius: var(--radius);
}
.line img { width: 64px; height: 48px; object-fit: contain; }
.line .name { font-family: var(--brush); font-size: 30px; line-height: 1; }
.line .controls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.line select { min-height: 48px; padding: 8px 12px; border: 1.5px solid #cdbfa6; border-radius: var(--radius); background: #fff; font-weight: 700; }
.line .sub { font-weight: 800; font-variant-numeric: tabular-nums; }
.line .remove { color: var(--ink-soft); }
.add-line { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.add-line button {
  padding: 10px 14px; min-height: 44px;
  border: 1.5px dashed var(--ink-soft); border-radius: var(--radius);
  background: transparent; font-weight: 700; cursor: pointer;
}
.add-line button:hover { background: #fff; border-style: solid; }

.totals { margin-top: 18px; display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { margin-top: 6px; padding-top: 12px; border-top: 2px solid var(--ink); align-items: baseline; }
.totals .grand span:first-child { font-weight: 800; }
.totals .grand span:last-child { font-family: var(--brush); font-size: 46px; line-height: 1; }

.alert {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 2px solid var(--marker-red);
  border-radius: var(--radius);
  background: #fff4f0;
  color: var(--marker-red-deep);
  font-weight: 700;
}
.alert[data-kind="info"] { border-color: var(--ink); background: #fff; color: var(--ink); }

.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.submit-row { margin-top: 26px; }
.submit-row .btn { width: 100%; font-size: 34px; min-height: 60px; }
.btn .spin { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 영수증 / 조회 결과 ── */
.receipt { margin-top: 22px; display: grid; gap: 14px; }
.receipt .rowx { display: grid; gap: 4px; padding: 14px 16px; background: #fff; border: 1.5px solid var(--paper-edge); border-radius: var(--radius); }
.receipt .k { font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.receipt .v { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.receipt .v.big { font-family: var(--brush); font-weight: 400; font-size: 46px; line-height: 1; }
.copy {
  padding: 8px 12px; min-height: 40px;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: var(--paper); font-family: var(--sans); font-size: 14px; font-weight: 800; cursor: pointer;
}
.copy:hover { background: #fff; }
.copy.done { background: var(--ink); color: var(--paper); }

.track { list-style: none; margin: 22px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; text-align: center; }
.track li { position: relative; padding-top: 44px; font-weight: 700; font-size: 15px; color: var(--ink-soft); }
.track li::before {
  content: ""; position: absolute; top: 6px; left: 50%; translate: -50% 0;
  width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid #b9a98f; background: #fff;
}
.track li::after { content: ""; position: absolute; top: 18px; left: calc(50% + 16px); right: calc(-50% + 16px); height: 3px; background: #d6c8b0; }
.track li:last-child::after { display: none; }
.track li.done { color: var(--ink); }
.track li.done::before { border-color: var(--ink); background: var(--ink); }
.track li.done::after { background: var(--ink); }
.track li.current { color: var(--marker-red-deep); }
.track li.current::before { border-color: var(--marker-red); background: var(--marker-red); box-shadow: 0 0 0 5px rgba(196, 38, 28, 0.18); }

.items-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 17px; }
.items-list li { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }

/* ── 약관 (읽는 화면) ── */
.doc { padding: 22px 0 64px; }
.doc .paper { width: min(100% - var(--gutter) * 2, 800px); margin-inline: auto; padding: 32px 22px; }
.doc h1 { margin: 0 0 6px; font-family: var(--brush); font-weight: 400; font-size: 54px; line-height: 1; }
.doc h2 { margin: 40px 0 10px; font-size: 22px; color: var(--ink); }
.doc h3 { margin: 26px 0 6px; font-size: 18px; }
.doc p, .doc li { max-width: 68ch; color: #2d261f; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { padding: 10px; border: 1px solid var(--paper-edge); text-align: left; vertical-align: top; }
.doc .toc { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 0 0; font-weight: 700; }
.doc .draft { padding: 12px 14px; border: 2px dashed var(--marker-red); border-radius: var(--radius); color: var(--marker-red-deep); font-weight: 700; }
@media (min-width: 640px) { .doc .paper { padding: 44px 48px; } }

/* ── 빈 상태·불러오는 중 ── */
.loading { padding: 30px 0; text-align: center; font-weight: 700; }
.empty { padding: 24px; text-align: center; color: var(--ink-soft); }

/* 테스트용 표시 */
.placeholder-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #efe3cc; color: #6b5636; font-size: 12px; font-weight: 800; vertical-align: middle; }

/* ── 움직임: 상자가 판지 위에 한 번 놓인다 ── */
@media (prefers-reduced-motion: no-preference) {
  .settle { animation: settle 0.7s var(--ease-out) both; }
  .settle:nth-child(2) { animation-delay: 0.06s; }
  .settle:nth-child(3) { animation-delay: 0.12s; }
  .settle:nth-child(4) { animation-delay: 0.18s; }
  .settle:nth-child(5) { animation-delay: 0.24s; }
  @keyframes settle {
    from { opacity: 0.001; transform: translateY(18px) rotate(-1.5deg); filter: blur(2px); }
    to { opacity: 1; transform: none; filter: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ── 관리 화면: 바쁜 농부용 도구. 꾸밈은 줄이고 한눈에 ── */
.admin { padding: 18px 0 60px; }
.admin-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button, .tool {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 14px;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tabs .count { min-width: 22px; padding: 0 6px; border-radius: 999px; background: rgba(0,0,0,.08); font-variant-numeric: tabular-nums; }
.tabs button[aria-selected="true"] .count { background: rgba(255,255,255,.2); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tool:hover, .tabs button:hover { background: #fff; color: var(--ink); }
.admin-search input { width: 100%; min-height: 48px; margin-bottom: 14px; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: #fff; font-size: 16px; }

.orders { display: grid; gap: 14px; }
@media (min-width: 980px) { .orders { grid-template-columns: 1fr 1fr; } }
.order { background: var(--paper); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 14px 16px; font-size: 15px; line-height: 1.5; }
.order header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding-bottom: 8px; border-bottom: 1px dashed var(--paper-edge); }
.order .no { font-size: 16px; font-variant-numeric: tabular-nums; }
.st { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 13px; font-weight: 800; border: 1.5px solid currentColor; }
.st-pending { color: #8a5a00; }
.st-paid { color: #1f5fbf; }
.st-shipped { color: #2e6b25; }
.st-cancelled { color: #6b6156; }
.st-late { color: var(--marker-red-deep); background: #fff0ec; }
.muted { color: var(--ink-soft); font-size: 14px; }
.order-body { display: grid; gap: 8px; padding: 10px 0; }
.money { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.amount { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.goods { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; font-weight: 700; }
.who { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; }
.who dt { color: var(--ink-soft); }
.who dd { margin: 0; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px dashed var(--paper-edge); }
.ship { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
/* 16px 미만이면 아이폰이 칸을 누를 때마다 화면을 확대한다 */
.ship select, .ship input, .prod select, .prod input, .note textarea { min-height: 44px; padding: 8px 10px; border: 1.5px solid #cdbfa6; border-radius: var(--radius); background: #fff; font-size: 16px; }
.ship input { flex: 1; min-width: 150px; font-variant-numeric: tabular-nums; }
.act { min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: #fff; color: var(--ink); font-weight: 800; cursor: pointer; }
.act:hover { background: var(--paper-edge); }
.act.primary { background: var(--ink); color: var(--paper); }
.act.primary:hover { background: #3a3129; }
.act:disabled { opacity: 0.5; cursor: wait; }
.note { margin-top: 8px; }
.note summary { cursor: pointer; font-weight: 700; color: var(--ink-soft); padding: 4px 0; }
.note textarea { width: 100%; margin: 6px 0; font-family: inherit; }
.admin-h { margin: 36px 0 12px; font-size: 20px; color: var(--ink-on-kraft); }
.admin-products { display: grid; gap: 10px; }
.prod { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; background: var(--paper); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-card); font-weight: 700; }
.prod strong { min-width: 72px; font-size: 17px; }
.prod input { width: 110px; text-align: right; font-variant-numeric: tabular-nums; }

/* 상세 화면의 상자: 이름 없이 귤과 상자 앞판만 */
.crate-box.bare { padding: 18% 16px 12%; }
@media (max-width: 879px) {
  .detail .crate { max-width: 340px; }
  .detail .wrap { gap: 22px; }
}

/* 달력 칸은 달마다 같은 너비 */
.calendar table { table-layout: fixed; }
.calendar thead th:first-child, .calendar tbody th { width: 96px; }
@media (min-width: 880px) { .calendar thead th:first-child, .calendar tbody th { width: 130px; } }
