/* Christmas gifts (18 Oct 2026), page-only: the gift band and notices, the "New release" ribbon, signed lines,
   the personal dedication fields, the copies on orders, the dashboard's "To write in the books" panel and
   the printable sheet. Loaded by the home page, the shelf, book pages, basket, checkout, order pages and the
   dashboard's order page. Every colour is a token from app.css; no imagery. */

/* ---------- the gift band (home, below the hero) and the slim notice (book pages, basket) */
.gift-band { background: var(--paper); border-bottom: 1px solid var(--border); padding: clamp(36px, 6vw, 72px) 0 clamp(32px, 5vw, 60px); }
.gift-inner { text-align: center; max-width: calc(760px + 2 * var(--gutter)); }
.gift-inner .part-rule { margin-bottom: 1.1rem; }
.gift-band h2 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.9rem); margin-bottom: .45em; }
.gift-text { color: var(--text-soft); font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); max-width: 58ch; margin: 0 auto 22px; }
.gift-note { display: grid; gap: 4px; padding: 12px 0 12px 16px; margin: 14px 0 4px; border-left: 1px solid var(--gold); }
.gift-note__cap { font-family: var(--font-display); font-weight: 600; font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .1em; color: var(--gold-text); font-size: .98rem; }
.gift-note p { margin: 0; font-size: .95rem; color: var(--text-soft); max-width: 80ch; }
.gift-note strong { font-weight: 600; color: var(--text); }
.gift-note-basket { margin: 0 0 22px; }
@media (max-width: 600px) { .gift-note { padding: 8px 0 8px 12px; margin-top: 10px; } .gift-note p { font-size: .86rem; line-height: 1.5; } }

/* ---------- the newest book stands out: a gold ribbon on its cover object, "New" in the hero */
.feature-art a, .shelf-art a, .still-front { position: relative; }
.cover-ribbon { position: absolute; z-index: 3; top: 4%; left: -8px; padding: 5px 14px 5px 12px; background: var(--gold); color: var(--on-gold); font-family: var(--font-display); font-weight: 700; font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .1em; font-size: 1rem; line-height: 1.2; box-shadow: 0 6px 14px -8px rgba(14, 22, 38, .6); pointer-events: none; }
.cover-ribbon::after { content: ""; position: absolute; left: 0; bottom: -6px; border-top: 6px solid var(--gold-deep); border-left: 8px solid transparent; }
.still-front .cover-ribbon { top: 2.5%; font-size: .92rem; }
@media (max-width: 760px) { .cover-ribbon { font-size: .8rem; padding: 3px 10px 3px 9px; left: -5px; } .still-front .cover-ribbon { font-size: .74rem; } }
.hero-new { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: -12px 0 26px; }
.hero-new__tag { font-family: var(--font-display); font-weight: 700; font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .12em; color: var(--on-gold); background: var(--gold); padding: 1px 10px; line-height: 1.5; }
.hero-new a { color: var(--head-fg); font-family: var(--font-display); font-style: italic; font-size: 1.2rem; text-decoration-color: var(--gold); }
.hero-new a:hover { color: var(--gold); }
.shelf-new { color: var(--gold-text); }

/* ---------- signed lines */
.feature-signed, .shelf-signed { margin: -6px 0 14px; }
.buybox-signed { display: grid; gap: 2px; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--border); }
.buybox-signed > span:last-child { color: var(--muted); font-size: .88rem; }
.line-signed { margin: 0 0 2px; font-size: .95rem; }

/* ---------- personal dedication fields (book page buy box, basket lines) */
.ded { flex: 1 1 100%; border: 1px solid var(--border); background: var(--paper-light); }
.ded[open] { border-color: var(--gold); }
.ded-summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; cursor: pointer; list-style: none; font-weight: 500; }
.ded-summary::-webkit-details-marker { display: none; }
.ded-summary > .icon { color: var(--gold-text); }
.ded-summary span { display: grid; gap: 1px; }
.ded-summary small { color: var(--muted); font-weight: 400; font-size: .84rem; }
.ded-summary::after { content: "+"; margin-left: auto; font-family: var(--font-display); font-size: 1.4rem; line-height: 1; color: var(--gold-text); }
.ded[open] > .ded-summary::after { content: "\2212"; }
.ded-summary:focus-visible { outline-offset: -3px; }
.ded-body { padding: 4px 14px 16px; display: grid; gap: 12px; }
.ded-fields { display: grid; gap: 14px; }
.ded-same { margin: 0; }
.ded-input { min-height: 96px; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.4; }
.ded-count { margin: 0; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.ded-count.is-over { color: var(--danger); font-weight: 600; }
.ded-field .err { margin: 0; }
.ded-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ded-status { font-size: .86rem; color: var(--success); }
.line > .ded-line { grid-column: 2 / -1; margin-top: -4px; }
@media (max-width: 520px) { .line > .ded-line { grid-column: 1 / -1; } }
.ded-add { margin: 2px 0 4px; }

/* ---------- copies on checkout and the order page */
.copies { list-style: none; margin: 8px 0 0; padding: 0 0 0 12px; border-left: 1px solid var(--gold); display: grid; gap: 6px; }
.copies li { display: grid; gap: 1px; }
.copies-label { font-size: .8rem; color: var(--muted); }
.copies-msg { font-family: var(--font-display); font-style: italic; font-size: 1.12rem; line-height: 1.35; color: var(--text); quotes: "\201C" "\201D"; overflow-wrap: anywhere; }
.copies-sig { font-family: var(--font-display); font-weight: 600; font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .08em; color: var(--gold-text); font-size: .95rem; }
.copies-signed { margin: 2px 0 0; font-size: .95rem; }
.sum-items li > span:first-child { min-width: 0; }
.sum-items li > .num { white-space: nowrap; }
.sum-items .copies { margin-top: 6px; }
.sum-items .copies-msg { font-size: 1rem; }
.sum-ded-edit { margin: -4px 0 10px; font-size: .88rem; }
.sum-ded-edit a { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- dashboard: "To write in the books" */
.write-panel { border-top: 2px solid var(--gold); }
.write-panel .panel-head h2 { display: flex; align-items: center; gap: 8px; }
.write-list { list-style: none; margin: 0; padding: 0; }
.write-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; align-items: start; padding: 16px clamp(14px, 3vw, 22px); border-top: 1px solid var(--border); }
.write-item.is-written { background: var(--success-bg); }
.write-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; }
.write-book { font-weight: 600; }
.write-copy { color: var(--muted); }
.write-msg { margin: 0; font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.3; color: var(--text); white-space: normal; overflow-wrap: anywhere; }
.write-sig { margin: 0; font-family: var(--font-display); font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .08em; color: var(--muted); font-size: 1.15rem; }
.write-tick { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.write-done { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: .9rem; font-weight: 500; }
.write-all { border-top: 1px solid var(--border); }
.ded-hold .check { margin-top: 8px; }
@media (max-width: 640px) { .write-item { grid-template-columns: minmax(0, 1fr); } .write-tick { justify-content: flex-start; } }

/* ---------- the printable sheet (admin/order-dedications.php) */
.sheet-page { background: var(--paper); }
.sheet { width: 100%; max-width: 820px; margin: 0 auto; padding: 28px var(--gutter) 60px; }
.sheet-head { padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--gold); }
.sheet-cap { margin: 0 0 4px; font-family: var(--font-display); font-weight: 600; font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .12em; color: var(--gold-text); }
.sheet-head h1 { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem); margin-bottom: 6px; }
.sheet-sub { color: var(--muted); margin: 0 0 14px; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sheet-block { position: relative; padding: 26px 4px 28px; border-bottom: 1px dashed var(--muted); break-inside: avoid; page-break-inside: avoid; }
.sheet-block::after { content: "cut"; position: absolute; right: 0; bottom: -.7em; padding-left: 6px; background: var(--paper); font-size: .7rem; letter-spacing: .1em; color: var(--muted); }
.sheet-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 14px; font-size: .9rem; color: var(--muted); }
.sheet-meta span:nth-child(2) { color: var(--text); font-weight: 600; }
.sheet-msg { margin: 0; font-family: var(--font-display); font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); line-height: 1.3; color: var(--text); overflow-wrap: anywhere; }
.sheet-msg-sig { font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .08em; color: var(--muted); font-size: 1.5rem; }
.sheet-then { margin: 12px 0 0; font-size: .82rem; color: var(--muted); }
@media print {
  .sheet-page { background: none; }
  .sheet { max-width: none; padding: 0; }
  .sheet-actions { display: none; }
  .sheet-block::after { background: none; }
  .sheet-msg, .sheet-head h1 { color: var(--ink); }
}
