/* Biblioteca Oculta: shared palette and the library at the heart of the site. */
.library-theme {
  --bg-primary:#101410; --bg-secondary:#131a14; --bg-card:#172019;
  --text-primary:#e9dfce; --text-secondary:#b6b9ac; --text-muted:#929b89;
  --accent-gold:#cbb182; --accent-gold-light:#ecdbb7;
  --accent-purple:#2d4d34; --accent-purple-light:#2d4d344d;
  --border-color:#cbb18240; --radius:8px;
  --serif:var(--font-serif); --sans:var(--font-sans);
  position:relative; isolation:isolate; background:#101410; color:var(--text-primary);
}
.library-theme::before {
  content:''; position:absolute; z-index:-1; inset:0 0 auto; height:1650px; pointer-events:none;
  background:linear-gradient(180deg,#080d098c,#0d120c82 28%,#101410 96%),url('../../images/biblioteca-oculta.png') center top / auto 1100px no-repeat;
}
.library-theme :is(a,button):focus-visible { outline:2px solid #e5c68e; outline-offset:4px; }
.library-theme .text-gold-gradient { background:none; -webkit-text-fill-color:currentColor; color:var(--accent-gold-light); }
.library-theme .navigation { padding:20px 32px; background:#0a110b70; border-bottom:1px solid #cbb18226; backdrop-filter:blur(8px); }
.library-theme .navigation.scrolled { background:#0b140ef2; border-color:#cbb18240; }
.library-theme .nav-container { max-width:1280px; gap:20px; }
.library-theme .nav-logo { font-size:23px; min-width:0; }
.library-theme .nav-logo > span { white-space:normal; line-height:1.12; }
.library-theme .nav-logo-icon { flex-shrink:0; }
.library-theme .nav-logo i { font-weight:400; font-style:normal; opacity:.7; white-space:nowrap; }
.library-theme .nav-links { gap:18px; align-items:center; }
.library-theme .nav-links a { font-size:12px; color:#c6c4b5; }
.library-theme .nav-links a:hover { color:#ecdbb7; }
.library-theme .hero { min-height:0; padding:125px 24px 34px; background:transparent; overflow:visible; }
.library-theme .hero-bg,.library-theme .hero-divider,.library-theme .scroll-indicator { display:none; }
.library-theme .hero-content { width:100%; max-width:1000px; }
.library-eyebrow { color:#d2c29f; font-size:10px; font-weight:500; text-transform:uppercase; letter-spacing:.2em; }
.library-theme #eyeAnchor { width:112px; height:112px; margin:22px auto 20px; }
.library-theme #eyeAnchor .eye-portal { width:112px; height:112px; }
.library-theme #eyeAnchor .eye-return { width:160px; height:160px; transform:scale(.7); }
.library-theme #eyeAnchor .eye-outer { width:160px; height:160px; }
.library-theme .hero-title { margin:20px 0; font:400 clamp(44px,6vw,77px)/.98 var(--font-serif); letter-spacing:-.025em; color:#e9dfce; text-shadow:0 4px 30px #000; }
.library-theme .hero-title em { color:#d0b27b; font-weight:400; }
.library-theme .hero-subtitle { margin:0 0 17px; font:400 18px/1.6 var(--font-serif); color:#d0cabc; }
.library-theme .hero-description { max-width:540px; margin:0 auto 20px; font-size:13px; line-height:1.8; color:#afb5a7; }
.library-hero-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:20px 30px; }
.library-theme .hero-cta,.library-secondary-link { display:inline-flex; align-items:center; gap:25px; min-height:44px; padding:7px 0; border:0; border-bottom:1px solid #cbb18270; border-radius:0; background:none; color:#e1cba1; font:500 12px var(--font-sans); box-shadow:none; text-decoration:none; transition:color .2s; }
.library-theme .hero-cta:hover,.library-secondary-link:hover { color:#fff0d1; background:none; transform:none; }
.library-secondary-link { color:#a8b09e; border-color:#cbb18226; }
.library-theme .section { padding:76px 32px; scroll-margin-top:70px; }
.library-theme .section-alt { background:#17201975; border-block:1px solid #cbb18210; }
.library-theme .section-container { max-width:1120px; }
.library-theme .section-header { margin-bottom:32px; }
.library-theme .section-title { font-size:clamp(32px,4vw,45px); font-weight:400; line-height:1.1; }
.library-theme .section-subtitle { color:#a9b29f; }
.library-theme #grimorio { padding-top:26px; background:transparent; }
.library-theme #grimorio > .section-container { max-width:1040px; }
.library-theme #grimorio > .section-container > .section-header { text-align:left; padding:0 15px; margin:0 0 30px; }
.library-theme .grimorio-title { font:400 28px var(--font-serif); color:#d6d4bf; text-shadow:none; }
.library-theme #grimorio > .section-container > .section-header .section-subtitle { font-size:15px; margin:3px 0 0; }
.library-collection + .library-collection { margin-top:50px; }
.collection-heading { display:flex; justify-content:space-between; gap:20px; align-items:end; margin:0 15px 16px; }
.collection-heading .library-eyebrow { color:#a9956d; font-size:9px; }
.collection-heading h3 { font:400 33px/1.2 var(--font-serif); color:#dfd4bd; margin-top:5px; }
.collection-note { color:#a6aa99; font-size:11px; }
.library-theme .despertar-card,.library-theme .attr-info-card,.library-theme .family-card,.library-theme .calculator-container { background:linear-gradient(145deg,#21342645,transparent 70%),#141c16d9; border:1px solid #cbb18238; box-shadow:0 12px 32px #0002; }
.library-theme .attr-info-card::before,.library-theme .calculator-container::before { height:2px; background:linear-gradient(90deg,transparent,#b9a16d80,transparent); }
.library-theme .attr-info-card:hover { background:#1b281ed9; border-color:#b8a27270; }
.library-theme .attr-info-card h4,.library-theme .despertar-card-header h3 { font-weight:400; font-size:25px; }
.library-theme .attr-category-tag { border-color:currentColor; background:transparent; font-size:10px; }
.library-theme .attr-category-tag.defensive { color:#a5ba91; }
.library-theme .attr-category-tag.useful { color:#a0b8b4; }
.library-theme .attr-category-tag.combat { color:#c5a08a; }
.library-theme .category-defensive,.library-theme .category-useful,.library-theme .category-combat { background:#25382a66; }
.library-theme .category-header h4 { color:#c8c9ad; }
.library-theme .attr-category { background:#0c150f99; }
.library-theme .attr-btn,.library-theme .reset-btn { background:#243b2966; border-color:#a48e604d; color:#e4d5b4; }
.library-theme .stat-box { background:#0e1911; border-color:#cbb18230; }
.library-theme .family-card::before { background:#738365; height:2px; }
.library-theme .family-tag { border-color:#cbb18238; background:#9aab7b0b; color:#bac1ad; }
.library-theme .mercador-text { color:#c5b793; font-weight:400; }
.library-theme .footer { background:#0c130e; border-top:1px solid #cbb18226; padding-bottom:120px; }
.library-theme .footer-title { font-weight:400; }
.library-home #reading-area { display:none !important; }
.library-theme .bestiary-list,.library-theme .bestiary-reading { background:#101910d9; border-color:#cbb18240; }
.library-theme .bestiary-shell { padding-top:120px; }
.library-theme .creature-button { background:#19261a; border-color:#cbb18235; }
.library-theme .creature-button.active { background:#293b24; }
.library-theme .bestiary-filters :is(input,select) { background:#0b140d; border-color:#cbb18240; }
.library-theme.account-page { background:linear-gradient(90deg,#101410b8,#101410f2),url('../../images/biblioteca-oculta.png') center top / cover fixed; }
.library-theme.account-page .cadastro-hero,.library-theme.account-page .cadastro-panel { background:#101a13e6; border-color:#cbb18240; }
.library-theme.account-page .cadastro-hero::before { background:conic-gradient(from 120deg,transparent,#8fa37414,transparent,#cbb18214,transparent); }
.library-theme.account-page :is(.hero-copy h1,.form-header h2) { background:none; -webkit-text-fill-color:currentColor; color:#e4d3af; font-weight:400; }
.library-theme.account-page :is(.form-card,.attr-group,.mesa-card) { background:#0c160f99; border-color:#cbb18235; }
.library-theme.account-page :is(input,select,textarea) { border-color:#cbb18250; }
.library-theme.account-page :is(.primary-btn,.secondary-btn) { background:#263e2c; border-color:#a48d5e70; color:#ecdbb7; }
@media(max-width:1200px) {
 .library-theme .nav-toggle { display:flex; }
 .library-theme .nav-links { position:absolute; top:100%; left:0; right:0; display:flex; flex-direction:column; align-items:stretch; gap:0; padding:10px 24px 18px; background:#0c160efc; border-bottom:1px solid #cbb18240; transform:translateY(-8px); opacity:0; visibility:hidden; pointer-events:none; }
 .library-theme .nav-links.active { transform:none; opacity:1; visibility:visible; pointer-events:auto; }
 .library-theme .nav-links a { display:flex; align-items:center; min-height:44px; padding:5px 4px; font-size:14px; }
}
@media(max-width:768px) {
 .library-theme::before { height:1400px; background-size:auto,auto 900px; }
 .library-theme .navigation { padding:15px 20px; }
 .library-theme .nav-logo { font-size:21px; }
 .library-theme .hero { padding:105px 20px 25px; }
 .library-eyebrow { font-size:8px; }
 .library-theme #eyeAnchor,.library-theme #eyeAnchor .eye-portal { width:96px; height:96px; }
 .library-theme #eyeAnchor .eye-return { transform:scale(.6); }
 .library-theme .hero-title { font-size:clamp(39px,11vw,62px); }
 .library-theme .hero-subtitle { font-size:16px; }
 .library-theme .hero-description { font-size:12px; }
 .library-hero-actions { gap:18px; }
 .library-theme .hero-cta,.library-secondary-link { font-size:11px; gap:12px; }
 .library-theme .section { padding:52px 18px; }
 .library-theme #grimorio { padding-top:20px; }
 .library-theme #grimorio > .section-container > .section-header { padding:0; }
 .collection-heading { margin-inline:0; gap:10px; }
 .collection-heading h3 { font-size:28px; }
 .collection-heading .library-eyebrow { font-size:8px; }
 .collection-note { max-width:108px; text-align:right; font-size:10px; line-height:1.5; }
 .library-theme .calculator-container { padding:18px; }
 .library-theme .calculator-header { gap:10px; }
 .library-theme .points-label { font-size:13px; }
 .library-theme .attr-row { padding:13px 10px; }
 .library-theme .attr-btn { width:36px; height:40px; }
 .library-theme .bestiary-shell { padding-top:100px; }
 .library-theme.account-page .rule-strip { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .library-theme.account-page .rule-strip div { padding:14px; }
}

/* Physical books and wooden shelving from the selected study. */
.wooden-case { position: relative; border: 12px solid #251a12; border-top-width: 5px; padding: 26px 34px 0; background: linear-gradient(#080b08c9,#0a0c09e0), repeating-linear-gradient(90deg,#20160f 0 4px,#1a120d 5px 20px); box-shadow: inset 0 15px 26px #000b,0 15px 35px #0007; }
.wooden-case::before, .wooden-case::after { content: ''; position: absolute; z-index: 5; pointer-events: none; left: -16px; right: -16px; bottom: -16px; height: 17px; border-top: 2px solid #826140; background: repeating-linear-gradient(0deg,#3a281c 0 3px,#4c3322 4px 5px,#2c1c13 6px 8px); box-shadow: 0 14px 20px #0008; }
.wooden-case::before { bottom: auto; top: -8px; height: 9px; border-top-color: #55402c; }
.shelf-books { position: relative; display: flex; justify-content: center; align-items: end; gap: 9px; min-height: 258px; perspective: 1100px; }
.volume { --book-color: #432d2b; --height: 242px; flex: 0 0 65px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 65px; height: var(--height); border: 1px solid #16110c; border-radius: 5px 7px 1px 1px; padding: 40px 7px 28px; color: #e0c994; background: linear-gradient(90deg,#0009,transparent 17%,#ffffff0d 37%,#0002 78%,#0009),var(--book-color); box-shadow: inset 3px 0 3px #ffffff0e,5px 2px 7px #0008; transform-origin: 50% 100%; transform: translateZ(0); transition: transform .5s cubic-bezier(.2,.8,.2,1),box-shadow .5s,filter .5s; transform-style: preserve-3d; text-align: center; }
.volume::before { content: ''; position: absolute; inset: 10px 6px; border: 1px solid #d8b77a5c; border-top: 3px double #d8b77a8c; border-bottom: 3px double #d8b77a8c; pointer-events: none; }
.volume::after { content: ''; position: absolute; top: 3px; bottom: 3px; right: -15px; width: 14px; background: repeating-linear-gradient(90deg,#ae9b75 0 1px,#e4d6af 1px 3px); transform: rotateY(90deg); transform-origin: left; }
.volume-title { writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg); font: 600 16px/1.05 var(--serif); letter-spacing: .025em; text-shadow: 0 2px 3px #000; max-height: 100%; }
.volume-cover { position: absolute; top: 0; left: 100%; height: 100%; width: 145px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 20px 15px; background: radial-gradient(ellipse at 35% 35%,#ffffff0b,transparent 70%),var(--book-color); color: #e0c994; border: 4px double #b99a6070; border-radius: 0 5px 5px 0; transform: rotateY(90deg); transform-origin: left center; backface-visibility: hidden; pointer-events: none; box-shadow: inset 5px 0 8px #0005; }
.cover-mark { font: 30px var(--serif); opacity: .7; }
.cover-title { font: 600 21px/1.15 var(--serif); }
.cover-edition { font-size: 6px; letter-spacing: .16em; opacity: .6; }
.volume-mark { position: absolute; top: 19px; color: #c3a66d; font: 15px var(--serif); }
.volume-number { position: absolute; bottom: 15px; font: 10px var(--serif); color: #c3a66d; }
.volume:nth-child(2n) { --height: 256px; }
.volume:nth-child(3n) { --height: 232px; }
.volume:hover, .volume:focus-visible { transform: translateY(-17px) translateZ(54px) rotateY(-12deg); box-shadow: 14px 20px 22px #000a; z-index: 10; filter: brightness(1.18); }
.volume.is-pulling { transform: translateY(-38px) translateZ(150px) rotateY(-42deg) scale(1.12); z-index: 15; filter: brightness(1.35); }
.volume.is-out { opacity: .24; transform: translateY(-7px); }
.decorative-volume { flex: 0 0 29px; width: 29px; height: 224px; pointer-events: none; --book-color: #292b21; padding: 0; }
.decorative-volume:nth-last-child(2) { height: 248px; --book-color: #30211e; }
.decorative-volume .volume-mark { top: 40%; font-size: 12px; }
.lower-heading { margin-top: 52px; }
.quiet-warning { text-align: center; font: italic 16px var(--serif); color: #8f9687; margin: 42px 0 0; }

@media(max-width:768px) {
  .wooden-case { border-width: 8px; border-top-width: 5px; padding: 23px 8px 0; }
  .shelf-books { gap: 7px; min-height: 218px; }
  .volume { width: 57px; flex-basis: 57px; --height: 206px; }
  .volume:nth-child(2n) { --height: 218px; }
  .volume:nth-child(3n) { --height: 196px; }
  .volume-title { font-size: 15px; }
  .decorative-volume { display: none; }
  [data-shelf="paths"] .shelf-books { gap: 4px; }
  [data-shelf="paths"] .volume { width: calc((100% - 20px)/6); flex-basis: calc((100% - 20px)/6); min-width: 0; }
  [data-shelf="paths"] .volume-title { font-size: 13px; }
  .lower-heading { margin-top: 43px; }
  .quiet-warning { font-size: 13px; margin-top: 31px; }
  .proposal-footer { padding: 20px; font-size: 7px; }
  .proposal-footer span:nth-child(2) { display: none; }

}
@media(prefers-reduced-motion:reduce) { .library-theme .volume { transition:none; } }
