/* crowncaps.net – public site. One stylesheet, no build step. */
:root {
    --bg: #f6f4ef;
    --surface: #ffffff;
    --ink: #1d1b16;
    --muted: #6d675b;
    --line: #e4dfd3;
    --gold: #d4a21c;
    --gold-soft: #f6e8bf;
    --gold-ink: #7d5b07;
    --link: #1f5568;
    --shadow: 0 1px 2px rgb(40 30 10 / .06), 0 4px 16px rgb(40 30 10 / .06);
    --radius: 14px;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #15140f; --surface: #1f1d17; --ink: #efeae0; --muted: #a59e90; --line: #36322a;
        --gold: #e2b33a; --gold-soft: #3a2f12; --gold-ink: #f0cf73; --link: #8fc6d8;
        --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 16px rgb(0 0 0 / .25);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); text-underline-offset: 2px; }
img { max-width: 100%; height: auto; }
h1, h2 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); margin: .2em 0 .4em; }
h2 { font-size: 1.2rem; margin: 1.6em 0 .5em; }
.muted { color: var(--muted); font-weight: 400; }
h1 .muted { font-size: .6em; margin-left: .3em; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.main { padding: 24px 0 56px; min-height: 60vh; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.logo { display: block; height: 52px; width: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand b { display: block; font-size: 1.1rem; letter-spacing: .01em; }
.brand small { display: block; color: var(--muted); font-size: .78rem; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.nav a:hover { background: var(--bg); }
.nav a[aria-current="page"] { background: var(--gold-soft); color: var(--gold-ink); font-weight: 600; }
.menu-btn { display: none; }
@media (max-width: 860px) {
    .menu-btn {
        display: block; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
        border-radius: 999px; padding: 8px 14px; font: inherit;
    }
    .nav { display: none; width: 100%; flex-direction: column; padding: 0 0 12px; }
    .nav.open { display: flex; }
    .nav a { border-radius: 10px; padding: 10px 12px; }
    .brand small { display: none; }
}

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .88rem; }
.foot-in { display: flex; gap: 8px 24px; flex-wrap: wrap; justify-content: space-between; padding: 20px 0; }

/* home */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 16px 0 8px; }
.hero-caps li { min-width: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--gold-ink); font-weight: 700; margin: 0; }
.big-num { color: var(--gold-ink); }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }
.hero-caps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hero-caps li { aspect-ratio: 1; animation: pop .5s both; animation-delay: calc(var(--i) * 40ms); }
.hero-caps img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow); background: var(--surface); }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }
@media (prefers-reduced-motion: reduce) { .hero-caps li { animation: none; } }
@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; }
    .hero-caps { grid-template-columns: repeat(6, 1fr); order: -1; }
    .hero-caps li:nth-child(n+7) { display: none; }
}
.search-box { display: flex; gap: 8px; margin-top: 20px; max-width: 520px; }
.search-box input, .filter, .s-form input, .s-form select {
    flex: 1; min-width: 0; font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink);
}
.search-box input:focus, .filter:focus, .s-form input:focus, .s-form select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.search-box button, .s-form button {
    font: inherit; font-weight: 600; padding: 12px 18px; border: 0; border-radius: 12px; background: var(--gold); color: #241a00; cursor: pointer;
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 32px; }
.card {
    display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s;
}
.card:hover { transform: translateY(-2px); }
.card h2 { margin: 0 0 .3em; }
.card p { color: var(--muted); margin: 0 0 1em; flex: 1; }
.card-go { color: var(--link); font-weight: 600; }
/* home page video: a stored preview picture; the YouTube player replaces it on click */
.video {
    display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: center; margin-top: 32px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.video-frame {
    position: relative; display: block; aspect-ratio: 16 / 9; border-radius: calc(var(--radius) - 6px); overflow: hidden; background: #000;
}
.video-frame img, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-play {
    position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%;
    background: var(--gold); box-shadow: 0 4px 18px rgba(0, 0, 0, .35); transition: transform .15s;
}
.video-play::after {
    content: ""; position: absolute; left: 29px; top: 22px;
    border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent #241a00;
}
.video-frame:hover .video-play, .video-frame:focus-visible .video-play { transform: scale(1.08); }
.video-text h2 { margin: .2em 0 .3em; }
.video-text p:not(.eyebrow) { color: var(--muted); margin: 0 0 1em; }
.video-text .card-go { text-decoration: none; }
@media (max-width: 700px) { .video { grid-template-columns: 1fr; gap: 14px; } }
.news { margin-top: 40px; max-width: 760px; }
.news ol { list-style: none; padding: 0; margin: 0; }
.news li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.news time { display: inline-block; min-width: 92px; color: var(--gold-ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* lists of countries */
.page-head { margin-bottom: 16px; }
.filter { width: 100%; max-width: 360px; margin-top: 4px; }
.countries { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.countries a {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--surface);
    border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.countries a:hover { border-color: var(--gold); }
.cc { font-size: .72rem; font-weight: 700; color: var(--gold-ink); background: var(--gold-soft); border-radius: 6px; padding: 2px 6px; min-width: 32px; text-align: center; }
.cn { flex: 1; }
.ct { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
[hidden] { display: none !important; }

/* country and category pages */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 4px; }
.cat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.cat-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 12px;
    color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
}
.cat-card:hover { border-color: var(--gold); }
.cat-card h2 { margin: 0 0 12px; display: flex; justify-content: space-between; }
.cat-card h2 span { color: var(--muted); font-weight: 500; }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.strip img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
.side-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 32px; margin-top: 16px; }
.plain { padding-left: 1.1em; }
.plain li { margin: .25em 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.tabs a, .tab-empty {
    padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
    color: var(--ink); text-decoration: none; font-size: .92rem;
}
.tabs span span, .tabs a span { color: var(--muted); margin-left: 4px; }
.tabs a[aria-current="page"] { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }
.tab-empty { opacity: .45; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; margin: 16px 0; }
.pager a { min-width: 38px; text-align: center; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.pager a[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: #241a00; font-weight: 700; }

/* cap grid */
.caps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
@media (max-width: 420px) { .caps { grid-template-columns: repeat(3, 1fr); gap: 6px; } }
.cap {
    position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: zoom-in; font: inherit; color: var(--ink);
}
.cap:hover, .cap:focus-visible { border-color: var(--gold); outline: none; box-shadow: var(--shadow); }
.cap img { width: 100%; max-width: 100px; aspect-ratio: 1; object-fit: contain; }
.nopic { display: grid; place-items: center; width: 100%; max-width: 100px; aspect-ratio: 1; border-radius: 50%; background: var(--bg); color: var(--muted); font-size: .7rem; }
.cap-code { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
/* pictures without a cap code (e.g. extra inside pictures) keep the line, so every box is the same size */
.cap-code:empty::before { content: "\00a0"; }
.cap-brand {
    font-size: .78rem; line-height: 1.25; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 2.5em; word-break: break-word;
}
.badge { position: absolute; top: 6px; right: 6px; background: var(--gold); color: #241a00; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }

/* picture viewer */
.viewer {
    border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--ink); width: min(860px, 100% - 24px);
    box-shadow: 0 20px 60px rgb(0 0 0 / .35);
    /* a fixed height: the navigation bar at the bottom stays in the same place for every cap */
    height: min(560px, 100dvh - 24px); max-height: none; overflow: hidden;
}
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: rgb(15 12 5 / .7); }
/* picture and details; long details scroll here instead of making the viewer taller */
.v-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 400px) 1fr; align-items: start; align-content: start; gap: 24px; padding: 24px; }
.v-img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.v-info { padding-right: 24px; }
.v-info h3 { margin: 0 0 .2em; font-size: 1.3rem; }
.v-info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0; font-size: .95rem; }
.v-info dt { color: var(--muted); }
.v-info dd { margin: 0; }
.v-info .sign { height: 22px; vertical-align: middle; margin-right: 6px; }
.v-top { display: inline-flex; gap: 8px; align-items: center; }
.v-top img { width: 56px; height: 56px; }
.v-close { position: absolute; top: 8px; right: 10px; z-index: 2; border: 0; background: var(--surface); border-radius: 50%; font-size: 30px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 10px 6px; }
/* navigation bar at the bottom */
.v-foot {
    flex: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
    padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface);
}
.v-foot[hidden] { display: none; }
.v-nav {
    display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; cursor: pointer;
    padding: 10px 18px 10px 14px; border-radius: 999px; border: 0; background: var(--ink); color: var(--bg);
    transition: background .15s;
}
.v-next { justify-self: end; padding: 10px 14px 10px 18px; }
.v-prev { justify-self: start; }
.v-nav svg { width: 18px; height: 18px; }
.v-nav:hover, .v-nav:focus-visible { background: var(--gold); color: #241a00; outline: none; }
.v-count { color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; min-width: 6em; }
@media (max-width: 700px) {
    .viewer { height: calc(100dvh - 24px); }
    .v-body { grid-template-columns: 1fr; padding: 44px 16px 16px; gap: 8px; }
    .v-info { padding-right: 0; }
    .v-nav { padding: 10px 14px; }
    .v-nav span { display: none; }
}

/* sets & series */
.series-group h2 { border-bottom: 1px solid var(--line); padding-bottom: 6px; color: var(--gold-ink); }
.series-list { list-style: none; padding: 0; margin: 0; columns: 2 360px; column-gap: 32px; }
.series-list li { break-inside: avoid; padding: 5px 0; }
.series-list .muted { font-size: .88rem; margin-left: 6px; }
.tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; background: var(--gold-soft); color: var(--gold-ink); border-radius: 6px; padding: 1px 6px; margin-left: 6px; }
.prose { max-width: 75ch; }
.gallery { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 8px; }
.gallery figure { margin: 0; max-width: 420px; }
.gallery img { border-radius: 10px; }
.gallery figcaption, .top-side figcaption { font-size: .85rem; color: var(--muted); }
.set { margin-top: 28px; scroll-margin-top: 80px; }
/* series pages: the series picker can hold long titles; jump links to the sets of a series */
.series-nav .trade-pick { flex: 0 1 420px; min-width: 0; max-width: 100%; }
.series-nav .trade-pick select { width: 100%; max-width: 100%; }
.series-nav .trade-step a { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-jump { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 10px 0 4px; }
.set-jump a {
    padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
    color: var(--ink); text-decoration: none; font-size: .9rem;
}
.set-jump a:hover { border-color: var(--gold); }
.set-jump a span { color: var(--muted); font-size: .8rem; margin-left: 4px; }
.set h2 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.to-top { margin-left: auto; font-size: .85rem; font-weight: 500; text-decoration: none; }
.series-group { scroll-margin-top: 80px; }
.set-body { display: flex; gap: 16px; align-items: flex-start; }
.set-body .caps { flex: 1; }
.top-side { margin: 0; text-align: center; flex: 0 0 auto; }
.top-side img { width: 160px; height: 160px; object-fit: contain; }
@media (max-width: 600px) { .set-body { flex-direction: column; } .top-side img { width: 120px; height: 120px; } }

/* about */
.about { display: grid; grid-template-columns: 1fr 340px; gap: 32px; }
.about .prose h2:first-child { margin-top: 0; }
.about h2 { color: var(--gold-ink); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; }
.box h2 { margin-top: 0; }
.dict { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; }
.dict dt { font-weight: 600; }
.dict dd { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

/* search */
.s-form { margin: 8px 0 16px; }
.s-main { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 8px; }
@media (max-width: 860px) { .s-main { grid-template-columns: 1fr 1fr; } .s-main input[type=search] { grid-column: 1 / -1; } }
/* advanced search: opens by itself when one of its fields is in use */
.s-adv { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.s-adv summary { cursor: pointer; padding: 10px 14px; font-weight: 600; color: var(--link); }
.s-adv[open] summary { border-bottom: 1px solid var(--line); }
.s-adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 14px; padding: 14px; }
.s-adv-grid > label, .s-adv-grid > fieldset { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; color: var(--muted); margin: 0; }
.s-adv-grid fieldset { border: 0; padding: 0; min-width: 0; }
.s-adv-grid legend { padding: 0; margin-bottom: 4px; }
.s-adv-grid input[type=text], .s-adv-grid select {
    font: inherit; font-size: 1rem; color: var(--ink); padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); min-width: 0;
}
.s-adv-grid input:focus, .s-adv-grid select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.s-features { grid-column: 1 / -1; flex-direction: row !important; flex-wrap: wrap; gap: 6px 18px !important; }
.s-features legend { width: 100%; }
.s-check { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: .95rem; cursor: pointer; }
.s-check input { width: 18px; height: 18px; accent-color: var(--gold); }
.s-adv-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 0 14px 14px; font-size: .9rem; }
.s-adv-foot button {
    font: inherit; font-weight: 600; padding: 10px 18px; border: 0; border-radius: 12px; background: var(--gold); color: #241a00; cursor: pointer;
}
.s-meta { color: var(--muted); margin: 8px 0; }
.more summary { cursor: pointer; color: var(--link); font-weight: 600; margin: .4em 0; }

/* trade basket */
.btn {
    display: inline-block; font: inherit; font-weight: 600; padding: 10px 16px; border: 0; border-radius: 12px;
    background: var(--gold); color: #241a00; cursor: pointer; text-decoration: none;
}
.btn:disabled { opacity: .6; cursor: wait; }
.btn-quiet { background: var(--gold-soft); color: var(--gold-ink); }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; cursor: pointer; }
.linkish.danger { color: #b3261e; }
.caps li { position: relative; display: flex; }
.caps li > .cap { height: 100%; }
.add {
    position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
    font: 700 20px/1 system-ui, sans-serif; display: grid; place-items: center;
}
.add::before { content: "+"; }
.add[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #241a00; }
.add[aria-pressed="true"]::before { content: "✓"; font-size: 17px; }
.add:hover { border-color: var(--gold); }
.caps li:has(.add[aria-pressed="true"]) .cap { border-color: var(--gold); background: var(--gold-soft); }
.basket-link {
    order: 1; padding: 7px 12px; border-radius: 999px; background: var(--gold); color: #241a00; font-weight: 700;
    text-decoration: none; font-size: .9rem;
}
.basket-link span { background: rgb(255 255 255 / .55); border-radius: 999px; padding: 0 7px; margin-left: 4px; }
.nav { order: 2; }
@media (max-width: 860px) { .basket-link { order: 0; } .menu-btn { order: 0; } .nav { order: 3; } }
.basket-bar {
    /* fixed at the bottom: appearing does not move the caps under the pointer */
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20; width: min(560px, 100% - 24px);
    display: flex; gap: 12px; align-items: center; justify-content: space-between;
    padding: 10px 12px 10px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: 0 8px 30px rgb(0 0 0 / .3);
}
body:has(.basket-bar:not([hidden])) .main { padding-bottom: 110px; }
.basket-bar[hidden] { display: none; }
.basket-tools { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; margin: 16px 0 24px; }
.b-items { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.b-items li { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.b-items li.gone { opacity: .55; border-style: dashed; }
.b-items img, .b-items .nopic { width: 56px; height: 56px; flex: 0 0 56px; }
.b-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .9rem; }
.b-txt span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-txt em { color: #b3261e; font-style: normal; font-size: .8rem; }
.b-remove { border: 0; background: none; font-size: 22px; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.b-remove:hover { background: var(--bg); color: var(--ink); }
.form-msg { margin: 0; min-height: 1.4em; }
.form-msg.warn { color: #b3261e; }

/* trade: moving between countries */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.trade-nav { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 14px 0 6px; }
.trade-pick select {
    font: inherit; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); max-width: 100%;
}
.trade-step { display: flex; gap: 16px; margin-left: auto; }
.trade-step a { font-weight: 600; text-decoration: none; }
.trade-step a:hover { text-decoration: underline; }
.trade-foot { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 4px; }
@media (max-width: 600px) { .trade-step { margin-left: 0; width: 100%; justify-content: space-between; } }

/* basket: two ways to send */
.send-title { margin-top: 8px; }
.step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #241a00; font-size: .9rem; }
.send-mail { display: grid; gap: 12px; }
.how { margin: 0; padding-left: 1.2em; }
.how li { margin: 2px 0; }
.list-text {
    width: 100%; font: .85rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px 12px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--bg); color: var(--ink); resize: vertical;
}
.mail-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.send-title { scroll-margin-top: 90px; }
.b-cap { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: zoom-in; }
.b-cap:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.b-items li:hover { border-color: var(--gold); }

/* viewer details: sign picture, position diagram, property badges */
.v-pic { position: relative; overflow: hidden; border-radius: 12px; }
.v-marks { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .15s; }
.v-pic.show-marks .v-marks { opacity: 1; }
.v-marks span {
    position: absolute; width: 16%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
    border: 3px solid var(--gold); box-shadow: 0 0 0 3px rgb(255 255 255 / .85), 0 0 0 9999px rgb(0 0 0 / .25);
    animation: mark 1.2s ease-in-out infinite alternate;
}
.v-marks span + span { box-shadow: 0 0 0 3px rgb(255 255 255 / .85); }
@keyframes mark { to { transform: translate(-50%, -50%) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .v-marks span { animation: none; } }
.v-info dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.v-signimg { height: 34px; width: auto; max-width: 110px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px 5px; border: 1px solid var(--line); }
.v-signcode { font-family: ui-monospace, monospace; font-size: .85rem; }
.v-signpos {
    display: inline-flex; align-items: center; gap: 8px; padding: 2px 10px 2px 2px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; cursor: help;
}
.v-signpos:hover, .v-signpos:focus-visible { border-color: var(--gold); outline: none; }
.v-signpos .d-cap { fill: var(--gold-soft); stroke: var(--gold); stroke-width: 2; stroke-dasharray: 2.2 1.4; }
.v-signpos circle:not(.d-cap) { fill: var(--gold-ink); }
.v-signpos .d-in { fill: none; stroke: var(--gold-ink); stroke-width: 2.5; }
.v-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); font-size: .82rem; font-weight: 600; }
.v-inside { font-style: italic; }
.v-notes { white-space: pre-line; }
.v-inside::before { content: "“"; } .v-inside::after { content: "”"; }

/* "Show inside pictures" switch on category pages */
.cat-bar { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.cat-bar p { margin: .6em 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .95rem; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
    position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--line); flex: 0 0 auto; transition: background .15s;
}
.switch-track::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .15s;
}
.switch input:checked + .switch-track { background: var(--gold); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* countries grouped by first letter, with an A–Z bar */
.az {
    position: sticky; top: 68px; z-index: 5; display: flex; flex-wrap: wrap; gap: 2px; margin: 12px 0 4px; padding: 8px 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
}
.az a, .az span {
    min-width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 8px; font-weight: 600; font-size: .9rem;
}
.az a { color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--line); }
.az a:hover, .az a:focus-visible { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-ink); outline: none; }
.az a.off { opacity: .35; pointer-events: none; }
.az span { color: var(--muted); opacity: .4; }
.letter-group { scroll-margin-top: 130px; }
.letter-group .letter {
    margin: 20px 0 8px; font-size: 1.4rem; color: var(--gold-ink); display: flex; align-items: center; gap: 12px;
}
.letter-group .letter::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.letter-group .countries { margin-top: 0; }
@media (max-width: 860px) {
    .az { top: 0; position: static; }
    .az a, .az span { min-width: 28px; height: 28px; font-size: .85rem; }
    .letter-group { scroll-margin-top: 80px; }
}

/* full size pictures: set pictures that are bigger than shown on the page */
img.zoomable { cursor: zoom-in; }
img.zoomable:hover, img.zoomable:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gallery figure:has(img.zoomable) figcaption::after, .top-side:has(img.zoomable) figcaption::after { content: " · click to enlarge"; }
.v-zoom {
    position: absolute; right: 8px; bottom: 8px; border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer;
    font: inherit; font-size: .85rem; font-weight: 600; background: rgb(0 0 0 / .65); color: #fff;
}
.v-zoom:hover, .v-zoom:focus-visible { background: var(--gold); color: #241a00; outline: none; }
.v-zoom[hidden] { display: none; }
.zoom {
    border: 0; padding: 0; background: transparent; color: #fff; max-width: 100vw; max-height: 100dvh;
    width: 100vw; height: 100dvh; overflow: hidden;
}
.zoom[open] { display: flex; flex-direction: column; }
.zoom::backdrop { background: rgb(10 8 4 / .92); }
.zoom .v-close { background: rgb(0 0 0 / .6); color: #fff; }
.z-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto; }
.z-img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; border-radius: 6px; }
/* the picture is bigger than the screen: click shows it pixel for pixel, scroll to move around */
.zoom.actual .z-body { display: block; padding: 0; }
.zoom.actual .z-img { max-width: none; max-height: none; cursor: zoom-out; border-radius: 0; }
.z-img.no-more { cursor: default; }
.z-caption { margin: 0; padding: 8px 16px 14px; text-align: center; font-size: .95rem; }

/* home: more gold */
.hero { position: relative; }
.hero::before {                      /* a soft gold glow behind the cap pictures */
    content: ""; position: absolute; z-index: -1; right: -40px; top: -20px; width: 60%; height: calc(100% + 40px);
    background: radial-gradient(closest-side, var(--gold-soft), transparent); opacity: .9; pointer-events: none;
}
.hero h1::after { content: ""; display: block; width: 72px; height: 4px; border-radius: 4px; background: var(--gold); margin-top: 14px; }
.hero-caps img { box-shadow: 0 0 0 2px var(--gold-soft), var(--shadow); }
.card { border-top: 4px solid var(--gold); }
.card:hover { border-color: var(--gold); }
.card h2, .video-text h2, .news h2 { color: var(--gold-ink); }
.card-go, .video-text .card-go { color: var(--gold-ink); }
.card:hover .card-go, .video-text .card-go:hover { text-decoration: underline; text-underline-offset: 3px; }
.video { border-left: 4px solid var(--gold); background: linear-gradient(120deg, var(--surface) 55%, var(--gold-soft)); }
.news h2 { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.news li { border-bottom-color: var(--line); }
@media (max-width: 860px) { .hero::before { width: 100%; right: 0; top: -10px; height: 45%; } }

/* Pictures page: the photo gallery */
.photo-group { margin-top: 28px; scroll-margin-top: 80px; }
.photo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.photo-head h2 { margin: 0 0 6px; color: var(--gold-ink); }
.photos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.photos li { min-width: 0; }
.photos a { display: block; border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); cursor: zoom-in; }
.photos img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s; }
.photos a:hover img, .photos a:focus-visible img { transform: scale(1.04); }
.photos a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.photo-cap { margin: 6px 2px 0; font-size: .9rem; line-height: 1.35; }
@media (max-width: 560px) { .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .photo-cap { font-size: .82rem; } }
@media (prefers-reduced-motion: reduce) { .photos img { transition: none; } }
/* browsing in the full size view */
.zoom .z-foot { background: transparent; border-top: 0; padding: 4px 16px 14px; }
.zoom .z-foot[hidden] { display: none; }
.zoom .z-count { color: #ddd; }
.zoom .v-nav { background: rgb(255 255 255 / .92); color: #1b1408; }
.zoom .v-nav:hover, .zoom .v-nav:focus-visible { background: var(--gold); color: #241a00; }
