:root{color-scheme:dark;--portal-accent:#c8ad78;--portal-surface:#151d20;--portal-line:#c8ad7833}
html{scroll-behavior:smooth;scroll-padding-top:78px}
body[data-character=rapunzel]{--portal-accent:#b3bce7;--portal-surface:#151b2d;--portal-line:#b3bce738}
body[data-character=vulcan]{--portal-accent:#e8ac77;--portal-surface:#261a18;--portal-line:#e8ac7738}
body[data-character=lekron]{--portal-accent:#c1abd8;--portal-surface:#1a1823;--portal-line:#c1abd838}
body[data-character=bectapum]{--portal-accent:#bad2a8;--portal-surface:#17241e;--portal-line:#bad2a838}
.player-head h1{font-family:Georgia,serif;font-weight:400;letter-spacing:.015em}
.portal-bar{position:sticky;top:0;z-index:12;display:flex;align-items:center;gap:12px;margin:20px 0 28px;padding:7px;background:var(--portal-surface);border:1px solid var(--portal-line);border-radius:12px;box-shadow:0 8px 30px #0004}
.portal-tabs{display:flex;gap:4px;flex:1;min-width:0}.portal-bar button{display:flex;align-items:center;justify-content:center;gap:8px;font:600 14px/1.4 system-ui,sans-serif;border:0;border-radius:8px;padding:12px 18px;color:#c4c6c2;background:transparent;cursor:pointer}
.portal-bar svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.portal-tabs button[aria-selected=true]{color:var(--portal-accent);background:#ffffff0d;box-shadow:inset 0 -2px var(--portal-accent)}
.portal-bar button:hover{background:#ffffff12}.portal-bar .portal-sound{padding:10px;font-size:12px}.portal-sound[aria-pressed=false]{opacity:.58}.portal-sound[aria-pressed=false] svg{transform:rotate(-12deg)}
.portal-view{min-width:0;animation:portal-enter .28s ease both}.portal-view[hidden]{display:none!important}
.portal-heading{margin:0 0 24px}.portal-heading small{font:600 10px/1.5 system-ui,sans-serif;letter-spacing:.19em;text-transform:uppercase;color:var(--portal-accent)}
.portal-heading h2{margin:8px 0 10px;color:#f0e7d7;font:400 clamp(1.8rem,5vw,2.8rem)/1.15 Georgia,serif}.portal-heading p{font-size:15px;line-height:1.6;color:#bec3bb}
.sheet-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.sheet-modes,.sheet-page-tabs{display:flex;gap:6px;flex-wrap:wrap}
.sheet-modes button,.sheet-page-tabs button,.portal-primary{padding:11px 15px;border:1px solid var(--portal-line);border-radius:8px;background:var(--portal-surface);color:#ded9cc;font:600 13px/1.4 system-ui,sans-serif;cursor:pointer;text-decoration:none;min-height:42px}
.sheet-modes button[aria-pressed=true],.sheet-page-tabs button[aria-pressed=true]{background:var(--portal-accent);color:#17201e;border-color:var(--portal-accent)}
.portal-primary:hover{border-color:var(--portal-accent);color:var(--portal-accent)}.sheet-reference{font:12px/1.7 system-ui,sans-serif;color:#b4b7ac;max-width:75ch;margin:16px 0}
.sheet-notes{border-left:2px solid var(--portal-line);padding:8px 14px;margin:15px 0 20px;color:#c3c6ba;font-size:13px;line-height:1.6}.sheet-notes summary{cursor:pointer;color:var(--portal-accent)}
.sheet-page-tabs{margin:20px 0 12px}.sheet-art{margin:0 auto 32px;max-width:880px}.sheet-art img{display:block;width:100%;height:auto}.sheet-art figcaption{font:12px/1.6 system-ui,sans-serif;color:#a6ac9e;text-align:center;margin:12px 0}
.sheet-save{min-height:26px;display:flex;align-items:center;gap:12px;margin-top:12px;color:var(--portal-accent);font:600 12px/1.4 system-ui,sans-serif}.sheet-save .sheet-save-now{padding:5px 8px;min-height:0}
.sheet-paper{position:relative;container-type:inline-size;box-shadow:0 18px 45px #0005;color-scheme:light}
.sheet-field-layer{position:absolute;inset:0;--ink:#271d1b}
.sheet-input{box-sizing:border-box;min-width:0;text-align:center;font-family:Arial,sans-serif}
.sheet-field-layer .sheet-input{position:absolute;display:block;margin:0;padding:0 .15cqw;border:0;border-radius:0;color:var(--ink);background:transparent;box-shadow:none;font-size:var(--field-size);line-height:1.2}
.sheet-field-layer .sheet-input:is(:hover,:focus){outline:1px solid #664c45a0;outline-offset:0;background:#fff9e740;z-index:1}
.sheet-field-layer textarea.sheet-input{padding:.35cqw .5cqw;resize:none;scrollbar-width:thin;overflow-wrap:anywhere}
.sheet-field-layer input[type=checkbox]{appearance:none;cursor:pointer;border:1px solid #51383186;border-radius:50%;padding:0}
.sheet-field-layer input[type=checkbox]:checked{background:radial-gradient(circle,var(--ink) 53%,transparent 58%)}
.sheet-field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:8px 12px}
.sheet-field-row{min-width:0;display:flex;flex-direction:column;gap:6px;padding:10px 12px;border:1px solid var(--portal-line);border-radius:7px;background:var(--portal-surface);font:12px/1.5 system-ui,sans-serif;color:#dfd9cb}
.sheet-field-row.area{grid-column:1/-1}.sheet-field-row.check{flex-direction:row;align-items:center;justify-content:space-between}
.sheet-field-row .sheet-input:not([type=checkbox]){width:100%;padding:8px;border:1px solid var(--portal-line);border-radius:4px;color:#f6ecda;background:#0003;font-size:16px}
.sheet-field-row textarea.sheet-input{min-height:7em;resize:vertical}.sheet-field-row textarea[data-field=historia]{min-height:18em}
.sheet-field-row input[type=checkbox]{width:20px;height:20px;margin:0;accent-color:var(--portal-accent)}
.sheet-rules h3{font:400 22px/1.2 Georgia,serif;color:var(--portal-accent);margin:0 0 20px}
.sheet-rules{margin:28px 0}.sheet-rules details{border-top:1px solid var(--portal-line);padding:15px 0;font:14px/1.7 system-ui,sans-serif}.sheet-rules summary{cursor:pointer;color:#e5dfcf}.sheet-rules small{display:block;color:var(--portal-accent);margin-top:12px}
.portal-chapter{margin:0 0 12px;border:1px solid var(--portal-line);border-radius:12px;background:var(--portal-surface);overflow:hidden}.portal-chapter>summary{list-style:none;display:grid;grid-template-columns:40px 1fr auto;align-items:center;gap:12px 16px;padding:20px 24px;cursor:pointer}.portal-chapter>summary::-webkit-details-marker{display:none}.portal-chapter>summary::after{content:'+';color:var(--portal-accent);grid-column:3;grid-row:1}.portal-chapter[open]>summary::after{content:'−'}.chapter-number{font:26px/1 Georgia,serif;color:var(--portal-accent)}.chapter-heading{font:400 20px/1.3 Georgia,serif;color:#ede4d4}.chapter-date{grid-column:2;font:11px/1.5 system-ui,sans-serif;color:#aab5a7;margin-top:-6px}
.chapter-body{padding:8px clamp(18px,4vw,44px) 30px;border-top:1px solid var(--portal-line);color:#dedfd3}.chapter-body h3{font:400 22px/1.3 Georgia,serif;color:var(--portal-accent);margin:28px 0 16px}.chapter-body ul{padding-left:20px;margin:0}.chapter-body li{padding:0 0 16px 6px;font:16px/1.85 Georgia,serif}.chapter-body li::marker{color:var(--portal-accent)}.chapter-intro{font:italic 18px/1.8 Georgia,serif;color:#d6d2be}
.portal-loading{padding:40px 0;color:var(--portal-accent)}.portal-view :focus-visible,.portal-bar :focus-visible{outline:2px solid var(--portal-accent);outline-offset:3px}
@keyframes portal-enter{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
@media(max-width:600px){.portal-bar{gap:2px;margin:18px 0 24px;padding:5px;border-radius:10px}.portal-bar button{gap:5px;padding:12px 8px;font-size:12px}.portal-tabs{justify-content:space-between}.portal-bar .portal-sound span{display:none}.portal-bar .portal-sound{min-width:36px}.portal-bar svg{width:17px;height:17px}.sheet-reading{grid-template-columns:1fr}.sheet-toolbar .portal-primary{text-align:center;width:100%;box-sizing:border-box}.portal-chapter>summary{padding:18px 16px;gap:10px;grid-template-columns:32px 1fr auto}.chapter-heading{font-size:18px}.chapter-body li{font-size:16px;line-height:1.75}.sheet-page-tabs button{flex:1;padding:10px 8px}.sheet-reading-block{padding:18px}}
@media(max-width:350px){.portal-tabs svg{display:none}.portal-bar button{padding-inline:6px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}
.portal-attack-list{display:grid;gap:.65rem;margin-top:1rem}
.portal-attack-list.is-cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr));align-items:start}
.portal-attack{--accent:#d2a067;border:1px solid var(--accent);border-radius:.65rem;overflow:hidden;background:#161819;color:#f4ead8}
.portal-attack.adicional{--accent:#7db694}
.portal-attack.reaccion{--accent:#a19ad5}
.portal-attack summary{cursor:pointer;padding:.65rem .85rem}
.portal-attack summary small{color:var(--accent);display:block}
.portal-attack summary strong{display:block;font-size:1.05rem}
.portal-attack summary span{display:block;font-size:.82rem}
.portal-attack summary img{display:block;width:100%;height:8rem;object-fit:contain;margin:.35rem auto}
.is-cards .portal-attack{border-width:3px;background:radial-gradient(ellipse at 50% 40%,#393332,#19191b 65%)}
.portal-attack-detail{padding:.2rem .85rem .65rem;font-size:.87rem}
.portal-attack-detail p{margin:.35rem 0}
