/* Presentation only. New immutable rules; no old client/assets are replaced. */
html[data-rift-shell="true"] { --rift-scroll-offset:190px; }
@media(min-width:1741px) { html[data-rift-shell="true"] { --rift-scroll-offset:118px; } }
html[data-rift-shell="true"] body main>.rift-content-page {
  width:100%; max-width:1680px; min-width:0; margin-inline:auto;
}
html[data-rift-shell="true"] body main>.rift-utility-page { max-width:1440px; }
html[data-rift-shell="true"] .rift-content-page :is(.action-card,.pets-hero,.pets-active-card,.pet-acquisition-card,.battlepass-mission-board,.battlepass-repeat-card) {
  border-color:#304967; border-radius:14px;
  box-shadow:inset 0 1px #b7dfff0d,0 8px 24px #0003;
}
html[data-rift-shell="true"] .rift-content-page>.action-card,
html[data-rift-shell="true"] .rift-content-page :is(.profile-knight-hero,.stronghold-controls,.db-energy-card,.db-pool-card,.db-milestones-card,.db-leaderboard-card) {
  padding:clamp(16px,1.6vw,26px);
}
html[data-rift-shell="true"] .rift-content-page :is(.section-heading,.profile-public-actions,.pet-acquisition-card,.pets-inventory-heading) { min-width:0; gap:16px; }
html[data-rift-shell="true"] .rift-content-page .section-heading>div { min-width:0; }
html[data-rift-shell="true"] .rift-content-page .section-heading h2 { font-size:clamp(22px,1.8vw,30px); line-height:1.2; letter-spacing:-.025em; }
html[data-rift-shell="true"] .rift-content-page :is(.timer-line,.muted) { line-height:1.6; }
html[data-rift-shell="true"] .rift-content-page :is(.event-shell,.game-layout,.profile-grid,.referral-layout,.shortlinks-layout,.faucet-layout,.pets-page) { min-width:0; gap:20px; }
html[data-rift-shell="true"] .rift-content-page :is(.event-active-grid,.raid-leaderboard-grid,.raid-mission-grid,.quest-grid,.shortlink-grid,.offer-grid,.stronghold-building-grid) { gap:16px; }
html[data-rift-shell="true"] .rift-content-page :is(.event-active-grid,.raid-leaderboard-grid,.raid-mission-grid,.profile-knight-row)>* { min-width:0; }
html[data-rift-shell="true"] .rift-content-page :is(.leaderboard-table-wrap,.table-scroll) { max-width:100%; overflow-x:auto; }
html[data-rift-shell="true"] .rift-content-page .section-heading>.reward-pill { flex-shrink:0; }
html[data-rift-shell="true"] .rift-content-page :is(.stronghold-intro-copy,.profile-public-actions>.timer-line) { max-width:90ch; }
html[data-rift-shell="true"] .rift-content-page :is(.stronghold-stat-grid,.stat-grid) { gap:12px; }
html[data-rift-shell="true"] .rift-content-page :is(.stronghold-stat-grid>div,.profile-combat-summary) { border-color:#314968; border-radius:10px; background:#041225b8; }
/* These pages previously retained rail-sized columns or unbounded forms. */
html[data-rift-shell="true"] .rift-content-page.profile-page .profile-knight-row {
  grid-template-columns:minmax(250px,.85fr) minmax(280px,1fr) minmax(300px,1fr); gap:20px;
}
html[data-rift-shell="true"] .rift-content-page .profile-combat-summary { padding:18px; }
html[data-rift-shell="true"] .rift-content-page .profile-hero-card { gap:24px; align-items:center; }
html[data-rift-shell="true"] .rift-content-page .profile-public-actions { max-width:620px; }
html[data-rift-shell="true"] .rift-content-page .pet-acquisition-card { align-items:center; flex-wrap:wrap; }
html[data-rift-shell="true"] .rift-content-page .pet-acquisition-links { flex-wrap:wrap; gap:10px; }
html[data-rift-shell="true"] .rift-content-page .pets-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr)); gap:18px; }
html[data-rift-shell="true"] .rift-content-page[data-panel="settings"] .form-grid { gap:18px; }
/* Keep the shared mode switcher in normal flow, never over map or enemy text. */
html[data-rift-shell="true"] body #campaign>.mode-hero,
html[data-rift-shell="true"] body :is(#daily-boss,#guild-event,.stronghold-page)>.mode-hero {
  position:relative; inset:auto; width:100%; z-index:auto; margin:0 0 16px!important;
}
html[data-rift-shell="true"] body .mode-hero .dashboard-play-jumps {
  width:max-content!important; max-width:100%; scrollbar-width:thin;
}
html[data-rift-shell="true"] body .mode-hero .dashboard-play-jumps .dashboard-play-tab {
  min-height:40px!important; padding:10px 18px!important;
}
/* Enemy name, stage and HP share ONE battlefield-centred coordinate system. */
html[data-rift-shell="true"] #campaign .rift-fight { padding:24px; scroll-margin-top:var(--rift-scroll-offset); }
html[data-rift-shell="true"] #campaign :is(.rift-campaign-scene,#gameLabArena) { scroll-margin-top:var(--rift-scroll-offset); }
html[data-rift-shell="true"] #campaign .rift-enemy-hud {
  position:relative; z-index:4; display:grid; justify-items:center; gap:12px;
  width:calc(100% - var(--rift-hud-width) - 18px); min-width:0; margin:0;
}
html[data-rift-shell="true"] #campaign .rift-enemy-heading {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  width:100%; max-width:660px; margin:0; gap:8px; text-align:center;
}
html[data-rift-shell="true"] #campaign .rift-enemy-heading>div { min-width:0; max-width:100%; }
html[data-rift-shell="true"] #campaign .rift-enemy-heading h2 {
  margin:6px 0 0; font-size:clamp(26px,2.4vw,38px); line-height:1.12; overflow-wrap:anywhere; text-wrap:balance;
}
html[data-rift-shell="true"] #campaign .rift-enemy-heading .eyebrow {
  margin:0; font-size:10px; line-height:1.5; letter-spacing:.14em;
  color:#b5efff; text-shadow:0 1px 5px #000;
}
html[data-rift-shell="true"] #campaign #gameLabStage {
  min-height:26px; max-width:100%; padding:5px 11px; font-size:10px; line-height:1.4;
  color:#cbdcf4; border:1px solid #6888b066; border-radius:6px; background:#031023d9;
}
html[data-rift-shell="true"] #campaign .rift-health-shell {
  position:relative; inset:auto; width:min(100%,480px); min-width:0; margin:0;
  padding:10px 12px; border:1px solid #6f82955c; border-radius:9px;
  background:linear-gradient(180deg,#071324ed,#030b1be8); box-shadow:0 4px 14px #0005,inset 0 1px #b6deff12;
}
html[data-rift-shell="true"] #campaign .rift-enemy-vitals {
  display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap;
  gap:5px 12px; margin-bottom:7px; color:#b9cce4; font-size:10px; line-height:1.3;
}
html[data-rift-shell="true"] #campaign .rift-enemy-vitals>#gameLabHpOverlay {
  position:static; inset:auto; display:block; padding:0; color:#fff0f5;
  font-size:12px; font-weight:700; font-variant-numeric:tabular-nums; text-shadow:none;
}
html[data-rift-shell="true"] #campaign .rift-enemy-health {
  position:relative; inset:auto; display:block; width:100%; height:12px; min-height:12px;
  margin:0; border:1px solid #ffc4d322; border-radius:5px; overflow:hidden; background:#170c1e;
}
html[data-rift-shell="true"] #campaign .rift-enemy-health>span {
  height:100%; border-radius:4px; background:linear-gradient(90deg,#df315c,#ff668b); box-shadow:inset 0 1px #ffa9bb66;
}
html[data-rift-shell="true"] #campaign .solo-enemy-portrait {
  top:245px; left:24px; right:calc(var(--rift-hud-width) + 42px); bottom:145px;
}
html[data-rift-shell="true"] #campaign .rift-objectives-hud { top:24px; right:24px; }
html[data-rift-shell="true"] #campaign .campaign-world-map-card { padding:24px; }
html[data-rift-shell="true"] #campaign .campaign-world-map-card>.section-heading { align-items:center; flex-wrap:wrap; }
html[data-rift-shell="true"] #campaign .campaign-world-map-card .section-heading>div { min-width:0; }
html[data-rift-shell="true"] #campaign #gameLabWorldMapStatus { white-space:normal; text-align:right; line-height:1.4; }
html[data-rift-shell="true"] #campaign .rift-campaign-scene { background-image:linear-gradient(180deg,#020b1e73,transparent 38%,#01081b44),var(--rift-arena-art); }
@media(max-width:1199px) {
  html[data-rift-shell="true"] .rift-content-page.profile-page .profile-knight-row { grid-template-columns:minmax(240px,.85fr) minmax(0,1.15fr); }
  html[data-rift-shell="true"] .rift-content-page .profile-combat-summary { grid-column:1/-1; }
}
@media(min-width:981px) and (max-width:1199px) {
  html[data-rift-shell="true"] #campaign .rift-campaign-scene { --rift-hud-width:280px; }
  html[data-rift-shell="true"] #campaign .rift-fight { min-height:820px; }
  html[data-rift-shell="true"] #campaign .rift-command-tray { left:24px; right:calc(var(--rift-hud-width) + 36px); bottom:26px; }
  html[data-rift-shell="true"] #campaign .rift-player-hud { bottom:210px; }
  html[data-rift-shell="true"] #campaign .rift-battle-status { left:24px; right:calc(var(--rift-hud-width) + 36px); bottom:5px; }
  html[data-rift-shell="true"] #campaign .solo-enemy-portrait { bottom:365px; }
}
@media(max-width:980px) {
  html[data-rift-shell="true"] #campaign .rift-enemy-hud { width:100%; }
  html[data-rift-shell="true"] #campaign .solo-enemy-portrait { left:24px; right:24px; bottom:195px; }
  html[data-rift-shell="true"] #campaign .rift-objectives-hud { inset:auto; margin:0 16px 16px; }
  html[data-rift-shell="true"] .rift-content-page .event-active-grid { grid-template-columns:1fr; }
  html[data-rift-shell="true"] .rift-content-page .event-active-grid>* { grid-column:auto; }
}
@media(max-width:720px) {
  html[data-rift-shell="true"] .rift-content-page.profile-page .profile-knight-row { grid-template-columns:minmax(0,1fr); }
  html[data-rift-shell="true"] .rift-content-page .profile-combat-summary { grid-column:auto; }
  html[data-rift-shell="true"] .rift-content-page .profile-hero-card { flex-wrap:wrap; }
  html[data-rift-shell="true"] .rift-content-page .profile-public-actions { width:100%; max-width:none; }
}
@media(max-width:640px) {
  html[data-rift-shell="true"] { --rift-scroll-offset:172px; }
  html[data-rift-shell="true"] .rift-content-page :is(.action-card,.pets-hero,.pets-active-card,.pet-acquisition-card,.battlepass-mission-board) { border-radius:11px; }
  html[data-rift-shell="true"] .rift-content-page :is(.section-heading,.pets-inventory-heading) { flex-wrap:wrap; gap:10px; }
  html[data-rift-shell="true"] .rift-content-page .section-heading>.reward-pill { flex-shrink:1; max-width:100%; }
  html[data-rift-shell="true"] .rift-content-page .section-heading h2 { font-size:22px; }
  html[data-rift-shell="true"] .rift-content-page :is(.stronghold-stat-grid,.raid-leaderboard-grid,.raid-mission-grid) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  html[data-rift-shell="true"] .rift-content-page .stronghold-stat-grid>div { padding:12px; }
  html[data-rift-shell="true"] .rift-content-page .stronghold-stat-grid strong { font-size:20px; overflow-wrap:anywhere; }
  html[data-rift-shell="true"] .rift-content-page .stronghold-claim-panel { align-items:stretch; flex-direction:column; gap:14px; }
  html[data-rift-shell="true"] body .mode-hero .dashboard-play-jumps { display:grid!important; grid-template-columns:repeat(4,minmax(0,1fr))!important; width:100%!important; gap:2px!important; }
  html[data-rift-shell="true"] body .mode-hero .dashboard-play-jumps .dashboard-play-tab { padding:9px 4px!important; min-width:0; }
  html[data-rift-shell="true"] body .mode-hero .dashboard-play-jumps .dashboard-play-tab>span { font-size:10px!important; white-space:normal; text-align:center; }
  html[data-rift-shell="true"] #campaign .rift-fight { min-height:800px; padding:18px 14px; }
  html[data-rift-shell="true"] #campaign .rift-enemy-hud { gap:10px; }
  html[data-rift-shell="true"] #campaign .rift-enemy-heading h2 { font-size:clamp(24px,6.5vw,30px); }
  html[data-rift-shell="true"] #campaign .rift-enemy-heading .eyebrow { font-size:9px; letter-spacing:.1em; }
  html[data-rift-shell="true"] #campaign .rift-health-shell { width:min(100%,400px); padding:9px 11px; }
  html[data-rift-shell="true"] #campaign .rift-enemy-vitals>#gameLabHpOverlay { font-size:11px; }
  html[data-rift-shell="true"] #campaign .rift-enemy-health { height:11px; min-height:11px; }
  html[data-rift-shell="true"] #campaign .solo-enemy-portrait { top:245px; left:5%; right:5%; bottom:320px; }
  html[data-rift-shell="true"] #campaign .rift-objectives-hud { margin:0 10px 10px; }
  html[data-rift-shell="true"] #campaign .campaign-world-map-card { padding:16px; }
  html[data-rift-shell="true"] #campaign #gameLabWorldMapStatus { text-align:left; }
}
@media(max-width:400px) {
  html[data-rift-shell="true"] .rift-content-page :is(.raid-leaderboard-grid,.raid-mission-grid) { grid-template-columns:minmax(0,1fr); }
}
