/* Fantasia clássica original: pedra azul, metal antigo e luz de cristal. */
:root {
  --wine: #253456;
  --deep: #0b1428;
  --gold: #c9ac70;
  --gold-light: #f4dfa9;
  --ink: #edf3fc;
  --muted: #b4bfd1;
  --panel: #19253d;
  color: var(--ink);
  background: #08111f;
}
body {
  background:
    radial-gradient(ellipse at 13% 7%, rgba(64, 103, 156, .42), transparent 37%),
    radial-gradient(ellipse at 86% 78%, rgba(56, 78, 130, .3), transparent 43%),
    repeating-linear-gradient(145deg, transparent 0 92px, rgba(203, 177, 118, .018) 92px 94px),
    linear-gradient(150deg, #101d36, #091325 52%, #070e1d);
}
body::before, body::after {
  display: block !important;
  border-color: rgba(142, 218, 234, .14);
  box-shadow: 0 0 55px rgba(85, 174, 200, .15), inset 0 0 35px rgba(108, 199, 226, .06);
  animation: realm-orbit 12s ease-in-out infinite alternate !important;
}
.magic-dust {
  display: block !important;
  opacity: .35;
  background-image:
    radial-gradient(circle, rgba(149, 231, 244, .9) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(238, 208, 142, .85) 0 1px, transparent 2px);
  background-size: 121px 159px, 177px 211px;
  animation: realm-dust 15s linear infinite !important;
}
.shell { max-width: 1220px; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; letter-spacing: .01em; }
h1 { color: #fff4d9; text-shadow: 0 2px 16px rgba(124, 206, 230, .28); }
h2, h3 { color: #f5e2b4; text-shadow: 0 2px 12px rgba(144, 197, 215, .15); }
p, .lead, .helper, .dashboard-field-note { color: #bdc9d9; }
.eyebrow { color: #91dce9; text-shadow: 0 0 12px rgba(86, 205, 230, .38); }
.card, .cardItem, .stat {
  position: relative;
  backdrop-filter: none;
  background: linear-gradient(145deg, rgba(28, 44, 70, .96), rgba(13, 24, 43, .97) 62%, rgba(21, 32, 54, .97));
  border: 1px solid rgba(207, 177, 112, .58);
  box-shadow: 0 22px 46px rgba(2, 8, 20, .52), inset 0 1px 0 rgba(255, 245, 214, .15), 0 0 20px rgba(87, 175, 202, .07);
}
.card::before {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  bottom: 9px;
  left: 9px;
  border: 1px solid rgba(246, 222, 165, .1);
  border-radius: inherit;
  pointer-events: none;
}
.crest, .crest.small {
  width: 74px;
  height: 81px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: realm-crest 5s ease-in-out infinite !important;
}
.crest.small { width: 51px; height: 59px; }
.crest img { object-fit: contain; filter: drop-shadow(0 0 10px rgba(107, 205, 235, .36)); }
.crest::after, .crest-mark { display: none !important; }
.auth { background: linear-gradient(150deg, #1d2d49, #101a2e 75%); }
.auth label, .form label, .cardItem label, .dashboard-editor label { color: #f1dda9; }
.auth input, .form input, .cardItem input, .dashboard-editor input, .dashboard-editor select {
  border-color: rgba(191, 166, 113, .45);
  background: rgba(5, 14, 29, .72);
  color: #f7f3e7;
}
.auth input:focus, .form input:focus, .cardItem input:focus, .dashboard-editor input:focus, .dashboard-editor select:focus {
  border-color: #8fdaed;
  box-shadow: 0 0 0 3px rgba(103, 200, 230, .18), 0 0 18px rgba(103, 200, 230, .19);
  transform: none;
}
.primary, .button {
  border-color: #e7d3a0;
  box-shadow: 0 7px 20px rgba(4, 14, 29, .38), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.primary { color: #0b1b2e; background: linear-gradient(135deg, #f4e5be, #c2a166 53%, #e6c982); }
.secondary { color: #f8e9bc; background: linear-gradient(135deg, #253e61, #182a47); border-color: rgba(211, 181, 119, .66); }
.primary:hover, .button:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(4, 14, 29, .5), 0 0 17px rgba(126, 212, 232, .22); }
.tabs { border-color: rgba(203, 173, 112, .58); background: rgba(9, 20, 39, .86); box-shadow: inset 0 0 24px rgba(5, 11, 26, .9); }
.tab {
  overflow: hidden;
  color: #cad8e8;
  border-color: rgba(197, 169, 116, .4);
  background: linear-gradient(145deg, #284161, #142842 69%, #152039);
  box-shadow: inset 0 1px 0 rgba(242, 231, 196, .08);
}
.tab::before {
  display: block !important;
  opacity: .27;
  background-image: repeating-linear-gradient(90deg, transparent 0 32px, rgba(111, 203, 232, .17) 33px 35px, transparent 36px 66px);
  animation: realm-runes 12s linear infinite !important;
}
.tab::after {
  display: block !important;
  opacity: .5;
  background: linear-gradient(90deg, transparent, rgba(168, 232, 244, .9), transparent);
  animation: realm-sweep 5.7s ease-in-out infinite !important;
}
.tab:hover { color: #fff5d7; box-shadow: 0 0 18px rgba(113, 207, 235, .25); }
.tab.active { color: #fdf4dd; border-color: #e6cc8a; background: linear-gradient(135deg, #395777, #254264 58%, #304364); box-shadow: inset 0 0 13px rgba(181, 225, 229, .16), 0 0 20px rgba(145, 211, 233, .18); }
.tab.active::before { opacity: .5; }
.panel-particles { display: block !important; }
.panel-particles i {
  display: block !important;
  background: #a8ecf4;
  filter: drop-shadow(0 0 5px #ddffff) drop-shadow(0 0 12px #63cee6);
  animation: realm-mote 5.2s ease-in-out infinite !important;
}
.hero { background: linear-gradient(115deg, #1b3657, #172744 60%, #263b60); }
.steps span { color: #dbe9f2; }
.steps b, .help-number, .icon-badge { background: linear-gradient(140deg, #f4e2b4, #ad8851); color: #0d1b31; box-shadow: 0 0 15px rgba(234, 207, 140, .31); }
.stat span, .cardItem .helper, .dashboard-editor small { color: #bac8d8; }
.stat strong, .dashboard-stats strong { color: #fff0c7; }
.stat.ready strong { color: #9ee5dc; }
.stat.pending strong { color: #ffd899; }
.empty, .help-grid > div, .store-finder, .batch-print { background: rgba(11, 24, 43, .69); border-color: rgba(199, 173, 113, .4); }
.file-picker, .template-editor-wrap {
  border-color: rgba(207, 182, 127, .59);
  background: linear-gradient(135deg, rgba(34, 57, 85, .93), rgba(13, 28, 50, .95));
  color: #f8edce;
}
.file-picker:focus-within { outline-color: rgba(128, 215, 235, .69); }
.file-picker-icon { border-color: rgba(229, 205, 151, .55); background: rgba(195, 165, 100, .16); color: #f6e4b3; }
.file-picker-copy small, .finder-tip { color: #c4d2df; }
.template-controls input[type=range] { accent-color: #83d6e7; }
.art-preview { border-color: #d4b879; background: #101e35; color: #f8eccf; }
.art-preview::backdrop { background: rgba(3, 10, 24, .82); }
.lookup-result.loading { border-color: #d4b879; background: #1b334f; color: #f8e9bc; }
.lookup-result.error { border-color: #d77777; background: #46242f; }
.magic-note { border-left-color: #88d5e7; background: rgba(77, 151, 181, .12); color: #f7e8bd; }
.danger { background: #4c273c; color: #ffe3d7; border-color: #bb7b7e; }
.dashboard-stats span, .business-page-item, .dashboard-quicklinks a {
  border-color: rgba(193, 166, 110, .43);
  background: linear-gradient(145deg, rgba(30, 50, 78, .91), rgba(16, 31, 54, .95));
  color: #edf3f6;
}
.business-page-item:hover, .business-page-item[aria-current="true"] {
  border-color: #e8d09a;
  background: linear-gradient(145deg, #365a77, #254163);
  box-shadow: 0 0 17px rgba(113, 205, 229, .2);
}
.business-page-item small, .dashboard-editor small, .dashboard-field-note { color: #bccbd9; }
.dashboard-quicklinks a { color: #f4e5b9; }
.dashboard-quicklinks a:hover { background: #2d4d68; }
.dashboard-map-card { overflow: hidden; }
.realm-map-frame {
  position: relative;
  margin: 18px 0 11px;
  padding: 10px;
  border: 1px solid #d8bd80;
  border-radius: 20px;
  background: linear-gradient(145deg, #3d5471, #0d1b31 33%, #1a304b 68%, #877145);
  box-shadow: 0 0 0 4px rgba(236, 212, 158, .08), 0 18px 30px rgba(2, 10, 22, .35), inset 0 1px 0 rgba(255, 242, 208, .42);
}
.realm-map-frame::before, .realm-map-frame::after {
  content: "✦";
  position: absolute;
  z-index: 450;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #f1dcaa;
  border-radius: 50%;
  background: #16283e;
  color: #f1d69a;
  box-shadow: 0 0 14px rgba(116, 207, 226, .37);
  pointer-events: none;
}
.realm-map-frame::before { top: -13px; left: -13px; }
.realm-map-frame::after { right: -13px; bottom: -13px; }
.dashboard-map {
  height: 440px;
  margin: 0;
  border: 1px solid rgba(248, 227, 179, .34);
  border-radius: 11px;
  background: #e9f1f2;
}
.dashboard-map .leaflet-tile-pane { filter: none; }
.dashboard-map .leaflet-tile-pane img.leaflet-tile { mix-blend-mode: normal; }
.dashboard-map .leaflet-control-zoom a {
  border-color: #9bb2bd;
  background: #1d3752;
  color: #f5e5b9;
}
.dashboard-map .leaflet-control-attribution {
  background: rgba(12, 27, 47, .82);
  color: #e3eaf1;
}
.dashboard-map .leaflet-control-attribution a { color: #9de5f1; }
.dashboard-map .leaflet-popup-content-wrapper,
.dashboard-map .leaflet-popup-tip {
  border: 1px solid #c8aa72;
  background: #1a2e49;
  color: #f5e8cb;
  box-shadow: 0 8px 28px rgba(0, 8, 20, .38);
}
.dashboard-map .leaflet-popup-content,
.dashboard-map .leaflet-popup-content p { color: #f5e8cb; }
.realm-map-compass {
  position: absolute;
  z-index: 430;
  top: 22px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid #e9d39f;
  border-radius: 50%;
  background: rgba(15, 33, 55, .88);
  color: #f8e7ba;
  font: 700 11px Georgia,serif;
  box-shadow: 0 0 17px rgba(133, 210, 226, .35);
  pointer-events: none;
}
.realm-map-compass span { position: absolute; top: 18px; color: #81d8e8; font-size: 15px; }
.realm-map-pin { background: transparent; border: 0; }
.realm-map-pin span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 2px solid #fff0bd;
  border-radius: 50% 50% 50% 4px;
  background: linear-gradient(145deg, #718193, #35465e);
  color: #ffe8a9;
  font-size: 21px;
  transform: rotate(-45deg);
  box-shadow: 0 2px 12px rgba(0, 18, 35, .6), 0 0 16px rgba(119, 215, 232, .44);
}
.realm-map-pin span::first-letter { transform: rotate(45deg); }
.realm-map-pin.sold span { background: linear-gradient(145deg, #dcaf5a, #8e6027); }
.realm-map-pin.active span { background: linear-gradient(145deg, #56d3d6, #11647a); }
.dashboard-map .map-popup-status { color: #d5ba7f; }
.dashboard-map .map-popup-select:hover, .dashboard-map .map-popup-select:focus-visible { background: #386984; }
.dashboard-status.pending { color: #ffe0a4; }
.dashboard-status.ready { color: #afe9dc; }

@keyframes realm-orbit { from { transform: translate(-8px, 5px) rotate(-8deg); } to { transform: translate(12px, -18px) rotate(12deg); } }
@keyframes realm-dust { to { background-position: 35px -120px, -46px -175px; } }
@keyframes realm-crest { 50% { filter: drop-shadow(0 0 12px rgba(123, 219, 241, .42)); } }
@keyframes realm-runes { to { background-position-x: 132px; } }
@keyframes realm-sweep { 0%, 28% { transform: rotate(25deg) translateX(-260%); opacity: 0; } 54% { opacity: .62; } 78%, 100% { transform: rotate(25deg) translateX(720%); opacity: 0; } }
@keyframes realm-mote { 0% { opacity: 0; transform: translateY(15px) scale(.45) rotate(0); } 25% { opacity: .85; } 100% { opacity: 0; transform: translateY(-115px) scale(.7) rotate(210deg); } }

@media (max-width: 600px) {
  .dashboard-map { height: 360px; }
  .realm-map-frame { padding: 7px; }
  .realm-map-compass { top: 17px; right: 17px; }
  .crest.small { width: 42px; height: 49px; }
  .topbar h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
