@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap");

body {
  --royal-accent: #4467a9;
  --royal-accent-strong: #254780;
  --royal-glow: #a8d0ff;
  --royal-sky: #e9f2ff;
  --royal-orb: #ffdfad;
  --royal-cloud: #ffffffa8;
  --bg: #eef5ff;
  --surface: #ffffffce;
  --ink: #1b2b42;
  --muted: #5f6f85;
  --line: #ffffffb9;
  --gold: var(--royal-accent);
  --shadow: 0 16px 44px #294b7a16;
  background:
    radial-gradient(ellipse at 25% 2%, var(--royal-sky), transparent 52%),
    linear-gradient(145deg, #f3f7fe, #eaf1fa 70%, #f7f9fd);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  transition:
    background 0.7s ease,
    color 0.5s ease;
}
body[data-theme="midnight"] {
  --royal-accent: #b9a4f4;
  --royal-accent-strong: #9f8ee6;
  --royal-glow: #8e87df;
  --royal-sky: #25395e;
  --royal-orb: #afbafc;
  --royal-cloud: #a6b7e02a;
  --bg: #121c30;
  --surface: #1e2d47d9;
  --ink: #f1f5ff;
  --muted: #b6c3d8;
  --line: #8ba6ca38;
  --shadow: 0 18px 48px #050a1b45;
  background:
    radial-gradient(ellipse at 20% 5%, #24395f, transparent 50%),
    linear-gradient(145deg, #10192b, #1d2844);
}
body[data-theme="aurora"] {
  --royal-accent: #82e6d2;
  --royal-accent-strong: #45b9a7;
  --royal-glow: #78ecd3;
  --royal-sky: #264c61;
  --royal-orb: #78dfd5;
  --royal-cloud: #83e8c730;
  --bg: #102a32;
  --surface: #193943da;
  --ink: #eefefc;
  --muted: #b0d4d2;
  --line: #a0e7d04b;
  --shadow: 0 18px 48px #031e2652;
  background:
    radial-gradient(ellipse at 75% 2%, #286477, transparent 55%),
    linear-gradient(140deg, #0c2531, #193a39);
}
body[data-theme="rose"] {
  --royal-accent: #a6587c;
  --royal-accent-strong: #883c62;
  --royal-glow: #e9a9c6;
  --royal-sky: #ffe1ec;
  --royal-orb: #ffcfb0;
  --royal-cloud: #fff5f8b9;
  --bg: #fff1f5;
  --surface: #fff9fbe0;
  --ink: #4b273d;
  --muted: #866b7c;
  --line: #fffafccd;
  --shadow: 0 16px 44px #9d4a6e20;
  background:
    radial-gradient(ellipse at 20% 5%, #ffe3ed, transparent 48%),
    linear-gradient(140deg, #fff5f6, #f8e9f0);
}
body[data-theme="sand"] {
  --royal-accent: #946c39;
  --royal-accent-strong: #765124;
  --royal-glow: #d4ae71;
  --royal-sky: #fff1ce;
  --royal-orb: #f9d78f;
  --royal-cloud: #fffef2b8;
  --bg: #f9f3e8;
  --surface: #fffdf5de;
  --ink: #3e3425;
  --muted: #80715b;
  --line: #fffaf0d9;
  --shadow: 0 16px 44px #785b2f20;
  background:
    radial-gradient(ellipse at 20% 5%, #fff0c7, transparent 50%),
    linear-gradient(140deg, #fcf8ee, #f3e9d9);
}
body[data-theme="graphite"] {
  --royal-accent: #c4daf6;
  --royal-accent-strong: #98b9e2;
  --royal-glow: #c4daf6;
  --royal-sky: #475467;
  --royal-orb: #ced9ef;
  --royal-cloud: #d0dae52e;
  --bg: #171c25;
  --surface: #292f3adf;
  --ink: #f6f8fc;
  --muted: #bcc6d5;
  --line: #aebdd448;
  --shadow: 0 18px 48px #080b144e;
  background:
    radial-gradient(ellipse at 20% 5%, #3b465c, transparent 48%),
    linear-gradient(145deg, #171b24, #252c38);
}
body[data-type-scale="large"] {
  font-size: 17px;
}
body[data-type-scale="large"] .sub,
body[data-type-scale="large"] .notice,
body[data-type-scale="large"] .item {
  font-size: 1rem;
}
h1,
h2,
h3,
.brand strong,
.stat strong,
.oracle-timer {
  font-family: "Outfit", sans-serif;
}
h1 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: -0.045em;
  line-height: 1.12;
}
h2 {
  letter-spacing: -0.035em;
}
button,
input,
textarea,
select {
  font-family: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--royal-accent);
  outline-offset: 3px;
}
::selection {
  background: var(--royal-glow);
  color: #15223a;
}

.sky-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.sky-scene span {
  position: absolute;
  display: block;
}
.sky-orb {
  width: min(31vw, 390px);
  aspect-ratio: 1;
  right: -5%;
  top: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--royal-orb) 0, transparent 68%);
  filter: blur(8px);
  opacity: 0.55;
  animation: breathe 9s ease-in-out infinite alternate;
}
.sky-cloud {
  width: 350px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 50%,
    var(--royal-cloud),
    transparent 70%
  );
  filter: blur(18px);
  opacity: 0.68;
  animation: cloudFloat 40s linear infinite alternate;
}
.sky-cloud-one {
  left: -8%;
  top: 16%;
}
.sky-cloud-two {
  right: 5%;
  top: 39%;
  transform: scale(1.4);
  animation-duration: 57s;
  animation-direction: alternate-reverse;
}
.sky-cloud-three {
  left: 34%;
  bottom: 4%;
  transform: scale(0.75);
  animation-duration: 48s;
}
.sky-stars {
  inset: 0;
  opacity: 0;
  background-image:
    radial-gradient(circle, #fff 1px, transparent 2px),
    radial-gradient(circle, #b5d4ff 1px, transparent 2px),
    radial-gradient(circle, #fff 1.5px, transparent 2px);
  background-size:
    130px 140px,
    221px 181px,
    347px 293px;
  background-position:
    23px 15px,
    78px 86px,
    170px 135px;
  animation: starlight 7s ease-in-out infinite alternate;
}
body.dark .sky-stars {
  opacity: 0.75;
}
.shell {
  position: relative;
  z-index: 1;
}
main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 72px);
}
#content { flex: 1; }
.royal-footer {
  width: 100%;
  margin: 44px auto 0;
  padding: 28px max(28px, calc((100% - 1180px)/2)) 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .02em;
}
.royal-footer-brand, .royal-footer-links { display: grid; gap: 8px; align-content: start; min-width: 145px; }
.royal-footer-brand { flex: 1 1 280px; grid-template-columns: auto 1fr; column-gap: 10px; }
.royal-footer-brand .royal-footer-mark { grid-row: span 2; font-size: 18px; }
.royal-footer-brand img { width: 36px; height: 36px; grid-row: span 2; object-fit: contain; }
.royal-footer-brand strong { color: var(--ink); letter-spacing: .16em; font-size: 13px; }
.royal-footer-brand small, .royal-footer-links { color: var(--muted); font-size: 11px; }
.royal-footer-brand p { grid-column: 1 / -1; max-width: 300px; margin: 8px 0 0; line-height: 1.5; }
.github-mark { display:inline-flex; align-items:center; gap:7px; color:var(--muted)!important; font-size:12px; font-weight:600; }
.github-mark svg { width:20px; height:20px; fill:currentColor; }
.royal-footer-links strong { color: var(--ink); text-transform: uppercase; letter-spacing: .15em; font-size: 10px; margin-bottom: 5px; }
.royal-footer-links a, .royal-footer-links button { width: fit-content; border: 0; padding: 0; background: none; color: var(--muted); font-size: 11px; text-decoration: none; }
.royal-footer-links a:hover, .royal-footer-links button:hover { color: var(--ink); }
.royal-footer-bottom { flex: 1 0 100%; display: flex; justify-content: space-between; gap: 12px; padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.royal-ticker { width: 100vw; margin: 0 0 24px calc(50% - 50vw); overflow: hidden; border-block: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 72%, transparent); }
.royal-ticker-track { display: flex; width: max-content; animation: royalTicker 34s linear infinite; }
.royal-ticker-item { display: inline-flex; align-items: center; gap: 9px; min-width: 150px; padding: 14px 25px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.royal-ticker-item::after { content: "•"; margin-left: 15px; color: var(--royal-accent); }
.royal-ticker-item img { display:block; width:22px; height:22px; object-fit:contain; border-radius:5px; }
@keyframes royalTicker { to { transform: translateX(-50%); } }
.royal-footer-mark { color: var(--gold); font-size: 15px; }
.royal-footer a { color: var(--ink); font-weight: 700; text-decoration: none; }
.royal-footer a:hover, .royal-footer a:focus-visible { color: var(--gold); text-decoration: underline; }
body::before {
  opacity: 0.3;
}
body.dark::before {
  opacity: 0.14;
}

.side {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 35px #243c6c13;
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
}
.brand strong {
  color: var(--ink);
  letter-spacing: 0.12em;
}
.brand small {
  color: var(--muted);
}
.nav-groups button {
  color: var(--muted);
  transition:
    color 0.25s,
    background 0.25s,
    transform 0.25s;
}
.nav-groups button.selected {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}
nav button {
  color: var(--muted);
  transition:
    color 0.25s,
    background 0.25s,
    transform 0.25s,
    box-shadow 0.25s;
}
nav button:hover,
nav button.active {
  color: var(--ink);
  background: color-mix(in srgb, var(--royal-accent) 11%, var(--surface));
}
nav button.active {
  box-shadow:
    inset 0 -2px var(--royal-accent),
    0 8px 20px #35537413;
}
.top {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.card,
.quick button,
.icon-btn {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}
.card {
  animation: cardReveal 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.35s,
    border-color 0.35s;
}
.stats > :nth-child(2),
.grid2 > :nth-child(2),
.theme-choice:nth-child(2) {
  animation-delay: 0.08s;
}
.stats > :nth-child(3),
.theme-choice:nth-child(3) {
  animation-delay: 0.16s;
}
.stats > :nth-child(4),
.theme-choice:nth-child(4) {
  animation-delay: 0.24s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px #2a497b24;
  border-color: color-mix(in srgb, var(--royal-accent) 25%, var(--line));
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 35%,
    #ffffff20 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.75s;
}
.card:hover::after {
  transform: translateX(120%);
}
.primary {
  background: linear-gradient(
    135deg,
    var(--royal-accent),
    var(--royal-accent-strong)
  );
  color: white;
  box-shadow: 0 8px 22px
    color-mix(in srgb, var(--royal-accent) 35%, transparent);
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    filter 0.25s;
}
.primary:hover {
  background: linear-gradient(
    135deg,
    var(--royal-accent),
    var(--royal-accent-strong)
  );
  box-shadow: 0 12px 28px
    color-mix(in srgb, var(--royal-accent) 42%, transparent);
  filter: brightness(1.06);
}
body.dark .primary {
  color: #112033;
}
.secondary,
input,
select,
textarea {
  border-color: var(--line);
  color: var(--ink);
}
input,
select,
textarea {
  background: color-mix(in srgb, var(--surface) 85%, transparent);
}
.hero {
  background: linear-gradient(
    120deg,
    color-mix(in srgb, var(--royal-accent-strong) 72%, #172542),
    #172642eb
  );
  border: 1px solid #ffffff45;
}
body[data-theme="aurora"] .hero {
  background: linear-gradient(120deg, #174f62, #133d43);
}
body[data-theme="rose"] .hero {
  background: linear-gradient(120deg, #8e4c70, #673853);
}
body[data-theme="sand"] .hero {
  background: linear-gradient(120deg, #8c673b, #614a30);
}
body[data-theme="graphite"] .hero {
  background: linear-gradient(120deg, #3d4d68, #212c40);
}
.hero::before {
  border-color: #ffffff54;
  animation: heroOrbit 16s ease-in-out infinite alternate;
}
.hero::after {
  border-color: #ffffff28;
  animation: heroOrbit 21s ease-in-out infinite alternate-reverse;
}
.hero .mark {
  animation: none;
}
.hero .hero-logo {
  display: block;
  width: clamp(125px, 16vw, 160px);
  height: auto;
  aspect-ratio: 1;
  flex: none;
  object-fit: cover;
  border-radius: 28px;
  box-shadow:
    0 18px 45px #06192e65,
    0 0 35px #51c5ff54;
}
.brand img,
.auth-card img {
  border-radius: 13px;
  box-shadow: 0 6px 18px #1b63c653;
}
.hero .eyebrow {
  color: #f2dcb6;
}
.hero h1 {
  font-size: clamp(2.1rem, 3.2vw, 3.4rem);
}
.hero p {
  color: #e5ecf8d9;
}
.stat strong {
  color: var(--ink);
  font-size: 2.2rem;
}
.stat em,
.link {
  color: var(--royal-accent);
}
.news-item {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border-color: var(--line);
}
.news-item:hover {
  background: var(--surface);
}
.auth-card {
  animation: cardReveal 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.auth-card h1 {
  font-size: 2.5rem;
}

.settings-intro {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 25px 29px;
  margin: 24px 0;
  background: linear-gradient(
    125deg,
    color-mix(in srgb, var(--royal-accent) 13%, var(--surface)),
    var(--surface)
  );
}
.settings-intro-mark {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 24px;
  background: linear-gradient(
    140deg,
    var(--royal-accent),
    var(--royal-accent-strong)
  );
  color: white;
  font-size: 36px;
  box-shadow: 0 9px 24px
    color-mix(in srgb, var(--royal-accent) 30%, transparent);
  animation: crownFloat 6s ease-in-out infinite alternate;
  flex: none;
}
.settings-intro h2 {
  font-size: 1.7rem;
  margin: 4px 0;
}
.settings-intro p {
  margin: 0;
  color: var(--muted);
}
.settings-page .settings-grid .panel {
  padding: 25px;
}
.settings-page .settings-grid {
  align-items: stretch;
}
.settings-page label {
  color: var(--ink);
  font-weight: 600;
}
.settings-page label input,
.settings-page label select {
  margin-top: 7px;
}
.theme-select-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.theme-choice {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 9px;
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
  text-align: left;
  transition:
    transform 0.25s,
    border-color 0.25s,
    box-shadow 0.25s;
  animation: cardReveal 0.6s both;
}
.theme-choice:hover {
  transform: translateY(-3px);
  border-color: var(--royal-accent);
}
.theme-choice.selected {
  border-color: var(--royal-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--royal-accent) 20%, transparent);
}
.theme-choice strong {
  font-size: 12px;
}
.theme-choice small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}
.theme-swatch {
  grid-row: span 2;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid #ffffffb0;
  box-shadow:
    inset 0 1px #fff8,
    0 3px 8px #0002;
}
.theme-swatch-system {
  background: linear-gradient(135deg, #aecfff 50%, #26395c 50%);
}
.theme-swatch-sky {
  background: linear-gradient(135deg, #c1d9ff, #fff6e5);
}
.theme-swatch-midnight {
  background: linear-gradient(135deg, #182540, #9188d8);
}
.theme-swatch-aurora {
  background: linear-gradient(135deg, #173748, #73ddc8);
}
.theme-swatch-rose {
  background: linear-gradient(135deg, #fff0f4, #d486a8);
}
.theme-swatch-sand {
  background: linear-gradient(135deg, #fff7db, #cba26a);
}
.theme-swatch-graphite {
  background: linear-gradient(135deg, #1e2430, #8fa5bd);
}
.settings-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0;
}
.settings-actions span {
  color: var(--royal-accent);
  font-size: 13px;
}
.data-panel {
  margin-top: 18px;
}

.royal-oracle {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 100;
  font-family: "DM Sans", sans-serif;
}
.oracle-launcher {
  display: grid;
  place-items: center;
  align-items: center;
  width: 58px;
  height: 58px;
  padding: 7px;
  border-radius: 999px;
  border: 1px solid #ffffff8c;
  color: white;
  background: linear-gradient(130deg, #172b52ee, #344b7aee);
  box-shadow:
    0 14px 35px #13284c5c,
    inset 0 1px #fff5;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  font-size: 0;
  font-weight: 700;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  animation: oracleArrive 0.8s 0.5s both;
}
.oracle-launcher:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px #1c36676b;
}
.oracle-launcher span:nth-child(2),
.oracle-launcher .oracle-badge { display: none; }
.royal-oracle.is-open .oracle-launcher {
  width: auto;
  min-width: 154px;
  height: 54px;
  padding: 8px 13px 8px 9px;
  display: flex;
  gap: 10px;
  font-size: 13px;
}
.royal-oracle.is-open .oracle-launcher span:nth-child(2),
.royal-oracle.is-open .oracle-launcher .oracle-badge { display: inline; }
.oracle-spark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #f9dbb3, #b487df);
  color: #1f2b4b;
  font-size: 22px;
  box-shadow:
    0 0 0 4px #ffffff20,
    0 0 18px #e5c6ff8c;
  animation: sparkle 5s ease-in-out infinite;
}
.oracle-badge {
  font-size: 9px;
  color: #e8ebff;
  border: 1px solid #ffffff45;
  border-radius: 999px;
  padding: 4px 6px;
}
.oracle-panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: min(355px, calc(100vw - 30px));
  border: 1px solid color-mix(in srgb, var(--royal-accent) 35%, var(--line));
  border-radius: 25px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 92%, #fff);
  box-shadow:
    0 28px 80px #101d3e57,
    inset 0 1px #fff8;
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  overflow: hidden;
  animation: oracleOpen 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.oracle-panel[hidden],
.oracle-content[hidden] {
  display: none;
}
.oracle-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 22px 14px;
  background: linear-gradient(
    120deg,
    color-mix(in srgb, var(--royal-accent) 13%, transparent),
    transparent
  );
}
.oracle-head small {
  font-size: 9px;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--royal-accent);
}
.oracle-head h2 {
  font-size: 23px;
  margin: 3px 0 0;
}
.oracle-head h2 span {
  color: var(--royal-accent);
}
.oracle-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 25px;
  line-height: 1;
}
.oracle-tabs {
  display: flex;
  gap: 3px;
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--line);
}
.oracle-tabs button {
  flex: 1;
  border: 0;
  border-radius: 10px;
  padding: 9px 5px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}
.oracle-tabs button[aria-selected="true"] {
  color: var(--ink);
  background: color-mix(in srgb, var(--royal-accent) 14%, var(--surface));
}
.oracle-content {
  min-height: 215px;
  padding: 22px;
  animation: cardReveal 0.35s both;
}
.oracle-fact-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--royal-accent) 17%, var(--surface));
  color: var(--royal-accent);
  font-size: 23px;
}
.oracle-kicker {
  margin: 15px 0 5px;
  color: var(--royal-accent);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.15em;
}
.oracle-fact {
  font-family: "Outfit", sans-serif;
  font-size: 21px;
  line-height: 1.3;
  min-height: 75px;
  margin-bottom: 18px;
}
.oracle-action {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  color: white;
  background: linear-gradient(130deg, #263e6a, #5672a6);
  font-weight: 700;
  font-size: 12px;
}
.oracle-action:hover {
  filter: brightness(1.12);
}
.oracle-timer {
  font-size: 55px;
  letter-spacing: -0.06em;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.oracle-hint {
  min-height: 40px;
  color: var(--muted);
  font-size: 12px;
}
.oracle-controls {
  display: flex;
  gap: 8px;
}
.oracle-soft {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}
.oracle-text-button {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--royal-accent);
  font-size: 12px;
  font-weight: 700;
}
.oracle-shortcuts {
  display: grid;
  gap: 7px;
}
.oracle-shortcuts button {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 12px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--ink);
  text-align: left;
}
.oracle-shortcuts button span {
  flex: 1;
}
.oracle-shortcuts button:hover {
  border-color: var(--royal-accent);
  transform: translateX(3px);
}
.oracle-foot {
  border-top: 1px solid var(--line);
  padding: 10px 22px 14px;
  color: var(--muted);
  font-size: 10px;
}
.auth-mode .royal-oracle {
  display: none;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes cloudFloat {
  to {
    translate: 100px -25px;
  }
}
@keyframes breathe {
  to {
    opacity: 0.8;
    transform: scale(1.12);
  }
}
@keyframes starlight {
  to {
    opacity: 0.35;
    background-position:
      70px 30px,
      120px 110px,
      200px 155px;
  }
}
@keyframes heroOrbit {
  to {
    transform: rotate(20deg) scale(1.1);
  }
}
@keyframes crownFloat {
  to {
    transform: translateY(-12px) rotate(7deg);
  }
}
@keyframes oracleArrive {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes oracleFloat {
  to {
    translate: 0 -4px;
  }
}
@keyframes oracleOpen {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes sparkle {
  50% {
    transform: rotate(18deg) scale(1.07);
  }
}

@media (max-width: 720px) {
  .hero .hero-logo {
    display: none;
  }
  .page {
    padding-bottom: 110px;
  }
  .royal-oracle {
    right: 13px;
    bottom: 13px;
  }
  .oracle-launcher {
    min-height: 50px;
  }
  .oracle-badge {
    display: none;
  }
  .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-intro {
    padding: 18px;
  }
  .settings-intro-mark {
    width: 52px;
    height: 52px;
    font-size: 27px;
    border-radius: 16px;
  }
  .settings-intro h2 {
    font-size: 1.35rem;
  }
}
@media (max-width: 430px) {
  .oracle-panel {
    max-height: min(72vh, 550px);
    overflow-y: auto;
  }
  .oracle-launcher span:nth-child(2) {
    display: none;
  }
  .oracle-launcher {
    padding: 6px;
  }
  .settings-intro {
    align-items: flex-start;
  }
}
body[data-motion="calm"] .sky-scene *,
body[data-motion="calm"] .hero::before,
body[data-motion="calm"] .hero::after,
body[data-motion="calm"] .hero .mark,
body[data-motion="calm"] .oracle-spark {
  animation-duration: 60s !important;
}
body[data-motion="off"] *,
body[data-motion="off"] *::before,
body[data-motion="off"] *::after {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 700px) { .royal-footer { justify-content: flex-start; padding-inline:20px; } .royal-footer-bottom { display: flex; } .royal-ticker-item { min-width: 135px; padding-inline: 16px; } }
.cyber-game { padding:18px; margin-bottom:18px; }
.cyber-top,.cyber-bottom { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.cyber-top>div:first-child { display:grid; gap:4px; }
.cyber-top strong { font-size:24px; }
.cyber-avatar-select { display:flex; gap:6px; }
.cyber-avatar-select button { width:40px; height:40px; border:1px solid var(--line); border-radius:12px; background:var(--surface); font-size:21px; }
.cyber-avatar-select button[aria-pressed="true"] { outline:2px solid var(--royal-accent); }
.cyber-track { height:340px; margin:14px 0; position:relative; overflow:hidden; border-radius:18px; background:repeating-linear-gradient(0deg,transparent 0 44px,#ffffff14 45px 46px),linear-gradient(135deg,#111b35,#263c66 55%,#111b35); touch-action:manipulation; }
.cyber-lanes { position:absolute; inset:0 20% ; display:flex; justify-content:space-between; border-inline:1px dashed #a8d0ff44; }
.cyber-lanes i { border-right:1px dashed #a8d0ff44; }
.cyber-player,.cyber-obstacle { position:absolute; z-index:2; left:50%; transform:translateX(-50%); font-size:34px; bottom:10%; transition:left .12s; filter:drop-shadow(0 0 9px #6fbdff); }
.cyber-obstacle { width:38px; height:25px; border-radius:7px; top:-10%; bottom:auto; background:linear-gradient(120deg,#ffc05e,#fb547e); box-shadow:0 0 18px #ff568c; }
.cyber-overlay { position:absolute; z-index:3; inset:0; display:grid; align-content:center; justify-items:center; gap:10px; text-align:center; background:#101a2acc; color:#fff; }
.cyber-overlay[hidden] { display:none; }
.cyber-bottom { color:var(--muted); font-size:12px; }
.cyber-leaderboard ol { list-style:decimal; padding-left:25px; }
.cyber-leaderboard li { padding:8px 3px; }
.cyber-leaderboard li span { margin-right:16px; }
.cyber-difficulty { display:flex; align-items:center; gap:7px; justify-content:flex-end; color:var(--muted); font-size:11px; }
.cyber-difficulty select { padding:6px 9px; border-radius:9px; }
.cyber-top>div:nth-child(2) { display:grid; gap:8px; }
.cyber-track { background:repeating-linear-gradient(0deg,transparent 0 44px,#ffffff14 45px 46px),linear-gradient(135deg,#111b35,#263c66 55%,#111b35); }
.cyber-track::before { content:""; position:absolute; inset:0; opacity:.28; background:repeating-linear-gradient(0deg,transparent 0 45px,#81cfff44 46px 49px); background-position-y:var(--ride,0); }
.cyber-player { bottom:12%; width:44px; height:44px; display:grid; place-items:center; border-radius:50%; color:#e7f4ff; font-size:38px; text-shadow:0 0 10px #68cbff,0 0 28px #3297ff; }
.cyber-obstacle { height:40px; width:54px; border:1px solid #ffb887; clip-path:polygon(50% 0,100% 100%,0 100%); border-radius:0; }
.cyber-touch-controls { display:none; justify-content:space-between; gap:12px; }
.cyber-touch-controls button { width:50%; min-height:48px; border:1px solid var(--line); border-radius:12px; background:var(--surface); font-size:22px; }
.cyber-leaderboard li { display:flex; gap:14px; align-items:center; }
.cyber-leaderboard li span { flex:1; margin:0; }
.cyber-leaderboard li small { color:var(--muted); }
@media(max-width:650px) { .cyber-track { height:290px; } .cyber-touch-controls { display:flex; } .cyber-top { align-items:flex-start; } .cyber-avatar-select { flex-wrap:wrap; justify-content:flex-end; } }
.about-links { display:flex; gap:10px; flex-wrap:wrap; }

/* Page artwork and saved code workspace */
.section-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 145px;
  margin: 22px 0 26px;
  padding: 25px 30px;
  overflow: hidden;
  border: 1px solid #ffffff5e;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(115deg, #243e69, #172846);
  box-shadow: 0 18px 35px #122c4c2b;
  animation: cardReveal 0.65s both;
}
.hero .hero-quote {
  margin: 15px 0 0;
  color: #e4d8c7;
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.02em;
}
.section-art::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 80% 25%, #ffffff29, transparent 32%),
    repeating-linear-gradient(120deg, transparent 0 22px, #ffffff05 22px 23px);
  animation: heroOrbit 18s ease-in-out infinite alternate;
}
.section-art::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -45px;
  top: -170px;
  border: 1px solid #ffffff45;
  border-radius: 50%;
  pointer-events: none;
}
.section-art-copy {
  position: relative;
  z-index: 1;
  max-width: 590px;
}
.section-art small {
  display: block;
  margin-bottom: 9px;
  color: #cce8ff;
  font-size: 10px;
  letter-spacing: 0.19em;
  font-weight: 800;
}
.section-art blockquote {
  margin: 0;
  font-family: Outfit, sans-serif;
  font-size: clamp(1.3rem, 2.3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
}
.section-art-symbol {
  position: relative;
  z-index: 1;
  flex: none;
  color: #e8f6ffbd;
  font-family: Outfit, sans-serif;
  font-size: clamp(1.9rem, 4vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.1em;
  white-space: nowrap;
  text-shadow: 0 0 25px #9fdcff9c;
  transform: rotate(-8deg);
  animation: crownFloat 9s ease-in-out infinite alternate;
}
.section-art[data-section-art="translate"] {
  background: linear-gradient(90deg, #151348d6, #15134820), url('/translator-art.webp') center / cover;
}
.section-art[data-section-art="translate"] .section-art-symbol {
  font-size: clamp(1.65rem, 3.6vw, 3.2rem);
  letter-spacing: 0.1em;
  color: #fff2df;
}
.section-art[data-section-art="tasks"] {
  background: linear-gradient(115deg, #172e56d6, #315c82c4), url('/royal-sky.webp') center / cover;
}
.section-art[data-section-art="events"] {
  background: linear-gradient(115deg, #4b356bd6, #8a5573c2), url('/translator-art.webp') center / cover;
}
.section-art[data-section-art="projects"] {
  background: linear-gradient(115deg, #143e5bd6, #1b7182c2), url('/earth-texture.jpg') center / cover;
}
.section-art[data-section-art="search"] {
  background: linear-gradient(115deg, #18264ed6, #536e91c2), url('/royal-sky.webp') center / cover;
}
.section-art[data-section-art="about"],
.section-art[data-section-art="account"] {
  background: linear-gradient(115deg, #182c50d6, #a27852b8), url('/royal-logo.webp') center / cover;
}
.section-art[data-section-art="weather"] {
  background: linear-gradient(115deg, #235b85cc, #397fa2b8), url('/earth-texture.jpg') center / cover;
}
.section-art[data-section-art="weather"]::before {
  background:
    radial-gradient(circle at 78% 30%, #ffdf9f94, transparent 23%),
    repeating-linear-gradient(0deg, transparent 0 28px, #fff2 29px 30px),
    repeating-linear-gradient(90deg, transparent 0 28px, #fff2 29px 30px);
}
.section-art[data-section-art="code"] {
  background: linear-gradient(115deg, #182846d9, #224d60c9), url('/royal-sky.webp') center / cover;
}
.section-art[data-section-art="gallery"] {
  background: linear-gradient(115deg, #704974c9, #354978c2), url('/translator-art.webp') center / cover;
}
.section-art[data-section-art="notes"] {
  background: linear-gradient(90deg, #0b1b43d0, #0b1b430a), url('/notes-art.webp') center / cover;
}
.section-art[data-section-art="notes"]::before,
.section-art[data-section-art="translate"]::before { opacity: .2; }
.section-art[data-section-art="settings"] {
  background: linear-gradient(115deg, #4e6287d6, #466d83c4), url('/royal-sky.webp') center / cover;
}
.code-workspace {
  padding: 25px;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}
.code-head h2 {
  font-size: 1.6rem;
  margin: 5px 0;
}
.code-head p {
  margin: 0;
}
.code-head-symbol {
  color: var(--royal-accent);
  font:
    700 36px Outfit,
    sans-serif;
  opacity: 0.7;
}
.code-fields {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 14px;
  margin-bottom: 14px;
}
.code-fields label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.code-fields input,
.code-fields select {
  width: 100%;
}
.code-workspace .codearea {
  width: 100%;
  min-height: 300px;
  line-height: 1.5;
  font-size: 13px;
  direction: ltr;
  text-align: left;
}
.code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 14px 0 5px;
}
.code-actions button {
  white-space: nowrap;
}
.code-workspace #codeSaveStatus {
  min-height: 20px;
  margin: 0 0 12px;
  color: var(--royal-accent);
}
.saved-code-panel {
  margin-top: 19px;
}
.saved-snippet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.saved-snippet strong,
.saved-snippet small {
  display: block;
}
.saved-snippet strong {
  overflow-wrap: anywhere;
}
.saved-snippet small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.saved-snippet-actions {
  display: flex;
  gap: 7px;
}
.saved-snippet-actions .secondary {
  padding: 7px 11px;
}
.account-data-panel {
  margin-top: 19px;
}
.account-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 15px 0;
}
.account-data-grid > div {
  display: grid;
  gap: 3px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}
.account-data-grid strong {
  font:
    700 24px Outfit,
    sans-serif;
}
.account-data-grid span {
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 700px) {
  .section-art {
    padding: 20px;
    min-height: 125px;
  }
  .section-art-symbol {
    font-size: 2.1rem;
    opacity: 0.65;
  }
  .code-fields {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 450px) {
  .section-art-symbol {
    position: absolute;
    right: 14px;
    bottom: 5px;
    opacity: 0.23;
  }
  .section-art-copy {
    max-width: 100%;
  }
}

/* Clear glass: translucent layers, lit edges, and restrained motion. */
.card,
.quick button,
.icon-btn,
.apps-toolbar,
.oracle-panel,
.section-art {
  border: 1px solid color-mix(in srgb, #fff 62%, var(--line));
  box-shadow:
    0 18px 48px #15365820,
    inset 0 1px 0 #ffffffbd,
    inset 0 -1px 0 #ffffff32;
  backdrop-filter: blur(30px) saturate(1.65);
  -webkit-backdrop-filter: blur(30px) saturate(1.65);
}
.card,
.quick button,
.icon-btn {
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}
.card::before,
.app-tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  opacity: 0.8;
}
button,
a,
.app-tile,
.section-art {
  transition:
    transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.32s,
    border-color 0.32s,
    background 0.32s;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--royal-accent);
  outline-offset: 3px;
}
button:hover:not(:disabled) {
  transform: translateY(-2px);
}
.section-art[data-section-art="weather"] {
  min-height: 215px;
  background:
    radial-gradient(circle at 80% 55%, #267ab5a8, transparent 35%),
    linear-gradient(115deg, #092547, #155375);
  isolation: isolate;
}
.section-art[data-section-art="weather"] .section-art-copy {
  max-width: 50%;
  align-self: flex-start;
}
.section-art[data-section-art="weather"] .section-art-symbol {
  width: 240px;
  height: 190px;
  transform: none;
  animation: none;
  white-space: normal;
}
.earth-globe {
  position: absolute;
  right: 20px;
  top: -22px;
  width: 220px;
  height: 220px;
  filter: drop-shadow(0 10px 28px #00aaff8c);
  border-radius: 50%;
}
.earth-globe::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  box-shadow:
    0 0 35px #4ab8ff8c,
    inset 0 0 25px #5abfff6b;
}
.earth-globe canvas {
  position: relative;
  max-width: 100%;
  touch-action: none;
  cursor: grab;
}
.earth-globe canvas:active {
  cursor: grabbing;
}
.earth-weather {
  position: absolute;
  left: 30px;
  bottom: 22px;
  z-index: 2;
  display: grid;
  gap: 2px;
  max-width: 55%;
  font-family: "DM Sans", sans-serif;
  letter-spacing: normal;
  text-shadow: none;
  transform: none;
  white-space: normal;
}
.earth-weather strong {
  font:
    700 clamp(1.15rem, 2.5vw, 1.7rem) Outfit,
    sans-serif;
}
.earth-weather span {
  font-size: 12px;
  font-weight: 600;
  color: #e3f4ff;
}
.earth-weather small {
  font-size: 10px;
  color: #b8daf3;
  letter-spacing: 0.05em;
}
.earth-fallback {
  display: grid;
  place-items: center;
  font-size: 130px;
}
#searchImage {
  width: 100%;
}
.research-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  margin: 22px 0 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #eaf3ff;
  box-shadow: 0 15px 32px #142b4c24;
}
.apps-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px;
  margin: 18px 0 22px;
}
.apps-toolbar label {
  flex: 1 1 210px;
  display: grid;
  gap: 5px;
}
.apps-toolbar input,
.apps-toolbar select {
  width: 100%;
}
#appsCount {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  padding-bottom: 10px;
}
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 13px;
}
.app-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
}
.app-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px #1536582a;
}
.app-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--royal-accent), var(--royal-glow));
  color: white;
  font:
    700 20px Outfit,
    sans-serif;
  box-shadow: inset 0 1px #fff8;
}
.app-tile > div:nth-child(2) {
  min-width: 0;
  flex: 1;
  display: grid;
}
.app-tile strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.app-tile small {
  color: var(--muted);
  font-size: 11px;
}
.app-tile a {
  font-size: 11px;
  font-weight: 700;
  color: var(--royal-accent);
  white-space: nowrap;
  text-decoration: none;
}
.app-tile button {
  border: 0;
  background: none;
  color: var(--royal-accent);
  font-size: 20px;
  padding: 2px;
}
.section-art[data-section-art="apps"] {
  background: linear-gradient(110deg, #1a3059, #375a89);
}
.photo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin: 20px 0;
  padding: 22px;
}
.photo-card h2 {
  margin: 0 0 5px;
}
.photo-card p {
  margin: 0;
}
.photo-card form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.photo-card input {
  max-width: 220px;
}
.photo-card .notice {
  width: 100%;
  margin: 0;
}
.photo-preview {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  margin-top: 9px;
}
.top-actions .avatar,
.account-avatar {
  overflow: hidden;
}
.top-actions .avatar img,
.account-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.oracle-reminders {
  display: grid;
  gap: 8px;
  max-height: 245px;
  overflow: auto;
  margin: 10px 0 16px;
}
.reminder-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.reminder-row > span {
  color: var(--royal-accent);
  font-size: 19px;
}
.reminder-row div {
  display: grid;
  min-width: 0;
}
.reminder-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.reminder-row small {
  font-size: 10px;
  color: var(--muted);
}
.oracle-tabs {
  overflow-x: auto;
}
.oracle-tabs button {
  white-space: nowrap;
}
@media (max-width: 620px) {
  .section-art[data-section-art="weather"] {
    min-height: 280px;
    align-items: flex-start;
  }
  .section-art[data-section-art="weather"] .section-art-copy {
    max-width: 100%;
  }
  .section-art[data-section-art="weather"] .section-art-symbol {
    position: absolute;
    right: -25px;
    top: 48px;
    width: 170px;
    height: 170px;
    opacity: 0.8;
  }
  .earth-globe {
    width: 170px;
    height: 170px;
    right: 0;
    top: -10px;
  }
  .earth-globe canvas {
    width: 170px !important;
    height: 170px !important;
  }
  .earth-weather {
    left: 20px;
    bottom: 17px;
    max-width: 85%;
  }
  .apps-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-tile,
  .section-art,
  .card {
    animation: none !important;
    transition: none !important;
  }
  .earth-globe canvas {
    cursor: default;
  }
}
@media (max-width: 620px) {
  .section-art[data-section-art="weather"] .section-art-copy {
    max-width: 62%;
  }
  .section-art[data-section-art="weather"] blockquote {
    font-size: 1.15rem;
  }
}
@media (max-width: 550px) {
  #nav button.active span {
    display: inline;
  }
}

/* Editorial imagery and service identity */
body .hero {
  background:
    linear-gradient(90deg, #061831e8 0%, #0b2b57ad 51%, #0b3e7819 100%),
    url("/royal-sky.webp") center / cover !important;
  box-shadow:
    0 28px 65px #10386a38,
    inset 0 1px #ffffff75;
}
.hero > div:first-child {
  position: relative;
  z-index: 2;
}
.hero .hero-logo {
  background: #092449a8;
  backdrop-filter: blur(18px);
}
.news-list {
  gap: 14px;
}
.news-item {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  padding: 0;
  min-height: 152px;
  overflow: hidden;
  white-space: normal;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: 0 13px 30px #193e6916;
}
.news-thumb {
  position: relative;
  flex: 0 0 38%;
  min-height: 152px;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #65bdfb, #1c477b 52%, #0a1b35);
}
.news-thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}
.news-item:hover .news-thumb img {
  transform: scale(1.09);
}
.news-thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffffa8;
  font-size: 52px;
}
.news-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 16px;
  min-width: 0;
}
.news-source {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
  color: var(--royal-accent);
}
.news-item strong {
  font:
    700 15px/1.35 Outfit,
    sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-description {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-copy small {
  margin-top: auto;
  color: var(--royal-accent);
  font-size: 10px;
  font-weight: 700;
}
.app-icon {
  position: relative;
  background: color-mix(in srgb, var(--surface) 78%, #fff);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px #fff9,
    0 5px 13px #1a38562b;
}
.app-icon span {
  color: var(--royal-accent);
}
.app-icon img {
  position: absolute;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: contain;
}

/* Plans */
.plans-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 220px;
  padding: 26px 32px;
  margin: 22px 0;
  overflow: hidden;
  border-radius: 22px;
  color: white;
  background:
    linear-gradient(90deg, #082043eb, #0b376d99, #4b88bd11),
    url("/royal-sky.webp") center / cover;
  box-shadow: 0 22px 45px #15427336;
}
.plans-hero small,
.clock-hero small {
  letter-spacing: 0.18em;
  font-size: 10px;
  font-weight: 800;
  color: #bbdef8;
}
.plans-hero h2 {
  font:
    700 clamp(1.8rem, 3vw, 2.8rem) Outfit,
    sans-serif;
  margin: 11px 0 3px;
}
.plans-hero p {
  margin: 0 0 17px;
  color: #e1edff;
  font-size: 13px;
}
.plans-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.plans-hero-actions .secondary {
  background: #ffffffc9;
  color: #14355b;
}
.plans-hero-orbit {
  position: relative;
  flex: none;
  display: grid;
  place-content: center;
  width: 142px;
  height: 142px;
  border-radius: 50%;
  border: 1px solid #ffffff8c;
  background: #e5f5ff24;
  backdrop-filter: blur(18px);
  font:
    700 38px Outfit,
    sans-serif;
  text-align: center;
  box-shadow:
    0 0 0 10px #ffffff0d,
    inset 0 0 28px #ffffff27;
  animation: crownFloat 8s ease-in-out infinite alternate;
}
.plans-hero-orbit span {
  font:
    700 10px DM Sans,
    sans-serif;
  letter-spacing: 0.04em;
  color: #e6f3ff;
}
.plan-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}
.plan-metrics .card {
  display: grid;
  padding: 17px;
  border-radius: 16px;
}
.plan-metrics strong {
  font:
    700 29px Outfit,
    sans-serif;
  color: var(--ink);
}
.plan-metrics span {
  color: var(--muted);
  font-size: 11px;
}
.plans-search {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 22px 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.plans-search input {
  width: min(100%, 480px);
}
.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.plan-section {
  min-width: 0;
}
.plan-section > .panel-head {
  align-items: center;
}
.plan-section .panel-head h2 {
  margin: 3px 0;
}
.plan-section .panel-head p {
  margin: 0;
  font-size: 11px;
}
.plan-items {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}
.plan-search-item[hidden] {
  display: none;
}
.plan-search-item .item {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* Clock */
.clock-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 190px;
  overflow: hidden;
  margin: 20px 0;
  padding: 25px 34px;
  color: white;
  border-radius: 22px;
  background:
    radial-gradient(circle at 78% 47%, #66c7ff66, transparent 27%),
    linear-gradient(120deg, #071a3b, #123c6a 65%, #276e9f);
  box-shadow: 0 22px 45px #153a6e35;
}
.clock-hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border: 1px solid #ffffff29;
  border-radius: 50%;
  right: -70px;
  top: -150px;
  box-shadow:
    0 0 0 30px #ffffff08,
    0 0 0 70px #ffffff07;
  animation: heroOrbit 20s linear infinite alternate;
}
.clock-hero h2 {
  font:
    700 clamp(2.8rem, 6vw, 5rem) Outfit,
    sans-serif;
  letter-spacing: -0.07em;
  margin: 4px 0;
  font-variant-numeric: tabular-nums;
}
.clock-hero p {
  margin: 0;
  color: #d2e9ff;
}
.clock-hero-art {
  font-size: 75px;
  color: #b7e4ff;
  filter: drop-shadow(0 0 25px #77ccff);
  animation: sparkle 5s ease-in-out infinite;
}
.clock-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.clock-panel {
  padding: 24px;
  min-width: 0;
}
.clock-panel .panel-head {
  align-items: flex-start;
}
.clock-panel h2 {
  margin: 2px 0 0;
}
.clock-panel-icon {
  font-size: 29px;
  color: var(--royal-accent);
}
.timer-ring {
  --timer-progress: 100%;
  display: grid;
  place-items: center;
  width: 205px;
  height: 205px;
  margin: 18px auto 23px;
  border-radius: 50%;
  background: conic-gradient(
    var(--royal-accent) var(--timer-progress),
    color-mix(in srgb, var(--royal-accent) 12%, var(--surface)) 0
  );
  box-shadow:
    0 12px 30px #193e6930,
    inset 0 1px #fff;
}
.timer-ring > div {
  display: grid;
  place-content: center;
  width: 177px;
  height: 177px;
  border-radius: 50%;
  background: var(--surface);
  text-align: center;
}
.timer-ring strong {
  font:
    700 40px Outfit,
    sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.timer-ring small,
.stopwatch-face span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}
.clock-presets,
.clock-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.clock-presets {
  justify-content: center;
  margin: 0 0 13px;
}
.clock-presets button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--surface);
  color: var(--royal-accent);
  font-size: 11px;
  font-weight: 700;
}
.clock-controls button {
  flex: 1 1 auto;
}
.clock-custom {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
}
.clock-custom input {
  width: 125px;
}
.clock-help {
  font-size: 11px;
  color: var(--muted);
}
.stopwatch-face {
  display: grid;
  place-content: center;
  min-height: 252px;
  text-align: center;
}
.stopwatch-face strong {
  font:
    700 clamp(2.2rem, 4vw, 3.6rem) Outfit,
    sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  color: var(--ink);
}
.clock-laps {
  display: grid;
  gap: 5px;
  margin-top: 18px;
  max-height: 170px;
  overflow: auto;
}
.clock-laps span {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 6px;
  font-size: 11px;
}
.clock-alarm-panel,
.world-panel {
  margin-top: 16px;
}
.clock-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 2px 6px;
  border-radius: 50%;
  background: var(--royal-accent);
  color: white;
  font:
    700 12px DM Sans,
    sans-serif;
}
.clock-alarm-form {
  display: grid;
  grid-template-columns:
    minmax(130px, 2fr) minmax(190px, 1.5fr) minmax(120px, 1fr)
    auto;
  gap: 10px;
  align-items: end;
  margin: 19px 0 15px;
}
.clock-alarm-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.clock-alarm-form input,
.clock-alarm-form select {
  width: 100%;
}
.clock-alarm-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 7px 0 16px;
}
.clock-alarm-actions small {
  color: var(--muted);
}
.clock-alarm-list {
  display: grid;
  gap: 8px;
}
.clock-alarm {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 13px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.clock-alarm-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  color: var(--royal-accent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--royal-accent) 12%, var(--surface));
}
.clock-alarm div {
  display: grid;
  flex: 1;
  min-width: 0;
}
.clock-alarm strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clock-alarm small {
  color: var(--muted);
  font-size: 11px;
}
.clock-delete {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 23px;
}
.world-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.world-city {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}
.world-city-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--royal-accent);
  box-shadow: 0 0 11px var(--royal-glow);
}
.world-city div {
  display: grid;
  min-width: 0;
}
.world-city strong {
  font-size: 11px;
  white-space: nowrap;
}
.world-city small {
  color: var(--muted);
  font-size: 9px;
}
.world-city time {
  margin-left: auto;
  font:
    700 13px Outfit,
    sans-serif;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .clock-alarm-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .world-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .plans-grid,
  .clock-grid {
    grid-template-columns: 1fr;
  }
  .plan-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .clock-alarm-form {
    grid-template-columns: 1fr;
  }
  .plans-hero-orbit {
    width: 100px;
    height: 100px;
    font-size: 26px;
  }
  .news-item {
    min-height: 130px;
  }
  .news-thumb {
    min-height: 130px;
  }
}
@media (max-width: 450px) {
  .plans-hero {
    padding: 21px;
  }
  .plans-hero-orbit {
    display: none;
  }
  .clock-hero {
    padding: 22px;
  }
  .clock-hero-art {
    font-size: 45px;
  }
  .news-thumb {
    flex-basis: 34%;
  }
  .news-copy {
    padding: 12px;
  }
  .news-description {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .plans-hero-orbit,
  .clock-hero::after,
  .clock-hero-art {
    animation: none;
  }
}
.news-bbc-logo {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 4px;
  border-radius: 3px;
  background: #1a2738;
  color: #fff;
  font:
    800 9px/1 DM Sans,
    sans-serif;
  letter-spacing: 0.11em;
}

@media (min-width: 701px) {
  .quick {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
body[data-motion="off"] .plans-hero-orbit,
body[data-motion="off"] .clock-hero::after,
body[data-motion="off"] .clock-hero-art {
  animation: none !important;
}
body[data-motion="off"] .news-thumb img {
  transition: none;
}

/* Clear, responsive glass with a single two-row navigation. */
.side {
  grid-template-columns: minmax(130px, 1fr) auto auto !important;
  grid-template-areas: "brand groups actions" "nav nav nav" !important;
  align-items: center;
  background: color-mix(in srgb, var(--surface) 70%, transparent) !important;
  border-bottom: 1px solid color-mix(in srgb, white 65%, var(--line));
  box-shadow: inset 0 1px #ffffffbc, 0 14px 45px #263f711f, 0 2px 5px #203d6212;
  backdrop-filter: blur(34px) saturate(1.9) !important;
  -webkit-backdrop-filter: blur(34px) saturate(1.9) !important;
}
.brand img, .auth-card img, .hero-logo {
  object-fit: contain !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 0 13px #e7bb5f80) drop-shadow(0 8px 12px #0b274b6b);
}
.brand img { width:56px!important; height:56px!important; padding:0!important; object-fit:contain!important; }
.hero .hero-logo { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.brand img,.auth-card img,.hero .hero-logo { animation:none !important; transform:none !important; }
.section-art { background-size:cover; transition:background-position .8s ease,box-shadow .45s ease; }
.section-art:hover { background-position:55% center; box-shadow:inset 0 1px #ffffff9c,0 28px 60px #17396545; }
.section-art::after { animation:heroOrbit 12s ease-in-out infinite alternate; }
#oracleResearchForm { display:flex; gap:8px; flex-wrap:wrap; }
#oracleResearchQuery { flex:1; min-width:160px; border:1px solid #ffffff69; border-radius:12px; padding:11px; background:#ffffffd8; color:#152943; }
#oracleResearchResult { display:grid; gap:8px; margin-top:14px; line-height:1.5; }
#oracleResearchResult p { margin:0; }
#oracleResearchResult a { color:#8bd4ff; }
@media(prefers-reduced-motion:reduce) { .section-art::after { animation:none; } }
body[data-motion="off"] .section-art::after { animation:none; }
.brand small { font-size: 9px; letter-spacing: .05em; }
.top-actions { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
#themeToggle {
  min-width: 38px; min-height: 38px; border-radius: 999px;
  background: linear-gradient(145deg, #ffffffb8, #d0e6ff64) !important;
  border: 1px solid #fff9 !important;
  box-shadow: inset 0 1px #fff, inset 0 -2px 5px #95bded65, 0 5px 17px #526faa33 !important;
  backdrop-filter: blur(22px) saturate(1.9);
}
.card, .quick button, .section-art, .explore-controls {
  border: 1px solid color-mix(in srgb, white 55%, var(--line));
  box-shadow: inset 0 1px #ffffff96, inset 0 -1px #ffffff42, 0 18px 52px #263f7124, 0 2px 6px #203d6210;
  backdrop-filter: blur(28px) saturate(1.65) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.65) !important;
}
.card { background: color-mix(in srgb, var(--surface) 75%, transparent) !important; }
body.dark .card, body[data-theme="midnight"] .card, body[data-theme="aurora"] .card { box-shadow: inset 0 1px #ffffff35, 0 18px 52px #050d1d4d; }
.card:hover, .explore-card:hover { transform: translateY(-3px); box-shadow: inset 0 1px #fff9, 0 22px 55px #27477733; transition: transform .35s ease, box-shadow .35s ease; }
.note-preview { display:block; max-width:min(100%, 420px); max-height:220px; object-fit:contain; margin:12px 0; border:1px solid var(--line); border-radius:14px; background:#fff; }
#editor.note-editor { width:min(960px, calc(100vw - 24px)); max-width:960px; }
.drawing-editor { display:grid; gap:10px; margin:12px 0; }
.drawing-editor[hidden] { display:none; }
.drawing-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.drawing-head span { color:var(--muted); font-size:12px; }
.drawing-tools { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.drawing-tools label { display:flex; align-items:center; gap:5px; font-size:12px; }
.drawing-tools input[type="color"] { width:32px; height:28px; padding:0; }
.drawing-tools input[type="range"] { width:86px; }
.drawing-tools button.selected { background:var(--royal-accent); color:white; }
#drawingCanvas { display:block; width:100%; height:auto; aspect-ratio:24 / 11; background:#fff; border:1px solid #b4c9e7; border-radius:16px; touch-action:none; cursor:crosshair; box-shadow:inset 0 2px 10px #203d621a; }
.explore-intro { position:relative; overflow:hidden; display:flex; align-items:center; justify-content:space-between; padding:clamp(22px,4vw,48px); margin:18px 0; border-radius:30px; background:radial-gradient(circle at 83% 24%, #54bcff9a, transparent 21%), radial-gradient(circle at 75% 85%, #cd8eff77, transparent 28%), linear-gradient(115deg,#0b1a41,#193c73 62%,#355a92); color:#fff; box-shadow:inset 0 1px #ffffff7a,0 22px 48px #1b417d3a; }
.explore-intro::after { content:""; position:absolute; width:360px; height:360px; right:-70px; top:-140px; border:2px solid #ffffff52; border-radius:50%; box-shadow:0 0 0 46px #ffffff10,0 0 0 94px #ffffff0c; animation:crownFloat 12s ease-in-out infinite alternate; }
.explore-intro > * { position:relative; z-index:1; }
.explore-intro small { letter-spacing:.25em; color:#a9eaff; }
.explore-intro h2 { margin:6px 0; font:700 clamp(30px,5vw,56px)/1.05 Outfit,sans-serif; }
.explore-intro p { max-width:560px; color:#e6f4ff; }
.explore-intro > span { font-size:clamp(70px,12vw,170px); color:#ffffffd0; text-shadow:0 0 36px #5bd1ff; animation:crownFloat 7s ease-in-out infinite alternate; }
.explore-controls { padding:18px; border-radius:24px; }
#exploreSearch { display:flex; gap:10px; }
#exploreQuery { flex:1; min-width:0; }
.explore-topics { display:flex; flex-wrap:wrap; gap:8px; margin-top:15px; max-height:125px; overflow:auto; }
.explore-topics button { border:1px solid var(--line); border-radius:999px; padding:7px 13px; background:var(--surface); color:var(--ink); cursor:pointer; }
.explore-topics button.selected { background:var(--royal-accent); color:white; }
.explore-grid { columns:4 210px; column-gap:16px; margin:18px 0; }
.explore-card { display:inline-block; width:100%; break-inside:avoid; margin:0 0 16px; overflow:hidden; border:1px solid var(--line); border-radius:20px; background:var(--surface); box-shadow:0 10px 25px #1839691c; transition:transform .3s,box-shadow .3s; }
.explore-card img { display:block; width:100%; height:auto; min-height:135px; object-fit:cover; background:#d9e9f6; }
.explore-card-body { padding:12px; }
.explore-card-body strong { display:block; margin-bottom:10px; font-size:13px; line-height:1.35; overflow-wrap:anywhere; }
.explore-card-body div { display:flex; flex-wrap:wrap; align-items:center; gap:9px; }
.explore-card-body .primary { padding:8px 10px; font-size:12px; }
.explore-card-body a,.gallery-source { font-size:12px; color:var(--royal-accent-strong); }
.gallery-source { display:block; margin:0 12px 8px; }
#exploreMore { display:block; margin:10px auto; }
#exploreMore[hidden] { display:none; }
.explore-credit { text-align:center; font-size:12px; color:var(--muted); }
@media(max-width:800px) { .top-actions #today { display:none; } .brand small { display:none; } .side { gap:8px !important; padding:8px 12px !important; } .nav-groups button { padding:7px 9px; } }
@media(min-width:601px) and (max-width:900px) { .side .brand div { display:flex; flex-direction:column; } .side .brand img { width:52px; height:52px; } }
@media(max-width:500px) { .side { grid-template-columns:auto 1fr auto !important; } .brand strong { font-size:14px; letter-spacing:1px; } .brand img { width:32px; height:32px; } .top-actions .avatar { display:grid; width:28px; height:28px; font-size:11px; } #themeToggle { min-width:32px; min-height:32px; } .nav-groups { justify-content:center; } .nav-groups button { padding:6px; font-size:10px; } .explore-intro > span { display:none; } .explore-topics { max-height:100px; } }
.quick-language-label select { min-width:50px; border:1px solid #ffffff9c; border-radius:999px; padding:8px 10px; background:color-mix(in srgb,var(--surface) 75%,transparent); color:var(--ink); font-weight:700; backdrop-filter:blur(16px); cursor:pointer; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.guest-entry { display:grid; gap:8px; margin-top:22px; padding-top:18px; border-top:1px solid var(--line); text-align:center; }
.guest-entry small { color:var(--muted); }
.guest-entry .secondary { border-radius:14px; padding:12px; }
.account-hero .account-signout { margin-left:auto; flex:none; }
@media(max-width:600px) { .account-hero .account-signout { width:100%; margin-left:0; } }
.hero,.section-art,.explore-intro { position:relative; overflow:hidden; }
.wallpaper-touch { position:absolute; z-index:1; left:50%; top:50%; width:220px; height:220px; transform:translate(-50%,-50%) scale(.6); border-radius:50%; pointer-events:none; opacity:0; background:radial-gradient(circle,#ffffffb5 0%,#9bd8ff89 15%,#64baff39 37%,transparent 68%); mix-blend-mode:screen; filter:blur(3px); transition:opacity .4s,transform .45s; }
.wallpaper-touch.active { opacity:.8; transform:translate(-50%,-50%) scale(1); }
body[data-motion="off"] .wallpaper-touch { display:none; }
@media(prefers-reduced-motion:reduce) { .wallpaper-touch { display:none; } }
@media(max-width:500px) { .quick-language-label select { min-width:42px; padding:6px 5px; font-size:11px; } .top-actions { gap:4px; } }
