/*
Theme Name: Aberdeen Dream
Theme URI: https://www.aberdeendream.com/
Author: Aberdeen Dream.scot CIC
Author URI: https://www.aberdeendream.com/
Description: Digital-art 3D edition for Aberdeen Dream.scot CIC. A giant swarm of translucent glass cubes, five times bigger with random sizes, pours out of both sides of the reading column, tumbles through a real CSS perspective stage and rests at the page edges; a tornado of huge outlined cubes spirals at the horizon; aurora, stars and shooting stars dress the night. Black text on a bright glass window by day and light text over deep azure by night; the header is a readable glass bar in every mode; article text flows in two columns; every page carries share buttons; the header holds text-size controls and a day/night switch, both remembered between visits; the contact form is enlarged; printing always uses a fixed 12 pt type. Every display setting edits by clicking in the WordPress Customizer, and a Dream Options page holds the effect list plus a custom CSS and JS editor. Built by Bard, an AI assistant from Mistral AI. Accessibility-first edition: by day and by night the source artwork shows in full over a vivid cloud-light sky, with black text on a bright glass window by day and light text over deep azure by night. Article text flows in two columns with generous paragraph spacing; every page carries share buttons; the header holds text-size controls and a day/night switch, both remembered between visits; the contact form is enlarged for easy reading; printing always uses a fixed 12 pt type size. Every display setting edits by clicking in the WordPress Customizer: background, column width, glass, dim, effects, cloud density, speed and flight mode; a Dream Options page holds the effect list plus a custom CSS and JS editor. Built by Bard, an AI assistant from Mistral AI.
Version: 4.3.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: Apache License 2.0
License URI: https://www.apache.org/licenses/LICENSE-2.0
Text Domain: aberdeen-dream
Tags: custom-background, one-column, custom-menu, accessibility-ready
*/


/* ==========================================================================
   Aberdeen Dream v4.2.1 — digital art in 3D: the WebGL cube sky
   over the CSS cube swarm fallback (v4.0.0).
   All colours live in custom properties, so the living-sky body class
   (pal-sky-dawn / -day / -dusk / -night) and the manual day/night switch
   (pal-user-day / pal-user-night) restyle the whole page at once.
   v4.0.0 rebuild: 120 generated cubes (five times bigger, random sizes)
   tumble through a 1200px perspective stage; the tornado grows to match;
   the header becomes a readable glass bar so the menu is legible by day.
   One screen, sideways reading on wide screens; share buttons; A+ / A- text-size controls.
   No mouse-triggered effects on reading content; reduced motion honoured.
   ========================================================================== */

/* ---- Day palette (default): the artwork in full, no veil ---- */
body {
  --pal-bg-image:
    url('https://www.aberdeendream.com/wp-content/uploads/2026/10/abdream_034719.jpg'),
    linear-gradient(180deg, var(--pal-bg-top) 0%, var(--pal-bg-mid) 55%, var(--pal-bg-bot) 100%);
  --pal-bg-size: cover, cover;
  --pal-bg-pos: center, center;
  --pal-bg-top: #FFFFFF;
  --pal-bg-mid: #F5F7FA;
  --pal-bg-bot: #E7EDF4;
  --pal-text: #101820;
  --pal-heading: #0B1220;
  --pal-link: #155FA0;
  --pal-link-hover: #0B3A66;
  --pal-muted: #46536B;
  --pal-header-ink: #0B1220;
  --pal-header-shadow: none;
  --pal-menu-pill: rgba(30, 144, 255, 0.14);
  --pal-header-bg: rgba(255, 255, 255, 0.78);
  --pal-header-border: rgba(175, 194, 218, 0.55);
  --pal-header-bg: rgba(255, 255, 255, 0.78);
  --pal-header-border: rgba(175, 194, 218, 0.55);
  --pal-card-bg: rgba(255, 255, 255, var(--pal-card-alpha, 0.92));
  --pal-card-blur: 18px;
  --pal-card-border-w: 1px;
  --pal-card-border-c: rgba(175, 194, 218, 0.85);
  --pal-card-shadow: 0 14px 44px rgba(30, 50, 80, 0.13);
  --pal-card-ink: #101820;
  --pal-panel-bg: rgba(255, 255, 255, 0.94);
  --pal-panel-border: rgba(175, 194, 218, 0.75);
  --pal-panel-shadow: 0 8px 26px rgba(30, 50, 80, 0.14);
  --pal-panel-ink: #101820;
  --pal-quote-border: #155FA0;
  --pal-quote-bg: rgba(21, 95, 160, 0.08);
  --pal-page-bg: rgba(21, 95, 160, 0.10);
  --pal-page-ink: #155FA0;
  --pal-rule: rgba(151, 171, 201, 0.35);
  --pal-focus: #155FA0;
  --pal-selection-bg: #0B3A66;
  --pal-selection-ink: #FFFFFF;
  --pal-tool-bg: rgba(255, 255, 255, 0.94);
  --pal-tool-border: rgba(175, 194, 218, 0.9);
  --pal-tool-ink: #0B1220;
  --pal-share-bg: rgba(255, 255, 255, 0.94);
  --pal-share-border: rgba(175, 194, 218, 0.9);
  --pal-share-rule: rgba(175, 194, 218, 0.7);
  --pal-cloud-bg:
    radial-gradient(ellipse 62% 55% at 38% 62%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.55) 42%, transparent 70%),
    radial-gradient(ellipse 55% 48% at 68% 55%, rgba(219, 231, 245, 0.85) 0%, rgba(219, 231, 245, 0.42) 46%, transparent 72%);
  --pal-glow-a: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.60) 0%, rgba(255, 255, 255, 0.22) 40%, transparent 70%);
  --pal-glow-b: radial-gradient(ellipse at center, rgba(199, 220, 246, 0.42) 0%, rgba(199, 220, 246, 0.14) 42%, transparent 72%);
}

/* ---- Night palette: deep night sky, light text (living sky or manual) ---- */
body.pal-sky-night,
body.pal-user-night {
  --pal-bg-top: #08284E;
  --pal-bg-mid: #0C3B6E;
  --pal-bg-bot: #10508E;
  --pal-text: #F4F6FF;
  --pal-heading: #FFFFFF;
  --pal-link: #9BC9FF;
  --pal-link-hover: #FFFFFF;
  --pal-muted: #C6CDE8;
  --pal-header-ink: #FFFFFF;
  --pal-header-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  --pal-menu-pill: rgba(255, 255, 255, 0.24);
  --pal-header-bg: rgba(7, 22, 46, 0.55);
  --pal-header-border: rgba(255, 255, 255, 0.18);
  --pal-card-bg: rgba(7, 22, 46, 0.66);
  --pal-card-blur: 26px;
  --pal-card-border-w: 12px;
  --pal-card-border-c: rgba(255, 255, 255, 0.30);
  --pal-card-shadow:
    0 0 52px rgba(155, 201, 255, 0.30),
    0 8px 32px rgba(0, 0, 0, 0.55);
  --pal-card-ink: #F4F6FF;
  --pal-panel-bg: rgba(8, 26, 52, 0.62);
  --pal-panel-border: rgba(255, 255, 255, 0.35);
  --pal-panel-shadow: 0 10px 34px rgba(0, 0, 0, 0.50);
  --pal-panel-ink: #F4F6FF;
  --pal-quote-border: #B388FF;
  --pal-quote-bg: rgba(30, 144, 255, 0.16);
  --pal-page-bg: rgba(8, 26, 52, 0.58);
  --pal-page-ink: #9BC9FF;
  --pal-rule: rgba(255, 255, 255, 0.16);
  --pal-focus: #9BC9FF;
  --pal-selection-bg: #0D3A66;
  --pal-selection-ink: #FFFFFF;
  --pal-tool-bg: rgba(255, 255, 255, 0.12);
  --pal-tool-border: rgba(255, 255, 255, 0.35);
  --pal-tool-ink: #FFFFFF;
  --pal-share-bg: rgba(255, 255, 255, 0.12);
  --pal-share-border: rgba(255, 255, 255, 0.35);
  --pal-share-rule: rgba(255, 255, 255, 0.30);
  --pal-cloud-bg:
    radial-gradient(ellipse 62% 55% at 38% 62%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.62) 42%, transparent 70%),
    radial-gradient(ellipse 55% 48% at 68% 55%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.50) 46%, transparent 72%);
  --pal-bg-image:
    url('https://www.aberdeendream.com/wp-content/uploads/2026/10/abdream_034719.jpg'),
    linear-gradient(180deg, var(--pal-bg-top) 0%, var(--pal-bg-mid) 55%, var(--pal-bg-bot) 100%);
  --pal-bg-size: cover, cover;
  --pal-bg-pos: center, center;
  --pal-glow-a: radial-gradient(ellipse at center, rgba(220, 232, 255, 0.28) 0%, rgba(220, 232, 255, 0.10) 40%, transparent 68%);
  --pal-glow-b: radial-gradient(ellipse at center, rgba(13, 58, 102, 0.55) 0%, rgba(13, 58, 102, 0.28) 45%, transparent 74%);
}

/* ---- Manual day override wins over the night clock (placed last) ---- */
body.pal-user-day {
  --pal-bg-image:
    url('https://www.aberdeendream.com/wp-content/uploads/2026/10/abdream_034719.jpg'),
    linear-gradient(180deg, var(--pal-bg-top) 0%, var(--pal-bg-mid) 55%, var(--pal-bg-bot) 100%);
  --pal-bg-size: cover, cover;
  --pal-bg-pos: center, center;
  --pal-bg-top: #FFFFFF;
  --pal-bg-mid: #F5F7FA;
  --pal-bg-bot: #E7EDF4;
  --pal-text: #101820;
  --pal-heading: #0B1220;
  --pal-link: #155FA0;
  --pal-link-hover: #0B3A66;
  --pal-muted: #46536B;
  --pal-header-ink: #0B1220;
  --pal-header-shadow: none;
  --pal-menu-pill: rgba(30, 144, 255, 0.14);
  --pal-card-bg: rgba(255, 255, 255, var(--pal-card-alpha, 0.92));
  --pal-card-blur: 18px;
  --pal-card-border-w: 1px;
  --pal-card-border-c: rgba(175, 194, 218, 0.85);
  --pal-card-shadow: 0 14px 44px rgba(30, 50, 80, 0.13);
  --pal-card-ink: #101820;
  --pal-panel-bg: rgba(255, 255, 255, 0.94);
  --pal-panel-border: rgba(175, 194, 218, 0.75);
  --pal-panel-shadow: 0 8px 26px rgba(30, 50, 80, 0.14);
  --pal-panel-ink: #101820;
  --pal-quote-border: #155FA0;
  --pal-quote-bg: rgba(21, 95, 160, 0.08);
  --pal-page-bg: rgba(21, 95, 160, 0.10);
  --pal-page-ink: #155FA0;
  --pal-rule: rgba(151, 171, 201, 0.35);
  --pal-focus: #155FA0;
  --pal-selection-bg: #0B3A66;
  --pal-selection-ink: #FFFFFF;
  --pal-tool-bg: rgba(255, 255, 255, 0.94);
  --pal-tool-border: rgba(175, 194, 218, 0.9);
  --pal-tool-ink: #0B1220;
  --pal-share-bg: rgba(255, 255, 255, 0.94);
  --pal-share-border: rgba(175, 194, 218, 0.9);
  --pal-share-rule: rgba(175, 194, 218, 0.7);
  --pal-cloud-bg:
    radial-gradient(ellipse 62% 55% at 38% 62%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.55) 42%, transparent 70%),
    radial-gradient(ellipse 55% 48% at 68% 55%, rgba(219, 231, 245, 0.85) 0%, rgba(219, 231, 245, 0.42) 46%, transparent 72%);
  --pal-glow-a: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.60) 0%, rgba(255, 255, 255, 0.22) 40%, transparent 70%);
  --pal-glow-b: radial-gradient(ellipse at center, rgba(199, 220, 246, 0.42) 0%, rgba(199, 220, 246, 0.14) 42%, transparent 72%);
}

/* ---- Base: the cloud-light sky fills the page, fixed while content scrolls ---- */
body {
  font-family: "Open Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--pal-text);
  line-height: 1.65;
  background-color: var(--pal-bg-mid);
  background-image: var(--pal-bg-image, linear-gradient(180deg, var(--pal-bg-top) 0%, var(--pal-bg-mid) 55%, var(--pal-bg-bot) 100%));
  background-attachment: fixed;
  background-size: var(--pal-bg-size, cover);
  background-position: var(--pal-bg-pos, center);
  background-repeat: no-repeat;
  min-height: 100vh;
  margin: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: var(--pal-link); }
a:hover, a:focus { color: var(--pal-link-hover); }

::selection { background: var(--pal-selection-bg); color: var(--pal-selection-ink); }

:focus-visible { outline: 2px solid var(--pal-focus); outline-offset: 2px; }

/* ---- Skip to content: hidden until keyboard focus ---- */
.pal-skip {
  position: absolute;
  left: -9999px;
  top: 0.4rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--pal-card-bg);
  color: var(--pal-link);
  font-weight: 700;
  text-decoration: none;
}
.pal-skip:focus { left: 0.4rem; }

/* ---- Header: transparent bar, site name, menu, accessibility controls ---- */
.pal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1.6rem;
  padding: 0.3rem clamp(1rem, 4vw, 2.4rem);
  background: var(--pal-header-bg, transparent);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border-bottom: 1px solid var(--pal-header-border, transparent);
}
.pal-site-title {
  font-family: "Rubik", "Open Sans", system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--pal-header-ink);
  text-decoration: none;
  text-shadow: var(--pal-header-shadow);
  background: linear-gradient(120deg, #1E90FF, #6B8EFF 45%, #B388FF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pal-site-title:hover, .pal-site-title:focus { color: var(--pal-header-ink); }
.pal-nav .pal-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pal-nav .pal-menu > li { margin: 0; }
.pal-nav .pal-menu a {
  position: relative;
  display: inline-block;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  color: var(--pal-header-ink);
  font-weight: 600;
  text-decoration: none;
  text-shadow: var(--pal-header-shadow);
  transition: background 0.25s ease, color 0.25s ease;
}
.pal-nav .pal-menu a::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.12rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #1E90FF, #B388FF);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.pal-nav .pal-menu a:hover,
.pal-nav .pal-menu a:focus {
  background: var(--pal-menu-pill);
  color: var(--pal-header-ink);
}
.pal-nav .pal-menu a:hover::after,
.pal-nav .pal-menu a:focus::after { transform: scaleX(1); }
.pal-nav .pal-menu .current_page_item > a::after,
.pal-nav .pal-menu .current-menu-item > a::after { transform: scaleX(1); }

/* ---- Accessibility toolbar: text size A- / A+ and the day/night switch ---- */
.pal-access {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}
.pal-access-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--pal-tool-border);
  background: var(--pal-tool-bg);
  color: var(--pal-tool-ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.pal-access-btn:hover { background: var(--pal-menu-pill); color: var(--pal-header-ink); }
.pal-access-btn:disabled { opacity: 0.45; cursor: default; }
#pal-font-dec { font-size: 0.85rem; }

/* ---- Single column: the reading window takes 70 percent of the page ---- */
.pal-main {
  position: relative;
  width: var(--pal-main-width, 70%);
  max-width: none;
  margin: 0 auto;
  padding: 0.9rem 0 1.2rem;
}

/* ---- Page-open animation: the window rises from the bottom ---- */
@keyframes pal-window-rise {
  from { opacity: 0; transform: translate3d(0, 120px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes pal-cloud-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pal-cloud-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(34px, -20px, 0) scale(1.05); }
}
@keyframes pal-light-drift {
  from { transform: translate3d(-4vw, 2vh, 0); }
  to   { transform: translate3d(5vw, -3vh, 0); }
}

/* ---- Reading window: light glass cover with black text by day ---- */
.pal-card {
  position: relative;
  z-index: 1;
  background: var(--pal-card-bg);
  background-clip: padding-box;
  backdrop-filter: blur(var(--pal-card-blur)) saturate(1.05);
  -webkit-backdrop-filter: blur(var(--pal-card-blur)) saturate(1.05);
  border: var(--pal-card-border-w) solid var(--pal-card-border-c);
  border-radius: 30px;
  padding: 4% 5% 3%;
  margin: 1.1rem 0 0.9rem;
  box-shadow: var(--pal-card-shadow);
  color: var(--pal-card-ink);
  animation:
    pal-window-rise 1.6s cubic-bezier(0.22, 0.61, 0.36, 1) both,
    pal-card-float 9s ease-in-out 2.2s infinite alternate;
}
@keyframes pal-card-float {
  from { translate: 0 0; rotate: 0deg; }
  to   { translate: 0 -7px; rotate: 0.12deg; }
}

/* ---- Two big clouds float beside the window for the whole visit ---- */
.pal-main::before,
.pal-main::after {
  content: "";
  position: absolute;
  width: min(580px, 64vw);
  height: min(200px, 28vw);
  border-radius: 50%;
  background: var(--pal-cloud-bg);
  filter: blur(9px);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation:
    pal-cloud-in 2.6s ease-out 0.4s both,
    pal-cloud-float 24s ease-in-out 2.8s infinite alternate;
}
.pal-main::before {
  left: -9%;
  top: -30px;
}
.pal-main::after {
  right: -9%;
  bottom: 3%;
  width: min(460px, 54vw);
  height: min(165px, 24vw);
  animation:
    pal-cloud-in 2.8s ease-out 0.7s both,
    pal-cloud-float 28s ease-in-out 3.0s infinite alternate-reverse;
}

/* ---- Light illumination: one white and one blue glow in the sky ---- */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}
body::before {
  width: min(920px, 95vw);
  height: min(580px, 62vh);
  top: -14vh;
  left: -12vw;
  background: var(--pal-glow-a);
  filter: blur(10px);
  animation:
    pal-light-drift 64s ease-in-out infinite alternate,
    pal-glow-breathe 19s ease-in-out infinite alternate;
}
body::after {
  width: min(740px, 80vw);
  height: min(480px, 52vh);
  bottom: -10vh;
  right: -14vw;
  background: var(--pal-glow-b);
  filter: blur(12px);
  animation:
    pal-light-drift 88s ease-in-out infinite alternate-reverse,
    pal-glow-breathe 23s ease-in-out 4s infinite alternate;
}


/* ==========================================================================
   Night spectacle: northern lights and shooting stars over the artwork.
   ========================================================================== */

/* ---- Aurora: three slow ribbons of northern lights, visible at night ---- */
.pal-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  display: none;
}
body.pal-sky-night .pal-aurora,
body.pal-user-night .pal-aurora { display: block; }
body.pal-sky-dawn .pal-aurora,
body.pal-sky-dusk .pal-aurora { display: block; opacity: 0.45; }
/* Manual day switch hides the northern lights even during a night hour */
body.pal-user-day .pal-aurora { display: none; }
.pal-aurora i {
  position: absolute;
  pointer-events: none;
  filter: blur(24px);
}
.pal-aurora i:nth-child(1) {
  top: 2%;
  left: -22%;
  width: 130%;
  height: 44%;
  border-radius: 50% 50% 0 0 / 70% 70% 0 0;
  background: linear-gradient(97deg,
    transparent 6%,
    rgba(64, 224, 208, 0.26) 26%,
    rgba(96, 168, 255, 0.22) 48%,
    rgba(179, 136, 255, 0.15) 66%,
    transparent 86%);
  transform-origin: 20% 100%;
  animation: pal-aurora-1 26s ease-in-out infinite alternate;
}
.pal-aurora i:nth-child(2) {
  top: 10%;
  left: -18%;
  width: 120%;
  height: 36%;
  border-radius: 50% 50% 0 0 / 70% 70% 0 0;
  background: linear-gradient(102deg,
    transparent 10%,
    rgba(120, 215, 255, 0.20) 34%,
    rgba(64, 224, 208, 0.16) 56%,
    rgba(155, 201, 255, 0.12) 72%,
    transparent 90%);
  transform-origin: 70% 100%;
  animation: pal-aurora-2 33s ease-in-out infinite alternate;
}
.pal-aurora i:nth-child(3) {
  top: -4%;
  left: -26%;
  width: 150%;
  height: 30%;
  border-radius: 50% 50% 0 0 / 70% 70% 0 0;
  background: linear-gradient(95deg,
    transparent 12%,
    rgba(155, 201, 255, 0.14) 38%,
    rgba(179, 136, 255, 0.12) 60%,
    rgba(64, 224, 208, 0.10) 76%,
    transparent 94%);
  transform-origin: 50% 100%;
  animation: pal-aurora-3 41s ease-in-out infinite alternate;
}
@keyframes pal-aurora-1 {
  from { transform: rotate(-2.5deg) translateY(0); opacity: 0.75; }
  to   { transform: rotate(2deg) translateY(4%); opacity: 1; }
}
@keyframes pal-aurora-2 {
  from { transform: rotate(1.5deg) translateY(2%); opacity: 0.55; }
  to   { transform: rotate(-2deg) translateY(-2%); opacity: 0.9; }
}
@keyframes pal-aurora-3 {
  from { transform: rotate(-1deg) translateX(0); opacity: 0.4; }
  to   { transform: rotate(1.5deg) translateX(3%); opacity: 0.7; }
}

/* ---- A deeper star layer that travels with the aurora ---- */
.pal-aurora i:nth-child(4) {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  filter: none;
  border-radius: 0;
  background-image:
    radial-gradient(1.0px 1.0px at 5% 22%,  rgba(255, 255, 255, 0.55), transparent 100%),
    radial-gradient(1.1px 1.1px at 17% 8%,  rgba(255, 255, 255, 0.60), transparent 100%),
    radial-gradient(0.9px 0.9px at 29% 33%, rgba(255, 255, 255, 0.50), transparent 100%),
    radial-gradient(1.2px 1.2px at 43% 15%, rgba(255, 255, 255, 0.65), transparent 100%),
    radial-gradient(1.0px 1.0px at 56% 29%, rgba(255, 255, 255, 0.55), transparent 100%),
    radial-gradient(1.3px 1.3px at 66% 11%, rgba(255, 255, 255, 0.60), transparent 100%),
    radial-gradient(0.9px 0.9px at 79% 24%, rgba(255, 255, 255, 0.50), transparent 100%),
    radial-gradient(1.1px 1.1px at 90% 6%,  rgba(255, 255, 255, 0.55), transparent 100%);
  background-repeat: no-repeat;
  animation: pal-stars-c 11s ease-in-out infinite alternate;
}
@keyframes pal-stars-c { from { opacity: 0.45; } to { opacity: 0.95; } }

/* ---- Shooting stars: a rare streak crosses the night sky ---- */
.pal-aurora .pal-meteor {
  top: 9%;
  left: 74%;
  width: 150px;
  height: 2px;
  border-radius: 2px;
  filter: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.65) 55%, #FFFFFF 100%);
  opacity: 0;
}
.pal-aurora .pal-meteor-a { animation: pal-meteor 23s linear 5s infinite; }
.pal-aurora .pal-meteor-b { top: 4%; left: 52%; animation: pal-meteor 37s linear 19s infinite; }
@keyframes pal-meteor {
  0%, 100% { opacity: 0; transform: rotate(215deg) translateX(0); }
  1%       { opacity: 0.9; }
  7%       { opacity: 0.9; transform: rotate(215deg) translateX(42vw); }
  8.5%     { opacity: 0; transform: rotate(215deg) translateX(44vw); }
}

/* ---- The sky illumination breathes very slowly ---- */
@keyframes pal-glow-breathe { from { opacity: 0.82; } to { opacity: 1; } }


/* ==========================================================================
   The 3D cube swarm (v4.0.0): digital art in real perspective. Giant
   translucent cubes - five times bigger than before, every one a
   random size - pour out of both sides of the reading column, tumble
   through the depth while they burst into the background, slow down
   as they near the page edge, rest there and dissolve. A few of them
   flash. Pure compositor transforms and opacity on a perspective
   stage; no JavaScript animation loop, no scroll listeners.
   ========================================================================== */

.pal-flow {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--pal-main-width, 70%);
  margin: 0;
  transform: translateX(-50%);
  perspective: 1200px;
  perspective-origin: 50% 46%;
  z-index: 0;
  pointer-events: none;
}

.pal-f {
  position: absolute;
  top: var(--y, 40%);
  left: 0;
  width: var(--s, 150px);
  height: var(--s, 150px);
  margin-left: calc(var(--s, 150px) / -2);
  opacity: 0;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, calc(var(--o, 0.26) * 0.75));
  background: linear-gradient(135deg,
    rgba(255, 255, 255, var(--o, 0.26)) 0%,
    rgba(214, 234, 255, calc(var(--o, 0.26) * 0.5)) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, calc(var(--o, 0.26) * 0.9)),
    inset -3px -3px 10px rgba(31, 79, 120, calc(var(--o, 0.26) * 0.35));
  will-change: transform, opacity;
  animation: pal-flow3d var(--d, 22s) linear infinite;
  animation-delay: var(--dl, 0s);
}
.pal-f-r { left: 100%; }

/* Cube tints: white glass, deep azure, a rare golden spark, night violet */
.pal-f2 {
  background: linear-gradient(135deg,
    rgba(30, 144, 255, calc(var(--o, 0.26) * 0.6)) 0%,
    rgba(107, 142, 255, calc(var(--o, 0.26) * 0.42)) 100%);
  border-color: rgba(155, 201, 255, calc(var(--o, 0.26) * 0.65));
}
.pal-f3 {
  background: linear-gradient(135deg,
    rgba(255, 165, 0, calc(var(--o, 0.26) * 0.75)) 0%,
    rgba(255, 215, 0, calc(var(--o, 0.26) * 0.45)) 100%);
  border-color: rgba(255, 215, 0, calc(var(--o, 0.26) * 0.8));
}
.pal-f4 {
  background: linear-gradient(135deg,
    rgba(59, 30, 114, calc(var(--o, 0.26) * 0.55)) 0%,
    rgba(11, 16, 38, calc(var(--o, 0.26) * 0.5)) 100%);
  border-color: rgba(179, 136, 255, calc(var(--o, 0.26) * 0.6));
}

/* Life of one cube: born beside the column almost at the glass of the
   screen, a fast tumble into the perspective depth, a slow crawl to
   the page edge, a long rest, a soft dissolve */
@keyframes pal-flow3d {
  0%   { transform: translate3d(var(--x0, 1vw), 0, 40px)
         rotate3d(var(--ax, 0.7), var(--ay, 0.6), var(--az, 0.3), 0deg) scale(0.6);
         opacity: 0; }
  6%   { opacity: var(--o, 0.26); }
  34%  { transform: translate3d(calc(var(--x1, -14vw) * 0.8), calc(var(--dy, 0vh) * 0.4), calc(var(--z, -260px) * 0.5))
         rotate3d(var(--ax, 0.7), var(--ay, 0.6), var(--az, 0.3), calc(var(--rot, 540deg) * 0.45)) scale(0.94);
         opacity: var(--o, 0.26); }
  62%  { transform: translate3d(var(--x1, -14vw), calc(var(--dy, 0vh) * 0.75), var(--z, -260px))
         rotate3d(var(--ax, 0.7), var(--ay, 0.6), var(--az, 0.3), calc(var(--rot, 540deg) * 0.92)) scale(1);
         opacity: var(--o, 0.26); }
  88%  { transform: translate3d(calc(var(--x1, -14vw) * 1.04), var(--dy, 0vh), var(--z, -260px))
         rotate3d(var(--ax, 0.7), var(--ay, 0.6), var(--az, 0.3), calc(var(--rot, 540deg) * 1.02)) scale(1);
         opacity: var(--o, 0.26); }
  100% { transform: translate3d(calc(var(--x1, -14vw) * 1.07), var(--dy, 0vh), var(--z, -260px))
         rotate3d(var(--ax, 0.7), var(--ay, 0.6), var(--az, 0.3), calc(var(--rot, 540deg) * 1.06)) scale(0.94);
         opacity: 0; }
}

/* The rare flash: one bright double blink per own long cycle */
.pal-f::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #ffffff;
  box-shadow: 0 0 22px 5px rgba(255, 255, 255, 0.85);
  opacity: 0;
}
.pal-fl::before {
  animation: pal-flash var(--fd, 26s) linear infinite;
  animation-delay: var(--dl2, 0s);
}
@keyframes pal-flash {
  0%, 92%    { opacity: 0; }
  93.5%      { opacity: 0.9; }
  95%        { opacity: 0.1; }
  96.5%      { opacity: 0.65; }
  98.5%,100% { opacity: 0; }
}

/* Density: the Customizer slider trims or reveals cubes */
.pal-flow .pal-f:nth-child(n+89) { display: none; }
body.pal-sky-low .pal-flow .pal-f:nth-child(n+49) { display: none; }
body.pal-sky-high .pal-flow .pal-f { display: block; }

/* Classic mode keeps only the calm white-blue cubes */
body.pal-sky-classic .pal-f3,
body.pal-sky-classic .pal-f4 { display: none; }

/* Phones: fewer cubes and a calmer scale */
@media (max-width: 900px) {
  .pal-flow .pal-f:nth-child(n+31) { display: none !important; }
  .pal-flow .pal-f {
    width: calc(var(--s, 150px) * 0.6);
    height: calc(var(--s, 150px) * 0.6);
    margin-left: calc(var(--s, 150px) * -0.3);
  }
}

/* Night: the swarm carries a little more light on dark skies */
body.pal-sky-night .pal-flow,
body.pal-user-night .pal-flow { opacity: 0.85; }
body.pal-user-day .pal-flow { opacity: 1; }


/* ==========================================================================
   The tornado of giant outlined cubes (v4.0.0): huge transparent cubes
   with white outlines of varied opacity stack edge to edge into a
   tall funnel, sway as one column, orbit the funnel axis and tumble
   in 3D while packed, and then the wind tears them apart one by one.
   Pure compositor transforms and opacity; no JavaScript.
   ========================================================================== */

.pal-tornado {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  perspective: 1100px;
  perspective-origin: 76% 40%;
  pointer-events: none;
  animation: pal-tsway 8.5s ease-in-out infinite alternate;
}

.pal-tornado .pal-tq {
  position: absolute;
  top: calc(6vh + var(--y, 0px));
  left: calc(78vw - var(--s, 160px) / 2 + var(--ax, 0vw));
  width: var(--s, 160px);
  height: var(--s, 160px);
  border: var(--bw, 2px) solid rgba(255, 255, 255, var(--o, 0.45));
  background: transparent;
  opacity: 0;
  will-change: transform, opacity;
  animation: pal-twist 36s linear infinite;
}

/* ---- The packed column leans with the storm wind ---- */
@keyframes pal-tsway {
  from { transform: translateX(-1.3vw) rotate(-1deg); }
  to   { transform: translateX(1.3vw) rotate(1deg); }
}

/* ---- Life of one cube: born into the rotating funnel, packed edge
        to edge while every cube orbits the funnel axis and tumbles in
        3D, one gust sideways, then the wind carries it away ---- */
@keyframes pal-twist {
  0%   { transform: translate3d(var(--orb, 0vw), 0, 0) rotate3d(var(--axn, 0.4), var(--ayn, 0.2), var(--azn, 0.9), 0deg) rotate(var(--tw, 0deg)); opacity: 0; }
  8%   { transform: translate3d(var(--orb, 0vw), 0, 0) rotate3d(var(--axn, 0.4), var(--ayn, 0.2), var(--azn, 0.9), calc(var(--rot, 540deg) * 0.06)) rotate(var(--tw, 0deg)); opacity: var(--o, 0.45); }
  24%  { transform: translate3d(calc(var(--orb, 0vw) * -1), 0, 0) rotate3d(var(--axn, 0.4), var(--ayn, 0.2), var(--azn, 0.9), calc(var(--rot, 540deg) * 0.18)) rotate(calc(var(--tw, 0deg) * -1)); }
  40%  { transform: translate3d(var(--orb, 0vw), 0, 0) rotate3d(var(--axn, 0.4), var(--ayn, 0.2), var(--azn, 0.9), calc(var(--rot, 540deg) * 0.3)) rotate(var(--tw, 0deg)); opacity: var(--o, 0.45); }
  54%  { transform: translate3d(var(--dx, -6vw), var(--dy, -2vh), -60px) rotate3d(var(--axn, 0.4), var(--ayn, 0.2), var(--azn, 0.9), calc(var(--rot, 540deg) * 0.5)) rotate(70deg); opacity: calc(var(--o, 0.45) * 0.8); }
  76%  { transform: translate3d(var(--tx, 30vw), var(--ty, -20vh), -240px) rotate3d(var(--axn, 0.4), var(--ayn, 0.2), var(--azn, 0.9), var(--rot, 540deg)) rotate(var(--r, 180deg)); opacity: calc(var(--o, 0.45) * 0.35); }
  88%  { transform: translate3d(calc(var(--tx, 30vw) * 1.08), calc(var(--ty, -20vh) * 1.12), -320px) rotate3d(var(--axn, 0.4), var(--ayn, 0.2), var(--azn, 0.9), calc(var(--rot, 540deg) * 1.05)) rotate(calc(var(--r, 180deg) + 30deg)); opacity: 0; }
  100% { transform: translate3d(calc(var(--tx, 30vw) * 1.1), calc(var(--ty, -20vh) * 1.15), -360px) rotate3d(var(--axn, 0.4), var(--ayn, 0.2), var(--azn, 0.9), calc(var(--rot, 540deg) * 1.07)) rotate(calc(var(--r, 180deg) + 35deg)); opacity: 0; }
}

/* ---- The tornado rests on phones ---- */
@media (max-width: 900px) {
  .pal-tornado { display: none; }
}

/* ---- Night: the outlines carry a little more light on dark skies ---- */
body.pal-sky-night .pal-tq,
body.pal-user-night .pal-tq { border-color: rgba(255, 255, 255, calc(var(--o, 0.45) * 1.15)); }



/* ==========================================================================
   Living sky: the sky knows the real part of the day.
   ========================================================================== */

/* ---- Two star fields, fixed over the whole sky, visible only at night ---- */
.pal-nav { position: relative; }
.pal-nav::before,
.pal-nav::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  background-repeat: no-repeat;
}
.pal-nav::before {
  background-image:
    radial-gradient(1.6px 1.6px at 8% 12%, rgba(255, 255, 255, 0.95), transparent 100%),
    radial-gradient(1.2px 1.2px at 21% 28%, rgba(255, 255, 255, 0.85), transparent 100%),
    radial-gradient(2.0px 2.0px at 34% 9%,  rgba(255, 255, 255, 0.95), transparent 100%),
    radial-gradient(1.4px 1.4px at 47% 22%, rgba(255, 255, 255, 0.80), transparent 100%),
    radial-gradient(1.8px 1.8px at 58% 6%,  rgba(255, 255, 255, 0.90), transparent 100%),
    radial-gradient(1.2px 1.2px at 69% 17%, rgba(255, 255, 255, 0.85), transparent 100%),
    radial-gradient(2.2px 2.2px at 81% 26%, rgba(255, 255, 255, 0.95), transparent 100%),
    radial-gradient(1.4px 1.4px at 92% 8%,  rgba(255, 255, 255, 0.80), transparent 100%),
    radial-gradient(1.6px 1.6px at 15% 41%, rgba(255, 255, 255, 0.75), transparent 100%),
    radial-gradient(1.3px 1.3px at 88% 44%, rgba(255, 255, 255, 0.70), transparent 100%),
    radial-gradient(1.7px 1.7px at 76% 58%, rgba(255, 255, 255, 0.65), transparent 100%),
    radial-gradient(1.2px 1.2px at 27% 64%, rgba(255, 255, 255, 0.60), transparent 100%);
}
.pal-nav::after {
  background-image:
    radial-gradient(1.3px 1.3px at 12% 34%, rgba(244, 246, 255, 0.75), transparent 100%),
    radial-gradient(1.9px 1.9px at 25% 16%, rgba(244, 246, 255, 0.85), transparent 100%),
    radial-gradient(1.1px 1.1px at 40% 38%, rgba(244, 246, 255, 0.70), transparent 100%),
    radial-gradient(2.1px 2.1px at 52% 11%, rgba(244, 246, 255, 0.90), transparent 100%),
    radial-gradient(1.5px 1.5px at 63% 33%, rgba(244, 246, 255, 0.75), transparent 100%),
    radial-gradient(1.2px 1.2px at 74% 5%,  rgba(244, 246, 255, 0.80), transparent 100%),
    radial-gradient(1.8px 1.8px at 85% 38%, rgba(244, 246, 255, 0.70), transparent 100%),
    radial-gradient(1.4px 1.4px at 95% 19%, rgba(244, 246, 255, 0.75), transparent 100%),
    radial-gradient(1.6px 1.6px at 7% 55%,  rgba(244, 246, 255, 0.60), transparent 100%),
    radial-gradient(1.3px 1.3px at 33% 51%, rgba(244, 246, 255, 0.55), transparent 100%);
}
@keyframes pal-stars-a { from { opacity: 0.55; } to { opacity: 1; } }
@keyframes pal-stars-b { from { opacity: 1; } to { opacity: 0.45; } }
body.pal-sky-night .pal-nav::before,
body.pal-user-night .pal-nav::before { animation: pal-stars-a 9s ease-in-out infinite alternate; }
body.pal-sky-night .pal-nav::after,
body.pal-user-night .pal-nav::after  { animation: pal-stars-b 13s ease-in-out infinite alternate; }
/* Manual day switch hides the stars even during a night hour */
body.pal-user-day .pal-nav::before,
body.pal-user-day .pal-nav::after { animation: none; opacity: 0; }

/* ---- The travelling lights change colour with the part of the day ---- */
body.pal-sky-dawn::before {
  background: radial-gradient(ellipse at center, rgba(255, 196, 156, 0.42) 0%, rgba(255, 196, 156, 0.18) 40%, transparent 70%);
}
body.pal-sky-dawn::after {
  background: radial-gradient(ellipse at center, rgba(255, 171, 145, 0.32) 0%, rgba(255, 171, 145, 0.14) 42%, transparent 72%);
}
body.pal-sky-dusk::before {
  background: radial-gradient(ellipse at center, rgba(255, 173, 122, 0.46) 0%, rgba(255, 173, 122, 0.20) 40%, transparent 70%);
}
body.pal-sky-dusk::after {
  background: radial-gradient(ellipse at center, rgba(255, 136, 107, 0.32) 0%, rgba(255, 136, 107, 0.14) 42%, transparent 72%);
}

/* ---- Owner choice: no animation when the system asks for reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .pal-card, .pal-main::before, .pal-main::after, body::before, body::after { animation: none; }
  .pal-main::before, .pal-main::after { opacity: 0.85; }
  .pal-aurora i { animation: none; }
  .pal-flow,
  .pal-tornado { display: none; }
  .pal-aurora .pal-meteor { opacity: 0; }
  body.pal-sky-night .pal-nav::before,
  body.pal-sky-night .pal-nav::after,
  body.pal-user-night .pal-nav::before,
  body.pal-user-night .pal-nav::after { animation: none; opacity: 0.85; }
  * { transition-duration: 0.01ms !important; }
}

/* ---- No post/page headers and no banners (owner request) ---- */
.pal-entry-title { display: none; }

/* ---- Article text: generous paragraph spacing, ready for two columns ---- */
.pal-entry-content h2,
.pal-entry-content h3 {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pal-heading);
  text-shadow: var(--pal-header-shadow);
}
.pal-entry-content h2 { font-size: 1.4rem; margin: 2.2em 0 0.7em; break-after: avoid; }
.pal-entry-content h3 { font-size: 1.2rem; margin: 1.8em 0 0.6em; break-after: avoid; }
.pal-entry-content p { margin: 0 0 1.6em; color: var(--pal-text); }
.pal-entry-content li { margin: 0 0 0.55em; color: var(--pal-text); }
.pal-entry-content ul, .pal-entry-content ol { margin: 0 0 1.6em; }
.pal-entry-content blockquote {
  border-left: 4px solid var(--pal-quote-border);
  background: var(--pal-quote-bg);
  border-radius: 0 14px 14px 0;
  padding: 0.6rem 1.1rem;
  margin: 1.4em 0;
  break-inside: avoid;
}
.pal-entry-content a { color: var(--pal-link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.pal-entry-content a:hover, .pal-entry-content a:focus { color: var(--pal-link-hover); }
.pal-entry-content img { max-width: 100%; height: auto; border-radius: 14px; }

h1, h2, h3, h4, h5, h6 {
  font-family: "Rubik", "Open Sans", system-ui, -apple-system, sans-serif;
  color: var(--pal-heading);
}

/* ---- One screen, sideways reading (desktop 901px and wider) ----
   The page never grows past one screen: the body is a column, the glass
   header keeps its size and the reading card fills the remaining height.
   Text that does not fit flows into further columns on the right, so the
   reading card scrolls sideways - left and right - instead of the page
   scrolling down. Phones (900px and below) keep ordinary vertical
   scrolling, and printing always reverts to one normal paper column. */
@media (min-width: 901px) {
  html, body { height: 100%; }
  body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  body.admin-bar { height: calc(100% - 32px); }
  .pal-header { flex: 0 0 auto; }
  .pal-main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0.9rem 0 0.6rem;
  }
  .pal-card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 1.1rem 0 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--pal-rule, rgba(30, 50, 80, 0.35)) transparent;
  }
  .pal-entry-content {
    flex: 1 1 auto;
    min-height: 0;
    column-width: min(26rem, 60vw);
    column-gap: 3rem;
    column-rule: 1px solid var(--pal-rule);
    column-fill: auto;
  }
  .pal-entry-content > .pal-share,
  .pal-entry-content > .wp-block-cover,
  .pal-entry-content > .wp-block-image,
  .pal-entry-content > figure,
  .pal-entry-content > img { break-inside: avoid; }
  .pal-entry-content img { max-height: 60vh; }
  .pal-entry-content > .wp-block-cover { max-height: 70vh; overflow: hidden; }
  .pal-entry-content > .pal-columns,
  .pal-entry-content > .pal-boards,
  .pal-entry-content > .pal-media-row,
  .pal-entry-content > .pal-sky-stage,
  .pal-entry-content > blockquote { break-inside: avoid; }
}

/* ---- Share buttons under every page and article ---- */
.pal-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 2.2rem 0 0.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--pal-share-rule);
}
.pal-share-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--pal-muted);
  margin-right: 0.2rem;
}
.pal-share-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--pal-share-border);
  background: var(--pal-share-bg);
  color: var(--pal-link);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.pal-share-link:hover,
.pal-share-link:focus-visible {
  background: var(--pal-link);
  border-color: var(--pal-link);
  color: #FFFFFF;
}

/* ---- Contact form (In touch): a bigger window with larger letters ---- */
body.page-id-186 .pal-main { width: 82%; }
.pal-entry-content .wpcf7,
.pal-entry-content .wp-block-contact-form-7-contact-form-selector { max-width: none; }
.wpcf7-form,
.pal-entry-content form { max-width: none; margin: 1.4rem 0; }
.wpcf7-form p,
.pal-entry-content form p { margin: 0 0 1.15rem; }
.wpcf7-form label,
.pal-entry-content form label,
.wpcf7-form .wpcf7-form-control-wrap + span {
  display: block;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--pal-text);
  margin-bottom: 0.4rem;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="date"],
.wpcf7-form input[type="number"],
.wpcf7-form select,
.wpcf7-form textarea,
.pal-entry-content form input[type="text"],
.pal-entry-content form input[type="email"],
.pal-entry-content form input[type="tel"],
.pal-entry-content form select,
.pal-entry-content form textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  border: 2px solid var(--pal-share-border);
  border-radius: 14px;
  background: var(--pal-share-bg);
  color: var(--pal-text);
  font-family: inherit;
  font-size: 1.18rem;
  line-height: 1.4;
  box-sizing: border-box;
}
.wpcf7-form textarea,
.pal-entry-content form textarea {
  min-height: 11rem;
  resize: vertical;
}
.wpcf7-form input:focus-visible,
.wpcf7-form select:focus-visible,
.wpcf7-form textarea:focus-visible { outline: 2px solid var(--pal-focus); outline-offset: 2px; }
.wpcf7-response-output,
.wpcf7-not-valid-tip { font-size: 1.05rem; }

/* ---- Brand buttons: white text on deep blue, dark text on pink ---- */
.wp-block-button__link, .wp-block-button > a {
  background: linear-gradient(135deg, #155FA0, #1E6FBF);
  color: #FFFFFF;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  text-decoration: none;
}
input[type="submit"], button[type="submit"] {
  background: linear-gradient(135deg, #FF8EC7, #FF69B4);
  color: #101820;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
}

/* ---- Pagination: glass pills ---- */
.nav-links, .page-links {
  text-align: center;
  margin: 1.6rem 0;
}
.nav-links a, .nav-links span, .page-links a, .page-links span {
  display: inline-block;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin: 0 0.2rem;
  background: var(--pal-page-bg);
  color: var(--pal-page-ink);
  text-decoration: none;
  font-size: 0.9rem;
}
.nav-links .current { background: linear-gradient(135deg, #155FA0, #1E6FBF); color: #FFFFFF; }

/* ---- Three independent columns ---- */
.pal-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  margin: 1.6rem 0;
}
.pal-col {
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
}
.pal-col-bar { height: 4px; border-radius: 2px; margin: 0 0 0.8rem; }
.pal-col-blue .pal-col-bar { background: linear-gradient(90deg, #1E90FF, #6B8EFF); }
.pal-col-violet .pal-col-bar { background: linear-gradient(90deg, #B388FF, #800080); }
.pal-col-orange .pal-col-bar { background: linear-gradient(90deg, #FFA500, #FFD700); }
.pal-col h2 { margin: 0 0 0.6rem; font-size: 1.2rem; color: var(--pal-heading); text-shadow: var(--pal-header-shadow); }
.pal-col p { margin: 0 0 0.7rem; font-size: 0.95rem; color: var(--pal-text); }

/* ---- Thematic boards: floating glass cards ---- */
.pal-boards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin: 1.8rem 0;
  perspective: 1200px;
}
.pal-board {
  position: relative;
  overflow: hidden;
  background: var(--pal-panel-bg);
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  border: 1px solid var(--pal-panel-border);
  border-radius: 22px;
  padding: 1.3rem 1.3rem 1.1rem;
  box-shadow: var(--pal-panel-shadow);
  color: var(--pal-panel-ink);
  animation: pal-swing 7s ease-in-out infinite;
}
.pal-board:nth-child(2) { animation-delay: 1.4s; }
.pal-board:nth-child(3) { animation-delay: 2.8s; }
@keyframes pal-swing {
  0%, 100% { transform: translateY(0) rotateX(0deg); }
  50% { transform: translateY(-6px) rotateX(1.6deg); }
}
.pal-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  display: block;
}
.pal-accent-blue { background: linear-gradient(90deg, #1E90FF, #6B8EFF); }
.pal-accent-violet { background: linear-gradient(90deg, #B388FF, #800080); }
.pal-accent-orange { background: linear-gradient(90deg, #FFA500, #FFD700); }
.pal-board h3 { margin: 0.2rem 0 0.6rem; color: var(--pal-heading); font-size: 1.25rem; }
.pal-board p { margin: 0 0 0.6rem; font-size: 0.95rem; color: var(--pal-panel-ink); }
.pal-board ul { margin: 0; padding-left: 1.2rem; font-size: 0.95rem; }

/* ---- Multimedia frames: glass windows with rolling text ---- */
.pal-media-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin: 1.8rem 0;
}
.pal-media {
  position: relative;
  overflow: hidden;
  background: var(--pal-panel-bg);
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  border: 1px solid var(--pal-panel-border);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: var(--pal-panel-shadow);
}
.pal-media-view {
  position: relative;
  height: 150px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.40);
  background:
    radial-gradient(120% 100% at 15% 20%, rgba(255, 105, 180, 0.75), transparent 60%),
    radial-gradient(120% 100% at 85% 80%, rgba(30, 144, 255, 0.78), transparent 60%),
    linear-gradient(180deg, rgba(11, 16, 38, 0.35), rgba(42, 15, 84, 0.35));
}
.pal-media-roll { animation: pal-roll 9s linear infinite; padding: 0.4rem 0.7rem; }
.pal-media-roll p { margin: 0.35rem 0; font-size: 0.9rem; color: #F4F6FF; }
.pal-media-roll a { color: #9BC9FF; }
@keyframes pal-roll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* ---- The in-touch window: big glass frame with the fractal tiles ---- */
.pal-sky-stage {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--pal-panel-border);
  background: var(--pal-panel-bg);
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  padding: clamp(0.8rem, 3vw, 1.6rem);
  box-shadow: var(--pal-panel-shadow);
}
.pal-sky-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 18% 12%, rgba(255, 105, 180, 0.85), transparent 55%),
    radial-gradient(120% 90% at 82% 88%, rgba(30, 144, 255, 0.90), transparent 55%),
    radial-gradient(90% 70% at 60% 40%, rgba(255, 165, 0, 0.75), transparent 55%),
    linear-gradient(180deg, rgba(11, 16, 38, 0.45), rgba(42, 15, 84, 0.45));
}
.pal-tiles {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.pal-tile {
  min-height: 120px;
  border-radius: 14px;
  background-size: cover;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.50);
  opacity: 0;
  animation: pal-tile-in 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.pal-tiles .pal-tile:nth-child(1) { animation-delay: 0.05s; }
.pal-tiles .pal-tile:nth-child(2) { animation-delay: 0.10s; }
.pal-tiles .pal-tile:nth-child(3) { animation-delay: 0.15s; }
.pal-tiles .pal-tile:nth-child(4) { animation-delay: 0.20s; }
.pal-tiles .pal-tile:nth-child(5) { animation-delay: 0.25s; }
.pal-tiles .pal-tile:nth-child(6) { animation-delay: 0.30s; }
.pal-tiles .pal-tile:nth-child(7) { animation-delay: 0.35s; }
.pal-tiles .pal-tile:nth-child(8) { animation-delay: 0.40s; }
.pal-tiles .pal-tile:nth-child(9) { animation-delay: 0.45s; }
.pal-tiles .pal-tile:nth-child(10) { animation-delay: 0.50s; }
.pal-tiles .pal-tile:nth-child(11) { animation-delay: 0.55s; }
.pal-tiles .pal-tile:nth-child(12) { animation-delay: 0.60s; }
.pal-dr-lu { --pal-dx: -26px; --pal-dy: -26px; transform: translate(-26px, -26px); }
.pal-dr-ru { --pal-dx: 26px; --pal-dy: -26px; transform: translate(26px, -26px); }
.pal-dr-lm { --pal-dx: -26px; --pal-dy: 0; transform: translate(-26px, 0); }
.pal-dr-rm { --pal-dx: 26px; --pal-dy: 0; transform: translate(26px, 0); }
.pal-dr-ld { --pal-dx: -26px; --pal-dy: 26px; transform: translate(-26px, 26px); }
.pal-dr-rd { --pal-dx: 26px; --pal-dy: 26px; transform: translate(26px, 26px); }
@keyframes pal-tile-in {
  0% { opacity: 0; transform: translate(var(--pal-dx, -26px), var(--pal-dy, -26px)) scale(0.92); }
  100% { opacity: 1; transform: translate(0, 0) scale(1); }
}
.pal-sky-caption {
  position: relative;
  text-align: center;
  margin: 1rem 0 0;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--pal-text);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .pal-main { width: 94%; }
  .pal-card { padding: 6%; border-width: 8px; }
  .pal-main::before { left: -4%; }
  .pal-main::after { right: -4%; }
  .pal-aurora i:nth-child(1),
  .pal-aurora i:nth-child(2),
  .pal-aurora i:nth-child(3) { filter: blur(16px); }
  .pal-columns { grid-template-columns: 1fr; }
  .pal-tiles { grid-template-columns: repeat(2, 1fr); }
  .pal-header { gap: 0.5rem 1rem; }
  .pal-access { margin-left: 0; }
}

/* ---- Printing: fixed 12 pt type, plain white paper, no interface ---- */
@media print {
  html { font-size: 12pt !important; }
  body { background: #FFFFFF !important; color: #000000; font-size: 12pt; line-height: 1.5; }
  .pal-entry-content h2 { font-size: 14pt; }
  .pal-entry-content h3 { font-size: 13pt; }
  .pal-entry-content p, .pal-entry-content li, .pal-entry-content a { color: #000000; }
  .pal-header, .pal-access, .pal-skip,
  .pal-share, .pal-main::before, .pal-main::after,
  body::before, body::after, .pal-aurora, .pal-flow,
  .pal-tornado { display: none !important; }
  .pal-card {
    background: none;
    border: none;
    box-shadow: none;
    animation: none;
    color: #000000;
  }
  html, body { height: auto; overflow: visible; }
  body { display: block; }
  body.admin-bar { height: auto; }
  .pal-main { display: block; flex: none; }
  .pal-card { display: block; flex: none; overflow: visible; }
  .pal-entry-content {
    height: auto;
    flex: none;
    column-count: 1;
    column-width: auto;
    column-fill: balance;
    max-height: none;
  }
  .pal-entry-content img { max-height: none; }
  .pal-entry-content form { display: none; }
  .pal-sky-stage, .pal-media, .pal-board { background: none; border: none; box-shadow: none; }
}

/* ---- Accessibility: motion reduced ---- */
@media (prefers-reduced-motion: reduce) {
  .pal-board, .pal-media-roll, .pal-tile { animation: none; }
  .pal-tile { opacity: 1; transform: none; }
  * { transition-duration: 0.01ms !important; }
}


/* ==========================================================================
   Aberdeen Dream v3.0.0 — Dream Options: click-editable display, cloud
   flight styles, fog lights, and the multimedia toolkit.
   The Customizer writes three custom properties: --pal-main-width,
   --pal-card-alpha and --pal-bg-dim; pal-clouds.js reads window.PAL_SKY.
   ========================================================================== */

/* ---- Dim veil over the artwork (Customizer slider, 0 = invisible) ---- */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, var(--pal-bg-dim, 0));
  pointer-events: none;
  z-index: 0;
}

/* ---- Effect switches: each Customizer toggle drops one body class ---- */
body.pal-no-aurora .pal-aurora i:nth-child(1),
body.pal-no-aurora .pal-aurora i:nth-child(2),
body.pal-no-aurora .pal-aurora i:nth-child(3) { display: none; }
body.pal-no-meteors .pal-aurora .pal-meteor { display: none; }
body.pal-no-stars .pal-nav::before,
body.pal-no-stars .pal-nav::after,
body.pal-no-stars .pal-aurora i:nth-child(4) { display: none; }
body.pal-no-glows::before,
body.pal-no-glows::after { display: none; }
body.pal-clouds-off .pal-flow,
body.pal-no-clouds .pal-flow { display: none; }


/* ---- Multimedia toolkit: galleries, mixes, motion banners, embeds ---- */

/* Mosaic gallery: photos placed edge to edge, each tile breathing open. */
.pal-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.pal-mosaic figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(11, 18, 38, 0.25);
}
.pal-mosaic img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pal-mosaic figure:hover img { transform: scale(1.08); }
.pal-mosaic figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 1rem;
  background: linear-gradient(180deg, rgba(11, 18, 38, 0), rgba(11, 18, 38, 0.72));
  color: #FFFFFF;
  font-size: 0.95rem;
}

/* Photo mix: two photos blended, the top one breathing over the base. */
.pal-mix { position: relative; overflow: hidden; border-radius: 20px; }
.pal-mix img { width: 100%; display: block; }
.pal-mix .pal-mix-b {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: luminosity;
  animation: pal-mix-breathe 9s ease-in-out infinite alternate;
}
@keyframes pal-mix-breathe {
  from { opacity: 0.30; }
  to { opacity: 0.90; }
}

/* Slow drift across a photo (the classic photo effect, pure CSS). */
.pal-ken { overflow: hidden; border-radius: 20px; }
.pal-ken img { width: 100%; display: block; animation: pal-ken-drift 22s ease-in-out infinite alternate; }
@keyframes pal-ken-drift {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.14) translate(-2.5%, -2%); }
}

/* Motion banner: the modern answer to flash animation, pure CSS. */
.pal-flash {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 2.2rem 2.6rem;
  text-align: center;
  background: linear-gradient(120deg, #1E90FF, #6B8EFF 45%, #B388FF 78%, #FF8ECC);
  color: #FFFFFF;
  box-shadow: 0 0 34px rgba(107, 142, 255, 0.45);
}
.pal-flash strong {
  display: block;
  font-family: 'Rubik', sans-serif;
  font-size: 1.9rem;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 14px rgba(11, 18, 38, 0.5);
}
.pal-flash span { display: block; margin-top: 0.5rem; font-size: 1.05rem; }
.pal-flash::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  animation: pal-flash-sweep 4.5s ease-in-out infinite;
}
@keyframes pal-flash-sweep {
  0% { left: -60%; }
  55%, 100% { left: 130%; }
}

/* Responsive embed frames: link previews, video, GIFs. */
.pal-video { position: relative; overflow: hidden; border-radius: 16px; box-shadow: 0 10px 30px rgba(11, 18, 38, 0.25); }
.pal-video, .pal-video iframe { width: 100%; border: 0; border-radius: 16px; }
iframe[src*="youtube"], iframe[src*="vimeo"] { max-width: 100%; }

/* Block-editor galleries and captions keep the house style. */
.wp-block-gallery img, .gallery img { border-radius: 12px; }
.wp-block-gallery figcaption, .gallery-caption, .wp-block-image figcaption {
  font-size: 0.92rem;
  color: var(--pal-muted, #5A6B85);
  padding-top: 0.4rem;
}

/* Wide alignment from the block editor (columns stay untouched). */
@media (max-width: 1099px) {
  .pal-entry-content > .alignwide { width: 120%; margin-left: -10%; }
  .pal-entry-content > .alignfull { width: 100vw; margin-left: calc(50% - 50vw); max-width: none; }
}

/* ---- Reduced motion: the new effects rest too ---- */
@media (prefers-reduced-motion: reduce) {
  .pal-mix .pal-mix-b,
  .pal-ken img,
  .pal-flash::after { animation: none; }
  .pal-mosaic img { transition: none; }
}

/* ---- Print stays clean paper ---- */
@media print {
  html::before { display: none; }
  .pal-mosaic, .pal-mix, .pal-ken, .pal-flash, .pal-video { box-shadow: none; page-break-inside: avoid; }
}

/* ==========================================================================
   The WebGL world (v4.1.0): a true 3D cube sky drawn on the graphics
   card by pal-world.js. When it starts, the body gains pal-webgl-on and
   the canvas replaces the CSS swarm and the CSS tornado; when WebGL is
   missing, the Customizer switch turns the sky off, or the visitor asks
   for reduced motion, the approved v4.0.0 CSS swarm stays untouched.
   The canvas never takes pointer events and never prints.
   ========================================================================== */

#pal-world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: none;
  pointer-events: none;
}

body.pal-webgl-on #pal-world { display: block; }

/* While the WebGL world runs, the CSS swarm and the CSS tornado rest */
body.pal-webgl-on .pal-flow,
body.pal-webgl-on .pal-tornado { display: none; }

/* The canvas never appears on paper */
@media print {
  #pal-world { display: none; }
}

