/* 베스툴 전자 카탈로그 화면 디자인 (VER2와 같음) */
:root {
  color-scheme: light;
  --desk: #D3D1CD;
  --bar: #FFFFFF;
  --bar-ink: #262322;
  --bar-muted: #6E6966;
  --line: #DCD9D5;
  --accent: #E63922;
  --accent-ink: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F3F2F0;
  --scrim: rgba(20, 18, 17, .55);
  --toast-bg: #262322;
  --toast-ink: #FFFFFF;
  --toast-act: #FF8A73;
  --logo-filter: none;
  --book-edge: transparent;
  --font: "Jost", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --pw: 420px;
  --topbar-h: 58px;
  --drawer-w: 380px;
  --sheet-h: max(300px, 42vh);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --desk: #1D1B1A;
    --bar: #2A2726;
    --bar-ink: #ECEAE7;
    --bar-muted: #A39E99;
    --line: #3B3735;
    --accent: #F04A32;
    --surface: #2A2726;
    --surface-2: #34302E;
    --scrim: rgba(0, 0, 0, .62);
    --toast-bg: #ECEAE7;
    --toast-ink: #1D1B1A;
    --toast-act: #C42E18;
    --logo-filter: invert(1);
    --book-edge: rgba(255, 255, 255, .07);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --desk: #1D1B1A;
  --bar: #2A2726;
  --bar-ink: #ECEAE7;
  --bar-muted: #A39E99;
  --line: #3B3735;
  --accent: #F04A32;
  --surface: #2A2726;
  --surface-2: #34302E;
  --scrim: rgba(0, 0, 0, .62);
  --toast-bg: #ECEAE7;
  --toast-ink: #1D1B1A;
  --toast-act: #C42E18;
  --logo-filter: invert(1);
  --book-edge: rgba(255, 255, 255, .07);
}
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; background: var(--desk); scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  height: 100%; margin: 0; overflow: hidden;
  background: var(--desk); color: var(--bar-ink);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: break-word;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--bar-muted); }

#app { height: 100%; display: flex; flex-direction: column; }

/* 상단 바 */
.topbar {
  flex: 0 0 auto; height: var(--topbar-h); display: flex; align-items: center; gap: 14px;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(10px, env(safe-area-inset-right, 0px));
  background: var(--bar); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { height: 21px; width: auto; display: block; filter: var(--logo-filter); }
.brand-sub { font-size: 13px; color: var(--bar-muted); white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--line); }
.tools { margin-left: auto; display: flex; gap: 2px; }
.tool {
  height: 40px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent;
  display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.tool:hover { background: var(--surface-2); }
.tool:disabled { opacity: .35; cursor: default; background: transparent; }
.tool svg { width: 20px; height: 20px; flex: none; }
.badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  display: inline-grid; place-items: center; font-size: 12px; font-weight: 600;
  background: var(--line); color: var(--bar-muted); font-variant-numeric: tabular-nums;
}
.badge.has { background: var(--accent); color: var(--accent-ink); }
.badge.bump { animation: bump .32s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }

/* 지면 영역 */
.stage-wrap { flex: 1 1 auto; min-height: 0; position: relative; display: flex; }
.stage { flex: 1 1 auto; min-width: 0; overflow: auto; display: flex; padding: 14px 12px; overscroll-behavior: contain; }
.book {
  margin: auto; display: flex; align-items: stretch;
  box-shadow: 0 22px 44px -20px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.16), 0 0 0 1px var(--book-edge);
}
.book.enter-next { animation: inNext .26s ease; }
.book.enter-prev { animation: inPrev .26s ease; }
@keyframes inNext { from { opacity: 0; transform: translateX(26px); } }
@keyframes inPrev { from { opacity: 0; transform: translateX(-26px); } }
.side-arrow {
  display: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bar); color: var(--bar-ink); place-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.16);
}
.side-arrow svg { width: 24px; height: 24px; }
.side-arrow:disabled { opacity: 0; pointer-events: none; }
.side-arrow.prev { left: 20px; }
.side-arrow.next { right: 20px; }
@media (min-width: 980px) { .side-arrow { display: grid; } }

/* 하단 바 */
.pager {
  flex: 0 0 auto; height: 52px; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding-inline: 10px; background: var(--bar); border-top: 1px solid var(--line);
}
.pager .tool svg { width: 18px; height: 18px; }
.page-info { min-width: 120px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.page-info strong { font-weight: 600; }
.page-info .muted { margin-left: 8px; font-size: 13px; }
.jump { display: flex; align-items: center; gap: 2px; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line); }
.jump input {
  width: 84px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface); color: var(--bar-ink); font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.jump input::-webkit-outer-spin-button, .jump input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.jump input::placeholder { color: var(--bar-muted); opacity: .8; }
.jump .tool { height: 36px; padding: 0 10px; }
.zoom { display: flex; align-items: center; gap: 2px; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line); }
.zoom .tool { width: 38px; padding: 0; justify-content: center; }
#zoomLabel { min-width: 48px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--bar-muted); }

/* ───── 카탈로그 지면 (원본 이미지 + 클릭 영역) ───── */
.page {
  position: relative; flex: none; overflow: hidden; container-type: inline-size;
  width: var(--pw); aspect-ratio: 1240 / 1754; background: #FFFFFF;
}
.page > img {
  position: absolute; top: 0; height: 100%; max-width: none;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.book.spread .page:first-child::after,
.book.spread .page:last-child::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 5%; pointer-events: none; z-index: 1;
}
.book.spread .page:first-child::after { right: 0; background: linear-gradient(to left, rgba(0,0,0,.12), rgba(0,0,0,0)); }
.book.spread .page:last-child::before { left: 0; background: linear-gradient(to right, rgba(0,0,0,.08), rgba(0,0,0,0)); }

.hs { position: absolute; z-index: 2; border: 0; padding: 0; margin: 0; background: transparent; border-radius: 2px; }
.stage.zoomed .page { cursor: grab; }
.stage.zoomed .hs { cursor: pointer; }
.stage.grabbing, .stage.grabbing * { cursor: grabbing !important; }
.stage.grabbing { user-select: none; }
.hs.prod:hover { background: rgba(230, 57, 34, .07); box-shadow: inset 0 0 0 2px rgba(230, 57, 34, .75); }
.hs.prod.in { background: rgba(230, 57, 34, .04); box-shadow: inset 0 0 0 2px rgba(230, 57, 34, .45); }
.hs.prod.in:hover { box-shadow: inset 0 0 0 2px rgba(230, 57, 34, .85); }
.hs.prod:focus-visible { outline: 2px solid #E63922; outline-offset: -2px; }
.chip {
  position: absolute; top: 4%; right: 1.6%;
  min-width: max(20px, 3.6cqw); height: max(20px, 3.6cqw); padding: 0 .9cqw; border-radius: 999px;
  display: grid; place-items: center; font-size: max(11px, 1.9cqw); font-weight: 600; line-height: 1;
  background: rgba(255, 255, 255, .94); color: #E63922; border: 1.5px solid #E63922;
  font-variant-numeric: tabular-nums; box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.hs.prod.in .chip { background: #E63922; color: #FFFFFF; }
.chip.at { right: auto; transform: translate(-50%, -50%); min-width: max(16px, 3.2cqw); height: max(16px, 3.2cqw); font-size: max(10px, 1.8cqw); }
.hs.link { border-radius: 3px; }
.hs.link .ul {
  position: absolute; height: max(1.5px, .2cqw); background: rgba(255, 255, 255, .75); pointer-events: none;
}
.hs.link:hover { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .75); }
.hs.link:hover .ul { background: #FFFFFF; }
.hs.link:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 0; }
.hs.flash { animation: flash .7s ease; }
.hs.flash-out { animation: flashOut .7s ease; }
@keyframes flashOut { from { background: rgba(38, 35, 34, .18); } }
@keyframes flash { from { background: rgba(230, 57, 34, .24); } }
.hs.pulse { animation: pulse 1s ease 3; }
@keyframes pulse { 50% { background: rgba(230, 57, 34, .2); box-shadow: inset 0 0 0 3px #E63922; } }

/* ───── 장바구니 서랍 ───── */
.drawer {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + var(--topbar-h)); right: 0; bottom: 0; z-index: 40;
  width: var(--drawer-w); display: flex; flex-direction: column;
  background: var(--surface); color: var(--bar-ink); border-left: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: -10px 0 28px rgba(0,0,0,.08);
  transform: translateX(100%); visibility: hidden; transition: transform .24s ease, visibility 0s linear .24s;
}
.drawer.open { transform: none; visibility: visible; transition: transform .24s ease; }
.stage-wrap, .pager { transition: margin-right .24s ease; }
body.cart-open .stage-wrap, body.cart-open .pager { margin-right: var(--drawer-w); }
body.cart-open .toast { left: calc((100% - var(--drawer-w)) / 2); }
.ci.flash { animation: ciFlash .8s ease; }
@keyframes ciFlash { from { background: rgba(230, 57, 34, .12); } }
@media (max-width: 759px) {
  .drawer {
    top: auto; left: 0; width: auto; height: var(--sheet-h);
    border-left: 0; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0;
    box-shadow: 0 -10px 28px rgba(0,0,0,.14); transform: translateY(100%);
  }
  .stage-wrap, .pager { transition: none; }
  body.cart-open .stage-wrap, body.cart-open .pager { margin-right: 0; }
  #app { transition: padding-bottom .24s ease; }
  body.cart-open #app { padding-bottom: var(--sheet-h); }
  body.cart-open .toast { left: 50%; bottom: calc(var(--sheet-h) + 64px); }
  .cart-foot { padding: 10px 16px 12px; }
  .sum { margin-bottom: 10px; }
}
.layer-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.layer-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.layer-head .count { color: var(--bar-muted); font-size: 14px; }
.icon-btn { margin-left: auto; width: 40px; height: 40px; flex: none; border: 0; border-radius: 8px; background: transparent; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }
.cart-body { flex: 1 1 auto; overflow: auto; }
.cart-list { list-style: none; margin: 0; padding: 0; }
.ci {
  position: relative; display: grid; grid-template-columns: 1fr auto;
  grid-template-areas: "main main" "qty total" "note note";
  gap: 8px 12px; padding: 12px 18px 14px; border-bottom: 1px solid var(--line);
}
.ci-main { grid-area: main; min-width: 0; padding-right: 26px; }
.ci-model {
  display: inline; padding: 0; border: 0; background: none; color: inherit; text-align: left;
  font-weight: 600; font-size: 15px; letter-spacing: .01em; text-decoration: underline; text-decoration-color: var(--line);
  text-underline-offset: 3px; cursor: pointer;
}
.ci-model:hover { color: var(--accent); text-decoration-color: currentColor; }
.ci-model .ci-id { font-weight: 400; font-size: 14px; color: var(--bar-muted); letter-spacing: 0; }
.ci-name { display: block; font-size: 13px; color: var(--bar-muted); }
.ci-del {
  position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border: 0; border-radius: 6px;
  background: transparent; color: var(--bar-muted); display: grid; place-items: center;
}
.ci-del:hover { background: var(--surface-2); color: var(--bar-ink); }
.ci-del svg { width: 16px; height: 16px; }
.ci-qty { grid-area: qty; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; width: max-content; overflow: hidden; }
.ci-qty button { width: 36px; height: 34px; border: 0; background: var(--surface-2); font-size: 18px; line-height: 1; }
.ci-qty input {
  width: 64px; height: 34px; border: 0; border-inline: 1px solid var(--line); background: var(--surface);
  text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.ci-qty input::-webkit-outer-spin-button, .ci-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ci-total { grid-area: total; align-self: center; text-align: right; font-variant-numeric: tabular-nums; }
.ci-total small { display: block; color: var(--bar-muted); font-size: 12px; }
.ci-total strong { font-size: 15px; font-weight: 600; }
.ci-note { grid-area: note; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--bar-muted); }
.ci-note span { flex: none; }
.ci-note input {
  flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface); color: var(--bar-ink); font-size: 13px;
}
.ci-note input::placeholder { color: var(--bar-muted); opacity: .75; }
.cart-empty { padding: 48px 24px; text-align: center; color: var(--bar-muted); }
.cart-empty p { margin: 0 0 16px; }
.cart-foot { border-top: 1px solid var(--line); padding: 14px 18px 16px; background: var(--surface); }
.sum { margin: 0 0 14px; font-variant-numeric: tabular-nums; }
.sum div { display: flex; justify-content: space-between; padding: 2px 0; font-size: 14px; color: var(--bar-muted); }
.sum dd { margin: 0; }
.sum .grand { color: var(--bar-ink); font-size: 16px; font-weight: 700; }
.actions { display: flex; gap: 8px; }
.actions .btn.primary { flex: 1; }

.btn {
  height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--bar-ink); font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }

/* ───── 모달 ───── */
.modal {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  background: var(--scrim); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s linear .2s;
}
.modal.open { opacity: 1; visibility: visible; transition: opacity .2s; }
.panel {
  width: 100%; max-height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); color: var(--bar-ink); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.panel.wide { max-width: 940px; height: 100%; }
.panel.narrow { max-width: 460px; }
.panel.search { max-width: 560px; height: min(640px, 100%); }
.quote-head { flex-wrap: wrap; }
.quote-head .head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.quote-head .icon-btn { margin-left: 0; }
.q-form { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 10px 12px; padding: 12px 18px 14px; border-bottom: 1px solid var(--line); }
.field { min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--bar-muted); font-weight: 500; }
.field input[type="text"], .field input[type="search"] {
  width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface); color: var(--bar-ink); font-size: 14px;
}
.field input::placeholder { color: var(--bar-muted); opacity: .8; }
.q-scroll { flex: 1 1 auto; overflow: auto; background: var(--surface-2); padding: 16px; }
.q-scale { position: relative; margin: 0 auto; }

/* 검색 */
.search-box { padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.search-box input { height: 44px; font-size: 15px; }
.results { list-style: none; margin: 0; padding: 4px 0; overflow: auto; flex: 1 1 auto; }
.sr { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 4px 12px 4px 6px; }
.sr + .sr { border-top: 1px solid var(--line); }
.sr-go { border: 0; background: transparent; text-align: left; padding: 8px 12px; border-radius: 8px; min-width: 0; }
.sr-go:hover { background: var(--surface-2); }
.sr-model { display: block; font-weight: 600; }
.sr-sub { display: block; font-size: 13px; color: var(--bar-muted); }
.sr-price { font-variant-numeric: tabular-nums; font-size: 14px; }
.sr .btn { height: 34px; padding: 0 12px; font-size: 13px; }
.sr .btn.in { border-color: var(--accent); color: var(--accent); }
.sr-empty { padding: 32px 22px; color: var(--bar-muted); text-align: center; }

@media (max-width: 640px) {
  .modal { padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
  .panel, .panel.wide, .panel.search { border-radius: 0; height: 100%; max-width: none; }
  .panel.narrow { height: auto; border-radius: 12px; margin: 0 12px; }
  .q-form { grid-template-columns: 1fr 1fr; }
  .q-form .field.memo { grid-column: 1 / -1; }
  .quote-head .head-actions { width: 100%; }
  .quote-head .head-actions .btn { flex: 1; }
  .brand-sub, .tool .label, .page-info .muted { display: none; }
  .brand img { height: 17px; }
  .tool { padding: 0 9px; }
  .topbar { gap: 8px; }
  .page-info { min-width: 76px; }
  .zoom { margin-left: 4px; padding-left: 6px; }
  .zoom #zoomLabel { display: none; }
  .jump { margin-left: 4px; padding-left: 6px; }
  .jump input { width: 58px; padding: 0 4px; font-size: 13px; }
  .jump .tool { padding: 0 6px; }
  .pager { gap: 2px; padding-inline: 4px; }
  .sr { grid-template-columns: 1fr auto; }
  .sr-price { display: none; }
}

/* 견적서 지면 (PDF로 그대로 저장되는 부분이라 고정 크기와 고정 색) */
.paper {
  position: absolute; top: 0; left: 0; transform-origin: 0 0;
  width: 794px; min-height: 1123px; padding: 54px 52px 48px;
  background: #FFFFFF; color: #262322; font-family: var(--font); font-size: 12px; line-height: 1.5;
  box-shadow: 0 6px 24px rgba(0,0,0,.16); word-break: keep-all;
}
.pp-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 2px solid #262322; }
.pp-logo { height: 22px; width: auto; align-self: center; }
.pp-title { margin: 0; font-size: 30px; font-weight: 700; line-height: 1.2; text-align: center; }
.pp-no { justify-self: end; font-size: 11px; color: #6E6966; font-variant-numeric: tabular-nums; }
.pp-head { display: flex; gap: 22px; align-items: stretch; }
.pp-left { flex: 1 1 auto; display: flex; flex-direction: column; }
.pp-kv { width: 100%; border-collapse: collapse; }
.pp-kv th { width: 66px; padding: 5px 0; text-align: left; vertical-align: top; font-weight: 500; color: #6E6966; }
.pp-kv td { padding: 5px 0; border-bottom: 1px solid #DCD9D5; }
.pp-kv .to { font-size: 15px; font-weight: 700; }
.pp-lead { margin: auto 0 0; padding-top: 14px; font-size: 13px; }
.pp-sup { flex: 0 0 376px; border-collapse: collapse; font-size: 11.5px; }
.pp-sup th, .pp-sup td { border: 1px solid #9A948F; padding: 5px 7px; text-align: left; }
.pp-sup th { width: 64px; background: #F3F2F0; font-weight: 500; white-space: nowrap; }
.pp-sup th.lab { width: 24px; padding: 0; text-align: center; background: #3E3A39; color: #FFFFFF; font-weight: 600; line-height: 1.9; }
.stamp {
  display: inline-block; width: 26px; height: 26px; margin-left: 10px; border: 2px solid #E63922; border-radius: 50%;
  color: #E63922; font-size: 11px; font-weight: 700; line-height: 22px; text-align: center; vertical-align: middle;
}
.pp-sup td.ceo { padding-block: 0; }
.seal { display: inline-block; width: auto; height: 34px; max-width: 60px; margin: -6px 0 -6px 10px; vertical-align: middle; object-fit: contain; }
.pp-total { display: flex; align-items: center; gap: 18px; margin: 22px 0 16px; padding: 12px 16px; border: 2px solid #262322; }
.pp-total .lbl { font-weight: 600; font-size: 14px; line-height: 1.35; }
.pp-total .lbl small { display: block; font-weight: 400; font-size: 11px; color: #6E6966; }
.pp-total .kor { font-size: 16px; font-weight: 700; }
.pp-total .num { margin-left: auto; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pp-items { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pp-items th { padding: 4px 5px; border: 1px solid #5E5958; background: #3E3A39; color: #FFFFFF; font-weight: 500; font-size: 11.5px; }
.pp-items td { height: 27px; padding: 3px 6px; border: 1px solid #BDB8B3; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.pp-items td.mid { border-bottom-color: #E4E0DB; }
.pp-items td.sub { color: #4A4544; }
.pp-items td.ph { padding: 3px; text-align: center; }
.pp-items td.ph img { display: block; width: auto; height: auto; max-width: 100%; max-height: 48px; margin: 0 auto; }
.pp-items td.name { white-space: normal; line-height: 1.25; word-break: keep-all; }
.pp-items .c { text-align: center; }
.pp-items .n { text-align: right; font-variant-numeric: tabular-nums; }
.pp-items tfoot th { border-color: #BDB8B3; background: #F3F2F0; color: #262322; text-align: right; font-weight: 500; font-size: 12px; }
.pp-items tfoot td { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.pp-items tfoot .grand th, .pp-items tfoot .grand td { background: #FCE9E5; font-size: 13px; font-weight: 700; }
.pp-note { margin-top: 18px; padding: 10px 14px; border: 1px solid #BDB8B3; }
.pp-note h4 { margin: 0 0 4px; font-size: 12px; }
.pp-note ol { margin: 0; padding-left: 18px; color: #3E3A39; }
.pp-foot { margin-top: 20px; text-align: right; color: #6E6966; font-size: 11px; }

/* 창 아래 버튼줄, 안내 문구 */
.hint { margin: 0; font-size: 13px; color: var(--bar-muted); }
.settings-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px 16px; }

/* 사용 방법 */
.guide-body { padding: 16px 20px 4px; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.guide-steps { list-style: none; counter-reset: step; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.guide-steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; }
.guide-steps li::before {
  content: counter(step); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600;
}
.guide-steps strong { font-size: 15px; font-weight: 600; }
.guide-steps span { font-size: 14px; color: var(--bar-muted); }

/* 알림 */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 70px); z-index: 60;
  transform: translate(-50%, 12px); opacity: 0; visibility: hidden;
  display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100vw - 24px);
  padding: 10px 10px 10px 16px; border-radius: 10px; background: var(--toast-bg); color: var(--toast-ink);
  font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: opacity .18s, transform .18s, visibility 0s linear .18s;
}
.toast.on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .18s, transform .18s; }
.toast button { border: 0; background: transparent; color: var(--toast-act); font-weight: 700; padding: 6px 8px; border-radius: 6px; white-space: nowrap; }
.toast button[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
