/* Identidad compartida del sitio público: tinta, papel y flores. */
:root {
    --primary-color: #e5ca10;
    --ink: #171717;
    --muted: #62615d;
    --line: #d8d6d0;
    --paper: #fff;
    --site-width: 1320px;
    --site-gutter: 40px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body.manga-site {
    position: relative;
    isolation: isolate;
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
}
/* Encuadre inferior izquierdo: excluye el rostro y las flores de la derecha. */
body.manga-site::before {
    content: '';
    position: fixed;
    z-index: -1;
    pointer-events: none;
    left: 0;
    bottom: 0;
    width: 380px;
    height: 560px;
    max-height: 75vh;
    background: linear-gradient(to bottom, #fff, transparent 35%),
                linear-gradient(to right, transparent 20%, #fff 100%),
                url('../img/background-ink-watercolor.png') left bottom / 760px auto no-repeat;
    opacity: .8;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
a, button { touch-action: manipulation; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 5px;
}
[hidden] { display: none !important; }
.japanese, [lang="ja"] { font-family: 'Noto Sans JP', sans-serif; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 20px; background: var(--primary-color); }
.skip-link:focus { top: 12px; }

/* Un encabezado liviano deja que las portadas sean las protagonistas. */
.header { position: relative; z-index: 30; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--ink); }
.nav-container { width: min(var(--site-width), calc(100% - 2 * var(--site-gutter))); margin: auto; padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.nav-brand { text-decoration: none; flex-shrink: 0; }
.brand-title { font-family: 'Noto Sans JP', sans-serif; font-size: 23px; font-weight: 900; letter-spacing: -1px; line-height: 1.4; }
.brand-title::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 8px; background: var(--primary-color); }
.brand-subtitle { display: block; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-top: 3px; }
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-link { min-height: 44px; display: flex; flex-direction: column; justify-content: center; text-decoration: none; position: relative; }
.nav-link i { display: none; }
.nav-link span { font-family: 'Noto Sans JP', sans-serif; font-size: 11px; color: var(--muted); }
.nav-link small { font-size: 13px; font-weight: 600; }
.nav-link::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 3px; background: var(--primary-color); transition: width .2s; }
.nav-link:hover::after, .nav-link:focus-visible::after { width: 100%; }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 11px; background: var(--paper); border: 1px solid var(--ink); }
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); display: block; margin: 4px 0; }

.footer { border-top: 1px solid var(--ink); background: rgba(255,255,255,.95); padding: 32px max(var(--site-gutter), calc((100% - var(--site-width)) / 2)); }
.footer-content { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; }
.footer-section h4 { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.footer-section:first-child h4 { font-family: 'Noto Sans JP', sans-serif; font-size: 24px; }
.footer-section p, .footer-section a { font-size: 12px; color: var(--muted); }
.footer-section ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; list-style: none; margin: 0; padding: 0; }
.footer-section a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; }
.footer-section a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; color: var(--muted); font-size: 10px; }


.nav-link.active::after { width: 100%; }
.nav-link.active small { font-weight: 700; }
@media (max-width: 1100px) {
    :root { --site-gutter: 28px; }
    .nav-container { gap: 20px; }
    .nav-menu { gap: 20px; }
}
@media (max-width: 800px) {
    :root { --site-gutter: 20px; }
    .nav-container { padding: 10px 0; }
    .nav-toggle { display: block; }
    .nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 12px var(--site-gutter); background: #fff; border-bottom: 1px solid var(--ink); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .nav-menu.active { display: grid; }
    .nav-link { padding: 8px; min-height: 60px; }
    .brand-title { font-size: 23px; }
    .brand-subtitle { font-size: 10px; }

    .footer-content { gap: 24px; grid-template-columns: 1fr 1fr; }
    .footer-section:first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    :root { --site-gutter: 16px; }
    body.manga-site::before { width: 240px; height: 380px; background-size: auto, auto, 500px auto; }
    .footer-content { grid-template-columns: 1fr; }
    .footer-section p { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
