main:has(> #estudios.active) {
  width: min(100%, 1466px);
  max-width: none;
  padding: clamp(10px, 1.25vw, 18px) clamp(10px, 1.25vw, 18px) 40px;
}
.resources-library {
  position: relative;
  max-width: 1430px;
  margin: auto;
  overflow: hidden;
  border: 1px solid #a87e42;
  border-radius: 14px;
  background: #080f1a;
}
.resources-scene { position: relative; }
.resources-scene img { display: block; width: 100%; height: auto; }
.resources-sign { position: absolute; inset: 8.2% 0 auto; text-align: center; }
#resources-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .32em;
  margin: 0;
  font: 700 clamp(26px, 5vw, 72px)/1.06 Georgia, serif;
  letter-spacing: .05em;
  text-transform: uppercase;
}
#resources-title .resources-bible-art {
  justify-self: end;
  width: clamp(64px, 10vw, 142px);
  height: auto;
  filter: drop-shadow(0 4px 7px #000b);
}
#resources-title span:last-child {
  color: transparent;
  background: linear-gradient(#fff 4%, #fff4d5 32%, #f9d68e 63%, #b57120);
  background-clip: text;
  filter: drop-shadow(0 3px 1px #62411e) drop-shadow(0 4px 10px #000);
}
.resources-sign p {
  margin: 8px 0 0;
  color: #fff3d7;
  font: 600 clamp(8px, 1vw, 15px)/1.2 system-ui, sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
}
#resources-power {
  position: absolute;
  z-index: 1;
  right: calc(23.8% - 15px);
  top: 67.95%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 25px;
  padding: 3px 8px 3px 10px;
  border: 1px solid #bb9158;
  border-radius: 30px;
  background: linear-gradient(#1d2835, #080e16);
  box-shadow: 0 3px 10px #000b;
  color: #ffe6b6;
  white-space: nowrap;
  cursor: pointer;
  font: 600 clamp(12px, 1.03vw, 15px)/1.2 system-ui, sans-serif;
}
.resources-power-icon {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: #ffd68b;
  vertical-align: -1px;
}
.resources-power-icon::before {
  position: absolute;
  inset: -2px auto auto calc(50% - 1px);
  width: 2px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}
#resources-power[aria-expanded="true"] .resources-power-icon { color: #9edaff; }
.resources-screen {
  /* These edges match the glass in the library photograph. */
  position: absolute;
  inset: 24.55% 22.16% 32.56%;
  overflow: auto;
  padding: 7px;
  background: radial-gradient(ellipse at 50% 0%, #162a43, #080e17 77%);
  color: #f8ebd0;
  font-family: Georgia, serif;
  scrollbar-color: #697d95 #101826;
  animation: resources-power-on .65s ease-out both;
}
.resources-library [hidden] { display: none !important; }
@keyframes resources-power-on {
  0% { opacity: 0; filter: brightness(.5); }
  28% { opacity: 1; filter: brightness(1.37); }
  100% { opacity: 1; filter: brightness(1); }
}
.resources-welcome {
  display: grid;
  place-items: center;
  min-height: 100%;
  margin: 0;
  text-align: center;
  color: #ffe6af;
  font: 700 clamp(25px, 5vw, 66px)/1.12 Georgia, serif;
  text-shadow: 0 0 24px #e6ae4e76;
}
.resources-launcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(5px, 1vw, 13px);
  height: 100%;
  max-width: 620px;
  margin: auto;
  padding: clamp(5px, 1.15vw, 16px);
}
.resources-launcher button {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(3px, .75vw, 10px);
  min-width: 0;
  padding: 3px;
  color: #fff7e7;
  font: 700 clamp(14px, 1.45vw, 22px)/1.12 Georgia, serif;
  text-shadow: 0 2px 5px #000;
  border: 1px solid var(--tile-edge);
  border-radius: 10px;
  background: radial-gradient(ellipse at 50% 0%, var(--tile-light), var(--tile-dark) 85%);
  box-shadow: inset 0 1px #fff2, 0 3px 12px #0008;
  cursor: pointer;
}
.resources-launcher button[aria-controls="library-bible"] { --tile-light: #5f3925; --tile-dark: #20130d; --tile-edge: #c7985b; }
.resources-launcher button[aria-controls="library-search"] { --tile-light: #24456a; --tile-dark: #101a2a; --tile-edge: #749bbb; }
.resources-launcher button[aria-controls="library-studies"] { --tile-light: #214c3b; --tile-dark: #10221b; --tile-edge: #75a588; }
.resources-launcher button[aria-controls="library-sermons"] { --tile-light: #653643; --tile-dark: #2b151e; --tile-edge: #bc818e; }
.resources-launcher button:hover { filter: brightness(1.22); }
.resources-icon {
  display: block;
  width: clamp(46px, 8.25vw, 122px);
  aspect-ratio: 1;
  background: url("./iconos-biblioteca.png") no-repeat;
  background-size: 200% 200%;
  filter: drop-shadow(0 5px 6px #000c);
}
.resources-icon-search { background-position: right top; }
.resources-icon-studies { background-position: left bottom; }
.resources-icon-sermons { background-position: right bottom; }
.resources-panel {
  position: relative;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #ad884d;
  border-radius: 6px;
  background: radial-gradient(ellipse at 30% 0%, #182b42, #09131f 83%);
  box-shadow: inset 0 1px #ffe2ab24, 0 3px 9px #0006;
}
.resources-panel h3 {
  margin: 0 0 6px;
  color: #fff2d8;
  font: 700 clamp(15px, 1.5vw, 23px)/1.12 Georgia, serif;
}
.resources-screen[data-focused] .resources-panel { animation: resources-project .32s ease-out both; }
.resources-screen[data-focused] h3 { font-size: clamp(19px, 2vw, 27px); }
@keyframes resources-project { from { opacity: .12; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .resources-screen, .resources-screen[data-focused] .resources-panel { animation: none; }
}
.resources-intro { margin: 0 0 8px; color: #ddcfb9; font: 13px/1.35 system-ui, sans-serif; }
.resources-panel form, .resources-panel label { display: grid; gap: 3px; min-width: 0; }
.resources-panel form { gap: 6px; }
.resources-panel label { color: #f6e6ca; font: 12px/1.25 system-ui, sans-serif; }
.resources-fields { display: grid; grid-template-columns: minmax(0,1.4fr) repeat(2,minmax(0,1fr)); gap: 5px; }
.resources-panel :is(input, select, textarea) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 33px;
  padding: 4px 5px;
  border: 1px solid #61788e;
  border-radius: 4px;
  background: #0b1728;
  color: #fff7e7;
  font: 14px system-ui, sans-serif;
}
.resources-panel button, #resources-back {
  justify-self: start;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #ffe0a3;
  border-radius: 5px;
  background: linear-gradient(#ffe3a1,#cf9745);
  color: #211505;
  font: 700 14px Georgia, serif;
  cursor: pointer;
}
#resources-back {
  border-color: #a98753;
  background: linear-gradient(#20374e,#0d1929);
  color: #ffe6b6;
  font: 12px/1.2 system-ui, sans-serif;
}
#resources-back { margin-bottom: 6px; }
.resources-panel :focus-visible, .resources-launcher button:focus-visible, #resources-power:focus-visible, #resources-back:focus-visible {
  outline: 2px solid #99d9ff;
  outline-offset: 2px;
}
.resources-screen[data-focused] :is(#resources-reading,#resources-search) { grid-template-columns: minmax(0,1fr) auto; align-items: end; }
.resources-passage {
  display: grid;
  align-content: center;
  min-height: 67px;
  margin: 7px 0 3px;
  padding: 7px 9px;
  border: 1px solid #b68f58;
  border-radius: 4px;
  background: linear-gradient(#16162455,#080e1cce), url('/assets/paisaje-recursos.jpg') center / cover;
  color: #fff6e2;
  text-align: center;
  text-shadow: 0 2px 5px #000;
}
.resources-passage h4 { margin: 0 0 4px; color: #ffecbd; }
#resources-output { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.35; }
.resources-screen[data-focused] .resources-passage {
  min-height: 135px;
  padding: 13px clamp(12px, 3vw, 45px);
  font-size: clamp(17px, 1.6vw, 23px);
}
.resources-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px 8px; }
.resources-actions button, .resources-crossrefs button {
  border-color: transparent;
  background: none;
  color: #ffe3a6;
  font: 12px/1.2 system-ui, sans-serif;
  padding-inline: 4px;
}
.resources-actions button:hover, .resources-crossrefs button:hover { text-decoration: underline; }
.resources-actions button[aria-pressed="true"] { color: #ffd572; border-color: #ba904b; }
.resources-actions button:disabled { opacity: .6; cursor: default; }
#resources-note-form { margin-block: 8px; }
.resources-crossrefs { margin-top: 7px; }
.resources-crossrefs button { display: block; }
.resources-crossrefs p { margin: 2px 0 4px; line-height: 1.35; overflow-wrap: anywhere; }
.resources-crossrefs p:first-child { color: #ecd3a8; font-size: 13px; }
#resources-credit, .resources-credit, .resources-status { color: #d2bd95; font: 10px/1.25 system-ui, sans-serif; margin: 3px 0 0; }
.resources-status:not(:empty) { font-size: 13px; }
.resources-content-title, .resources-reference { margin: 3px 0 0; line-height: 1.25; }
.resources-content-title { color: #ffe4a5; font-weight: 700; }
.resources-reference { color: #e4cba0; font-style: italic; font-size: 13px; }
.resources-screen[data-focused] .resources-content-title { font-size: clamp(20px, 2vw, 28px); margin-top: 13px; }
.resources-reading { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
@media (max-width: 980px) {
  #estudios { padding: 0; }
  #resources-power { min-height: 36px; }
  .resources-screen[data-focused] { position: static; overflow: visible; }
  .resources-panel :is(input, select, textarea), .resources-panel button, #resources-back { min-height: 42px; }
  .resources-panel :is(input, select, textarea) { font-size: 16px; }
  .resources-panel h3 { padding-block: 7px; }
}
@media (max-width: 620px) {
  .resources-sign { top: 4.5%; }
  #resources-title { font-size: clamp(19px, 6.2vw, 34px); }
  #resources-title .resources-bible-art { width: clamp(44px, 13vw, 74px); }
  .resources-sign p { margin-top: 4px; }
  .resources-screen { padding: 3px 3px 12px; }
  .resources-launcher { padding: 0; gap: 3px; }
  .resources-launcher button { gap: 1px; border-radius: 4px; font-size: clamp(9px, 2.6vw, 14px); }
  .resources-icon { width: clamp(15px, 5.7vw, 33px); }
  .resources-screen[data-focused] :is(#resources-reading,#resources-search) { grid-template-columns: minmax(0,1fr); }
}
.special-topics{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:0 auto 14px}
.special-topics button{min-height:44px;padding:8px 15px;color:#ffedca;background:linear-gradient(#17304a,#080f1d);border:1px solid #b38a4b;border-radius:8px;cursor:pointer}
.special-topics button:focus-visible{outline:2px solid #99d9ff;outline-offset:2px}
