/* ========================================
   LIBRARY / STUDY SKIN
   Wood-paneled study: walnut, leather, brass, warm lamplight. Overrides the
   shared custom properties defined per-skin in assets/css/skin-fallout.css /
   inc/theme-skins.php.
   Selectors include the .login variant explicitly so this file wins on
   specificity regardless of stylesheet print order.
   ======================================== */
body.dwh-skin-library,
body.login.dwh-skin-library {
    --dwh-background: #2b1d14;
    --dwh-surface: #3d2a1d;
    --dwh-surface-hover: #4d3524;
    --dwh-text: #e8dcc4;
    --dwh-text-secondary: #c9b896;
    --dwh-text-muted: #8a7458;
    --dwh-primary: #b8860b;
    --dwh-primary-hover: #d4a017;
    --dwh-border: #8b5a2b;
    --dwh-border-muted: #5c4433;
    --dwh-error: #8b3a3a;
    --dwh-success: #5c7a4a;
    --dwh-warning: #b8860b;

    /* Soft warm lamplight instead of a neon glow */
    --dwh-glow: 0 0 6px rgba(184, 134, 11, 0.35);
    --dwh-glow-strong: 0 0 10px rgba(184, 134, 11, 0.5), 0 0 20px rgba(139, 90, 43, 0.3);
    --dwh-form-shadow: 0 0 24px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(184, 134, 11, 0.05);

    --dwh-font-primary: 'Crimson Text', 'Georgia', serif;
    --dwh-font-heading: 'Playfair Display', 'Georgia', serif;

    --dwh-font-size-base: 16px;
    --dwh-font-size-sm: 14px;
    --dwh-font-size-lg: 18px;
    --dwh-font-size-xl: 24px;
    --dwh-font-size-2xl: 32px;
}

@media (max-width: 480px) {
    body.dwh-skin-library {
        --dwh-font-size-base: 14px;
    }
}

/* No CRT flicker or scanlines in a calm study */
body.dwh-skin-library .flicker {
    animation: none;
    opacity: 1;
}

body.dwh-skin-library.scanlines::after {
    display: none;
}

/* Classic bookplate/letterhead double-rule border, replacing the plain
   single border and glow on the header/footer */
body.dwh-skin-library .site-header {
    border-bottom: 4px double var(--dwh-primary);
    box-shadow: none;
}

body.dwh-skin-library .site-footer {
    border-top: 4px double var(--dwh-primary);
}

/* Recolor the select-arrow SVG (style.css hardcodes a green fill) to match */
body.dwh-skin-library select,
body.login.dwh-skin-library .language-switcher select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b8860b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* Gilt corner-bracket flourish on cards and the login form, evoking
   gold-tooled leather book covers - the signature touch this skin was
   missing next to the other skins' bigger flourishes */
body.dwh-skin-library .card,
body.dwh-skin-library .single-media__details,
body.login.dwh-skin-library form {
    position: relative;
}

body.dwh-skin-library .card::before,
body.dwh-skin-library .single-media__details::before,
body.login.dwh-skin-library form::before,
body.dwh-skin-library .card::after,
body.dwh-skin-library .single-media__details::after,
body.login.dwh-skin-library form::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    pointer-events: none;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M2 26 L2 8 Q2 2 8 2 L26 2' fill='none' stroke='%23b8860b' stroke-width='2'/%3E%3Ccircle cx='2' cy='26' r='2.5' fill='%23b8860b'/%3E%3C/svg%3E");
}

body.dwh-skin-library .card::before,
body.dwh-skin-library .single-media__details::before,
body.login.dwh-skin-library form::before {
    top: 6px;
    left: 6px;
}

body.dwh-skin-library .card::after,
body.dwh-skin-library .single-media__details::after,
body.login.dwh-skin-library form::after {
    bottom: 6px;
    right: 6px;
    transform: rotate(180deg);
}
