/* Ostracon · أوستراكون — shared styles
   Palette: black-first with pink, mint, lavender, lemon, gold and lapis, all as CSS variables below.
   Change a colour here and every page follows. */

/* ---------- Reem Kufi Fun is a colour font: recolour its dots to match ---------- */
@font-palette-values --rk-a { font-family: 'Reem Kufi Fun'; override-colors: 0 #FF6FB5, 1 #F2B937, 2 #6FF2CF; }

/* ---------- palette ---------- */
:root {
  --bg: #1B1424;
  --bg-check: rgba(169, 139, 255, 0.10);
  --rain-1: #FF6FB5; --rain-2: #6FF2CF; --rain-3: #A98BFF; --rain-4: #F2B937;
  --rain-opacity: 0.55;

  --ink: #141018;
  --paper: #FFF6FB;
  --paper-hi: #FFFFFF;
  --paper-band: #FFF7B8;
  --panel: #141018;
  --panel-2: #120E1E;
  --panel-3: #141020;
  --on-panel: #F4EEFF;
  --muted: #9D8FC9;
  --muted-ink: #5E4F6E;

  --band: #FFC2E2;
  --band-stripe: rgba(255, 111, 181, 0.35);
  --on-band: #141018;
  --title-fill: #FFFFFF;
  --title-shadow: #141018;
  --frame-shadow: #FF6FB5;
  --side-l: #E3D8FF;
  --side-r: #C9FFF0;
  --desk: #1E7F75;
  --desk-dot: rgba(201, 255, 240, 0.22);
  --portrait: #E33A6E;
  --papyrus: #F6EBCF;
  --papyrus-fibre: rgba(164, 124, 62, 0.14);

  --a1: #FF6FB5; --a1-soft: #FFC2E2; --a1-deep: #C2187A; --a1-text: #FF6FB5; --on-a1: #141018;
  --a2: #6FF2CF; --a2-soft: #C9FFF0; --a2-deep: #1E7F75; --a2-text: #6FF2CF; --on-a2: #141018;
  --a3: #A98BFF; --a3-soft: #E3D8FF; --a3-text: #C3B4FF; --on-a3: #141018;
  --a4: #FFE95C; --a4-soft: #FFF7B8; --a4-text: #FFE95C; --on-a4: #141018;
  --gold: #F2B937;
  --lapis: #2747B8;
  --bead-b: #FF6FB5;
  --cute: #FF6FB5;
  --hover: #FFE95C;
  --on-hover: #141018;
  --link: #C2187A;
  --link-hover: #2747B8;
  --focus: #2747B8;
  --footer-text: #FFC2E2;

  --pack-1: #FF6FB5; --pack-1-stripe: rgba(255, 233, 92, 0.6);
  --pack-2: #6FF2CF; --pack-2-stripe: rgba(255, 255, 255, 0.55);
  --pack-3: #A98BFF; --pack-3-stripe: rgba(255, 194, 226, 0.6);
  --pack-sealed: #3A3446;

  --card-1: #6FF2CF; --card-2: #A98BFF; --card-3: #FF6FB5; --card-4: #FFE95C; --card-5: #F2B937; --card-6: #CDB8FF; --card-7: #FFC2E2;
  --mat: #120E1E;
  --mat-line: rgba(111, 242, 207, 0.09);
  --mat-edge: rgba(111, 242, 207, 0.55);
  --circle: #A98BFF;
  --circle-text: #6FF2CF;

}

/* ---------- type ---------- */
:root {
  --f-display: 'Mochiy Pop One', 'Marhey', system-ui, sans-serif;
  --f-body: 'Handjet', system-ui, sans-serif;
  --f-term: 'VT323', 'Handjet', 'Noto Sans Egyptian Hieroglyphs', ui-monospace, monospace;
  --f-cute: 'Marhey', 'Handjet', system-ui, sans-serif;
  --f-ar-display: 'Reem Kufi Fun', 'Handjet', sans-serif;
  --f-ar: 'Handjet', sans-serif;
  --f-ar-cute: 'Marhey', sans-serif;
  --f-hiero: 'Noto Sans Egyptian Hieroglyphs', serif;
  --f-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 18px; font-weight: 500; line-height: 1.45; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px dashed var(--focus); outline-offset: 3px; }
/* on dark surfaces the lapis outline disappears, so it turns lemon there */
.shellbar :focus-visible, .marquee-bar :focus-visible, .site-footer :focus-visible, .termbox :focus-visible, .tbox.dark :focus-visible,
.win-bar :focus-visible, .field-wall :focus-visible, .proj-hero :focus-visible { outline-color: var(--a4-text); }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Arabic: always its own font, never letter-spaced or case-transformed (it breaks the joins) */
[lang="ar"] { font-family: var(--f-ar); letter-spacing: 0 !important; text-transform: none !important; font-style: normal; }
.ar-d { font-family: var(--f-ar-display); font-palette: --rk-a; }
.ar-c { font-family: var(--f-ar-cute); }

/* kaomoji are pictures: keep their characters in typed order even when they contain Arabic letters */
.kao { unicode-bidi: bidi-override; direction: ltr; white-space: nowrap; color: var(--cute); }
.kao.plain { color: inherit; }

.hiero { font-family: var(--f-hiero); }
.term { font-family: var(--f-term); }
.cute { font-family: var(--f-cute); }

/* ---------- wallpaper, hieroglyph rain, frame ---------- */
.wall {
  position: relative; min-height: 100vh; padding: 28px clamp(8px, 2vw, 24px); overflow: hidden;
  background-color: var(--bg);
  background-image:
    linear-gradient(45deg, var(--bg-check) 25%, transparent 25%, transparent 75%, var(--bg-check) 75%),
    linear-gradient(45deg, var(--bg-check) 25%, transparent 25%, transparent 75%, var(--bg-check) 75%);
  background-size: 36px 36px; background-position: 0 0, 18px 18px;
}
.rain-layer { position: absolute; inset: 0; display: flex; justify-content: space-between; padding: 0 0.5%; opacity: var(--rain-opacity); pointer-events: none; overflow: hidden; }
.rain-col { width: 26px; word-break: break-all; text-align: center; font-family: var(--f-hiero); font-size: 20px; line-height: 1.4; animation: rain linear infinite; }
.rc1 { color: var(--rain-1); } .rc2 { color: var(--rain-2); } .rc3 { color: var(--rain-3); } .rc4 { color: var(--rain-4); }
@keyframes rain { from { transform: translateY(-50%); } to { transform: translateY(0); } }

.frame { position: relative; max-width: 1180px; margin: 0 auto; background: var(--paper); border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--frame-shadow); }

.marquee-bar { overflow: hidden; background: var(--ink); color: var(--a4-text); font-size: 17px; padding: 7px 0; }
.marquee { display: inline-block; padding-left: 100%; white-space: nowrap; animation: marquee 30s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- site bar ---------- */
.sitebar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 12px clamp(14px, 3vw, 28px);
  background-color: var(--band);
  background-image: repeating-linear-gradient(135deg, var(--band-stripe) 0 14px, transparent 14px 28px);
  border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
}
.brand { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; min-height: 44px; text-decoration: none; color: inherit; }
.brand-en { font-family: var(--f-display); font-size: 26px; line-height: 1.1; color: var(--title-fill); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--title-shadow); }
.brand-ar { font-size: 22px; color: var(--on-band); }
.nav ul { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a { display: inline-flex; align-items: baseline; gap: 6px; min-height: 44px; padding: 8px 12px; background: var(--paper-hi); border: 2px solid var(--ink); color: var(--ink); text-decoration: none; font-size: 17px; line-height: 1.4; transition: background 0.12s ease; }
.nav a:hover { background: var(--hover); color: var(--on-hover); }
.nav a[aria-current] { background: var(--a2); color: var(--on-a2); }
.nav [lang="ar"] { font-size: 15px; opacity: 0.85; }

/* ---------- shell breadcrumb bar ---------- */
.shellbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 18px; padding: 8px clamp(14px, 3vw, 28px); background: var(--panel); color: var(--on-panel); font-family: var(--f-term); font-size: 20px; }
.p-user { color: var(--a4-text); } .p-sep { color: var(--muted); } .p-path { color: var(--a2-text); }
.crumb { color: var(--a3-text); text-decoration: none; }
.crumb:hover { color: var(--a4-text); text-decoration: underline; }
.dim { color: var(--muted); }

/* ---------- scanlines, cursor, blink ---------- */
.scan { position: relative; }
.scan::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.28) 2px 3px); }
.cursor { animation: cur 1.05s steps(1) infinite; }
@keyframes cur { 50% { opacity: 0; } }
.blink { animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

/* ---------- windows ---------- */
.win { background: var(--paper-hi); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.win-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 8px 5px 12px; background: var(--ink); color: var(--a4-text); font-size: 16px; line-height: 1.3; }
.win-bar h2, .win-bar h3 { font-size: inherit; font-weight: 400; }
.dots { display: flex; gap: 4px; flex: 0 0 auto; }
.dots i { width: 15px; height: 15px; border: 1.5px solid currentColor; }
.dots i:last-child { background: var(--a1); border-color: var(--a1); }

/* ---------- terminal bodies ---------- */
.termbox { background: var(--panel); color: var(--on-panel); font-family: var(--f-term); font-size: 21px; line-height: 1.3; }

/* ---------- buttons, chips, stickers ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 14px;
  background: var(--paper-hi); color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none; font-size: 17px; line-height: 1.2; cursor: pointer; transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translate(-2px, -2px); background: var(--hover); color: var(--on-hover); }
.btn-a1 { background: var(--a1); color: var(--on-a1); }
.btn-a2 { background: var(--a2); color: var(--on-a2); }
.btn-a4 { background: var(--a4); color: var(--on-a4); }
.btn-soft { background: var(--a2-soft); }
.sticker { display: inline-block; padding: 4px 12px; border: 2px solid var(--ink); font-family: var(--f-cute); font-size: 15px; line-height: 1.3; }

/* ---------- section headers ---------- */
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sec-head .glyph { font-family: var(--f-hiero); font-size: 28px; line-height: 1; color: var(--lapis); }
.sec-head h2 { display: flex; align-items: baseline; gap: 10px; font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1.1; }
.sec-head h2 [lang="ar"] { font-family: var(--f-ar-display); font-size: 22px; }
.sec-head .rule { flex: 1 1 auto; height: 3px; background-image: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 10px); }
.sec-sub { margin: 0 0 14px; font-family: var(--f-term); font-size: 20px; color: var(--muted-ink); }

/* ---------- footer ---------- */
.site-footer { padding: 16px; background: var(--ink); color: var(--footer-text); text-align: center; font-size: 16px; line-height: 1.7; border-top: 3px solid var(--ink); }
.site-footer .alt { color: var(--a2-text); }

/* ---------- utility colours ---------- */
.t-a1 { color: var(--a1-text); } .t-a2 { color: var(--a2-text); } .t-a3 { color: var(--a3-text); } .t-a4 { color: var(--a4-text); }
.t-soft { color: var(--a1-soft); } .t-lapis { color: var(--lapis); } .t-gold { color: var(--gold); } .t-cute { color: var(--cute); }
.t-link { color: var(--link); }
.bg-a1 { background: var(--a1); color: var(--on-a1); } .bg-a2 { background: var(--a2); color: var(--on-a2); }
.bg-a3 { background: var(--a3); color: var(--on-a3); } .bg-a4 { background: var(--a4); color: var(--on-a4); }
.muted-ink { color: var(--muted-ink); }
.nowrap { white-space: nowrap; }
.tilt-l { transform: rotate(-3deg); } .tilt-r { transform: rotate(2deg); }

/* ---------- skip link ---------- */
.skip { position: absolute; left: 8px; top: -80px; z-index: 100; padding: 8px 14px; background: var(--a4); color: var(--on-a4); border: 2px solid var(--ink); font-size: 18px; text-decoration: none; }
.skip:focus { top: 8px; }

/* ---------- inner-page hero ---------- */
.page-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 32px; padding: 30px clamp(16px, 4vw, 44px); border-bottom: 3px solid var(--ink); color: var(--ink); }
.hero-dots { background-color: var(--a4-soft); background-image: radial-gradient(color-mix(in srgb, var(--gold) 45%, transparent) 1px, transparent 1.6px); background-size: 10px 10px; }
.hero-stripes { background-color: var(--band); background-image: repeating-linear-gradient(135deg, var(--band-stripe) 0 14px, transparent 14px 28px); }
.ph-text { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hero-tag { align-self: flex-start; padding: 3px 10px; background: var(--ink); color: var(--a2-text); font-size: 15px; transform: rotate(-2deg); outline: 1.5px solid var(--a2-text); outline-offset: -4px; }
.ph-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 22px; max-width: 100%; font-family: var(--f-display); font-weight: 400; font-size: clamp(40px, 6vw, 78px); line-height: 1.12; color: var(--title-fill); -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--title-shadow); overflow-wrap: anywhere; }
.ph-title [lang="ar"] { font-size: 0.62em; -webkit-text-stroke-width: 5px; }
.ph-line { max-width: 40em; font-family: var(--f-cute); font-size: 18px; line-height: 1.65; }
.ph-term { max-width: 100%; padding: 6px 12px; background: var(--ink); color: var(--a2-text); font-family: var(--f-term); font-size: 21px; line-height: 1.25; }

/* ---------- Cleo's spot: speech bubble, the cat, her name tag ---------- */
.cleo-spot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bubble { position: relative; max-width: 12em; margin-bottom: 6px; padding: 6px 12px; background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 2px 2px 0 var(--ink); font-family: var(--f-cute); font-size: 15px; line-height: 1.4; text-align: center; color: var(--ink); }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 13px; height: 13px; margin-left: -6px; background: var(--paper-hi); border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.name-tag { padding: 0 8px; background: var(--ink); color: var(--a2-soft); font-family: var(--f-term); font-size: 18px; line-height: 1.35; }
svg.cleo { overflow: visible; }
.breathe { animation: breathe 3.8s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes breathe { 50% { transform: scale(1.012, 1.03); } }
.zz { fill: var(--a1-deep); opacity: 0; animation: zz 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
.zz2 { animation-delay: 1.2s; }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 6px); } 35% { opacity: 1; } 100% { opacity: 0; transform: translate(9px, -12px); } }

/* ---------- boxes with a terminal title strip ---------- */
.tbox { min-width: 0; background: var(--paper-hi); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); color: var(--ink); }
.tbox.dark { background: var(--panel); color: var(--on-panel); }
.tbox-h { padding: 5px 10px; background: var(--ink); color: var(--a4-text); font-family: var(--f-body); font-size: 17px; font-weight: 500; line-height: 1.3; }
.tbox-h [lang="ar"] { font-size: 16px; }
.h-a1 { background: var(--a1); color: var(--on-a1); } .h-a2 { background: var(--a2); color: var(--on-a2); }
.h-a3 { background: var(--a3); color: var(--on-a3); } .h-a4 { background: var(--a4); color: var(--on-a4); }
.tbox-body { padding: 10px 12px 12px; }
.sh-a1 { box-shadow: 4px 4px 0 var(--a1); } .sh-a2 { box-shadow: 4px 4px 0 var(--a2); } .sh-a3 { box-shadow: 4px 4px 0 var(--a3); } .sh-a4 { box-shadow: 4px 4px 0 var(--a4); }
.sh-gold { box-shadow: 4px 4px 0 var(--gold); } .sh-lapis { box-shadow: 4px 4px 0 var(--lapis); } .sh-ink { box-shadow: 4px 4px 0 var(--ink); }
.term-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; font-family: var(--f-term); font-size: 20px; line-height: 1.35; }
.term-dl dt { color: var(--muted-ink); }
.dark .term-dl dt, .term-dl.dark dt { color: var(--muted); }
.term-dl dd { min-width: 0; overflow-wrap: anywhere; }
.bar-a1 { background: var(--a1); color: var(--on-a1); }
.bar-a1 .dots i:last-child { background: var(--on-a1); border-color: var(--on-a1); }

/* ---------- section extras ---------- */
.sec-head .glyph.g-a1 { color: var(--a1-deep); }
.sec-count { flex: 0 1 auto; min-width: 0; font-family: var(--f-term); font-size: 20px; line-height: 1.2; text-align: right; color: var(--muted-ink); }
.see-all { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; }

/* ---------- prev / next, shell nav, chips ---------- */
.page-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 22px clamp(16px, 4vw, 48px) 28px; border-top: 3px solid var(--ink); }
.btn-a3 { background: var(--a3); color: var(--on-a3); }
.btn-lg { min-height: 50px; padding: 10px 18px; font-family: var(--f-display); font-size: 16px; }
.btn.is-dim { opacity: 0.5; box-shadow: none; cursor: default; }
.btn.is-dim:hover { transform: none; background: var(--paper-hi); color: var(--ink); }
.crumbs { min-width: 0; overflow-wrap: anywhere; }
.shell-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.shell-nav .off { color: var(--muted); opacity: 0.6; }
.chip { display: inline-block; padding: 2px 10px; border: 1.5px solid currentColor; font-size: 15px; line-height: 1.4; }
.is-placeholder { border-style: dashed !important; box-shadow: none !important; opacity: 0.75; cursor: help; }

/* ---------- tag stickers ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 1px 9px; border: 1.5px solid var(--ink); color: var(--ink); font-size: 15px; line-height: 1.4; text-decoration: none; transform: rotate(-2deg); }
.tag-chip:nth-child(2n) { transform: rotate(1.5deg); }
.tag-chip:hover { background: var(--hover); color: var(--on-hover); }
.tc-1 { background: var(--a1-soft); } .tc-2 { background: var(--a2-soft); } .tc-3 { background: var(--a3-soft); } .tc-4 { background: var(--a4-soft); }

/* ---------- paper and tape ---------- */
.paper-lined { background: repeating-linear-gradient(to bottom, transparent 0 27px, color-mix(in srgb, var(--a1-deep) 14%, transparent) 27px 28px), var(--paper); }
.paper-grid { background: linear-gradient(color-mix(in srgb, var(--a2-deep) 12%, transparent) 1px, transparent 1px) 0 0 / 18px 18px, linear-gradient(90deg, color-mix(in srgb, var(--a2-deep) 12%, transparent) 1px, transparent 1px) 0 0 / 18px 18px, var(--paper-hi); }
.paper-dots { background: radial-gradient(color-mix(in srgb, var(--a3) 35%, transparent) 1.2px, transparent 1.8px) 0 0 / 14px 14px, color-mix(in srgb, var(--a3-soft) 30%, var(--paper-hi)); }
.paper-papyrus { background: repeating-linear-gradient(0deg, var(--papyrus-fibre) 0 1px, transparent 1px 4px, var(--papyrus-fibre) 4px 5px, transparent 5px 11px), repeating-linear-gradient(90deg, color-mix(in srgb, var(--papyrus-fibre) 55%, transparent) 0 7px, transparent 7px 21px), var(--papyrus); }
.tape { position: absolute; top: -4px; left: 40%; width: 86px; height: 18px; background: color-mix(in srgb, var(--a2) 80%, transparent); transform: rotate(-3deg); pointer-events: none; }

/* ---------- diary bits shared by home and the diary ---------- */
.entry-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 8px 3px 12px; background: var(--ink); color: var(--a2-soft); font-family: var(--f-term); font-size: 18px; }
.entry-bar .ls { min-width: 0; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.entry-bar i { flex: 0 0 auto; width: 13px; height: 13px; }
.sh-a1 .entry-bar i { background: var(--a1); } .sh-a2 .entry-bar i { background: var(--a2); }
.mood { position: absolute; top: 10px; right: 12px; padding: 2px 8px; background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 999px; font-family: var(--f-term); font-size: 17px; transform: rotate(5deg); }
.less { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--f-term); font-size: 20px; }
.echo-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; }
.mood-pill { padding: 0 8px; background: var(--a4); color: var(--on-a4); border-radius: 999px; font-family: var(--f-term); font-size: 17px; }
.echo-text { overflow-wrap: anywhere; }

/* ---------- booster packs (home, the gallery shelf, collection pages) ---------- */
.pack-link { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); -webkit-tap-highlight-color: transparent; }
.pack { --crimp: polygon(0 3%, 5% 0, 10% 3%, 15% 0, 20% 3%, 25% 0, 30% 3%, 35% 0, 40% 3%, 45% 0, 50% 3%, 55% 0, 60% 3%, 65% 0, 70% 3%, 75% 0, 80% 3%, 85% 0, 90% 3%, 95% 0, 100% 3%, 100% 97%, 95% 100%, 90% 97%, 85% 100%, 80% 97%, 75% 100%, 70% 97%, 65% 100%, 60% 97%, 55% 100%, 50% 97%, 45% 100%, 40% 97%, 35% 100%, 30% 97%, 25% 100%, 20% 97%, 15% 100%, 10% 97%, 5% 100%, 0 97%);
  display: block; width: 136px; height: 196px; padding: 3px; background: var(--ink); clip-path: var(--crimp); transition: transform 0.2s ease; }
.pack-face { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 14px 8px 12px; clip-path: var(--crimp); }
.pf-1 { background: repeating-linear-gradient(135deg, var(--pack-1-stripe) 0 9px, transparent 9px 18px), var(--pack-1); }
.pf-2 { background: repeating-linear-gradient(135deg, var(--pack-2-stripe) 0 9px, transparent 9px 18px), var(--pack-2); }
.pf-3 { background: repeating-linear-gradient(135deg, var(--pack-3-stripe) 0 9px, transparent 9px 18px), var(--pack-3); }
.pf-sealed { justify-content: center; gap: 10px; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 9px, transparent 9px 18px), var(--pack-sealed); }
.pack-no { padding: 1px 6px; background: var(--ink); color: var(--a4-text); font-size: 14px; }
.pack-seal { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--paper-hi); border: 3px solid var(--ink); font-size: 38px; line-height: 1; color: var(--lapis); }
.pack-name { font-family: var(--f-display); font-size: 15px; line-height: 1.2; text-align: center; color: #FFFFFF; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.pack-count { padding: 1px 6px; background: var(--paper-hi); border: 2px solid var(--ink); color: var(--ink); font-size: 14px; }
.pack-path { padding: 1px 6px; font-family: var(--f-term); font-size: 18px; color: var(--paper); border: 1px solid color-mix(in srgb, var(--paper) 60%, transparent); }
.sealed-ankh { font-size: 40px; line-height: 1; color: var(--gold); }
.sealed-tag { padding: 1px 8px; background: var(--a4); color: var(--on-a4); font-size: 14px; }
.sealed-soon { font-size: 14px; color: var(--a3-soft); }
.dim-path { color: color-mix(in srgb, var(--paper) 70%, transparent); border-color: transparent; }
@keyframes shake { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
@media (hover: hover) {
  .pack-link:hover .pack { animation: shake 0.45s ease-in-out; }
  .pack-link:hover .pack-path { background: var(--hover); color: var(--on-hover); }
}
.pack-link:focus-visible .pack-path, .pack-link:active .pack-path { background: var(--hover); color: var(--on-hover); }

/* ---------- trading cards up close (project pages, the about card) ---------- */
.big-card { position: relative; width: min(280px, 72vw); aspect-ratio: 63 / 88; display: flex; flex-direction: column; gap: 7px; padding: 10px; background: var(--frame, var(--a2)); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 0 0 3px var(--frame, var(--a2)), 0 0 54px color-mix(in srgb, var(--frame, var(--a2)) 50%, transparent), 0 28px 60px rgba(0, 0, 0, 0.45); color: var(--ink); }
.bc-title { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 3px 8px; background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 5px; font-size: 17px; line-height: 1.3; }
.bc-title > span:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-art { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; border: 2px solid var(--ink); }
.bc-art span { padding: 1px 8px; background: var(--paper-hi); font-size: 14px; }
.bc-type { padding: 2px 8px; background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 5px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-text { min-height: 64px; padding: 6px 8px; background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 5px; font-size: 14px; line-height: 1.45; }
.bc-foot { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.bc-foot b { padding: 0 6px; background: var(--ink); color: var(--paper-hi); font-weight: 400; }
.pips { font-family: var(--f-hiero); color: #8A5E00; }
.art-1 { background: radial-gradient(circle at 50% 40%, var(--paper-hi), var(--a2) 70%); }
.art-2 { background: radial-gradient(var(--paper-hi) 1.5px, transparent 2px) 0 0 / 8px 8px, var(--a3-soft); }
.art-3 { background: linear-gradient(160deg, var(--a1-soft), var(--a1)); }
.art-4 { background: repeating-linear-gradient(45deg, var(--a4-soft) 0 6px, var(--a4) 6px 12px); }
.art-5 { background: repeating-linear-gradient(0deg, var(--a4-soft) 0 7px, var(--gold) 7px 14px); }
.art-6 { background: radial-gradient(circle at 50% 60%, var(--paper-hi), var(--a1-soft) 70%); }

/* ---------- Cleo's jewelry follows the palette (her coat and golden eyes stay hers) ---------- */
.cleo .c-gold-s { stroke: var(--gold); }
.cleo .c-gold-f { fill: var(--gold); }
.cleo .c-lapis-s { stroke: var(--lapis); }
.cleo .c-bead-a { fill: var(--a2); }
.cleo .c-bead-b { fill: var(--bead-b); }
.cleo .c-blush { fill: var(--cute); }
.cleo .c-cute-s { stroke: var(--cute); }
.cleo .c-cute-f { fill: var(--cute); }

/* ---------- Cleo in ASCII (cleosay), on a dark terminal ---------- */
.ascii { margin: 6px 0 8px; font-family: var(--f-term); font-size: clamp(13px, 3.9vw, 21px); line-height: 1.12; white-space: pre; overflow-x: auto; color: var(--on-panel); }
.a-eye, .a-gold { color: var(--gold); }
.a-nose { color: var(--cute); }
.a-lapis { color: color-mix(in srgb, var(--lapis) 65%, var(--paper-hi)); }

/* ---------- the outfits that move: a candle flame, a holo sheen, a pixel blink, a haunting float ---------- */
.holo-sheen { animation: holo-sheen 5s ease-in-out infinite; }
@keyframes holo-sheen { 0%, 35% { transform: translateX(0); } 75%, 100% { transform: translateX(920px); } }
.flame { animation: flicker 1.9s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes flicker { 0%, 100% { transform: scale(1, 1) rotate(0deg); } 30% { transform: scale(0.93, 1.07) rotate(-3deg); } 62% { transform: scale(1.05, 0.95) rotate(2deg); } }
.px-open { animation: px-open 4.2s linear infinite; }
.px-shut { animation: px-shut 4.2s linear infinite; }
@keyframes px-open { 0%, 89.9% { opacity: 1; } 90%, 95.9% { opacity: 0; } 96%, 100% { opacity: 1; } }
@keyframes px-shut { 0%, 89.9% { opacity: 0; } 90%, 95.9% { opacity: 1; } 96%, 100% { opacity: 0; } }
.haunt { animation: haunt 4s ease-in-out infinite; }
@keyframes haunt { 50% { transform: translateY(-5px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .marquee { padding-left: 0; }
  .zz { opacity: 1; }
}
