/* Cedar & Havane — warm, quiet, museum-like */
:root {
    --bg: #17110d;
    --bg-raised: #211812;
    --bg-card: #2a1f17;
    --line: #3d2e22;
    --line-soft: #2f241b;
    --text: #efe6d8;
    --text-muted: #b3a48f;
    --gold: #c9a96a;
    --gold-strong: #dcbf84;
    --burgundy: #7a2630;
    --burgundy-soft: #4a1c22;
    --sage: #8b9a75;
    --danger: #c45a4f;
    --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --radius: 4px;
    --max: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(122, 38, 48, 0.18), transparent 60%),
        radial-gradient(900px 500px at -10% 10%, rgba(201, 169, 106, 0.07), transparent 60%),
        var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-strong); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .4em; letter-spacing: .01em; }
h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
h2 { font-size: 1.6rem; }
p { margin: 0 0 1em; }
em { font-style: italic; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--bg); padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    max-width: var(--max); width: 100%; margin: 0 auto; padding: 1.4rem 1rem;
    border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: .8rem; color: var(--text); text-decoration: none; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; white-space: nowrap; width: 46px; height: 46px;
    border: 1px solid var(--gold); border-radius: 50%;
    font-family: var(--serif); font-size: .9rem; color: var(--gold); letter-spacing: 0;
}
.brand-mark em { font-size: .8em; margin: 0 1px; }
.brand-name { font-family: var(--serif); font-size: 1.45rem; letter-spacing: .04em; }
.brand-name em { color: var(--gold); }
.site-nav { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
.site-nav a { color: var(--text-muted); text-decoration: none; }
.site-nav a:hover { color: var(--gold); }
.site-nav .nav-cta { color: var(--gold); border: 1px solid var(--gold); padding: .5rem 1rem; border-radius: var(--radius); }
.nav-badge { color: var(--sage); }
.inline-form { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; color: var(--text-muted); font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.link-button:hover { color: var(--gold); }

.lang-form { margin: 0; }
.lang-menu { position: relative; }
.lang-menu summary {
    list-style: none; display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
    padding: .35rem .65rem; border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--text-muted); font-size: .82rem; letter-spacing: .04em; text-transform: none;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after {
    content: ''; width: 5px; height: 5px; margin: -3px 0 0 .15rem;
    border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg);
}
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--gold); border-color: var(--gold); }
.lang-menu ul {
    position: absolute; right: 0; top: calc(100% + .35rem); z-index: 20; min-width: 10.5rem;
    margin: 0; padding: .3rem; list-style: none; background: var(--bg-card);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.lang-menu li button {
    display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .6rem;
    background: none; border: 0; border-radius: 3px; cursor: pointer; text-align: left;
    color: var(--text); font: inherit; letter-spacing: .04em; text-transform: none;
}
.lang-menu li button:hover, .lang-menu li button[aria-current] { background: var(--bg-raised); color: var(--gold); }
.flag { width: 22px; height: 15px; flex: none; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }

/* Main */
.site-main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 2.5rem 1rem 4rem; }
.eyebrow { font-size: .74rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; }
.lead { color: var(--text-muted); max-width: 60ch; }
.muted { color: var(--text-muted); }
.small { font-size: .85rem; }
.flash { border: 1px solid var(--gold); border-left-width: 3px; background: var(--bg-raised); padding: .8rem 1rem; border-radius: var(--radius); }

/* Buttons */
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem 1.4rem; border-radius: var(--radius); border: 1px solid transparent;
    font: 500 .78rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
    text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.button-gold { background: var(--gold); color: #1b130e; }
.button-gold:hover { background: var(--gold-strong); color: #1b130e; }
.button-ghost { background: transparent; color: var(--gold); border-color: var(--gold); }
.button-ghost:hover { background: rgba(201, 169, 106, .1); }
.button-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.button-block { width: 100%; }

/* Home */
.page-home .site-main { padding-top: 0; }
.hero { position: relative; text-align: center; padding: clamp(4rem, 12vw, 9rem) 0 clamp(3rem, 8vw, 6rem); }
.hero-title { font-size: clamp(3.2rem, 9vw, 6.4rem); font-weight: 400; letter-spacing: .03em; margin-bottom: 1.4rem; }
.hero-title em { color: var(--gold); }
.hero-lead { font-family: var(--serif); font-size: clamp(1.15rem, 2.2vw, 1.45rem); color: var(--text-muted); font-style: italic; max-width: 40rem; margin: 0 auto 2.4rem; }
.hero-rule { width: 1px; height: 70px; margin: 3.5rem auto 0; background: linear-gradient(var(--gold), transparent); }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.pillar { background: var(--bg); padding: 2.4rem 2rem; }
.pillar-num { font-family: var(--serif); color: var(--gold); font-size: 1.1rem; letter-spacing: .2em; }
.pillar p:last-child { color: var(--text-muted); margin: 0; }
.quote-band { padding: 5rem 1rem; text-align: center; }
.quote-band blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--text); }
.access-note { max-width: 44rem; margin: 0 auto; text-align: center; border-top: 1px solid var(--line); padding-top: 3rem; }
.access-note p { color: var(--text-muted); }

/* Home hero with cigar and smoke */
.hero-cigar { text-align: left; padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1rem, 4vw, 3rem); align-items: center; }
.hero-cigar .hero-lead { margin-left: 0; margin-right: 0; }
.hero-art { position: relative; }
.hero-art svg { display: block; width: 100%; max-width: 520px; height: auto; max-height: 440px; margin: 0 auto; overflow: visible; }
.ember-glow { transform-box: fill-box; transform-origin: center; animation: ember-pulse 3.2s ease-in-out infinite; }
.sway { animation: sway 5s ease-in-out infinite alternate; }
.sway.s2 { animation-duration: 6.5s; animation-delay: -2s; }
.sway.s3 { animation-duration: 4.2s; animation-delay: -1s; }
.sway.s4 { animation-duration: 7s; animation-delay: -3.5s; }
.sway.s5 { animation-duration: 5.6s; animation-delay: -0.5s; }
.sway.s6 { animation-duration: 6s; animation-delay: -4s; }
.wisp { transform-box: fill-box; transform-origin: center; opacity: 0; animation: rise 12s ease-out infinite; }
.w1 { --dx: -46px; animation-delay: 0s; }
.w2 { --dx: 38px; animation-delay: -2s; animation-duration: 13s; }
.w3 { --dx: -14px; animation-delay: -4s; animation-duration: 11s; }
.w4 { --dx: 52px; animation-delay: -6s; animation-duration: 14s; }
.w5 { --dx: -30px; animation-delay: -8s; animation-duration: 12.5s; }
.w6 { --dx: 20px; animation-delay: -10s; animation-duration: 13.5s; }
.curl { stroke-dasharray: 90 330; animation: curl-flow 5.5s linear infinite; }
@keyframes rise {
    0% { transform: translate(0, 0) scale(.5); opacity: 0; }
    12% { opacity: .5; }
    55% { opacity: .3; }
    100% { transform: translate(var(--dx), -250px) scale(3.1); opacity: 0; }
}
@keyframes sway { from { transform: translateX(-14px); } to { transform: translateX(14px); } }
@keyframes ember-pulse { 0%, 100% { opacity: .7; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes curl-flow { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
    .hero-cigar { text-align: center; }
    .hero-cigar .hero-lead { margin-left: auto; margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .ember-glow, .sway, .wisp, .curl { animation: none; }
    .wisp { opacity: .12; }
}

/* Auth */
.auth-card { max-width: 26rem; margin: 3rem auto; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.4rem 2rem; }

/* Contact form */
.contact-card { max-width: 36rem; }
.contact-card .form { margin: 1.4rem 0 1rem; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Forms */
.form { display: grid; gap: 1.2rem; }
.field { display: grid; gap: .35rem; min-width: 0; }
.field label { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
input, select, textarea {
    width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .7rem .8rem; font: 300 1rem/1.4 var(--sans);
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(201, 169, 106, .15); }
input[type="file"] { padding: .5rem; }
input[aria-invalid="true"] { border-color: var(--danger); }
textarea { resize: vertical; }
.hint { font-size: .8rem; color: var(--text-muted); margin: 0; }
.field-error, .form-error { color: var(--danger); font-size: .88rem; margin: 0; }
.form-error { border: 1px solid var(--danger); padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; margin: 0; display: grid; gap: 1.2rem; }
legend { font-family: var(--serif); font-size: 1.35rem; color: var(--gold); padding: 0 .5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.form-actions { display: flex; justify-content: flex-end; }
.danger-zone { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* Page head & filters */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; margin-bottom: 2.4rem; }
.field-grow { flex: 1 1 260px; }
.breadcrumb { margin-bottom: 1.6rem; font-size: .85rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); margin-bottom: 2.4rem; }
.stat { background: var(--bg-raised); padding: 1.3rem 1.4rem; display: grid; }
.stat-value { font-family: var(--serif); font-size: 2.2rem; color: var(--gold); line-height: 1.1; }
.stat-label { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); }

/* Box grid */
.box-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.6rem; }
.box-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s, border-color .25s; }
.box-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.box-card-link { color: inherit; text-decoration: none; display: block; }
.box-card-media { position: relative; aspect-ratio: 4 / 3; background: var(--bg-raised); }
.box-card-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); }
.box-card-placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 2rem; color: var(--line); }
.box-card-body { padding: 1.2rem 1.3rem 1.4rem; }
.box-card-brand { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 .2rem; }
.box-card-title { font-size: 1.6rem; margin: 0; }
.box-card-edition { color: var(--text-muted); font-family: var(--serif); font-style: italic; margin: 0 0 1rem; }
.box-card-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: 0; border-top: 1px solid var(--line); padding-top: .9rem; }
.box-card-meta dt { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.box-card-meta dd { margin: 0; font-size: .92rem; }
.status-pill { display: inline-block; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 999px; border: 1px solid currentColor; background: rgba(23, 17, 13, .78); }
.box-card-media .status-pill { position: absolute; top: .8rem; left: .8rem; }
.status-in_collection { color: var(--gold); }
.status-consigned { color: var(--sage); }
.status-sold { color: var(--text-muted); }
.empty { color: var(--text-muted); font-style: italic; }

/* Box sheet */
.box-sheet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 1.6rem; margin-bottom: 2rem; }
.box-sheet-sub { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin: 0; }
.box-sheet-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.box-sheet-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2.5rem; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; align-content: start; }
.gallery figure { margin: 0; position: relative; }
.gallery img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-main { grid-column: 1 / -1; }
.gallery-main img { aspect-ratio: auto; max-height: 560px; object-fit: contain; background: var(--bg-raised); }
.lightbox-link { display: block; cursor: zoom-in; border-radius: var(--radius); }
.lightbox-link:hover img { border-color: var(--gold); }
.gallery figcaption { font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }
.gallery-empty { grid-column: 1 / -1; aspect-ratio: 4 / 3; display: grid; place-items: center; border: 1px dashed var(--line); color: var(--text-muted); border-radius: var(--radius); }
.photo-delete { margin: 0; }
.photo-note { grid-column: 1 / -1; margin: .2rem 0 0; font-size: .78rem; font-style: italic; color: var(--text-muted); }
.photo-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-top: .35rem; }
.photo-move { margin: 0; display: flex; gap: .3rem; }
.photo-arrow { font-size: .8rem; padding: .25rem .5rem; border: 1px solid var(--line); border-radius: var(--radius); line-height: 1; }
.photo-arrow:hover { border-color: var(--gold); }
.upload-form { grid-column: 1 / -1; display: grid; gap: .8rem; border: 1px dashed var(--line); padding: 1.2rem; border-radius: var(--radius); margin-top: .6rem; }
.spec-list { margin: 0 0 2rem; border-top: 1px solid var(--line); }
.spec-row { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line-soft); }
.spec-row dt { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); padding-top: .2rem; }
.spec-row dd { margin: 0; font-family: var(--serif); font-size: 1.2rem; }
.text-block { margin-bottom: 1.6rem; }
.text-block h2 { font-size: 1.25rem; color: var(--gold); }
.text-block p { color: var(--text-muted); }

/* Expert links */
.new-link { border: 1px solid var(--gold); background: var(--bg-raised); padding: 1.4rem; border-radius: var(--radius); margin-bottom: 2rem; }
.copy-row { display: flex; gap: .8rem; flex-wrap: wrap; }
.copy-row input { flex: 1 1 320px; font-family: ui-monospace, monospace; font-size: .85rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .8rem; border-bottom: 1px solid var(--line-soft); }
.table th { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); font-weight: 400; }
.table form { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line-soft); text-align: center; padding: 2.4rem 1rem; color: var(--text-muted); font-size: .85rem; }
.footer-mark { font-family: var(--serif); font-size: 1.3rem; color: var(--text); }
.footer-mark em { color: var(--gold); }
.footer-contact a { color: var(--gold); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-small { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 860px) {
    .box-sheet-layout { grid-template-columns: 1fr; }
    .spec-row { grid-template-columns: 9rem 1fr; }
}

@media (max-width: 560px) {
    .site-header { flex-direction: column; align-items: flex-start; }
    .site-nav { gap: 1rem; }
    .lang-menu ul { left: 0; right: auto; }
    .brand-name { font-size: 1.25rem; }
    .box-card-meta { grid-template-columns: repeat(2, 1fr); }
    .spec-row { grid-template-columns: 1fr; gap: .1rem; }
    fieldset { padding: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

/* Photo viewer */
html.lb-open { overflow: hidden; }
.lightbox {
    position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .8rem; padding: 3.5rem 4rem 1.5rem; background: rgba(10, 7, 5, .97);
    animation: lb-fade .18s ease-out;
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lb-stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .7rem; max-width: 100%; min-height: 0; }
.lb-frame { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-raised); line-height: 0; }
.lb-frame img {
    display: block; max-width: min(92vw, 1400px); max-height: calc(100vh - 11rem); width: auto; height: auto;
    cursor: zoom-in; touch-action: none; user-select: none; -webkit-user-drag: none; transform-origin: center center;
}
.lb-frame.is-zoomed img { cursor: grab; }
.lb-frame.is-dragging img { cursor: grabbing; }
.lb-caption { margin: 0; min-height: 1.2em; color: var(--text-muted); font-size: .9rem; text-align: center; }
.lb-count { position: absolute; top: 1.2rem; left: 1.4rem; margin: 0; color: var(--text-muted); font-size: .85rem; letter-spacing: .12em; }
.lb-btn {
    position: absolute; display: grid; place-items: center; width: 2.8rem; height: 2.8rem; padding: 0;
    border: 1px solid var(--line); border-radius: 50%; background: rgba(33, 24, 18, .85); color: var(--gold);
    font-size: 1.7rem; line-height: 1; cursor: pointer;
}
.lb-btn:hover { border-color: var(--gold); color: var(--gold-strong); }
.lb-close { top: .9rem; right: 1.2rem; font-size: 1.3rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox[data-single] .lb-prev, .lightbox[data-single] .lb-next, .lightbox[data-single] .lb-count { display: none; }
@media (max-width: 560px) {
    .lightbox { padding: 3.5rem .6rem 1rem; }
    .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
    .lb-prev { left: calc(50% - 3.4rem); }
    .lb-next { right: calc(50% - 3.4rem); }
    .lb-frame img { max-height: calc(100vh - 14rem); }
}

/* Users & account */
.nav-user { color: var(--gold); }
.inline-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.inline-row select, .inline-row input { padding: .4rem .6rem; font-size: .85rem; }
.row-details { margin-bottom: .4rem; }
.row-details summary { cursor: pointer; color: var(--text-muted); font-size: .85rem; }
.row-details[open] summary { margin-bottom: .5rem; }
.danger-link { color: var(--danger); }
.small-heading { font-size: 1.1rem; margin: 2rem 0 1rem; }

/* Groups of identical boxes (display only, see App\Service\BoxGrouping) */
.count-pill { display: inline-block; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 999px; background: var(--gold); color: #1b130e; font-weight: 500; }
.box-card-media .count-pill { position: absolute; top: .8rem; right: .8rem; }
.count-pill-inline { position: static; }
.box-card-group { box-shadow: 6px 6px 0 -1px var(--bg-raised), 6px 6px 0 0 var(--line); }
.box-card-breakdown { margin: .8rem 0 0; font-size: .82rem; color: var(--text-muted); }
.group-note { border: 1px solid var(--line); border-left: 3px solid var(--gold); background: var(--bg-raised); padding: .7rem 1rem; border-radius: var(--radius); margin: -0.6rem 0 1.6rem; }
.group-lead { margin: .8rem 0 0; }
.group-table td { vertical-align: middle; }
.group-table-note td { padding-top: 0; font-size: .85rem; border-bottom-color: var(--line); }

/* Group page: photos of the other boxes, shown on click */
.gallery-more { grid-column: 1 / -1; }
.gallery-more > summary { display: inline-flex; cursor: pointer; list-style: none; }
.gallery-more > summary::-webkit-details-marker { display: none; }
.gallery-more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: .8rem; }

/* "Edit all boxes" of a group */
.bulk-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) 220px; gap: .9rem; align-items: start; padding: .9rem 0; border-top: 1px solid var(--line); }
.bulk-row:first-of-type { border-top: 0; }
.bulk-tick { display: flex; gap: .55rem; align-items: center; padding-top: .55rem; cursor: pointer; color: var(--text-muted); font-size: .9rem; }
.bulk-row.is-ticked .bulk-tick, .bulk-tick:has(input:checked) { color: var(--text); }
.bulk-value { display: grid; gap: .3rem; min-width: 0; }
.bulk-value input, .bulk-value textarea { width: 100%; }
.bulk-info { margin: 0; font-size: .8rem; color: var(--text-muted); }
.bulk-warn { color: var(--gold); }
.bulk-note { font-size: .85rem; margin: .4rem 0 0; }
.bulk-summary { border: 1px solid var(--gold); border-left-width: 3px; border-radius: var(--radius); padding: 1rem 1.2rem; background: var(--bg-raised); }
.bulk-summary h2 { font-size: 1.05rem; margin: 0 0 .5rem; }
.bulk-summary ul { margin: 0 0 .6rem; padding-left: 1.1rem; }
.bulk-summary .form-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
@media (max-width: 760px) {
    .bulk-row { grid-template-columns: 1fr; gap: .5rem; }
    .bulk-tick { padding-top: 0; }
}
.bulk-form .form-actions { gap: .7rem; flex-wrap: wrap; }
.bulk-tick input { width: auto; flex: 0 0 auto; margin: 0; accent-color: var(--gold); }
.bulk-tick span { text-align: left; }

/* Photos shared by all the boxes of the same cigar */
.shared-badge { display: inline-block; margin-top: .3rem; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.shared-heading { grid-column: 1 / -1; margin: .6rem 0 0; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.photo-share { display: inline; }
.check-line { display: flex; gap: .55rem; align-items: center; font-size: .9rem; color: var(--text); cursor: pointer; }
.check-line input { width: auto; margin: 0; accent-color: var(--gold); }

/* "Add boxes like this one" */
.dup-form .form-actions { gap: .7rem; flex-wrap: wrap; }
.dup-count { max-width: 240px; }
.dup-form .check-line + .check-line { margin-top: .2rem; }
