/* Shared modal styles copied verbatim from the approved tema.css.
 * Loaded on the home page and internal pages before existing refinements. */
/* Modais dos materiais do tema */
body.modal-open{overflow:hidden}
.resource-modal{width:min(1240px,calc(100vw - 32px));max-width:none;height:min(900px,calc(100dvh - 32px));max-height:none;margin:auto;padding:0;border:0;border-radius:26px;color:#0a2c4d;background:transparent;box-shadow:0 32px 90px rgba(2,17,36,.38);overflow:hidden}
.resource-modal[open]{animation:modalEnter .3s cubic-bezier(.2,.8,.2,1)}
.resource-modal::backdrop{background:rgba(3,16,35,.72);backdrop-filter:blur(9px);animation:backdropEnter .25s ease}
.resource-modal__shell{position:relative;height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(48,124,198,.2);border-radius:26px;background:radial-gradient(circle at 0 0,rgba(47,128,237,.1),transparent 31%),radial-gradient(circle at 100% 0,rgba(0,179,136,.09),transparent 29%),#f7fbff}
.resource-modal__header{position:relative;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px 20px;border-bottom:1px solid #dce8f3;background:rgba(255,255,255,.93);box-shadow:0 7px 24px rgba(8,41,66,.06);backdrop-filter:blur(18px)}
.resource-modal__identity{min-width:0;display:flex;align-items:center;gap:13px}.resource-modal__icon{width:49px;height:49px;display:grid;flex:0 0 49px;place-items:center;border-radius:15px;color:#fff;background:linear-gradient(145deg,#2f80ed,#00ae88);box-shadow:0 9px 21px rgba(32,122,187,.22)}.resource-modal__icon .icon{width:27px;height:27px}.resource-modal__eyebrow{display:block;margin-bottom:3px;color:#008c73;font-size:.57rem;font-weight:850;letter-spacing:.12em;text-transform:uppercase}.resource-modal__identity h2{overflow:hidden;margin:0;font-size:1.2rem;line-height:1.15;letter-spacing:-.03em;text-overflow:ellipsis;white-space:nowrap}.resource-modal__header-actions{display:flex;align-items:center;gap:9px}.resource-modal__share,.resource-modal__close{height:42px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #d5e3ef;color:#174466;background:#f8fbfe;transition:transform .25s,border-color .25s,color .25s,background .25s}.resource-modal__share{gap:8px;padding:0 15px;border-radius:12px;font-size:.69rem;font-weight:800}.resource-modal__share .icon{width:18px;height:18px}.resource-modal__close{width:42px;border-radius:12px}.resource-modal__close .icon{width:21px;height:21px}.resource-modal__share:hover,.resource-modal__share:focus-visible,.resource-modal__close:hover,.resource-modal__close:focus-visible{outline:0;color:#fff;border-color:#197de5;background:#197de5;transform:translateY(-2px)}
.resource-modal__content{min-height:0;flex:1;overflow:auto;padding:18px 20px 20px}.resource-modal__feedback{position:absolute;z-index:7;right:76px;top:66px;margin:0;padding:8px 12px;border-radius:10px;color:#fff;background:#087d68;box-shadow:0 9px 22px rgba(8,41,66,.18);font-size:.64rem;font-weight:800}.resource-modal__feedback:empty{display:none}
.modal-material{height:100%;display:flex;flex-direction:column;gap:14px}.pdf-viewer,.map-viewer,.video-viewer{position:relative;min-height:0;flex:1;overflow:hidden;border:1px solid #d7e4ef;border-radius:18px;background:#e9f0f7;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}.pdf-viewer iframe,.video-viewer iframe{width:100%;height:100%;border:0}.pdf-viewer{min-height:580px}.video-viewer{width:min(1080px,100%);aspect-ratio:16/9;align-self:center;flex:none;background:#020711}.map-viewer{min-height:580px;display:flex;flex-direction:column;background:linear-gradient(135deg,#e6eef7,#f7fbff)}.map-viewer__canvas{min-height:0;display:grid;flex:1;overflow:auto;place-items:center;padding:22px}.map-viewer__canvas img{max-width:100%;height:auto;transform-origin:center center;transition:transform .28s ease;filter:drop-shadow(0 12px 24px rgba(8,41,66,.12))}.map-viewer__controls{position:absolute;z-index:3;right:16px;bottom:16px;display:flex;align-items:center;gap:7px;padding:7px;border:1px solid rgba(255,255,255,.8);border-radius:14px;background:rgba(6,31,57,.88);box-shadow:0 12px 26px rgba(4,25,49,.25);backdrop-filter:blur(14px)}.map-viewer__controls button,.map-viewer__controls output{min-width:38px;height:35px;display:grid;place-items:center;border:0;border-radius:9px;color:#eaf6ff;background:rgba(255,255,255,.1);font-size:.66rem;font-weight:800}.map-viewer__controls button{padding:0 10px;cursor:pointer}.map-viewer__controls button:hover,.map-viewer__controls button:focus-visible{outline:0;color:#062c4a;background:#fff}.map-viewer__controls output{min-width:54px;background:transparent}.modal-material__footer{display:flex;align-items:center;justify-content:space-between;gap:20px}.modal-material__footer p{display:flex;flex-direction:column;margin:0;color:#60758a;font-size:.69rem;line-height:1.45}.modal-material__footer p strong{color:#0a365b;font-size:.78rem}.modal-material__actions{display:flex;align-items:center;gap:9px}.modal-action{min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 16px;border:1px solid transparent;border-radius:12px;color:#fff;background:linear-gradient(100deg,#277fe5,#00a985);box-shadow:0 8px 18px rgba(23,113,166,.17);font-size:.67rem;font-weight:850;transition:transform .25s,box-shadow .25s,filter .25s}.modal-action .icon{width:18px;height:18px}.modal-action--soft{color:#1664b6;border-color:#cbdff1;background:#eaf4ff;box-shadow:none}.modal-action:hover,.modal-action:focus-visible{outline:0;filter:saturate(1.14);transform:translateY(-2px);box-shadow:0 12px 24px rgba(23,113,166,.24)}
.map-viewer:fullscreen{border:0;border-radius:0;background:linear-gradient(135deg,#dce9f5,#f8fbff)}.map-viewer:fullscreen .map-viewer__canvas{padding:40px}.map-viewer:fullscreen .map-viewer__controls{position:fixed}.modal-material__footer--video{justify-content:center;padding:20px 0 10px;text-align:center}.modal-material__footer--video p{align-items:center;color:#526c84;font-size:clamp(1.05rem,1.7vw,1.68rem);line-height:1.5}.modal-material__footer--video p strong{margin-bottom:8px;color:#082f52;font-size:clamp(1.75rem,3vw,2.5rem);line-height:1.12;letter-spacing:-.035em}

/* Flashcards interativos */
.flash-study{width:min(920px,100%);min-height:100%;display:flex;align-items:stretch;flex-direction:column;justify-content:center;margin:0 auto;padding:6px 0}.flash-progress{margin-bottom:18px}.flash-progress>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:9px;color:#4d6680;font-size:.67rem;font-weight:750}.flash-progress strong{color:#a95238}.flash-progress__track{height:9px;overflow:hidden;border-radius:99px;background:#dfe9f2;box-shadow:inset 0 2px 4px rgba(8,41,66,.08)}.flash-progress__track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2f80ed 0%,#00b38d 45%,#d26747 72%,#7b4bd3 100%);box-shadow:0 0 18px rgba(47,128,237,.38);transition:width .45s cubic-bezier(.2,.8,.2,1)}.flashcard-stage{height:390px;perspective:1600px}.flashcard{width:100%;height:100%;transform-style:preserve-3d}.flashcard__inner{position:relative;width:100%;height:100%;transition:transform .78s cubic-bezier(.2,.74,.18,1);transform-style:preserve-3d;will-change:transform}.flashcard.is-flipped .flashcard__inner{transform:rotateY(180deg)}.flashcard__face{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center;flex-direction:column;padding:46px 52px;border:1px solid rgba(173,80,53,.23);border-radius:25px;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;box-shadow:0 22px 48px rgba(74,35,27,.14);transform-style:preserve-3d}.flashcard__face>*{transform:translateZ(26px)}.flashcard__face::before{content:"";position:absolute;width:380px;height:380px;right:-225px;top:-245px;border:1px solid rgba(255,255,255,.28);border-radius:50%;box-shadow:0 0 0 47px rgba(255,255,255,.045);transform:translateZ(2px)}.flashcard__front{color:#fff;background:radial-gradient(circle at 8% 8%,rgba(255,255,255,.13),transparent 35%),linear-gradient(135deg,#9f472e,#d46b49 58%,#bc5437)}.flashcard__back{color:#fff;background:radial-gradient(circle at 94% 7%,rgba(255,255,255,.14),transparent 34%),linear-gradient(135deg,#07559f,#028a82 64%,#00a47f);transform:rotateY(180deg)}.flashcard__label{position:relative;display:inline-block;margin-bottom:20px;padding:8px 12px;border:1px solid rgba(255,255,255,.28);border-radius:99px;color:#fff;background:rgba(5,31,55,.18);font-size:.6rem;font-weight:850;letter-spacing:.12em;text-transform:uppercase}.flashcard__face h3{position:relative;max-width:760px;font-size:clamp(1.55rem,3vw,2.25rem);line-height:1.16;letter-spacing:-.045em}.flashcard__face p{position:relative;max-width:760px;margin-top:18px;color:rgba(255,255,255,.86);font-size:.84rem;line-height:1.65}.flashcard__back p{margin:0;color:#fff;font-size:clamp(1rem,2.1vw,1.38rem);font-weight:650;line-height:1.65}.flash-study__controls{min-height:57px;display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:18px}.flash-turn,.flash-grade button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 17px;border-radius:12px;font-size:.68rem;font-weight:850;transition:transform .24s,box-shadow .24s,background .24s}.flash-turn{border:1px solid #c9dced;color:#14588f;background:#eaf4ff}.flash-turn .icon,.flash-grade button .icon{width:19px;height:19px}.flash-turn:hover,.flash-turn:focus-visible{outline:0;color:#fff;background:#197ee3;transform:translateY(-2px)}.flash-grade{display:flex;align-items:center;gap:9px;animation:flashGradeIn .3s ease}.flash-grade>span{margin-right:3px;color:#526a82;font-size:.68rem;font-weight:750}.flash-grade button{color:#fff;border:0}.flash-grade__wrong{background:#d85f55}.flash-grade__right{background:#08a47b}.flash-grade button:hover,.flash-grade button:focus-visible{outline:0;box-shadow:0 10px 22px rgba(8,41,66,.18);transform:translateY(-2px)}.flash-study--complete{align-items:center;text-align:center}.flash-result__icon{width:78px;height:78px;display:grid;place-items:center;margin-bottom:17px;border-radius:24px;color:#fff;background:linear-gradient(145deg,#2f80ed,#00ae88);box-shadow:0 15px 30px rgba(25,120,183,.25)}.flash-result__icon .icon{width:43px;height:43px}.flash-result__eyebrow{color:#008b72;font-size:.62rem;font-weight:850;letter-spacing:.14em;text-transform:uppercase}.flash-study--complete h3{margin-top:9px;font-size:clamp(1.65rem,3vw,2.25rem);letter-spacing:-.04em}.flash-study--complete>p{max-width:600px;margin-top:9px;color:#60758b;line-height:1.6}.flash-result__score{display:grid;grid-template-columns:repeat(3,150px);gap:13px;margin:27px 0}.flash-result__score div{display:flex;align-items:center;flex-direction:column;padding:18px;border:1px solid #d8e5f0;border-radius:17px;background:#fff;box-shadow:0 8px 20px rgba(8,41,66,.06)}.flash-result__score strong{color:#0d4e86;font-size:1.6rem}.flash-result__score span{margin-top:4px;color:#61778e;font-size:.65rem;font-weight:750}.flash-restart{border:0;cursor:pointer}@keyframes flashGradeIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}

html[data-theme="dark"] .resource-modal__shell{border-color:#294861;color:#edf6ff;background:radial-gradient(circle at 0 0,rgba(47,128,237,.17),transparent 31%),radial-gradient(circle at 100% 0,rgba(0,179,136,.13),transparent 29%),#07182c}html[data-theme="dark"] .resource-modal__header{border-color:#29445e;background:rgba(8,28,49,.94)}html[data-theme="dark"] .resource-modal__share,html[data-theme="dark"] .resource-modal__close{color:#eaf5ff;border-color:#31516c;background:#0e2b47}html[data-theme="dark"] .resource-modal__eyebrow{color:#55dfba}html[data-theme="dark"] .pdf-viewer,html[data-theme="dark"] .map-viewer,html[data-theme="dark"] .video-viewer{border-color:#294a65;background:#0c2842}html[data-theme="dark"] .modal-material__footer p{color:#afc2d4}html[data-theme="dark"] .modal-material__footer p strong{color:#edf6ff}html[data-theme="dark"] .modal-action--soft{color:#cfe7ff;border-color:#31526e;background:#123553}html[data-theme="dark"] .flash-progress>div:first-child,html[data-theme="dark"] .flash-grade>span{color:#afc2d5}html[data-theme="dark"] .flash-progress strong{color:#ffab8c}html[data-theme="dark"] .flash-progress__track{background:#183750}html[data-theme="dark"] .flash-turn{color:#dceeff;border-color:#31536f;background:#123754}html[data-theme="dark"] .flash-study--complete>p{color:#afc1d3}html[data-theme="dark"] .flash-result__score div{border-color:#2a4963;background:#0e2943}html[data-theme="dark"] .flash-result__score strong{color:#71b6ff}html[data-theme="dark"] .flash-result__score span{color:#acc0d3}
html[data-theme="dark"] .modal-material__footer--video p strong{color:#fff}

@keyframes modalEnter{from{opacity:0;transform:translateY(18px) scale(.985)}to{opacity:1;transform:none}}@keyframes backdropEnter{from{opacity:0}to{opacity:1}}
@media(max-width:800px){.resource-modal{width:calc(100vw - 18px);height:calc(100dvh - 18px);border-radius:21px}.resource-modal__shell{border-radius:21px}.resource-modal__header{align-items:flex-start;padding:13px}.resource-modal__identity{gap:10px}.resource-modal__icon{width:43px;height:43px;flex-basis:43px}.resource-modal__identity h2{max-width:48vw;font-size:1rem}.resource-modal__share{width:42px;padding:0}.resource-modal__share span{display:none}.resource-modal__content{padding:12px}.resource-modal__feedback{right:60px;top:61px}.pdf-viewer,.map-viewer{min-height:0}.modal-material__footer{align-items:stretch;flex-direction:column}.modal-material__actions{display:grid;grid-template-columns:repeat(2,1fr)}.modal-action{padding-inline:10px}.flashcard-stage{height:420px}.flashcard__face{padding:32px 25px}.flash-study__controls{align-items:stretch;flex-direction:column}.flash-grade{display:grid;grid-template-columns:repeat(2,1fr)}.flash-grade>span{grid-column:1/-1}.flash-result__score{width:100%;grid-template-columns:repeat(3,1fr)}.flash-result__score div{padding:15px 8px}.map-viewer__controls{left:10px;right:10px;bottom:10px;justify-content:center}.map-viewer__controls button{padding-inline:8px}}
@media(max-width:480px){.resource-modal__header-actions{gap:6px}.resource-modal__share,.resource-modal__close{width:39px;height:39px}.resource-modal__identity h2{max-width:43vw}.resource-modal__eyebrow{font-size:.5rem}.modal-material__actions{grid-template-columns:1fr}.flashcard-stage{height:430px}.flashcard__face h3{font-size:1.45rem}.flash-result__score{gap:7px}.flash-result__score strong{font-size:1.3rem}.modal-material__footer--video p strong{font-size:1.65rem}.modal-material__footer--video p{font-size:1rem}}
@media(prefers-reduced-motion:reduce){.resource-modal[open],.resource-modal::backdrop,.flashcard__inner,.map-viewer__canvas img{animation:none;transition:none}}
