/* Rounded web shell; the game windows retain their original GUI sprites. */
.realm-mode {
  --radius-panel: 16px;
  --radius-control: 8px;
  --gui-edge: #a88b626b;
  --gui-ink: #101518;
  --gui-muted: #b4aca0;
  --gui-text: #e9e3d7;
  --gui-highlight: #d2b38b;
  --muted: var(--gui-muted);
  color: var(--gui-text);
}
.realm-mode ::selection { background: #884049; color: #fff3dc; }
.realm-atmosphere > video { opacity: .32; filter: saturate(.52); }
.realm-shadow { background: linear-gradient(0deg,#090d13f2,#090d1399 74%),linear-gradient(90deg,#090d1377,transparent 40%,#090d1355); }
.realm-border { opacity: .5; border-width: 12px; }
.realm-mode .site-header.realm-header { height: 104px; }
.realm-nav-link { min-height: 48px; font-size: 12px; border-radius: var(--radius-control); }
.realm-nav-link:before { clip-path: none; border-radius: inherit; }
.realm-header .button.realm-account-button { font-size: 10px; }
.realm-header .brand-logo-window { height: 94px; }
.realm-trail nav { font-size: 11px; }
.realm-motion-toggle { font-size: 10px; letter-spacing: .03em; }
.realm-chapter { font-size: 12px; }
.realm-content { max-width: 1420px; }
.realm-content .workshop-nav { margin-bottom: 22px; gap: 9px; }
.realm-content .workshop-nav a {
  clip-path: none;
  border-radius: 8px;
  font-size: 12px;
  padding: 14px 20px;
  box-shadow: inset 0 1px #d8c4a811,inset 0 -2px #0007;
  transition: background .25s,border-color .25s,box-shadow .25s,transform .25s;
}
.realm-content .workshop-nav a:hover { border-color: #c19b77; box-shadow: inset 0 0 24px #9b5b3c20,0 4px 20px #0005; transform: translateY(-2px); }
.realm-content .workshop-nav a:active { transform: translateY(1px); }
.realm-mode .button { border-radius: 11px; font-size: 11px; overflow: hidden; }
.realm-mode .button:before,.realm-mode .button:after { border-radius: inherit; }
.realm-mode .button:focus-visible,.realm-mode button:focus-visible,.realm-mode a:focus-visible { outline: 2px solid #e5c8a2; outline-offset: 4px; }
.realm-mode button,.realm-mode a { -webkit-tap-highlight-color: transparent; }
.realm-content input:not([type=range]),.realm-content select,.realm-content textarea,
.realm-mode .game-dialog input {
  border-radius: 8px;
  font-size: 13px;
  min-height: 44px;
  color: #e8e0d3;
}
.realm-content input::placeholder,.realm-content textarea::placeholder { color: #9b958b; }
.realm-content .panel,.realm-content .portal-frame,
.realm-content .gc-panel,.realm-content .gw-window,.realm-content .gw-panel {
  border-radius: var(--radius-panel);
  border-color: var(--gui-edge);
  box-shadow: 0 14px 40px #0004,inset 0 1px #e3d5b715;
}
.realm-content .panel:before { border-image: none; border: 1px solid #b49b6a30; inset: 4px; border-radius: 12px; opacity: 1; }
.realm-content .panel:after { display: none; }
.realm-content .portal-frame:before {
  inset: -1px;
  width: auto;
  height: auto;
  border: 1px solid #a8b8d934;
  border-radius: 11px;
  opacity: .75;
}
.realm-content .portal-frame:after { display: none; }
.realm-content .portal-panel-title { border-radius: 16px 16px 0 0; font-size: 22px; padding: 20px 26px; }
.portal-panel-title small { font-size: 10px; letter-spacing: .08em; }
.portal-content .portal-kicker,.portal-kicker { font-size: 11px; letter-spacing: .16em; }
.portal-heading { padding-bottom: 20px; margin-bottom: 22px; }
.portal-heading h1 { font-size: clamp(34px,3.4vw,49px); }
.portal-heading .portal-intro { font-size: 14px; line-height: 1.7; color: #bdb3a5; }
.portal-heading-mark { margin-bottom: 9px; }
.portal-tab,.portal-category,.portal-view-switch button { border-radius: 8px; font-size: 12px; }
.portal-tab { min-height: 44px; padding: 11px 22px; letter-spacing: .03em; }
.portal-tab:after { bottom: 4px; }
.portal-season { font-size: 11px; }
.portal-story { border-radius: 16px; }
.portal-story:after { border-radius: 11px; }
.portal-story-date { border-radius: 8px; }
.portal-story-date small { font-size: 10px; }
.portal-story-copy p { font-size: 13px; }
.portal-story-type,.portal-story-action { font-size: 11px; }
.portal-world-banner { border-radius: 14px; }
.portal-world-banner small { font-size: 10px; }
.portal-world-banner > span > span { font-size: 12px; }
.portal-reading { overflow: hidden; }
.portal-reading-toolbar { font-size: 12px; }
.portal-reading-body p { font-size: 15px; line-height: 1.85; }
.portal-reading-body p:first-child { font-size: 20px; }
.portal-dossier-copy { padding: 35px; }
.portal-dossier-copy .portal-kicker,.portal-membership { font-size: 10px; }
.portal-dossier-copy > p:not(.portal-kicker) { font-size: 13px; }
.portal-dossier-caption { font-size: 9px; letter-spacing: .08em; }
.portal-wallet-caption,.portal-wallet-body p { font-size: 12px; }
.portal-wallet > .button { font-size: 12px; }
.portal-shortcut { min-height: 100px; }
.portal-shortcut small { font-size: 11px; }
.portal-hero-slot { border-radius: 10px; }
.portal-hero-slot small { font-size: 10px; }
.portal-hero-slot strong { font-size: 17px; }
.portal-search,.portal-sort select { border-radius: 8px; }
.portal-sort > span { font-size: 12px; }
.portal-category { min-height: 46px; }
.portal-market-meta,.portal-market-meta > span:last-child { font-size: 11px; letter-spacing: .03em; }
.portal-item-card { border-radius: 14px; }
.portal-item-art { border-radius: 13px 13px 0 0; }
.portal-item-rarity { font-size: 10px; }
.portal-item-category { font-size: 11px; }
.portal-item-time { font-size: 11px; }
.portal-item-inspect { font-size: 11px; }
.portal-item-action { border-radius: 7px; width: 39px; height: 39px; }
.portal-item-copy h3 { font-size: 23px; }
.portal-market-foot { font-size: 11px; }
.portal-inventory.is-list .portal-item-art { border-radius: 13px 0 0 13px; }
.portal-inventory.is-list .portal-item-rarity { font-size: 9px; }
.portal-manuscript { padding: 28px; }
.portal-field-label { font-size: 13px; }
.portal-cover-drop { border-radius: 10px; }
.portal-cover-drop strong { font-size: 13px; }
.portal-cover-drop small,.portal-file-name,.portal-preview-label > small { font-size: 11px; }
.portal-preview-label { font-size: 12px; }
.portal-paper { border-radius: 14px; overflow: hidden; }
.portal-preview-text { font-size: 14px; line-height: 1.85; }
.realm-mode .game-dialog { border-radius: 16px; font-size: 14px; }
.realm-mode .game-dialog label { font-size: 13px; }
.realm-mode .dialog-close { border-radius: 6px; width: 32px; height: 32px; }
.portal-inspection-stats > div,.portal-item-description { font-size: 13px; }
.portal-inspection-price > span { font-size: 12px; }
.realm-mode .site-footer nav { font-size: 11px; }
.realm-mode .site-footer p span,.realm-mode .copyright { font-size: 10px; }
.realm-menu-toggle { border-radius: 7px; }
.realm-nav { border-radius: 10px; }
.catalog-loading,.catalog-failed {
  min-height: 320px;
  display: grid;
  place-content: center;
  gap: 20px;
  justify-items: center;
  text-align: center;
  border: 1px solid var(--gui-edge);
  border-radius: 16px;
  background: #10151bea;
  font-size: 14px;
  color: #c8bca8;
}
.catalog-loading:before {
  content: '';
  width: 34px;
  height: 34px;
  border: 1px solid #9c795636;
  border-top-color: #dbb98a;
  border-radius: 50%;
  animation: gui-loading 1s linear infinite;
}
@keyframes gui-loading { to { transform: rotate(360deg); } }
@media (max-width: 1000px) {
  .realm-mode .site-header.realm-header { height: 96px; }
  .realm-nav-link { font-size: 12px; }
  .realm-header .button.realm-account-button { font-size: 10px; }
  .portal-account-shortcuts { gap: 12px; }
  .portal-category { font-size: 11px; padding: 10px; }
}
@media (max-width: 650px) {
  .realm-mode .site-header.realm-header { height: 90px; }
  .realm-border { border-width: 8px; }
  .realm-content,.realm-trail { width: calc(100% - 34px); }
  .realm-trail nav { font-size: 10px; }
  .realm-motion-toggle { font-size: 9px; }
  .realm-header .button.realm-account-button { font-size: 9px; }
  .realm-content .workshop-nav { gap: 7px; margin-bottom: 18px; }
  .realm-content .workshop-nav a { font-size: 12px; padding: 13px 8px; }
  .portal-heading h1 { font-size: 35px; }
  .portal-heading .portal-intro { font-size: 12px; }
  .portal-heading > .portal-kicker { font-size: 10px; }
  .portal-tab { padding: 10px 12px; font-size: 11px; }
  .portal-content .portal-tabs { justify-content: flex-start; gap: 6px; }
  .portal-story-copy { left: 24px; right: 24px; }
  .portal-story-copy p { font-size: 13px; }
  .portal-story-small .portal-story-copy h2 { font-size: 27px; }
  .portal-world-banner small { font-size: 9px; }
  .portal-world-banner > span > span { font-size: 11px; }
  .portal-panel-title small { font-size: 9px; }
  .portal-dossier-copy { padding: 27px; }
  .portal-dossier h2 { font-size: 35px; }
  .portal-dossier-copy .portal-kicker { font-size: 9px; }
  .portal-dossier-caption { font-size: 8px; }
  .portal-inventory { grid-template-columns: 1fr; }
  .portal-item-card { display: grid; grid-template-columns: 120px minmax(0,1fr); }
  .portal-item-art { height: 100%; min-height: 190px; border-radius: 13px 0 0 13px; }
  .portal-item-art img { height: 110px; max-width: 90%; }
  .portal-item-copy { padding: 17px 15px 0; }
  .portal-item-copy h3 { font-size: 23px; min-height: 0; }
  .portal-item-rarity { font-size: 9px; left: 10px; letter-spacing: 0; }
  .portal-item-upgrade { top: 38px; }
  .portal-item-category { font-size: 10px; min-height: 0; }
  .portal-item-bottom { margin-top: 12px; }
  .portal-item-bottom > strong { font-size: 20px; }
  .portal-item-time { font-size: 10px; }
  .portal-item-action { width: 32px; height: 32px; }
  .portal-inventory.is-list .portal-item-card { grid-template-columns: 100px minmax(0,1fr); }
  .portal-inventory.is-list .portal-item-art { height: 100%; }
  .portal-inventory.is-list .portal-item-category { font-size: 10px; }
  .portal-sort { gap: 8px; }
  .portal-sort select { width: 155px; font-size: 12px; }
  .portal-market-meta > span:last-child { font-size: 9px; }
  .portal-shortcut { padding: 20px 15px; }
  .portal-shortcut small { font-size: 10px; }
  .portal-reading-body p { font-size: 14px; }
  .portal-reading-body p:first-child { font-size: 18px; }
  .portal-manuscript { padding: 23px; }
  .portal-preview-text { font-size: 14px; }
  .portal-preview-label > small { font-size: 10px; }
  .realm-mode .site-footer { padding-bottom: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-loading:before { animation: none; border-color: #dbb98a; }
  .realm-content .workshop-nav a { transition: none; }
}
/* R2 Departure reference: cold steel, deep blue and silver light. */
.realm-mode {
  --gui-edge: #8798bc60;
  --gui-ink: #101625;
  --gui-muted: #a9b4c9;
  --gui-text: #e4eaf4;
  --gui-highlight: #b9c9ec;
}
.realm-shadow { background: radial-gradient(ellipse at 50% 10%,#14265257,transparent 70%),linear-gradient(0deg,#080e1bf5,#090e1d9e 74%),linear-gradient(90deg,#07102188,transparent 40%,#090d1855); }
.realm-mode .realm-content :is(h1,h2,h3) { color: #e3e8f1; }
.realm-mode .realm-content h1 { text-shadow: 0 2px #171c2b,0 0 25px #97b6ff22; }
.realm-nav-link[aria-current]:before { background:radial-gradient(ellipse at 50% 100%,#5279ef52,transparent 85%),linear-gradient(#28364d,#172032);border-color:#8ba5d277; }
.realm-nav-link[aria-current] svg { color:#b8cef7;filter:drop-shadow(0 0 4px #537edd70); }
.realm-nav-link[aria-current]>i { background:#c3d6ff;box-shadow:0 0 12px #759bff; }
.realm-mode .realm-content :is(.eyebrow,.portal-kicker,.gw-heading>span) { color: #9aafd5; }
.realm-nav-link[aria-current],.realm-nav-link.active,.realm-nav-link.is-active,.realm-content .workshop-nav a[aria-current],
.realm-content :is(.gc-tab,.gw-class-tabs button,.portal-tab,.portal-category,.gw-stats-tabs button).is-active {
  color: #edf1ff; border-color: #7a91c5a6;
  background: radial-gradient(ellipse at 50% 100%,#567cff61,transparent 80%),linear-gradient(#273553e8,#121a2cf5);
  box-shadow: inset 0 1px #c6dcff2d,inset 0 -2px #abc4ff3d,0 0 25px #416bdf1c;
}
.realm-content .portal-frame:before {
  inset: 5px; border: 1px solid #a8b8d934; border-image: none; border-radius: 11px; opacity: 1;
}
.realm-content .portal-panel-title { background: linear-gradient(110deg,#263048,#171b26); }
.realm-content .portal-story,.realm-content .portal-frame { border-color: #8298bc68; }
.realm-content .portal-story:after { border-color: #bdcee140; }
.realm-content .portal-story-image img { filter: saturate(.9); }
.realm-content :is(.gc-panel,.gw-panel) { background: linear-gradient(135deg,#25324c60,transparent 55%),linear-gradient(#161c29f5,#101521fc); }
.realm-content .gc-record.is-active { background: linear-gradient(100deg,#2b448065,#121c2e); border-color:#839dd076; box-shadow:inset 2px 0 #8ca9ec; }
.realm-content .gc-monster-hero { background: radial-gradient(ellipse at 50% 20%,#2d42824a,transparent 65%),linear-gradient(#0c1322,#171d2b); }
.realm-content .gc-monster-stage:after { border-color: #839bd66b; box-shadow: 0 0 0 6px #597ad10d,0 0 0 7px #91b4ff29,0 0 32px #577eeb25; }
.realm-content .gc-quest-hero { min-height: 310px; background-position:center 35%; }
.realm-mode .gc-tab { border-radius:10px; }
.realm-content .gw-craft-hero { background:linear-gradient(90deg,#101727e8,#10172736),linear-gradient(0deg,#121925,transparent 80%),url('./assets/generated/r2-arsenal-v2.png') center 35%/cover; }
.realm-content :is(.gc-hero-kicker,.gc-monster-title .eyebrow,.gc-record-number) { color:#c2d1ed; }
.realm-content :is(.gc-tab,.gc-page-button,.gw-small-button,.gw-class-tabs button,.portal-tab,.portal-category,.gw-stats-tabs button) {
  position: relative; overflow:hidden; transition: transform .2s,border-color .2s,box-shadow .25s,background .25s;
}
.realm-content :is(.gc-tab,.gc-page-button,.gw-small-button,.gw-class-tabs button,.portal-tab,.portal-category,.gw-stats-tabs button):not(:disabled):hover {
  border-color:#bbd2ff; box-shadow: inset 0 0 22px #8cadff19,0 3px 18px #3052a838; transform:translateY(-2px);
}
.realm-content :is(.gc-tab,.gc-page-button,.gw-small-button,.gw-class-tabs button,.portal-tab,.portal-category,.gw-stats-tabs button):not(:disabled):active { transform: translateY(1px); }
.realm-content :is(.gc-tab,.gc-page-button,.gw-small-button,.gw-class-tabs button,.portal-tab,.portal-category,.gw-stats-tabs button)::before {
  content:''; position:absolute; inset:0; pointer-events:none; border-radius:inherit;
  background:linear-gradient(110deg,transparent 35%,#d9e7ff28 49%,transparent 62%) 190% 0/250% 100% no-repeat;
}
.realm-content :is(.gc-tab,.gc-page-button,.gw-small-button,.gw-class-tabs button,.portal-tab,.portal-category,.gw-stats-tabs button):hover::before { animation:r2-control-light .75s ease both; }
@keyframes r2-control-light { to { background-position:-90% 0; } }
@media(max-width:650px) {
  .realm-content .gc-quest-hero { min-height:240px; background-position:65% center; }
}
@media(prefers-reduced-motion:reduce) {
  .realm-mode *, .realm-mode *:before, .realm-mode *:after { animation-duration:.01ms!important; transition-duration:.01ms!important; }
}
