/* diamond1 (Mortimer, 30-10-2026): /diamond-hands. The gems and the seals are in basc.css (they also show on the apes'
   cards and in the Passport); this file is the page itself. Each tier has its colour (--t) and its light (--t2). */
.dh-page, .dh-block { --t: #67e8f9; --t2: #ecfeff; }
.dh-tier--legend, .dh-tile--legend, .dh-split--legend, .dh-ape--legend, .dh-best-card--legend { --t: #f0abfc; --t2: #a78bfa; }
.dh-tier--diamond, .dh-tile--diamond, .dh-split--diamond, .dh-ape--diamond, .dh-best-card--diamond { --t: #67e8f9; --t2: #22d3ee; }
.dh-tier--gold, .dh-tile--gold, .dh-split--gold, .dh-ape--gold, .dh-best-card--gold { --t: #facc15; --t2: #f59e0b; }
.dh-tier--stone, .dh-tile--stone, .dh-split--stone, .dh-ape--stone, .dh-best-card--stone { --t: #cbd5e1; --t2: #94a3b8; }
.dh-tier--fresh, .dh-tile--fresh, .dh-split--fresh, .dh-ape--fresh, .dh-best-card--fresh { --t: #86efac; --t2: #22c55e; }

/* The five tiers */
.dh-ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.dh-tier { position: relative; display: grid; justify-items: center; gap: 6px; padding: 22px 14px 18px; border-radius: var(--radius); text-align: center; overflow: hidden;
    background: radial-gradient(90% 70% at 50% 0%, color-mix(in srgb, var(--t) 16%, transparent), transparent 72%), var(--panel);
    border: 1px solid color-mix(in srgb, var(--t) 32%, var(--line)); transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; }
.dh-tier::after { content: ''; position: absolute; left: 12%; right: 12%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--t), transparent); }
.dh-tier:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--t) 60%, transparent); box-shadow: 0 16px 36px -14px color-mix(in srgb, var(--t) 55%, transparent); }
.dh-tier-gem { display: grid; place-items: center; width: 64px; height: 64px; }
.dh-tier-gem .dh-gem { width: 54px; height: 54px; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--t) 60%, transparent)); }
.dh-tier--legend .dh-tier-gem .dh-gem { width: 62px; height: 62px; animation: dh-shine 4.5s ease-in-out infinite; }
.dh-tier-txt { display: grid; justify-items: inherit; gap: 6px; min-width: 0; }
.dh-tier-txt b { font-size: 1.05rem; font-weight: 900; color: #fff; }
.dh-tier-from { font-size: 0.82rem; color: var(--muted); text-wrap: balance; }
.dh-tier--legend .dh-tier-txt b { background: linear-gradient(100deg, #f0abfc, #c4b5fd, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* dhcount1 (31-10-2026): NFTs and holders of each tier, club totals only */
.dh-tier-count { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-self: end; width: 100%; margin-top: 10px; padding-top: 12px; }
.dh-tier-count::before { content: ''; position: absolute; left: 8%; right: 8%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--t) 45%, var(--line)), transparent); }
.dh-tier-num { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.dh-tier-num + .dh-tier-num { border-left: 1px solid color-mix(in srgb, var(--t) 22%, var(--line)); }
.dh-tier-num b { font-size: 1.35rem; line-height: 1.1; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
    background: linear-gradient(180deg, #fff 10%, var(--t) 120%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dh-tier-num small { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: color-mix(in srgb, var(--t) 55%, var(--muted)); }
.dh-tier.is-empty .dh-tier-num b { background: none; color: color-mix(in srgb, var(--muted) 70%, transparent); }
.dh-tier.is-empty .dh-tier-num small { color: var(--muted); opacity: 0.8; }
.dh-ladder-note { margin: 10px 2px 0; font-size: 0.8rem; color: var(--muted); text-align: center; }
@keyframes dh-shine { 0%, 100% { filter: drop-shadow(0 0 10px rgba(240,171,252,0.45)); transform: translateY(0); } 50% { filter: drop-shadow(0 0 22px rgba(103,232,249,0.7)); transform: translateY(-3px); } }

/* What resets the clock */
.dh-rules { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dh-rules li { --r: #4ade80; position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 4px; align-content: start; padding: 16px 18px;
    border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.dh-rules li.is-reset { --r: #fb923c; }
.dh-rules li.is-legend { --r: #f0abfc; }
.dh-rules i { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-style: normal; font-weight: 900; font-size: 1rem;
    color: #07020f; background: var(--r); box-shadow: 0 0 18px -4px var(--r); }
.dh-rules b { font-size: 0.95rem; }
.dh-rules span { font-size: 0.84rem; color: var(--muted); line-height: 1.45; }

/* Your hands */
.dh-me { padding: 22px; border-radius: var(--radius); background: radial-gradient(70% 120% at 0% 0%, rgba(103,232,249,0.08), transparent 70%), radial-gradient(60% 120% at 100% 100%, rgba(240,171,252,0.07), transparent 70%), var(--panel);
    border: 1px solid var(--line-strong); }
.dh-me-tiles { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 14px; }
.dh-tile { display: grid; align-content: start; gap: 2px; padding: 16px 18px; border-radius: 16px; background: rgba(0,0,0,0.22); border: 1px solid var(--line); }
.dh-tile > span { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.dh-tile b { font-size: 1.9rem; font-weight: 900; line-height: 1.15; color: #fff; font-variant-numeric: tabular-nums; }
.dh-tile small { font-size: 0.82rem; color: var(--muted); }
.dh-tile--hero { border-color: color-mix(in srgb, var(--t) 45%, transparent); background: radial-gradient(100% 120% at 0% 0%, color-mix(in srgb, var(--t) 20%, transparent), transparent 70%), rgba(0,0,0,0.22); }
.dh-tile--hero b { font-size: 2.3rem; color: var(--t); text-shadow: 0 0 24px color-mix(in srgb, var(--t) 45%, transparent); }
.dh-split { display: flex; gap: 3px; height: 12px; margin: 20px 0 10px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.06); }
.dh-split-part { display: block; min-width: 8px; background: linear-gradient(90deg, var(--t2), var(--t)); }
.dh-split-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.86rem; color: var(--muted); }
.dh-split-legend li { display: inline-flex; align-items: center; gap: 6px; }
.dh-split-legend .dh-gem { width: 16px; height: 16px; }
.dh-split-legend b { color: #fff; font-variant-numeric: tabular-nums; }
.dh-reading { display: grid; gap: 8px; margin: 18px 0 0; font-size: 0.86rem; color: var(--muted); }
.dh-reading-bar { display: block; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.dh-reading-bar i { display: block; width: var(--p); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22d3ee, #f0abfc); }
.dh-sub { margin: 24px 0 12px; font-size: 1rem; font-weight: 900; }
.dh-oldest { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.dh-ape { display: grid; gap: 4px; min-width: 0; }
.dh-ape-img { position: relative; display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #120a24;
    border: 1px solid color-mix(in srgb, var(--t) 45%, transparent); box-shadow: 0 0 22px -10px var(--t); }
.dh-ape-img img { width: 100%; height: 100%; object-fit: cover; }
.dh-ape b { font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-ape > span:last-child { font-size: 0.78rem; color: var(--muted); }
.dh-show { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.dh-show > div { display: grid; gap: 2px; }
.dh-show span { font-size: 0.84rem; color: var(--muted); }
.dh-switch { position: relative; flex: none; width: 52px; height: 30px; padding: 0; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.08); cursor: pointer; transition: background 0.25s, border-color 0.25s; }
.dh-switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #cbd5e1; transition: transform 0.25s, background 0.25s; }
.dh-switch.is-on { background: linear-gradient(135deg, #22d3ee, #a78bfa); border-color: transparent; }
.dh-switch.is-on i { transform: translateX(22px); background: #fff; }
.dh-switch:disabled { opacity: 0.6; cursor: progress; }

/* Empty states */
.dh-empty { display: grid; justify-items: center; gap: 8px; padding: 36px 20px; border-radius: var(--radius); text-align: center; background: var(--panel); border: 1px dashed var(--line-strong); }
.dh-empty-gem .dh-gem { width: 46px; height: 46px; filter: drop-shadow(0 0 14px rgba(103,232,249,0.45)); }
.dh-empty b { font-size: 1.1rem; }
.dh-empty > span:not(.dh-empty-gem) { max-width: 520px; color: var(--muted); font-size: 0.92rem; }
.dh-empty .btn { margin-top: 6px; }

/* The board */
.dh-figures { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.dh-figures li { display: grid; justify-items: center; min-width: 96px; padding: 10px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.dh-figures b { font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.dh-figures span { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.dh-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dh-board--me { margin-top: 10px; }
.dh-row { display: grid; grid-template-columns: 64px 44px minmax(140px, 1fr) minmax(0, 1.3fr) 236px 56px; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border-radius: 16px;
    background: var(--panel); border: 1px solid var(--line); transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.dh-row:hover { border-color: rgba(103,232,249,0.4); background: var(--panel-strong); }
.dh-row.is-me { border-color: rgba(249,115,22,0.6); background: linear-gradient(90deg, rgba(249,115,22,0.12), transparent 60%), var(--panel); }
.dh-row--p1 { --t: #f0abfc; } .dh-row--p2 { --t: #67e8f9; } .dh-row--p3 { --t: #facc15; }
.dh-row--top { border-color: color-mix(in srgb, var(--t) 45%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--t) 12%, transparent), transparent 55%), var(--panel); }
.dh-place { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-weight: 900; font-size: 1rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.dh-row--top .dh-place { color: #fff; }
.dh-place i { display: inline-grid; font-style: normal; }
.dh-place .dh-gem { width: 20px; height: 20px; filter: drop-shadow(0 0 6px var(--t)); }
.dh-ava { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #120a24; border: 2px solid rgba(255,255,255,0.14); }
.dh-who { display: grid; min-width: 0; }
.dh-who .dh-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-who a.dh-name:hover { color: var(--cyan); }
.dh-who small { font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-hold { display: grid; justify-items: end; text-align: right; }
.dh-hold b { font-size: 1.15rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.dh-hold small { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.dh-row-ape { position: relative; display: block; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: #120a24; }
.dh-row-ape img { width: 100%; height: 100%; object-fit: cover; }
.dh-row-ape .nft-held { right: 2px; top: auto; bottom: 2px; padding: 0 4px; font-size: 0; gap: 0; }
.dh-row-ape .nft-held .dh-gem { width: 13px; height: 13px; }

/* How long, next to the longest of all: a bar in the colour of the tier */
.dh-bar { display: block; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.dh-bar i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--t2), var(--t)); box-shadow: 0 0 12px -2px var(--t); }
.dh-bar--legend { --t: #f0abfc; --t2: #7c3aed; } .dh-bar--diamond { --t: #67e8f9; --t2: #0e7490; } .dh-bar--gold { --t: #facc15; --t2: #a16207; }
.dh-bar--stone { --t: #cbd5e1; --t2: #475569; } .dh-bar--fresh { --t: #86efac; --t2: #15803d; }

/* The header's art (desktop): the three highest gems floating in their light */
.dh-hero-art { position: absolute; right: 7%; top: 50%; width: 260px; height: 220px; transform: translateY(-50%); pointer-events: none; }
.dh-hero-ring { position: absolute; inset: 10px 20px; border-radius: 50%; background: radial-gradient(closest-side, rgba(240,171,252,0.28), rgba(103,232,249,0.12) 60%, transparent); filter: blur(6px); }
.dh-hero-art .dh-gem { position: absolute; }
.dh-hero-big { width: 150px; height: 150px; left: 55px; top: 30px; filter: drop-shadow(0 0 30px rgba(240,171,252,0.55)); animation: dh-float 6s ease-in-out infinite; }
.dh-hero-s1 { width: 70px; height: 70px; left: 0; top: 120px; filter: drop-shadow(0 0 18px rgba(103,232,249,0.55)); animation: dh-float 7s ease-in-out -2s infinite; }
.dh-hero-s2 { width: 54px; height: 54px; right: 6px; top: 22px; filter: drop-shadow(0 0 16px rgba(250,204,21,0.5)); animation: dh-float 8s ease-in-out -4s infinite; }
.dh-spark { position: absolute; width: 14px; height: 14px; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: dh-twinkle 3s ease-in-out infinite; }
.dh-spark--1 { left: 190px; top: 34px; } .dh-spark--2 { left: 40px; top: 70px; width: 10px; height: 10px; animation-delay: -1s; } .dh-spark--3 { left: 200px; top: 170px; width: 9px; height: 9px; animation-delay: -2s; }
@keyframes dh-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes dh-twinkle { 0%, 100% { opacity: 0.25; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1); } }
@media (max-width: 1180px) { .dh-hero-art { display: none; } }

/* The oldest hold of each collection */
.dh-best { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.dh-best-card { flex: 0 1 calc((100% - 48px) / 4); min-width: 220px; max-width: 320px; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--panel);
    border: 1px solid color-mix(in srgb, var(--t) 38%, var(--line)); transition: transform 0.25s, box-shadow 0.25s; }
.dh-best-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -16px color-mix(in srgb, var(--t) 60%, transparent); }
.dh-best-img { position: relative; display: block; aspect-ratio: 1; background: #120a24; }
.dh-best-img img { width: 100%; height: 100%; object-fit: cover; }
.dh-best-img .nft-held { right: 10px; top: 10px; font-size: 0.82rem; padding: 3px 10px 3px 7px; }
.dh-best-img .nft-held .dh-gem { width: 15px; height: 15px; }
.dh-best-body { display: grid; gap: 4px; padding: 14px 16px 16px; }
.dh-best-body > small { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t); }
.dh-best-body > b { font-size: 1.05rem; }
.dh-best-who { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 700; min-width: 0; }
.dh-best-who img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; }
.dh-best-who a:hover { color: var(--cyan); }
.dh-best-since { font-size: 0.84rem; color: var(--muted); }
.dh-source { margin: 0; }

@media (max-width: 1100px) {
    .dh-ladder { gap: 10px; }
    .dh-tier { padding: 18px 10px 14px; }
    .dh-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dh-me-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dh-oldest { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dh-best-card { flex-basis: calc((100% - 32px) / 3); }
}
@media (max-width: 760px) {
    .dh-ladder { grid-template-columns: 1fr; gap: 8px; }
    .dh-tier { grid-template-columns: auto minmax(0, 1fr) auto; justify-items: start; align-items: center; text-align: left; gap: 12px; padding: 12px 14px 12px 16px; }
    .dh-tier-gem { width: 40px; height: 40px; }
    .dh-tier-gem .dh-gem, .dh-tier--legend .dh-tier-gem .dh-gem { width: 34px; height: 34px; }
    .dh-tier-txt { gap: 2px; justify-items: start; }
    /* dhcount1: on phones the two totals go one under the other, numbers right-aligned, words aligned too */
    .dh-tier-count { grid-template-columns: 1fr auto; min-width: 7.9rem; box-sizing: border-box; column-gap: 6px; row-gap: 2px; align-items: baseline; width: auto; margin: 0; padding: 0 0 0 12px; align-self: center; justify-self: end;
        border-left: 1px solid color-mix(in srgb, var(--t) 22%, var(--line)); }
    .dh-tier-count::before { display: none; }
    .dh-tier-num { display: contents; }
    .dh-tier-num + .dh-tier-num { border-left: 0; }
    .dh-tier-num b { font-size: 1.1rem; justify-self: end; }
    .dh-tier-num small { font-size: 0.75rem; letter-spacing: 0.04em; }
    .dh-ladder-note { text-align: left; }
    .dh-rules { grid-template-columns: 1fr; }
    .dh-best-card { flex-basis: calc((100% - 16px) / 2); min-width: 0; }
    .dh-figures { width: 100%; }
    .dh-figures li { flex: 1; min-width: 0; }
}
@media (max-width: 600px) {
    .dh-me { padding: 16px; }
    .dh-me-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .dh-tile { padding: 12px; }
    .dh-tile > span { font-size: 0.75rem; letter-spacing: 0.02em; }
    .dh-tile b { font-size: 1.4rem; }
    .dh-tile--hero { grid-column: 1 / -1; }
    .dh-tile--hero b { font-size: 2rem; }
    .dh-row { grid-template-columns: 40px 36px minmax(0, 1fr) auto; gap: 10px; padding: 8px 10px 8px 6px; }
    .dh-bar { display: none; }
    .dh-place { font-size: 0.86rem; flex-direction: column; gap: 0; }
    .dh-place .dh-gem { width: 16px; height: 16px; }
    .dh-ava { width: 36px; height: 36px; }
    .dh-row-ape { display: none; }
    .dh-hold b { font-size: 1rem; }
    .dh-hold small { font-size: 0.75rem; }
    .dh-more, .dh-mintw { display: none; }
    .dh-who .dh-name { font-size: 1rem; }
    .dh-best-body { padding: 12px; }
    .dh-show { align-items: flex-start; }
}
@media (max-width: 400px) {
    .dh-tier { gap: 10px; padding: 12px; }
    .dh-tier-gem { width: 32px; height: 32px; }
    .dh-tier-gem .dh-gem, .dh-tier--legend .dh-tier-gem .dh-gem { width: 30px; height: 30px; }
    .dh-tier-txt b { font-size: 1rem; }
    .dh-tier-count { padding-left: 10px; column-gap: 5px; }
    .dh-tier-num b { font-size: 1.05rem; }
}
@media (max-width: 420px) {
    .dh-hold small { white-space: normal; }
    .dh-best-card { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .dh-tier, .dh-row, .dh-best-card, .dh-switch, .dh-switch i { transition: none; }
    .dh-tier--legend .dh-tier-gem .dh-gem, .dh-hero-art .dh-gem, .dh-spark { animation: none; }
    .dh-tier:hover, .dh-best-card:hover { transform: none; }
}
