/* ═══════════════════════════════════════════════════════════════
   GLUE & GLITTER SCRAPBOOK — s123 deep-custom portal skin
   site youxi--1--123 · index.html
   language: washi tape · corner mounts · glitter jars · flaps
   ═══════════════════════════════════════════════════════════════ */

/* ── palette (unchanged from original site) ──────────────────── */
:root {
  --bg: #2A2118;
  --panel: #382C1F;
  --panel-2: #473826;
  --accent: #F26D9C;
  --accent2: #5CB8D6;
  --text: #FBF5EA;
  --soft: #C4AE94;
  --line: rgba(242,109,156,.28);
  --fh: 'Comic Sans MS', 'Segoe UI', cursive;
  --fb: 'Segoe UI', sans-serif;
  --fm: 'Courier New', monospace;
  --sec-gap: 30px;
}

/* ── craft derivatives (new, appended) ───────────────────────── */
:root {
  --paper: #FBF5EA;
  --paper-2: #F1E7D2;
  --paper-3: #E7DBC2;
  --ink: #2A2118;
  --ink-2: #5A4A38;
  --ink-3: #8A6E58;
  --glitter: #F2C14E;
  --leaf: #7FB069;
  --rose: #C24E77;
  --tape-pk: rgba(242,109,156,.42);
  --tape-bl: rgba(92,184,214,.38);
  --tape-cm: rgba(251,245,234,.26);
  --stitch: rgba(196,174,148,.5);
}

/* ═══ 0. reset & base ═══════════════════════════════════════════ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  color: var(--text);
  font-family: var(--fb);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
}

/* the craft table: paper shreds and a faint plaid cover */
body.t-craft {
  background:
    radial-gradient(circle at 12% 16%, rgba(242,109,156,.16) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 68% 8%, rgba(92,184,214,.18) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 46%, rgba(242,193,78,.15) 0 2px, transparent 3px),
    radial-gradient(circle at 88% 66%, rgba(242,109,156,.12) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 24% 84%, rgba(251,245,234,.1) 0 2px, transparent 3px),
    repeating-linear-gradient(45deg, rgba(251,245,234,.025) 0 2px, transparent 2px 18px),
    repeating-linear-gradient(-45deg, rgba(92,184,214,.03) 0 2px, transparent 2px 18px),
    var(--bg);
  background-attachment: fixed;
}

[v-cloak] { display: none; }
a { color: inherit; text-decoration: none; display: block; }
img { display: block; max-width: 100%; }
button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

::selection { background: var(--accent); color: var(--bg); }

/* ═══ 1. layout shell ═══════════════════════════════════════════ */
.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 18px;
}

/* every section is a page laid on the kraft desk */
.sec {
  position: relative;
  margin-top: var(--sec-gap);
  min-width: 0;
  padding: 18px 16px 18px;
  border-radius: 8px;
  border: 1.5px solid rgba(242,109,156,.22);
  background:
    linear-gradient(180deg, rgba(251,245,234,.04), rgba(42,33,24,.35) 70%),
    var(--panel);
  box-shadow:
    inset 0 2px 0 rgba(251,245,234,.03),
    0 12px 26px -18px rgba(0,0,0,.8);
}

/* the strip of washi tape holding the page down */
.sec::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  width: 86px;
  height: 15px;
  margin-left: -43px;
  transform: rotate(-1.5deg);
  background:
    repeating-linear-gradient(90deg, rgba(251,245,234,.14) 0 6px, transparent 6px 12px),
    var(--tape-pk);
  border-radius: 1px;
  clip-path: polygon(0 3px, 3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px));
  box-shadow: 0 2px 5px rgba(0,0,0,.28);
  pointer-events: none;
}

/* ═══ 2. callout — the snipped label ════════════════════════════ */
.callout {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.callout b {
  flex: none;
  font-family: var(--fh);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border-radius: 3px;
  padding: 4px 13px;
}

.callout span {
  font-family: var(--fm);
  font-size: 10.5px;
  color: var(--soft);
  letter-spacing: .06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* the ruled line running out to the edge */
.callout::after {
  content: '';
  flex: 1;
  border-top: 1.5px dashed rgba(196,174,148,.35);
}

/* the little scissors beside the label */
.co-cut {
  flex: none;
  font-style: normal;
  font-size: 12px;
  line-height: 1;
  color: var(--accent2);
}

/* ═══ 3. header — the washi ring eaves ══════════════════════════ */
.hdr {
  position: relative;
  z-index: 50;
  background: linear-gradient(180deg, #3E3122, #33271A);
  overflow: hidden;
}

/* the drying line strung across the doorway */
.s123-rope {
  position: relative;
  height: 14px;
  background:
    repeating-linear-gradient(90deg, rgba(196,174,148,.55) 0 6px, transparent 6px 10px) 0 6px / 100% 2px no-repeat,
    linear-gradient(180deg, #443622, #3B2E20);
}

/* the rolls of washi tape hung from the line */
.s123-rings {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  height: 58px;
  padding: 0 12px;
  background: linear-gradient(180deg, #3B2E20, #35291B);
  overflow: hidden;
}

.s123-rings i {
  position: relative;
  width: 28px;
  height: 42px;
  margin-top: 5px;
  border: 5px solid rgba(242,109,156,.55);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(42,33,24,.45);
  transform-origin: top center;
  animation: s123sway 3.6s ease-in-out infinite;
}

.s123-rings i::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  width: 10px;
  height: 7px;
  margin-left: -5px;
  border-radius: 2px;
  background: linear-gradient(180deg, #C4AE94, #8A7458);
}

.s123-rings i:nth-child(1) {
  width: 24px;
  height: 36px;
  border-color: rgba(242,109,156,.55);
  animation-delay: .2s;
}

.s123-rings i:nth-child(2) {
  width: 34px;
  height: 48px;
  margin-top: 3px;
  border-color: rgba(92,184,214,.5);
  animation-delay: 1.1s;
}

.s123-rings i:nth-child(3) {
  width: 21px;
  height: 33px;
  border-color: rgba(251,245,234,.4);
  animation-delay: .6s;
}

.s123-rings i:nth-child(4) {
  width: 30px;
  height: 44px;
  border-color: rgba(242,193,78,.5);
  animation-delay: 1.6s;
}

.s123-rings i:nth-child(5) {
  width: 25px;
  height: 38px;
  border-color: rgba(127,176,105,.5);
  animation-delay: .9s;
}

@keyframes s123sway {
  0%, 100% { transform: rotate(2.6deg); }
  50% { transform: rotate(-2.6deg); }
}

.hdr-in {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0 11px;
}

.s123-brand {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hdr-name {
  font-family: var(--fh);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s123-sub {
  font-family: var(--fm);
  font-size: 8.5px;
  letter-spacing: .22em;
  color: var(--soft);
}

.hdr-search {
  flex: none;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border: 1.5px dashed rgba(196,174,148,.5);
  border-radius: 6px;
  background: rgba(42,33,24,.4);
}

/* the torn deckle edge closing the header */
.s123-deckle {
  height: 10px;
  background: radial-gradient(circle at 7px 0, #33271A 6px, transparent 6.5px);
  background-size: 14px 10px;
  background-repeat: repeat-x;
}

/* ═══ 4. category tape tabs + search ════════════════════════════ */
.s123-tabs {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 16px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.s123-tabs::-webkit-scrollbar { display: none; }

/* each chip is a torn-off strip of tape */
.s123-chip {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px dashed rgba(196,174,148,.42);
  border-radius: 4px;
  padding: 7px 12px;
  background:
    linear-gradient(180deg, rgba(251,245,234,.09), rgba(251,245,234,.02)),
    var(--panel);
  transform: rotate(-.6deg);
}

.s123-chip:nth-child(even) { transform: rotate(.7deg); }

.s123-chip-tint {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(42,33,24,.3);
}

.s123-chip-tint.f0 { background: var(--accent); }
.s123-chip-tint.f1 { background: var(--accent2); }
.s123-chip-tint.f2 { background: var(--glitter); }
.s123-chip-tint.f3 { background: var(--leaf); }
.s123-chip-tint.f4 { background: var(--paper); }
.s123-chip-tint.f5 { background: var(--rose); }

.s123-chip b {
  font-family: var(--fh);
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s123-chip em {
  font-style: normal;
  font-family: var(--fm);
  font-size: 9px;
  color: var(--soft);
}

.s123-chip.on {
  background: var(--accent);
  border-color: var(--accent);
  border-style: solid;
}

.s123-chip.on b { color: var(--bg); }

.s123-chip.on em { color: rgba(42,33,24,.8); }

.s123-chip.on .s123-chip-tint {
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px rgba(42,33,24,.4);
}

.s123-chip:active { transform: scale(.96); }

.srch-bar {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.srch-input {
  flex: 1;
  min-width: 0;
  background: #241C13;
  border: 1.5px dashed rgba(196,174,148,.45);
  border-radius: 6px;
  padding: 10px 13px;
  font-family: var(--fh);
  font-size: 13.5px;
  color: var(--text);
  outline: none;
}

.srch-input:focus {
  border-color: var(--accent);
  border-style: solid;
}

.srch-go {
  flex: none;
  font-family: var(--fh);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--bg);
  background: var(--accent);
  border-radius: 6px;
  padding: 0 16px;
}

.srch-go:active { transform: scale(.96); }

/* ═══ 5. loading ═════════════════════════════════════════════════ */
.loading-full {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.loading-bar {
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: var(--panel-2);
  overflow: hidden;
  margin: 0 auto 12px;
}

/* the glue stick sliding across */
.loading-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: ldslide 1s infinite;
}

@keyframes ldslide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

.loading-txt {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--soft);
}

/* ═══ 6. hero .hv21 — the open scrapbook spread ═════════════════ */
.hv21 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* the little label taped above the spread */
.hv21-label {
  font-family: var(--fm);
  font-size: 9.5px;
  letter-spacing: .16em;
  color: var(--bg);
  background: linear-gradient(180deg, rgba(242,109,156,.95), rgba(242,109,156,.78));
  border-radius: 3px;
  padding: 4px 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,.3);
}

/* the cream journal spread, faint grid on both leaves */
.hv21-spread {
  display: flex;
  width: 100%;
  min-width: 0;
  border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, rgba(196,174,148,.1) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(196,174,148,.1) 0 1px, transparent 1px 26px),
    var(--paper);
  box-shadow:
    inset 0 0 0 1px rgba(196,174,148,.45),
    0 16px 30px -16px rgba(0,0,0,.8);
}

.hv21-leaf {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hv21-left {
  flex: 0 0 44%;
  align-items: center;
  justify-content: center;
  padding: 16px 8px 14px 14px;
}

.hv21-right {
  flex: 1;
  gap: 7px;
  padding: 16px 14px 16px 10px;
  align-items: flex-start;
}

/* the center binding: stitch line and wire loops */
.hv21-spine {
  flex: none;
  position: relative;
  width: 20px;
  background: linear-gradient(90deg,
    rgba(42,33,24,.14),
    rgba(42,33,24,.04) 40%,
    rgba(42,33,24,.04) 60%,
    rgba(42,33,24,.14));
}

.hv21-spine::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 50%;
  border-left: 2px dashed rgba(196,174,148,.75);
}

.hv21-spine i {
  position: absolute;
  left: 50%;
  width: 13px;
  height: 7px;
  margin-left: -6.5px;
  border: 2px solid #A89070;
  border-radius: 7px;
}

.hv21-spine i:nth-child(1) { top: 15%; }
.hv21-spine i:nth-child(2) { top: 50%; }
.hv21-spine i:nth-child(3) { top: 85%; }

/* the mounted photograph on the left leaf */
.hv21-photo {
  position: relative;
  width: 100%;
  padding: 8px;
  background: #F3EAD6;
  border-radius: 3px;
  box-shadow: 0 6px 14px rgba(42,33,24,.35);
}

.hv21-photo img {
  width: 100%;
  height: 158px;
  object-fit: cover;
  border-radius: 2px;
}

/* washi tape pinned over the photo corners */
.hv21-tape {
  position: absolute;
  width: 58px;
  height: 16px;
  z-index: 2;
  background:
    repeating-linear-gradient(90deg, rgba(251,245,234,.18) 0 5px, transparent 5px 10px),
    rgba(242,109,156,.6);
  clip-path: polygon(0 3px, 3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px));
  box-shadow: 0 2px 4px rgba(42,33,24,.3);
}

.hv21-tape.tp1 {
  top: -6px;
  left: -15px;
  transform: rotate(-38deg);
}

.hv21-tape.tp2 {
  bottom: 2px;
  right: -16px;
  transform: rotate(-38deg);
  background:
    repeating-linear-gradient(90deg, rgba(251,245,234,.18) 0 5px, transparent 5px 10px),
    rgba(92,184,214,.58);
}

.hv21-cap {
  display: block;
  margin-top: 7px;
  text-align: center;
  font-family: var(--fm);
  font-size: 8.5px;
  letter-spacing: .18em;
  color: var(--ink-3);
}

/* the right leaf, inked onto the cream paper */
.hv21-k {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: .24em;
  color: var(--rose);
}

.hv21-nm {
  font-family: var(--fh);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  overflow-wrap: break-word;
}

.hv21-ds {
  font-size: 12.5px;
  color: var(--ink-2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.hv21-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.hv21-meta em {
  font-style: normal;
  font-family: var(--fm);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(92,184,214,.42);
  border-radius: 3px;
  padding: 3px 10px;
}

.hx-stars {
  color: var(--rose);
  font-size: 12px;
  letter-spacing: 2px;
}

.hx-stars i { font-style: normal; }
.hx-stars i.off { opacity: .25; }

/* the inked button stamped on the page */
.hx-cta {
  margin-top: 6px;
  font-family: var(--fh);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--paper);
  background: var(--ink);
  border-radius: 4px;
  padding: 8px 20px;
  box-shadow: 0 5px 12px rgba(42,33,24,.4);
}

.hv21-photo:active,
.hv21-nm:active,
.hx-cta:active { transform: scale(.97); }

/* the loose glitter caught under the spread */
.hv21-trim {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  height: 16px;
}

.hv21-trim i {
  width: 8px;
  height: 8px;
  background: var(--glitter);
  clip-path: polygon(50% 0, 63% 35%, 100% 50%, 63% 65%, 50% 100%, 37% 65%, 0 50%, 37% 35%);
  animation: s123sparkle 2.2s ease-in-out infinite;
}

.hv21-trim i:nth-child(2) {
  width: 6px;
  height: 6px;
  background: var(--accent);
  animation-delay: .5s;
}

.hv21-trim i:nth-child(3) {
  width: 6px;
  height: 6px;
  background: var(--accent2);
  animation-delay: 1s;
}

@keyframes s123sparkle {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ═══ 7. divider — tape bits and a glitter star ═════════════════ */
.tk-div {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 0 12px;
}

.tk-div i {
  width: 42px;
  height: 8px;
  background: var(--tape-pk);
  clip-path: polygon(0 2px, 2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px));
}

.tk-div i:nth-child(1) { transform: rotate(-2deg); }

.tk-div i:nth-child(2) {
  width: 32px;
  background: var(--tape-bl);
  transform: rotate(1.6deg);
}

/* the four-point glitter star between the strips */
.tk-div i:nth-child(3) {
  width: 13px;
  height: 13px;
  background: var(--glitter);
  clip-path: polygon(50% 0, 63% 35%, 100% 50%, 63% 65%, 50% 100%, 37% 65%, 0 50%, 37% 35%);
}

.tk-div i:nth-child(4) {
  width: 32px;
  background: var(--tape-bl);
  transform: rotate(-1.6deg);
}

.tk-div i:nth-child(5) { transform: rotate(2deg); }

/* ═══ 8. sticker scatter — sheets on the table ══════════════════ */
.s123-scatter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 15px 12px;
  padding: 10px 6px 6px;
  background:
    radial-gradient(circle at 12px 12px, rgba(196,174,148,.14) 1.5px, transparent 2.5px);
  background-size: 24px 24px;
  border-radius: 6px;
}

/* each sticker sheet lands at its own angle */
.s123-stk {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: 0 6px 14px rgba(42,33,24,.42);
}

.s123-stk.tilt0 { transform: rotate(-2.2deg); }
.s123-stk.tilt1 { transform: rotate(1.6deg); }
.s123-stk.tilt2 { transform: rotate(-1.2deg); }
.s123-stk.tilt3 { transform: rotate(2.4deg); }
.s123-stk.tilt4 { transform: rotate(-2.8deg); }

/* the release paper with its cut line */
.s123-stk-cut {
  padding: 6px;
  border: 2px dashed rgba(196,174,148,.75);
  border-radius: 6px;
  background: #F6EFDD;
}

.s123-stk-cut img {
  width: 100%;
  height: 86px;
  object-fit: cover;
  border-radius: 4px;
}

.s123-stk-b b {
  display: block;
  font-family: var(--fh);
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s123-stk-b em {
  font-style: normal;
  font-family: var(--fm);
  font-size: 8.5px;
  letter-spacing: .12em;
  color: var(--ink-3);
}

.s123-stk:active { transform: scale(.96); }

/* ═══ 9. washi roll line — rolls on the dowel ═══════════════════ */
.s123-washi {
  position: relative;
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 26px 4px 12px;
  -webkit-overflow-scrolling: touch;
}

.s123-washi::-webkit-scrollbar { height: 4px; }
.s123-washi::-webkit-scrollbar-thumb { background: rgba(196,174,148,.4); border-radius: 2px; }
.s123-washi::-webkit-scrollbar-track { background: transparent; }

/* the wooden dowel the rolls ride on */
.s123-washi::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #6B5335, #4A3922);
  box-shadow: 0 2px 5px rgba(0,0,0,.35);
}

.s123-roll {
  flex: none;
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.s123-roll:nth-child(even) { margin-top: 13px; }

/* the roll body: a fat tape ring around the printed core */
.s123-roll-ring {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 8px solid var(--tape-pk);
  background: var(--panel);
  box-shadow:
    inset 0 0 10px rgba(0,0,0,.4),
    0 6px 12px rgba(0,0,0,.35);
}

.s123-roll.w1 .s123-roll-ring { border-color: var(--tape-bl); }
.s123-roll.w2 .s123-roll-ring { border-color: var(--tape-cm); }

/* the hook dropping from the dowel */
.s123-roll-ring::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  width: 4px;
  height: 13px;
  margin-left: -2px;
  border-radius: 2px;
  background: #8A7458;
}

.s123-roll-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.s123-roll-nm {
  font-family: var(--fh);
  font-size: 11px;
  color: var(--text);
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s123-roll-w {
  font-style: normal;
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: .1em;
  color: var(--accent2);
}

.s123-roll:active { transform: scale(.95); }

/* ═══ 10. corner-mount pockets — the flip pages ═════════════════ */
.s123-pockets {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 15px 12px;
  padding: 10px 8px 8px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(45deg, rgba(196,174,148,.06) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(196,174,148,.06) 0 2px, transparent 2px 9px);
}

.s123-pkt {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* the photo mat pressed into the pocket */
.s123-pkt-mat {
  position: relative;
  padding: 13px;
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 5px 12px rgba(42,33,24,.38);
}

.s123-pkt-mat img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border-radius: 2px;
}

/* the four corner mounts holding the print down */
.s123-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  background: linear-gradient(180deg, #FBF5EA, #E3D6BC);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  box-shadow: 0 1px 2px rgba(42,33,24,.25);
}

.s123-corner.c1 { top: 4px; left: 4px; }
.s123-corner.c2 { top: 4px; right: 4px; transform: scaleX(-1); }
.s123-corner.c3 { bottom: 4px; left: 4px; transform: scaleY(-1); }
.s123-corner.c4 { bottom: 4px; right: 4px; transform: scale(-1); }

.s123-pkt-b b {
  display: block;
  font-family: var(--fh);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s123-pkt-b em {
  font-style: normal;
  font-family: var(--fm);
  font-size: 8.5px;
  letter-spacing: .12em;
  color: var(--accent2);
}

.s123-pkt:active { transform: scale(.96); }

/* ═══ 11. paper swatch stacks — three chapters ══════════════════ */
.s123-swatch {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 8px 6px 8px;
}

.s123-sw {
  min-width: 0;
  position: relative;
  display: block;
}

/* the sheets tucked under each other */
.s123-sw::before,
.s123-sw::after {
  content: '';
  position: absolute;
  border-radius: 5px;
  z-index: 0;
}

.s123-sw::before {
  top: 7px;
  left: 11px;
  right: -5px;
  bottom: -7px;
  transform: rotate(1.4deg);
  background:
    repeating-linear-gradient(0deg, rgba(196,174,148,.25) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(90deg, rgba(196,174,148,.25) 0 1px, transparent 1px 14px),
    var(--paper-3);
}

.s123-sw::after {
  top: 3px;
  left: 5px;
  right: -2px;
  bottom: -3px;
  transform: rotate(-.9deg);
  background:
    repeating-linear-gradient(0deg, rgba(196,174,148,.3) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(90deg, rgba(196,174,148,.3) 0 1px, transparent 1px 14px),
    var(--paper-2);
}

.s123-sw.ch0 { transform: rotate(-.9deg); }
.s123-sw.ch1 { transform: rotate(.4deg); }
.s123-sw.ch2 { transform: rotate(-.5deg); }

/* the top sheet of the stack */
.s123-sw-sheet {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 5px;
  background:
    repeating-linear-gradient(0deg, rgba(196,174,148,.18) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(90deg, rgba(196,174,148,.18) 0 1px, transparent 1px 16px),
    var(--paper);
  box-shadow: 0 8px 16px rgba(42,33,24,.35);
}

.s123-sw-art { flex: none; }

.s123-sw-art img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(196,174,148,.55);
}

.s123-sw-b {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.s123-sw-b b {
  font-family: var(--fh);
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s123-sw-b em {
  font-style: normal;
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--ink-3);
}

/* the chapter stamp on the sheet edge */
.s123-sw-sheet::after {
  content: '';
  position: absolute;
  top: -6px;
  right: 14px;
  width: 34px;
  height: 12px;
  background: var(--tape-bl);
  transform: rotate(2deg);
  clip-path: polygon(0 2px, 2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px));
}

.s123-sw:active { transform: scale(.97); }

/* ═══ 12. glitter jars — the sparkle shelf ══════════════════════ */
.s123-jars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 10px;
  padding: 12px 4px 8px;
}

.s123-jar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* the ribbed lid screwed on tight */
.s123-jar-lid {
  position: relative;
  z-index: 2;
  width: 58px;
  height: 12px;
  border-radius: 4px 4px 2px 2px;
  background:
    repeating-linear-gradient(90deg, rgba(42,33,24,.28) 0 3px, transparent 3px 7px),
    linear-gradient(180deg, #C4AE94, #8A7458);
  box-shadow: 0 2px 4px rgba(0,0,0,.32);
}

/* the glass body full of sparkle */
.s123-jar-glass {
  position: relative;
  width: 66px;
  height: 84px;
  margin-top: -3px;
  border: 2px solid rgba(251,245,234,.34);
  border-top: none;
  border-radius: 4px 4px 10px 10px;
  background: rgba(251,245,234,.06);
  overflow: hidden;
}

.s123-jar-glass img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* the glitter settled at the bottom */
.s123-jar-glitz {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 84%, var(--glitter) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 42% 92%, var(--accent) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 66% 86%, var(--accent2) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 85% 93%, var(--glitter) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 30% 96%, rgba(251,245,234,.9) 0 1px, transparent 2px),
    radial-gradient(circle at 55% 98%, var(--glitter) 0 1px, transparent 2px);
  animation: s123sparkle 2.4s ease-in-out infinite;
}

/* the glass sheen down one side */
.s123-jar-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    rgba(251,245,234,.16) 0 12%,
    transparent 12% 55%,
    rgba(251,245,234,.07) 55% 62%,
    transparent 62%);
  pointer-events: none;
}

.s123-jar-nm {
  font-family: var(--fh);
  font-size: 11px;
  color: var(--text);
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s123-jar:active { transform: scale(.94); }

/* ═══ 13. the tag line — tags on the twine ══════════════════════ */
.s123-tags {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 32px 8px 6px;
}

/* the twine strung above the tags */
.s123-tags::before {
  content: '';
  position: absolute;
  top: 13px;
  left: 4px;
  right: 4px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(196,174,148,.6) 0 6px, transparent 6px 10px);
}

.s123-tag {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-right: 28px;
  background: var(--paper);
  border-radius: 3px;
  box-shadow: 0 5px 12px rgba(42,33,24,.35);
  transform: rotate(-.7deg);
}

.s123-tag.flip {
  margin-right: 0;
  margin-left: 28px;
  transform: rotate(.8deg);
}

/* the short string tying the tag to the twine */
.s123-tag::before {
  content: '';
  position: absolute;
  top: -21px;
  left: 26px;
  width: 2px;
  height: 22px;
  background: rgba(196,174,148,.55);
  transform: rotate(7deg);
}

/* the punched hole in the tag */
.s123-tag-hole {
  position: absolute;
  top: 7px;
  left: 12px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid #C4AE94;
  background: var(--panel);
}

.s123-tag img {
  flex: none;
  margin-left: 10px;
  width: 46px;
  height: 46px;
  border-radius: 4px;
  object-fit: cover;
}

.s123-tag-b {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.s123-tag-b b {
  font-family: var(--fh);
  font-size: 13.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s123-tag-b em {
  font-style: normal;
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--rose);
}

.s123-tag:active { transform: scale(.97); }

/* ═══ 14. lift-the-flap rows — the doodle margin ════════════════ */
.s123-flaps {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.s123-flap {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid rgba(242,109,156,.16);
  border-radius: 8px;
}

/* the little page pasted into the margin */
.s123-flap-page {
  position: relative;
  flex: none;
  width: 64px;
  height: 64px;
  padding: 5px;
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(42,33,24,.35);
}

.s123-flap-page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

/* the shadow under the lifted corner */
.s123-flap-page::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 21px 21px;
  border-color: transparent transparent rgba(42,33,24,.5) transparent;
}

/* the flipped-up paper corner */
.s123-flap-fold {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  background: linear-gradient(315deg, #F6EFDD 46%, #D8CBB0 54%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  box-shadow: -2px -2px 4px rgba(42,33,24,.28);
  transition: transform .18s ease;
}

.s123-flap:active .s123-flap-fold {
  transform: scale(1.25) rotate(-4deg);
}

.s123-flap-b {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.s123-flap-b b {
  font-family: var(--fh);
  font-size: 13.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s123-flap-b span {
  font-size: 11px;
  color: var(--soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s123-flap-arrow {
  flex: none;
  font-size: 13px;
  color: var(--accent);
}

.s123-flap:active { transform: scale(.98); }

/* ═══ 15. tab index — the color dividers ════════════════════════ */
.s123-index {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 13px 10px;
}

.s123-tab {
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px 10px 9px;
  background:
    linear-gradient(90deg, rgba(251,245,234,.1), transparent 45%),
    var(--panel-2);
  border: 1px solid rgba(196,174,148,.22);
  border-radius: 4px 12px 12px 4px;
}

/* the color chip standing out of the book edge */
.s123-tab-chip {
  flex: none;
  width: 9px;
  align-self: stretch;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(42,33,24,.28);
}

.s123-tab.ix0 .s123-tab-chip { background: var(--accent); }
.s123-tab.ix1 .s123-tab-chip { background: var(--accent2); }
.s123-tab.ix2 .s123-tab-chip { background: var(--glitter); }
.s123-tab.ix3 .s123-tab-chip { background: var(--leaf); }

.s123-tab-b {
  flex: 1;
  min-width: 0;
}

.s123-tab-b b {
  display: block;
  font-family: var(--fh);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s123-tab-b i {
  font-style: normal;
  font-family: var(--fm);
  font-size: 9px;
  color: var(--soft);
}

.s123-tab-arrow {
  flex: none;
  font-size: 13px;
  color: var(--accent);
}

.s123-tab:active { transform: scale(.96); }

/* ═══ 16. bindery archive — the bound page ledger ═══════════════ */
.s123-bindery {
  position: relative;
  padding: 15px 12px 12px 32px;
  background: var(--panel);
  border: 1.5px solid rgba(196,174,148,.22);
  border-radius: 8px;
  overflow: hidden;
}

/* the spiral binding down the left edge */
.s123-bindery::before {
  content: '';
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 8px;
  width: 10px;
  background: radial-gradient(circle at 5px 6px, transparent 0 2px, #B49B78 2px 3.5px, transparent 3.5px 6px);
  background-size: 10px 24px;
  background-repeat: repeat-y;
}

/* the inner stitch line beside the spiral */
.s123-bindery::after {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 27px;
  border-left: 2px dashed rgba(196,174,148,.32);
}

.arc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* each entry is a numbered slip pasted in the ledger */
.arc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: linear-gradient(180deg, #FBF5EA, #F1E7D2);
  border-radius: 4px;
  box-shadow: 0 3px 8px rgba(42,33,24,.3);
}

/* the page number inked on the slip */
.s123-pgno {
  flex: none;
  font-family: var(--fm);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--paper);
  background: #4A3922;
  border-radius: 3px;
  padding: 3px 6px;
}

.arc img {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 5px;
  object-fit: cover;
  border: 1.5px solid #E4D8BF;
}

.arc-b {
  flex: 1;
  min-width: 0;
}

.arc-nm {
  display: block;
  font-family: var(--fh);
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arc-ds {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arc-arrow {
  flex: none;
  font-size: 13px;
  color: var(--rose);
}

.arc:active { transform: scale(.98); }

/* ═══ 17. filter view + empty ════════════════════════════════════ */
.filter-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.filter-back {
  flex: none;
  font-family: var(--fh);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  background: var(--panel);
  border: 1.5px dashed rgba(196,174,148,.5);
  border-radius: 6px;
  padding: 7px 12px;
}

.filter-title {
  flex: 1;
  min-width: 0;
  font-family: var(--fh);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-cnt {
  flex: none;
  font-family: var(--fm);
  font-size: 11.5px;
  color: var(--bg);
  background: var(--accent);
  border-radius: 4px;
  padding: 3px 8px;
}

.empty-space {
  text-align: center;
  padding: 40px 0 24px;
}

/* the blank page waiting for glue */
.empty-space p {
  font-size: 30px;
  line-height: 1;
  color: var(--soft);
}

.empty-space span {
  display: block;
  margin-top: 10px;
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--soft);
}

/* ═══ 18. more ═══════════════════════════════════════════════════ */
.more-wrap {
  text-align: center;
  margin-top: 15px;
}

.more-btn {
  font-family: var(--fh);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--panel);
  border: 1.5px dashed rgba(242,109,156,.45);
  border-radius: 6px;
  padding: 10px 22px;
}

.more-btn:active { transform: scale(.97); }

/* ═══ 19. footer — the stitched hem ══════════════════════════════ */
.foot {
  position: relative;
  margin-top: 44px;
  padding: 26px 0 30px;
  text-align: center;
  background: linear-gradient(180deg, #382C1F, #2A2118);
}

/* the twin rows of machine stitching across the hem */
.s123-stitch {
  position: relative;
  height: 16px;
  margin-bottom: 14px;
}

.s123-stitch i {
  position: absolute;
  left: 14px;
  right: 14px;
  border-top: 2px dashed var(--stitch);
}

.s123-stitch i:nth-child(1) { top: 3px; }

.s123-stitch i:nth-child(2) {
  top: 10px;
  border-top-color: rgba(242,109,156,.3);
}

.foot-name {
  font-family: var(--fh);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--text);
}

.foot-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 12px;
}

.foot-links a {
  display: inline;
  font-size: 12.5px;
  color: var(--soft);
  text-decoration: underline;
}

.foot-fine {
  margin-top: 12px;
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--soft);
  opacity: .75;
}

/* ═══ 20. back-to-top — the star brad ═══════════════════════════ */
.totop-btn {
  position: fixed;
  right: 16px;
  bottom: 24px;
  z-index: 60;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fh);
  font-size: 17px;
  font-weight: 700;
  color: var(--bg);
  background: radial-gradient(circle at 40% 30%, #FBD3E1, var(--accent));
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0,0,0,.45);
}

/* ═══ 21. responsive ═════════════════════════════════════════════ */
@media (max-width: 480px) {
  .sec { padding: 15px 12px 16px; }

  .s123-rings { gap: 16px; height: 50px; }

  .s123-rings i { border-width: 4px; }

  .s123-rings i:nth-child(2) { width: 28px; height: 40px; }

  .hv21-spread { flex-direction: column; }

  .hv21-left {
    flex: none;
    padding: 14px 14px 8px;
  }

  .hv21-photo img { height: 150px; }

  .hv21-spine {
    width: auto;
    height: 20px;
    background: linear-gradient(180deg,
      rgba(42,33,24,.14),
      rgba(42,33,24,.04) 40%,
      rgba(42,33,24,.04) 60%,
      rgba(42,33,24,.14));
  }

  .hv21-spine::before {
    top: 50%;
    bottom: auto;
    left: 10px;
    right: 10px;
    border-left: none;
    border-top: 2px dashed rgba(196,174,148,.75);
  }

  .hv21-spine i {
    top: 50%;
    width: 7px;
    height: 13px;
    margin-top: -6.5px;
    margin-left: 0;
  }

  .hv21-spine i:nth-child(1) { left: 16%; }
  .hv21-spine i:nth-child(2) { left: 50%; margin-left: -3.5px; }
  .hv21-spine i:nth-child(3) { left: auto; right: 16%; }

  .hv21-right {
    padding: 10px 14px 16px;
    align-items: flex-start;
  }

  .hv21-nm { font-size: 18px; }

  .s123-scatter { gap: 13px 10px; padding: 8px 4px 4px; }

  .s123-stk-cut img { height: 74px; }

  .s123-roll { width: 82px; }

  .s123-roll-ring {
    width: 76px;
    height: 76px;
    border-width: 7px;
  }

  .s123-pockets { gap: 13px 10px; padding: 8px 6px 6px; }

  .s123-pkt-mat { padding: 11px; }

  .s123-pkt-mat img { height: 80px; }

  .s123-corner { width: 19px; height: 19px; }

  .s123-sw-sheet { padding: 10px; gap: 10px; }

  .s123-sw-art img {
    width: 72px;
    height: 72px;
  }

  .s123-jars { gap: 12px 8px; }

  .s123-jar-glass {
    width: 60px;
    height: 78px;
  }

  .s123-jar-lid { width: 52px; }

  .s123-tag { margin-right: 14px; }

  .s123-tag.flip { margin-left: 14px; }

  .s123-tag img {
    margin-left: 8px;
    width: 42px;
    height: 42px;
  }

  .s123-bindery { padding: 13px 10px 10px 30px; }
}

@media (max-width: 375px) {
  .wrap { padding: 0 14px; }

  .hdr-name { font-size: 16px; }

  .s123-sub { letter-spacing: .14em; }

  .s123-rings { gap: 12px; }

  .s123-rings i:nth-child(1),
  .s123-rings i:nth-child(5) { display: none; }

  .s123-scatter,
  .s123-pockets,
  .s123-index { gap: 11px 9px; }

  .s123-stk-cut img { height: 68px; }

  .s123-pkt-mat img { height: 72px; }

  .s123-tag,
  .s123-tag.flip {
    margin-left: 0;
    margin-right: 0;
  }

  .s123-flap { gap: 8px; padding: 9px 10px; }

  .s123-flap-page {
    width: 56px;
    height: 56px;
  }

  .s123-jars { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .s123-jar-glass {
    width: 54px;
    height: 70px;
  }

  .s123-jar-lid { width: 46px; }

  .arc { gap: 8px; }

  .arc img {
    width: 38px;
    height: 38px;
  }

  .s123-bindery { padding: 12px 8px 10px 28px; }
}
