/* Shared storefront styles. Desktop layout is in desktop.css. */
  :root { color-scheme: light; --kp-accent: #fff; --kp-ink: #141611; --kp-muted: #666960; --kp-line: #eeeee8; }
  html { scroll-padding-top: 80px; }
  body { background: #fff; color: var(--kp-ink); }
  body > .header, body > #main, body > .footer { display: none; }
  .kp-app { display: block; min-height: 100dvh; font-family: 'DM Sans', Arial, sans-serif; line-height: 1.4; padding-bottom: calc(83px + env(safe-area-inset-bottom)); }
  .kp-app [hidden] { display: none !important; }
  .kp-app button, #kp-dialog button { background: none; padding: 0; }
  .kp-app button, .kp-app a { touch-action: manipulation; }
  .kp-app :focus-visible, #kp-dialog :focus-visible { outline: 2px solid #242424; outline-offset: 3px; }
  .kp-app .icon, #kp-dialog .icon { width: 24px; height: 24px; stroke-width: 1.8; }
  .kp-header { position: sticky; top: 0; z-index: 25; height: calc(72px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0; display: flex; align-items: center; gap: 5px; background: #ffffffed; backdrop-filter: blur(18px); }
  .kp-header .kp-search-liquid {
    display: block;
    background: #000;
    -webkit-mask: url('./assets/search-mask.svg') center / contain no-repeat;
    mask: url('./assets/search-mask.svg') center / contain no-repeat;
  }
  .kp-logo { margin-right: auto; font-family: 'Manrope', Arial, sans-serif; font-size: 29px; letter-spacing: -1.7px; font-weight: 800; line-height: 1.2; }
  .kp-app .kp-icon-button, #kp-dialog .kp-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; position: relative; border-radius: 50%; }
  .kp-count { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; border-radius: 12px; background: var(--kp-accent); border: 1px solid #dedede; color: #1a1a1a; font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
  .kp-view-heading { flex: 1; min-width: 0; text-align: center; }
  .kp-view-heading h1 { font-size: 22px; letter-spacing: -.7px; font-weight: 800; }
  .kp-view-heading p { color: #5c5f56; font-size: 13px; margin-top: 2px; }
  .kp-pills { position: relative; isolation: isolate; display: flex; align-items: center; padding: 3px; margin: 0 14px 17px; background: #f6f5f1; border-radius: 24px; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .kp-pills::-webkit-scrollbar, .kp-trending-strip::-webkit-scrollbar { display: none; }
  .kp-pill-indicator { position: absolute; left: 0; pointer-events: none; border-radius: 22px; background: var(--kp-accent); box-shadow: 0 1px 4px #00000014; visibility: hidden; }
  .kp-pills-ready .kp-pill-indicator { visibility: visible; transition: transform 280ms cubic-bezier(.22, 1, .36, 1), width 280ms cubic-bezier(.22, 1, .36, 1); }
  .kp-app .kp-pill { position: relative; z-index: 1; padding: 10px 12px; min-height: 40px; flex: 1 0 auto; font-size: 14px; border-radius: 22px; white-space: nowrap; }
  .kp-app .kp-pill[aria-pressed=true] { color: #171717; font-weight: 700; }
  .kp-section-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 15px; margin-bottom: 11px; gap: 12px; }
  .kp-section-heading h2 { font-size: 23px; font-weight: 800; letter-spacing: -.8px; }
  .kp-section-heading p { font-size: 14px; color: #575b50; margin-top: 1px; }
  .kp-section-heading em { color: #242424; font-style: normal; font-weight: 700; }
  .kp-app .kp-see-all { display: flex; align-items: center; gap: 3px; min-height: 44px; font-size: 14px; font-weight: 700; white-space: nowrap; }
  .kp-see-all .icon { width: 18px; }
  .kp-trending-strip { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(100px, 28vw, 150px); gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 14px 18px; scroll-snap-type: x proximity; scroll-padding-inline: 14px; }
  .kp-product { position: relative; background: #fff; border: 1px solid var(--kp-line); border-radius: 12px; overflow: hidden; min-width: 0; box-shadow: 0 2px 4px #1b220407; scroll-snap-align: start; }
  .kp-product-link { display: block; text-align: left; width: 100%; }
  .kp-photo { display: block; width: 100%; aspect-ratio: 1; background: #ece9e1; overflow: hidden; position: relative; }
  .kp-photo img { width: 300%; height: 200%; max-width: none; position: absolute; left: calc(var(--col) * -100%); top: calc(var(--row) * -100%); object-fit: fill; }
  .kp-rank { position: absolute; z-index: 1; top: 7px; left: 7px; width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: var(--kp-accent); border: 1px solid #e3e3e3; color: #181818; font-weight: 800; font-size: 18px; }
  .kp-product-name { display: block; font-size: 14px; line-height: 1.25; padding: 8px 8px 1px; font-weight: 500; min-height: 44px; overflow-wrap: anywhere; }
  .kp-product-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; column-gap: 4px; padding: 0 8px 4px; }
  .kp-price { font-size: 14px; font-weight: 500; }
  .kp-app .kp-product-like, #kp-dialog .kp-product-like { display: flex; align-items: center; gap: 4px; min-height: 36px; font-size: 13px; color: #555a4e; }
  .kp-product-like .icon { width: 17px; height: 17px; color: #ec4562; }
  .kp-product-like[aria-pressed=true] .icon { fill: #ec4562; }
  .kp-trending-strip .kp-product-bottom { display: block; }
  .kp-trending-strip .kp-product-like { min-height: 29px; }
  .kp-trending-strip .kp-rank { width: 25px; height: 25px; font-size: 16px; top: 5px; left: 5px; }
  .kp-post { border-top: 1px solid var(--kp-line); padding-bottom: 18px; }
  .kp-post-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
  .kp-avatar { width: 43px; height: 43px; flex: 0 0 43px; object-fit: cover; object-position: 50% 22%; border-radius: 50%; background: #eee; }
  .kp-creator { min-width: 0; flex: 1; }
  .kp-creator strong { display: block; font-size: 14px; font-weight: 700; }
  .kp-creator span { display: block; color: var(--kp-muted); font-size: 12px; margin-top: 1px; }
  .kp-app .kp-follow { font-size: 13px; min-height: 44px; padding: 0 5px; color: #242424; font-weight: 700; }
  .kp-post-image { width: 100%; aspect-ratio: 1.18; object-fit: cover; object-position: 50% 43%; }
  .kp-post-actions { display: flex; align-items: center; padding: 5px 10px 0; gap: 10px; }
  .kp-app .kp-post-like { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; font-size: 14px; font-weight: 600; }
  .kp-post-like[aria-pressed=true] .icon { fill: #ef4b65; stroke: #ef4b65; }
  .kp-post-actions .kp-save { margin-left: auto; }
  .kp-save[aria-pressed=true] .icon { fill: #242424; stroke: #242424; }
  .kp-caption { padding: 2px 15px 11px; font-size: 14px; line-height: 1.5; }
  .kp-caption strong { margin-right: 5px; }
  .kp-app .kp-primary, #kp-dialog .kp-primary { background: var(--kp-accent); color: #191919; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border-radius: 24px; min-height: 44px; padding: 10px 18px; font-weight: 700; font-size: 16px; width: 100%; border: 1px solid #d8d8d8; }
  .kp-post .kp-primary { margin: 0 14px; width: calc(100% - 28px); }
  .kp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 13px 11px; padding: 0 14px 20px; }
  .kp-grid .kp-product-name { min-height: 0; padding: 9px 9px 3px; }
  .kp-grid .kp-product-bottom { padding: 0 9px 5px; }
  .kp-grid .kp-rank { width: 32px; height: 32px; font-size: 20px; }
  .kp-grid .kp-price { font-size: 15px; }
  .kp-creators { list-style: none; display: grid; gap: 14px; margin: 0; padding: 6px 14px 12px; }
  .kp-creator-card { border: 1px solid var(--kp-line); border-radius: 18px; padding: 14px; background: #fff; }
  .kp-app .kp-creator-profile { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; min-height: 76px; }
  .kp-creator-rank { font-size: 14px; font-weight: 700; color: var(--kp-muted); }
  .kp-creator-profile .kp-avatar { width: 56px; height: 56px; flex-basis: 56px; }
  .kp-creator-info { flex: 1; min-width: 0; }
  .kp-creator-info strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
  .kp-creator-info > span { display: block; color: var(--kp-muted); font-size: 13px; margin: 3px 0; }
  .kp-creator-info > b { display: block; font-size: 22px; line-height: 1.3; }
  .kp-creator-info small { font-size: 14px; font-weight: 400; color: var(--kp-muted); }
  .kp-creator-profile > .icon { width: 18px; flex: 0 0 18px; }
  .kp-creator-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
  .kp-creator-picks button { min-width: 0; border-radius: 10px; overflow: hidden; }
  .kp-creator-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
  .kp-creator-card-footer > span { font-size: 14px; color: var(--kp-muted); }
  .kp-search { display: flex; align-items: center; gap: 8px; margin: 0 14px 15px; border: 1px solid #d9dccf; background: #fafbf7; border-radius: 14px; padding: 0 12px; }
  .kp-search input { margin: 0; background: transparent; color: #22271a; border: 0; padding: 12px 0; min-width: 0; }
  .kp-search input::placeholder { color: #727666; }
  .kp-search .icon { width: 20px; color: #000; }
  .kp-bottom-nav { position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 7px 12px calc(8px + env(safe-area-inset-bottom)); background: #fffffff5; backdrop-filter: blur(20px); border-top: 1px solid var(--kp-line); }
  .kp-app .kp-nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; justify-content: center; min-height: 53px; font-size: 12px; color: #5c6253; }
  .kp-nav-item .icon { height: 25px; width: 25px; stroke-width: 1.8; }
  .kp-bottom-nav .kp-nav-item { position: relative; }
  .kp-nav-icon { position: relative; isolation: isolate; display: grid; place-items: center; width: 25px; height: 25px; flex-shrink: 0; }
  .kp-nav-dots {
    display: none;
    position: absolute;
    z-index: 1;
    pointer-events: none;
    left: 50%;
    bottom: -8px;
    gap: 3px;
    transform: translateX(-50%);
  }
  .kp-nav-item[aria-current=page] .kp-nav-dots { display: flex; }
  .kp-nav-dots i {
    position: relative;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    overflow: hidden;
  }
  .kp-nav-dots i::before {
    content: "";
    position: absolute;
    left: var(--dot-offset, 0px);
    top: -4px;
    width: 32px;
    height: 12px;
  }
  .kp-nav-item[aria-current=page] .kp-nav-dots i { animation: kp-dot-wave 1.8s ease-in-out var(--dot-delay, 0ms) infinite both; }
  .kp-nav-dots i:nth-child(2) { --dot-delay: 110ms; --dot-offset: -7px; }
  .kp-nav-dots i:nth-child(3) { --dot-delay: 220ms; --dot-offset: -14px; }
  .kp-nav-dots i:nth-child(4) { --dot-delay: 330ms; --dot-offset: -21px; }
  .kp-nav-dots i:nth-child(5) { --dot-delay: 440ms; --dot-offset: -28px; }
  @keyframes kp-dot-wave {
    0%, 60%, 100% { transform: translateY(0) scale(1); opacity: .72; }
    30% { transform: translateY(-3px) scale(1.18); opacity: 1; }
  }
  .kp-nav-item[aria-current=page] { color: #151a0e; font-weight: 700; }
  .kp-nav-item[aria-current=page] .icon { fill: #fff; stroke-width: 2; }
  .kp-nav-item[data-kp-action=home] .icon { fill: currentColor; stroke: currentColor; }
  .kp-app .kp-create { width: 49px; height: 49px; justify-self: center; display: grid; place-items: center; border-radius: 50%; background: var(--kp-accent); border: 1px solid #d8d8d8; }
  .kp-create .icon { width: 29px; height: 29px; }
  .kp-empty { padding: 32px 24px; text-align: center; grid-column: 1 / -1; }
  .kp-empty > .icon { margin: 0 auto 15px; width: 34px; height: 34px; color: #242424; }
  .kp-empty h2 { font-size: 21px; margin-bottom: 8px; }
  .kp-empty p { color: var(--kp-muted); font-size: 14px; margin-bottom: 20px; }
  .kp-sample-note { text-align: center; font-size: 12px; color: #74796c; padding: 10px 18px 16px; line-height: 1.5; }
  .kp-account { padding: 16px; }
  .kp-account-card { background: #f6f8ef; border: 1px solid #e8ecdf; border-radius: 20px; padding: 22px; margin-bottom: 18px; }
  .kp-account-card h2 { font-size: 26px; margin: 12px 0 6px; letter-spacing: -.8px; }
  .kp-account-card p { font-size: 14px; color: #656d58; line-height: 1.6; margin-bottom: 20px; }
  .kp-app .kp-account-link { display: flex; align-items: center; justify-content: space-between; min-height: 56px; width: 100%; border-bottom: 1px solid var(--kp-line); font-size: 16px; }
  .kp-toast { position: fixed; z-index: 110; bottom: calc(94px + env(safe-area-inset-bottom)); left: 18px; right: 18px; border-radius: 12px; background: #242d17; color: #fff; padding: 12px 16px; box-shadow: 0 3px 15px #0002; font-size: 14px; }
  body > dialog { --text: #202719; --border: #e5e9dd; --kp-accent: #fff; background: #fff; color: #202719; border-color: #e1e6d9; box-shadow: 0 10px 50px #1a250335; border-radius: 22px; padding: 27px 22px; max-height: calc(100dvh - 38px); }
  body > dialog::backdrop { background: #15230065; backdrop-filter: blur(6px); }
  body > dialog p, body > dialog label { color: #626957; }
  body > dialog h2 { font-size: 26px; line-height: 1.2; margin-top: 16px; letter-spacing: -.7px; }
  body > dialog input, body > dialog textarea, body > dialog select { background: #fafbf7; color: #252e1b; border-color: #dce2d2; }
  body > dialog input::placeholder, body > dialog textarea::placeholder { color: #747d65; }
  body > dialog .dialog-close { color: #2a361b; background: #f1f4e9; }
  body > dialog .eyebrow, body > dialog .email-link { color: #242424; }
  body > dialog .primary { background: #fff; color: #191919; border: 1px solid #d8d8d8; box-shadow: none; }
  body > dialog select option { background: #fff; }
  #kp-dialog { padding-top: 42px; }
  #kp-dialog .kp-photo { border-radius: 14px; max-width: 310px; margin: 0 auto 18px; }
  #kp-dialog-title { margin: 0 0 9px; }
  #kp-dialog .kp-detail-price { font-size: 22px; color: #1a2311; margin-bottom: 7px; }
  #kp-dialog .kp-dialog-description { font-size: 14px; line-height: 1.6; margin: 7px 0 18px; }
  #kp-dialog .kp-dialog-note { font-size: 12px; color: #717a63; margin: 15px 0 0; text-align: center; }
  #kp-dialog .kp-bag-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 36px; gap: 11px; align-items: center; padding: 13px 0; border-bottom: 1px solid #e8ecdf; }
  #kp-dialog .kp-bag-row .kp-photo { margin: 0; border-radius: 8px; }
  .kp-bag-row h3 { font-size: 14px; font-weight: 600; }
  .kp-bag-row p { font-size: 13px; margin-top: 3px; }
  #kp-dialog .kp-bag-row button { background: none; border: 0; min-height: 44px; color: #59644a; }
  .kp-bag-total { display: flex; justify-content: space-between; font-weight: 700; padding: 20px 0; }
  #kp-dialog form { margin-top: 18px; }
  #kp-dialog .kp-draft-image { width: 100%; max-height: 240px; object-fit: contain; border-radius: 12px; margin-bottom: 12px; }
  #kp-dialog .kp-draft-image[hidden] { display: none; }
  @media (min-width: 540px) and (max-width: 767px) {
    .kp-app { max-width: 600px; margin-inline: auto; border-inline: 1px solid var(--kp-line); }
    .kp-bottom-nav { width: min(600px, 100%); margin: auto; }
  }
  @media (prefers-reduced-motion: reduce) {
    .kp-app * { scroll-behavior: auto; }
    .kp-pills-ready .kp-pill-indicator { transition: none; }
    .kp-nav-item[aria-current=page] .kp-nav-dots i { animation: none; }
  }
@media (max-width: 767px) { .kp-desktop-only { display: none !important; } }

/* The Profile footer link shares the existing light and dark footer colors. */
.kp-profile-footer a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: inherit; font-weight: 600; letter-spacing: .08em; }
.kp-profile-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
