/* Material objects are ImageGen raster sprites. CSS only positions the art. */
.achievement-badge-art,.route-glyph { display:block; width:100%; height:100%; overflow:visible; }
.route-avatar-art { display:grid; place-items:center; width:100%; height:100%; border-radius:50%; overflow:hidden; background:radial-gradient(ellipse at 35% 22%,var(--route-glow),var(--route-base) 74%); }
.route-avatar-art > .route-glyph { width:88%; height:88%; filter:drop-shadow(0 3px 3px #06132135); }
.route-material-c { --route-base:#c9c9c4; --route-glow:#fff; --route-paper:#f2f3ef; }
.route-material-n { --route-base:#193f27; --route-glow:#a2c485; --route-paper:#eaf1e3; }
.route-material-r { --route-base:#271133; --route-glow:#9971a5; --route-paper:#efe7f2; }
.route-material-sr { --route-base:#9f3f08; --route-glow:#ffcc7e; --route-paper:#fff0d8; }
.route-material-ssr { --route-base:#362813; --route-glow:#d3b975; --route-paper:#f6edd4; }
.route-material-ur { --route-base:#29304d; --route-glow:#d5d6f4; --route-paper:#e9edf8; }
.route-material-lr { --route-base:#3b3553; --route-glow:#d6efd9; --route-paper:#f3eaf5; }
.route-frame-layer .cosmetic-frame-piece { transform:none; }
.route-frame-layer.frame-restrained { --frame-corner:10px; }
.route-frame-layer.frame-elaborate { --frame-corner:16px; }
.route-frame-layer .cosmetic-frame-ornament { object-fit:contain; }
.route-frame-layer.frame-restrained .cosmetic-frame-ornament { width:16px; height:16px; }
.route-fill-layer { background:var(--route-paper); opacity:1; isolation:isolate; }
.route-fill-scene { position:absolute; inset:0; width:100%; height:100%; display:block; overflow:hidden; }
.route-fill-finish { position:absolute; inset:0; pointer-events:none; }
.route-fill-layer.route-material-c .route-fill-scene { filter:grayscale(1); opacity:.25; }
.route-fill-layer.route-material-n { background:#bad2a8; }
.route-fill-layer.route-material-n .route-fill-scene { filter:grayscale(1) contrast(.86); mix-blend-mode:luminosity; opacity:.46; }
.route-fill-layer.route-material-r { background:#b399c0; }
.route-fill-layer.route-material-r .route-fill-scene { filter:grayscale(1) contrast(.95); mix-blend-mode:luminosity; opacity:.60; }
.route-fill-layer.route-material-r .route-fill-finish { background:repeating-linear-gradient(3deg,#2d143008 0 1px,transparent 1px 3px); }
.route-fill-layer.route-material-sr { background:#edb76f; }
.route-fill-layer.route-material-sr .route-fill-scene { filter:sepia(.6) saturate(.6); mix-blend-mode:luminosity; opacity:.70; }
.route-fill-layer.route-material-sr .route-fill-finish { background:linear-gradient(140deg,#ffe8ae60,transparent 40%,#fff1cf60 48%,transparent 58%); }
.route-fill-layer.route-material-ssr .route-fill-scene { filter:saturate(.85); opacity:.95; }
.route-fill-layer.route-material-ur .route-fill-finish { background:linear-gradient(132deg,transparent 20%,#a4c9ff60 21%,transparent 39%,#eef9ff99 40%,transparent 44%,#c6b7ff55 65%,transparent 67%); mix-blend-mode:screen; }
.route-fill-layer.route-material-lr .route-fill-finish { background:linear-gradient(120deg,#ff758c80,#ffd56b80,#aaf5c980,#8bc7ff80,#c29eff80,#ff9adc80); mix-blend-mode:color; }
.slot-cell > .route-fill-layer { opacity:1; }
.slot-cell:has(> .route-frame-layer) .slot-primary { z-index:4; }
.slot-cell:has(> .route-frame-layer.route-material-ssr) { z-index:6; }
.slot-cell:has(> .route-frame-layer.route-material-ur) { z-index:7; }
.slot-cell:has(> .route-frame-layer.route-material-lr) { z-index:8; }
.slot-cell.slot-ended:has(> .route-frame-layer) { z-index:1; }
.slot-cell.booked.slot-ended > .route-fill-layer { opacity:.24; }
.order-entry-pass > .route-fill-layer { height:42%; aspect-ratio:auto; opacity:.75; }

.participant-member-card .participant-style-sash > .route-fill-layer { background:var(--route-base); }
.participant-member-card:has(.route-fill-layer) { background:linear-gradient(110deg,#101824,#202e41 68%,#405372); }
.participant-member-card:has(.route-fill-layer.route-material-n) { background:linear-gradient(110deg,#111d20,#192c25 68%,#3b5141); }
.participant-member-card:has(.route-fill-layer.route-material-r) { background:linear-gradient(110deg,#161822,#251e35 68%,#48325c); }
.participant-member-card:has(.route-fill-layer.route-material-sr) { background:linear-gradient(110deg,#181d23,#30261e 68%,#634630); }
.participant-member-card:has(.route-fill-layer.route-material-ssr) { background:linear-gradient(110deg,#171b20,#302c20 68%,#605030); }
.participant-member-card:has(.route-fill-layer.route-material-ur) { background:linear-gradient(110deg,#171d2d,#272941 68%,#535676); }
.participant-member-card:has(.route-fill-layer.route-material-lr) { background:linear-gradient(110deg,#171e2e,#242a42 68%,#514f6f); }
.order-entry-pass:has(> .route-fill-layer) { background:#f5f2e9; --hourglass-surface:#f5f2e9; }

.participant-member-card > .route-frame-layer { --frame-corner:20px; }
.participant-member-card:has(> .route-frame-layer.frame-contained) .participant-card-bio { left:22px; }
.room-participant-seat > .route-frame-layer { --frame-corner:12px; }
/* The ring and motif have their own clipped SVG windows and square canvases. */
[class*="avatar-frame-fr-r"] { position:relative; border-radius:50%; }
[class*="avatar-frame-fr-r"]::before,[class*="avatar-frame-fr-r"]::after { content:none; }
.route-avatar-frame { position:absolute; inset:-10%; z-index:2; pointer-events:none; display:block; overflow:visible; }
.route-avatar-frame > .route-material-ring { position:absolute; inset:0; width:100%; height:100%; display:block; overflow:hidden; }
.route-avatar-frame > .route-avatar-ornament { position:absolute; width:42%; height:42%; left:-8%; top:-8%; overflow:hidden; filter:drop-shadow(0 1px 1px #071b3040); }
.route-avatar-frame.is-restrained > .route-avatar-ornament { width:26%; height:26%; left:0; top:0; }
.route-avatar-frame.route-material-lr > .route-material-ring,.route-glyph.is-lr { animation:cosmetic-lr-spectrum 5s linear infinite; }
.route-frame-layer.is-lr .route-glyph.is-lr { animation:none; }
/* All four corners mirror one source corner; all rails meet its same edge. */
.route-frame-layer .frame-tl { transform:scaleX(-1); }
.route-frame-layer .frame-l { transform:scaleX(-1); }
.route-frame-layer .frame-bl { transform:scale(-1,-1); }
.route-frame-layer .frame-b,.route-frame-layer .frame-br { transform:scaleY(-1); }
/* A host's radius follows its rail corner rather than clipping an unrelated arc. */
:is(.member-slot-preview,.slot-cell,.room-participant-seat):has(> .route-frame-layer) { border-radius:8px; }
.route-frame-layer .cosmetic-frame-rails { border-radius:0; overflow:visible; }
.route-frame-layer.frame-contained { border-radius:8px; }
.participant-member-card:has(> .route-frame-layer) { border-radius:10px; }
.order-entry-pass:has(> .route-frame-layer) { border-radius:14px; }
.participant-member-card > .route-frame-layer { border-radius:10px; }
.order-entry-pass > .route-frame-layer { border-radius:14px; }
.participant-member-card:has(> .route-frame-layer) .participant-card-kicker { top:20px; left:22px; }
.participant-member-card:has(> .route-frame-layer) .participant-card-bio { bottom:23px; }
.participant-member-card:has(> .route-frame-layer) .participant-like-button { bottom:19px; right:22px; }
@media (prefers-reduced-motion:reduce) {
 .route-avatar-frame.route-material-lr > .route-material-ring,.route-glyph.is-lr { animation:none; }
}

/* Finish and substrate stay visible at each size; no decorated cell opacity wash. */
.slot-cell:has(> .route-fill-layer) > .route-fill-layer { opacity:1; }
.slot-cell.booked.slot-ended:has(> .route-fill-layer) > .route-fill-layer { opacity:.24; }
.participant-member-card .participant-style-sash:has(> .route-fill-layer) { opacity:.65; }
.member-slot-preview:has(> .route-fill-layer) > strong { z-index:4; background:none; padding:0; color:#163b50; text-shadow:0 0 3px #fff,0 0 6px #fff,0 0 10px #fff; }

/* Route identity artwork: no generic ring, no badge pasted onto a frame. */
.route-portrait-scene { display:block; width:100%; height:100%; overflow:hidden; }
.route-avatar-art { position:relative; background:transparent; }
.route-portrait-finish { position:absolute; inset:0; pointer-events:none; border-radius:inherit; }
.route-identity-frame { inset:-9%; }
.route-identity-frame .route-material-ring { overflow:hidden; }
.route-material-n .route-identity-object,.route-material-n .route-frame-image { filter:sepia(.8) saturate(.55) hue-rotate(55deg); }
.route-material-r .route-identity-object,.route-material-r .route-frame-image { filter:sepia(.7) saturate(.8) hue-rotate(230deg); }
.route-material-sr .route-identity-object,.route-material-sr .route-frame-image { filter:sepia(.45) saturate(1.3); }
.route-material-ur .route-identity-object,.route-material-ur .route-frame-image { filter:grayscale(.4) brightness(1.13); }
.route-material-lr .route-identity-object,.route-material-lr .route-frame-image { filter:brightness(1.15) saturate(1.2); }
.route-avatar-art.route-material-n .route-portrait-scene { filter:saturate(.6); }
.route-avatar-art.route-material-r .route-portrait-finish { background:linear-gradient(145deg,#c48bec35,transparent 60%); }
.route-avatar-art.route-material-sr .route-portrait-finish { background:linear-gradient(145deg,#ffbe6635,transparent 60%); }
.route-avatar-art.route-material-ur .route-portrait-finish { background:linear-gradient(130deg,#b2e8ff40,transparent 45%,#d6beff40); }
.route-avatar-art.route-material-lr .route-portrait-finish { background:linear-gradient(120deg,#ff829560,#ffcf7160,#9eeeba60,#81c9ff60,#b09cff60,#efa0df60); mix-blend-mode:color; animation:cosmetic-lr-spectrum 5s linear infinite; }
.route-authored-frame > .cosmetic-frame-rails {
 display:grid; overflow:visible;
 grid-template-columns:calc(var(--frame-corner) * var(--source-corner-ratio)) minmax(0,1fr) min(calc(var(--frame-corner) * var(--source-crest-ratio)),32%) minmax(0,1fr) calc(var(--frame-corner) * var(--source-corner-ratio));
 grid-template-rows:var(--frame-corner) minmax(0,1fr) calc(var(--frame-corner) * var(--source-side-ratio)) minmax(0,1fr) var(--frame-corner);
}
.route-frame-segment { display:block; min-width:0; min-height:0; overflow:hidden; }
.route-frame-image { display:block; width:100%; height:100%; overflow:hidden; }
.route-authored-frame.frame-restrained { --frame-corner:12px; }
.route-authored-frame.frame-elaborate { --frame-corner:16px; }
:is(.slot-cell,.member-slot-preview) > .route-authored-frame.frame-inside { inset:2px; }
:is(.slot-cell,.member-slot-preview) > .route-authored-frame.frame-edge { inset:0; }
:is(.slot-cell,.member-slot-preview) > .route-authored-frame.frame-outside { inset:-4px; }
.member-slot-preview > .route-authored-frame { --frame-corner:12px; }
.hourglass-reward-preview .member-slot-preview > .route-authored-frame { --frame-corner:14px; }
.slot-cell:has(> .cosmetic-fill-layer) > .slot-primary { background:none; padding:0; text-shadow:0 0 3px #fff,0 0 6px #fff,0 0 10px #fff; }
.participant-member-card:has(> .cosmetic-frame-layer) { border-radius:8px; }
.participant-member-card > .cosmetic-frame-layer,
.participant-member-card > .cosmetic-frame-layer.frame-contained { inset:-8px; overflow:visible; --frame-corner:20px; }
.participant-member-card > .route-authored-frame { --frame-corner:22px; }
.participant-member-card:has(> .cosmetic-frame-layer) .participant-card-kicker { top:17px; left:20px; }
.participant-member-card:has(> .cosmetic-frame-layer) .participant-card-bio { left:20px; bottom:18px; }
.participant-member-card:has(> .cosmetic-frame-layer) .participant-like-button { bottom:14px; right:19px; }
.order-entry-pass > .route-authored-frame { --frame-corner:28px; }
.room-participant-seat > .route-authored-frame { --frame-corner:13px; }
.season-pedestal-number { font-family:Georgia,serif; font-weight:700; fill:#263a42; stroke:#fff5d2; stroke-width:.8px; paint-order:stroke fill; }
@media(prefers-reduced-motion:reduce) {
 .route-avatar-art.route-material-lr .route-portrait-finish { animation:none; }
}

/* Keep 96% of the portrait diameter unobstructed, including elaborate crests.
   The mask only affects the decoration; the avatar below remains untouched. */
.route-identity-frame { inset:-20%; }
.route-identity-frame,
[class*="avatar-frame-fr"]::after {
 -webkit-mask-image:radial-gradient(circle closest-side,transparent 68.5%,#000 69.5%);
 mask-image:radial-gradient(circle closest-side,transparent 68.5%,#000 69.5%);
}

.route-fill-layer.route-material-lr > .route-fill-finish { animation:cosmetic-lr-spectrum 5s linear infinite; }
@media(prefers-reduced-motion:reduce) {
 .route-fill-layer.route-material-lr > .route-fill-finish { animation:none; }
}
