/* Hallmark · 교재 목록과 주문 요약 · 차분한 편집형 · 남색 · P4 H5 E4 S5 R5 V4 */
@font-face {
  font-family: Pretendard;
  src: url('/assets/PretendardVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font: Pretendard, 'Apple SD Gothic Neo', sans-serif;
  --paper: #f8f7f1;
  --white: #fff;
  --ink: #192841;
  --muted: #4e5c68;
  --line: #d2d7dc;
  --soft: #e9eef4;
  --action: #17365f;
  --action-hover: #245389;
  --focus: #356ab1;
  --tan: #f1dfb9;
  --mint: #d9e8df;
  --rose: #eed9d1;
  --radius: .5rem;
  --shell: 71rem;
  --gutter: clamp(1rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.5 var(--font); }
button, select { color: inherit; font: inherit; }
a { color: inherit; }
button, select, .quiet { min-height: 3rem; }
button, .quiet { white-space: nowrap; }
button, select { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
button { padding: .5rem .8rem; cursor: pointer; font-weight: 650; }
button:disabled { background: var(--soft); color: var(--muted); cursor: not-allowed; }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button:not(:disabled):active { transform: translateY(1px); }
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; min-width: 0; line-height: 1.17; }
p { word-break: keep-all; overflow-wrap: anywhere; }
ul { list-style: none; padding: 0; }
[hidden] { display: none !important; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: absolute; z-index: 2; padding: .6rem; background: var(--white); }
.shell { width: min(100%, var(--shell)); margin-inline: auto; padding-inline: var(--gutter); }
.top { background: var(--white); border-bottom: 1px solid var(--line); }
.top-inner { min-height: 4.4rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem .7rem; padding-block: .55rem; }
.brand { white-space: nowrap; letter-spacing: -.055em; font-size: 1.26rem; font-weight: 850; }
.brand small { color: var(--muted); font-size: .7rem; font-weight: 650; margin-left: .25rem; letter-spacing: 0; }
.view-switch { display: flex; gap: .15rem; }
.view-switch button { min-height: 2.75rem; padding-inline: .5rem; border-color: transparent; font-size: .85rem; }
.view-switch button[aria-pressed=true] { background: var(--soft); color: var(--action); }
.intro { display: grid; gap: 1rem; padding: clamp(2rem, 6vw, 4.2rem) 0 clamp(1.4rem, 3.5vw, 2.4rem); border-bottom: 1px solid var(--line); }
.context { color: var(--action); font-weight: 760; }
.intro h1 { margin-block: .22rem .55rem; font-size: clamp(2.15rem, 5.5vw, 4.3rem); letter-spacing: -.07em; font-weight: 850; }
#explanation, .muted, footer { color: var(--muted); }
.field { display: grid; gap: .26rem; width: max-content; max-width: 100%; color: var(--muted); font-size: .82rem; font-weight: 650; }
select { min-width: 6rem; max-width: 100%; padding: .4rem .57rem; color: var(--ink); }
.workspace { display: grid; gap: clamp(1.4rem, 4.6vw, 3.2rem); padding-top: 1.5rem; }
.section-head { display: grid; gap: .65rem; align-items: end; margin-bottom: .65rem; }
.section-head h2, .cart h2, .lookup h2 { font-size: 1.35rem; letter-spacing: -.035em; }
.book-list { border-top: 1px solid var(--line); }
.book { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .65rem; align-items: center; min-width: 0; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.cover { display: grid; place-items: end start; width: clamp(2.6rem, 9vw, 4.55rem); aspect-ratio: 5 / 6; padding: .38rem; border-inline-start: .24rem solid var(--action); border-radius: .12rem .32rem .32rem .12rem; background: var(--tan); font-size: .77rem; line-height: 1; letter-spacing: -.03em; font-weight: 800; }
.cover.mint { background: var(--mint); }
.cover.rose { background: var(--rose); }
.book h3 { margin-bottom: .24rem; font-size: 1.04rem; }
.book p, .price { font-size: .84rem; color: var(--muted); }
.price { display: block; margin-top: .16rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.book button, .basket-remove, .quiet { padding-inline: .6rem; font-size: .83rem; }
.cart { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.cart h2, .cart > p, #basket { margin-bottom: .6rem; }
.count { color: var(--action); font-variant-numeric: tabular-nums; margin-left: .35rem; }
#basket li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .25rem 0; }
#basket span { overflow-wrap: anywhere; }
.total { display: flex; justify-content: space-between; gap: .5rem; padding-top: .8rem; border-top: 1px solid var(--line); font-weight: 740; }
.total output { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.primary { background: var(--action); border-color: var(--action); color: var(--white); }
.primary:disabled { border-color: var(--line); }
#place { margin-top: .8rem; width: 100%; }
.lookup { margin-top: 1.35rem; padding: 1rem 0 0; border-top: 2px solid var(--action); }
.lookup p { margin-top: .42rem; }
.admin { padding-top: 1.5rem; }
.quiet { display: inline-flex; padding-block: .55rem; align-items: center; width: max-content; text-underline-offset: .2em; }
.empty { padding: 1rem 0; border-block: 1px solid var(--line); color: var(--muted); }
.order { display: grid; gap: .5rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.order h3 { font-size: 1.06rem; }
.order p { margin-top: .27rem; color: var(--muted); }
.order span, .order button { justify-self: start; }
footer { margin-top: 2.5rem; padding: 1.1rem 0 1.8rem; border-top: 1px solid var(--line); font-size: .85rem; }

@media (hover: hover) {
  button:not(:disabled):hover { border-color: var(--action); }
  .primary:not(:disabled):hover { background: var(--action-hover); }
}
@media (min-width: 39rem) {
  .intro, .section-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .book { gap: 1rem; }
  .order { grid-template-columns: minmax(0, 1fr) minmax(5.5rem, auto) auto; align-items: center; gap: 1rem; }
}
@media (min-width: 48rem) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(15.5rem, .45fr); align-items: start; }
  .cart { position: sticky; top: 1.15rem; padding: 1.2rem; }
}
