/* ==========================================================================
   Aurora Glass – the signature layer on top of aurora.css
   • living aurora mesh background + film grain
   • every surface is frosted glass with a specular edge
   • Instagram-style left rail on desktop, floating glass dock on mobile
   • shimmer on primary actions, animated story rings, glass forms & admin
   Loaded after aurora.css. Every motion respects .au-reduce / prefers-reduced-motion.
   ========================================================================== */

:root {
  --ag-blur: 26px;
  --ag-sat: 180%;
  --ag-edge: rgba(255, 255, 255, .7);
  --ag-edge-2: rgba(255, 255, 255, .12);
  --ag-radius: var(--au-radius, 28px);
  --au-bg: #f1effb;
  --au-surface: rgba(255, 255, 255, .56);
  --au-surface-2: rgba(110, 96, 170, .11);
  --au-glass: rgba(255, 255, 255, .5);
  --au-line: rgba(70, 56, 130, .12);
  --au-shadow: 0 1px 1px rgba(40, 24, 110, .05), 0 2px 6px rgba(40, 24, 110, .04), 0 26px 50px -24px rgba(70, 40, 190, .38);
  --ag-rail: 248px;
}

html.king-night {
  --au-bg: #07070d;
  --au-surface: rgba(26, 26, 40, .52);
  --au-surface-2: rgba(255, 255, 255, .08);
  --au-glass: rgba(18, 18, 30, .5);
  --au-line: rgba(255, 255, 255, .1);
  --ag-edge: rgba(255, 255, 255, .22);
  --ag-edge-2: rgba(255, 255, 255, .04);
  --au-shadow: 0 1px 1px rgba(0, 0, 0, .5), 0 30px 60px -26px rgba(0, 0, 0, .85);
}

/* ---------- living background -------------------------------------------- */
html { background-color: var(--au-bg) !important; }
body.aurora-theme { background: transparent !important; }

body.aurora-theme::before {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at 18% 22%, color-mix(in srgb, var(--au-b) 62%, transparent), transparent 70%),
    radial-gradient(34vmax 34vmax at 82% 16%, color-mix(in srgb, var(--au-a) 55%, transparent), transparent 70%),
    radial-gradient(40vmax 40vmax at 70% 86%, color-mix(in srgb, var(--au-c) 48%, transparent), transparent 70%),
    radial-gradient(30vmax 30vmax at 12% 90%, color-mix(in srgb, var(--au-a) 36%, transparent), transparent 70%);
  filter: blur(18px) saturate(140%);
  animation: ag-drift 38s ease-in-out infinite alternate;
}
body.aurora-theme::before { opacity: .8; }
html.king-night body.aurora-theme::before { opacity: .5; }
html[data-au-glow="vivid"] body.aurora-theme::before { opacity: 1; }
html.king-night[data-au-glow="vivid"] body.aurora-theme::before { opacity: .75; }
html[data-au-glow="off"] body.aurora-theme::before { display: none; }

body.aurora-theme::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

@keyframes ag-drift {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(3vmax, -2vmax, 0) rotate(8deg) scale(1.08); }
  100% { transform: translate3d(-3vmax, 3vmax, 0) rotate(-6deg) scale(1.02); }
}

/* ---------- glass surfaces ----------------------------------------------- */
.au-prompt, .au-sheet,
.aurora-theme .king-dropdown, .aurora-theme .king-dropdown2, .aurora-theme .king-flter,
.aurora-theme .king-mega-menu, .aurora-theme .king-q-view, .aurora-theme .king-related,
.aurora-theme .king-sidebar, .aurora-theme .king-widget-wb, .aurora-theme .leftmenu,
.aurora-theme .maincom, .aurora-theme .pboxes, .aurora-theme .share-bar, .aurora-theme .user-box,
.au-card-in, .aurora-theme .king-form-tall-table, .aurora-theme .modal-content,
.aurora-theme .king-main-msg, .aurora-theme .king-error, .aurora-theme .king-profile-box {
  -webkit-backdrop-filter: blur(var(--ag-blur)) saturate(var(--ag-sat));
  backdrop-filter: blur(var(--ag-blur)) saturate(var(--ag-sat));
  box-shadow: inset 0 1px 0 var(--ag-edge), inset 0 0 0 1px var(--ag-edge-2), var(--au-shadow);
  border-color: var(--au-line);
}

.au-card-in {
  background: var(--au-surface);
  border-radius: var(--au-radius, var(--ag-radius));
  transition: transform .5s var(--au-spring);
}
@media (hover: hover) {
  .au-card-in:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 var(--ag-edge), inset 0 0 0 1px var(--ag-edge-2), 0 2px 4px rgba(40,24,110,.06), 0 40px 70px -26px rgba(90, 50, 220, .5); }
}

/* sheen that sweeps across a card's media on hover */
.au-card-media, .au-card .king-thumb-in { position: relative; overflow: hidden; }
.au-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .28) 50%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .9s var(--au-ease);
}
@media (hover: hover) { .au-card-in:hover .au-card-media::after { transform: translateX(120%); } }

/* ---------- header / brand ----------------------------------------------- */
.aurora-theme .king-header {
  background-color: var(--au-glass);
  box-shadow: inset 0 -1px 0 var(--ag-edge-2), 0 10px 30px -22px rgba(60, 30, 160, .5);
}
.aurora-theme .king-logo a, .aurora-theme .king-logo {
  background: linear-gradient(110deg, var(--au-text) 0%, var(--au-b) 38%, var(--au-c) 52%, var(--au-text) 70%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: ag-shimmer-text 7s linear infinite;
}
.aurora-theme .king-logo img { -webkit-text-fill-color: initial; }
@keyframes ag-shimmer-text { to { background-position: -250% 0; } }

/* ---------- primary actions: shimmer -------------------------------------- */
.aurora-theme input[type="submit"], .aurora-theme button[type="submit"],
.aurora-theme .king-form-tall-button, .aurora-theme .king-form-wide-button,
.aurora-theme .king-nav-sub-selected, .aurora-theme .king-submit .kingadd,
.aurora-theme .follow-button, .aurora-theme .king-follow {
  background-image: linear-gradient(115deg, var(--au-a), var(--au-b) 45%, var(--au-c) 80%);
  background-size: 200% 100%;
  color: #fff;
  border: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 12px 24px -10px color-mix(in srgb, var(--au-b) 70%, transparent);
  position: relative;
  overflow: hidden;
  transition: background-position .8s var(--au-ease), transform .3s var(--au-spring), box-shadow .3s;
}
.aurora-theme input[type="submit"]:hover, .aurora-theme button[type="submit"]:hover,
.aurora-theme .king-form-tall-button:hover, .aurora-theme .king-form-wide-button:hover { background-position: 100% 0; transform: translateY(-1px); }
.aurora-theme input[type="submit"]:active, .aurora-theme button[type="submit"]:active { transform: scale(.96); }

/* ---------- stories: spinning conic rings --------------------------------- */
.au-story.is-fresh .au-ring::before { animation: ag-spin 5s linear infinite; }
@keyframes ag-spin { to { rotate: 360deg; } }

/* ---------- forms: glass fields ------------------------------------------- */
.aurora-theme input[type="text"], .aurora-theme input[type="email"], .aurora-theme input[type="password"],
.aurora-theme input[type="search"], .aurora-theme input[type="url"], .aurora-theme input[type="number"],
.aurora-theme select, .aurora-theme textarea {
  background: color-mix(in srgb, var(--au-surface-2) 70%, transparent);
  border: 1px solid var(--au-line);
  border-radius: 16px;
  color: var(--au-text);
  box-shadow: inset 0 1px 2px rgba(40, 24, 110, .06);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.aurora-theme input:focus, .aurora-theme select:focus, .aurora-theme textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--au-b) 70%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--au-b) 22%, transparent), inset 0 1px 2px rgba(40, 24, 110, .06);
}
.aurora-theme ::placeholder { color: var(--au-muted); opacity: .8; }

/* ---------- desktop: Instagram-style left rail ---------------------------- */
@media (min-width: 1100px) {
  .au-hide-bars .aurora-theme .king-headerf { translate: none !important; }
  .aurora-theme .king-headerf { position: fixed; z-index: 70; left: 16px; top: 16px; bottom: 16px; width: var(--ag-rail); right: auto; }
  .aurora-theme .king-header {
    height: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    padding: 22px 14px 16px;
    border: 1px solid var(--au-line);
    border-radius: 34px;
    -webkit-backdrop-filter: blur(var(--ag-blur)) saturate(var(--ag-sat));
    backdrop-filter: blur(var(--ag-blur)) saturate(var(--ag-sat));
    box-shadow: inset 0 1px 0 var(--ag-edge), inset 0 0 0 1px var(--ag-edge-2), var(--au-shadow);
    overflow: visible;
  }
  .aurora-theme .header-left { display: flex; align-items: center; justify-content: flex-start; padding: 0 8px 14px; width: auto; height: auto; min-height: 0; }
  .aurora-theme .header-left .king-logo { margin: 0; height: auto; line-height: 1.1; }
  .aurora-theme .king-logo { font-size: 26px; }
  .aurora-theme .header-middle { display: block; width: 100%; flex: 1 1 auto; position: relative; margin: 0; padding: 0; }
  .aurora-theme #nav-head, .aurora-theme .king-nav-head-list { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 0; padding: 0; width: 100%; }
  .aurora-theme .king-nav-head-item { width: 100%; list-style: none; }
  .aurora-theme .king-nav-head-item a {
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 13px 16px; border-radius: 18px;
    font-size: 16px; font-weight: 650; color: var(--au-text);
    transition: background-color .25s, transform .3s var(--au-spring);
  }
  .aurora-theme .king-nav-head-item a:hover { background: var(--au-surface-2); transform: translateX(3px); }
  .aurora-theme .king-nav-head-item a i, .aurora-theme .king-nav-head-item a svg { font-size: 20px; width: 24px; text-align: center; }
  .aurora-theme .king-nav-head-item a.king-nav-head-selected, .aurora-theme .king-nav-head-item .king-nav-head-selected {
    background: linear-gradient(135deg, color-mix(in srgb, var(--au-b) 22%, transparent), color-mix(in srgb, var(--au-c) 16%, transparent));
    box-shadow: inset 0 1px 0 var(--ag-edge);
  }
  .aurora-theme .menutoggle { display: none; }
  .aurora-theme .king-mega-menu { position: static; display: block !important; opacity: 1; visibility: visible; box-shadow: none; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 8px 0 0; }
  .aurora-theme .king-mega-menu .king-cat { display: none; }
  .aurora-theme .header-right { width: 100%; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--au-line); }
  .aurora-theme .header-right ul { flex-wrap: wrap; justify-content: center; gap: 8px; }
  .aurora-theme .header-right .au-lang-li { width: 100%; justify-content: center; margin-bottom: 4px; }
  .aurora-theme .king-search { left: calc(var(--ag-rail) + 40px); right: 24px; top: -600px; border-radius: 28px; width: auto; pointer-events: none; }
  .aurora-theme .king-search.open { top: 16px; pointer-events: auto; }

  .aurora-theme .king-body-in, .aurora-theme #king-body-wrapper { max-width: none; margin: 0; padding-left: calc(var(--ag-rail) + 40px); padding-right: 24px; }
  .aurora-theme .head-title { padding-left: calc(var(--ag-rail) + 40px); }
  .aurora-theme .au-stories, .aurora-theme .king-nav-sub-list { margin-left: auto; margin-right: auto; }
  .aurora-theme .king-footer, .aurora-theme .king-attribution { padding-left: calc(var(--ag-rail) + 40px); }
  .aurora-theme .leftmenu { z-index: 80; }
  .aurora-theme .king-left-toggle { display: none; }
}

/* ---------- mobile: floating glass dock ----------------------------------- */
@media (max-width: 1099px) {
  .aurora-theme .au-tabbar {
    border-radius: 34px; border: 1px solid var(--au-line);
    background: var(--au-glass);
    -webkit-backdrop-filter: blur(var(--ag-blur)) saturate(var(--ag-sat));
    backdrop-filter: blur(var(--ag-blur)) saturate(var(--ag-sat));
    box-shadow: inset 0 1px 0 var(--ag-edge), var(--au-shadow);
  }
  .aurora-theme .king-header { margin: 8px 10px 0; border-radius: 26px; border: 1px solid var(--au-line); box-shadow: inset 0 1px 0 var(--ag-edge), var(--au-shadow); }
  .aurora-theme .king-headerf { padding: 0; }
}

/* ---------- admin & plugin pages ------------------------------------------ */
.aurora-theme[class*="king-template-admin"] .king-body-in > *:not(.king-nav-sub-list),
.aurora-theme[class*="king-template-plugin"] .king-body-in > *:not(.king-nav-sub-list) { max-width: 1180px; margin-left: auto; margin-right: auto; }

.aurora-theme[class*="king-template-admin"] .king-main,
.aurora-theme[class*="king-template-admin"] .king-form-tall-table,
.aurora-theme[class*="king-template-admin"] .king-form-wide-table {
  border-radius: var(--ag-radius);
}
.aurora-theme[class*="king-template-admin"] .king-form-tall-table,
.aurora-theme[class*="king-template-admin"] .king-form-wide-table,
.aurora-theme[class*="king-template-admin"] table {
  background: var(--au-surface);
  -webkit-backdrop-filter: blur(var(--ag-blur)) saturate(var(--ag-sat));
  backdrop-filter: blur(var(--ag-blur)) saturate(var(--ag-sat));
  border: 1px solid var(--au-line);
  box-shadow: inset 0 1px 0 var(--ag-edge), var(--au-shadow);
  padding: 8px 18px 14px;
  border-collapse: separate;
}
.aurora-theme[class*="king-template-admin"] .king-form-tall-label,
.aurora-theme[class*="king-template-admin"] .king-form-wide-label { font-weight: 650; color: var(--au-text); }
.aurora-theme[class*="king-template-admin"] .king-form-tall-note,
.aurora-theme[class*="king-template-admin"] .king-form-wide-note { color: var(--au-muted); font-size: 13px; }
.aurora-theme[class*="king-template-admin"] tr { transition: background-color .2s; }
.aurora-theme[class*="king-template-admin"] .king-form-wide-table tr:hover { background: color-mix(in srgb, var(--au-b) 5%, transparent); }
.aurora-theme[class*="king-template-admin"] h1, .aurora-theme[class*="king-template-admin"] .head-title {
  font-weight: 800; letter-spacing: -.03em;
}
.aurora-theme[class*="king-template-admin"] .king-nav-sub-link {
  background: var(--au-surface);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid var(--au-line);
  box-shadow: inset 0 1px 0 var(--ag-edge);
}
.aurora-theme[class*="king-template-admin"] .king-nav-sub-selected,
.aurora-theme[class*="king-template-plugin"] .king-nav-sub-selected { color: #fff; }

/* ---------- scrollbars ----------------------------------------------------- */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--au-b) 45%, transparent) transparent; }
::selection { background: color-mix(in srgb, var(--au-b) 35%, transparent); }

@media (prefers-reduced-motion: reduce) {
  body.aurora-theme::before, .aurora-theme .king-logo a, .aurora-theme .king-logo, .au-story.is-fresh .au-ring::before { animation: none !important; }
}
html.au-reduce body.aurora-theme::before, html.au-reduce .aurora-theme .king-logo, html.au-reduce .aurora-theme .king-logo a, html.au-reduce .au-story.is-fresh .au-ring::before { animation: none !important; }
@media (max-width: 700px) { body.aurora-theme::before { filter: blur(20px); } }

/* mobile header: keep everything on one line */
@media (max-width: 1099px) {
  .au-lang a { min-width: 24px; padding: 5px 7px; }
  .aurora-theme .header-right ul { gap: 4px; }
  .aurora-theme .header-right .hreg { display: none; }
}
@media (max-width: 480px) { .aurora-theme .header-right .au-lang-li { display: none; } }
.au-lang-drawer { display: none; padding: 6px 18px 12px; }
@media (max-width: 1099px) { .au-lang-drawer { display: block; } }

/* ---------- leftover solid containers become glass ----------------------- */
.aurora-theme .king-part-form.king-inner, .aurora-theme .king-part-ranking.king-inner,
.aurora-theme .prev-next, .aurora-theme ul.nav.nav-tabs, .aurora-theme .king-suggest-next,
.aurora-theme .king-searchp-form, .aurora-theme .king-time-drop, .aurora-theme .king-profile,
.aurora-theme .king-profile-in, .aurora-theme .profile-box, .aurora-theme .king-user-profile {
  background: var(--au-surface) !important;
  -webkit-backdrop-filter: blur(var(--ag-blur)) saturate(var(--ag-sat));
  backdrop-filter: blur(var(--ag-blur)) saturate(var(--ag-sat));
  border-radius: var(--ag-radius);
  border: 1px solid var(--au-line);
  box-shadow: inset 0 1px 0 var(--ag-edge), inset 0 0 0 1px var(--ag-edge-2), var(--au-shadow);
}
.aurora-theme .king-part-form.king-inner { padding: 6px; }
.aurora-theme footer.king-footer {
  background: var(--au-glass) !important;
  -webkit-backdrop-filter: blur(var(--ag-blur)) saturate(var(--ag-sat));
  backdrop-filter: blur(var(--ag-blur)) saturate(var(--ag-sat));
  border-top: 1px solid var(--au-line);
  border-radius: var(--ag-radius) var(--ag-radius) 0 0;
}
@media (min-width: 1100px) { .aurora-theme footer.king-footer { margin-left: calc(var(--ag-rail) + 40px); border-radius: var(--ag-radius); margin-right: 24px; margin-bottom: 16px; } }
.aurora-theme .king-part-form .king-form-tall-table, .aurora-theme .king-part-form .king-form-wide-table { background: transparent !important; box-shadow: none !important; border: 0 !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* Studio: AMOLED = true black, no colour field */
html.king-night[data-au-amoled="on"] body.aurora-theme { background: #000 !important; }
html.king-night[data-au-amoled="on"] body.aurora-theme::before { display: none; }
html[data-au-cardstyle="flat"] .au-card-in { -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-au-cardstyle="outlined"] .au-card-in { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* rail icon for plugin-added nav entries without an icon */
.aurora-theme .king-nav-head-vorlagen a::before { content: "\f53f"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome; font-weight: 900; font-size: 20px; width: 24px; text-align: center; }
.aurora-theme .king-nav-head-tattoos a::before { content: "\f002"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome; font-weight: 900; font-size: 20px; width: 24px; text-align: center; }
.aurora-theme .king-nav-head-studios a::before { content: "\f3c5"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome; font-weight: 900; font-size: 20px; width: 24px; text-align: center; }
.aurora-theme .king-nav-head-portfolio a::before { content: "\f007"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome; font-weight: 900; font-size: 20px; width: 24px; text-align: center; }

/* ---------- post page: Instagram-style split (media left, glass info panel right) ---------- */
.au-save-board, .sc-save-btn { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 4px; padding: 9px 18px; border-radius: 99px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--au-text); border: 1px solid var(--au-line); background: var(--au-surface-2); transition: transform .3s var(--au-spring), background-color .2s; }
.au-save-board:hover, .sc-save-btn:hover { transform: translateY(-2px); background: var(--au-surface); }
.au-save-board .au-i { width: 18px; height: 18px; }

@media (min-width: 1100px) {
  .aurora-theme .au-post { padding: 16px 24px 24px calc(var(--ag-rail) + 40px); }
  .aurora-theme .au-post #king-body-wrapper { padding: 0 !important; max-width: none; margin: 0; }
  .aurora-theme .au-post.has-media {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(380px, .85fr);
    gap: 22px;
    align-items: start;
    max-width: 1500px;
  }
  .aurora-theme .au-post.has-media > * { min-width: 0; }
  .aurora-theme .au-post.has-media .king-main, .aurora-theme .au-post.has-media .king-main-in, .aurora-theme .au-post.has-media .king-part-q-view { width: 100% !important; max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
  .aurora-theme .au-post.has-media .king-q-view-buttons { width: auto; flex-wrap: wrap; }
  .aurora-theme .au-post.has-media .king-main-in * { max-width: 100%; }
  .aurora-theme .au-post.has-media h1, .aurora-theme .au-post.has-media h2 { overflow-wrap: anywhere; }
  .aurora-theme .au-post.has-media > .king-video-in,
  .aurora-theme .au-post.has-media > .king-video {
    position: sticky; top: 16px; margin: 0; width: 100%;
    border-radius: 30px; overflow: hidden;
    background: #05050c;
    box-shadow: inset 0 0 0 1px var(--ag-edge-2), var(--au-shadow);
  }
  .aurora-theme .au-post.has-media > .king-video-in .king-video { border-radius: 0; margin: 0; }
  .aurora-theme .au-post.has-media > .king-video-in img,
  .aurora-theme .au-post.has-media > .king-video-in video { max-height: calc(100vh - 32px); width: 100%; object-fit: contain; display: block; }
  .aurora-theme .au-post.has-media #king-body-wrapper {
    position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; overflow-x: hidden;
    border-radius: 30px; padding: 0 !important; scrollbar-width: thin;
  }
  /* order inside the panel: author, title + text, actions, reactions, comments */
  .aurora-theme .au-post.has-media .king-main-in { padding: 0; }
  .aurora-theme .au-post.has-media .king-part-q-view { display: flex !important; flex-direction: column; gap: 12px; }
  .aurora-theme .au-post.has-media .king-part-q-view > .pboxes:has(.postuser) { order: -3; }
  .aurora-theme .au-post.has-media .king-part-q-view > .king-q-view { order: -2; }
  .aurora-theme .au-post.has-media .king-part-q-view > .share-bar { order: -1; flex-wrap: wrap; gap: 8px; }
  .aurora-theme .au-post.has-media .king-part-q-view > .maincom { order: 5; }
  .aurora-theme .au-post.has-media .share-bar .king-q-view-buttons { margin-left: auto; }
  /* compact author card in the panel */
  .aurora-theme .au-post.has-media .postuser .user-box-cover { display: none; }
  .aurora-theme .au-post.has-media .postuser .user-box-pt { padding: 0; }
  .aurora-theme .au-post.has-media .postuser .user-box { display: block; padding: 14px 16px; }
  .aurora-theme .au-post.has-media .postuser .user-box-in { margin: 0; padding: 0; }
  .aurora-theme .au-post.has-media .king-main { margin: 0; padding: 0; width: 100%; max-width: none; }
  .aurora-theme .au-post.has-media .share-bar, .aurora-theme .au-post.has-media .king-q-view, .aurora-theme .au-post.has-media .pboxes, .aurora-theme .au-post.has-media .maincom { margin: 0; width: 100%; max-width: none; }
  .aurora-theme .au-post.has-media .prev-next { display: none; }
}
@media (max-width: 1099px) {
  .aurora-theme .au-post.has-media > .king-video-in { border-radius: 24px; overflow: hidden; margin: 0 10px 12px; }
}
@media (min-width: 1100px) {
  .aurora-theme .au-post.has-media .share-bar, .aurora-theme .au-post.has-media .king-q-view, .aurora-theme .au-post.has-media .pboxes, .aurora-theme .au-post.has-media .maincom { box-sizing: border-box; }
}
.au-act.au-board { display: inline-grid; place-items: center; }
@media (min-width: 1100px) {
  .aurora-theme .au-post.has-media .reactions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .aurora-theme .au-post.has-media .reactions .reaction-item { width: auto; }
}


/* ---- legibility + consistency fixes for every look (dark presets, sharp corners, nav icons) ---- */
.aurora-theme .king-form-tall-note a,
.aurora-theme .hllink,
.aurora-theme .king-form-tall-buttons a,
.aurora-theme .king-form-tall-label a {
  color: var(--au-b, #7c5cff);
  font-weight: 600;
  text-decoration: none;
}
html.king-night .aurora-theme .king-form-tall-note a,
html.king-night .aurora-theme .hllink,
html.king-night .aurora-theme .king-form-tall-buttons a,
html.king-night .aurora-theme .king-form-tall-label a {
  color: color-mix(in srgb, var(--au-b, #7c5cff) 55%, #fff);
}
.aurora-theme .king-form-tall-note a:hover,
.aurora-theme .hllink:hover { text-decoration: underline; }
.aurora-theme .king-form-tall-note { color: inherit; opacity: .9; }
.aurora-theme .king-nav-main-link i { display: inline-block; width: 1.15em; margin-right: .45em; text-align: center; }

/* sign-in style pages: a compact centred card on every skin and screen size, never a full-width bar */
body.king-template-login .king-main.one-page,
body.king-template-register .king-main.one-page,
body.king-template-forgot .king-main.one-page,
body.king-template-reset .king-main.one-page { display: block !important; max-width: 560px !important; width: 100% !important; margin: 24px auto !important; float: none !important; }
body.king-template-login .king-main-in,
body.king-template-register .king-main-in,
body.king-template-forgot .king-main-in,
body.king-template-reset .king-main-in { width: 100% !important; max-width: none !important; float: none !important; margin: 0 !important; }
body.king-template-login .king-part-form,
body.king-template-register .king-part-form,
body.king-template-forgot .king-part-form,
body.king-template-reset .king-part-form { padding: 22px 24px !important; }
body.king-template-login .king-form-tall-table,
body.king-template-register .king-form-tall-table,
body.king-template-forgot .king-form-tall-table,
body.king-template-reset .king-form-tall-table { width: 100% !important; max-width: none !important; margin: 0 !important; }
body.king-template-login .king-form-tall-text,
body.king-template-register .king-form-tall-text,
body.king-template-forgot .king-form-tall-text,
body.king-template-reset .king-form-tall-text { width: 100% !important; box-sizing: border-box; }

/* desktop footer: fit between the rail and the right edge (was 100% wide + rail margin + rail padding = sideways scrolling) */
@media (min-width: 1100px) {
  .aurora-theme footer.king-footer { width: auto !important; box-sizing: border-box; padding-left: 24px; padding-right: 24px; }
}

/* the active admin tab must always be visible (white text needs the accent background) */
.aurora-theme .king-nav-sub-link.king-nav-sub-selected, .aurora-theme .king-nav-sub-selected { background: var(--au-grad) !important; color: #fff !important; border-color: transparent !important; }

/* post pages: never wider than the space next to the rail (a fixed 1200px column ran 48px past the screen) */
.aurora-theme .au-post .king-main.post-page { width: 100% !important; max-width: 1200px; box-sizing: border-box; }

/* phones: a few pixels of stray width (long headings, nav lists) must never create sideways scrolling */
@media (max-width: 700px) { html, body.aurora-theme { overflow-x: clip; } }

/* an empty media box must not leave a stray dark pill above the vote bar */
.aurora-theme .au-post .king-video:not(:has(*)) { display: none; }


/* ---- account dropdown (top right) – same entries in every skin ---- */
.au-acc { position: relative; }
.au-acc > summary { list-style: none; cursor: pointer; }
.au-acc > summary::-webkit-details-marker { display: none; }
.au-acc-pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 300; min-width: 240px; max-width: min(320px, calc(100vw - 24px)); padding: 10px; border-radius: var(--au-radius, 18px); background: var(--au-surface-solid, var(--au-glass, #fff)); color: var(--au-text, #14121f); border: 1px solid var(--au-line, rgba(127,127,150,.25)); box-shadow: 0 24px 60px -18px rgba(0,0,0,.45); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); text-align: left; }
.au-acc-name { display: block; padding: 6px 10px 10px; font-weight: 800; font-size: 15px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--au-line, rgba(127,127,150,.25)); margin-bottom: 6px; }
.au-acc-list { list-style: none; margin: 0; padding: 0; }
.au-acc-list li { margin: 0; padding: 0; list-style: none; }
.au-acc-list a, .au-acc-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; font-size: 14px; font-weight: 650; text-decoration: none; cursor: pointer; text-align: left; line-height: 1.2; }
.au-acc-list a:hover, .au-acc-list button:hover { background: var(--au-surface-2, rgba(127,127,150,.14)); }
.au-acc-list .au-i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.au-acc-lang { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; font-size: 14px; font-weight: 650; }
.au-acc-lang .au-lang { display: inline-flex; }
.king-dropdown .au-acc-list { margin-top: 8px; }
.king-dropdown .au-acc-list a, .king-dropdown .au-acc-list button { padding: 9px 10px; }
@media (max-width: 480px) { .au-acc-pop { position: fixed; left: 12px; right: 12px; top: 64px; max-width: none; } }

/* default skin on desktop: the avatar sits at the bottom of the rail, so the dropdown opens beside it and stays on screen */
@media (min-width: 1100px) {
  .aurora-theme .king-dropdown { position: fixed !important; left: calc(var(--ag-rail) + 36px) !important; right: auto !important; top: auto !important; bottom: 20px !important; width: 270px; max-height: calc(100vh - 40px); overflow-y: auto; z-index: 400; }
}
@media (min-width: 1100px) {
  .aurora-theme .king-dropdown { background: var(--au-surface-solid, #fff) !important; color: var(--au-text, #14121f); border: 1px solid var(--au-line, rgba(127,127,150,.25)); border-radius: var(--au-radius, 22px); box-shadow: 0 24px 60px -18px rgba(0,0,0,.45); padding: 14px; z-index: 100000; }
  .aurora-theme .king-dropdown h3 { margin: 0 0 4px; color: inherit; }
}
.king-dropdown .au-acc-list a, .king-dropdown .au-acc-list button, .king-dropdown .au-acc-list span { background: none; border: 0; line-height: 1.2; display: flex; }
.king-dropdown .au-acc-list span { display: inline; font-weight: inherit; }
.king-dropdown .au-acc-list a:hover, .king-dropdown .au-acc-list button:hover { background: var(--au-surface-2, rgba(127,127,150,.14)); }
.king-dropdown .au-acc-lang { display: flex; }
.aurora-theme .king-dropdown { text-align: left; }
.aurora-theme .king-dropdown .au-acc-list, .aurora-theme .king-dropdown .au-acc-list li { display: block; width: 100%; padding: 0; margin: 0; text-align: left; background: none !important; }
.aurora-theme .king-dropdown .au-acc-list a, .aurora-theme .king-dropdown .au-acc-list button { justify-content: flex-start !important; background: transparent !important; box-shadow: none !important; width: 100%; }
.aurora-theme .king-dropdown .au-acc-list a:hover, .aurora-theme .king-dropdown .au-acc-list button:hover { background: var(--au-surface-2, rgba(127,127,150,.14)) !important; }
.aurora-theme .king-dropdown .au-acc-list span { background: none !important; padding: 0; }
.aurora-theme .king-dropdown .au-acc-lang { padding: 8px 12px; justify-content: space-between; }
.aurora-theme .king-dropdown .user-box-point { color: var(--au-muted, #6b6884); background: var(--au-surface-2, rgba(127,127,150,.14)); }

/* while a slider is being dragged the sheet itself stops blurring (the page behind is repainted live; two blur passes froze phones) */
.au-sheet.is-adjusting { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; transition: none !important; background: var(--au-surface-solid, var(--au-surface, #fff)) !important; }

/* the Studio (and its backdrop) must sit above the cookie notice (z-index 9999) */
.au-backdrop { z-index: 10040 !important; }
.au-sheet { z-index: 10050 !important; }
