/* The concept's three materials share one semantic, responsive game interface. */
.rift-shell{
 --trim:#c3a060;--trim-light:#f0d49b;--trim-dark:#62451f;--wood:#2b1b11;--panel:#241c13;--ink:#38291b;--paper:#e7d2a5;--paper-light:#f2e3c2;--copy:#f6e6be;--muted:#d3bc91;--accent:#134f45;--accent-light:#a8edce;--scene:url('/riftwalkers/art/guild-courtyard.png');--frame:linear-gradient(100deg,#2b180e,#50331e 45%,#28170d);
 color:var(--copy);font-family:Georgia,'Times New Roman',serif;background:var(--frame);border:3px double var(--trim);border-radius:2px;box-shadow:0 0 0 3px #100d09,0 16px 60px #0009,inset 0 0 30px #000a;
}
.rift-shell[data-theme=riftforge]{--wood:#181b1c;--panel:#141b1c;--paper:#d6c399;--paper-light:#e7d7b6;--ink:#292a21;--accent:#174d4c;--accent-light:#9ce8dc;--scene:url('/riftwalkers/art/riftforge-chronicle.png');--frame:linear-gradient(110deg,#161b1c,#343939 42%,#111718)}
.rift-shell[data-theme=arcane]{--wood:#081527;--panel:#08182c;--paper:#0c233b;--paper-light:#102c47;--ink:#f0e2bf;--accent:#123f60;--accent-light:#abe7ff;--copy:#f1e6cb;--muted:#b9d3e5;--scene:url('/riftwalkers/art/arcane-command.png');--frame:linear-gradient(110deg,#041126,#102b46 42%,#041128)}
.rift-shell.rift-playing{height:min(1050px,calc(100dvh - 24px));min-height:0;max-width:1120px;margin:12px auto;grid-template-rows:54px minmax(0,1fr);padding:0!important;overflow:hidden}
.rift-shell.rift-playing #rift-root{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(180px,1.35fr) minmax(230px,1fr)!important;gap:0;overflow:hidden;min-height:0}
.rift-shell.rift-playing .rift-hud,.rift-shell.rift-playing .rift-expedition-trail{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;margin:0}
.rift-shell .rift-toolbar{background:var(--frame);border-bottom:3px double var(--trim);color:var(--trim-light);gap:8px;display:flex;align-items:center;padding:4px 14px!important;min-height:0;position:relative;isolation:isolate}
.rift-shell .rift-toolbar::after{content:'';position:absolute;inset:4px;border:1px solid #c7a16255;pointer-events:none;z-index:-1;clip-path:polygon(0 0,100% 0,100% 100%,0 100%,0 0,10px 10px,10px calc(100% - 10px),calc(100% - 10px) calc(100% - 10px),calc(100% - 10px) 10px,10px 10px)}
.rift-shell .rift-toolbar>a{font-size:0;width:28px;flex:none;min-height:36px;display:grid;place-items:center;color:var(--trim-light)}.rift-shell .rift-toolbar>a::before{content:'←';font-size:23px}
.rift-shell .rift-toolbar>strong{font:600 clamp(16px,2vw,23px)/1 Georgia,serif;letter-spacing:1.2px;text-shadow:0 2px 2px #000;margin:0 auto 0 0;white-space:nowrap}.rift-shell .rift-toolbar>strong small{font:10px/1.5 Georgia,serif;letter-spacing:1px;color:var(--muted);display:block;margin-top:3px}
.rift-shell #rift-toolbar-actions{display:flex!important;align-items:center;flex-wrap:nowrap;gap:3px;width:auto!important;margin-left:auto}
.rift-shell #rift-toolbar-actions>button{font-size:0!important;min-width:36px;width:36px;min-height:36px;height:36px;padding:0!important;border:1px solid transparent;border-radius:2px;background:none;color:var(--trim-light);box-shadow:none}
.rift-shell #rift-toolbar-actions>button::before{content:attr(data-glyph);font:22px/1 Georgia,serif}.rift-shell #rift-toolbar-actions>button:hover{border-color:var(--trim);background:#c5a26a22}.rift-shell #rift-toolbar-actions>button:focus-visible{outline:2px solid var(--accent-light);outline-offset:1px}
.rift-shell #rift-toolbar-actions .cs-profile-menu{order:9;margin:0}.rift-shell #rift-toolbar-actions .cs-profile-menu>summary{font-size:0!important;min-height:36px;min-width:36px;width:36px;height:36px;padding:6px!important;border:0;color:var(--trim-light);background:none}.rift-shell .cs-profile-menu>summary .cs-menu-icon{width:22px;height:22px;margin:0}
.rift-shell.rift-playing .rift-arena{grid-column:1!important;grid-row:1!important;border:0;background:var(--panel);overflow:hidden;position:relative;min-height:0;box-shadow:inset 0 0 0 2px var(--trim-dark)}
.rift-shell.rift-playing .rift-arena::after{content:'';position:absolute;inset:0;pointer-events:none;border:2px solid var(--trim);background:url('/riftwalkers/frame-corner.svg') top left/65px 65px no-repeat;z-index:13;box-shadow:inset 0 0 16px #0007}
.rift-shell .rift-arena>.rift-stage{height:calc(100% - 92px)!important;min-height:0;max-height:none;background:linear-gradient(0deg,#080f1944,transparent 35%),var(--scene) center 65%/cover;border:0;border-radius:0;overflow:hidden}
.rift-shell .rift-stage .rift-scenery{background:none}.rift-shell .rift-stage .rift-portal{opacity:.12}.rift-shell .rift-stage .rift-ground{opacity:.15}.rift-shell .rift-stage-caption{display:none}
.rift-shell .rift-stage .rift-actor{bottom:10px!important;height:90%!important;width:36%!important}.rift-shell .rift-stage .rift-hero{left:7%!important}.rift-shell .rift-stage .rift-enemy{right:7%!important}.rift-shell .rift-stage .rift-actor .rift-sprite{left:25%;width:50%;height:50%;bottom:0;filter:drop-shadow(0 7px 4px #0008)}
.rift-shell .rift-stage .rift-stage-plate{top:12px!important;max-width:300px;width:36%;padding:7px 12px!important;gap:3px 5px;font-size:10px;box-shadow:0 3px 6px #0008,inset 0 0 6px #ad804977;z-index:8}.rift-shell .player-plate{left:16px}.rift-shell .enemy-plate{right:16px}.rift-shell .rift-stage-plate strong{font:600 11px/1.3 Georgia,serif!important}.rift-shell .rift-stage-plate span{font-size:10px!important}.rift-shell .rift-health-track{height:9px}
.rift-shell .rift-momentum-deck{position:absolute;bottom:56px;left:0;right:0;height:36px;z-index:10;border-top:2px double var(--trim);border-bottom:1px solid var(--trim);background:var(--frame)}
.rift-shell .rift-battle-stats{height:100%;display:grid;grid-template-columns:repeat(4,1fr);align-items:center;padding:0 10px;gap:3px}.rift-shell .rift-battle-stats>p{margin:0;display:flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;font:12px/1 Georgia,serif;color:var(--copy)}.rift-shell .rift-battle-stats .rift-item-icon{width:24px;height:24px;filter:drop-shadow(0 1px 2px #0008)}
.rift-shell .rift-momentum{position:absolute;left:50%;bottom:34px;transform:translateX(-50%);padding:6px 12px 4px;min-width:128px;min-height:70px;border:0;border-radius:50% 50% 0 0;background:radial-gradient(ellipse at 50% 25%,var(--panel) 45%,transparent 47%);color:var(--trim-light);display:flex;flex-direction:column;align-items:center;gap:2px;box-shadow:none}.rift-shell .rift-momentum>strong{font:28px/.9 Georgia,serif;min-width:46px;min-height:32px;padding:4px 10px 0;border:2px solid var(--trim);border-bottom:0;border-radius:50% 50% 0 0;background:var(--panel);text-shadow:0 0 8px #dba54c44}.rift-shell .rift-momentum>span:not(.rift-streak-pips){font:10px Georgia,serif;letter-spacing:1px;background:var(--panel);padding:1px 5px}.rift-shell .rift-streak-pips{display:flex;gap:5px}.rift-shell .rift-streak-pips i{height:10px;width:10px;border-radius:50%;border:1px solid var(--trim);background:#080f1c;box-shadow:0 1px 1px #000}.rift-shell .rift-streak-pips i.lit{background:radial-gradient(circle at 35% 25%,#e3ffff,#66cfce 35%,#165c64 80%);box-shadow:0 0 4px #8ce3d244}
.rift-shell .rift-arena-kit{bottom:0;min-height:0;height:56px;box-sizing:border-box;padding:4px 12px;align-items:center;background:var(--frame);border-bottom:3px double var(--trim);gap:6px}.rift-shell .rift-arena-relics{flex-wrap:nowrap!important;overflow-x:auto;max-width:55%;gap:8px;align-items:center;min-height:44px}.rift-shell .rift-arena-relics li{flex:none}.rift-shell .rift-arena-relics button{background:none;border:0;border-radius:0;padding:2px;min-height:44px;min-width:44px;color:var(--copy);gap:2px;box-shadow:none;font:11px Georgia,serif;flex-direction:column}.rift-shell .rift-arena-relics .rift-item-icon{width:29px;height:29px}.rift-shell .rift-arena-relics button span{line-height:10px}
.rift-shell .rift-arena-supplies{border:0;border-radius:0;background:none;gap:5px;padding:0}.rift-shell .rift-arena-counter{font:12px Georgia,serif;color:var(--copy)}.rift-shell .rift-arena-counter .rift-item-icon{width:28px;height:28px}.rift-shell .rift-arena-kit #rift-satchel-button{width:44px;min-width:44px;min-height:44px;background:none;border:0;padding:0!important;box-shadow:none}.rift-shell .rift-arena-kit #rift-satchel-button svg{width:40px;height:40px}
.rift-shell.rift-playing .rift-body{grid-column:1!important;grid-row:2!important;display:grid!important;grid-template-rows:minmax(0,1fr) auto;overflow:hidden;gap:0;min-height:0;margin:0;padding:7px 9px 9px;background:var(--frame)}
.rift-shell.rift-playing .rift-action-panel{position:relative;margin:0;padding:20px 25px!important;border:3px double var(--trim);border-radius:2px;background:radial-gradient(ellipse at 15% 10%,#aa844116,transparent 40%),radial-gradient(ellipse at 85% 75%,#9c713a20,transparent 45%),repeating-linear-gradient(0deg,transparent 0 3px,#9c713a06 4px),linear-gradient(110deg,var(--paper),var(--paper-light) 55%,var(--paper));color:var(--ink);box-shadow:inset 0 0 24px #6c451b44,0 2px 6px #0007;overflow:auto;scrollbar-gutter:stable;min-height:0;overscroll-behavior:contain}
.rift-shell .rift-action-panel::before{content:'';position:absolute;top:0;left:0;width:40px;height:40px;background:url('/riftwalkers/frame-corner.svg') center/contain;pointer-events:none}.rift-shell .rift-action-panel>form{max-width:900px;margin:0 auto!important}.rift-shell .rift-action-panel p,.rift-shell .rift-action-panel h2,.rift-shell .rift-action-panel h3,.rift-shell .rift-action-panel legend{color:var(--ink)}
.rift-shell .rift-action-panel>.eyebrow{font:11px/1.2 Georgia,serif;text-align:center;letter-spacing:1px;margin:0 0 12px!important;padding-bottom:8px;border-bottom:1px solid #8c633d66;color:var(--ink)}
.rift-shell .rift-question{padding:0!important;border:0!important;margin:0 0 10px!important}.rift-shell .rift-question legend{font:600 17px/1.5 Georgia,serif!important;text-align:center;width:100%;padding:0 0 13px;margin:0}.rift-shell .rift-answer-options{gap:8px!important;grid-template-columns:1fr 1fr!important}.rift-shell .rift-question label{min-height:44px;margin:0!important;padding:9px 12px!important;border:1px solid #947248;border-radius:2px;background:#b98d4b0d;color:var(--ink);font:14px/1.35 Georgia,serif!important;box-shadow:inset 0 1px #fff4;gap:9px}.rift-shell .rift-question label:has(input:checked){background:linear-gradient(110deg,var(--accent),#174a40);color:#fff5d9;border-color:var(--trim-light);box-shadow:0 0 0 1px var(--trim-dark),inset 0 0 9px #77cbb322}.rift-shell input[type=radio]{width:16px;height:16px;min-width:16px;min-height:16px;accent-color:var(--accent);margin:0;align-self:center}
.rift-shell .rift-action-panel #rift-check{display:block;min-width:220px;min-height:44px;width:max-content;max-width:100%;margin:12px auto 0;padding:9px 24px!important;border:3px double var(--trim);border-radius:2px;background:linear-gradient(110deg,var(--accent),#0b2d2d);color:#fff1ce;font:15px/1.2 Georgia,serif!important;box-shadow:0 0 0 2px #3d2b19,inset 0 0 0 1px #d8c18a44,0 3px 5px #0004;clip-path:polygon(10px 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,10px 100%,0 50%)}
.rift-shell #rift-hint{display:block;margin:8px auto 0;background:none;border:0;text-decoration:underline;box-shadow:none;color:var(--ink);font:11px/1.4 Georgia,serif;min-height:28px;padding:2px 6px}
.rift-shell .rift-action-panel>.rift-intent{font:11px/1.5 Georgia,serif!important;padding:4px 10px;margin:0 0 10px!important;border:1px solid #92704788;border-left:3px solid #93673a;background:#9b713a11;border-radius:0;color:var(--ink)}.rift-shell .rift-action-panel>.rift-combat-hint,.rift-shell .rift-action-rule{font:11px/1.5 Georgia,serif!important;margin:5px 0;color:var(--ink)}
.rift-shell .rift-feedback{border:0;border-left:2px solid #8b6b3b;border-radius:0;background:none;padding:5px 12px;margin:5px 0}.rift-shell .rift-feedback h3{font:600 20px/1.3 Georgia,serif;margin:4px 0 8px}.rift-shell .rift-feedback p{font:14px/1.5 Georgia,serif}.rift-shell .rift-exchange-recap{padding:5px 9px;margin:0 0 8px;border:1px solid #8c714a77;background:#8b653a0d;color:var(--ink);border-radius:0}.rift-shell .rift-exchange-recap p{color:var(--ink);font:11px/1.5 Georgia,serif}
.rift-shell .rift-command-tray{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;margin:8px 0 0!important;padding:0;background:var(--frame);border:0;min-height:0;position:relative}
.rift-shell .rift-command-tray>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:90px;height:auto;padding:10px 4px!important;text-align:center;border:3px double var(--trim);border-radius:2px;background:radial-gradient(ellipse at 50% 20%,#b4863322,transparent 80%),linear-gradient(110deg,var(--wood),var(--panel));color:var(--copy);box-shadow:inset 0 0 0 2px #0007,inset 0 -8px 20px #0003,0 2px 3px #0008;font:15px/1.2 Georgia,serif;position:relative;isolation:isolate}
.rift-shell .rift-command-tray>button::before{content:'';position:absolute;inset:0;background:url('/riftwalkers/frame-corner.svg') top left/32px 32px no-repeat;pointer-events:none}.rift-shell .rift-command-tray>button .rift-item-icon{width:34px;height:34px;filter:drop-shadow(0 0 6px #75bbce55)}.rift-shell .rift-command-tray>button strong{font-weight:400;font-size:15px;color:var(--copy)}.rift-shell .rift-command-tray>button small{font:10px/1.2 Georgia,serif;color:var(--muted)}.rift-shell .rift-command-tray>button:disabled{opacity:1;filter:saturate(.55);cursor:not-allowed}.rift-shell .rift-command-tray>button:disabled .rift-item-icon{opacity:.5;filter:none}.rift-shell .rift-command-tray>button:not(:disabled):hover{background:linear-gradient(110deg,var(--accent),var(--panel))!important;border-color:var(--trim-light)!important;color:var(--copy)!important;box-shadow:inset 0 0 20px #d9bd7e22}.rift-shell .rift-command-tray>button:focus-visible{outline:3px solid var(--accent-light);outline-offset:-6px}
.rift-shell .rift-dialog{background:var(--frame);color:var(--copy);border:3px double var(--trim);border-radius:2px;font-family:Georgia,serif;box-shadow:0 20px 90px #000b,inset 0 0 20px #0006}.rift-shell .rift-dialog p,.rift-shell .rift-dialog h2{color:var(--copy)}.rift-shell .rift-dialog button{background:var(--panel);border-color:var(--trim);color:var(--copy)}.rift-shell .rift-dialog input{accent-color:var(--accent-light)}
.rift-theme-picker{display:grid;gap:8px;padding:12px!important;border:1px solid var(--trim)!important;margin:0 0 18px}.rift-theme-picker legend{font:17px Georgia,serif;color:var(--trim-light)}.rift-theme-picker label{display:flex!important;align-items:center;gap:12px;min-height:64px;padding:10px;border:1px solid #b2935e66;background:#0002;margin:0!important}.rift-theme-picker label:has(input:checked){border:2px solid var(--trim-light);background:#bba16d22}.rift-theme-picker label span{display:grid;gap:5px}.rift-theme-picker small{font:12px/1.5 Georgia,serif;color:var(--muted)}.rift-theme-swatch{width:40px;height:40px;flex:none;border:2px solid #bba16d;background:linear-gradient(135deg,#cfba85 45%,#294635 46%,#4f301b 70%)}[data-theme-choice=riftforge] .rift-theme-swatch{background:linear-gradient(135deg,#202b2e 45%,#ce8d42 46%,#1b5257 70%)}[data-theme-choice=arcane] .rift-theme-swatch{background:linear-gradient(135deg,#08203d 45%,#8aafce 46%,#116295 70%)}
.rift-shell[data-theme=arcane] .rift-action-panel{box-shadow:inset 0 0 35px #001324,0 0 0 1px #d1b46a}.rift-shell[data-theme=arcane] .rift-question label{border-color:#6b7d8e;background:#05162b44}.rift-shell[data-theme=arcane] .rift-question label:has(input:checked){background:linear-gradient(110deg,#0c5376,#08283f);border-color:#c4daec;box-shadow:0 0 8px #76d2ff55}.rift-shell[data-theme=arcane] .rift-action-panel>.rift-intent{color:var(--copy);background:#00132433;border-color:#8e9caa}
.rift-shell .rift-guide-invite,.rift-shell .rift-panel:not(.rift-action-panel),.rift-shell .rift-hero-card{background:var(--frame);color:var(--copy);border-color:var(--trim)}.rift-shell .rift-intro{background:linear-gradient(90deg,#17150eee,#17150e55),var(--scene) center/cover;border-color:var(--trim)}.rift-shell .rift-intro h1{color:var(--trim-light);font-family:Georgia,serif}.rift-shell .rift-relic{background:var(--frame)!important;border-color:var(--trim)!important}.rift-shell .rift-route-selection{background:var(--frame);color:var(--copy);border:3px double var(--trim);border-radius:2px}.rift-shell .rift-route-selection h2,.rift-shell .rift-route-selection p{color:var(--copy)}.rift-shell .rift-route-portal{background:var(--panel);border-color:var(--trim);color:var(--copy);border-radius:2px}
.rift-shell.rift-playing[data-phase=map] #rift-root{grid-template-rows:minmax(0,1fr)!important}.rift-shell[data-phase=map] .rift-body{display:none!important}.rift-shell[data-phase=map] .rift-route-selection{max-height:calc(100% - 130px);bottom:130px;top:auto;transform:none;left:30%;right:4%}
.rift-shell.rift-playing[data-art=off] .rift-arena>.rift-stage{display:none}.rift-shell.rift-playing[data-art=off]:not([data-phase=map]) #rift-root{grid-template-rows:124px minmax(0,1fr)!important}
.rift-shell.rift-immersive.rift-playing{max-width:none;width:100%;height:100dvh;margin:0;grid-template-rows:54px minmax(0,1fr)}
@media(min-width:1100px){.rift-shell .rift-action-panel{padding:16px 40px!important}.rift-shell .rift-command-tray>button{min-height:88px;display:grid;grid-template-columns:44px auto;grid-template-rows:1fr 1fr;gap:0 12px;text-align:left;justify-content:center}.rift-shell .rift-command-tray .rift-item-icon{grid-row:1/3;width:40px;height:40px}.rift-shell .rift-command-tray strong{align-self:end}.rift-shell .rift-command-tray small{align-self:start;margin-top:4px}}
@media(max-width:760px){.rift-shell.rift-playing{height:calc(100dvh - 12px);margin:6px 4px;max-width:calc(100% - 8px);grid-template-rows:49px minmax(0,1fr)}.rift-shell .rift-toolbar{padding:3px 7px!important;gap:3px}.rift-shell .rift-toolbar>a{display:none}.rift-shell .rift-toolbar>strong{font-size:15px;letter-spacing:.5px}.rift-shell .rift-toolbar>strong small{font-size:9px}.rift-shell #rift-toolbar-actions>button,.rift-shell #rift-toolbar-actions .cs-profile-menu>summary{min-width:32px!important;width:32px!important;height:38px!important;min-height:38px!important}.rift-shell #rift-toolbar-actions{gap:1px}.rift-shell #rift-toolbar-actions>button::before{font-size:20px}.rift-shell .rift-toolbar .cs-profile-menu>summary .cs-menu-icon{width:20px;height:20px}.rift-shell.rift-playing #rift-root{grid-template-rows:minmax(170px,1.3fr) minmax(220px,1fr)!important}.rift-shell .rift-action-panel{padding:14px 14px 10px!important}.rift-shell .rift-question legend{font-size:14px!important;line-height:1.4!important;padding-bottom:12px}.rift-shell .rift-question label{font-size:12px!important;padding:8px!important;gap:6px}.rift-shell .rift-stage .rift-stage-plate{width:39%;padding:5px 8px!important;top:10px!important}.rift-shell .player-plate{left:9px}.rift-shell .enemy-plate{right:9px}.rift-shell .rift-stage-plate strong{font-size:9px!important}.rift-shell .rift-stage-plate span{font-size:9px!important}.rift-shell .rift-command-tray{gap:5px!important}.rift-shell .rift-command-tray>button{min-height:82px;padding:6px 2px!important;gap:3px}.rift-shell .rift-command-tray>button .rift-item-icon{width:30px;height:30px}.rift-shell .rift-command-tray>button strong{font-size:13px}.rift-shell .rift-command-tray>button small{font-size:9px}.rift-shell .rift-battle-stats{padding:0 4px}.rift-shell .rift-battle-stats>p{margin:0;font-size:10px;gap:4px}.rift-shell .rift-battle-stats .rift-item-icon{width:21px;height:21px}.rift-shell .rift-arena-kit{padding:4px 9px}.rift-shell .rift-momentum{min-height:62px;min-width:118px}.rift-shell .rift-momentum>strong{font-size:25px;min-height:28px}.rift-shell .rift-streak-pips{gap:4px}.rift-shell .rift-streak-pips i{width:9px;height:9px}.rift-shell .rift-action-panel #rift-check{font-size:14px!important;min-width:180px}.rift-shell .rift-action-panel>.eyebrow{font-size:9px}.rift-shell .rift-action-panel>.rift-intent{font-size:10px!important}.rift-shell.rift-playing[data-phase=map] #rift-root{grid-template-rows:minmax(0,1fr)!important}}
@media(max-width:360px){.rift-shell .rift-toolbar>strong{font-size:12px}.rift-shell .rift-toolbar>strong small{font-size:8px}.rift-shell #rift-toolbar-actions>button,.rift-shell #rift-toolbar-actions .cs-profile-menu>summary{min-width:29px!important;width:29px!important}.rift-shell .rift-battle-stats>p{margin:0;font-size:9px;gap:2px}.rift-shell .rift-arena-relics{max-width:48%}.rift-shell .rift-arena-relics{gap:3px}.rift-shell .rift-arena-counter .rift-item-icon{width:23px;height:23px}.rift-shell .rift-command-tray>button small{font-size:8px}.rift-shell .rift-feedback h3{font-size:17px}.rift-shell .rift-feedback p{font-size:12px}}
@media(max-height:680px) and (max-width:760px){.rift-shell.rift-playing #rift-root{grid-template-rows:minmax(170px,1fr) minmax(210px,1.1fr)!important}.rift-shell .rift-command-tray>button{min-height:70px}.rift-shell .rift-command-tray>button .rift-item-icon{width:25px;height:25px}}
/* Landscape keeps the same framed scene and journal side by side. */
.rift-shell.rift-landscape.rift-playing{grid-template-rows:44px minmax(0,1fr);max-width:none}.rift-shell.rift-landscape.rift-playing #rift-root{grid-template-columns:minmax(0,1.15fr) minmax(255px,1fr)!important;grid-template-rows:minmax(0,1fr)!important}.rift-shell.rift-landscape .rift-arena{grid-row:1!important;grid-column:1!important}.rift-shell.rift-landscape .rift-body{grid-row:1!important;grid-column:2!important;padding:5px!important}.rift-shell.rift-landscape .rift-action-panel{padding:12px!important;border-left:3px double var(--trim)}.rift-shell.rift-landscape .rift-toolbar>strong{display:block!important}.rift-shell.rift-landscape .rift-stage .rift-actor{height:90%!important;width:42%!important;bottom:7px!important}.rift-shell.rift-landscape .rift-stage .rift-hero{left:2%!important}.rift-shell.rift-landscape .rift-stage .rift-enemy{right:2%!important}.rift-shell.rift-landscape .rift-command-tray>button{min-height:62px}.rift-shell.rift-landscape .rift-command-tray>button .rift-item-icon{width:24px;height:24px}.rift-shell.rift-landscape .rift-command-tray>button strong{font-size:12px}.rift-shell.rift-landscape .rift-command-tray>button small{font-size:8px}.rift-shell.rift-landscape .rift-momentum{min-height:55px;bottom:32px}.rift-shell.rift-landscape .rift-momentum>strong{font-size:22px;min-height:22px}.rift-shell.rift-landscape .rift-streak-pips i{width:7px;height:7px}.rift-shell.rift-landscape .rift-stage .rift-stage-plate{top:8px!important;max-width:none;width:38%;padding:5px 7px!important}.rift-shell.rift-landscape .rift-battle-stats>p{margin:0;font-size:9px;gap:3px}.rift-shell.rift-landscape .rift-battle-stats .rift-item-icon{width:18px;height:18px}.rift-shell.rift-landscape .rift-arena-relics{max-width:48%;gap:3px}.rift-shell.rift-landscape .rift-arena-relics .rift-item-icon{width:23px;height:23px}.rift-shell.rift-landscape .rift-arena-counter .rift-item-icon{width:24px;height:24px}.rift-shell.rift-landscape .rift-arena-counter{font-size:10px}.rift-shell.rift-landscape[data-phase=map] .rift-arena{grid-column:1/-1!important}.rift-shell.rift-landscape[data-phase=map] #rift-root{grid-template-columns:1fr!important}.rift-shell.rift-landscape[data-phase=map] .rift-route-selection{bottom:130px;max-height:calc(100% - 140px);padding:8px}.rift-shell.rift-landscape[data-art=off]:not([data-phase=map]) #rift-root{grid-template-columns:1fr!important;grid-template-rows:124px minmax(0,1fr)!important}.rift-shell.rift-landscape[data-art=off]:not([data-phase=map]) .rift-body{grid-row:2!important;grid-column:1!important}
.rift-shell.rift-large .rift-question legend,.rift-shell.rift-large .rift-question label,.rift-shell.rift-large .rift-action-panel p{font-size:18px!important}.rift-shell.rift-large .rift-command-tray>button strong{font-size:18px}
html[data-cs-high-contrast] .rift-shell .rift-action-panel{background:#000;color:#fff}html[data-cs-high-contrast] .rift-shell .rift-action-panel :is(p,h2,h3,legend,label){color:#fff;background:#000}html[data-cs-high-contrast] .rift-shell .rift-question label{border-color:#fff}
body:has(.rift-playing)>.cs-global{display:none}.rift-shell.rift-playing .rift-body{grid-template-columns:minmax(0,1fr)!important}
.rift-shell .rift-arena::after,.rift-shell .rift-action-panel::after{content:'';position:absolute;inset:0;border:25px solid transparent;border-image:url('/riftwalkers/art/guild-frame.png') 220 stretch;pointer-events:none;z-index:14;background:none;box-shadow:none;border-radius:0}.rift-shell .rift-action-panel::after{position:absolute;inset:0;display:none}.rift-shell .rift-action-panel{border:14px solid transparent!important;border-image:url('/riftwalkers/art/guild-frame.png') 220 stretch!important;padding:12px 15px!important}.rift-shell .rift-action-panel::before{display:none}
.rift-shell .rift-command-tray>button::before{inset:0;border:13px solid transparent;border-image:url('/riftwalkers/art/guild-frame.png') 220 stretch;background:none;box-sizing:border-box}.rift-shell .rift-toolbar::after{inset:0;border:12px solid transparent;border-image:url('/riftwalkers/art/guild-frame.png') 220 stretch;clip-path:none;background:none}
.rift-shell[data-theme=arcane] .rift-arena::after,.rift-shell[data-theme=arcane] .rift-command-tray>button::before,.rift-shell[data-theme=arcane] .rift-toolbar::after{filter:saturate(.65)}
@media(max-width:760px){.rift-shell .rift-action-panel{padding:8px 8px!important;border-width:11px!important}.rift-shell .rift-arena::after{border-width:17px}.rift-shell .rift-command-tray>button::before{border-width:10px}}
.rift-shell .rift-command-tray>button{display:flex!important;flex-direction:column;text-align:center;gap:3px!important}.rift-shell .rift-command-tray>button .rift-item-icon{width:38px;height:38px;grid-row:auto}.rift-shell .rift-command-tray>button small{margin:0}.rift-shell .rift-command-tray>button:disabled{filter:none}.rift-shell .rift-command-tray>button:disabled .rift-item-icon{opacity:.75;filter:drop-shadow(0 0 5px #ad94ca44)}.rift-shell #battle-attack .rift-item-icon{filter:drop-shadow(0 0 6px #d9667066)}.rift-shell #battle-attack .rift-item-icon path:first-child{fill:#ffb5b5;stroke:#ed6a72}.rift-shell #battle-skill .rift-item-icon{filter:drop-shadow(0 0 6px #bb63ee77)}.rift-shell .rift-action-panel>.rift-combat-hint{position:absolute!important;width:1px!important;height:1px!important;clip-path:inset(50%);overflow:hidden;padding:0;margin:0}
@media(max-width:760px){.rift-shell.rift-playing:not(.rift-landscape) #rift-root{grid-template-rows:minmax(150px,1fr) minmax(280px,1.2fr)!important}.rift-shell.rift-playing:not(.rift-landscape)[data-phase=map] #rift-root{grid-template-rows:minmax(0,1fr)!important}.rift-shell .rift-command-tray>button .rift-item-icon{width:30px;height:30px}}
@media(max-width:760px) and (max-height:650px){.rift-shell.rift-playing:not(.rift-landscape) #rift-root{grid-template-rows:minmax(150px,1fr) minmax(245px,1.2fr)!important}.rift-shell .rift-command-tray>button .rift-item-icon{width:24px;height:24px}.rift-shell .rift-command-tray>button{min-height:66px}}
.rift-shell .rift-energy{position:absolute;top:64px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:4px;padding:3px 8px;color:#e5f6f1;font:11px Georgia,serif;background:#081a24d9;border:1px solid var(--trim);border-radius:20px;z-index:9}.rift-shell .rift-energy svg{width:17px;height:17px}.rift-shell[data-art=off] .rift-energy{top:4px;left:auto;right:6px;transform:none}
@media(min-width:431px) and (max-width:760px){.rift-shell.rift-playing:not(.rift-landscape) #rift-root{grid-template-rows:minmax(170px,1.35fr) minmax(250px,1fr)!important}.rift-shell.rift-playing:not(.rift-landscape)[data-phase=map] #rift-root{grid-template-rows:minmax(0,1fr)!important}}
.rift-shell #rift-toolbar-actions>button{margin:0!important}.rift-shell #rift-toolbar-actions{min-width:0}.rift-shell.rift-hall button.primary{background:linear-gradient(110deg,var(--accent),var(--panel));border:3px double var(--trim);color:var(--copy);font-family:Georgia,serif}.rift-shell.rift-hall .rift-hero-card:has(input:checked){background:linear-gradient(110deg,var(--accent),var(--panel));border-color:var(--trim-light);box-shadow:0 0 10px #c6a46a33}
body[data-world-page=riftwalkers]>.cs-global{max-width:100%;box-sizing:border-box}
.rift-shell #rift-toolbar-actions .cs-profile-fallback>summary::after{display:none}
.rift-shell #rift-toolbar-actions>button::before{content:'';display:block;width:21px;height:21px;margin:auto;background:var(--trim-light);mask:var(--tool-icon) center/contain no-repeat}.rift-shell #rift-settings{--tool-icon:url('/riftwalkers/icons/settings.svg')}.rift-shell #rift-pause{--tool-icon:url('/riftwalkers/icons/pause.svg')}.rift-shell #rift-fullscreen{--tool-icon:url('/riftwalkers/icons/fullscreen.svg')}.rift-shell #rift-music{--tool-icon:url('/riftwalkers/icons/music.svg')}.rift-shell #rift-quit{--tool-icon:url('/riftwalkers/icons/quit.svg')}.rift-shell #rift-music[aria-pressed=false]::before{opacity:.5}

/* Ground the actors within the scene rather than against the HUD rail. */
.rift-shell .rift-arena>.rift-stage{background-image:linear-gradient(180deg,#30251112 0%,#27322508 45%,#31220b30 100%),var(--scene);box-shadow:inset 0 0 45px #201b1433}
.rift-shell .rift-stage::before{content:'';position:absolute;inset:0;pointer-events:none;z-index:1;background:radial-gradient(ellipse at 50% 35%,transparent 35%,#1b22192b 100%),linear-gradient(0deg,#17201820,transparent 32%)}
.rift-shell .rift-stage .rift-actor{bottom:17%!important;height:76%!important}.rift-shell .rift-stage .rift-hero{left:3%!important}.rift-shell .rift-stage .rift-enemy{right:3%!important}.rift-shell .rift-stage .rift-actor .rift-sprite{filter:saturate(.78) brightness(.96) contrast(1.02) sepia(.08) drop-shadow(0 5px 4px #17171066)}
.rift-shell .rift-stage .rift-actor-aura{border:0;box-shadow:none;background:radial-gradient(ellipse,#171d16a3 10%,#20231861 40%,transparent 72%);filter:blur(2px);height:5%;left:31%;right:31%;transform:scaleX(1.2)}
.rift-shell[data-theme=riftforge] .rift-arena>.rift-stage{background-image:linear-gradient(180deg,#150f0c12,#29140933),var(--scene)}.rift-shell[data-theme=riftforge] .rift-stage::before{background:radial-gradient(ellipse at 50% 25%,#e77d1918,transparent 55%),linear-gradient(0deg,#110d1944,transparent 50%)}.rift-shell[data-theme=riftforge] .rift-stage .rift-sprite{filter:saturate(.78) brightness(.87) contrast(1.06) drop-shadow(2px -2px 3px #e78c3c40) drop-shadow(0 6px 4px #10091480)}
.rift-shell[data-theme=arcane] .rift-arena>.rift-stage{background-image:linear-gradient(180deg,#0813260a,#0e213d30),var(--scene)}.rift-shell[data-theme=arcane] .rift-stage::before{background:radial-gradient(ellipse at 50% 25%,#77b5ed12,transparent 60%),linear-gradient(0deg,#07122738,transparent 50%)}.rift-shell[data-theme=arcane] .rift-stage .rift-sprite{filter:saturate(.82) brightness(.92) drop-shadow(-2px -2px 3px #67a9df38) drop-shadow(0 5px 4px #09152588)}
.rift-shell.rift-landscape .rift-stage .rift-actor{bottom:17%!important;height:76%!important}.rift-shell.rift-landscape .rift-stage .rift-hero{left:1%!important}.rift-shell.rift-landscape .rift-stage .rift-enemy{right:1%!important}
/* Center every command label; the old desktop grid alignment no longer applies. */
.rift-shell .rift-command-tray>button :is(strong,small){align-self:center!important;text-align:center;margin:0;grid-row:auto}
/* A manuscript sheet with quieter context, deliberate choices and a proper footer. */
.rift-shell.rift-playing .rift-action-panel{background-image:linear-gradient(90deg,#d3b58333,transparent 12%,transparent 88%,#c5a36d33),var(--manuscript,linear-gradient(110deg,var(--paper),var(--paper-light)));background-size:100% 100%;background-position:center;box-shadow:inset 0 0 14px #79502538,0 2px 6px #0007;scrollbar-width:thin;scrollbar-color:#a8854c #b38c4b26;scroll-padding:14px}
.rift-shell .rift-action-panel::-webkit-scrollbar{width:7px}.rift-shell .rift-action-panel::-webkit-scrollbar-track{background:#b38c4b26}.rift-shell .rift-action-panel::-webkit-scrollbar-thumb{background:#a8854c;border-radius:8px;border:1px solid #e0c492}
.rift-shell .rift-question-context{display:flex;align-items:center;justify-content:space-between;gap:14px;max-width:940px;margin:0 auto 14px;padding:0 0 10px;border-bottom:1px solid #9c784b66}.rift-shell .rift-question-context .eyebrow{margin:0;font:10px/1.5 Georgia,serif;letter-spacing:.8px;color:var(--ink);text-transform:uppercase}.rift-shell .rift-question-context .rift-intent{flex:none;display:block;max-width:50%;margin:0!important;padding:4px 8px;border:1px solid #a6814c88;border-radius:2px;background:#b28b4b12;font:11px/1.35 Georgia,serif;color:var(--ink)}.rift-shell .rift-question-context .rift-intent.surge{border-color:#985b3f;background:#9a493716}
.rift-shell .rift-question legend{font-size:19px!important;font-weight:600!important;line-height:1.45!important;padding:0 0 16px;max-width:940px;margin:0 auto}.rift-shell .rift-answer-options{max-width:900px;margin:0 auto;gap:9px!important}.rift-shell .rift-question label{background:#fff6dc21;border-color:#ad8a53;box-shadow:inset 0 1px #fff9,0 1px 2px #5d3d1812;font-size:15px!important;line-height:1.4!important}.rift-shell .rift-question label:hover{background:#fff7dc55;border-color:#85602e}.rift-shell .rift-question label:has(input:checked){background:linear-gradient(110deg,#164c40,#0e3d36);border-color:#e4be6b;box-shadow:0 0 0 1px #715126,inset 0 0 0 1px #bda56b55;color:#fff3d4}
.rift-shell .rift-question input[type=radio]{appearance:none;-webkit-appearance:none;flex:none;box-sizing:border-box;width:14px;height:14px;min-width:14px;min-height:14px;border:1px solid #806a42;border-radius:50%;background:#fff9df11;box-shadow:inset 0 1px 2px #7d63351a}.rift-shell .rift-question input[type=radio]:checked{border-color:#fff0bb;background:#f1d18a;box-shadow:inset 0 0 0 3px #164c40}.rift-shell .rift-question input[type=radio]:focus-visible{outline:2px solid #916622;outline-offset:3px}
.rift-shell .rift-question-footer{display:flex;flex-direction:column;align-items:center;gap:3px;margin:12px auto 0;padding:10px 0 0;max-width:900px;border-top:1px solid #9c784b38}.rift-shell .rift-question-footer #rift-check{margin:0 auto!important;min-height:44px;letter-spacing:.2px;box-shadow:inset 0 1px #c9dca044,0 2px 3px #4b311433}.rift-shell .rift-question-footer #rift-check:disabled{opacity:1;filter:saturate(.6);background:linear-gradient(#667c69,#496154);color:#f5ead2;border-color:#c3a465;cursor:not-allowed}.rift-shell .rift-question-footer #rift-hint{margin:2px auto 0;font-size:11px;min-height:26px;opacity:.85}
.rift-shell[data-theme=arcane] .rift-action-panel{--manuscript:linear-gradient(115deg,#0a1d32,#102a43 50%,#0a2139);background-image:radial-gradient(ellipse at 50% 0,#759cc312,transparent 65%),var(--manuscript)}.rift-shell[data-theme=arcane] .rift-question-context{border-color:#b9a37166}.rift-shell[data-theme=arcane] .rift-question-context .rift-intent{color:var(--copy);border-color:#7c8f9d;background:#05182c55}.rift-shell[data-theme=arcane] .rift-question label{background:#05162b44;border-color:#697d8d}.rift-shell[data-theme=arcane] .rift-question label:hover{background:#173b5433}.rift-shell[data-theme=arcane] .rift-question label:has(input:checked){background:linear-gradient(110deg,#125073,#0a314b);border-color:#c6d5db;box-shadow:inset 0 0 7px #6ac5e755}.rift-shell[data-theme=arcane] .rift-question input[type=radio]{border-color:#bfd0db}.rift-shell[data-theme=arcane] .rift-question input[type=radio]:checked{background:#d4eaff;box-shadow:inset 0 0 0 3px #125073}
@media(max-width:760px){.rift-shell .rift-question-context{gap:8px;margin-bottom:10px;padding-bottom:7px}.rift-shell .rift-question-context .eyebrow{font-size:9px;letter-spacing:.4px}.rift-shell .rift-question-context .rift-intent{font-size:10px;max-width:46%;padding:3px 5px}.rift-shell .rift-question legend{font-size:15px!important;padding-bottom:12px}.rift-shell .rift-question label{font-size:12px!important}.rift-shell .rift-question-footer{margin-top:9px;padding-top:8px}}
.rift-shell:not([data-theme=arcane]) .rift-action-panel{--manuscript:url('/riftwalkers/art/manuscript-paper.webp')}.rift-shell .rift-item-icon>image{image-rendering:auto}

@media(min-width:761px){.rift-shell .rift-question-context{margin-bottom:8px;padding-bottom:6px}.rift-shell .rift-question legend{padding-bottom:10px}.rift-shell .rift-question{margin-bottom:0!important}.rift-shell .rift-question-footer{flex-direction:row;justify-content:center;gap:16px;margin-top:6px;padding-top:6px}.rift-shell .rift-question-footer #rift-check,.rift-shell .rift-question-footer #rift-hint{margin:0!important}}

/* Rarity is written out so color is never the only distinction. */
.rift-shell [data-rarity=common]{--relic-color:#c9cbd0}.rift-shell [data-rarity=uncommon]{--relic-color:#7cd3a3}.rift-shell [data-rarity=rare]{--relic-color:#82bdff}.rift-shell [data-rarity=epic]{--relic-color:#d6a2ff}.rift-shell [data-rarity=legendary]{--relic-color:#f3cf77}
.rift-shell .rift-rarity{display:inline-block;align-self:center;flex:none;font:600 11px/1.4 Georgia,serif;letter-spacing:.35px;border:1px solid var(--relic-color);border-radius:3px;padding:2px 7px;background:#071725;color:var(--relic-color)}
.rift-shell .rift-relic{border-left:3px solid var(--relic-color)!important}.rift-shell .rift-relic .rift-rarity{margin:0 8px}.rift-shell .rift-inventory-slot .rift-rarity{font-size:10px;padding:1px 5px}.rift-shell .rift-arena-relics button{border-bottom:2px solid var(--relic-color)!important}.rift-shell .rift-item-dialog>.rift-rarity{margin:8px 0}.rift-shell .rift-kit-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
html[data-cs-high-contrast] .rift-shell .rift-rarity{background:#000;color:#fff;border-color:#fff}
@media(min-width:761px){.rift-shell .rift-inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Compact effects and rarity backgrounds; names remain available to screen readers. */
.rift-shell [data-rarity=common]{--relic-surface:linear-gradient(120deg,#2d3238,#1c2026);--relic-color:#b9c2cc}
.rift-shell [data-rarity=uncommon]{--relic-surface:linear-gradient(120deg,#194c3a,#102d25);--relic-color:#81d7a8}
.rift-shell [data-rarity=rare]{--relic-surface:linear-gradient(120deg,#183f68,#102840);--relic-color:#8fc4ff}
.rift-shell [data-rarity=epic]{--relic-surface:linear-gradient(120deg,#4c286c,#2b193f);--relic-color:#d8acff}
.rift-shell [data-rarity=legendary]{--relic-surface:linear-gradient(120deg,#71501d,#3e2b10);--relic-color:#f6d483}
.rift-shell .rift-inventory-slot[data-rarity],.rift-shell .rift-relic[data-rarity],.rift-shell .rift-arena-relics button[data-rarity]{background:var(--relic-surface)!important;border-color:var(--relic-color)!important;color:#f8efd9}
.rift-shell .rift-inventory-slot.uncollected{opacity:1}.rift-shell .rift-inventory-slot.uncollected .rift-item-icon{opacity:.45}
.rift-shell .rift-relic-summary{display:flex;align-items:center;gap:0;min-width:0;max-width:100%;padding:6px 10px;background:var(--relic-surface);border:1px solid var(--relic-color);border-radius:3px;color:#f8efd9;font:13px/1.5 Georgia,serif}
.rift-shell .rift-relic-short{min-width:0;white-space:normal;overflow-wrap:anywhere}.rift-shell .rift-relic-info>.rift-relic-summary{width:max-content;max-width:100%}.rift-shell .rift-relic>.rift-relic-summary{grid-column:2;grid-row:2;background:transparent;border:0;padding:0;font-size:13px}.rift-shell .rift-relic>.rift-item-icon{grid-row:1/3}
.rift-shell .rift-item-status{font-size:12px;line-height:1.5;margin:8px 0;color:var(--muted)}.rift-shell .rift-relic-rules{margin-top:12px;border-top:1px solid #a68a5955;padding-top:8px;font-size:12px}.rift-shell .rift-relic-rules>summary{cursor:pointer;min-height:32px;display:list-item;padding:6px 0;color:var(--copy)}.rift-shell .rift-relic-rules p{font-size:12px;line-height:1.6}.rift-shell .rift-relic-summary+.rift-item-status{margin-top:8px}
html[data-cs-high-contrast] .rift-shell :is(.rift-inventory-slot[data-rarity],.rift-relic[data-rarity],.rift-relic-summary){background:#000!important;color:#fff;border-color:#fff!important}
@media(max-width:760px){.rift-shell .rift-relic-summary{font-size:12px;padding:5px 8px}.rift-shell .rift-relic>.rift-relic-summary{font-size:12px}}

/* Quiet item tiles; descriptions appear on hover/focus or inside tap-to-inspect. */
.rift-shell .rift-loot-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0 20px}
.rift-shell .rift-loot-tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;min-height:124px;width:100%;padding:14px 8px;margin:0;border:1px solid var(--relic-color);border-radius:5px;background:var(--relic-surface);color:#f8efd9;text-align:center;overflow:visible}
.rift-shell .rift-loot-tile .rift-item-icon{width:46px;height:46px}.rift-shell .rift-loot-tile strong{font:600 14px/1.4 Georgia,serif}.rift-shell .rift-loot-tile small{font:12px/1.4 Georgia,serif;color:#f2d18a}
.rift-shell .rift-loot-tile:hover,.rift-shell .rift-loot-tile:focus-visible{background:var(--relic-surface);box-shadow:inset 0 0 0 1px var(--relic-color),0 0 12px #d8c18b22}
.rift-shell .rift-relic-tooltip{position:absolute;left:50%;bottom:calc(100% + 7px);translate:-50% 0;z-index:35;width:max-content;max-width:min(260px,calc(100vw - 48px));padding:7px 10px;border:1px solid var(--relic-color);border-radius:4px;background:#06131ff5;color:#fff0cf;box-shadow:0 4px 12px #0007;font:12px/1.5 Georgia,serif;text-align:left;white-space:normal;pointer-events:none;visibility:hidden;opacity:0}
.rift-shell :is(.rift-inventory-slot,.rift-loot-tile):is(:hover,:focus-visible)>.rift-relic-tooltip{visibility:visible;opacity:1;pointer-events:auto}
.rift-loot-grid>.rift-loot-tile:first-child>.rift-relic-tooltip,.rift-inventory-grid>li:nth-child(4n+1) .rift-relic-tooltip{left:0;translate:0}.rift-loot-grid>.rift-loot-tile:last-child>.rift-relic-tooltip,.rift-inventory-grid>li:nth-child(4n) .rift-relic-tooltip{left:auto;right:0;translate:0}
html[data-cs-high-contrast] .rift-shell :is(.rift-loot-tile,.rift-relic-tooltip){background:#000;color:#fff;border-color:#fff}
@media(max-width:760px){.rift-shell .rift-loot-grid{gap:7px}.rift-shell .rift-loot-tile{min-height:122px;padding:10px 5px;gap:6px}.rift-shell .rift-loot-tile strong{font-size:12px}.rift-inventory-grid>li:nth-child(odd) .rift-relic-tooltip{left:0;right:auto;translate:0}.rift-inventory-grid>li:nth-child(even) .rift-relic-tooltip{left:auto;right:0;translate:0}}

.rift-shell .rift-tooltip-dismissed>.rift-relic-tooltip{visibility:hidden!important;opacity:0!important}.rift-relic-tooltip::after{content:"";position:absolute;left:0;right:0;top:100%;height:8px}
.rift-shell .rift-loot-tile[data-rarity]{background:var(--relic-surface)!important}
.rift-shell .rift-item-dialog .dialog-head>button{flex-shrink:0;min-width:74px;white-space:nowrap}
html[data-cs-high-contrast] .rift-shell .rift-loot-tile[data-rarity]{background:#000!important;color:#fff;border-color:#fff!important}
/* Keep the supplied artwork recognizable even before a relic is found. */
.rift-shell .rift-inventory-slot.uncollected .rift-item-icon[data-relic-art]{filter:drop-shadow(0 2px 3px #0006);opacity:.8}
/* Tower scenery follows the biome; interface themes remain a player preference. */
.rift-shell[data-biome=guild]{--scene:url('/riftwalkers/art/guild-courtyard.png')}
.rift-shell[data-biome=riftforge]{--scene:url('/riftwalkers/art/riftforge-chronicle.png')}
.rift-shell[data-biome=arcane]{--scene:url('/riftwalkers/art/arcane-command.png')}
.rift-shell .rift-xp{display:flex;align-items:center;gap:6px;min-width:0;font:9px/1.4 Georgia,serif;letter-spacing:0;color:var(--copy);padding:1px 0}
.rift-shell .rift-xp progress{display:block!important;width:50px;height:4px;accent-color:#6ed9ae}
@media(max-width:480px){.rift-shell .rift-xp{font-size:8px}.rift-shell .rift-xp progress{width:28px}}

/* Item inspection: artwork first, readable rules, one clear action. */
.rift-shell .rift-item-dialog{position:fixed;width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 32px);margin:auto;padding:30px 32px 26px;border:1px solid #87979e;border-radius:8px;background:var(--panel);box-shadow:0 22px 72px #000b;color:var(--copy);scrollbar-width:thin;scrollbar-color:var(--trim-dark) transparent;overscroll-behavior:contain}
.rift-shell .rift-item-dialog::backdrop{background:#02070dcc;backdrop-filter:blur(3px)}
.rift-shell .rift-item-dialog .dialog-head{position:static;background:none;display:grid;grid-template-columns:minmax(0,1fr);justify-content:stretch;justify-items:center;gap:17px;margin:0 0 8px;padding:0;border:0}
.rift-shell .rift-item-dialog .rift-item-display{display:grid;place-items:center;width:100%;margin:0;padding:4px 0 0;background:none;border:0;border-radius:0;box-shadow:none}
.rift-shell .rift-item-dialog .rift-item-display>.rift-item-icon{display:block;width:192px;height:192px;max-width:100%;filter:drop-shadow(0 9px 8px #0005)}
.rift-shell .rift-item-dialog .dialog-head>h2{margin:0;font:600 27px/1.2 Georgia,serif;color:var(--copy);text-align:center;letter-spacing:0;overflow-wrap:anywhere}
.rift-shell .rift-item-dialog .dialog-head>.rift-item-close{position:absolute;top:10px;right:10px;display:grid;place-items:center;min-width:44px;width:44px;min-height:44px;height:44px;margin:0;padding:0;border:0;border-radius:4px;background:transparent;color:var(--muted);font:26px/1 Arial,sans-serif;box-shadow:none}
.rift-shell .rift-item-dialog .dialog-head>.rift-item-close:hover{background:#ffffff0b;color:var(--copy)}
.rift-shell .rift-item-dialog .rift-relic-info>.rift-item-status{margin:0 0 19px;font:12px/1.5 Arial,sans-serif;text-align:center;color:var(--muted)}
.rift-shell .rift-item-dialog .rift-relic-info>.rift-relic-summary{justify-content:center;width:100%;margin:0;padding:18px 0 16px;border:0;border-top:1px solid #c9b88c33;border-radius:0;background:none;color:var(--relic-color);font:600 17px/1.45 Georgia,serif;text-align:center}
.rift-shell .rift-item-dialog .rift-item-description{margin:0;color:var(--copy);font:14px/1.7 Arial,sans-serif;overflow-wrap:anywhere}
.rift-shell .rift-item-dialog .rift-item-note{margin:14px 0 0;color:var(--muted);font:12px/1.6 Arial,sans-serif}
.rift-shell .rift-item-dialog>button:not(.cs-sheet-handle){display:block;width:100%;margin:20px 0 0;padding:12px 16px;min-height:46px;border-radius:4px;background:var(--accent);border-color:var(--trim);color:var(--copy);box-shadow:none;font:600 14px/1.4 Arial,sans-serif}
.rift-shell .rift-item-dialog>p.rift-item-status{margin:16px 0 0;text-align:center;color:var(--muted);font:12px/1.5 Arial,sans-serif}
@media(max-width:480px){.rift-shell .rift-item-dialog{padding:25px 24px 23px}.rift-shell .rift-item-dialog .rift-item-display>.rift-item-icon{width:160px;height:160px}.rift-shell .rift-item-dialog .dialog-head>h2{font-size:24px}.rift-shell .rift-item-dialog .rift-item-description{font-size:14px}}
@media(max-height:600px){.rift-shell .rift-item-dialog .rift-item-display>.rift-item-icon{width:132px;height:132px}.rift-shell .rift-item-dialog{max-height:calc(100dvh - 20px);padding-top:22px}}
html[data-cs-high-contrast] .rift-shell .rift-item-dialog{background:#000;color:#fff;border-color:#fff}
html[data-cs-high-contrast] .rift-shell .rift-item-dialog :is(h2,p,.rift-relic-summary,.rift-item-close){color:#fff!important}

/* Approved steel frame: a hairline outside and a quiet inset inside. */
.rift-shell .rift-item-dialog::after{content:'';position:absolute;inset:5px;border:1px solid #81909966;border-radius:3px;pointer-events:none}
@media(max-width:640px) and (orientation:portrait){.rift-shell .rift-item-dialog.cs-sheet::after{border-radius:15px 15px 0 0}}
html[data-cs-high-contrast] .rift-shell .rift-item-dialog::after{border-color:#fff}

/* Explicit run cancellation, distinct from saving and quitting. */
.rift-shell .rift-pause-actions,.rift-shell .rift-flee-actions{display:flex;flex-wrap:wrap;gap:10px;margin:4px 0 20px}
.rift-shell .rift-pause-actions>button,.rift-shell .rift-flee-actions>button{flex:1 1 150px;margin:0;min-height:46px}
.rift-shell button.rift-danger{background:#482722;border-color:#ad776b;color:#fff0e8;box-shadow:none}
.rift-shell button.rift-danger:not(:disabled):hover{background:#60332b;border-color:#d69a8c}
.rift-shell .rift-flee-dialog{width:min(470px,calc(100vw - 24px));padding:25px;border:1px solid #87979e;border-radius:8px;background:var(--panel);box-shadow:0 22px 72px #000b}
.rift-shell .rift-flee-dialog .dialog-head h2{margin:0;font:600 24px/1.25 Georgia,serif}
.rift-shell .rift-flee-dialog>p{font:14px/1.65 Arial,sans-serif}
.rift-shell .rift-flee-dialog .rift-flee-preserved{color:var(--muted);font-size:12px}
.rift-shell .rift-flee-dialog>[role=alert]:empty{display:none}
.rift-shell .rift-flee-dialog .rift-flee-actions{margin:22px 0 0}
html[data-cs-high-contrast] .rift-shell .rift-flee-dialog{background:#000;border-color:#fff}
html[data-cs-high-contrast] .rift-shell .rift-flee-dialog p,html[data-cs-high-contrast] .rift-shell button.rift-danger{color:#fff}
