/* Cosmetic refinement: existing artwork and palette, no extra image downloads. */
body.cosmic-reading,body:has(.portrait-result),body:has(#arena){
 background-color:#111b2c;
 background-image:linear-gradient(180deg,#14233975,#14203580 65%,#111b2cb3),url('/assets/sky/reading-nebulae-v2.webp');
}
body .hd-intro{background:linear-gradient(125deg,#223447f5,#182438f5);border-color:#cfb88b66;box-shadow:inset 0 1px #fff1,0 12px 32px #07101d40;backdrop-filter:none;-webkit-backdrop-filter:none}
body .guest-shortcuts{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
body .sky-unified{padding-inline:clamp(12px,2vw,22px);box-sizing:border-box}
body .sky-about,body .sky-more-symbols{border-color:#b9c9d533}
body .sky-about>summary,body .sky-more-symbols>summary{padding:8px 0;color:#e7dfd1;line-height:1.5}
body .rubi-guide-entry{box-shadow:inset 0 1px #fff1,0 12px 32px #07101d38}
body .rubi-guide-entry textarea,body .rubi-conversation textarea{border-color:#a9bbcba6;box-shadow:inset 0 2px 5px #09182b26}
body .rubi-guide-entry textarea::placeholder,body .rubi-conversation textarea::placeholder{color:#c0cbd6;opacity:1}
/* Labels inside the ivory full-card must not inherit dark-page cream ink. */
body .hd-story-offer .sky-connections{background:#fffaf366;border-color:#a88c6866}
body .hd-story-offer .sky-connections label,body .hd-story-offer .sky-connections>summary,
body .hd-story-offer .sky-save-actions label,body .hd-story-offer .sky-saved-composites>summary{color:#34475b;-webkit-text-fill-color:#34475b}
body .hd-story-offer input,body .hd-story-offer select{color:#fff2df;-webkit-text-fill-color:#fff2df;background:#21394f}
body .hd-story-offer input::placeholder{color:#c8d1da;-webkit-text-fill-color:#c8d1da;opacity:1}
body .hd-story-offer a:not(.portrait-button){color:#763b50;-webkit-text-fill-color:#763b50;text-underline-offset:.2em}
body .rubi-wallet{scroll-margin-top:24px;margin-top:32px;border-color:#c5a68c;background:linear-gradient(130deg,#2c4358,#393348);box-shadow:0 8px 24px #07101d30}
body .rubi-wallet>summary{font-weight:600;color:#f6dfb3;padding:4px 0}
body .rubi-wallet[open]>summary{margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid #e4cba533}
body .rubi-plan-grid{grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr))}
body .rubi-profile-action,body .rubi-profile-action:visited{color:#ffe1a1!important;-webkit-text-fill-color:#ffe1a1;text-decoration:underline;text-underline-offset:.2em;font-weight:650}
body .rubi-profile-action:focus-visible{outline:3px solid #afe4e9;outline-offset:4px}
/* Account and sign-in share the soft palette without downloading the nebula. */
body.portal-account-page{background:radial-gradient(ellipse at top left,#273d50 0,transparent 65%),#142235;color:#f6efdf}
.portal-account-page section,.portal-account-page main>details{border:1px solid #bda99a77;border-radius:20px;box-shadow:inset 0 1px #fff1,0 10px 28px #09132130}
.portal-account-page main>details{padding:18px;background:#25364b}
.portal-account-page a{color:#f4d79f;text-underline-offset:.2em}
.portal-account-page button,.portal-account-page a.action{box-shadow:0 3px 10px #09152226;transition:filter .15s,box-shadow .15s}
.portal-account-page :is(button,a,input,summary):focus-visible{outline:3px solid #b7e6ed;outline-offset:3px}
.portal-account-page input::placeholder{color:#c0cbd6;opacity:1}
.portal-account-page summary{cursor:pointer;line-height:1.6}
@media(max-width:600px){body .sky-unified{padding-inline:8px}body .rubi-wallet{padding:14px;scroll-margin-top:12px}.portal-account-page main{margin:24px auto}}
@media(prefers-reduced-motion:reduce){.portal-account-page button,.portal-account-page a.action{transition:none}}

/* Gold action buttons need dark ink, including visited links in iOS. */
body.portal-account-page a.action,body.portal-account-page a.action:visited,body.portal-account-page a.action:hover,body.portal-account-page a.action:active{color:#182a3d;-webkit-text-fill-color:#182a3d;}

/* Centre/channel explanations nested in the ivory reading card. */
body .sky-unified .hd-story-offer .sky-symbol-detail{background:#fff8ed;color:#293747;border-color:#baa079;padding:20px 48px 20px 18px;box-shadow:0 8px 22px #493a2520;}
body .sky-unified .hd-story-offer .sky-symbol-detail :is(h4,p,strong,small,summary){color:#293747!important;-webkit-text-fill-color:#293747;opacity:1;}
body .sky-unified .hd-story-offer .sky-symbol-detail .sky-detail-close{background:transparent;color:#293747;-webkit-text-fill-color:#293747;}

/* Individually bounded atlas art: keep adjacent-cell fragments out of HTML and SVG. */
img[src*="/sigils/symbol-4."],image[href*="/sigils/symbol-4."]{clip-path:inset(0 0 3% 0) fill-box;}
img[src*="/sigils/symbol-5."],image[href*="/sigils/symbol-5."]{clip-path:polygon(0 0,100% 0,100% 100%,55% 100%,55% 87%,40% 87%,40% 100%,0 100%) fill-box;}
img[src*="/sigils/symbol-8."],image[href*="/sigils/symbol-8."]{clip-path:inset(0 0 10% 0) fill-box;}
img[src*="/sigils/symbol-9."],image[href*="/sigils/symbol-9."]{clip-path:inset(0 0 9% 0) fill-box;}
img[src*="/sigils/symbol-10."],image[href*="/sigils/symbol-10."]{clip-path:inset(0 0 9% 0) fill-box;}
img[src*="/sigils/channel-6."],image[href*="/sigils/channel-6."]{clip-path:inset(6% 0 0 0) fill-box;}
img[src*="/sigils/channel-7."],image[href*="/sigils/channel-7."]{clip-path:inset(7% 0 0 0) fill-box;}
img[src*="/sigils/channel-8."],image[href*="/sigils/channel-8."]{clip-path:inset(5% 0 0 0) fill-box;}
img[src*="/sigils/channel-9."],image[href*="/sigils/channel-9."]{clip-path:inset(3% 0 0 0) fill-box;}
img[src*="/sigils/channel-10."],image[href*="/sigils/channel-10."]{clip-path:inset(4% 3% 0 0) fill-box;}
img[src*="/sigils/channel-12."],image[href*="/sigils/channel-12."]{clip-path:inset(14% 0 0 0) fill-box;}
img[src*="/sigils/channel-13."],image[href*="/sigils/channel-13."]{clip-path:inset(5% 0 0 6%) fill-box;}
img[src*="/sigils/channel-15."],image[href*="/sigils/channel-15."]{clip-path:inset(2% 0 0 0) fill-box;}
img[src*="/sigils/channel-16."],image[href*="/sigils/channel-16."]{clip-path:inset(5% 0 0 0) fill-box;}
img[src*="/sigils/channel-17."],image[href*="/sigils/channel-17."]{clip-path:inset(2% 0 0 0) fill-box;}
img[src*="/sigils/channel-20."],image[href*="/sigils/channel-20."]{clip-path:inset(5% 0 0 0) fill-box;}
img[src*="/sigils/channel-21."],image[href*="/sigils/channel-21."]{clip-path:inset(0 0 0 3%) fill-box;}
img[src*="/sigils/channel-22."],image[href*="/sigils/channel-22."]{clip-path:inset(3% 3% 0 0) fill-box;}
img[src*="/sigils/channel-24."],image[href*="/sigils/channel-24."]{clip-path:inset(3% 0 9% 0) fill-box;}
img[src*="/sigils/channel-25."],image[href*="/sigils/channel-25."]{clip-path:inset(3% 0 9% 0) fill-box;}
img[src*="/sigils/channel-26."],image[href*="/sigils/channel-26."]{clip-path:inset(0 0 9% 0) fill-box;}
img[src*="/sigils/channel-27."],image[href*="/sigils/channel-27."]{clip-path:polygon(0 0,100% 0,100% 100%,75% 100%,75% 88%,49% 88%,49% 100%,0 100%) fill-box;}
img[src*="/sigils/channel-28."],image[href*="/sigils/channel-28."]{clip-path:inset(5% 0 12% 0) fill-box;}
img[src*="/sigils/channel-29."],image[href*="/sigils/channel-29."]{clip-path:inset(0 0 8% 10%) fill-box;}
img[src*="/sigils/channel-33."],image[href*="/sigils/channel-33."]{clip-path:inset(0 0 0 5%) fill-box;}

/* Portal craft pass: compact, original pictograms and readable disclosures. */
body .portrait-result .quest-facet{border:1px solid #b9a48a55;border-radius:18px;background:linear-gradient(115deg,#243649,#192a3d);box-shadow:inset 0 1px #fff1,0 6px 18px #07101b24;overflow:hidden}
body .portrait-result .quest-facet summary{display:flex;align-items:center;gap:16px;min-height:76px;padding:14px 18px;list-style:none;cursor:pointer}
body .portrait-result .quest-facet summary::-webkit-details-marker{display:none}
body .portrait-result .quest-facet summary::after{content:'';width:8px;height:8px;flex:none;margin-left:auto;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);transition:transform .18s}
body .portrait-result .quest-facet[open] summary::after{transform:rotate(225deg)}
body .portrait-result .quest-facet summary h4{font:600 clamp(17px,2.2vw,22px)/1.35 system-ui;margin:0;color:var(--facet-color);overflow-wrap:anywhere}
body .portrait-result .quest-facet-icon{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;background:none;box-shadow:none;filter:none;color:var(--facet-color);font-size:0}
body .portrait-result .quest-facet-icon svg{display:block;width:44px;height:44px;filter:none}
body .portrait-result .quest-facet summary:focus-visible{outline:2px solid #b4d9df;outline-offset:-4px}
@media(hover:hover){body .portrait-result .quest-facet summary:hover{background:#ffffff08}}
body .portrait-result .portrait-actions{display:flex;gap:10px;padding:16px;border:1px solid #b9a48a44;border-radius:18px;background:#14263a}
body .portrait-result .portrait-actions .portrait-button{flex:1 1 140px;margin:0;border-radius:12px;min-height:48px;font-size:15px;box-shadow:inset 0 1px #fff2,0 3px 9px #07101b25}
body .portrait-result .portrait-actions .portrait-button:first-child{background:linear-gradient(120deg,#e7cf9b,#cfb47d);color:#15283a}
body .portrait-result .portrait-actions .portrait-button:active{transform:translateY(1px)}
body .rubi-guide-entry .rubi-consent{padding:12px 0;margin:16px 0;border:0;border-block:1px solid #c5a9b233;border-radius:0;background:transparent}
body .rubi-guide-entry .rubi-consent .rubi-option,body .rubi-guide-entry .rubi-storage-option,body .rubi-guide-entry .rubi-beta-details .rubi-option{font-size:14px;line-height:1.55;gap:10px}
body .rubi-guide-entry .rubi-consent-details,body .rubi-guide-entry .rubi-beta-details{padding:0;margin:8px 0;border:0;border-radius:0;background:transparent;box-shadow:none}
body .rubi-guide-entry .rubi-consent-details summary,body .rubi-guide-entry .rubi-beta-details summary{font:400 14px/1.5 system-ui;color:#d4dce7;padding:8px 0;min-height:36px;cursor:pointer;letter-spacing:0}
body .rubi-guide-entry .rubi-consent-details p,body .rubi-guide-entry .rubi-beta-details p{font-size:14px;line-height:1.55}
body .rubi-guide-entry .rubi-beta-details[open]{padding-bottom:12px}
body .rubi-guide-entry .rubi-option input[type=checkbox]{flex:none;width:20px;height:20px;margin-top:2px;accent-color:#d3a4b1}
@media(max-width:480px){body .portrait-result .quest-facet summary{padding:12px;gap:12px;min-height:68px}body .portrait-result .quest-facet-icon{flex-basis:40px;width:40px;height:40px}body .portrait-result .quest-facet-icon svg{width:38px;height:38px}}
@media(prefers-reduced-motion:reduce){body .portrait-result .quest-facet summary::after{transition:none}}
