/* -------------------------------------------------------------
   ALCHEMY GRIMOIRE RECIPE BLOG - STYLESHEET
   Theme: Magical Medieval Grimoire & Vintage Parchment (Vanilla CSS)
   ------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=Share+Tech+Mono&display=swap');

:root {
    --bg-base: #0f0a05;
    --bg-grimoire: #221307;
    --bg-parchment: #f0e6cc;
    --border-gold: #c5a059;
    --border-dark-gold: #8f6f35;
    
    /* Wax Seal Crimson HSL */
    --wax-red: hsl(0, 70%, 25%);
    --wax-red-glow: hsla(0, 70%, 25%, 0.4);
    
    /* Calligraphy colors */
    --ink-black: #2b1f13;
    --ink-red: #8f1d1d;
    --ink-gold: #a67c37;
    
    --font-magic: 'Cinzel', serif;
    --font-serif: 'Playfair Display', serif;
    --font-mono: 'Share Tech Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.alchemy-deck {
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(20, 15, 8, 0.2) 0%, rgba(0,0,0,0.8) 100%),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.01) 0px, rgba(255,255,255,0.01) 1px, transparent 1px, transparent 10px);
    color: #dfd5c6;
    font-family: var(--font-serif);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Vintage Vignette Overlay */
.vignette-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, 0.65) 100%);
    pointer-events: none;
    z-index: 10;
}

/* Header */
.grimoire-header {
    height: 70px;
    border-bottom: 2px solid var(--border-dark-gold);
    background: linear-gradient(to bottom, #1c1108, #100a04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 20;
}

.grimoire-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.grimoire-header .brand .orb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffeaa7, #d4af37);
    box-shadow: 0 0 10px #d4af37;
    animation: magic-pulse 3s infinite alternate;
}

@keyframes magic-pulse {
    0% { transform: scale(1); box-shadow: 0 0 5px #d4af37; }
    100% { transform: scale(1.3); box-shadow: 0 0 15px #ffe57f, 0 0 25px #ffb300; }
}

.grimoire-header .brand .title {
    font-family: var(--font-magic);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #e5c07b;
    text-shadow: 0 0 8px rgba(229, 192, 123, 0.2);
}

.grimoire-header .brand .version {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--border-gold);
    border: 1px solid var(--border-dark-gold);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.grimoire-header .controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.magic-btn {
    background: transparent;
    border: 1px solid var(--border-dark-gold);
    color: #e5c07b;
    padding: 6px 16px;
    font-family: var(--font-magic);
    font-size: 0.72rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-shadow: 0 0 5px rgba(229, 192, 123, 0.3);
}

.magic-btn:hover {
    background: var(--border-dark-gold);
    color: #120d08;
    box-shadow: 0 0 10px var(--border-gold);
    text-shadow: none;
}

.magic-btn.muted {
    border-color: #5c4b37;
    color: #8c7e6c;
}

/* Layout Workspace */
.grimoire-layout {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 140px 1fr;
    height: calc(100vh - 110px); /* header + footer */
    position: relative;
    z-index: 5;
    padding: 20px;
    gap: 20px;
    min-height: 0; /* Enable scrollbars in children */
}

/* Left Sidebar: Wax Seals Navigation */
.seal-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border-right: 1px dashed rgba(143, 111, 53, 0.2);
    padding-right: 15px;
}

.seals-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.seal-sidebar h4 {
    font-family: var(--font-magic);
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    color: var(--border-gold);
    text-align: center;
    margin-bottom: 5px;
}

/* Wax Seal Button */
.wax-seal {
    appearance: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ac1e1e, #550707);
    border: 3px double var(--border-gold);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.6), 
        inset 0 2px 4px rgba(255,255,255,0.15),
        inset 0 -2px 6px rgba(0,0,0,0.6);
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #f8e7b5;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wax-seal-mark {
    font-family: var(--font-magic);
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 1px;
}

/* Drenched melting wax effect */
.wax-seal::after {
    content: '';
    position: absolute;
    top: 50px; left: 12px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #550707;
    box-shadow: 
        10px -2px 0 1px #550707,
        25px -4px 0 -1px #550707;
    opacity: 0.8;
}

.wax-seal:hover {
    transform: scale(1.12);
    box-shadow: 
        0 0 15px var(--border-gold),
        0 6px 12px rgba(0, 0, 0, 0.8),
        inset 0 2px 4px rgba(255,255,255,0.2);
}

.wax-seal.active {
    background: radial-gradient(circle at 35% 35%, #ffd54f, #9b6c00);
    border-color: #fff;
    box-shadow: 
        0 0 20px #ffb300,
        0 6px 16px rgba(0, 0, 0, 0.8),
        inset 0 2px 4px rgba(255,255,255,0.3);
}

.wax-tooltip {
    position: absolute;
    left: 80px;
    background: #1c1108;
    border: 1px solid var(--border-gold);
    color: #dfd5c6;
    padding: 4px 8px;
    font-family: var(--font-magic);
    font-size: 0.65rem;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
    white-space: nowrap;
    z-index: 30;
}

.wax-seal:hover .wax-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Center Grimoire Book Container */
.book-viewport {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    perspective: 1200px;
    height: 100%;
    overflow-y: auto;
    gap: 32px;
    padding-top: 10px;
    padding-bottom: 40px;
    scrollbar-width: none; /* Hide scrollbar for clean deck look */
}
.book-viewport::-webkit-scrollbar {
    display: none;
}

.grimoire-book {
    width: 100%;
    max-width: 1120px;
    height: 100%;
    max-height: 700px;
    background-color: var(--bg-grimoire);
    background-image: linear-gradient(135deg, #2b1709, #1c0e05);
    border: 12px solid #1a0c04;
    border-radius: 16px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.8), 
        0 0 50px rgba(143, 111, 53, 0.1),
        inset 0 0 20px rgba(0,0,0,0.8);
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 6px;
    transform-style: preserve-3d;
    flex-shrink: 0;
}

/* Ornate corner bracket decorations */
.grimoire-book::before,
.grimoire-book::after {
    content: "";
    position: absolute;
    width: 34px;
    height: 34px;
    border-color: var(--border-gold);
    opacity: 0.35;
    pointer-events: none;
}

.grimoire-book::before {
    top: 12px;
    left: 12px;
    border-top: 2px solid;
    border-left: 2px solid;
}

.grimoire-book::after {
    right: 12px;
    bottom: 12px;
    border-right: 2px solid;
    border-bottom: 2px solid;
}

/* Spine seam down the middle */
.book-spine {
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: 20px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(20,10,5,0.4) 30%, rgba(0,0,0,0) 50%, rgba(20,10,5,0.4) 70%, rgba(0,0,0,0.7) 100%);
    z-index: 15;
    pointer-events: none;
    border-left: 1px solid rgba(0,0,0,0.5);
    border-right: 1px solid rgba(0,0,0,0.5);
}

/* Parchment Pages */
.book-page {
    background-color: var(--bg-parchment);
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.04) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)'/%3E%3C/svg%3E");
    padding: 32px 40px;
    height: 100%;
    overflow-y: auto;
    color: var(--ink-black);
    position: relative;
    box-shadow: inset 0 0 20px rgba(43, 31, 19, 0.15);
    transition: transform 0.5s ease, opacity 0.5s ease, filter 0.5s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(43, 31, 19, 0.2) transparent;
}

.book-page::-webkit-scrollbar {
    width: 4px;
}
.book-page::-webkit-scrollbar-thumb {
    background: rgba(43, 31, 19, 0.2);
    border-radius: 2px;
}

.book-page.left-page {
    border-radius: 8px 0 0 8px;
    border-right: 2px solid rgba(0,0,0,0.1);
    transform-origin: right center;
}

.book-page.right-page {
    border-radius: 0 8px 8px 0;
    border-left: 2px solid rgba(0,0,0,0.1);
    transform-origin: left center;
}

/* 3D Page turn curl effect (Triggered dynamically) */
.book-page.page-curl-left {
    transform: rotateY(15deg) skewY(-2deg) scaleX(0.95);
    filter: brightness(0.85) blur(0.5px);
}
.book-page.page-curl-right {
    transform: rotateY(-15deg) skewY(2deg) scaleX(0.95);
    filter: brightness(0.85) blur(0.5px);
}

/* Page Ornate Inner Border */
.page-border {
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border: 1px solid rgba(143, 111, 53, 0.15);
    pointer-events: none;
    border-radius: 6px;
}

.page-border::before {
    content: '';
    position: absolute;
    top: 4px; left: 4px; right: 4px; bottom: 4px;
    border: 1px dashed rgba(143, 111, 53, 0.08);
}

/* LEFT PAGE CONTENT: Reagents & Illustration */
.dish-header {
    text-align: center;
    margin-bottom: 20px;
}

.dish-illustration-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    background: radial-gradient(circle, #f9f6ef 40%, rgba(197, 160, 89, 0.2) 100%);
    border: 2px solid var(--border-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    box-shadow: 0 4px 10px rgba(43, 31, 19, 0.1);
    position: relative;
    overflow: hidden;
}

.dish-illustration {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    mix-blend-mode: multiply;
    filter: sepia(0.2) contrast(1.1) brightness(0.95);
    transition: transform 0.5s ease;
}

.dish-illustration-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-magic);
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--ink-red);
    background: radial-gradient(circle, #fff9e8 0%, #d7ba73 100%);
    mix-blend-mode: normal;
}

.dish-illustration-container:hover .dish-illustration {
    transform: scale(1.1);
}

/* Glowing magical circle behind illustration */
.dish-illustration-container::before {
    content: '';
    position: absolute;
    top: -6px; left: -6px; right: -6px; bottom: -6px;
    border: 1px dashed var(--border-dark-gold);
    border-radius: 50%;
    animation: rotate-radar 20s linear infinite;
    opacity: 0.6;
}

@keyframes rotate-radar {
    100% { transform: rotate(360deg); }
}

.dish-country {
    font-family: var(--font-magic);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--ink-red);
    letter-spacing: 2px;
}

.dish-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    font-style: italic;
    color: rgba(43, 31, 19, 0.85);
    text-align: center;
    margin-bottom: 24px;
    padding: 0 10px;
}

.section-title {
    font-family: var(--font-magic);
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--ink-red);
    letter-spacing: 1.5px;
    border-bottom: 2px double rgba(143, 111, 53, 0.3);
    padding-bottom: 4px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Reagent Grid list */
.reagent-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reagent-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    border-bottom: 1px dotted rgba(43, 31, 19, 0.15);
    padding-bottom: 4px;
    font-weight: 500;
}

.reagent-name {
    color: var(--ink-black);
}

.reagent-amount {
    font-family: var(--font-mono);
    color: var(--ink-red);
    font-weight: bold;
}

/* RIGHT PAGE CONTENT: Calligraphy Title & Transmutations */
.alchemy-title-box {
    text-align: center;
    margin-bottom: 24px;
}

.magic-seal-badge {
    font-size: 1.1rem;
    color: var(--ink-gold);
    margin-bottom: 4px;
    letter-spacing: 4px;
}

.dish-title {
    font-family: var(--font-magic);
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--ink-black);
    line-height: 1.3;
    text-shadow: 0.5px 0.5px 1px rgba(0,0,0,0.1);
}

.dish-eng-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--ink-gold);
    letter-spacing: 1px;
    margin-top: 4px;
    text-transform: uppercase;
}

/* Transmutation Steps */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-left: 8px;
}

.step-item {
    display: flex;
    gap: 14px;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--ink-black);
    font-weight: 500;
}

.step-number {
    font-family: var(--font-magic);
    font-size: 1rem;
    font-weight: bold;
    color: var(--ink-red);
    border: 1px solid rgba(143, 111, 53, 0.2);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(143, 111, 53, 0.05);
}

.step-text {
    flex-grow: 1;
}

/* Cauldron Bubbling Graphic under the steps */
.cauldron-graphic {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    opacity: 0.45;
}

.cauldron-icon {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 1.5px;
}

.bubbles-flow {
    display: flex;
    gap: 4px;
}

.bubble {
    width: 6px;
    height: 6px;
    background: var(--border-gold);
    border-radius: 50%;
    animation: rise-bubble 1.5s infinite ease-in-out;
}

.bubble:nth-child(2) { animation-delay: 0.3s; width: 8px; height: 8px; }
.bubble:nth-child(3) { animation-delay: 0.7s; }

@keyframes rise-bubble {
    0% { transform: translateY(10px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-15px); opacity: 0; }
}

/* Footer Ticker */
.grimoire-footer {
    height: 40px;
    border-top: 2px solid var(--border-dark-gold);
    background: #0d0804;
    display: grid;
    grid-template-columns: 1fr 240px;
    align-items: center;
    padding: 0 32px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--border-gold);
    z-index: 20;
}

.footer-ticker {
    overflow: hidden;
    white-space: nowrap;
}

.footer-ticker-content {
    display: inline-block;
    animation: scroll-footer 25s linear infinite;
}

@keyframes scroll-footer {
    0% { transform: translate3d(100%, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.footer-meta {
    text-align: right;
    color: rgba(197, 160, 89, 0.5);
}

/* Responsive grimoire layout (collapsing double-page book on small screens) */
@media (max-width: 900px) {
    .grimoire-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
        overflow-y: auto;
    }
    
    .seal-sidebar {
        flex-direction: row;
        border-right: none;
        border-bottom: 1px dashed rgba(143, 111, 53, 0.2);
        padding-right: 0;
        padding-bottom: 15px;
        justify-content: center;
    }
    
    .grimoire-book {
        grid-template-columns: 1fr;
        max-height: none;
        height: auto;
    }
    
    .book-spine {
        display: none;
    }
    
    .book-page.left-page {
        border-radius: 8px 8px 0 0;
        border-right: none;
        border-bottom: 2px solid rgba(0,0,0,0.15);
    }
    
    .book-page.right-page {
        border-radius: 0 0 8px 8px;
        border-left: none;
    }
}

/* -------------------------------------------------------------
   COMPENDIUM INDEX & SEARCH PANEL
   ------------------------------------------------------------- */
.index-panel {
    width: 100%;
    max-width: 1120px;
    background: #18110b;
    border: 2px solid var(--border-dark-gold);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
}

.index-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px double rgba(197, 160, 89, 0.3);
    padding-bottom: 12px;
}

.index-title {
    font-family: var(--font-magic);
    font-size: 1.1rem;
    color: #e5c07b;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(229, 192, 123, 0.3);
}

.index-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 1px;
    color: var(--border-gold);
    pointer-events: none;
}

#recipe-search {
    width: 100%;
    background: #0d0805;
    border: 1px solid var(--border-dark-gold);
    color: #dfd5c6;
    padding: 12px 16px 12px 88px;
    border-radius: 6px;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
}

#recipe-search:focus {
    border-color: var(--border-gold);
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.25);
    background: #120d09;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    background: transparent;
    border: 1px solid rgba(197, 160, 89, 0.3);
    color: #dfd5c6;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: var(--font-magic);
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}

.filter-tag:hover, .filter-tag.active {
    background: var(--border-dark-gold);
    color: #120d08;
    border-color: var(--border-gold);
}

/* Index Cards Grid */
.index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Individual Recipe Card */
.index-card {
    appearance: none;
    text-align: left;
    font: inherit;
    background: var(--bg-parchment);
    background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0.02) 100%);
    border: 1px solid var(--border-dark-gold);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.index-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 8px 16px rgba(197, 160, 89, 0.15),
        0 4px 10px rgba(0,0,0,0.4);
    border-color: var(--border-gold);
}

.index-card.active {
    outline: 2px solid var(--border-gold);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.3);
}

.index-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(43, 31, 19, 0.15);
    padding-bottom: 6px;
}

.index-card-title-box {
    display: flex;
    flex-direction: column;
}

.index-card-flag {
    font-size: 1.5rem;
}

.index-card-title {
    font-family: var(--font-magic);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink-black);
}

.index-card-eng {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--ink-gold);
    text-transform: uppercase;
}

.index-card-reagents-preview {
    font-size: 0.72rem;
    color: rgba(43, 31, 19, 0.85);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 4px;
}

.index-card-reagents-preview strong {
    color: var(--ink-red);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--border-gold);
    font-family: var(--font-magic);
    letter-spacing: 1px;
    padding: 40px 0;
}

@media (max-width: 600px) {
    .grimoire-header {
        height: auto;
        padding: 14px 18px;
        align-items: flex-start;
        gap: 12px;
        flex-direction: column;
    }

    .grimoire-header .controls {
        width: 100%;
        justify-content: space-between;
    }

    .grimoire-layout {
        padding: 12px;
    }

    .book-page {
        padding: 28px 24px;
    }

    #recipe-search {
        padding-left: 16px;
        padding-top: 34px;
    }

    .search-icon {
        top: 12px;
        transform: none;
    }

    .index-grid {
        grid-template-columns: 1fr;
    }

    .grimoire-footer {
        grid-template-columns: 1fr;
        gap: 4px;
        height: auto;
        padding: 10px 18px;
    }

    .footer-ticker {
        white-space: normal;
    }

    .footer-ticker-content {
        display: block;
        width: 100%;
        max-width: 100%;
        animation: none !important;
        transform: none !important;
        white-space: normal;
        line-height: 1.45;
    }

    .footer-meta {
        text-align: left;
    }
}
