/* =========================================================
   NYXLABS phone app chrome
   Desktop is untouched. These rules only apply on phones
   (and when the site is opened from the Home Screen).
   ========================================================= */

:root {
  --nyx-appbar-h: 64px;
  --nyx-cream: #f6efe6;
  --nyx-cream-2: #faf4ec;
  --nyx-ink: #1c1917;
  --nyx-muted: #6b6560;
  --nyx-line: #eadfce;
  --nyx-accent: #e56b1f;
}

/* Never change layout on desktop / large tablets */
@media (min-width: 769px) {
  .nyx-appbar,
  .nyx-install {
    display: none !important;
  }
}

@media (max-width: 768px), (display-mode: standalone), (display-mode: fullscreen) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  html,
  body {
    overscroll-behavior-y: contain;
  }

  body {
    padding-bottom: calc(var(--nyx-appbar-h) + env(safe-area-inset-bottom, 0px) + 0.35rem) !important;
    -webkit-tap-highlight-color: rgba(229, 107, 31, 0.18);
  }

  button,
  a,
  .btn,
  .nav-toggle,
  .option-card,
  .start-door,
  .mode-chip {
    touch-action: manipulation;
  }

  /* Stop iOS zooming into form fields */
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Compact sticky app header */
  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
    background: rgba(250, 244, 236, 0.92) !important;
  }

  .nav-shell {
    width: calc(100% - 1.15rem) !important;
    padding: 0.55rem 0 !important;
    gap: 0.6rem;
  }

  .brand-text {
    font-size: 1.05rem !important;
    letter-spacing: -0.03em;
  }

  .brand-tld {
    font-size: 0.72em;
  }

  /* Quote lives in the bottom app bar on phones */
  .nav-actions {
    display: none !important;
  }

  .site-header {
    z-index: 230 !important;
  }

  .nav-toggle {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 12px;
  }

  /* Old in-header menu is clipped by the sticky header — hide it */
  body.theme-light-print .nav-links,
  .nav-links,
  .nav-links.is-open {
    display: none !important;
  }

  .nav-mobile-cta {
    display: none !important;
  }

  body.nav-open,
  body.nyx-menu-open {
    overflow: hidden;
  }

  body.nav-open::after {
    display: none !important;
  }

  .nyx-scrim {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 200;
    background: rgba(28, 25, 23, 0.42);
  }

  .nyx-drawer {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: calc(3.55rem + env(safe-area-inset-top, 0px));
    bottom: calc(var(--nyx-appbar-h) + env(safe-area-inset-bottom, 0px));
    z-index: 220;
    flex-direction: column;
    background: #fffdf9;
    border-top: 1px solid var(--nyx-line);
    box-shadow: 0 18px 40px rgba(28, 25, 23, 0.16);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.nyx-menu-open .nyx-scrim {
    display: block;
  }

  body.nyx-menu-open .nyx-drawer {
    display: flex;
  }

  .nyx-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem 0.45rem;
    position: sticky;
    top: 0;
    background: #fffdf9;
  }

  .nyx-drawer-head strong {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nyx-muted);
  }

  .nyx-drawer-x {
    appearance: none;
    border: 0;
    background: #f3ebe1;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--nyx-ink);
  }

  .nyx-drawer-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.25rem 0.75rem 1.1rem;
  }

  .nyx-drawer-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    font-size: 1.02rem;
    font-weight: 650;
    color: var(--nyx-ink);
    background: transparent;
  }

  .nyx-drawer-link:active,
  .nyx-drawer-link.is-active {
    background: #f6efe6;
  }

  .nyx-drawer-cta {
    margin-top: 0.45rem;
    justify-content: center;
    background: var(--nyx-accent) !important;
    color: #fff !important;
    font-weight: 750;
  }

  /* Hide the old scroll-triggered CTA — app bar replaces it */
  .sticky-cta {
    display: none !important;
  }

  /* Hero: fill the phone, keep the same content */
  body.theme-light-print .hero-landing {
    min-height: calc(100svh - 3.4rem) !important;
    padding: 1rem 0 4.5rem !important;
  }

  body.theme-light-print .hero-landing-stage,
  body.theme-light-print .hero-landing-stage.wrap {
    width: calc(100% - 1.25rem) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-content: flex-end !important;
    align-items: flex-end !important;
  }

  body.theme-light-print .hero-panel {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 1.05rem 1rem 1rem !important;
    border-radius: 20px !important;
  }

  body.theme-light-print .hero-title {
    font-size: clamp(1.7rem, 8.4vw, 2.15rem) !important;
    line-height: 1.08 !important;
  }

  body.theme-light-print .hero-lead {
    max-width: none !important;
    font-size: 0.95rem !important;
  }

  body.theme-light-print .hero-cta-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }

  body.theme-light-print .hero-cta-bar .btn {
    width: 100%;
    min-height: 48px;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
    font-size: 0.9rem;
  }

  body.theme-light-print .hero-flow-rail {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 0.55rem;
  }

  body.theme-light-print .hero-flow-dot {
    display: none !important;
  }

  body.theme-light-print .hero-flow-step {
    min-height: 44px;
  }

  .hero-scroll-hint {
    display: none !important;
  }

  /* Sections stay readable; card tiles go 2×2 so 4 fit in one old card */
  .wrap {
    width: calc(100% - 1.25rem) !important;
  }

  .footer-grid,
  .contact-grid,
  .about-grid,
  .process-grid {
    grid-template-columns: 1fr !important;
  }

  .btn,
  .btn-nav,
  .btn-hero-main {
    min-height: 46px;
  }

  .option-card {
    border-radius: 18px !important;
  }

  body.theme-light-print .start-doors,
  body.theme-light-print .feature-strip,
  body.theme-light-print #services,
  body.theme-light-print #materials,
  body.theme-light-print #portfolio,
  body.theme-light-print #library,
  body.theme-light-print .section-materials {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  body.theme-light-print .start-doors-head,
  body.theme-light-print .section-head,
  body.theme-light-print .lib-section-head,
  body.theme-light-print .materials-head {
    margin-bottom: 0.65rem !important;
    padding: 0.55rem 0.7rem !important;
    max-width: none !important;
  }

  body.theme-light-print .start-doors-head h2,
  body.theme-light-print .section-head h2,
  body.theme-light-print #library h2 {
    font-size: 1.15rem !important;
    margin: 0.1rem 0 0.2rem !important;
  }

  body.theme-light-print .start-doors-head .section-sub,
  body.theme-light-print .section-head .section-sub,
  body.theme-light-print .section-head p,
  body.theme-light-print #library .lib-pricing-note {
    font-size: 0.78rem !important;
    margin: 0 !important;
  }

  body.theme-light-print .section-head .btn {
    display: none !important;
  }

  /* 2-up grids — four tiles occupy the height of one old full-width card */
  body.theme-light-print .start-doors-grid,
  body.theme-light-print .feature-strip-grid,
  body.theme-light-print .service-grid,
  body.theme-light-print .service-grid-4,
  body.theme-light-print .service-grid-5,
  body.theme-light-print .materials-soft-grid,
  body.theme-light-print .materials-grid,
  body.theme-light-print .portfolio-grid,
  body.theme-light-print #library .lib-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.45rem !important;
  }

  body.theme-light-print .start-door,
  body.theme-light-print .feat-item,
  body.theme-light-print .service-card,
  body.theme-light-print .mat-soft,
  body.theme-light-print .p-item,
  body.theme-light-print #library .lib-card {
    border-radius: 12px !important;
    min-width: 0 !important;
  }

  /* Start-here photo cards */
  body.theme-light-print .start-door-media,
  body.theme-light-print .feat-media {
    aspect-ratio: 16 / 9 !important;
    max-height: 72px;
  }

  body.theme-light-print .start-door-body,
  body.theme-light-print .feat-body {
    padding: 0.4rem 0.5rem 0.45rem !important;
    gap: 0.08rem !important;
  }

  body.theme-light-print .start-door-kicker,
  body.theme-light-print .start-door-body p,
  body.theme-light-print .start-door-cta,
  body.theme-light-print .feat-item p {
    display: none !important;
  }

  body.theme-light-print .start-door-body h3,
  body.theme-light-print .feat-item h3 {
    font-size: 0.78rem !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body.theme-light-print .start-doors-foot {
    margin-top: 0.65rem !important;
    font-size: 0.78rem !important;
  }

  /* Service tiles — title only, the card is the tap target */
  body.theme-light-print #services .service-card {
    padding: 0.5rem 0.55rem 0.55rem !important;
    gap: 0.15rem !important;
  }

  body.theme-light-print #services .service-card p,
  body.theme-light-print #services .service-card .text-link {
    display: none !important;
  }

  body.theme-light-print #services .svc-icon,
  body.theme-light-print #services .service-card .num {
    font-size: 0.62rem !important;
    margin-bottom: 0.1rem !important;
  }

  body.theme-light-print #services .service-card h3 {
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  body.theme-light-print #services .service-card .sub {
    font-size: 0.62rem !important;
    margin: 0 !important;
    -webkit-line-clamp: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Materials — 80% taller than the compact tile */
  body.theme-light-print .mat-soft {
    min-height: 8.1rem !important;
    padding: 0.65rem 0.6rem 0.6rem !important;
    justify-content: flex-start;
  }

  body.theme-light-print .mat-desc,
  body.theme-light-print .mat-best,
  body.theme-light-print .mat-props,
  body.theme-light-print .mat-soft-foot {
    display: none !important;
  }

  body.theme-light-print .mat-soft h3 {
    font-size: 0.88rem !important;
    margin: 0.2rem 0 0.35rem !important;
  }

  body.theme-light-print .mat-soft-head {
    margin-bottom: 0 !important;
  }

  body.theme-light-print .mat-traits {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: auto;
    padding: 0;
    list-style: none;
  }

  body.theme-light-print .mat-traits li {
    font-size: 0.62rem !important;
    padding: 0.18rem 0.4rem !important;
    border-radius: 999px;
    background: #f6efe6;
    color: #7a5340;
  }

  /* Portfolio tiles */
  body.theme-light-print #portfolio .p-item img {
    aspect-ratio: 4 / 3 !important;
    max-height: 88px;
    object-fit: cover;
    width: 100%;
  }

  body.theme-light-print #portfolio .fig-cap,
  body.theme-light-print #portfolio .cap-desc {
    padding: 0.3rem 0.4rem 0.4rem !important;
  }

  body.theme-light-print #portfolio .cap-title {
    font-size: 0.72rem !important;
  }

  body.theme-light-print #portfolio .cap-desc {
    display: none !important;
  }

  /* Model library — 2-up compact tiles */
  body.theme-light-print #library .lib-shell {
    padding: 0.7rem 0.65rem 0.8rem !important;
    border-radius: 16px !important;
  }

  body.theme-light-print #library .lib-cover-wrap {
    aspect-ratio: 4 / 3 !important;
    max-height: 88px;
  }

  body.theme-light-print #library .lib-body {
    padding: 0.35rem 0.4rem 0.4rem !important;
    gap: 0.2rem !important;
  }

  body.theme-light-print #library .lib-title {
    font-size: 0.7rem !important;
    min-height: 0 !important;
    -webkit-line-clamp: 2 !important;
  }

  body.theme-light-print #library .lib-meta-line,
  body.theme-light-print #library .lib-meta {
    display: none !important;
  }

  body.theme-light-print #library .lib-actions {
    grid-template-columns: 1fr !important;
    gap: 0.25rem !important;
  }

  body.theme-light-print #library .lib-actions .btn {
    min-height: 1.85rem !important;
    font-size: 0.62rem !important;
    padding: 0.2rem 0.35rem !important;
  }

  body.theme-light-print #library .lib-actions .lib-open {
    display: none !important;
  }

  body.theme-light-print .industries-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.45rem !important;
  }

  .wizard-section,
  #wizard,
  .shop-page,
  .kr-page,
  .litho-page,
  .track-main {
    padding-bottom: 1.25rem;
  }

  /* Lithophanes page — compact phone layout */
  body.theme-light-print .litho-page {
    padding-bottom: 0.75rem !important;
  }

  body.theme-light-print .litho-page .litho-hero,
  body.theme-light-print .litho-page .litho-section {
    padding: 0.85rem 0 !important;
  }

  body.theme-light-print .litho-page .litho-hero-copy {
    padding: 0.75rem 0.8rem 0.8rem !important;
    border-radius: 14px !important;
  }

  body.theme-light-print .litho-page .litho-hero-copy h1 {
    font-size: 1.28rem !important;
    margin: 0.15rem 0 0.4rem !important;
    line-height: 1.15 !important;
  }

  body.theme-light-print .litho-page .litho-hero-copy .lead {
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
    margin: 0 0 0.65rem !important;
  }

  body.theme-light-print .litho-page .litho-cta-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem !important;
    margin-bottom: 0.5rem !important;
  }

  body.theme-light-print .litho-page .litho-cta-row .btn {
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 0.45rem;
    font-size: 0.78rem;
  }

  body.theme-light-print .litho-page .litho-price-note {
    font-size: 0.74rem !important;
  }

  body.theme-light-print .litho-page .litho-visual-card {
    border-radius: 12px !important;
    margin-top: 0.65rem;
  }

  body.theme-light-print .litho-page .litho-visual-card img {
    aspect-ratio: 16 / 9 !important;
    max-height: 132px;
  }

  body.theme-light-print .litho-page .litho-visual-caption {
    font-size: 0.62rem !important;
    left: 0.5rem !important;
    bottom: 0.5rem !important;
    padding: 0.2rem 0.45rem !important;
  }

  body.theme-light-print .litho-page .product-photo-strip {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.4rem !important;
    margin-top: 0.65rem !important;
  }

  body.theme-light-print .litho-page .product-photo-item {
    border-radius: 10px !important;
  }

  body.theme-light-print .litho-page .product-photo-item img {
    aspect-ratio: 16 / 10 !important;
    max-height: 78px;
  }

  body.theme-light-print .litho-page .product-photo-item figcaption {
    padding: 0.28rem 0.4rem 0.35rem !important;
    font-size: 0.68rem !important;
  }

  body.theme-light-print .litho-page .section-head {
    padding: 0.5rem 0.65rem !important;
    margin-bottom: 0.55rem !important;
    border-radius: 12px !important;
  }

  body.theme-light-print .litho-page .section-head h2 {
    font-size: 1.05rem !important;
    margin: 0.1rem 0 0 !important;
  }

  body.theme-light-print .litho-page .litho-steps,
  body.theme-light-print .litho-page .litho-options,
  body.theme-light-print .litho-page .litho-ideas {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.45rem !important;
    margin-bottom: 0.75rem !important;
  }

  body.theme-light-print .litho-page .litho-options {
    grid-template-columns: 1fr !important;
  }

  body.theme-light-print .litho-page .litho-steps li,
  body.theme-light-print .litho-page .litho-opt,
  body.theme-light-print .litho-page .litho-idea {
    border-radius: 12px !important;
    padding: 0.55rem 0.6rem !important;
  }

  body.theme-light-print .litho-page .litho-step-n {
    font-size: 0.68rem !important;
    margin-bottom: 0.15rem !important;
  }

  body.theme-light-print .litho-page .litho-steps strong {
    font-size: 0.8rem !important;
    margin-bottom: 0.15rem !important;
  }

  body.theme-light-print .litho-page .litho-steps p {
    font-size: 0.7rem !important;
    line-height: 1.3 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body.theme-light-print .litho-page .litho-opt {
    padding: 0.65rem 0.7rem !important;
  }

  body.theme-light-print .litho-page .litho-opt h3 {
    font-size: 0.88rem !important;
    margin: 0 0 0.35rem !important;
  }

  body.theme-light-print .litho-page .litho-opt ul {
    font-size: 0.76rem !important;
    line-height: 1.35 !important;
    padding-left: 0.95rem !important;
  }

  body.theme-light-print .litho-page .litho-opt li {
    margin-bottom: 0.18rem !important;
  }

  body.theme-light-print .litho-page .litho-idea {
    padding: 0 !important;
    overflow: hidden;
  }

  body.theme-light-print .litho-page .litho-idea img {
    aspect-ratio: 16 / 10 !important;
    max-height: 86px;
  }

  body.theme-light-print .litho-page .litho-idea h3 {
    margin: 0.4rem 0.5rem 0.15rem !important;
    font-size: 0.78rem !important;
  }

  body.theme-light-print .litho-page .litho-idea p {
    margin: 0 0.5rem 0.5rem !important;
    font-size: 0.68rem !important;
    line-height: 1.3 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body.theme-light-print .litho-page .litho-bottom-cta {
    display: block !important;
    padding: 0.7rem 0.75rem !important;
    border-radius: 12px !important;
  }

  body.theme-light-print .litho-page .litho-bottom-cta h2 {
    font-size: 1.02rem !important;
    margin: 0 0 0.25rem !important;
  }

  body.theme-light-print .litho-page .litho-bottom-cta p {
    font-size: 0.76rem !important;
    margin: 0 0 0.65rem !important;
  }

  body.theme-light-print .litho-page .litho-hero > .wrap[style] {
    margin-top: 0.7rem !important;
  }

  /* Ready prints + Keyrings — same compact phone feel */
  body.theme-light-print .shop-page.subpage .subpage-band,
  body.theme-light-print .kr-page .subpage-band {
    padding: 0.85rem 0 !important;
  }

  body.theme-light-print .shop-page .shop-hero,
  body.theme-light-print .kr-page .shop-hero,
  body.theme-light-print .kr-page .kr-hero {
    padding: 0.75rem 0.8rem 0.8rem !important;
    margin-bottom: 0.65rem !important;
    border-radius: 14px !important;
  }

  body.theme-light-print .shop-page .shop-hero h1,
  body.theme-light-print .kr-page .shop-hero h1,
  body.theme-light-print .kr-page .kr-hero h1 {
    font-size: 1.28rem !important;
    margin: 0.15rem 0 0.4rem !important;
    line-height: 1.15 !important;
  }

  body.theme-light-print .shop-page .shop-hero p,
  body.theme-light-print .kr-page .shop-hero p,
  body.theme-light-print .kr-page .kr-hero p {
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }

  body.theme-light-print .shop-page .product-photo-strip,
  body.theme-light-print .kr-page .product-photo-strip {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.4rem !important;
    margin-top: 0.65rem !important;
  }

  body.theme-light-print .shop-page .product-photo-item,
  body.theme-light-print .kr-page .product-photo-item {
    border-radius: 10px !important;
  }

  body.theme-light-print .shop-page .product-photo-item img,
  body.theme-light-print .kr-page .product-photo-item img {
    aspect-ratio: 16 / 10 !important;
    max-height: 78px;
  }

  body.theme-light-print .shop-page .product-photo-item figcaption,
  body.theme-light-print .kr-page .product-photo-item figcaption {
    padding: 0.28rem 0.4rem 0.35rem !important;
    font-size: 0.68rem !important;
  }

  body.theme-light-print .shop-page .shop-toolbar {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.5rem !important;
    margin: 0.55rem 0 0.55rem !important;
  }

  body.theme-light-print .shop-page .shop-filters {
    gap: 0.3rem !important;
  }

  body.theme-light-print .shop-page .shop-chip {
    padding: 0.32rem 0.6rem !important;
    font-size: 0.72rem !important;
  }

  body.theme-light-print .shop-page .shop-search {
    min-width: 0 !important;
    width: 100% !important;
    padding: 0.55rem 0.75rem !important;
  }

  body.theme-light-print .shop-page .shop-status {
    font-size: 0.72rem !important;
    margin: 0 0 0.5rem !important;
  }

  body.theme-light-print .shop-page .shop-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.45rem !important;
  }

  body.theme-light-print .shop-page .shop-card {
    border-radius: 12px !important;
  }

  body.theme-light-print .shop-page .shop-card-media {
    aspect-ratio: 16 / 10 !important;
    max-height: 88px;
  }

  body.theme-light-print .shop-page .shop-card-cta {
    opacity: 1 !important;
    transform: none !important;
    font-size: 0.62rem !important;
    padding: 0.18rem 0.42rem !important;
    right: 0.4rem !important;
    bottom: 0.4rem !important;
  }

  body.theme-light-print .shop-page .shop-card-body {
    padding: 0.4rem 0.5rem 0.5rem !important;
    gap: 0.12rem !important;
  }

  body.theme-light-print .shop-page .shop-card-body h3 {
    font-size: 0.78rem !important;
    line-height: 1.2 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body.theme-light-print .shop-page .shop-card-body p {
    font-size: 0.68rem !important;
    line-height: 1.3 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body.theme-light-print .shop-page .shop-card-cat,
  body.theme-light-print .shop-page .shop-card-price,
  body.theme-light-print .shop-page .shop-card-mat {
    font-size: 0.62rem !important;
  }

  body.theme-light-print .shop-page .shop-note,
  body.theme-light-print .kr-page .shop-note {
    margin-top: 0.75rem !important;
    padding: 0.6rem 0.7rem !important;
    font-size: 0.76rem !important;
    border-radius: 12px !important;
  }

  body.theme-light-print .shop-page .shop-cross {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem !important;
    margin-top: 0.7rem !important;
  }

  body.theme-light-print .shop-page .shop-cross .btn {
    width: 100%;
    min-height: 42px;
    font-size: 0.78rem;
    padding: 0.45rem 0.4rem;
  }

  /* Keyrings designer */
  body.theme-light-print .kr-page .kr-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
    margin-bottom: 0.55rem !important;
  }

  body.theme-light-print .kr-page .kr-panel {
    padding: 0.7rem 0.75rem 0.8rem !important;
    border-radius: 14px !important;
  }

  body.theme-light-print .kr-page .kr-panel h2 {
    font-size: 1.02rem !important;
    margin: 0 0 0.55rem !important;
  }

  body.theme-light-print .kr-page .kr-form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
  }

  body.theme-light-print .kr-page .kr-field {
    font-size: 0.72rem !important;
    gap: 0.18rem !important;
  }

  body.theme-light-print .kr-page .kr-field input,
  body.theme-light-print .kr-page .kr-field select {
    padding: 0.5rem 0.55rem !important;
    border-radius: 10px !important;
  }

  body.theme-light-print .kr-page .kr-form-actions {
    display: grid !important;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 0.4rem !important;
    margin-top: 0.65rem !important;
  }

  body.theme-light-print .kr-page .kr-form-actions .btn {
    width: 100%;
    min-height: 42px;
    font-size: 0.78rem;
    padding: 0.45rem 0.4rem;
  }

  body.theme-light-print .kr-page .kr-hint {
    margin: 0.45rem 0 0 !important;
    font-size: 0.72rem !important;
  }

  body.theme-light-print .kr-page .kr-preview-frame {
    min-height: 140px !important;
    padding: 0.55rem !important;
    border-radius: 12px !important;
  }

  body.theme-light-print .kr-page .kr-preview-frame svg {
    min-height: 110px !important;
    max-width: 220px !important;
  }

  body.theme-light-print .kr-page .kr-cart-head {
    margin-bottom: 0.45rem !important;
  }

  body.theme-light-print .kr-page .kr-empty,
  body.theme-light-print .kr-page .kr-total,
  body.theme-light-print .kr-page .kr-price-note {
    font-size: 0.76rem !important;
  }

  body.theme-light-print .kr-page .kr-cart-item {
    padding: 0.5rem 0.55rem !important;
    border-radius: 10px !important;
  }

  body.theme-light-print .kr-page .kr-checkout-row {
    display: grid !important;
    gap: 0.55rem !important;
    margin-top: 0.65rem !important;
    padding-top: 0.65rem !important;
  }

  body.theme-light-print .kr-page .kr-checkout-row .btn {
    width: 100%;
    min-height: 44px;
    font-size: 0.88rem;
  }

  body.theme-light-print .kr-page .kr-how {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.4rem !important;
  }

  body.theme-light-print .kr-page .kr-how-card {
    padding: 0.5rem 0.45rem 0.55rem !important;
    border-radius: 12px !important;
  }

  body.theme-light-print .kr-page .kr-how-card span {
    font-size: 0.68rem !important;
    margin-bottom: 0.1rem !important;
  }

  body.theme-light-print .kr-page .kr-how-card strong {
    font-size: 0.78rem !important;
    margin-bottom: 0.15rem !important;
  }

  body.theme-light-print .kr-page .kr-how-card p {
    font-size: 0.66rem !important;
    line-height: 1.3 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .site-footer {
    padding-bottom: 1rem;
  }

  /* Persistent phone app bar */
  .nyx-appbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    gap: 0;
    min-height: calc(var(--nyx-appbar-h) + env(safe-area-inset-bottom, 0px));
    padding: 0.28rem 0.2rem calc(0.28rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 253, 250, 0.96);
    border-top: 1px solid var(--nyx-line);
    box-shadow: 0 -10px 28px rgba(60, 40, 20, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .nyx-appbar a,
  .nyx-appbar button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--nyx-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    min-height: 52px;
    padding: 0.2rem 0.1rem;
    font: 650 0.62rem/1 Inter, system-ui, sans-serif;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-radius: 14px;
  }

  .nyx-appbar svg {
    width: 22px;
    height: 22px;
    display: block;
  }

  .nyx-appbar a.is-active,
  .nyx-appbar button.is-active {
    color: var(--nyx-ink);
  }

  .nyx-appbar a.is-active svg,
  .nyx-appbar button.is-active svg {
    color: var(--nyx-accent);
  }

  .nyx-appbar-primary {
    color: #fff !important;
  }

  .nyx-appbar-primary .nyx-appbar-ico {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--nyx-accent);
    color: #fff;
    box-shadow: 0 8px 18px rgba(229, 107, 31, 0.32);
    margin-bottom: 0.05rem;
  }

  .nyx-appbar-primary.is-active .nyx-appbar-ico,
  .nyx-appbar-primary:hover .nyx-appbar-ico {
    background: #cf5c14;
  }

  .nyx-appbar-primary span:last-child {
    color: var(--nyx-ink);
    font-weight: 750;
  }

  /* Add-to-home-screen tip — phones only, dismissed after first use */
  .nyx-install {
    position: fixed;
    left: 0.7rem;
    right: 0.7rem;
    bottom: calc(var(--nyx-appbar-h) + env(safe-area-inset-bottom, 0px) + 0.55rem);
    z-index: 130;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.8rem;
    background: #1c1917;
    color: #faf4ec;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(28, 25, 23, 0.28);
  }

  .nyx-install p {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.35;
    flex: 1;
  }

  .nyx-install strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.1rem;
  }

  .nyx-install-ico {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #fff;
  }

  .nyx-install-ico img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .nyx-install-act,
  .nyx-install-x {
    appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
  }

  .nyx-install-act {
    flex: 0 0 auto;
    background: var(--nyx-accent);
    color: #fff;
    font-weight: 750;
    font-size: 0.78rem;
    padding: 0.5rem 0.7rem;
    border-radius: 999px;
    white-space: nowrap;
  }

  .nyx-install-x {
    background: transparent;
    color: #d6d3d1;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    font-size: 1.15rem;
    line-height: 1;
  }
}

/* Installed Home Screen app: sit under the status bar */
@media (display-mode: standalone), (display-mode: fullscreen) {
  .nyx-install {
    display: none !important;
  }

  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
  }
}

@media (max-width: 380px) {
  .nyx-appbar a span:last-child,
  .nyx-appbar button span:last-child {
    font-size: 0.56rem;
  }

  body.theme-light-print .hero-cta-bar {
    grid-template-columns: 1fr;
  }

  .lib-lightbox {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .lib-lightbox-panel {
    width: 100%;
    max-height: none;
    height: 100%;
    border-radius: 0;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: calc(var(--nyx-appbar-h) + env(safe-area-inset-bottom, 0px));
  }

  .lib-lightbox-img {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    height: auto;
  }

  .lib-lightbox-bar {
    flex-shrink: 0;
  }

  .lib-zoom-hint {
    font-size: 0.55rem;
    padding: 0.12rem 0.32rem;
  }
}

/* Library photo preview — desktop and phone */
.lib-cover-wrap {
  cursor: zoom-in;
  position: relative;
}
.lib-zoom-hint {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  z-index: 2;
  background: rgba(28, 25, 23, 0.72);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.16rem 0.4rem;
  border-radius: 999px;
  pointer-events: none;
}
.lib-lightbox[hidden] { display: none !important; }
.lib-lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.lib-lightbox-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 14, 12, 0.84);
  cursor: zoom-out;
}
.lib-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(94vh, 960px);
  display: flex;
  flex-direction: column;
  background: #14110f;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}
.lib-lightbox-img {
  display: block;
  width: 100%;
  max-height: calc(94vh - 5.6rem);
  object-fit: contain;
  background: #0e0c0b;
}
.lib-lightbox-x {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.94);
  color: #1c1917;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}
.lib-lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #fffdf9;
}
.lib-lightbox-copy {
  min-width: 0;
}
.lib-lightbox-copy strong {
  display: block;
  font-size: 0.98rem;
  color: #1c1917;
  line-height: 1.25;
}
.lib-lightbox-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #6b6560;
}
body.lib-lightbox-open {
  overflow: hidden;
}
