/* Aetheria Origins 1x | Home Polish V5002
 * Scope: editorial spacing, herald dock parity, full mural message dialog.
 * Pure visual/interaction layer. Existing status, notification data and rewards untouched.
 */

@media (min-width:1181px) {
  /* Preserve the hero CTAs; add air BEFORE the editorial strip. */
  #realm-news.realm-v500 { margin-top:22px; }
}
@media (max-width:1180px) {
  #realm-news.realm-v500 { margin-top:18px; }
}
@media (max-width:660px) {
  #realm-news.realm-v500 { margin-top:15px; }
}

/* Herald drawer uses the same 3000ms spotlight and 700ms dismissal as the right dock.
 * The original announcement launcher remains available on opening the left tab. */
body.aetheria-promos-pending .aetheria-herald {
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
  transition:none!important;
}
.aetheria-herald.aor-herald-v5002 {
  --herald-tab-gold:#eac176;
}
.aetheria-herald.aor-herald-v5002.is-docked-v5002:not(.is-open) {
  left:0!important;
  bottom:20px!important;
  width:58px!important;
}
.aetheria-herald.aor-herald-v5002.is-docked-v5002:not(.is-open) .aetheria-herald__launcher {
  display:none!important;
}
.aor-herald-tab-v5002 {
  display:none!important;
  position:relative;
  isolation:isolate;
  height:126px;
  width:58px;
  padding:9px 5px;
  border:1px solid rgba(248,207,131,.91);
  border-left:0;
  border-radius:0 14px 14px 0;
  color:#f8db9e;
  background:linear-gradient(155deg,#101c2b 0%,#09111e 64%,#17170f 100%);
  box-shadow:4px 0 15px rgba(0,0,0,.58),inset 0 0 12px rgba(225,166,70,.17),1px 0 8px rgba(249,199,99,.25);
  cursor:pointer;
  pointer-events:auto!important;
  flex-direction:column;
  align-items:center;
  justify-content:space-between;
  touch-action:manipulation;
  overflow:visible;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  transition:filter .2s ease,transform .2s ease;
}
.aor-herald-tab-v5002::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  border-radius:0 13px 13px 0;
  background-image:var(--herald-art);
  background-position:center center;
  background-repeat:no-repeat;
  background-size:cover;
  opacity:.23;
}
.aor-herald-tab-v5002::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  border-radius:0 13px 13px 0;
  background:linear-gradient(180deg,rgba(6,13,23,.62),rgba(6,13,23,.87) 47%,rgba(7,15,25,.87));
}
.aetheria-herald.aor-herald-v5002.is-docked-v5002:not(.is-open) .aor-herald-tab-v5002 {
  display:flex!important;
}
.aor-herald-tab-v5002:hover,
.aor-herald-tab-v5002:focus-visible {
  transform:translateX(3px);
  filter:brightness(1.15) drop-shadow(0 0 9px rgba(235,182,83,.43));
}
.aor-herald-tab-v5002:focus-visible {
  outline:2px solid #ffda90;
  outline-offset:2px;
}
.aor-herald-tab-v5002__bell {
  color:#ffd288;
  font-size:21px;
  line-height:1;
  text-shadow:0 0 9px rgba(246,187,73,.5);
}
.aor-herald-tab-v5002__label {
  writing-mode:vertical-rl;
  transform:rotate(180deg);
  white-space:nowrap;
  color:#f5d397;
  font:800 10px/1 system-ui,sans-serif;
  letter-spacing:.08em;
  text-shadow:0 1px 5px #000;
}
.aor-herald-tab-v5002__chevron {
  font:700 20px/1 Georgia,serif;
  color:#efbf68;
  transform:rotate(180deg);
}
.aor-herald-tab-v5002__count {
  position:absolute;
  top:-7px;
  right:-8px;
  z-index:2;
  min-width:24px;
  height:24px;
  padding:0 5px;
  display:grid;
  place-items:center;
  border-radius:20px;
  border:1px solid #fce4a2;
  color:#0a1721;
  background:#f1d18c;
  box-shadow:0 3px 14px #0009,0 0 10px rgba(245,192,94,.35);
  font:bold 11px/1 system-ui,sans-serif;
}
@media(max-width:760px) {
  .aetheria-herald.aor-herald-v5002.is-docked-v5002:not(.is-open) {
    left:0!important;
    bottom:max(12px, env(safe-area-inset-bottom))!important;
    width:51px!important;
  }
  .aor-herald-tab-v5002 {width:51px;height:118px;}
}
@media(max-height:530px) {
  .aor-herald-tab-v5002 {height:86px;}
  .aor-herald-tab-v5002__bell {font-size:16px;}
  .aor-herald-tab-v5002__label {font-size:9px;}
}
@media(prefers-reduced-motion:reduce) {
  .aor-herald-tab-v5002 {transition:none!important;}
}

/* Mural: a short preview stays inside the horizontal strip. Full copy opens on demand. */
.realm-v500__message {
  transition:border-color .18s ease,background .18s ease;
}
.realm-v500__message:has(.realm-v500__readmore-v5002):hover {
  border-color:rgba(231,188,106,.44);
  background:rgba(15,36,51,.92);
}
.realm-v500__readmore-v5002 {
  display:inline-flex;
  align-items:center;
  gap:5px;
  width:max-content;
  max-width:100%;
  margin:6px 0 0;
  padding:0 0 2px;
  border:0;
  border-bottom:1px solid rgba(229,180,84,.45);
  border-radius:0;
  color:#edc87b;
  background:transparent;
  cursor:pointer;
  text-align:left;
  font:700 .66rem/1.35 system-ui,sans-serif;
  transition:color .18s ease,border-color .18s ease;
}
.realm-v500__readmore-v5002:hover,
.realm-v500__readmore-v5002:focus-visible {
  color:#ffedc5;
  border-color:#f5d18e;
}
.realm-v500__readmore-v5002:focus-visible {
  outline:2px solid #e7b86b;
  outline-offset:4px;
}
.realm-v500__readmore-v5002 svg {
  width:12px;
  height:12px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  flex-shrink:0;
}
.aor-mural-dialog-v5002 {
  position:fixed;
  inset:0;
  width:min(600px,calc(100vw - 24px));
  max-width:600px;
  max-height:min(84dvh,780px);
  margin:auto;
  padding:0;
  overflow:hidden;
  color:#ecf2f6;
  background:linear-gradient(145deg,#0d2637,#081521 60%,#060d17);
  border:1px solid rgba(242,195,107,.75);
  border-radius:16px;
  box-shadow:0 30px 95px rgba(0,0,0,.75),inset 0 0 25px rgba(222,178,95,.08);
}
.aor-mural-dialog-v5002::backdrop {
  background:rgba(2,6,12,.82);
  backdrop-filter:blur(6px);
}
.aor-mural-dialog-v5002__wrap {
  display:flex;
  flex-direction:column;
  max-height:min(84dvh,780px);
}
.aor-mural-dialog-v5002__head {
  display:flex;
  gap:14px;
  align-items:start;
  padding:19px 20px 15px;
  border-bottom:1px solid rgba(221,177,91,.32);
  background:radial-gradient(circle at 95% 0%,rgba(228,176,79,.1),transparent 65%);
}
.aor-mural-dialog-v5002__seal {
  display:grid;
  place-items:center;
  flex:0 0 46px;
  width:46px;height:46px;
  border-radius:50%;
  border:2px solid #c99649;
  color:#ffdd99;
  font:900 12px system-ui,sans-serif;
  background:linear-gradient(135deg,#123a54,#08131e);
  box-shadow:0 0 14px rgba(231,177,74,.22);
}
.aor-mural-dialog-v5002__identity {flex:1;min-width:0;}
.aor-mural-dialog-v5002__eyebrow {
  margin:0 0 6px;
  color:#d5ae66;
  font:800 10px/1.2 system-ui,sans-serif;
  letter-spacing:.13em;
  text-transform:uppercase;
}
.aor-mural-dialog-v5002__identity h2 {
  margin:0 0 6px;
  color:#fff4da;
  font:700 clamp(1.05rem,2.6vw,1.35rem)/1.3 'Cinzel',Georgia,serif;
  overflow-wrap:anywhere;
}
.aor-mural-dialog-v5002__identity time {
  color:#9db2c0;
  font:12px system-ui,sans-serif;
}
.aor-mural-dialog-v5002__close {
  flex:0 0 34px;
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  padding:0;
  border:1px solid rgba(234,187,100,.48);
  border-radius:9px;
  background:rgba(5,13,22,.84);
  color:#e8d4ac;
  font:24px/1 system-ui,sans-serif;
  cursor:pointer;
}
.aor-mural-dialog-v5002__close:hover,
.aor-mural-dialog-v5002__close:focus-visible {
  color:#fff;
  background:#2c2a25;
  border-color:#f1c47b;
}
.aor-mural-dialog-v5002__body {
  overflow:auto;
  padding:20px 25px;
  max-height:54dvh;
  overscroll-behavior:contain;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font:400 clamp(.84rem,1.5vw,.97rem)/1.75 system-ui,sans-serif;
  color:#dce5ed;
}
.aor-mural-dialog-v5002__footer {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  border-top:1px solid rgba(217,176,94,.24);
  padding:13px 20px;
  color:#91aabd;
  font:11px system-ui,sans-serif;
}
.aor-mural-dialog-v5002__done {
  padding:9px 17px;
  border:1px solid #ebc47d;
  border-radius:9px;
  background:linear-gradient(135deg,#f7d693,#cb9d4d);
  color:#0a1621;
  font:800 12px system-ui,sans-serif;
  cursor:pointer;
}
.aor-mural-dialog-v5002__done:hover {filter:brightness(1.08);}
@media(max-width:520px) {
  .aor-mural-dialog-v5002__head {padding:14px 14px 12px;gap:10px;}
  .aor-mural-dialog-v5002__seal {width:39px;height:39px;flex-basis:39px;}
  .aor-mural-dialog-v5002__body {padding:16px;font-size:.84rem;}
  .aor-mural-dialog-v5002__footer {padding:12px 14px;}
}

/* CSS-generated call to action avoids changing feed.textContent used by live polling. */
.realm-v500__readmore-v5002::before {
  content:attr(data-label);
}
.realm-v500__readmore-v5002::after {
  content:"↗";
  margin-left:2px;
  color:#ffd389;
  font-size:12px;
  line-height:1;
}
/* Never display the collapsed launcher and its slim tab at the same time. */
.aetheria-herald.aor-herald-v5002:not(.is-docked-v5002) .aor-herald-tab-v5002,
.aetheria-herald.aor-herald-v5002.is-open .aor-herald-tab-v5002 {
  display:none!important;
}
