/* =====================================================================
   CONAGOTCHI — OzSec 2026 Tamagotchi Design System
   Hand-crafted retro-handheld UI. Layered on top of the base output.css.
   Everything here is intentionally chunky, pixel-perfect and toy-like.
   ===================================================================== */

:root {
    /* Core palette */
    --blueberry: #171426;
    --purple: #25213b;
    --purple-2: #2f2a4a;
    --pink: #ff7da7;
    --pink-deep: #e85f8c;
    --mint: #7bf0ce;
    --mint-deep: #57d6b0;
    --white: #fbf8ff;
    --lavender: #bdaec6;
    --yellow: #ffe66d;

    /* LCD screen tint */
    --lcd: #9fe8ca;
    --lcd-ink: #1c3a30;
    --lcd-grid: rgba(23, 20, 38, 0.10);

    /* Structural ink + shadow */
    --ink: #171426;
    --shell-shadow: #0c0a16;

    /* Fonts */
    --pixel: 'Press Start 2P', monospace;
    --round: 'Fredoka', system-ui, sans-serif;

    /* Reusable retro shadow */
    --hard-shadow: 4px 4px 0 var(--ink);
    --hard-shadow-lg: 6px 6px 0 var(--ink);
}

/* ---------------------------------------------------------------------
   1. GLOBAL CANVAS  — the whole page is the inside of the device
   --------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--blueberry);
    color: var(--white);
    font-family: var(--round);
    background-image:
        radial-gradient(circle at 18% 12%, rgba(255, 125, 167, 0.10) 0, transparent 40%),
        radial-gradient(circle at 84% 70%, rgba(123, 240, 206, 0.10) 0, transparent 42%),
        radial-gradient(var(--lcd-grid) 1.5px, transparent 1.5px);
    background-size: auto, auto, 22px 22px;
    background-attachment: fixed, fixed, fixed;
}

/* Keep image-rendering crisp for pixel assets */
.pixelated {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* ---------------------------------------------------------------------
   2. TYPOGRAPHY
   --------------------------------------------------------------------- */
.font-pixel,
h1, h2, h3 {
    font-family: var(--pixel);
}

h1, h2, h3 {
    color: var(--pink);
    line-height: 1.45;
    letter-spacing: 1px;
    overflow-wrap: break-word;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

h4, h5, h6 {
    font-family: var(--round);
    font-weight: 600;
    color: var(--white);
}

p, li {
    font-family: var(--round);
    color: var(--white);
}

a {
    font-family: var(--round);
    color: var(--mint);
    transition: color 120ms ease;
}

a:hover {
    color: var(--pink);
}

.glow-cta,
.glow-cta:hover,
.glow-cta:focus-visible {
    color: var(--ink);
}

.glow-cta {
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    transition: color 120ms ease;
}

.glow-cta:hover,
.glow-cta:focus-visible {
    background: var(--mint);
    box-shadow:
        3px 5px 0 var(--ink),
        0 0 10px rgba(123, 240, 206, 0.85),
        0 0 24px rgba(123, 240, 206, 0.5);
    transform: translateY(-2px);
}

.faq-title {
    color: var(--pink);
}

.faq-grid {
    gap: 16px;
    border-top: 1px solid var(--pink);
}

.faq-grid > div {
    margin-bottom: 0;
    padding: 20px;
    background: var(--purple);
    border: 1px solid var(--pink);
}

.faq-grid h3 {
    color: var(--white) !important;
}

.faq-grid p,
.faq-grid li {
    color: var(--lavender) !important;
}

.home-schedule .schedule-date {
    color: var(--mint);
    font-family: var(--pixel);
}

.home-schedule .schedule-slots {
    display: grid;
    gap: 12px;
    margin-block: 0;
}

.home-schedule .schedule-slots > div {
    padding: 16px;
    background: var(--purple);
    border: 0;
}

.home-schedule .schedule-slots p {
    color: var(--lavender) !important;
}

.home-schedule .schedule-slots h3,
.home-schedule .schedule-slots h3 a,
.home-schedule .schedule-slots h3 a:hover {
    color: var(--white) !important;
    font-family: var(--round);
}

.volunteer-toast-title {
    color: var(--lavender);
}

/* Neon glow helpers */
.text-glow-pink {
    color: var(--pink) !important;
    text-shadow:
        0 0 6px rgba(255, 125, 167, 0.95),
        0 0 18px rgba(255, 125, 167, 0.6),
        0 0 40px rgba(255, 125, 167, 0.4);
}

.text-glow-mint {
    color: var(--mint) !important;
    text-shadow:
        0 0 6px rgba(123, 240, 206, 0.9),
        0 0 16px rgba(123, 240, 206, 0.55),
        0 0 34px rgba(123, 240, 206, 0.35);
}

/* ---------------------------------------------------------------------
   3. LCD SCREEN + SCANLINES  (the mint dot-matrix display)
   --------------------------------------------------------------------- */
.dot-matrix {
    background-image:
        radial-gradient(var(--lcd-grid) 1px, transparent 1px);
    background-size: 6px 6px;
}

.scanlines {
    position: relative;
}

.scanlines::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.06) 0,
        rgba(0, 0, 0, 0.06) 1px,
        transparent 1px,
        transparent 3px
    );
    border-radius: inherit;
    z-index: 3;
}

/* ---------------------------------------------------------------------
   4. THE TAMAGOTCHI DEVICE  (hero centerpiece)
   --------------------------------------------------------------------- */
.tama-device {
    position: relative;
    width: min(480px, 90vw);
    margin: 0 auto;
    padding: 50px 38px 30px;
    background:
        radial-gradient(120% 90% at 30% 12%, var(--pink) 0%, var(--pink-deep) 78%);
    border: 6px solid var(--ink);
    border-radius: 50% 50% 46% 46% / 44% 44% 56% 56%;
    box-shadow:
        inset 0 10px 26px rgba(255, 255, 255, 0.35),
        inset 0 -18px 30px rgba(12, 10, 22, 0.28),
        10px 14px 0 var(--shell-shadow);
}

/* little shell "crack" accents in the corners */
.tama-device::before,
.tama-device::after {
    content: "";
    position: absolute;
    width: 46px;
    height: 22px;
    border-top: 4px solid rgba(23, 20, 38, 0.55);
    border-right: 4px solid rgba(23, 20, 38, 0.55);
}

.tama-device::before {
    top: 42px;
    right: 30px;
    transform: skewX(-18deg);
    clip-path: polygon(0 0, 100% 0, 60% 100%, 30% 45%);
}

.tama-device::after {
    bottom: 96px;
    left: 26px;
    transform: rotate(180deg) skewX(-18deg);
    clip-path: polygon(0 0, 100% 0, 60% 100%, 30% 45%);
}

/* The mint screen inside the device */
.tama-screen {
    position: relative;
    width: 78%;
    margin: 0 auto;
    background-color: var(--lcd);
    background-image:
        radial-gradient(var(--lcd-grid) 1px, transparent 1px);
    background-size: 6px 6px;
    border: 5px solid var(--ink);
    border-radius: 10px;
    padding: 22px 18px 26px;
    box-shadow: inset 0 2px 10px rgba(12, 10, 22, 0.25);
    overflow: hidden;
    text-align: center;
}

.tama-screen .lcd-title {
    font-family: var(--pixel);
    font-size: clamp(0.8rem, 3.8vw, 1.45rem);
    color: var(--lcd-ink);
    text-shadow: none;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
    overflow-wrap: normal;
}

.tama-screen .lcd-label {
    font-family: var(--pixel);
    color: var(--lcd-ink);
    opacity: 0.7;
    letter-spacing: 2px;
}

/* colour bar in the screen corner, echoing the logo */
.lcd-colorbar {
    display: flex;
    width: 78px;
    height: 12px;
    border: 2px solid var(--lcd-ink);
    overflow: hidden;
}

.lcd-colorbar span {
    flex: 1;
}

/* The three physical control keys */
.tama-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    margin-top: 24px;
}

.tama-key {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #a9c6e0, #6d9ec6);
    border: 4px solid var(--ink);
    box-shadow: 0 5px 0 var(--shell-shadow);
    color: var(--ink);
    font-family: var(--pixel);
    font-size: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 90ms ease, box-shadow 90ms ease;
}

.tama-key .key-face {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--yellow);
    border: 3px solid var(--ink);
    color: var(--ink);
    font-weight: 700;
}

.tama-key:hover {
    transform: translateY(2px);
    box-shadow: 0 3px 0 var(--shell-shadow);
    color: var(--ink);
}

.tama-key:active {
    transform: translateY(5px);
    box-shadow: 0 0 0 var(--shell-shadow);
}

/* ---------------------------------------------------------------------
   5. PIXEL PET  (blinking mascot, pure CSS/SVG friendly)
   --------------------------------------------------------------------- */
.pixel-pet {
    width: 96px;
    height: 96px;
    margin: 4px auto 10px;
    display: block;
    object-fit: contain;
    animation: pet-bob 3.6s ease-in-out infinite;
}

@keyframes pet-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.hero-logo {
    position: relative;
    width: min(480px, 90vw);
    margin: 0 auto;
    animation: pet-bob 3.6s ease-in-out infinite;
}

.hero-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.hero-logo-blink {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: logo-blink 7s steps(1) infinite;
}

@keyframes logo-blink {
    0%, 93%, 96%, 100% { opacity: 0; }
    94%, 95% { opacity: 1; }
}

.pet-eye {
    animation: pet-blink 3.2s steps(1) infinite;
    transform-origin: center;
}

@keyframes pet-blink {
    0%, 92%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

@media (prefers-reduced-motion: reduce) {
    .pixel-pet,
    .hero-logo,
    .hero-logo-blink {
        animation: none;
    }
}

/* ---------------------------------------------------------------------
   6. RETRO BUTTONS  (site-wide action controls)
   --------------------------------------------------------------------- */
.btn-retro {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--round);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    color: var(--ink) !important;
    background: var(--pink);
    border: 3px solid var(--ink);
    border-radius: 6px;
    padding: 12px 20px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--hard-shadow);
    transition: transform 90ms ease, box-shadow 90ms ease, background 120ms ease;
}

.btn-retro:hover {
    background: var(--mint);
    color: var(--ink) !important;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--ink);
}

.btn-retro:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 var(--ink);
}

.btn-retro small,
.btn-retro .sub {
    display: block;
    font-family: var(--pixel);
    font-size: 0.55rem;
    opacity: 0.75;
    margin-top: 3px;
}

.btn-retro.is-mint { background: var(--mint); }
.btn-retro.is-mint:hover { background: var(--pink); }

/* Ghost / secondary button */
.btn-ghost {
    background: transparent;
    color: var(--mint) !important;
    border-color: var(--mint);
    box-shadow: 4px 4px 0 var(--mint-deep);
}

.btn-ghost:hover {
    background: var(--mint);
    color: var(--ink) !important;
    box-shadow: 2px 2px 0 var(--mint-deep);
}

/* ---------------------------------------------------------------------
   7. PANELS & CARDS  (content surfaces = device menu tiles)
   --------------------------------------------------------------------- */
.tama-card {
    background: var(--purple);
    border: 3px solid var(--pink);
    border-radius: 14px;
    box-shadow: var(--hard-shadow-lg);
    padding: 22px;
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.tama-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--ink);
}

/* An inset "LCD window" used inside sections */
.lcd-window {
    position: relative;
    background-color: var(--lcd);
    background-image: radial-gradient(var(--lcd-grid) 1px, transparent 1px);
    background-size: 6px 6px;
    border: 5px solid var(--ink);
    border-radius: 12px;
    box-shadow: inset 0 2px 10px rgba(12, 10, 22, 0.22);
    color: var(--lcd-ink);
    overflow: hidden;
}

.lcd-window h1,
.lcd-window h2,
.lcd-window h3,
.lcd-window p,
.lcd-window li {
    color: var(--lcd-ink);
    text-shadow: none;
}

/* Section eyebrow label */
.pill-label {
    display: inline-block;
    font-family: var(--pixel);
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--blueberry);
    background: var(--mint);
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 6px 12px;
    box-shadow: 3px 3px 0 var(--ink);
}

/* Sponsor page hero handheld */
.sponsor-hero {
    border-bottom: 4px solid var(--pink);
}

.sponsor-hero-tama {
    position: relative;
    width: min(100%, 390px);
    min-height: 430px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 38px 30px;
    background: radial-gradient(120% 90% at 30% 12%, var(--pink) 0%, var(--pink-deep) 82%);
    border: 6px solid var(--ink);
    border-radius: 50% 50% 45% 45% / 42% 42% 58% 58%;
    box-shadow:
        inset 0 10px 24px rgba(255, 255, 255, 0.34),
        inset 0 -18px 28px rgba(12, 10, 22, 0.24),
        9px 12px 0 var(--shell-shadow);
    animation: sponsor-device-float 3.2s ease-in-out infinite;
}

.sponsor-hero-tama::before {
    content: "";
    position: absolute;
    top: -30px;
    width: 62px;
    height: 42px;
    border: 6px solid var(--ink);
    border-bottom: 0;
    border-radius: 50% 50% 0 0;
    background: var(--pink-deep);
}

.sponsor-hero-screen {
    width: 86%;
    min-height: 245px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background-color: var(--lcd);
    background-image: radial-gradient(var(--lcd-grid) 1px, transparent 1px);
    background-size: 6px 6px;
    border: 5px solid var(--ink);
    border-radius: 12px;
    box-shadow: inset 0 3px 10px rgba(12, 10, 22, 0.28);
    overflow: hidden;
}

.sponsor-hero-screen img {
    width: 100%;
    height: 180px;
    object-fit: contain;
}

.sponsor-screen-label {
    font-family: var(--pixel);
    font-size: 0.58rem;
    letter-spacing: 1px;
    color: var(--lcd-ink);
    margin-bottom: 8px;
}

.sponsor-hero-controls {
    display: flex;
    gap: 24px;
    margin-top: 24px;
}

.sponsor-hero-controls span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 4px solid var(--ink);
    background: radial-gradient(circle at 35% 30%, var(--yellow), #e5bd36);
    box-shadow: 0 4px 0 var(--shell-shadow);
}

@keyframes sponsor-device-float {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}

/* ---------------------------------------------------------------------
   7b. MINI-TAMAGOTCHIS  (sponsors, speakers, team members)
   Each entity is its own little handheld: an egg shell with a screen.
   --------------------------------------------------------------------- */
.tama-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px 26px;
}

.mini-tama {
    --shell: var(--pink);
    --shell-2: var(--pink-deep);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 260px;
    min-height: 330px;
    padding: 32px 24px 20px;
    background: radial-gradient(120% 90% at 30% 12%, var(--shell) 0%, var(--shell-2) 82%);
    border: 5px solid var(--ink);
    border-radius: 50% 50% 46% 46% / 42% 42% 58% 58%;
    box-shadow:
        inset 0 8px 18px rgba(255, 255, 255, 0.30),
        inset 0 -14px 22px rgba(12, 10, 22, 0.22),
        7px 9px 0 var(--shell-shadow);
    text-decoration: none;
    transition: transform 130ms ease, box-shadow 130ms ease;
}

a.mini-tama:hover,
.mini-tama.liftable:hover {
    transform: translateY(-5px);
    box-shadow:
        inset 0 8px 18px rgba(255, 255, 255, 0.30),
        inset 0 -14px 22px rgba(12, 10, 22, 0.22),
        7px 14px 0 var(--shell-shadow);
}

/* wider "feature" device for a headliner (e.g. the President) */
.mini-tama.is-feature {
    width: 330px;
    min-height: 430px;
    padding: 38px 30px 24px;
}

/* Leadership devices echo the compact, hanging egg silhouette of classic pets. */
.leadership-tama {
    margin-top: 22px;
    padding: 42px 24px 24px;
    border-radius: 48% 48% 44% 44% / 38% 38% 58% 58%;
    background:
        radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.42) 0 3%, transparent 4%),
        radial-gradient(120% 90% at 30% 12%, var(--shell) 0%, var(--shell-2) 82%);
}

.leadership-tama::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: -30px;
    left: 50%;
    width: 48px;
    height: 48px;
    border: 7px solid var(--ink);
    border-radius: 50%;
    background: var(--shell-2);
    transform: translateX(-50%);
    box-shadow: inset 0 0 0 5px var(--shell);
}

.leadership-tama .mini-screen.is-photo {
    width: 78%;
    border-width: 5px;
    border-radius: 14px 14px 20px 20px;
    outline: 7px solid color-mix(in srgb, var(--shell-2) 72%, var(--ink));
    outline-offset: 3px;
}

.leadership-tama .person-name {
    margin-top: 22px;
}

.leadership-tama .mini-controls {
    gap: 18px;
    margin-top: 15px;
}

.leadership-tama .mini-controls span {
    width: 22px;
    height: 22px;
    border-width: 3px;
    background: var(--mint);
    box-shadow: 0 3px 0 var(--shell-shadow);
}

.leadership-tama.is-feature {
    padding-top: 50px;
}

/* The screen: light so logos/photos read well */
.mini-screen {
    position: relative;
    width: 82%;
    display: grid;
    place-items: center;
    background-color: var(--white);
    background-image: radial-gradient(rgba(23, 20, 38, 0.06) 1px, transparent 1px);
    background-size: 5px 5px;
    border: 4px solid var(--ink);
    border-radius: 10px;
    box-shadow: inset 0 2px 8px rgba(12, 10, 22, 0.22);
    overflow: hidden;
}

/* logo screen */
.mini-screen.is-logo {
    min-height: 106px;
    padding: 12px;
}

.mini-screen.is-logo img {
    max-height: 68px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

/* photo screen (speakers/team) — mint LCD tint behind portraits */
.mini-screen.is-photo {
    background-color: var(--lcd);
    aspect-ratio: 1 / 1;
    padding: 0;
}

.mini-screen.is-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* bio "stats" overlay that slides up over a portrait on hover */
.screen-bio {
    position: absolute;
    inset: 0;
    display: block;
    padding: 12px 12px 14px;
    background: rgba(28, 58, 48, 0.94);
    color: var(--mint);
    font-family: var(--round);
    font-size: 0.72rem;
    line-height: 1.4;
    text-align: left;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 170ms ease, transform 170ms ease;
}

.mini-tama:hover .screen-bio {
    opacity: 1;
    transform: none;
}

/* person name plate (Fredoka bold — reads better than pixel for long names) */
.person-name {
    margin-top: 12px;
    text-align: center;
    font-family: var(--round);
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
    color: var(--ink);
    text-shadow: none;
}

/* name / tier label plate */
.mini-name {
    margin-top: 12px;
    text-align: center;
    font-family: var(--pixel);
    font-size: 0.62rem;
    line-height: 1.5;
    letter-spacing: 0.5px;
    color: var(--ink);
    text-shadow: none;
}

.mini-role {
    margin-top: 6px;
    text-align: center;
    font-family: var(--round);
    font-weight: 600;
    font-size: 0.82rem;
    color: rgba(23, 20, 38, 0.75);
}

/* the three control keys under the screen */
.mini-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.mini-controls span {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid var(--ink);
    background: radial-gradient(circle at 35% 30%, #a9c6e0, #6d9ec6);
    box-shadow: 0 2px 0 var(--shell-shadow);
}

/* Flat sponsor handheld: LCD nameplate above a large, neutral logo bay. */
a.sponsor-device {
    justify-content: flex-start;
    background: var(--shell);
    border-radius: 8px;
    box-shadow: 8px 8px 0 var(--shell-shadow);
}

a.sponsor-device:hover {
    box-shadow: 8px 13px 0 var(--shell-shadow);
}

a.sponsor-device .mini-name {
    width: 82%;
    margin: 0 0 18px;
    padding: 12px 16px;
    color: var(--lcd-ink);
    background-color: var(--lcd);
    background-image: radial-gradient(var(--lcd-grid) 1px, transparent 1px);
    background-size: 6px 6px;
    border: 4px solid var(--ink);
    border-radius: 4px;
    box-shadow: inset 0 3px 0 rgba(23, 20, 38, 0.16);
}

a.sponsor-device .mini-screen.is-logo {
    width: 92%;
    flex: 1;
    background: var(--white);
    border-radius: 4px;
}

a.sponsor-device .mini-controls span {
    background: var(--purple-2);
    border-radius: 4px;
    box-shadow: 0 3px 0 var(--shell-shadow);
}

/* Tier / colour variants */
.tier-platinum { --shell: #dfd9ec; --shell-2: #ada2c8; }
.tier-gold     { --shell: #ffe06d; --shell-2: #d99f2f; }
.tier-silver   { --shell: #c7e9de; --shell-2: #83c4b1; }
.tier-bronze   { --shell: #eaa477; --shell-2: #c56f3c; }
.tier-lanyard  { --shell: #a6bde6; --shell-2: #6d84c6; }
.tier-badge    { --shell: #ffa0c2; --shell-2: #e85f8c; }
.tier-mint     { --shell: #9fe8ca; --shell-2: #57d6b0; }
.tier-pink     { --shell: #ff9ec0; --shell-2: #e85f8c; }
.tier-lav      { --shell: #cbb9dd; --shell-2: #9a7fbf; }

/* Sponsor devices step down in size with each sponsorship level. */
a.mini-tama.tier-platinum {
    width: min(92vw, 860px);
    min-height: 660px;
    padding: 76px 70px 42px;
    border-width: 8px;
    border-radius: 46% 46% 40% 40% / 34% 34% 58% 58%;
    box-shadow:
        inset 0 14px 30px rgba(255, 255, 255, 0.38),
        inset 0 -24px 34px rgba(12, 10, 22, 0.24),
        12px 16px 0 var(--shell-shadow);
}

a.mini-tama.tier-gold {
    width: min(88vw, 560px);
    min-height: 500px;
    padding: 52px 44px 30px;
}

a.mini-tama.tier-silver {
    width: min(84vw, 460px);
    min-height: 430px;
    padding: 44px 36px 26px;
}

a.mini-tama.tier-bronze {
    width: min(80vw, 380px);
    min-height: 370px;
    padding: 38px 30px 24px;
}

a.mini-tama.tier-lanyard {
    width: min(76vw, 320px);
    min-height: 320px;
    padding: 32px 26px 21px;
}

a.mini-tama.tier-badge {
    width: min(72vw, 270px);
    min-height: 285px;
    padding: 28px 22px 19px;
}

a.mini-tama.tier-platinum .mini-screen.is-logo {
    width: 94%;
    min-height: 340px;
    padding: 42px;
    border-width: 7px;
    border-radius: 18px;
}

a.mini-tama.tier-platinum .mini-screen.is-logo img {
    max-width: 88%;
    max-height: 250px;
}

a.mini-tama.tier-platinum .mini-name {
    margin-top: 24px;
    font-size: 1.05rem;
    letter-spacing: 2px;
}

a.mini-tama.tier-platinum .mini-controls {
    gap: 28px;
    margin-top: 24px;
}

a.mini-tama.tier-platinum .mini-controls span {
    width: 34px;
    height: 34px;
    border-width: 4px;
    box-shadow: 0 5px 0 var(--shell-shadow);
}

a.mini-tama.tier-gold .mini-screen.is-logo {
    min-height: 230px;
    padding: 28px;
}

a.mini-tama.tier-gold .mini-screen.is-logo img {
    max-width: 90%;
    max-height: 160px;
}

a.mini-tama.tier-silver .mini-screen.is-logo {
    min-height: 190px;
    padding: 24px;
}

a.mini-tama.tier-silver .mini-screen.is-logo img {
    max-width: 88%;
    max-height: 125px;
}

a.mini-tama.tier-bronze .mini-screen.is-logo {
    min-height: 155px;
    padding: 20px;
}

a.mini-tama.tier-bronze .mini-screen.is-logo img {
    max-width: 84%;
    max-height: 100px;
}

a.mini-tama.tier-lanyard .mini-screen.is-logo {
    min-height: 130px;
    padding: 16px;
}

a.mini-tama.tier-lanyard .mini-screen.is-logo img {
    max-width: 80%;
    max-height: 78px;
}

a.mini-tama.tier-badge .mini-screen.is-logo {
    min-height: 110px;
    padding: 12px;
}

a.mini-tama.tier-badge .mini-screen.is-logo img {
    max-width: 76%;
    max-height: 60px;
}

a.mini-tama.sponsor-device .mini-name {
    width: 92%;
    margin: 0 0 18px;
}

a.mini-tama.sponsor-device .mini-screen.is-logo {
    width: 92%;
    padding: max(12px, 4%);
}

a.mini-tama.sponsor-device .mini-screen.is-logo img {
    max-width: 95%;
    max-height: 80%;
}

a.mini-tama.sponsor-device .mini-screen.is-logo.is-intrust {
    background: #dedbe3;
}

a.mini-tama.sponsor-device.tier-platinum {
    background: var(--shell);
    border-radius: 8px;
    box-shadow: 8px 8px 0 var(--shell-shadow);
}

a.mini-tama.sponsor-device.tier-platinum:hover {
    box-shadow: 8px 13px 0 var(--shell-shadow);
}

@media (max-width: 640px) {
    .mini-tama {
        width: min(82vw, 280px);
        min-height: 350px;
        padding: 32px 22px 20px;
    }

    a.mini-tama.tier-platinum {
        width: 92vw;
        min-height: 520px;
        padding: 52px 28px 30px;
        border-width: 6px;
    }

    a.mini-tama.tier-platinum .mini-screen.is-logo {
        width: 94%;
        min-height: 260px;
        padding: 24px;
        border-width: 5px;
    }

    a.mini-tama.tier-platinum .mini-controls {
        gap: 20px;
        margin-top: 20px;
    }

    a.mini-tama.tier-platinum .mini-controls span {
        width: 28px;
        height: 28px;
        border-width: 3px;
    }

    a.mini-tama.tier-gold { width: 84vw; }
    a.mini-tama.tier-silver { width: 78vw; }
    a.mini-tama.tier-bronze { width: 72vw; }
    a.mini-tama.tier-lanyard { width: 66vw; }
    a.mini-tama.tier-badge { width: 60vw; }
}

/* ---------------------------------------------------------------------
   8. NAVBAR  (device status bar)
   --------------------------------------------------------------------- */
.tama-nav {
    background: rgba(23, 20, 38, 0.82);
    backdrop-filter: blur(8px);
    border-bottom: 3px solid var(--pink);
    box-shadow: 0 4px 0 rgba(12, 10, 22, 0.5);
}

.tama-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.tama-brand .brand-text {
    font-family: var(--pixel);
    font-size: 0.85rem;
    color: var(--pink);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
    white-space: nowrap;
}

.tama-navlink {
    position: relative;
    font-family: var(--round);
    font-weight: 600;
    color: var(--white) !important;
    text-decoration: none;
    padding: 6px 2px;
    transition: color 120ms ease;
}

.tama-navlink::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 3px;
    background: var(--mint);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 160ms ease;
}

.tama-navlink:hover {
    color: var(--mint) !important;
}

.tama-navlink:hover::after {
    transform: scaleX(1);
}

/* Mobile dropdown panel */
@media (max-width: 1023px) {
    .tama-menu {
        background: var(--purple);
        border: 3px solid var(--pink);
        border-radius: 12px;
        margin-top: 10px;
        padding: 10px 16px;
        box-shadow: var(--hard-shadow);
    }
}

/* ---------------------------------------------------------------------
   9. FOOTER  (device underside)
   --------------------------------------------------------------------- */
.tama-footer {
    background: var(--purple);
    border-top: 4px solid var(--pink);
    color: var(--lavender);
}

.tama-footer h3 {
    font-family: var(--pixel);
    font-size: 0.7rem;
    color: var(--mint);
}

.tama-footer a {
    color: var(--lavender);
}

.tama-footer a:hover {
    color: var(--mint);
}

/* ---------------------------------------------------------------------
   10. FADE-IN ON SCROLL  (kept from original behaviour)
   --------------------------------------------------------------------- */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* ---------------------------------------------------------------------
   11. LEGACY BRIDGE  — keep old utility class names working on top of
   the new system so existing templates don't visually break.
   --------------------------------------------------------------------- */
.bg-primary { background-color: var(--blueberry); }
.bg-secondary { background-color: var(--pink); color: var(--ink); }
.retro-gradient { background: linear-gradient(120deg, var(--purple), var(--blueberry)); }
.text-yellow { color: var(--mint); }
.text-bg { color: var(--white); }
.text { color: var(--ink); }
.border-secondary { border-color: var(--pink); }
.gothic { font-family: var(--pixel); letter-spacing: 1px; }

/* soften Flowbite/Tailwind default sharpness inside cards */
.tama-card img,
.lcd-window img {
    image-rendering: auto;
}

/* Responsive tightening */
@media (max-width: 640px) {
    .tama-device {
        width: min(360px, 90vw);
        padding: 38px 20px 22px;
    }
    .hero-logo { width: min(360px, 90vw); }
    .tama-screen { width: 82%; }
    .tama-controls { gap: 16px; }
    .tama-key { width: 50px; height: 50px; }
    .brand-text { font-size: 0.7rem !important; }
}
