/* Components shared across pages. */
.nm-icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons: fully rounded pills */
.nm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .85em 1.6em; border: 1.5px solid transparent; border-radius: var(--r-pill);
  font: 600 1rem/1.1 var(--font-ui); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
}
.nm-btn:hover { transform: translateY(-1px); text-decoration: none; }
.nm-btn:active { transform: translateY(0); }
.nm-btn--primary { background: var(--apricot); color: var(--night); box-shadow: 0 8px 20px -10px rgba(229, 139, 28, .9); }
.nm-btn--primary:hover { background: var(--apricot-deep); color: var(--night); }
.nm-btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.nm-btn--ghost:hover { background: rgba(127, 127, 160, .1); }
.nm-btn--light { background: var(--paper); color: var(--night); }
.nm-btn--night { background: var(--night); color: var(--paper); }
.nm-btn--night:hover { background: var(--night-2); color: var(--paper); }
.nm-btn--lg { min-height: 58px; padding-inline: 2em; font-size: 1.08rem; }
.nm-btn--sm { min-height: 44px; padding: .6em 1.2em; font-size: .95rem; }
.nm-btn--block { width: 100%; }
.nm-btn[disabled], .nm-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.nm-btn[aria-busy="true"] { cursor: progress; }
.nm-link { font-weight: 600; color: inherit; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .25em; background: none; border: 0; padding: 0; cursor: pointer; }

/* Fields */
.nm-field { display: grid; gap: .45rem; }
.nm-field > label, .nm-label { font-weight: 600; font-size: .98rem; }
.nm-input, .nm-textarea {
  width: 100%; min-height: 56px; padding: .8rem 1.25rem; border: 1.5px solid var(--line); border-radius: var(--r-pill);
  background: #fff; color: var(--ink); font-size: 1.06rem; transition: border-color .15s, box-shadow .15s;
}
.nm-textarea { border-radius: var(--r-panel); min-height: 120px; resize: vertical; line-height: 1.5; }
.nm-input:focus, .nm-textarea:focus { outline: none; border-color: var(--zellige); box-shadow: 0 0 0 4px var(--zellige-soft); }
.nm-input--name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.4rem; letter-spacing: -.01em; }
.nm-input::placeholder, .nm-textarea::placeholder { color: #9A9DB3; }
.nm-input[aria-invalid="true"] { border-color: var(--danger); }
.nm-error { color: var(--danger); font-size: .9rem; font-weight: 600; min-height: 1.3em; margin: 0; }
.nm-section--night .nm-error, .nm-on-night .nm-error { color: #FFB4A9; }
.nm-hint { font-size: .9rem; color: var(--ink-soft); margin: 0; }
.nm-inline-form { display: flex; gap: 10px; align-items: stretch; }
.nm-inline-form .nm-input { flex: 1; min-width: 0; }
@media (max-width: 520px) { .nm-inline-form { flex-direction: column; } }

/* Girl / boy choice */
.nm-choice { display: inline-flex; gap: 8px; padding: 5px; border-radius: var(--r-pill); background: rgba(127, 127, 160, .12); }
.nm-choice input { position: absolute; opacity: 0; pointer-events: none; }
.nm-choice label { display: inline-flex; align-items: center; gap: .5em; padding: .35rem 1rem .35rem .35rem; border-radius: var(--r-pill); font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s; }
.nm-choice img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: 50% 8%; background: var(--sable); }
.nm-choice input:checked + label { background: var(--paper); color: var(--night); box-shadow: var(--shadow-soft); }
.nm-choice input:focus-visible + label { outline: 3px solid var(--zellige); outline-offset: 2px; }

/* Chips, badges, stars */
.nm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
:where(ul).nm-chips { list-style: none; margin: 0; padding: 0; }
.nm-chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.nm-chips--scroll::-webkit-scrollbar { display: none; }
.nm-chip { display: inline-flex; align-items: center; gap: .4em; padding: .55em 1.05em; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--paper); color: var(--ink); font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s, border-color .15s; }
.nm-chip:hover { border-color: var(--ink); text-decoration: none; }
.nm-chip.is-active, .nm-chip[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: var(--paper); }
.nm-badge { display: inline-flex; align-items: center; gap: .35em; padding: .22em .6em; border-radius: 6px; background: var(--menthe); color: var(--menthe-deep); font-size: .8rem; font-weight: 700; line-height: 1.4; }
.nm-badge--gold { background: #FCEBC8; color: #7A4E0E; }
.nm-stars { --pct: 100%; display: inline-block; width: 6em; height: 1.15em; vertical-align: -.15em; background: linear-gradient(90deg, var(--gold-2) var(--pct), rgba(127, 127, 160, .3) var(--pct)); -webkit-mask: url('../img/stars.svg') 0 0 / 100% 100% no-repeat; mask: url('../img/stars.svg') 0 0 / 100% 100% no-repeat; }
.nm-rating { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; }

/* Trust row */
.nm-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; font-size: .95rem; font-weight: 600; }
.nm-trust li { display: inline-flex; align-items: center; gap: .5em; }
.nm-trust .nm-icon { color: var(--apricot); width: 1.25em; height: 1.25em; }

/* 3D book — square 24 × 24 cm hardcover. Sizes come from the container width (cqi). */
.nm-book3d { --tilt: -24deg; --tilt-x: 3deg; position: relative; width: 100%; max-width: 440px; aspect-ratio: 1; container-type: inline-size; perspective: 1800px; }
.nm-book3d::after { content: ""; position: absolute; left: 8%; right: -4%; bottom: -7%; height: 12%; background: radial-gradient(closest-side, rgba(17, 24, 57, .45), transparent); filter: blur(6px); z-index: -1; transform: skewX(-12deg); }
.nm-book3d__body { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(var(--tilt)) rotateX(var(--tilt-x)); transition: transform .9s var(--ease); }
.nm-book3d:hover .nm-book3d__body { transform: rotateY(calc(var(--tilt) + 8deg)) rotateX(var(--tilt-x)); }
.nm-book3d__face { position: absolute; top: 0; bottom: 0; }
.nm-book3d__cover { inset: 0; border-radius: 1.2cqi 2cqi 2cqi 1.2cqi; overflow: hidden; background: var(--night); transform: translateZ(2.6cqi); box-shadow: var(--shadow-book); }
.nm-book3d__back { inset: 0; border-radius: 1.2cqi; background: var(--night-3); transform: translateZ(-2.6cqi); }
.nm-book3d__pages { left: calc(50% - 2.4cqi); width: 4.8cqi; top: 1.2cqi; bottom: 1.2cqi; transform: rotateY(90deg) translateZ(48.6cqi); background: repeating-linear-gradient(90deg, #FFFDF6 0 .45cqi, #E8DCC6 .45cqi .6cqi); box-shadow: inset 0 0 1cqi rgba(80, 60, 30, .35); }
.nm-book3d__spine { left: calc(50% - 2.6cqi); width: 5.2cqi; transform: rotateY(-90deg) translateZ(50cqi); background: linear-gradient(90deg, var(--night-3), var(--night-2), var(--night-3)); border-radius: 1cqi; }
.nm-book3d__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.nm-book3d__art[data-for="boy"] { display: none; }
.nm-book3d[data-character="boy"] .nm-book3d__art[data-for="boy"] { display: block; }
.nm-book3d[data-character="boy"] .nm-book3d__art[data-for="girl"]:not(:only-of-type) { display: none; }
.nm-book3d__cover::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(17, 24, 57, .78) 0%, rgba(17, 24, 57, .35) 34%, rgba(17, 24, 57, 0) 56%); }
.nm-book3d__cover::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .38) 0, rgba(255, 255, 255, .22) 1.6%, rgba(0, 0, 0, .14) 3.4%, transparent 7%), linear-gradient(118deg, rgba(255, 255, 255, .2) 0%, rgba(255, 255, 255, 0) 38%); }
.nm-book3d__title { position: absolute; z-index: 2; inset: 7cqi 8cqi auto 10cqi; text-align: center; color: var(--paper); font-family: var(--font-display); font-weight: var(--display-weight); }
.nm-book3d__name { display: block; font-size: min(17cqi, calc(150cqi / var(--len, 5))); line-height: 1.05; letter-spacing: -.01em; padding-bottom: .06em; filter: drop-shadow(0 .4cqi .6cqi rgba(0, 0, 0, .35)); }
.nm-book3d__rest { display: block; margin-top: 1.4cqi; font-size: 6.4cqi; line-height: 1.18; text-shadow: 0 .3cqi 1cqi rgba(0, 0, 0, .45); }
.nm-book3d__brand { position: absolute; z-index: 2; left: 10cqi; bottom: 5cqi; font-family: var(--font-logo); font-size: 4.2cqi; color: rgba(255, 253, 249, .9); text-shadow: 0 .3cqi 1cqi rgba(0, 0, 0, .5); }
.nm-book3d--flat { --tilt: 0deg; --tilt-x: 0deg; }
.nm-book3d--flat:hover .nm-book3d__body { transform: none; }
.nm-book3d__sparks { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.nm-book3d__sparks i { position: absolute; width: 5cqi; height: 5cqi; opacity: 0; background: var(--gold-1); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.nm-book3d__sparks i:nth-child(1) { top: 9cqi; left: 14cqi; }
.nm-book3d__sparks i:nth-child(2) { top: 6cqi; right: 16cqi; width: 3.5cqi; height: 3.5cqi; }
.nm-book3d__sparks i:nth-child(3) { top: 22cqi; right: 10cqi; }
.nm-book3d__sparks i:nth-child(4) { top: 25cqi; left: 9cqi; width: 3cqi; height: 3cqi; }
.nm-book3d__sparks i:nth-child(5) { top: 4cqi; left: 47cqi; width: 2.8cqi; height: 2.8cqi; }
.nm-book3d.is-stamped .nm-book3d__name { animation: nm-stamp 1.2s var(--ease) both; }
.nm-book3d.is-stamped .nm-book3d__sparks i { animation: nm-spark 1.1s var(--ease) both; }
.nm-book3d.is-stamped .nm-book3d__sparks i:nth-child(2) { animation-delay: .12s; }
.nm-book3d.is-stamped .nm-book3d__sparks i:nth-child(3) { animation-delay: .22s; }
.nm-book3d.is-stamped .nm-book3d__sparks i:nth-child(4) { animation-delay: .3s; }
.nm-book3d.is-stamped .nm-book3d__sparks i:nth-child(5) { animation-delay: .4s; }
@keyframes nm-stamp {
  0% { opacity: 0; transform: scale(1.18); filter: blur(3px) brightness(1.8); background-position: 100% 0; }
  45% { opacity: 1; transform: scale(1); filter: blur(0) brightness(1.15); }
  100% { background-position: 0 0; filter: drop-shadow(0 .4cqi .6cqi rgba(0, 0, 0, .35)); }
}
@keyframes nm-spark { 0% { opacity: 0; transform: scale(.2) rotate(0); } 40% { opacity: 1; transform: scale(1.1) rotate(45deg); } 100% { opacity: 0; transform: scale(.4) rotate(90deg); } }

/* Polaroid photo with washi tape */
.nm-polaroid { --rot: -2deg; position: relative; background: #fff; padding: 9px 9px 40px; border-radius: var(--r-photo); box-shadow: var(--shadow-photo); transform: rotate(var(--rot)); }
.nm-polaroid::before { content: ""; position: absolute; top: -11px; left: 50%; width: 76px; height: 24px; transform: translateX(-50%) rotate(-3deg); background: rgba(245, 162, 58, .55); mix-blend-mode: multiply; }
.nm-polaroid__img { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--sable); }
.nm-polaroid__img img { width: 100%; height: 100%; object-fit: cover; }
.nm-polaroid__caption { position: absolute; left: 0; right: 0; bottom: 9px; text-align: center; font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.nm-photo-slot { display: grid; place-items: center; align-content: center; gap: 6px; width: 100%; height: 100%; color: var(--ink-soft); font-weight: 600; font-size: .85rem; text-align: center; background: radial-gradient(circle at 50% 42%, transparent 23%, rgba(0, 0, 0, 0) 23%), var(--sable); }
.nm-photo-slot svg.nm-face { width: 56%; height: auto; color: rgba(84, 90, 122, .55); }

/* Accordion (native details) */
.nm-accordion { border-bottom: 1px solid var(--line); }
.nm-accordion summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 1.15rem 0; cursor: pointer; font-weight: 600; font-size: 1.05rem; }
.nm-accordion summary::-webkit-details-marker { display: none; }
.nm-accordion summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--menthe) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23232847' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 7v10M7 12h10'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform .25s var(--ease); }
.nm-accordion[open] summary::after { transform: rotate(45deg); }
.nm-accordion__body { padding: 0 0 1.25rem; color: var(--ink-soft); }
.nm-accordion__body p:last-child { margin-bottom: 0; }
.nm-section--night .nm-accordion { border-color: var(--line-night); }
.nm-section--night .nm-accordion__body { color: rgba(255, 253, 249, .78); }

/* Panels and cards */
.nm-panel { background: #fff; border-radius: var(--r-panel); box-shadow: var(--shadow-soft); padding: clamp(20px, 3vw, 32px); }
.nm-grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.nm-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nm-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nm-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .nm-grid--3, .nm-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .nm-grid--2, .nm-grid--3 { grid-template-columns: 1fr; } }

/* Book card (shelf, shop, related) */
.nm-card-book { position: relative; display: flex; flex-direction: column; gap: 14px; color: var(--ink); text-decoration: none; }
.nm-card-book__stage { position: relative; display: grid; place-items: center; padding: 14% 16% 12% 12%; border-radius: var(--r-panel); background: var(--sable); overflow: hidden; transition: background-color .3s var(--ease); }
.nm-card-book__stage .nm-book3d { --tilt: -16deg; }
.nm-card-book:hover .nm-card-book__stage { background: var(--sable-deep); }
.nm-card-book:hover .nm-book3d__body { transform: rotateY(-6deg) rotateX(var(--tilt-x)); }
.nm-card-book__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.nm-card-book__title { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.28rem; line-height: 1.2; margin: 0; }
.nm-card-book__title a { color: inherit; text-decoration: none; }
.nm-card-book__title a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.nm-card-book__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .95rem; color: var(--ink-soft); }
.nm-card-book__price { font-weight: 700; color: var(--ink); white-space: nowrap; }
.nm-card-book__sub { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.nm-card-book .nm-btn { position: relative; z-index: 4; align-self: flex-start; }

/* Notices */
.nm-notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r-card); background: var(--zellige-soft); color: var(--night); }
.nm-notice--warn { background: #FCEBC8; color: #6B430A; }
.nm-notice--error { background: #FBE1DE; color: #7C1D16; }

/* Flipbook — one panoramic illustration across both square pages, with live text over it. */
.nm-flipbook { display: grid; gap: 14px; }
.nm-flipbook__book { position: relative; display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 2 / 1; border-radius: 7px; overflow: hidden; background: #FFFEFA; box-shadow: var(--shadow-book); isolation: isolate; }
.nm-flipbook__book::after { content: ""; position: absolute; inset: 0 auto 0 calc(50% - 12px); width: 24px; pointer-events: none; z-index: 3; background: linear-gradient(90deg, transparent, rgba(40, 30, 20, .08) 43%, rgba(40, 30, 20, .2) 50%, rgba(255, 255, 255, .09) 55%, transparent); }
.nm-flipbook__page { position: relative; min-width: 0; }
.nm-flipbook__page--left { position: absolute; inset: 0; background: var(--sable); }
.nm-flipbook__page--right { grid-column: 1; align-self: end; z-index: 2; padding: 10% 12% 11%; }
.nm-flipbook[data-text-position="right"] .nm-flipbook__page--right { grid-column: 2; }
.nm-flipbook__art { width: 100%; height: 100%; object-fit: cover; display: block; }
.nm-flipbook__label { position: absolute; left: 10px; top: 10px; max-width: calc(100% - 20px); padding: .2rem .55rem; border-radius: var(--r-pill); background: rgba(17, 24, 57, .68); color: var(--paper); font-size: .65rem; font-weight: 600; }
.nm-flipbook__text { padding: 0; border: 0; border-radius: 0; background: none; color: #172A3B; box-shadow: none; text-shadow: 0 1px 2px rgba(255, 248, 237, .3); }
.nm-flipbook__text h3 { font-size: clamp(.85rem, .7rem + .8vw, 1.3rem); color: var(--night); margin-bottom: .55em; }
.nm-flipbook[data-kind="story"] .nm-flipbook__text h3 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nm-flipbook__text p { font-family: var(--font-display); font-size: clamp(.77rem, .65rem + .45vw, 1.03rem); line-height: 1.55; color: inherit; margin: 0; text-wrap: pretty; }
.nm-flipbook[data-theme="dark"] .nm-flipbook__text { color: #FFF5DD; text-shadow: 0 1px 3px rgba(18, 29, 59, .45); }
.nm-flipbook[data-theme="dark"] .nm-flipbook__text h3 { color: #FFF5DD; }
.nm-flipbook .nm-gold-ink { color: inherit; background: none; padding: 0; }
.nm-flipbook[data-kind="cover"] .nm-flipbook__page--left { background: var(--paper); }
.nm-flipbook[data-kind="cover"] .nm-flipbook__art { object-fit: contain; object-position: left center; width: 50%; }
.nm-flipbook[data-kind="cover"] .nm-flipbook__page--right { grid-column: 2; align-self: center; }
.nm-flipbook[data-kind="dedication"] .nm-flipbook__art { opacity: .18; }
.nm-flipbook[data-kind="dedication"] .nm-flipbook__page--right { grid-column: 1 / -1; align-self: center; max-width: 75%; margin: auto; padding: 6%; }
.nm-flipbook[data-kind="dedication"] .nm-flipbook__text { background: transparent; box-shadow: none; }
.nm-flipbook__folio { font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--ink-soft); min-width: 3.8em; text-align: center; }
.nm-flipbook__controls { display: flex; align-items: center; justify-content: center; gap: 12px; }
.nm-flipbook__btn { border: 1.5px solid var(--line); background: var(--paper); }
.nm-flipbook__btn:disabled { opacity: .35; cursor: default; }
.nm-flipbook__dots { display: flex; gap: 5px; }
.nm-flipbook__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--sable-deep); transition: background-color .2s, width .2s; }
.nm-flipbook__dots i.is-on { width: 18px; border-radius: 4px; background: var(--night); }
.nm-flipbook__reading { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.nm-flipbook__reading button { font: inherit; font-size: .76rem; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--paper); color: var(--ink); cursor: pointer; }
.nm-flipbook__reading button[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: var(--paper); }
.nm-flipbook__book.is-turning-next { animation: nm-spread-next .45s var(--ease); }
.nm-flipbook__book.is-turning-prev { animation: nm-spread-prev .45s var(--ease); }
@keyframes nm-spread-next { from { opacity: .25; transform: perspective(1800px) rotateY(-4deg) translateX(5px); } to { opacity: 1; transform: none; } }
@keyframes nm-spread-prev { from { opacity: .25; transform: perspective(1800px) rotateY(4deg) translateX(-5px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .nm-flipbook__book { display: block; aspect-ratio: auto; }
  .nm-flipbook__book::after { top: 0; bottom: auto; height: 0; padding-bottom: 50%; }
  .nm-flipbook__page--left { position: relative; aspect-ratio: 2 / 1; }
  .nm-flipbook__page--right, .nm-flipbook[data-kind="cover"] .nm-flipbook__page--right, .nm-flipbook[data-kind="dedication"] .nm-flipbook__page--right { max-width: none; padding: 18px 20px 22px; background: var(--paper); }
  .nm-flipbook__text, .nm-flipbook[data-theme="dark"] .nm-flipbook__text { color: #172A3B; text-shadow: none; }
  .nm-flipbook[data-theme="dark"] .nm-flipbook__text h3 { color: var(--night); }
  .nm-flipbook[data-theme="dark"] .nm-gold-ink { color: inherit; }
  .nm-flipbook__text p { font-size: .98rem; line-height: 1.65; }
  .nm-flipbook__dots { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nm-flipbook__book.is-turning-next, .nm-flipbook__book.is-turning-prev { animation: none; }
}

/* Shared by home and product pages: name highlight, portraits, flip polaroids, name tags, review cards. */
.nm-gold-ink { color: #8A560E; background: linear-gradient(transparent 60%, rgba(245, 162, 58, .38) 60%); padding: 0 .08em; font-weight: inherit; }
.nm-portrait { width: 118px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: linear-gradient(180deg, #FCEBC8, #F4E7D4); border: 4px solid var(--gold-2); box-shadow: var(--shadow-photo); }
.nm-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transform: scale(1.75); transform-origin: 50% 2%; }
.nm-flip { flex: 1; max-width: 160px; aspect-ratio: .8; padding: 0; border: 0; background: none; cursor: pointer; perspective: 900px; transform: rotate(var(--rot)); border-radius: 4px; }
.nm-flip__inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .75s var(--ease); }
.nm-flip[aria-pressed="true"] .nm-flip__inner { transform: rotateY(180deg); }
.nm-flip__face { position: absolute; inset: 0; display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; transform: none; }
.nm-flip .nm-polaroid { --rot: 0deg; padding-bottom: 34px; }
.nm-flip .nm-polaroid::before { width: 52px; height: 18px; top: -8px; }
.nm-flip__back { transform: rotateY(180deg); }
.nm-flip .nm-polaroid__img { height: 100%; aspect-ratio: auto; }
.nm-flip .nm-photo-slot { height: 100%; }
.nm-polaroid__img--art { background: linear-gradient(180deg, #FCEBC8, #F4E7D4); }
.nm-polaroid__img--art img { object-position: 50% 0; transform: scale(1.5); transform-origin: 50% 0; }
.nm-flip .nm-polaroid__caption { font-size: .82rem; bottom: 8px; }
.nm-tag { position: absolute; left: var(--x); top: var(--y); padding: .3em .8em; border-radius: var(--r-pill); background: var(--paper); color: var(--night); font-family: var(--font-display); font-size: clamp(.9rem, 1.4vw, 1.1rem); box-shadow: var(--shadow-photo); white-space: nowrap; }
.nm-tag::after { content: ""; position: absolute; left: 22px; bottom: -6px; width: 12px; height: 12px; background: var(--paper); transform: rotate(45deg); border-radius: 2px; }
.nm-review { margin: 0; padding: 26px; background: #fff; border-radius: var(--r-panel); box-shadow: var(--shadow-soft); display: grid; gap: 14px; align-content: start; }
.nm-review blockquote { margin: 0; font-family: var(--font-display); font-size: 1.12rem; line-height: 1.5; }
.nm-review figcaption { font-size: .92rem; color: var(--ink-soft); }
/* Review placeholders while there are no reviews: how to leave one, and clearly empty dashed frames (never stars, names or quotes). */
.nm-reviews__lead { margin: 8px 0 0; max-width: 60ch; }
.nm-review-slot { display: grid; align-content: start; gap: 12px; margin: 0; padding: 26px; border-radius: var(--r-panel); }
.nm-review-slot--how { background: #fff; box-shadow: var(--shadow-soft); }
.nm-review-slot--how .nm-btn { justify-self: start; }
.nm-review-slot__title { margin: 0; font-size: var(--step-2); }
.nm-review-slot__steps { display: grid; gap: 6px; margin: 0; padding-left: 1.3em; color: var(--ink-soft); }
.nm-review-slot__icon .nm-icon { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--menthe); color: var(--menthe-deep); }
.nm-review-slot--empty { place-content: center; justify-items: center; min-height: 220px; border: 2px dashed rgba(47, 107, 82, .35); color: var(--menthe-deep); font-weight: 600; text-align: center; }
.nm-review-slot--empty .nm-icon { background: rgba(255, 255, 255, .6); }
.nm-avis__slots { margin-bottom: clamp(24px, 3vw, 40px); }
@media (max-width: 900px) { .nm-review-slot--empty:last-child { display: none; } }
@media (max-width: 600px) { .nm-review-slot--empty { display: none; } }
/* Paired girl/boy artwork outside 3D covers follows the hero choice (html[data-nm-character]). */
img[data-for="boy"]:not(.nm-book3d__art) { display: none; }
[data-nm-character="boy"] img[data-for="boy"]:not(.nm-book3d__art) { display: block; }
/* Keep a lone image visible when a book has no separate boy artwork. */
[data-nm-character="boy"] img[data-for="girl"]:not(.nm-book3d__art):not(:only-of-type) { display: none; }

/* Night sky and closing call to action (home and inner pages). */
.nm-hero__sky, .nm-final .nm-hero__sky { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.2px 1.2px at 22px 34px, rgba(255, 255, 255, .85), transparent 60%),
    radial-gradient(1px 1px at 140px 86px, rgba(255, 255, 255, .6), transparent 60%),
    radial-gradient(1.8px 1.8px at 210px 170px, rgba(251, 224, 160, .9), transparent 60%),
    radial-gradient(1px 1px at 76px 196px, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(1.4px 1.4px at 260px 40px, rgba(255, 255, 255, .7), transparent 60%);
  background-size: 300px 240px; mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%); }
.nm-final { overflow: hidden; text-align: center; }
.nm-final__inner h2 { font-size: var(--step-5); }
.nm-final__inner .nm-lead { margin-inline: auto; }
.nm-final__form { max-width: 580px; margin: 28px auto 0; text-align: left; }

/* Timeline of what happens after an order (thank-you page, how it works). */
.nm-timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: nm-step; }
.nm-timeline__step { position: relative; display: grid; align-content: start; gap: 8px; padding: 22px 20px 24px; border-radius: var(--r-panel); background: var(--sable); counter-increment: nm-step; }
.nm-timeline__step::after { content: ""; position: absolute; top: 46px; right: -20px; width: 20px; height: 2px; background: var(--gold-2); }
.nm-timeline__step:last-child::after { content: none; }
.nm-timeline__step:first-child { background: var(--night); color: var(--paper); }
.nm-timeline__step:first-child h3 { color: var(--paper); }
.nm-timeline__step:first-child p { color: rgba(255, 253, 249, .78); }
.nm-timeline__step:first-child .nm-timeline__icon { background: var(--apricot); color: var(--night); }
.nm-timeline__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--paper); color: var(--zellige); }
.nm-timeline__icon .nm-icon { width: 24px; height: 24px; }
.nm-timeline__step h3 { margin: 6px 0 0; font-size: 1.25rem; color: var(--night); }
.nm-timeline__step h3::before { content: counter(nm-step) ". "; color: var(--gold-3); }
.nm-timeline__step p { margin: 0; font-size: .95rem; color: var(--ink-soft); }
@media (max-width: 900px) { .nm-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nm-timeline__step::after { content: none; } }
@media (max-width: 560px) { .nm-timeline { grid-template-columns: 1fr; } }

/* Newsletter signup (footer, book page, journal, thank-you page) */
.nm-newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px clamp(24px, 4vw, 56px); align-items: center; padding: clamp(22px, 3vw, 36px); border-radius: var(--r-panel); background: var(--menthe); color: var(--night); }
.nm-newsletter__title { margin: 0 0 8px; font-size: var(--step-2); line-height: 1.15; color: var(--night); }
.nm-newsletter__lead { margin: 0; color: var(--ink-soft); }
.nm-newsletter__form { display: grid; gap: 10px; }
.nm-newsletter__row { display: flex; flex-wrap: wrap; gap: 10px; }
.nm-newsletter__email { flex: 1 1 220px; min-height: 52px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--paper); color: var(--night); font: inherit; }
.nm-newsletter__email:focus-visible { outline: 3px solid var(--zellige); outline-offset: 2px; border-color: var(--zellige); }
.nm-newsletter__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nm-newsletter__small { margin: 0; font-size: .8rem; line-height: 1.5; color: var(--ink-soft); }
.nm-newsletter__small a { color: inherit; text-decoration: underline; }
.nm-newsletter__status { margin: 0; font-weight: 600; }
.nm-newsletter__status:empty { display: none; }
.nm-newsletter--footer { margin: 0 0 clamp(40px, 6vw, 72px); background: rgba(255, 253, 249, .07); border: 1px solid var(--line-night); color: rgba(255, 253, 249, .85); }
.nm-footer .nm-newsletter__title { margin: 0 0 8px; font-family: var(--font-display); font-size: var(--step-2); font-weight: var(--display-weight); color: var(--paper); }
.nm-newsletter--footer .nm-newsletter__lead, .nm-newsletter--footer .nm-newsletter__small { color: rgba(255, 253, 249, .72); }
.nm-newsletter--footer .nm-newsletter__status { color: var(--paper); }
.nm-newsletter--product { margin-block: clamp(32px, 5vw, 56px); }
@media (max-width: 760px) { .nm-newsletter { grid-template-columns: 1fr; } }

/* Rows of links to guide pages and Journal articles (template-parts/seo-links.php) */
.nm-seo-links { display: grid; gap: 12px; margin-block: clamp(20px, 3vw, 32px); }
.nm-seo-links__title { font-family: var(--font-ui); font-size: 1rem; font-weight: 700; margin: 0; color: var(--ink-soft); }
.nm-seo-links .nm-chip { white-space: normal; }

/* Numeric book layouts keep the same top-origin coordinates and scale as the reading PDF. */
.nm-flipbook[data-numeric-layout="true"] .nm-flipbook__book{display:block;aspect-ratio:2 / 1}
.nm-flipbook[data-numeric-layout="true"] .nm-flipbook__page--left{position:absolute;inset:0;aspect-ratio:auto}
.nm-flipbook[data-numeric-layout="true"] .nm-flipbook__page--right{position:absolute;inset:0;grid-column:auto;align-self:auto;width:100%;max-width:none;margin:0;padding:0;background:transparent;container-type:inline-size}
.nm-flipbook[data-numeric-layout="true"][data-kind="cover"] .nm-flipbook__page--right{width:50%}
.nm-flipbook[data-numeric-layout="true"] .nm-flipbook__text{position:absolute;transform:none;text-align:left;background:transparent}
.nm-flipbook[data-numeric-layout="true"][data-numeric-font="true"] .nm-flipbook__text p{font-size:inherit}
.nm-flipbook[data-numeric-layout="true"][data-numeric-font="true"][data-kind="cover"] .nm-flipbook__text h3{font-size:inherit}
.nm-flipbook[data-numeric-layout="true"][data-numeric-font="true"][data-kind="cover"] .nm-flipbook__text p{font-size:.4em}
.nm-flipbook[data-numeric-layout="true"][data-theme="dark"] .nm-flipbook__text{color:#FFF5DD;text-shadow:0 1px 3px rgba(18,29,59,.45)}
.nm-flipbook[data-numeric-layout="true"][data-theme="dark"] .nm-flipbook__text h3{color:inherit}
.nm-flipbook[data-numeric-layout="true"] .nm-flipbook__book::after{top:0;bottom:0;height:auto;padding-bottom:0}

/* Keep the live book's word metrics consistent with its Young Serif reading PDF. */
.nm-flipbook__text h3,.nm-flipbook__text p{font-family:'Young Serif',Georgia,serif;font-weight:400;font-style:normal;letter-spacing:0;text-wrap:wrap}
.nm-flipbook[data-numeric-layout="true"] .nm-flipbook__text p{line-height:1.45}
.nm-flipbook[data-numeric-layout="true"][data-kind="cover"] .nm-flipbook__text{text-align:center}
.nm-flipbook[data-numeric-layout="true"][data-kind="cover"] .nm-flipbook__text h3{line-height:1.2}
