/* ==========================================================================
   zayd.wtf Global Stylesheet
   Design Language: "The Archive" - Brutalist minimalism with index card motifs
   ========================================================================== */

/* --------------------------------------------------------------------------
   DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
    /* Color Palette */
    --paper: #F1E9D2;
    /* Page background (warm parchment) */
    --card: rgba(255, 255, 255, 0.4);
    /* Translucent card background */
    --card-hover: #FFFFFF;
    /* Opaque white on interaction */
    --ink: #333333;
    /* Primary text, borders, shadows */
    --muted: #555555;
    /* Secondary text, metadata */
    --faded: #666666;
    /* Footer text */
    --inactive: #888888;
    /* Current nav item (grayed out) */
    --link: #0044cc;
    /* Hyperlinks */
    --highlight: #99CCFF;
    /* Pastel blue highlighter */

    /* Shadows (hard-edge, no blur) */
    --shadow: 5px 5px 0px var(--ink);
    --shadow-sm: 3px 3px 0px var(--ink);
    --shadow-lg: 8px 8px 0px var(--ink);

    /* Typography */
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: monospace;

    /* Spacing */
    --content-max-width: 800px;
    --content-padding: 10px;

    /* Animation Timing */
    --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);

    /* Safe Area */
    --safe-top: env(safe-area-inset-top, 0px);
}

/* --------------------------------------------------------------------------
   BASE STYLES
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
    text-transform: lowercase;
    /* 🌍 GLOBAL LOWERCASE ENFORCEMENT */
    overflow-x: hidden;
    /* Prevent horizontal scroll from 100vw elements */
}

body {
    max-width: var(--content-max-width);
    margin: 40px auto;
    padding: 0 var(--content-padding);
    font: 18px/1.5 var(--font-stack);
    letter-spacing: 0.02em;
    color: var(--ink);
    background-color: var(--paper);
    position: relative;
    /* For Grain Overlay */
}

/* --------------------------------------------------------------------------
   IPHONE DYNAMIC ISLAND GLITCH (SECRET SKY)
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {

    /* Ensure html has solid background to stop body transparency propagation */
    html {
        background-color: var(--paper);
    }

    html::before {
        /* Dense celestial pattern for pull-to-refresh reveal */
        content: "   .       +       *       .       +       *       .       +       *\A *   .   +   *   .   +   *   .   +   *   .   +   *   .   +   *\A   +   *   .   +   *   .   +   *   .   +   *   .   +   *   .\A .   +   *   .   +   *   .   +   *   .   +   *   .   +   .   +\A   *   .   +   *   .   +   *   .   +   *   .   +   *   .   *\A+    .   *   +   .   *   +   .   *   +   .   *   +   .   *   +\A   .       +       *       .       +       *       .       +       *\A *   .   +   *   .   +   *   .   +   *   .   +   *   .   +   *\A   +   *   .   +   *   .   +   *   .   +   *   .   +   *   .\A .   +   *   .   +   *   .   +   *   .   +   *   .   +   .   +\A   *   .   +   *   .   +   *   .   +   *   .   +   *   .   *\A+    .   *   +   .   *   +   .   *   +   .   *   +   .   *   +\A   .       +       *       .       +       *       .       +       *\A *   .   +   *   .   +   *   .   +   *   .   +   *   .   +   *\A   +   *   .   +   *   .   +   *   .   +   *   .   +   *   .";
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 70vh;
        z-index: 0;
        color: var(--muted);
        display: flex;
        align-items: flex-start;
        justify-content: center;
        overflow: hidden;
        white-space: pre-wrap;
        font-family: var(--font-mono);
        font-size: 14px;
        line-height: 1.5;
        text-align: center;
        padding-top: 40px;
        /* Start from top of screen */
        opacity: 0.9;
    }

    /* Remove top margin on body to hide the sky initially */
    body {
        margin-top: 0;
        position: relative;
        z-index: 1;
        background-color: var(--paper);
        min-height: 100vh;
    }
}

/* 📜 DESIGN POLISH: GRAIN TEXTURE OVERLAY */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.08;
    /* Subtle texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.80' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   GLOBAL LOWERCASE ENFORCEMENT
   -------------------------------------------------------------------------- */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.settings-options button {
    text-transform: lowercase;
}

/* Explicitly ensure user inputs are NOT forced */
input:not([type="button"]):not([type="submit"]):not([type="reset"]),
textarea,
select {
    text-transform: none;
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY
   -------------------------------------------------------------------------- */

/* Page Titles */
h1 {
    font-size: 2.2em;
    font-weight: 700;
    letter-spacing: -0.03em;
    /* Tight, brutalist feel */
    margin-bottom: 0.5em;
}

h1.hero {
    font-size: 2.5em;
    /* Larger for home page */
}

.hero-subtitle {
    font-size: 1.3em;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 0.5em;
    line-height: 1.4;
}

/* Section Headers */
h2 {
    margin-top: 1.25em;
    /* Reduced from 1.5em */
    border-bottom: 2px solid var(--ink);
    display: inline-block;
    font-size: 1.2em;
    margin-bottom: 0.5em;
}

/* --------------------------------------------------------------------------
   LINKS
   -------------------------------------------------------------------------- */
a {
    color: var(--link);
    text-decoration: underline;
}

a:hover {
    text-decoration: underline;
}

/* Card links (no underline/highlight by default) */
.card-link,
.card {
    text-decoration: none;
    background-image: none;
    border-bottom: none;
}

.card-link:hover,
.card:hover {
    text-decoration: none;
    background-image: none;
}

/* Nav links - minimal highlight */
nav a {
    color: var(--link);
    text-decoration: none;
    border-bottom: none;
    background-image: none;
}

nav a:hover {
    text-decoration: underline;
    background-size: 0;
}

/* --------------------------------------------------------------------------
   NAVIGATION
   -------------------------------------------------------------------------- */
nav {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 10px;
}

.nav-current {
    color: var(--inactive);
}

/* Split navigation (back button + links) */
nav.split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    row-gap: 10px;
}

/* --------------------------------------------------------------------------
   BACK BUTTON (Index Card Style)
   -------------------------------------------------------------------------- */
.back-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--ink);
    background: var(--card);
    font-size: 0.85em;
    font-weight: bold;
    /* text-transform: uppercase; REMOVED */
    color: var(--ink);
    text-decoration: none;
    transition: all 0.1s ease-in-out;
}

.back-btn:hover {
    background: var(--card-hover);
    box-shadow: var(--shadow-sm);
    transform: translate(-1px, -1px);
    text-decoration: none;
}

.back-btn:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   INDEX CARDS (Posts, Recipes, etc.)
   -------------------------------------------------------------------------- */
.card {
    display: block;
    /* Ensure <a> behaves like a block div */
    background-color: var(--card);
    border: 1px solid var(--ink);
    padding: 20px;
    margin-bottom: 25px;
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    /* Snappier feel */
    /* 📇 DESIGN POLISH: KINETIC LIFT */
    cursor: pointer;
    position: relative;
    text-decoration: none;
    /* Remove default underline from card container */
    color: var(--ink);
    /* Inherit text color */
}

.card:hover {
    background-color: var(--card-hover);
    /* Keep border consistent (no jump from 1px to 3px) */
    box-shadow: var(--shadow-lg);
    /* Subtle lift without the rotation/scale that causes jarring shifts */
    transform: translate(-2px, -2px);
    z-index: 10;
}

.card-title {
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: var(--ink);
}

/* When card is an <a>, the title inside might inherit underline on hover. Prevent that. */
.card:hover .card-title {
    text-decoration: none;
}

/* Card Metadata (Library Card style separator) */
.card-meta {
    margin-top: auto;
    padding-top: 15px;
    border-top: 2px solid var(--ink);
    font-size: 0.8em;
    /* text-transform: uppercase; REMOVED */
    font-weight: bold;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
}

/* Inline Post Metadata */
.post-meta {
    font-size: 0.8em;
    /* text-transform: uppercase; REMOVED */
    font-weight: bold;
    color: var(--muted);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--ink);
}

/* Metadata grouping (multiple items on one side) */
.meta-group {
    display: flex;
    gap: 15px;
}

/* --------------------------------------------------------------------------
   CONTENT BOXES
   -------------------------------------------------------------------------- */
.box {
    border: 1px solid var(--ink);
    background: var(--card);
    padding: 20px;
    margin: 20px 0;
}

/* --------------------------------------------------------------------------
   ASCII ART / PREFORMATTED TEXT
   -------------------------------------------------------------------------- */
pre {
    font-family: var(--font-mono);
    line-height: 1.2;
    color: var(--muted);
    background: var(--card);
    padding: 15px;
    border: 1px solid var(--ink);
    overflow-x: auto;
}

/* Naked pre (no background/border, for decorative ASCII) */
pre.naked {
    background: transparent;
    border: none;
    padding: 15px;
    overflow-x: hidden;
    /* Prevent horizontal scroll globally */
}

/* Full-width breakout utility for ASCII art */
.ascii-breakout {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    text-align: center;
    box-sizing: border-box;
}

/* Full-width star field override */
#star-field {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    text-align: center;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   QUOTES
   -------------------------------------------------------------------------- */
blockquote {
    border-left: none;
    padding: 20px;
    margin: 30px auto;
    font-style: italic;
    font-size: 1.1em;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0;
    /* Hard edges enforced */
    box-shadow: inset 2px 2px 0px rgba(0, 0, 0, 0.08);
    width: fit-content;
    max-width: 90%;
}

blockquote cite {
    display: block;
    margin-top: 10px;
    font-style: inherit;
    font-weight: inherit;
    text-align: left;
    color: inherit;
}

/* --------------------------------------------------------------------------
   LISTS
   -------------------------------------------------------------------------- */
ul {
    padding-left: 20px;
}

li {
    margin-bottom: 3px;
    /* Tighter spacing */
    font-size: 0.95em;
    /* Slightly smaller than body text */
}

ol {
    padding-left: 20px;
}

ol li {
    margin-bottom: 5px;
    font-size: 0.95em;
}

/* --------------------------------------------------------------------------
   RECIPE INGREDIENTS (With Checkboxes)
   -------------------------------------------------------------------------- */
ul.ingredients {
    list-style-type: none;
    padding-left: 0;
}

ul.ingredients li {
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
}

input[type="checkbox"] {
    margin-right: 8px;
    /* Removed transform scale to fix "horrid" look */
    cursor: pointer;
    appearance: none;
    /* Custom checkbox */
    width: 14px;
    height: 14px;
    border: 1px solid var(--ink);
    background: transparent;
    display: inline-grid;
    place-content: center;
}

input[type="checkbox"]::before {
    content: "";
    width: 8px;
    height: 8px;
    transform: scale(0);
    transition: 0.1s transform ease-in-out;
    background-color: var(--ink);
}

input[type="checkbox"]:checked::before {
    transform: scale(1);
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
footer {
    margin-top: 50px;
    font-size: 0.9em;
    color: var(--faded);
    border-top: 1px solid var(--ink);
    padding-top: 20px;
    text-align: center;
    opacity: 0.5;
}

footer a {
    color: var(--link);
}

/* --------------------------------------------------------------------------
   QUOTE DISPLAY
   -------------------------------------------------------------------------- */
.quote-display {
    font-size: 1.05em;
    font-style: italic;
    color: var(--muted);
    margin-bottom: 1.5em;
    line-height: 1.6;
}

.quote-display .quote-author {
    font-style: normal;
    font-size: 0.9em;
    color: var(--faded);
}

/* --------------------------------------------------------------------------
   BIO CARD
   -------------------------------------------------------------------------- */
.bio-card {
    margin-bottom: 1.5em;
}

.bio-card p {
    margin: 0;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   SOCIAL LINKS (Brutalistic text buttons)
   -------------------------------------------------------------------------- */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.5em;
}

.social-link {
    display: inline-block;
    padding: 8px 14px;
    background: var(--card);
    border: 1px solid var(--ink);
    font-family: inherit;
    font-size: 0.9em;
    font-weight: bold;
    /* text-transform: lowercase; REMOVED */
    color: var(--ink);
    text-decoration: none;
    transition: all 0.2s var(--ease-out-quint);
}

.social-link:hover {
    background: var(--card-hover);
    border: 3px solid var(--ink);
    box-shadow: var(--shadow-lg);
    transform: translate(-4px, -4px);
    text-decoration: none;
}

/* Beli link with logo */
.social-link.beli-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.social-link.beli-link img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* --------------------------------------------------------------------------
   HOBBY TAGS (Collapsible)
   -------------------------------------------------------------------------- */
.hobby-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.5em;
}

.hobby-tag {
    display: inline-block;
    padding: 8px 14px;
    background: var(--card);
    border: 1px solid var(--ink);
    font-family: inherit;
    font-size: 0.9em;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.1s ease-in-out;
    text-align: left;
}

.hobby-tag:hover {
    background: var(--card-hover);
    box-shadow: var(--shadow-sm);
    transform: translate(-1px, -1px);
}

.hobby-tag .hobby-label {
    font-weight: bold;
}

.hobby-tag .hobby-details {
    display: none;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--ink);
    font-weight: normal;
    font-size: 0.9em;
    color: var(--muted);
}

.hobby-tag[data-expanded="true"] {
    background: var(--card-hover);
}

.hobby-tag[data-expanded="true"] .hobby-details {
    display: block;
}

/* --------------------------------------------------------------------------
   TIMELINE
   -------------------------------------------------------------------------- */
.timeline {
    margin-bottom: 1.5em;
}

.timeline-item {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ink);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-year {
    font-weight: bold;
    font-size: 0.9em;
    color: var(--muted);
    min-width: 50px;
}

.timeline-event {
    color: var(--ink);
}

/* --------------------------------------------------------------------------
   UTILITY CLASSES
   -------------------------------------------------------------------------- */
.text-muted {
    color: var(--muted);
}

.text-faded {
    color: var(--faded);
}

.mb-0 {
    margin-bottom: 0;
}

.mt-lg {
    margin-top: 60px;
}

/* Constrain card widths on list pages */
.narrow-cards .card {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --------------------------------------------------------------------------
   🎬 DESIGN POLISH: CINEMA ENTRANCE ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-1,
.animate-2,
.animate-3 {
    opacity: 0;
    /* Start hidden */
    animation: fadeSlideUp 0.6s var(--ease-out-quint) forwards;
}

.animate-1 {
    animation-delay: 0.1s;
}

.animate-2 {
    animation-delay: 0.2s;
}

.animate-3 {
    animation-delay: 0.3s;
}

/* Auto-stagger for lists of cards */
.card {
    opacity: 0;
    animation: fadeSlideUp 0.6s var(--ease-out-quint) forwards;
}

.card:nth-of-type(1) {
    animation-delay: 0.1s;
}

.card:nth-of-type(2) {
    animation-delay: 0.2s;
}

.card:nth-of-type(3) {
    animation-delay: 0.3s;
}

.card:nth-of-type(4) {
    animation-delay: 0.4s;
}

.card:nth-of-type(5) {
    animation-delay: 0.5s;
}

.card:nth-of-type(6) {
    animation-delay: 0.6s;
}

.card:nth-of-type(7) {
    animation-delay: 0.7s;
}

.card:nth-of-type(8) {
    animation-delay: 0.8s;
}

.card:nth-of-type(9) {
    animation-delay: 0.9s;
}

.card:nth-of-type(10) {
    animation-delay: 1.0s;
}

.card:nth-of-type(n+11) {
    animation-delay: 1.1s;
}

/* --------------------------------------------------------------------------
   RESPONSIVE ADJUSTMENTS
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    body {
        padding: 0 16px;
        font-size: 16px;
        /* Prevent iOS zoom on input focus */
    }

    /* Hide system status on mobile to prevent overlap */
    .system-status {
        display: none;
    }

    h1 {
        font-size: 1.8em;
    }

    h1.hero {
        font-size: 2em;
    }

    .back-btn {
        padding: 10px 14px;
        /* Larger touch target */
    }

    /* Settings panel mobile adjustments */
    #settings-panel {
        bottom: 15px;
        right: 15px;
    }

    #settings-menu {
        width: calc(100vw - 50px);
        max-width: 220px;
        right: 0;
    }

    /* Hide cursor trail toggle on touch devices */
    .toggle-row:has(#toggle-trail) {
        display: none;
    }
}

/* Touch device detection - hide cursor-related features */
@media (hover: none) and (pointer: coarse) {
    .toggle-row:has(#toggle-trail) {
        display: none;
    }

    .card {
        cursor: pointer;
        /* Use default cursor on touch */
    }
}

/* --------------------------------------------------------------------------
   BENTO MODULES (Modular Feature Tiles)
   -------------------------------------------------------------------------- */

/* Hot coral accent for live indicators */
:root {
    --accent: #FF6B6B;
    --accent-glow: rgba(255, 107, 107, 0.4);
}

/* Bento Grid - Responsive container for modules */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

@media (min-width: 640px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Base module container */
.bento-module {
    border: 1px solid var(--ink);
    background: var(--card);
    padding: 16px;
    transition: all 0.3s var(--ease-out-quint);
    display: flex;
    flex-direction: column;
    border-radius: 0;
}

/* Small bento variant */
.bento-module.bento-small {
    /* Fixed height for uniformity as requested */
    height: 360px;
    overflow: visible;
    /* Allow pulse animation to extend beyond */
}

/* Content area fills and centers */
.bento-module .location-tracker {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2px;
    /* Halved spacing */
    margin-top: -10px;
    /* Align with header border */
}

.bento-module:hover {
    background-color: var(--card-hover);
    box-shadow: var(--shadow-lg);
    /* Match card hover lift */
    transform: translate(-2px, -2px);
}

.module-header {
    font-size: 0.75em;
    font-weight: bold;
    /* text-transform: uppercase; REMOVED */
    letter-spacing: 0.15em;
    color: var(--muted);
    margin-bottom: 7px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ink);
    flex-shrink: 0;
    position: relative;
}

.module-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--accent);
}

/* --------------------------------------------------------------------------
   LIVE LOCATION TRACKER
   -------------------------------------------------------------------------- */
.location-tracker {
    max-height: 100%;
    overflow-y: auto;
    overflow-x: visible;
    scrollbar-width: thin;
    scrollbar-color: var(--muted) transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 24px;
    /* Reduced top padding, increased side padding */
    margin: -10px;
    /* Compensate for padding */
}

.location-tracker::-webkit-scrollbar {
    width: 6px;
}

.location-tracker::-webkit-scrollbar-track {
    background: transparent;
}

.location-tracker::-webkit-scrollbar-thumb {
    background-color: var(--muted);
    border-radius: 3px;
}

/* Timeline Entry Row */
.timeline-entry {
    display: grid;
    grid-template-columns: 110px 48px 1fr;
    /* Expanded layout: Date | Spine | Location */
    gap: 12px;
    align-items: center;
    min-height: 115px;
    position: relative;
    width: 100%;
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
    /* Explicitly remove any borders */
}

.timeline-entry:last-child {
    padding-bottom: 0;
}

/* Date Column */
.timeline-date {
    /* font-family: var(--font-mono); REMOVED */
    font-size: 0.7em;
    color: var(--muted);
    text-align: right;
    /* Aligned next to spine */
    white-space: nowrap;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.timeline-date.current {
    color: var(--accent);
    font-weight: bold;
}

/* Timeline Spine Column */
.timeline-spine {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    height: 100%;
    width: 44px;
}

/* Vertical connecting line - gold accent */
.timeline-spine::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 150%;
    /* Extend to connect to next item */
    background-color: var(--accent);
    z-index: 1;
}

/* Fix "continuous stem" - ensure line starts at node center for the first item */
.timeline-entry:first-child .timeline-spine::after {
    top: 50%;
    height: 150%;
    /* Ensure it reaches the next item even if height varies */
}

.timeline-entry:last-child .timeline-spine::after {
    display: none;
    /* No line after last item */
}

/* Node (dot) for past locations - gold accent to match line */
.timeline-node {
    width: 10px;
    height: 10px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    background: transparent;
    /* Transparent to show continuous spine line */
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    /* Center in spine container */
    margin: auto 0;
}

/* Current Location Node - Radio Tower Icon Container */
.timeline-node.current {
    width: 36px;
    height: 36px;
    border: 2px solid var(--accent);
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto 0;
}

/* Radio Tower SVG Icon */
.radio-icon {
    width: 18px;
    height: 18px;
    fill: var(--accent);
}

/* Current Location Z Icon */
.current-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.8;
}

/* Pulse Animation Ring */
.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: pulse 2s var(--ease-out-quint) infinite;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

/* Location Info Column */
.timeline-location {
    padding-left: 0;
    /* Align left */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.location-name {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
}

.location-code {
    color: var(--muted);
    font-weight: normal;
}

.timeline-entry.current .location-name {
    font-size: 1.05em;
}

.location-coords {
    /* font-family: var(--font-mono); REMOVED */
    font-size: 0.7em;
    color: var(--muted);
    margin-top: 2px;
}

/* --------------------------------------------------------------------------
   LIVE LOCATION TRACKER - RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .timeline-entry {
        grid-template-columns: 95px 44px 1fr;
        /* Adjusted for mobile "airiness" */
        gap: 6px;
        min-height: 92px;
    }

    .timeline-spine {
        width: 40px;
    }

    /* Keep date visible on mobile now per request */
    .timeline-date {
        display: flex;
        font-size: 0.65em;
    }

    /* Remove the inline date hack from before */
    .timeline-location::before {
        display: none;
    }

    .timeline-node.current {
        width: 32px;
        height: 32px;
    }

    .radio-icon {
        width: 16px;
        height: 16px;
    }

    .pulse-ring {
        width: 32px;
        height: 32px;
    }

    .location-name {
        font-size: 0.9em;
    }

    .timeline-entry.current .location-name {
        font-size: 1em;
    }

    .location-coords {
        font-size: 0.65em;
    }
}

/* --------------------------------------------------------------------------
   CURRENTLY READING TRACKER
   -------------------------------------------------------------------------- */
.reading-tracker {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
    flex: 1;
    overflow-y: auto;
}

.book-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.book-item.current {
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--muted);
}

.book-info {
    flex: 1;
    min-width: 0;
}

.book-title {
    font-weight: 600;
    font-size: 0.95em;
    color: var(--ink);
    margin-bottom: 2px;
}

.book-author {
    font-size: 0.8em;
    color: var(--muted);
    margin-bottom: 6px;
}

.book-status {
    font-size: 0.75em;
    color: var(--muted);
    font-style: italic;
}

.book-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--card-hover);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--muted);
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-text {
    /* font-family: var(--font-mono); REMOVED */
    font-size: 0.7em;
    color: var(--accent);
    font-weight: bold;
}

/* --------------------------------------------------------------------------
   WEATHER TRACKER
   -------------------------------------------------------------------------- */
.weather-tracker {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    height: 100%;
}

.weather-loading {
    color: var(--muted);
    font-size: 0.85em;
}

.weather-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.weather-temp {
    font-size: 2em;
    font-weight: 600;
    color: var(--ink);
    /* font-family: var(--font-mono); REMOVED */
}

.weather-condition {
    font-size: 0.9em;
    color: var(--muted);
    margin-bottom: 8px;
}

.weather-location {
    font-size: 0.75em;
    color: var(--accent);
    /* font-family: var(--font-mono); REMOVED */
}

.weather-details {
    display: flex;
    gap: 16px;
    font-size: 0.75em;
    color: var(--muted);
    margin-top: 8px;
    /* font-family: var(--font-mono); REMOVED */
}

.weather-error {
    color: var(--muted);
    font-size: 0.85em;
    text-align: center;
}

/* --------------------------------------------------------------------------
   ETCH-A-SKETCH DOODLE
   -------------------------------------------------------------------------- */
.doodle-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    height: 100%;
    min-height: 0;
    /* Flexbox overflow fix */
}

#doodle-canvas {
    flex: 1;
    width: 100%;
    background: transparent;
    border: 1px solid var(--ink);
    cursor: crosshair;
    touch-action: none;
    /* Prevent scrolling while drawing */
}

#doodle-shake-btn {
    align-self: flex-end;
    padding: 4px 12px;
    border: 1px solid var(--ink);
    background: var(--card);
    font-family: inherit;
    font-size: 0.75em;
    cursor: pointer;
    color: var(--ink);
    transition: all 0.2s;
}

#doodle-shake-btn:hover {
    background: var(--card-hover);
    box-shadow: var(--shadow-sm);
}

/* Shake Animation */
@keyframes shake-anim {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.shake-active {
    animation: shake-anim 0.5s;
}

/* --------------------------------------------------------------------------
   PRINT STYLES
   -------------------------------------------------------------------------- */
@media print {

    nav,
    footer,
    .back-btn {
        display: none;
    }

    body {
        background: white;
        max-width: 100%;
        margin: 0;
        padding: 20px;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--ink);
        break-inside: avoid;
    }

    pre {
        background: #f5f5f5;
    }
}

/* ==========================================================================
   DARK MODE: MIDNIGHT ARCHIVE
   ========================================================================== */

[data-theme="dark"] {
    /* Inverted: ink becomes background, parchment becomes text */
    --paper: #2a2a2a;
    /* Dark ink background */
    --card: rgba(50, 50, 50, 0.6);
    --card-hover: #3a3a3a;
    --ink: #F1E9D2;
    /* Parchment text color */
    --muted: #c9c1ab;
    /* Muted parchment */
    --faded: #a8a090;
    --inactive: #807a6a;
    --link: #7eb8ff;
    --highlight: rgba(126, 184, 255, 0.3);

    /* Gold accent shifts to purple in dark mode */
    --accent: #9b7dff;
    --accent-glow: rgba(155, 125, 255, 0.4);

    --shadow: 5px 5px 0px rgba(241, 233, 210, 0.4);
    --shadow-sm: 3px 3px 0px rgba(241, 233, 210, 0.4);
    --shadow-lg: 8px 8px 0px rgba(241, 233, 210, 0.5);
}

[data-theme="dark"] body::before {
    opacity: 0.04;
}

/* Dark mode timeline adjustments */
[data-theme="dark"] .timeline-node {
    background: var(--paper);
}

[data-theme="dark"] .timeline-node.current {
    background: var(--paper);
}

[data-theme="dark"] .social-link {
    background: var(--card);
    border-color: var(--ink);
    color: var(--ink);
}

[data-theme="dark"] .hobby-tag {
    background: var(--card);
    border-color: var(--ink);
    color: var(--ink);
}

/* Dark mode glow effects on accent elements */
[data-theme="dark"] .timeline-node.current {
    box-shadow: 0 0 10px var(--accent-glow);
}

[data-theme="dark"] .progress-fill {
    box-shadow: 0 0 6px var(--accent-glow);
}

[data-theme="dark"] .module-header::after {
    box-shadow: 0 0 4px var(--accent-glow);
}

/* ==========================================================================
   SYSTEM STATUS CLOCK
   ========================================================================== */

.system-status {
    position: fixed;
    top: calc(var(--safe-top) + 15px);
    right: 15px;
    z-index: 10004;
    /* font-family: var(--font-mono); REMOVED */
    font-size: 0.85em;
    color: var(--ink);
    pointer-events: none;
    /* "Sheer" aesthetic - simple raw text */
}

/* ==========================================================================
   SETTINGS PANEL - BRUTALIST SIDE DRAWER
   ========================================================================== */

#settings-panel {
    position: fixed;
    bottom: 30px;
    right: 0;
    z-index: 10000;
    pointer-events: none;
    /* Ensure typography is inherited */
    font: 18px/1.5 var(--font-stack);
    letter-spacing: 0.02em;
    color: var(--ink);
}

#settings-slider {
    display: flex;
    align-items: flex-end;
    pointer-events: auto;
    /* Unified shadow for the entire shape */
    filter: drop-shadow(-6px 6px 0px var(--ink));
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    /* Drawer Width (250px estimate, adjusted below) */
    --drawer-width: 212px;
    transform: translateX(0);
}

#settings-slider.closed,
[data-theme="dark"] #settings-slider.closed {
    transform: translateX(var(--drawer-width));
}

#settings-slider.closed #settings-drawer {
    opacity: 0;
    transition: opacity 0.2s;
}

#settings-toggle {
    flex-shrink: 0;
    padding: 10px 14px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    backdrop-filter: none;
    /* Border logic: Solid box, no right border to merge with drawer */
    border: 1px solid var(--ink);
    border-right: none;
    cursor: pointer;
    font-family: var(--font-stack);
    font-size: 0.8em;
    font-weight: bold;
    color: var(--ink);
    letter-spacing: 0.05em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transition: background 0.15s ease;
}

#settings-toggle:hover {
    background: var(--card-hover);
}



#settings-drawer {
    flex-shrink: 0;
    background: var(--card);
    /* Border logic: Solid box, no left border to merge with toggle */
    border: 1px solid var(--ink);
    border-left: none;
    padding: 16px;
    /* Width: 180 content + 32 padding = 212px total (standard box model) */
    width: 212px;
    box-sizing: border-box;
    transition: opacity 0.2s;
}

/* Pseudo-element for Left Shadow removed - using unified box-shadow instead */
/* Dark Mode Adjustments */
[data-theme="dark"] #settings-slider {
    filter: drop-shadow(-6px 6px 0px rgba(241, 233, 210, 0.15));
}

[data-theme="dark"] #settings-toggle,
[data-theme="dark"] #settings-drawer {
    background: var(--card);
    border-color: var(--ink);
}

[data-theme="dark"] #settings-toggle:hover {
    background: #404040;
}

/* Clean up unused legacy classes if any */
#settings-toggle.active {
    /* No specific transform needed anymore, sliding is handled by parent */
    background: var(--card-hover);
}

[data-theme="dark"] #settings-drawer::before {
    display: none;
}



.drawer-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-label {
    font-size: 0.65em;
    text-transform: lowercase;
    /* text-transform: uppercase; REMOVED */
    font-weight: bold;
    color: var(--muted);
    letter-spacing: 0.1em;
}

.settings-options {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.settings-options button {
    padding: 4px 8px;
    border: 1px solid var(--ink);
    background: transparent;
    font-family: var(--font-stack);
    font-size: 0.7em;
    cursor: pointer;
    color: var(--ink);
    transition: all 0.1s ease;
}

.settings-options button:hover {
    background: var(--card-hover);
}

.settings-options button.active {
    background: var(--ink);
    color: var(--paper);
}

.settings-options label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75em;
    color: var(--ink);
    cursor: pointer;
    padding: 2px 0;
}

.settings-options input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--accent);
}

/* Hide trail option on touch devices */
@media (hover: none) {
    .trail-option {
        display: none;
    }
}

/* Mobile adjustments */
@media (max-width: 600px) {
    #settings-panel {
        bottom: 20px;
    }

    #settings-toggle {
        height: 80px;
        padding: 6px 10px;
        font-size: 0.65em;
    }

    #settings-drawer {
        width: 150px;
        padding: 14px;
    }

    #settings-drawer::before {
        /* Height: PaddingBox (100%) + Borders (2px) - Toggle Height (80px) - Shadow Offset (6px) */
        height: calc(100% + 2px - 86px);
    }

    #settings-toggle.active {
        transform: translateX(-179px);
    }
}

/* ==========================================================================
   CLASSIC HYPERLINKS (Sliding highlight effect)
   ========================================================================== */

a:not(.card):not(.social-link):not(.back-btn):not(nav a):not(.footer-back-link a) {
    color: var(--link);
    text-decoration: none;
    background: linear-gradient(var(--highlight), var(--highlight)) no-repeat;
    background-size: 0% 40%;
    background-position: 0 90%;
    transition: background-size 0.15s ease;
}

a:not(.card):not(.social-link):not(.back-btn):not(nav a):not(.footer-back-link a):hover {
    background-size: 100% 40%;
}

/* Paper texture removed for cleaner brutalist style */

/* ==========================================================================
   CARD STYLING (Clean brutalist boxes)
   ========================================================================== */

/* Clip-path removed to allow shadow to display properly on hover */

/* ==========================================================================
   INDEX TABS BY CATEGORY
   ========================================================================== */

.card[data-category]::after {
    content: attr(data-category);
    position: absolute;
    top: -1px;
    right: 15px;
    padding: 4px 10px;
    font-size: 0.65em;
    font-weight: bold;
    /* text-transform: uppercase; REMOVED */
    border: 1px solid var(--ink);
    border-top: none;
    background: var(--paper);
}

.card[data-category="blog"]::after {
    background: #e8f4ff;
}

.card[data-category="recipe"]::after {
    background: #fff4e8;
}

.card[data-category="dessert"]::after {
    background: #ffe8f4;
}

.card[data-category="dinner"]::after {
    background: #e8ffe8;
}

/* ==========================================================================
   STAMP-STYLE DATES
   ========================================================================== */

.stamp-date {
    display: inline-block;
    padding: 4px 8px;
    border: 2px solid var(--ink);
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: bold;
    /* text-transform: uppercase; REMOVED */
    transform: rotate(-2deg);
    opacity: 0.8;
}

/* ==========================================================================
   STICKY NAVIGATION
   ========================================================================== */

nav {
    position: sticky;
    top: 0;
    background: var(--paper);
    z-index: 100;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--ink);
    padding: 10px 0;
    padding-top: calc(10px + var(--safe-top));
    /* Prevent content bleed on scroll */
    margin-left: calc(-1 * var(--content-padding));
    margin-right: calc(-1 * var(--content-padding));
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
}

/* Add slight shadow when scrolled (hard edge, no blur) */
nav.scrolled {
    box-shadow: 0 3px 0px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   PAGE TRANSITIONS (Slide Stack)
   ========================================================================== */

.page-transition-out {
    animation: slideOut 0.3s var(--ease-out-quint) forwards;
}

.page-transition-in {
    animation: slideIn 0.3s var(--ease-out-quint) forwards;
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   KONAMI CODE EASTER EGG
   ========================================================================== */

#konami-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(241, 233, 210, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease-out;
}

[data-theme="dark"] #konami-overlay {
    background: rgba(26, 26, 46, 0.95);
}

#konami-overlay.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

.konami-content {
    text-align: center;
}

.konami-art {
    font-size: 1.5em;
    color: var(--ink);
    margin-bottom: 20px;
}

.konami-content h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: var(--ink);
}

.konami-content p {
    color: var(--muted);
    margin-bottom: 5px;
}

.konami-hint {
    font-style: italic;
    color: var(--faded);
}

.konami-confetti {
    position: fixed;
    top: -10px;
    width: 8px;
    height: 8px;
    animation: confettiFall 3s linear forwards;
    z-index: 100000;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* ==========================================================================
   ACCESSIBILITY: REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .card {
        animation: none;
        opacity: 1;
    }

    .animate-1,
    .animate-2,
    .animate-3 {
        animation: none;
        opacity: 1;
    }
}

/* ==========================================================================
   ACCESSIBILITY: FOCUS INDICATORS
   ========================================================================== */

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

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--link);
    outline-offset: 2px;
}

/* ==========================================================================
   ACCESSIBILITY: SKIP LINK
   ========================================================================== */

.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
    z-index: 10001;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 10px;
}

/* ==========================================================================
   HIGH CONTRAST MODE
   ========================================================================== */

[data-high-contrast="true"] {
    --paper: #ffffff;
    --card: #ffffff;
    --card-hover: #f0f0f0;
    --ink: #000000;
    --muted: #000000;
    --faded: #333333;
    --link: #0000cc;
}

[data-high-contrast="true"] body::before {
    display: none;
}

/* --------------------------------------------------------------------------
   TIMELINE YEAR SEPARATOR
   -------------------------------------------------------------------------- */
.timeline-year-break {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 20px 20px;
    position: relative;
    overflow: hidden;
}

/* Spine connector for year break */
.timeline-year-break::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 146px;
    /* Desktop: 110px + 12px + 24px */
    width: 2px;
    background: var(--accent);
    z-index: 1;
}

@media (max-width: 600px) {
    .timeline-year-break::before {
        left: 123px;
        /* Mobile: 95px + 6px + 22px */
    }
}

.year-label {
    font-size: 0.75em;
    font-weight: bold;
    color: var(--accent);
    white-space: nowrap;
}

.year-dots {
    flex: 1;
    max-width: 60px;
    height: 0;
    border-bottom: 2px dotted var(--muted);
    opacity: 0.5;
}

/* ==========================================================================
   SCROLL PROGRESS INDICATOR
   ========================================================================== */

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent);
    z-index: 10005;
    transition: width 0.05s linear;
}

[data-theme="dark"] #scroll-progress {
    box-shadow: 0 0 6px var(--accent-glow);
}

/* ==========================================================================
   MOBILE TOUCH TARGETS
   ========================================================================== */

@media (max-width: 600px) {

    /* Larger touch targets for settings panel buttons */
    .settings-options button {
        min-height: 44px;
        min-width: 44px;
        padding: 8px 12px;
        font-size: 0.8em;
    }

    .settings-options label {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 4px 0;
    }

    /* Larger social links for touch */
    .social-link {
        min-height: 44px;
        padding: 12px 16px;
    }

    /* Larger back button */
    .back-btn {
        min-height: 44px;
        padding: 12px 18px;
    }
}

/* ==========================================================================
   COPY INGREDIENTS BUTTON (Recipe Pages)
   ========================================================================== */

.copy-ingredients-btn {
    display: inline-block;
    padding: 8px 14px;
    margin-bottom: 15px;
    background: var(--card);
    border: 1px solid var(--ink);
    font-family: inherit;
    font-size: 0.85em;
    cursor: pointer;
    color: var(--ink);
    transition: all 0.15s ease;
}

.copy-ingredients-btn:hover {
    background: var(--card-hover);
    box-shadow: var(--shadow-sm);
    transform: translate(-1px, -1px);
}

.copy-ingredients-btn:active {
    transform: scale(0.97);
}

.copy-ingredients-btn.copied {
    background: var(--card-hover);
    border-color: var(--accent);
    color: var(--accent);
}

/* ==========================================================================
   FOOTER BACK LINK
   ========================================================================== */

.footer-back-link {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed var(--muted);
}

.footer-back-link a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-back-link a:hover {
    color: var(--link);
}

/* ==========================================================================
   GAME PAGES (Naomi, etc.)
   ========================================================================== */

.minigame-module.centered {
    max-width: 400px;
    margin: 30px auto;
}

.game-instructions {
    max-width: 400px;
    margin: 20px auto;
}

.game-instructions h2 {
    margin-top: 0;
}