/* Draped Silhouette — wine & bone: fashion-glossy editorial meets digital scrapbook.
   Two brand colors only (#2E031C and #E2E8C0); every other tone is one of them at a lower opacity. */
:root {
    --wine-rgb: 46, 3, 28;
    --wine: rgb(var(--wine-rgb));
    --wine-2: #3a0926;
    --wine-deep: #1b0010;
    --bone-rgb: 226, 232, 192;
    --bone: rgb(var(--bone-rgb));
    --glow-pink: rgba(120, 12, 66, 0.45);
    --bg: var(--wine);
    --surface: rgba(var(--bone-rgb), 0.035);
    --surface-2: rgba(var(--bone-rgb), 0.075);
    --line: rgba(var(--bone-rgb), 0.15);
    --line-2: rgba(var(--bone-rgb), 0.32);
    --text: var(--bone);
    --text-2: rgba(var(--bone-rgb), 0.76);
    --muted: rgba(var(--bone-rgb), 0.5);
    --accent: var(--bone);
    --glass: rgba(var(--wine-rgb), 0.58);
    /* Playfair Display, Cormorant Garamond and Inter cover Latin and Cyrillic;
       Space Mono is Latin-only, so Ukrainian tag text falls back to IBM Plex Mono */
    --display: 'Playfair Display', 'Didot', Georgia, serif;
    --serif: 'Playfair Display', Georgia, serif;
    --hand: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --mono: 'Space Mono', 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
    --gutter: clamp(16px, 4vw, 40px);
    --header-h: 76px;
    --radius: 4px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --spring: cubic-bezier(0.3, 1.4, 0.5, 1);
}

/* Phones (wide-gamut P3 screens like the iPhone) show the burgundy redder than a laptop does,
   so there the background leans a little more violet, to look like it does on the laptop */
@media (color-gamut: p3) {
    :root {
        /* the original cream reads green-yellow on the phone; a warm ivory with the same depth instead */
        --bone-rgb: 236, 226, 198;
        --wine-rgb: 44, 4, 38;
        --wine-2: #380a33;
        --wine-deep: #1a0017;
        --glow-pink: rgba(92, 16, 88, 0.24);
    }
}

/* A narrow screen is mostly covered by the pink glow on the right, so it is toned down there too */
@media (max-width: 720px) {
    :root {
        --glow-pink: rgba(120, 12, 66, 0.2);
    }
}

@media (max-width: 720px) and (color-gamut: p3) {
    :root {
        --glow-pink: rgba(92, 16, 88, 0.2);
    }
}

/* Reset & base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    background: var(--bg);
    color-scheme: dark;
    scrollbar-color: var(--line-2) var(--wine-deep);
}

html.has-modal {
    overflow: hidden;
}

body {
    position: relative;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Atmosphere: candle-glow gradients + film grain, fixed behind everything */
body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body::before {
    background:
        radial-gradient(55% 45% at 12% -5%, rgba(var(--bone-rgb), 0.09), transparent 70%),
        radial-gradient(45% 55% at 105% 35%, var(--glow-pink), transparent 70%),
        radial-gradient(80% 50% at 50% 115%, rgba(12, 0, 7, 0.7), transparent 70%);
}

body::after {
    opacity: 0.09;
    mix-blend-mode: screen;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.89 0 0 0 0 0.91 0 0 0 0 0.75 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

em {
    font-style: italic;
}

::selection {
    background: var(--bone);
    color: var(--wine);
}

:focus-visible {
    outline: 1px solid var(--bone);
    outline-offset: 3px;
}

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

/* Clothing-tag type: mono, uppercase, spaced */
.small-label,
.section-category,
.card-label,
.panel-meta,
.note-badge,
.kicker,
.mono-tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.small-label {
    display: block;
    color: var(--muted);
}

/* Scroll progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 1px;
    width: 0;
    background: var(--bone);
    box-shadow: 0 0 8px rgba(var(--bone-rgb), 0.6);
    z-index: 100;
}

/* ---------------------------------------------------- */
/* Header                                               */
/* ---------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(var(--wine-rgb), 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: 1280px;
    display: flex;
    align-items: center;
    gap: 36px;
    height: var(--header-h);
}

.logo {
    flex: none;
    font-family: var(--display);
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.01em;
}

.logo em {
    font-weight: 400;
}

.magazine-nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.magazine-nav::-webkit-scrollbar {
    display: none;
}

.nav-btn {
    position: relative;
    flex: none;
    padding: 10px 12px;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-2);
    transition: color 0.25s;
}

.nav-btn::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 4px;
    height: 1px;
    background: var(--bone);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
}

.nav-btn:hover {
    color: var(--text);
}

.nav-btn:hover::after {
    transform: scaleX(0.4);
}

.nav-btn.active {
    color: var(--text);
}

.nav-btn.active::after {
    transform: scaleX(1);
}

.header-tools {
    flex: none;
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    display: flex;
    padding: 2px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
}

.lang-btn {
    padding: 4px 10px;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--text-2);
    transition: color 0.25s, background 0.25s;
}

.lang-btn:hover {
    color: var(--text);
}

.lang-btn.active {
    background: var(--bone);
    color: var(--wine);
}

.header-social {
    flex: none;
    display: flex;
    color: var(--text-2);
    transition: color 0.25s, transform 0.35s var(--spring);
}

.header-social:hover {
    color: var(--text);
    transform: rotate(-8deg) scale(1.08);
}

/* ---------------------------------------------------- */
/* Sections                                             */
/* ---------------------------------------------------- */
.magazine-main,
.site-footer {
    position: relative;
    z-index: 1;
}

.magazine-section {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
    padding: clamp(36px, 6vw, 72px) 0 clamp(64px, 9vw, 110px);
}

.magazine-section.active {
    display: block;
    opacity: 1;
    transform: none;
}

/* Section heads rise in one line at a time */
.magazine-section.active .section-head > * {
    animation: rise 0.7s var(--ease) both;
}

.magazine-section.active .section-head > *:nth-child(2) { animation-delay: 0.06s; }
.magazine-section.active .section-head > *:nth-child(3) { animation-delay: 0.12s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
}

.section-head {
    max-width: 720px;
    margin-bottom: clamp(30px, 4.5vw, 52px);
    padding-bottom: clamp(22px, 3vw, 32px);
    border-bottom: 1px solid var(--line);
}

.section-category {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--text-2);
}

.section-category::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--line-2);
}

.section-main-title {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.02;
    letter-spacing: -0.015em;
}

/* "by Nana" signature after a section title */
.title-by {
    font-family: var(--hand);
    font-style: italic;
    font-weight: 400;
    font-size: 0.62em;
    color: var(--text-2);
    white-space: nowrap;
}

.section-subtitle {
    margin-top: 16px;
    color: var(--text-2);
    max-width: 62ch;
}

.list-intro {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 14px;
}

/* Headings keep Playfair's italic "&" (wrapped by app.js) */
.amp {
    font-family: var(--display);
    font-style: italic;
    font-weight: 400;
}

/* ---------------------------------------------------- */
/* Overview: hero                                       */
/* ---------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr);
    align-items: center;
    gap: clamp(28px, 5vw, 72px);
}

.intro {
    max-width: 720px;
}

.intro > * {
    animation: rise 0.8s var(--ease) both;
}

.intro > *:nth-child(2) { animation-delay: 0.08s; }
.intro > *:nth-child(3) { animation-delay: 0.16s; }
.intro > *:nth-child(4) { animation-delay: 0.24s; }

.kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-2);
}

.kicker-star {
    display: inline-block;
    width: 12px;
    height: 12px;
    flex: none;
    animation: twinkle 3.2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.35; transform: scale(0.8) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.1) rotate(45deg); }
}

.intro-title {
    margin-top: 18px;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2.5rem, 6.6vw, 5.2rem);
    line-height: 0.94;
    letter-spacing: -0.025em;
}

.intro-title em {
    font-weight: 400;
    color: var(--text-2);
}

.intro-text {
    margin-top: 24px;
    max-width: 56ch;
    color: var(--text-2);
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

/* Primary call to action: bone pill with a shimmer pass and a spinning star */
.btn-spin {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px 14px 20px;
    border-radius: 999px;
    background: var(--bone);
    color: var(--wine);
    font-size: 0.95rem;
    font-weight: 600;
    overflow: hidden;
    box-shadow: 0 10px 30px -12px rgba(var(--bone-rgb), 0.45);
    transition: transform 0.35s var(--spring), box-shadow 0.35s;
}

.btn-spin::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.65) 50%, transparent 70%);
    transform: translateX(-120%);
}

.btn-spin:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -12px rgba(var(--bone-rgb), 0.6);
}

.btn-spin:hover::after {
    transform: translateX(120%);
    transition: transform 0.9s var(--ease);
}

.btn-spin:active {
    transform: scale(0.97);
}

.spin-star {
    width: 16px;
    height: 16px;
    flex: none;
    transition: transform 0.8s var(--ease);
}

.btn-spin:hover .spin-star {
    transform: rotate(180deg);
}

.btn-spin-sm {
    padding: 10px 18px 10px 14px;
    font-size: 0.86rem;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.25s, border-color 0.25s;
}

.btn-ghost:hover {
    background: var(--surface-2);
    border-color: var(--bone);
}

/* SVG, not "↗": iOS turns that character into an emoji */
.ub-arrow {
    width: 0.72em;
    height: 0.72em;
    flex: none;
    transition: transform 0.35s var(--ease);
}

.btn-ghost:hover .ub-arrow,
.update-banner:hover .ub-arrow {
    transform: translate(2px, -2px);
}

/* Scrapbook corner: taped polaroid + woven care label */
.hero-scrap {
    position: relative;
    justify-self: center;
    padding: 12px 0 64px 56px;
    animation: rise 0.9s var(--ease) 0.2s both;
}

.polaroid {
    position: relative;
    width: clamp(180px, 19vw, 248px);
    padding: 9px 9px 0;
    background: var(--bone);
    transform: rotate(3deg);
    box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.6s var(--spring);
}

.polaroid:hover {
    transform: rotate(0.5deg) translateY(-4px) scale(1.02);
}

.polaroid img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    filter: saturate(0.85) contrast(1.04);
}

.polaroid figcaption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 2px 10px;
    color: var(--wine);
}

.hand {
    font-family: var(--hand);
    font-style: italic;
    font-weight: 500;
    font-size: 1.15rem;
    line-height: 1.1;
}

.polaroid .mono-tag {
    font-size: 0.56rem;
    opacity: 0.7;
}

/* Striped washi tape */
.tape {
    position: absolute;
    width: 74px;
    height: 22px;
    z-index: 2;
    background: repeating-linear-gradient(135deg, rgba(var(--bone-rgb), 0.78) 0 6px, rgba(160, 60, 105, 0.55) 6px 12px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    opacity: 0.92;
}

.tape-a {
    top: -11px;
    left: -18px;
    transform: rotate(-32deg);
}

.tape-b {
    top: -9px;
    right: -20px;
    transform: rotate(28deg);
}

.care-label {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 196px;
    padding: 22px 14px 12px;
    background: var(--bone);
    color: var(--wine);
    transform: rotate(-5deg);
    box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.6);
    transition: transform 0.6s var(--spring);
}

.care-label::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px dashed rgba(var(--wine-rgb), 0.35);
    pointer-events: none;
}

.care-label:hover {
    transform: rotate(-2deg) translateY(-3px);
}

.care-hole {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    border-radius: 50%;
    background: var(--wine);
}

.care-title {
    display: block;
    text-align: center;
    font-family: var(--display);
    font-style: italic;
    font-size: 0.86rem;
    padding-bottom: 6px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(var(--wine-rgb), 0.25);
}

.today-label {
    display: flex;
    flex-direction: column;
    min-height: 3.4em;
}

.tl-row {
    display: grid;
    grid-template-columns: 4.6em minmax(0, 1fr);
    gap: 6px;
    padding: 3px 0;
    font-family: var(--mono);
    font-size: 0.62rem;
    line-height: 1.35;
    animation: rise 0.5s var(--ease) both;
}

.tl-row + .tl-row {
    border-top: 1px solid rgba(var(--wine-rgb), 0.12);
}

.tl-row dt {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.6;
}

/* ---------------------------------------------------- */
/* Overview: marquee banner                             */
/* ---------------------------------------------------- */
.update-banner {
    display: block;
    width: 100%;
    margin-top: clamp(40px, 6vw, 72px);
    border-block: 1px solid var(--line-2);
    overflow: hidden;
}

.ub-row {
    display: block;
    overflow: hidden;
    padding: 12px 0 14px;
    font-family: var(--display);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(1.7rem, 4.6vw, 3.2rem);
    line-height: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.ub-row-a {
    background: var(--bone);
    color: var(--wine);
}

.ub-row-b {
    color: transparent;
    -webkit-text-stroke: 1px var(--bone);
}

.ub-track {
    display: flex;
    width: max-content;
    animation: ub-marquee 34s linear infinite;
}

.ub-row-b .ub-track {
    animation-direction: reverse;
}

.update-banner:hover .ub-track {
    animation-duration: 18s;
}

.ub-unit {
    padding-right: 0.35em;
}

.ub-mid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 16px clamp(14px, 2vw, 22px);
    background: var(--surface);
    border-block: 1px solid var(--line);
}

.ub-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-2);
}

.ub-stats {
    display: flex;
    justify-content: center;
    gap: clamp(14px, 3vw, 40px);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-2);
}

.ub-stats b {
    font-family: var(--display);
    font-weight: 400;
    font-size: 1.5rem;
    letter-spacing: 0;
    color: var(--text);
    margin-right: 4px;
    vertical-align: -0.12em;
}

.ub-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--bone);
    color: var(--wine);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.35s var(--spring);
}

.update-banner:hover .ub-cta {
    transform: translateX(-3px);
}

@keyframes ub-marquee {
    to { transform: translateX(-50%); }
}

/* ---------------------------------------------------- */
/* Overview: cards                                      */
/* ---------------------------------------------------- */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: clamp(40px, 6vw, 64px);
    border-top: 1px solid var(--line);
}

.overview-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 28px 28px 32px 0;
    border-bottom: 1px solid var(--line);
    transition: background 0.35s;
}

.overview-card:nth-child(even) {
    padding-left: 28px;
    padding-right: 0;
    border-left: 1px solid var(--line);
}

.overview-card-wide {
    grid-column: 1 / -1;
    padding-right: 0;
}

.overview-card-wide .card-title {
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}

/* After the wide card, the odd/even columns flip */
.overview-card-wide ~ .overview-card:nth-child(even) {
    padding-left: 0;
    padding-right: 28px;
    border-left: 0;
}

.overview-card-wide ~ .overview-card:nth-child(odd) {
    padding-left: 28px;
    padding-right: 0;
    border-left: 1px solid var(--line);
}

.overview-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: var(--bone);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--ease);
}

.overview-card:hover::after {
    transform: scaleX(1);
}

.card-num {
    font-family: var(--display);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--muted);
    transition: color 0.3s, transform 0.4s var(--spring);
}

.overview-card:hover .card-num {
    color: var(--text);
    transform: translateX(4px);
}

.card-label {
    color: var(--text-2);
}

.card-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
}

/* Small "New" pill next to a card title */
.card-new {
    padding: 2px 9px;
    border: 1px solid var(--bone);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.card-title {
    font-family: var(--display);
    font-size: 1.55rem;
    font-weight: 400;
    line-height: 1.1;
}

.card-desc {
    max-width: 60ch;
    font-size: 0.92rem;
    color: var(--text-2);
}

/* ---------------------------------------------------- */
/* Lookbook                                             */
/* ---------------------------------------------------- */
.looks-toolbar,
.roulette-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}

.looks-toolbar {
    margin-bottom: clamp(26px, 4vw, 40px);
}

.looks-toolbar .btn-spin {
    margin-left: auto;
}

.chip-group {
    display: flex;
    gap: 6px;
}

.chip {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-2);
    transition: color 0.25s, background 0.25s, border-color 0.25s;
}

.chip:hover:not(:disabled) {
    color: var(--text);
    border-color: var(--bone);
}

.chip.active {
    background: var(--bone);
    border-color: var(--bone);
    color: var(--wine);
}

.chip:disabled {
    opacity: 0.4;
    cursor: default;
}

.looks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 44px 28px;
}

.looks-empty {
    grid-column: 1 / -1;
    padding: 40px 0;
    font-family: var(--hand);
    font-style: italic;
    font-size: 1.4rem;
    color: var(--text-2);
}

.look-card {
    position: relative;
    animation: rise 0.6s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 45ms);
}

/* ---------------------------------------------------- */
/* Pull a trinket: a jewellery box that opens and picks */
/* one accessory for today                              */
/* ---------------------------------------------------- */
/* The box's halo, sparkles and shine reach past the box; on phones that made the page slide
   sideways. The wrap spans the full screen width and clips anything beyond it. */
.tbox-wrap {
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter);
    overflow-x: clip;
}

.tbox-stage {
    position: relative;
    max-width: 1000px;
    height: clamp(560px, 54vw, 640px);
    margin: 0 auto;
}

.tbox-items {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

/* The box: a round antique-bronze trinket box carved with oak leaves, a rose with fairy wings
   on the lid (one SVG, built in trinkets.js). It is a button, so a tap on it opens it too. */
.tbox {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 2;
    width: 420px;
    margin-left: -210px;
    text-align: center;
}

.tbox-stage.is-open .tbox {
    cursor: default;
}

/* The box is drawn as stacked SVG layers of the same size; moving parts move as whole layers */
.tbox {
    aspect-ratio: 400 / 390;
    /* Closed, the box sits high so it is on screen right away; it glides down when it opens */
    --rise: -170px;
    transform: translateY(var(--rise));
    transition: transform 1s var(--ease) 0.7s;
}

.tbox-stage.is-open .tbox,
.tbox-stage.keep-down .tbox {
    transform: translateY(0);
    transition-delay: 0s;
}

.jb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Soft bone halo around the box, like the glow under the "What to wear today?" button */
.tbox-halo {
    position: absolute;
    left: -16%;
    right: -16%;
    top: 4%;
    bottom: -8%;
    background: radial-gradient(closest-side, rgba(var(--bone-rgb), 0.3), rgba(var(--bone-rgb), 0.1) 60%, rgba(var(--bone-rgb), 0));
    opacity: 0.75;
    pointer-events: none;
    transition: opacity 0.6s;
}

.tbox:hover .tbox-halo,
.tbox-stage.is-open .tbox-halo {
    opacity: 1;
}

.jb-layer-lid {
    transform-origin: 50% 40%;
    transition: transform 1.1s var(--spring);
    animation: tbox-rattle 4.5s ease-in-out 1.2s infinite;
    will-change: transform;
}

/* A closed box hops now and then, like something wants out (straight up, no tilt) */
@keyframes tbox-rattle {
    0%, 82%, 100% { transform: translateY(0); }
    86% { transform: translateY(-9px); }
    90% { transform: translateY(0); }
    94% { transform: translateY(-4px); }
}

.tbox-stage:not(.is-open) .tbox:hover .jb-layer-lid,
.tbox-stage:not(.is-open) .tbox:focus-visible .jb-layer-lid {
    animation: none;
    transform: translateY(-14px);
}

/* Open: the lid lifts straight up and floats above the box, as if by magic */
.tbox-stage.is-open .jb-layer-lid {
    transform: translateY(var(--lift, -80px));
    transition-delay: 0.85s;
    animation: tbox-float 3.4s ease-in-out 2s infinite;
}

/* When pulling another, the box stays down: no extra wait for the lid */
.tbox-stage.keep-down.is-open .tbox-chip {
    --od: 450ms;
}

.tbox-stage.keep-down.is-open .jb-layer-lid {
    transition-delay: 0s;
}

@keyframes tbox-float {
    0%, 100% { transform: translateY(var(--lift, -80px)); }
    50% { transform: translateY(calc(var(--lift, -80px) - 12px)); }
}

/* Warm light leaking from under the lid while it is closed */
.jb-layer-seam {
    animation: tbox-seam 3s ease-in-out infinite;
    transition: opacity 0.4s;
}

@keyframes tbox-seam {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.8; }
}

.tbox-stage.is-open .jb-layer-seam {
    animation: none;
    opacity: 0;
}

/* Light beam and glow when the box is open (all blurred, so nothing looks cut off) */
.jb-layer-light {
    opacity: 0;
    transition: opacity 0.9s var(--ease) 0.15s;
}

.tbox-stage.is-open .jb-layer-light {
    opacity: 1;
    transition-delay: 0.95s;
}

/* A glossy shine sweeps across the lacquer now and then, like on the button */
.jb-shine {
    animation: tbox-shine 7s var(--ease) 2s infinite;
}

@keyframes tbox-shine {
    0%, 76% { transform: translateX(0); }
    100% { transform: translateX(640px); }
}

.jb-layer-shine {
    transition: opacity 0.3s;
}

.tbox-stage.is-open .jb-layer-shine {
    opacity: 0;
}

/* The little N°0145 tag sways on its string (pivot = where the string meets the clasp) */
.jb-layer-tag {
    transform-origin: 50% 74.2%;
    animation: tbox-sway 3.6s ease-in-out infinite;
}

@keyframes tbox-sway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(4deg); }
}

/* Fairy dust rising from the open box */
.tbox-dust {
    position: absolute;
    left: 50%;
    bottom: 46%;
    z-index: 1;
    width: 0;
    height: 0;
    pointer-events: none;
}

.tbox-dust i {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff8e2;
    box-shadow: 0 0 8px 2px rgba(var(--bone-rgb), 0.7);
    opacity: 0;
}

.tbox-stage.is-open .tbox-dust i {
    animation: tbox-dust 3.2s ease-out infinite;
}

.tbox-dust i:nth-child(1) { --dx: -110px; animation-delay: 0s; }
.tbox-dust i:nth-child(2) { --dx: -70px; animation-delay: 0.5s; width: 3px; height: 3px; }
.tbox-dust i:nth-child(3) { --dx: -30px; animation-delay: 1.1s; }
.tbox-dust i:nth-child(4) { --dx: 10px; animation-delay: 0.3s; width: 5px; height: 5px; }
.tbox-dust i:nth-child(5) { --dx: 50px; animation-delay: 1.6s; width: 3px; height: 3px; }
.tbox-dust i:nth-child(6) { --dx: 90px; animation-delay: 0.8s; }
.tbox-dust i:nth-child(7) { --dx: -90px; animation-delay: 2.1s; width: 3px; height: 3px; }
.tbox-dust i:nth-child(8) { --dx: -10px; animation-delay: 2.5s; }
.tbox-dust i:nth-child(9) { --dx: 70px; animation-delay: 1.9s; width: 5px; height: 5px; }
.tbox-dust i:nth-child(10) { --dx: 120px; animation-delay: 2.8s; width: 3px; height: 3px; }

@keyframes tbox-dust {
    0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
    15% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), -230px) scale(1.2); }
}

.tbox:focus-visible {
    outline: none;
}

.tbox:focus-visible .tbox-halo {
    opacity: 1;
    background: radial-gradient(closest-side, rgba(var(--bone-rgb), 0.5), rgba(var(--bone-rgb), 0));
}

/* Light pouring out of the open box */
.tbox-glow {
    position: absolute;
    left: 50%;
    bottom: 90px;
    width: 560px;
    height: 380px;
    margin-left: -280px;
    /* closest-side keeps the light fading out before the element's edges, so no hard line shows */
    background: radial-gradient(closest-side at 50% 62%, rgba(255, 246, 216, 0.34), rgba(var(--bone-rgb), 0));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s var(--ease);
}

.tbox-stage.is-open .tbox-glow {
    opacity: 1;
}

/* Twinkling stars over the closed box */
.tbox-sparkles {
    position: absolute;
    left: -90px;
    right: -90px;
    bottom: 260px;
    height: 220px;
    pointer-events: none;
    transition: opacity 0.4s;
}

.tbox-stage.is-open .tbox-sparkles {
    opacity: 0;
}

.tbox-spark {
    position: absolute;
    color: var(--bone);
    animation: tbox-twinkle 2.8s ease-in-out infinite;
}

.tbox-spark.s1 { left: 10%; bottom: 10px; width: 18px; height: 18px; }
.tbox-spark.s2 { left: 47%; bottom: 120px; width: 30px; height: 30px; animation-delay: 0.7s; }
.tbox-spark.s3 { left: 84%; bottom: 46px; width: 16px; height: 16px; animation-delay: 1.4s; }
.tbox-spark.s4 { left: 26%; bottom: 170px; width: 12px; height: 12px; animation-delay: 2.1s; }
.tbox-spark.s5 { left: 68%; bottom: 190px; width: 10px; height: 10px; animation-delay: 1.1s; }

@keyframes tbox-twinkle {
    0%, 100% { opacity: 0.15; transform: scale(0.6) rotate(0deg); }
    50% { opacity: 0.95; transform: scale(1) rotate(45deg); }
}

/* Trinkets: little bone tags that fly out of the box */
.tbox-chip {
    position: absolute;
    left: 50%;
    bottom: 230px;
    z-index: 1;
    width: 104px;
    height: 118px;
    margin: 0 0 -59px -52px;
    padding: 20px 8px 8px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: var(--bone);
    color: var(--wine);
    box-shadow: 0 16px 24px -14px rgba(0, 0, 0, 0.85);
    opacity: 0;
    pointer-events: none;
    transform: translate(0, 0) rotate(0deg) scale(0.2);
    transition: transform 0.95s var(--spring) calc(var(--d, 0ms) + var(--od, 0ms)), opacity 0.4s calc(var(--d, 0ms) + var(--od, 0ms)), box-shadow 0.25s;
}

/* Product photos sit on the bone tag as a small white print, like the polaroid on the cover */
.tbox-print {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(var(--wine-rgb), 0.25);
}

.tbox-print img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Photos on a coloured backdrop fill the print and sit a little closer */
.tbox-print.is-fill img {
    object-fit: cover;
    transform: scale(1.18);
}

.tbox-chip-hole {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    border-radius: 50%;
    background: var(--wine);
}

.tbox-stage.is-open .tbox-chip {
    /* trinkets fly out once the box has come down and the lid is up */
    --od: 1000ms;
    opacity: 1;
    pointer-events: auto;
    transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1);
}

.tbox-stage.is-open .tbox-chip:not(.is-picked):hover {
    --d: 0ms;
    --od: 0ms;
    transform: translate(var(--x), var(--y)) rotate(0deg) scale(1.1);
}

/* The roulette light running over the trinkets */
.tbox-chip.is-lit {
    box-shadow: 0 0 0 2px var(--bone), 0 0 30px 8px rgba(var(--bone-rgb), 0.55);
}

.tbox-stage.is-open .tbox-chip.is-picked {
    --d: 0ms;
    --od: 0ms;
    z-index: 3;
    transform: translate(var(--x), var(--y)) rotate(0deg) scale(1.3);
    box-shadow: 0 0 0 2px var(--bone), 0 0 40px 12px rgba(var(--bone-rgb), 0.5);
}

.tbox-stage.is-open .tbox-chip.is-dim {
    --d: 0ms;
    --od: 0ms;
    opacity: 0.42;
}

.tbox-stage.is-open .tbox-chip.is-dim:hover {
    opacity: 0.9;
}

.tbox-chip:focus-visible {
    outline: 1px solid var(--wine);
    outline-offset: -5px;
}

.tbox-actions {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.tbox-go:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Result: today's trinket with a one-line tip and magazine links */
/* The result pops up over the box as a frosted-glass card (like the "What to wear today?" window) */
.tbox-result {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 6;
    width: min(600px, calc(100% - 24px));
    max-height: calc(100% - 24px);
    overflow: auto;
    padding: 26px 24px 20px;
    border: 1px solid var(--line-2);
    border-radius: 14px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(var(--bone-rgb), 0.12);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -46%) scale(0.95);
    transition: opacity 0.7s var(--ease), transform 0.9s var(--spring);
}

.tbox-result.is-shown {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.tbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    color: var(--text);
    transition: background 0.25s, color 0.25s;
}

.tbox-close:hover,
.tbox-close:focus-visible {
    background: var(--bone);
    color: var(--wine);
}

.tbox-close svg {
    width: 12px;
    height: 12px;
}

.tbox-again {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

/* The picked trinket flies to the centre and melts into the card */
.tbox-stage.is-open .tbox-chip.is-flying {
    --d: 0ms;
    z-index: 4;
    opacity: 0;
    transform: translate(0, var(--cy, -100px)) rotate(0deg) scale(1.8);
    transition: transform 1.2s var(--ease), opacity 0.6s ease 0.85s;
}

.tbox-hint {
    margin-top: 14px;
    font-family: var(--hand);
    font-style: italic;
    font-size: 1.35rem;
    text-align: center;
    color: var(--text-2);
}

.tbox-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 26px;
    align-items: center;
}

.tbox-card-tag {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    padding: 22px 10px 10px;
    border-radius: 4px;
    background: var(--bone);
    color: var(--wine);
    transform: rotate(-4deg);
    box-shadow: 0 18px 26px -16px rgba(0, 0, 0, 0.85);
    transition: transform 0.4s var(--spring);
}

.tbox-card-tag:hover {
    transform: rotate(0deg) scale(1.05);
}

/* The piece to buy: brand · name, and a bone "Shop" pill */
.tbox-buy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 14px;
}

.tbox-piece {
    font-size: 0.88rem;
    color: var(--text-2);
}

.tbox-piece b {
    font-weight: 600;
    color: var(--text);
}

.tbox-shop {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--bone);
    color: var(--wine);
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 8px 22px -10px rgba(var(--bone-rgb), 0.5);
    transition: transform 0.3s var(--spring), box-shadow 0.3s;
}

.tbox-shop:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -10px rgba(var(--bone-rgb), 0.65);
}

.tbox-shop svg {
    width: 9px;
    height: 9px;
}

.tbox-sources {
    margin-top: 12px;
}

.tbox-sources .trinket-sources {
    margin-top: 6px;
}

/* "Picked from": the Vogue edits, centred under the box */
.tbox-inspo {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 12px;
    max-width: 660px;
    margin: 26px auto 0;
}

.tbox-inspo .trinket-sources {
    margin-top: 0;
    justify-content: center;
}

.tbox-name {
    margin-top: 6px;
    font-family: var(--display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.7rem, 3.4vw, 2.3rem);
    line-height: 1.05;
}

.tbox-tip {
    margin-top: 8px;
    font-size: 1.02rem;
    color: var(--text);
}

.tbox-shows {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin-top: 12px;
    font-size: 0.86rem;
    color: var(--text-2);
}

.trinket-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding: 0;
    list-style: none;
}

.trinket-sources a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
    transition: background 0.25s, color 0.25s;
}

.trinket-sources a:hover,
.trinket-sources a:focus-visible {
    background: var(--bone);
    color: var(--wine);
}

.trinket-sources svg {
    width: 8px;
    height: 8px;
}

@media (max-width: 640px) {
    .tbox-stage {
        height: 600px;
    }

    .tbox {
        --lift: -56px;
        --rise: -150px;
        width: 330px;
        margin-left: -165px;
        bottom: 20px;
    }

    .tbox-sparkles {
        bottom: 180px;
        left: -14px;
        right: -14px;
    }

    .tbox-halo {
        left: -7%;
        right: -7%;
    }

    .tbox-glow {
        bottom: 50px;
        width: 360px;
        margin-left: -180px;
    }

    .tbox-glow {
        width: 360px;
        margin-left: -180px;
    }

    .tbox-chip {
        bottom: 165px;
        width: 74px;
        height: 84px;
        margin: 0 0 -42px -37px;
        padding: 15px 10px 8px;
    }

    .tbox-card {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 16px;
    }

    .tbox-result {
        padding: 22px 16px 16px;
    }

    .tbox-card-tag {
        padding: 16px 9px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jb-layer-lid,
    .jb-layer-light,
    .jb-layer-seam,
    .jb-shine,
    .jb-layer-tag,
    .tbox-dust i,
    .tbox-chip,
    .tbox-glow,
    .tbox-spark {
        transition: none;
        animation: none;
    }

    .tbox-result,
    .tbox-stage.is-open .tbox-chip.is-flying {
        transition: none;
    }
}

/* Hero layout: the statement piece large, four supporting pieces pinned in a row below it */
.hero-collage {
    position: relative;
    padding: 4px 4px 0;
}

.hero-collage img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: #f4f4f1;
    border: 4px solid var(--bone);
    box-shadow: 0 14px 24px -12px rgba(0, 0, 0, 0.65);
    transform: rotate(var(--r, 0deg));
    transition: transform 0.55s var(--spring), box-shadow 0.4s var(--ease);
}

/* The hero photo and its tape move as one frame */
.hero-frame {
    position: relative;
    width: 64%;
    margin: 0 auto;
    transform: rotate(-1.5deg);
    transition: transform 0.55s var(--spring);
}

.hero-row {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 88%;
    margin: -16% auto 0;
}

.hero-row img {
    border-width: 3px;
    transition-delay: calc(var(--n, 0) * 40ms);
}

/* Each small shot has its own tilt and a direction to fly out to on hover */
.hero-row img:nth-child(1) { --n: 0; --r: -5deg; --dx: -14px; --dy: -10px; }
.hero-row img:nth-child(2) { --n: 1; --r: 3deg; --dx: -5px; --dy: -16px; }
.hero-row img:nth-child(3) { --n: 2; --r: -3deg; --dx: 5px; --dy: -14px; }
.hero-row img:nth-child(4) { --n: 3; --r: 5deg; --dx: 14px; --dy: -8px; }

/* Hover: the hero lifts and straightens, the four pieces fan out around it */
.look-card:hover .hero-frame {
    transform: rotate(1.5deg) translateY(-8px) scale(1.04);
}

.look-card:hover .hero-shot {
    box-shadow: 0 26px 34px -16px rgba(0, 0, 0, 0.75);
}

.look-card:hover .hero-row img {
    transform: rotate(calc(var(--r, 0deg) * 2.2)) translate(var(--dx, 0), var(--dy, 0)) scale(1.08);
}

.look-card:hover .hero-row img:hover {
    transform: rotate(0deg) translate(var(--dx, 0), calc(var(--dy, 0px) - 10px)) scale(1.22);
    z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
    .hero-collage img,
    .hero-frame,
    .hero-row img {
        transition: none;
    }
}

.hero-frame .tape {
    top: -9px;
    left: 50%;
    width: 64px;
    height: 18px;
    margin-left: -32px;
    z-index: 5;
    transform: rotate(-8deg);
}

.look-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.look-no {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.look-pair {
    display: inline-flex;
}

.look-pair i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    box-shadow: 0 0 0 1.5px var(--bg), inset 0 0 0 1px rgba(var(--bone-rgb), 0.2);
}

.look-pair i + i {
    margin-left: -4px;
}

.look-name {
    margin-top: 6px;
    font-family: var(--display);
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 1.12;
    transition: color 0.25s;
}

.look-open {
    position: absolute;
    inset: 0;
    z-index: 6;
}

.heart-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 7;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    background: var(--glass);
    color: var(--text);
    transition: background 0.25s, border-color 0.25s;
}

.heart-btn svg,
.save-btn svg {
    width: 18px;
    height: 18px;
}

.heart-btn:hover {
    border-color: var(--bone);
}

.heart-btn.is-on {
    background: var(--bone);
    color: var(--wine);
}

.heart-btn.is-on path,
.save-btn.is-on path {
    fill: currentColor;
}

.heart-btn.pop {
    animation: heart-pop 0.45s var(--spring);
}

@keyframes heart-pop {
    40% { transform: scale(1.25); }
}

.source-note {
    margin-top: clamp(32px, 5vw, 48px);
    font-family: var(--mono);
    font-size: 0.64rem;
    letter-spacing: 0.06em;
    color: var(--muted);
}

/* Product tile (roulette result, capsule "shop the piece") — Who What Wear-style shopping card */
.item {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    transition: transform 0.4s var(--spring), border-color 0.25s, background 0.25s;
}

.item img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: #f4f4f1;
    transition: transform 0.7s var(--ease);
}

.item:hover {
    transform: translateY(-3px);
    border-color: var(--line-2);
    background: var(--surface-2);
}

.item:hover img {
    transform: scale(1.04);
}

.item-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    padding: 10px 12px 12px;
    background: inherit;
}

/* Shop link sits on the bottom edge so every card in a row ends the same way */
.item-body .item-shop {
    margin-top: auto;
    padding-top: 6px;
}

.item-slot {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.item-brand {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.item-name {
    font-size: 0.84rem;
    line-height: 1.35;
    color: var(--text-2);
}

.item-shop {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-family: var(--mono);
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.item-shop svg {
    width: 9px;
    height: 9px;
    transition: transform 0.35s var(--ease);
}

.item:hover .item-shop svg {
    transform: translate(2px, -2px);
}

/* Capsule panel: two horizontal product tiles */
.shop-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.shop-row .item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
}

.shop-row .item img {
    height: 100%;
    aspect-ratio: auto;
    min-height: 95px;
}

.shop-row .item-body {
    padding: 8px 10px;
}

/* ---------------------------------------------------- */
/* Floating roulette badge                              */
/* ---------------------------------------------------- */
.roulette-fab {
    position: fixed;
    right: clamp(14px, 2.5vw, 28px);
    bottom: clamp(14px, 2.5vw, 28px);
    z-index: 40;
    display: grid;
    place-items: center;
    width: 98px;
    height: 98px;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    background: var(--glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--bone);
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7);
    transition: transform 0.45s var(--spring), opacity 0.3s, background 0.3s;
}

.roulette-fab:hover {
    transform: scale(1.07);
    background: rgba(var(--wine-rgb), 0.82);
}

.fab-ring {
    position: absolute;
    inset: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    animation: fab-spin 20s linear infinite;
}

.fab-ring text {
    font-family: var(--mono);
    font-size: 8.4px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    fill: currentColor;
}

.roulette-fab:hover .fab-ring {
    animation-duration: 6s;
}

.fab-star {
    width: 24px;
    height: 24px;
    transition: transform 0.8s var(--ease);
}

.roulette-fab:hover .fab-star {
    transform: rotate(180deg) scale(1.15);
}

@keyframes fab-spin {
    to { transform: rotate(360deg); }
}

html.has-modal .roulette-fab,
html.footer-in-view .roulette-fab {
    opacity: 0;
    pointer-events: none;
}

/* the badge slips away while the footer is on screen, so it never covers "2026 vslnana" */
html.footer-in-view .roulette-fab {
    transform: scale(0.85);
}

/* ---------------------------------------------------- */
/* Roulette dialog (frosted glass)                      */
/* ---------------------------------------------------- */
.roulette {
    width: min(1000px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--line-2);
    border-radius: 18px;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(var(--bone-rgb), 0.07), transparent 38%),
        rgba(var(--wine-rgb), 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(var(--bone-rgb), 0.12);
    overflow: auto;
    overscroll-behavior: contain;
}

.roulette[open] {
    animation: dialog-in 0.45s var(--ease);
}

.roulette:focus,
.roulette:focus-visible {
    outline: none;
}

.roulette.is-closing {
    animation: dialog-out 0.22s ease-in forwards;
}

.roulette::backdrop {
    background: rgba(18, 0, 9, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
}

@keyframes dialog-out {
    to { opacity: 0; transform: translateY(10px) scale(0.98); }
}

.roulette-inner {
    padding: clamp(18px, 3vw, 34px);
}

.roulette-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.roulette-meta {
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-2);
}

.icon-btn {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    transition: transform 0.4s var(--spring), border-color 0.25s;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.icon-btn:hover {
    transform: rotate(90deg);
    border-color: var(--bone);
}

.roulette-title {
    margin: 22px 0 18px;
    font-family: var(--display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.015em;
}

.roulette-controls {
    justify-content: space-between;
}

/* Horizontal reel with a needle in the middle */
.reel {
    position: relative;
    margin: 24px calc(-1 * clamp(18px, 3vw, 34px)) 0;
    padding: 20px 0 16px;
    border-block: 1px solid var(--line);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.roulette.is-view .reel {
    display: none;
}

.reel-needle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: 3;
    width: 1px;
    background: var(--bone);
    box-shadow: 0 0 12px rgba(var(--bone-rgb), 0.8);
}

.reel-needle::before,
.reel-needle::after {
    content: '';
    position: absolute;
    left: -6px;
    border: 6px solid transparent;
}

.reel-needle::before {
    top: 0;
    border-top-color: var(--bone);
}

.reel-needle::after {
    bottom: 0;
    border-bottom-color: var(--bone);
}

.roulette.is-spinning .reel-needle {
    animation: needle 0.18s ease-in-out infinite alternate;
}

@keyframes needle {
    to { box-shadow: 0 0 22px rgba(var(--bone-rgb), 1); }
}

.reel-track {
    display: flex;
    gap: 14px;
    width: max-content;
    will-change: transform;
}

.reel-card {
    flex: none;
    width: 128px;
    transition: transform 0.18s ease-out, opacity 0.3s;
}

.reel-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    padding: 4px;
    background: var(--bone);
    border-radius: 3px;
}

.reel-tiles img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: #f4f4f1;
}

.reel-no {
    display: block;
    margin-top: 6px;
    text-align: center;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.reel-card.is-near {
    transform: scale(1.06);
}

.reel-card.is-winner {
    transform: scale(1.1);
}

.reel-card.is-winner .reel-tiles {
    box-shadow: 0 0 0 1px var(--bone), 0 0 36px rgba(var(--bone-rgb), 0.45);
    animation: winner 1.6s ease-in-out infinite alternate;
}

.reel-card.is-winner .reel-no {
    color: var(--text);
}

@keyframes winner {
    to { box-shadow: 0 0 0 1px var(--bone), 0 0 14px rgba(var(--bone-rgb), 0.2); }
}

/* Result */
.roulette-result {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.roulette-result.is-shown {
    opacity: 1;
    transform: none;
}

.result-card {
    position: relative;
    padding-top: 22px;
}

.result-card .look-meta {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    justify-content: flex-start;
    gap: 18px;
    padding-right: 120px;
}

.result-name {
    margin-top: 8px;
    padding-right: 120px;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(1.9rem, 3.8vw, 2.8rem);
    line-height: 1.05;
}

.result-narrative {
    margin-top: 10px;
    max-width: 62ch;
    color: var(--text-2);
}

/* Rubber stamp */
.stamp {
    position: absolute;
    top: 14px;
    right: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    border: 1px solid var(--bone);
    box-shadow: inset 0 0 0 4px var(--wine-2), inset 0 0 0 5px var(--line-2);
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
    transform: rotate(-12deg);
}

.stamp svg {
    width: 14px;
    height: 14px;
}

.is-fresh .stamp {
    animation: stamp-in 0.6s var(--spring) 0.15s both;
}

@keyframes stamp-in {
    from { opacity: 0; transform: rotate(-30deg) scale(1.8); }
}

.result-items {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.result-items[data-count="5"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.result-items[data-count="6"] {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.result-items[data-count="6"] .item-name {
    font-size: 0.78rem;
}

.result-items .item {
    animation: rise 0.55s var(--ease) both;
    animation-delay: calc(0.1s + var(--i, 0) * 70ms);
}

.result-items .item.is-hero img {
    outline: 1px solid var(--bone);
    outline-offset: 3px;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.result-card .source-note {
    margin-top: 18px;
}

/* ---------------------------------------------------- */
/* Inspector layout (capsule + analysis)                */
/* ---------------------------------------------------- */
.inspector {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}

.capsule-pillars-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
}

.capsule-pillar-card {
    position: relative;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    transition: background 0.25s, padding 0.35s var(--ease);
}

.row-num {
    padding-top: 2px;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.pillar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pillar-category {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.pillar-title {
    font-family: var(--display);
    font-size: 1.12rem;
    font-weight: 400;
    line-height: 1.2;
}

.pillar-tag {
    font-size: 0.84rem;
    color: var(--muted);
}

.capsule-pillar-card:hover {
    background: var(--surface);
    padding-left: 18px;
}

.capsule-pillar-card.active {
    background: var(--surface-2);
    padding-left: 18px;
}

.capsule-pillar-card.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--bone);
}

.capsule-pillar-card.active .row-num,
.capsule-pillar-card.active .pillar-category {
    color: var(--text);
}

.inspector-panel {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    padding: clamp(20px, 3vw, 34px);
}

.panel-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.panel-badge {
    color: var(--text);
}

.panel-meta-right {
    color: var(--muted);
}

.panel-heading {
    margin-top: 16px;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
    line-height: 1.05;
}

.panel-lead {
    margin-top: 12px;
    color: var(--text-2);
}

.anatomy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.anatomy-value {
    margin-top: 4px;
    font-size: 0.92rem;
}

.panel-block {
    margin-top: 28px;
}

.shop-piece[hidden] {
    display: none;
}

/* Small tabs (looks + accessory tabs) */
.underline-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.underline-tabs button {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-size: 0.8rem;
    color: var(--text-2);
    transition: color 0.25s, background 0.25s, border-color 0.25s;
}

.underline-tabs button:hover {
    color: var(--text);
    border-color: var(--bone);
}

.underline-tabs button.active {
    color: var(--wine);
    background: var(--bone);
    border-color: var(--bone);
}

.look-tags-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    margin-top: 10px;
}

.look-tag {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.look-tag-k {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.look-tag-v {
    font-size: 0.9rem;
}

/* Accessories have no looks: drop the empty tabs/tags and show "why it works" as plain text */
.is-accessory .underline-tabs,
.is-accessory .look-tags-row {
    display: none;
}

.is-accessory .look-narrative {
    margin-top: 6px;
    font-family: var(--sans);
    font-style: normal;
    font-size: 1rem;
}

.look-narrative {
    margin-top: 14px;
    font-family: var(--hand);
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.4;
    color: var(--text-2);
}

.panel-note {
    margin-top: 28px;
    padding: 14px 18px;
    background: var(--surface-2);
    border-left: 1px solid var(--bone);
}

.note-badge {
    color: var(--text);
}

.note-body {
    margin-top: 4px;
    font-size: 0.92rem;
    color: var(--text-2);
}

/* Pill buttons, result cards and tags */
.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 0.25s, border-color 0.25s, transform 0.35s var(--spring);
}

.pill-btn svg {
    width: 15px;
    height: 15px;
    flex: none;
}

.pill-btn:hover {
    border-color: var(--bone);
    transform: translateY(-2px);
}

.pill-btn:active {
    transform: scale(0.97);
}

.pill-btn.primary {
    background: var(--bone);
    border-color: var(--bone);
    color: var(--wine);
    font-weight: 600;
}

.pill-btn.primary:hover svg {
    transform: rotate(180deg);
    transition: transform 0.8s var(--ease);
}

.save-btn.is-on {
    background: var(--surface-2);
    border-color: var(--bone);
}

.reading-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(20px, 3vw, 34px);
    animation: rise 0.5s var(--ease);
}

.artifacts-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.artifact-pill {
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-size: 0.82rem;
    color: var(--text-2);
}

/* ---------------------------------------------------- */
/* Archetype test & style analysis                      */
/* ---------------------------------------------------- */
.archetype-quiz {
    max-width: 700px;
}

.quiz-card {
    padding: clamp(20px, 3vw, 34px);
    animation: rise 0.4s var(--ease);
}

/* Frosted glass panels, the same glass as the trinket card and the roulette window */
.inspector-panel,
.quiz-card,
.reading-card {
    isolation: isolate;
    border: 1px solid rgba(var(--bone-rgb), 0.2);
    border-radius: 14px;
    background:
        linear-gradient(140deg, rgba(var(--bone-rgb), 0.1), rgba(var(--bone-rgb), 0.025) 45%, rgba(var(--bone-rgb), 0.06)),
        rgba(var(--wine-rgb), 0.35);
    box-shadow: 0 30px 70px -32px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(var(--bone-rgb), 0.16);
}

.quiz-card,
.reading-card {
    position: relative;
}

/* Soft blurred light seen through the glass, like the glow behind the trinket card */
.inspector-panel::before,
.quiz-card::before,
.reading-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(55% 45% at 18% 12%, rgba(255, 246, 216, 0.16), rgba(255, 246, 216, 0) 70%),
        radial-gradient(50% 55% at 88% 88%, rgba(160, 60, 105, 0.3), rgba(160, 60, 105, 0) 70%),
        radial-gradient(40% 40% at 70% 30%, rgba(var(--bone-rgb), 0.07), rgba(var(--bone-rgb), 0) 70%);
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 14px;
}

.quiz-progress .small-label {
    flex: none;
    font-variant-numeric: tabular-nums;
}

.quiz-bar {
    flex: 1;
    display: block;
    height: 1px;
    background: var(--line-2);
    overflow: hidden;
}

.quiz-bar-fill {
    display: block;
    height: 100%;
    background: var(--bone);
    transition: width 0.5s var(--ease);
}

.quiz-question {
    margin-top: 20px;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.15;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 22px;
}

.quiz-option {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    transition: background 0.25s, border-color 0.25s, transform 0.35s var(--spring);
}

.quiz-option:hover {
    background: var(--surface-2);
    border-color: var(--line-2);
    transform: translateX(4px);
}

.quiz-option.active {
    background: var(--bone);
    border-color: var(--bone);
    color: var(--wine);
}

.quiz-option.active .row-num {
    color: var(--wine);
}

.quiz-back {
    margin-top: 18px;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.25s;
}

.quiz-back:hover {
    color: var(--text);
}

.quiz-motto {
    margin-top: 6px;
    font-family: var(--hand);
    font-style: italic;
    font-size: 1.35rem;
    color: var(--text-2);
}

.quiz-mix-row {
    display: grid;
    grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) 3rem;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    font-size: 0.9rem;
}

.quiz-mix-row .quiz-bar {
    height: 3px;
}

.quiz-mix-pct {
    text-align: right;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

#analysis-panel {
    /* not sticky, but still the frame for the glass glow inside it */
    position: relative;
    top: auto;
    scroll-margin-top: calc(var(--header-h) + 40px);
}

.style-muse {
    margin-top: 8px;
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.style-row {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.style-row-item {
    display: block;
    font-size: 0.92rem;
    font-weight: 500;
}

.style-row-why {
    margin-top: 2px;
    font-size: 0.86rem;
    color: var(--text-2);
}

.color-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}

.color-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.color-dot {
    flex: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(var(--bone-rgb), 0.2);
}

.style-avoid {
    margin-top: 10px;
    font-size: 0.86rem;
    color: var(--muted);
}

.style-buy {
    margin-top: 10px;
    padding-left: 1.4em;
    font-size: 0.92rem;
}

.style-buy li + li {
    margin-top: 4px;
}

.style-buy li::marker {
    font-family: var(--mono);
    font-size: 0.8em;
    color: var(--muted);
}

.quiz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

/* ---------------------------------------------------- */
/* Footer                                               */
/* ---------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 30px 0 34px;
    font-size: 0.86rem;
}

.footer-inner {
    display: flex;
    /* nav links and the copyright sit on the same text line as "Draped Silhouette by Nana" */
    align-items: baseline;
    flex-wrap: wrap;
    gap: 14px 28px;
}

.footer-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--display);
    font-size: 1.4rem;
    line-height: 1.2;
}

.footer-by {
    font-family: var(--hand);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text-2);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-2);
}

.footer-links a {
    transition: color 0.25s;
}

.footer-links a:hover {
    color: var(--text);
}

/* Puts Persona, No Limits and Instagram on their own row on phones (see the 720px media query) */
.footer-break {
    display: none;
}

/* Photo-source credit, last line of the page */
.site-footer .footer-source {
    margin-top: 16px;
    font-size: 0.6rem;
    letter-spacing: 0;
    /* when it can't fit on one line, split it into even lines instead of leaving one word hanging */
    text-wrap: balance;
}

/* wide screens: the whole note sits on one straight line (~980px of text in a 1000px+ column) */
@media (min-width: 1080px) {
    .site-footer .footer-source {
        white-space: nowrap;
    }
}

.footer-copy {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--muted);
}

/* inline SVG instead of the © character, which iPhone turns into an emoji */
.copy-mark {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    margin-right: 6px;
    vertical-align: -0.3em;
}

/* ---------------------------------------------------- */
/* Responsive                                           */
/* ---------------------------------------------------- */
@media (max-width: 980px) {
    .header-inner {
        gap: 20px;
    }

    .nav-btn {
        padding: 10px 8px;
    }

    .nav-btn::after {
        left: 8px;
        right: 8px;
    }
}

@media (max-width: 900px) {
    .inspector {
        grid-template-columns: minmax(0, 1fr);
    }

    /* not sticky on small screens, but still the frame for the glass glow inside it */
    .inspector-panel {
        position: relative;
        top: auto;
    }

    .hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-scrap {
        justify-self: end;
        margin-top: -8px;
    }

    .result-items,
    .result-items[data-count] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        gap: 0;
        padding-top: 12px;
    }

    .header-tools {
        margin-left: auto;
        gap: 12px;
    }

    /* All sections in one row on phones */
    /* Phones: bigger tabs in a row you can swipe sideways; the edges fade where more tabs hide */
    .magazine-nav {
        position: relative;
        order: 3;
        width: calc(100% + 2 * var(--gutter));
        margin: 6px calc(-1 * var(--gutter)) 0;
        padding: 0 calc(var(--gutter) - 10px) 4px;
        gap: 2px;
        scroll-snap-type: x proximity;
        scroll-padding: 0 var(--gutter);
    }

    .magazine-nav.fade-r {
        -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
        mask-image: linear-gradient(90deg, #000 82%, transparent);
    }

    .magazine-nav.fade-l {
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%);
        mask-image: linear-gradient(90deg, transparent, #000 18%);
    }

    .magazine-nav.fade-l.fade-r {
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
        mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
    }

    .nav-btn {
        padding: 12px 10px;
        font-size: 0.8rem;
        letter-spacing: 0.1em;
        scroll-snap-align: start;
    }

    .nav-btn::after {
        left: 10px;
        right: 10px;
        bottom: 5px;
    }

    .footer-break {
        display: block;
        flex-basis: 100%;
        height: 0;
        margin-top: -6px;
    }

    .overview-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .overview-card,
    .overview-card:nth-child(even),
    .overview-card-wide ~ .overview-card:nth-child(even),
    .overview-card-wide ~ .overview-card:nth-child(odd) {
        padding: 24px 0 26px;
        border-left: 0;
    }

    .anatomy-grid,
    .look-tags-row,
    .shop-row {
        grid-template-columns: minmax(0, 1fr);
    }

    /* same photo + care label as on desktop (desktop sizes fit a 360px screen),
       so the label sits exactly where it does on the big screen */
    .hero-scrap {
        justify-self: center;
        margin-top: 18px;
    }

    .polaroid {
        width: 248px;
    }

    .ub-mid {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .ub-stats {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-content: space-between;
    }

    .ub-label {
        font-size: 0.64rem;
    }

    .ub-cta {
        padding: 9px 15px;
        font-size: 0.84rem;
    }

    .looks-toolbar .btn-spin {
        margin-left: 0;
    }

    .looks-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 16px;
    }

    .result-items,
    .result-items[data-count] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .look-name {
        font-size: 1.12rem;
    }

    .look-meta {
        font-size: 0.58rem;
        letter-spacing: 0.06em;
    }

    .heart-btn {
        width: 34px;
        height: 34px;
    }

    .hero-collage img {
        border-width: 3px;
    }

    .hero-row img {
        border-width: 2px;
    }

    .roulette {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 14px;
    }

    .roulette-meta {
        font-size: 0.6rem;
    }

    .reel-card {
        width: 104px;
    }

    .stamp {
        width: 84px;
        height: 84px;
        font-size: 0.5rem;
        top: 10px;
    }

    .result-card .look-meta,
    .result-name {
        padding-right: 92px;
    }

    .roulette-fab {
        width: 80px;
        height: 80px;
    }

    .fab-ring text {
        font-size: 8.8px;
    }

    .footer-copy {
        margin-left: 0;
    }
}

/* Narrow phones: keep the logo and the EN/UA switch on one row */
@media (max-width: 400px) {
    .logo {
        font-size: 1.45rem;
    }

    .looks-grid {
        gap: 28px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ub-track,
    .fab-ring {
        animation: none !important;
    }
}
