﻿/* Nebula-only app styling */
:root,
[data-palette="nebula"] {
  color-scheme: dark;
  --bg: #08111d;
  --bg-2: #0c1728;
  --panel: rgba(10, 19, 33, 0.82);
  --panel-strong: rgba(13, 25, 42, 0.96);
  --panel-soft: rgba(18, 31, 50, 0.7);
  --text: #ecf3ff;
  --muted: #99abc7;
  --line: rgba(146, 176, 224, 0.16);
  --line-strong: rgba(146, 176, 224, 0.28);
  --accent: #84b7ff;
  --accent-strong: #4f8fff;
  --accent-glow: rgba(102, 163, 255, 0.22);
  --accent-btn-top: #7ba8ff;
  --accent-btn-bottom: #5a88ef;
  --success: #54d4a4;
  --warning: #f7c96f;
  --danger: #ff8e99;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  --content: 1380px;
  --header-h: 72px;
  --rail-bg: #242638;
  --rail-border: rgba(255, 255, 255, 0.1);
  --rail-surface: rgba(255, 255, 255, 0.06);
  --rail-text: rgba(236, 243, 255, 0.92);
  --rail-muted: rgba(176, 188, 214, 0.78);
  --overlay-start: rgba(7, 14, 25, 0.2);
  --overlay-end: rgba(7, 14, 25, 0.68);
  --overlay-glow: rgba(96, 138, 255, 0.12);
  --fullscreen-overlay-start: rgba(7, 14, 25, 0.06);
  --fullscreen-overlay-end: rgba(7, 14, 25, 0.28);
  --space-1: 0.375rem;
  --space-2: 0.625rem;
  --space-3: 0.875rem;
  --space-4: 1.125rem;
  --space-5: 1.5rem;
  --widget-pad-x: 1rem;
  --widget-pad-y: 1rem;
  --widget-pad-bottom: 1.35rem;
  --block-gap: 1.35rem;
  --field-gap: 0.75rem;
  --control-gap: 0.5rem;
  --list-gap: 0.65rem;
}

[data-palette="aurora"] {
  color-scheme: dark;
  --bg: #061612;
  --bg-2: #0c221c;
  --panel: rgba(8, 24, 20, 0.84);
  --panel-strong: rgba(10, 30, 24, 0.96);
  --panel-soft: rgba(14, 36, 30, 0.72);
  --text: #e8fff7;
  --muted: #8eb8aa;
  --line: rgba(110, 196, 168, 0.16);
  --line-strong: rgba(110, 196, 168, 0.28);
  --accent: #5ee0b8;
  --accent-strong: #2bb893;
  --accent-glow: rgba(94, 224, 184, 0.22);
  --accent-btn-top: #6ce8c4;
  --accent-btn-bottom: #2bb893;
  --rail-bg: #1a2824;
  --rail-border: rgba(110, 196, 168, 0.14);
  --rail-surface: rgba(255, 255, 255, 0.06);
  --rail-text: rgba(232, 255, 247, 0.94);
  --rail-muted: rgba(142, 184, 170, 0.82);
  --overlay-glow: rgba(94, 224, 184, 0.12);
}

[data-palette="ember"] {
  color-scheme: dark;
  --bg: #140c0a;
  --bg-2: #221310;
  --panel: rgba(28, 16, 12, 0.84);
  --panel-strong: rgba(36, 20, 14, 0.96);
  --panel-soft: rgba(44, 24, 18, 0.72);
  --text: #fff1ea;
  --muted: #c9a08f;
  --line: rgba(255, 154, 107, 0.16);
  --line-strong: rgba(255, 154, 107, 0.28);
  --accent: #ff9a6b;
  --accent-strong: #e86a3a;
  --accent-glow: rgba(255, 154, 107, 0.22);
  --accent-btn-top: #ffb088;
  --accent-btn-bottom: #e86a3a;
  --rail-bg: #2a201c;
  --rail-border: rgba(255, 154, 107, 0.14);
  --rail-surface: rgba(255, 255, 255, 0.06);
  --rail-text: rgba(255, 241, 234, 0.94);
  --rail-muted: rgba(201, 160, 143, 0.82);
  --overlay-glow: rgba(255, 154, 107, 0.12);
}

[data-palette="rose"] {
  color-scheme: dark;
  --bg: #120a14;
  --bg-2: #1e1020;
  --panel: rgba(24, 12, 26, 0.84);
  --panel-strong: rgba(32, 16, 34, 0.96);
  --panel-soft: rgba(40, 20, 42, 0.72);
  --text: #fceff8;
  --muted: #c49ab8;
  --line: rgba(240, 160, 216, 0.16);
  --line-strong: rgba(240, 160, 216, 0.28);
  --accent: #f0a0d8;
  --accent-strong: #d66eb8;
  --accent-glow: rgba(240, 160, 216, 0.22);
  --accent-btn-top: #f4b0e0;
  --accent-btn-bottom: #d66eb8;
  --rail-bg: #281c28;
  --rail-border: rgba(240, 160, 216, 0.14);
  --rail-surface: rgba(255, 255, 255, 0.06);
  --rail-text: rgba(252, 239, 248, 0.94);
  --rail-muted: rgba(196, 154, 184, 0.82);
  --overlay-glow: rgba(240, 160, 216, 0.12);
}

[data-palette="slate"] {
  color-scheme: dark;
  --bg: #0e1118;
  --bg-2: #141a24;
  --panel: rgba(16, 20, 28, 0.84);
  --panel-strong: rgba(20, 26, 36, 0.96);
  --panel-soft: rgba(24, 30, 40, 0.72);
  --text: #edf2f8;
  --muted: #95a3b8;
  --line: rgba(158, 180, 208, 0.16);
  --line-strong: rgba(158, 180, 208, 0.28);
  --accent: #9eb4d0;
  --accent-strong: #7a95b8;
  --accent-glow: rgba(158, 180, 208, 0.22);
  --accent-btn-top: #b0c4dc;
  --accent-btn-bottom: #7a95b8;
  --rail-bg: #222630;
  --rail-border: rgba(158, 180, 208, 0.14);
  --rail-surface: rgba(255, 255, 255, 0.06);
  --rail-text: rgba(237, 242, 248, 0.94);
  --rail-muted: rgba(149, 163, 184, 0.82);
  --overlay-glow: rgba(158, 180, 208, 0.1);
}

[data-palette="frost"] {
  color-scheme: light;
  --bg: #d8e6f8;
  --bg-2: #edf3fc;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: #ffffff;
  --panel-soft: rgba(248, 251, 255, 0.98);
  --text: #0f1c33;
  --muted: #4a607d;
  --line: rgba(36, 72, 130, 0.2);
  --line-strong: rgba(36, 72, 130, 0.34);
  --accent: #1f5fd6;
  --accent-strong: #1247ad;
  --accent-glow: rgba(31, 95, 214, 0.18);
  --accent-btn-top: #3f7ef0;
  --accent-btn-bottom: #1f5fd6;
  --success: #0f8a5d;
  --warning: #9a6700;
  --danger: #c6283d;
  --shadow: 0 18px 48px rgba(24, 52, 96, 0.14);
  --rail-bg: #f4f8fd;
  --rail-border: rgba(36, 72, 130, 0.2);
  --rail-surface: #ffffff;
  --rail-text: #0f1c33;
  --rail-muted: #4a607d;
  --overlay-start: rgba(255, 255, 255, 0.24);
  --overlay-end: rgba(228, 237, 250, 0.78);
  --overlay-glow: rgba(63, 126, 240, 0.12);
  --fullscreen-overlay-start: rgba(255, 255, 255, 0.12);
  --fullscreen-overlay-end: rgba(228, 237, 250, 0.58);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at top left, rgba(96, 138, 255, 0.18), transparent 26%),
    radial-gradient(circle at 84% 14%, rgba(118, 111, 255, 0.15), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-color: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: var(--user-bg-image, none);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.34;
  transform: scale(1.02);
  pointer-events: none;
}

body.nebula-fullscreen::after {
  background:
    linear-gradient(180deg, var(--fullscreen-overlay-start), var(--fullscreen-overlay-end)),
    radial-gradient(circle at top left, var(--overlay-glow), transparent 26%);
}

body.nebula-fullscreen::before {
  opacity: 0.48;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--overlay-start), var(--overlay-end)),
    radial-gradient(circle at top left, var(--overlay-glow), transparent 26%);
  pointer-events: none;
}

body.nebula-bg[data-background="aurora"] {
  background-image:
    radial-gradient(circle at 18% 12%, rgba(84, 212, 164, 0.24), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(103, 151, 255, 0.22), transparent 24%),
    linear-gradient(180deg, #07121c 0%, #122338 100%);
}

body.nebula-bg[data-background="midnight"] {
  background-image:
    radial-gradient(circle at 50% 0%, rgba(90, 129, 255, 0.14), transparent 20%),
    linear-gradient(180deg, #040911 0%, #091320 100%);
}

body.nebula-bg[data-background="dawn"] {
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255, 199, 143, 0.28), transparent 25%),
    radial-gradient(circle at 82% 15%, rgba(255, 239, 196, 0.26), transparent 25%),
    linear-gradient(180deg, #fff3e8 0%, #eaf2ff 100%);
}

/* Custom wallpaper: turn off default gradient themes so the image is the background. */
body.nebula-bg[data-has-custom-bg="true"] {
  background: var(--bg);
  background-image: none;
}

body.nebula-bg[data-has-custom-bg="true"]::before {
  opacity: 0.78;
}

body.nebula-fullscreen[data-has-custom-bg="true"]::before {
  opacity: 0.88;
}

body.nebula-bg[data-has-custom-bg="true"]::after {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--overlay-start) 55%, transparent), color-mix(in srgb, var(--overlay-end) 70%, transparent)),
    radial-gradient(circle at top left, color-mix(in srgb, var(--overlay-glow) 45%, transparent), transparent 28%);
}

body.nebula-fullscreen[data-has-custom-bg="true"]::after {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--fullscreen-overlay-start) 50%, transparent), color-mix(in srgb, var(--fullscreen-overlay-end) 65%, transparent)),
    radial-gradient(circle at top left, color-mix(in srgb, var(--overlay-glow) 40%, transparent), transparent 28%);
}

.background-image-field {
  display: grid;
  gap: 0.55rem;
}

.background-image-field__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.background-image-field__actions .btn-secondary {
  width: auto;
}

#background-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
}

input,
button,
textarea,
select {
  font: inherit;
}

input[type="range"] {
  width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--panel);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--content);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nebula-brand__orb {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #fff, var(--accent) 56%, transparent 100%);
  box-shadow: 0 0 18px var(--accent-glow);
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.site-header__link,
.site-header__toggle,
.btn-primary,
.btn-secondary,
.btn-3d {
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.site-header__link,
.site-header__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.site-header__link:hover,
.site-header__toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
}

.site-header__toggle {
  width: 40px;
  padding: 0;
}

.site-header__toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-wrap {
  max-width: var(--content);
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
}

.card-block,
.auth-card,
.feed-card,
.chat-message,
.presence-item {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.card-block,
.auth-card {
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.auth-page,
.nebula-auth {
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-5) var(--space-3);
  gap: var(--space-4);
}

.auth-shell__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.auth-shell__brand-text {
  color: var(--text);
}

.auth-tabs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  backdrop-filter: blur(16px);
}

.auth-tabs__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.auth-tabs__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.auth-tabs__link.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, 0.06));
}

.auth-widget {
  width: min(100%, 420px);
  border-radius: 16px;
  border: 1px solid var(--rail-border);
  background: var(--rail-bg);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
  color: var(--rail-text);
  overflow: hidden;
}

.auth-signin {
  --signin-radius: 8px;
  --signin-ink: var(--text);
  --signin-muted: var(--muted);
  --signin-line: var(--line);
  --signin-font: "Manrope", "Segoe UI", sans-serif;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(1rem, 3vw, 2rem);
  font-family: var(--signin-font);
}

body.nebula-auth[data-auth-page="true"] {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-signin__stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 400px);
  width: min(100%, 980px);
  margin: auto;
  min-height: min(560px, calc(100dvh - 2rem));
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-strong) 80%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel-strong) 70%, rgba(6, 12, 22, 0.88));
  box-shadow: 0 28px 70px rgba(4, 10, 22, 0.42);
  backdrop-filter: blur(18px);
}

.auth-signin__showcase {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  color: #eef4ff;
}

.auth-signin__scene {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(132, 183, 255, 0.3), transparent 28%),
    radial-gradient(circle at 18% 78%, rgba(84, 170, 210, 0.2), transparent 30%),
    linear-gradient(165deg, #102038 0%, #0a1424 48%, #08111d 100%);
}

.auth-signin__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  animation: auth-orb-drift 14s ease-in-out infinite alternate;
}

.auth-signin__orb--a {
  top: 10%;
  right: 12%;
  width: 170px;
  height: 170px;
  background: radial-gradient(circle, rgba(132, 183, 255, 0.55), transparent 68%);
}

.auth-signin__orb--b {
  bottom: 14%;
  left: 6%;
  width: 230px;
  height: 230px;
  background: radial-gradient(circle, rgba(90, 170, 190, 0.32), transparent 70%);
  animation-delay: -4s;
}

.auth-signin__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(146, 176, 224, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(146, 176, 224, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 88%);
  animation: auth-grid-shift 22s linear infinite;
}

.auth-signin__showcase-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.15rem;
  height: 100%;
  padding: clamp(1.5rem, 4vw, 2.4rem);
}

.auth-signin__brand {
  display: block;
  width: fit-content;
  line-height: 0;
  text-decoration: none;
}

.auth-signin__brand--hero {
  margin: 0;
}

.auth-signin__logo {
  display: block;
  width: min(100%, 240px);
  height: auto;
}

.auth-signin__tagline {
  margin: 0;
  max-width: 22ch;
  color: rgba(236, 243, 255, 0.94);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.25;
  animation: auth-fade-up 0.7s ease both;
}

.auth-signin__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.auth-signin__feature {
  display: grid;
  gap: 0.15rem;
  max-width: 34ch;
  animation: auth-fade-up 0.7s ease both;
}

.auth-signin__feature:nth-child(1) { animation-delay: 0.08s; }
.auth-signin__feature:nth-child(2) { animation-delay: 0.16s; }
.auth-signin__feature:nth-child(3) { animation-delay: 0.24s; }

.auth-signin__feature-title {
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(170, 205, 255, 0.92);
}

.auth-signin__feature-copy {
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(214, 226, 245, 0.82);
}

.auth-signin__panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.95rem;
  padding: clamp(1.4rem, 3.5vw, 2.2rem);
  color: var(--signin-ink);
  background: color-mix(in srgb, var(--panel-strong) 55%, rgba(7, 12, 20, 0.72));
}

.auth-signin__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--signin-ink);
}

.auth-signin__lede {
  margin: -0.35rem 0 0;
  color: var(--signin-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-signin__mode {
  margin: 0;
  text-align: center;
  color: var(--signin-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.auth-signin__mode a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.auth-signin__mode a:hover {
  text-decoration: underline;
}

.auth-signin__error {
  padding: 0.7rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: var(--signin-radius);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  font-size: 0.86rem;
  line-height: 1.4;
}

.auth-signin__form {
  display: grid;
  gap: 0.7rem;
}

.auth-signin__field {
  display: grid;
  gap: 0;
  margin: 0;
}

.auth-signin__honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-signin .text-input {
  border: 1px solid color-mix(in srgb, var(--signin-line) 80%, transparent);
  border-radius: var(--signin-radius);
  background: color-mix(in srgb, var(--panel) 55%, rgba(6, 12, 22, 0.72));
  color: var(--signin-ink);
  padding: 0.9rem 0.95rem;
  font-family: inherit;
}

.auth-signin .text-input::placeholder {
  color: color-mix(in srgb, var(--signin-muted) 85%, transparent);
}

.auth-signin .text-input:focus {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--signin-line));
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}

.auth-signin__submit {
  width: 100%;
  min-height: 48px;
  margin-top: 0.15rem;
  border: 0;
  border-radius: var(--signin-radius);
  background: linear-gradient(180deg, var(--accent-btn-top), var(--accent-btn-bottom));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 24%, transparent);
  color: #08111d;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 750;
}

.auth-signin__submit:hover {
  filter: brightness(1.04);
}

.auth-signin__alt {
  margin: 0;
}

.auth-signin__text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--signin-muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-signin__text-btn:hover {
  color: var(--signin-ink);
  text-decoration: underline;
}

.auth-robot {
  display: grid;
  gap: 0.55rem;
  padding: 0.15rem 0.1rem;
}

.auth-robot__toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  cursor: pointer;
  color: color-mix(in srgb, var(--signin-ink) 88%, var(--signin-muted));
  font-size: 0.88rem;
  font-weight: 550;
}

.auth-robot__check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-robot__box {
  width: 18px;
  height: 18px;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--signin-line) 90%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--panel-strong) 50%, rgba(6, 12, 22, 0.5));
  transition: background 0.12s ease, border-color 0.12s ease;
}

.auth-robot__check:checked + .auth-robot__box {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--signin-line));
  background: linear-gradient(180deg, var(--accent-btn-top), var(--accent-btn-bottom));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, #08111d 35%, transparent);
}

.auth-robot__check:focus-visible + .auth-robot__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-robot__puzzle {
  padding: 0;
  border: 0;
}

.auth-signin__disclaimer {
  margin: 0.1rem 0 0;
  text-align: center;
  color: color-mix(in srgb, var(--signin-muted) 72%, transparent);
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

@keyframes auth-orb-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-12px, 18px, 0) scale(1.06); }
}

@keyframes auth-grid-shift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -28px, 0); }
}

@keyframes auth-fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-widget__head.window-titlebar {
  cursor: default;
  user-select: auto;
}

.auth-widget__body.window-body {
  display: flex;
  flex-direction: column;
  gap: var(--block-gap);
}

.auth-widget label {
  display: grid;
  gap: var(--control-gap);
  margin: 0;
  color: var(--rail-muted);
  font-size: 0.82rem;
}

.auth-widget label > span {
  line-height: 1.35;
  font-weight: 600;
}

.auth-widget .text-input {
  background: var(--rail-surface);
  border: 1px solid var(--rail-border);
  color: var(--rail-text);
}

.auth-widget .text-input::placeholder {
  color: var(--rail-muted);
}

.auth-widget .text-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--rail-border));
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-widget .btn-primary {
  background: linear-gradient(180deg, var(--accent-btn-top), var(--accent-btn-bottom));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: #08111d;
}

.auth-widget .callout {
  background: color-mix(in srgb, var(--rail-surface) 88%, black);
  border-color: color-mix(in srgb, var(--danger) 35%, var(--rail-border));
}

.auth-copy,
.auth-switch {
  color: var(--rail-muted);
  line-height: 1.65;
}

.auth-switch {
  margin: 0;
  text-align: center;
  font-size: 0.88rem;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 600;
}

.auth-card a {
  color: var(--accent);
}

.callout {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.callout--error {
  color: #ffd6dc;
  border-color: rgba(255, 142, 153, 0.28);
  background: rgba(96, 21, 34, 0.45);
}

[data-palette="frost"] .callout--error {
  color: #8f1831;
  background: rgba(255, 231, 235, 0.96);
}

[data-palette="frost"] .rail-item.is-active {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--rail-border));
  background: color-mix(in srgb, var(--accent) 10%, var(--rail-surface));
}

[data-palette="frost"] .nebula-widget .text-input:focus,
[data-palette="frost"] .auth-widget .text-input:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--rail-border));
  box-shadow: 0 0 0 3px var(--accent-glow);
}

[data-palette="frost"] .nebula-widget .btn-primary,
[data-palette="frost"] .auth-widget .btn-primary,
[data-palette="frost"] .auth-signin .btn-primary {
  color: #ffffff;
}

[data-palette="frost"] .auth-signin__submit {
  color: #ffffff;
}

[data-palette="frost"] .chat-bubble--mine {
  color: #ffffff;
}

[data-palette="frost"] .chat-topics,
[data-palette="frost"] .chat-compose {
  background: color-mix(in srgb, var(--rail-bg) 88%, #d8e6f8);
}

[data-palette="frost"] .feed-card:hover,
[data-palette="frost"] .room-card--active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rail-border));
  background: color-mix(in srgb, var(--accent) 8%, var(--rail-surface));
}

[data-palette="frost"] .poll-option__bar {
  background: rgba(36, 72, 130, 0.1);
}

[data-palette="frost"] .widget-resize-handle::before {
  border-right-color: rgba(36, 72, 130, 0.42);
  border-bottom-color: rgba(36, 72, 130, 0.42);
}

[data-palette="frost"] .jamboard-canvas {
  background-color: rgba(255, 255, 255, 0.72);
  background-image:
    linear-gradient(90deg, rgba(36, 72, 130, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(36, 72, 130, 0.08) 1px, transparent 1px);
}

[data-palette="frost"] .poll-compose:not([hidden]) {
  background: color-mix(in srgb, var(--rail-surface) 92%, #d8e6f8);
}

[data-palette="frost"] .auth-widget .callout {
  background: #fff5f6;
}

.nebula-workspace {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body.nebula-fullscreen {
  overflow: hidden;
}

body.nebula-fullscreen .nebula-workspace {
  max-width: none;
  margin: 0;
  padding: 0;
}

.nebula-rail {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--rail-bg);
  border-right: 1px solid var(--rail-border);
  z-index: 20;
}

.nebula-rail__brand {
  display: grid;
  place-items: center;
  padding: 0.85rem 0.5rem 0.65rem;
  flex: none;
}

.nebula-rail__mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: transparent;
  overflow: hidden;
}

.nebula-rail__logo,
.auth-shell__logo,
.site-header__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-shell__logo {
  width: 40px;
  height: 40px;
  flex: none;
}

.site-header__logo {
  width: 28px;
  height: 28px;
  flex: none;
}

.nebula-rail__mark .nebula-brand__orb {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
}

.nebula-rail__nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.35rem 0.4rem;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.rail-group {
  display: grid;
  gap: 0.18rem;
}

.rail-group + .rail-group {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--rail-border);
}

.rail-group__items {
  display: grid;
  gap: 0.18rem;
}

.rail-group--labeled .rail-section-label {
  margin-bottom: 0.2rem;
}

.nebula-rail__footer {
  display: grid;
  gap: 0.18rem;
  padding: 0.55rem 0.4rem 0.8rem;
  border-top: 1px solid var(--rail-border);
  flex: none;
}

.rail-item {
  display: grid;
  gap: 0.32rem;
  justify-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0.58rem 0.2rem;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--rail-muted);
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
}

.rail-item:hover {
  color: var(--rail-text);
  background: var(--rail-surface);
}

.rail-item.is-active {
  color: var(--rail-text);
  background: var(--rail-surface);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--rail-border));
}

.rail-item__icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
}

.rail-item__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-item__label {
  font-size: 0.62rem;
  line-height: 1.1;
  text-align: center;
  max-width: 84px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.rail-item--link {
  color: var(--rail-muted);
}

.nebula-viewport {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.nebula-topbar {
  position: absolute;
  top: 1rem;
  left: 1.25rem;
  right: 1.25rem;
  z-index: 8;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.75rem;
  pointer-events: none;
}

.nebula-topbar > * {
  pointer-events: auto;
}

.nebula-topbar__search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  width: min(100%, 420px);
  max-width: 420px;
  min-width: 0;
  margin-right: auto;
  padding: 0.28rem 0.35rem 0.28rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  backdrop-filter: blur(14px);
  color: var(--text);
}

.nebula-topbar__search:focus-within {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.nebula-topbar__search-icon {
  display: inline-flex;
  flex: none;
  color: var(--muted);
}

.nebula-topbar__search-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nebula-topbar__search-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.2;
  padding: 0.45rem 0.15rem;
  outline: none;
}

.nebula-topbar__search-input::placeholder {
  color: color-mix(in srgb, var(--muted) 88%, transparent);
}

.nebula-topbar__search-submit {
  flex: none;
  min-height: 32px;
  padding: 0.35rem 0.75rem;
  border: 0;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.nebula-topbar__search-submit:hover {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

.nebula-topbar__actions {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  flex: none;
}

.nebula-topbar__clock,
.nebula-topbar__btn {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  backdrop-filter: blur(14px);
  color: var(--text);
}

.nebula-topbar__clock {
  display: grid;
  gap: 0.15rem;
  justify-items: end;
  padding: 0.55rem 0.8rem;
  user-select: none;
}

.nebula-topbar__time {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.nebula-topbar__date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nebula-topbar__btn {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.nebula-topbar__btn:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}

.nebula-topbar__btn:active {
  transform: translateY(1px);
}

.nebula-topbar__focus {
  min-width: 78px;
  padding: 0.45rem 0.75rem;
  gap: 0.1rem;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.nebula-topbar__focus-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nebula-topbar__focus-time {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.nebula-topbar__focus.is-active {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
}

.nebula-topbar__focus.is-active .nebula-topbar__focus-label,
.nebula-topbar__focus.is-active .nebula-topbar__focus-time {
  color: var(--accent);
}

.nebula-topbar__focus.is-break {
  border-color: color-mix(in srgb, var(--warning) 42%, var(--line));
  background: color-mix(in srgb, var(--warning) 12%, var(--panel));
}

.nebula-topbar__focus.is-break .nebula-topbar__focus-label,
.nebula-topbar__focus.is-break .nebula-topbar__focus-time {
  color: var(--warning);
}

.nebula-topbar__fullscreen {
  width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nebula-topbar__icon-wrap {
  position: relative;
  width: 18px;
  height: 18px;
  display: block;
}

.nebula-topbar__icon {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nebula-topbar__icon--shrink {
  display: none;
}

.nebula-topbar__fullscreen.is-active .nebula-topbar__icon--expand {
  display: none;
}

.nebula-topbar__fullscreen.is-active .nebula-topbar__icon--shrink {
  display: block;
}

.nebula-topbar__fullscreen.is-active {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  color: var(--accent);
}

.nebula-widget {
  position: absolute;
  display: none;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--rail-border);
  background: var(--rail-bg);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  min-width: 300px;
  min-height: 260px;
  color: var(--rail-text);
  z-index: 20;
}

.nebula-widget.is-open {
  display: flex;
}

.nebula-widget--spaces {
  top: 28px;
  left: 28px;
  width: 420px;
  height: 640px;
}

.nebula-widget--chat {
  top: 48px;
  left: calc(50% - 250px);
  width: 500px;
  height: 640px;
}

.nebula-widget--notes {
  top: 120px;
  left: 80px;
  width: 400px;
  height: 360px;
}

.nebula-widget--focus {
  top: 36px;
  right: 36px;
  left: auto;
  width: 320px;
  height: 340px;
}

.nebula-widget--environment {
  top: 220px;
  right: 64px;
  left: auto;
  width: 360px;
  height: 520px;
}

.nebula-widget--admin {
  top: 72px;
  left: 420px;
  width: 400px;
  height: 560px;
}

.nebula-widget--jamboard {
  top: 100px;
  left: 120px;
  width: 640px;
  height: 480px;
}

.nebula-widget--people {
  top: 140px;
  right: 120px;
  left: auto;
  width: 300px;
  height: 360px;
}

.nebula-widget--browser {
  top: 160px;
  left: 200px;
  width: 520px;
  height: 460px;
}

.nebula-widget--tree {
  top: 180px;
  right: 180px;
  left: auto;
  width: 360px;
  height: 420px;
}

.nebula-widget--polls {
  top: 120px;
  left: 220px;
  width: 440px;
  height: 560px;
}

.nebula-widget--calendar {
  top: 88px;
  left: 160px;
  width: 420px;
  height: 620px;
}

.nebula-widget--todo {
  top: 110px;
  left: 280px;
  width: 360px;
  height: 480px;
}

.nebula-widget--about {
  top: 64px;
  right: 48px;
  left: auto;
  width: 380px;
  height: 520px;
}

.about-panel {
  gap: var(--block-gap);
}

.about-section {
  display: grid;
  gap: var(--space-2);
}

.about-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--rail-muted);
  line-height: 1.55;
}

.about-list li + li {
  margin-top: 0.25rem;
}

.about-contact {
  margin: 0;
}

.about-contact a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.about-contact a:hover {
  text-decoration: underline;
}

.about-foot {
  margin: 0;
}

.about-foot a {
  color: var(--accent);
  font-weight: 600;
}

.about-logo-wrap {
  display: flex;
  justify-content: center;
  padding: 0.15rem 0 0.35rem;
}

.about-logo {
  display: block;
  width: min(100%, 300px);
  height: auto;
}

.about-disclaimer {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--rail-border));
  background: color-mix(in srgb, var(--warning) 10%, var(--rail-surface));
  color: var(--rail-text);
  line-height: 1.6;
  font-size: 0.86rem;
}

.about-credits {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-credit {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--rail-border);
  border-radius: 12px;
  background: var(--rail-surface);
}

.about-credit a,
.about-credit__name {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.about-credit a:hover {
  text-decoration: underline;
}

.about-credit__detail {
  color: var(--rail-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

[data-palette="frost"] .about-disclaimer {
  border-color: color-mix(in srgb, var(--warning) 45%, var(--rail-border));
  background: color-mix(in srgb, var(--warning) 12%, #fff);
}

.auth-shell--about {
  gap: var(--space-4);
}

.auth-widget--about {
  width: min(100%, 520px);
}

.auth-shell__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

.auth-shell__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-shell__link:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

[data-palette="frost"] .nebula-topbar__clock,
[data-palette="frost"] .nebula-topbar__btn,
[data-palette="frost"] .nebula-topbar__search {
  background: color-mix(in srgb, var(--panel-strong) 88%, transparent);
  border-color: var(--line-strong);
}

.polls-panel {
  display: flex;
  flex-direction: column;
  gap: var(--block-gap);
  min-height: 0;
}

.calendar-panel,
.todo-panel {
  display: flex;
  flex-direction: column;
  gap: var(--block-gap);
  min-height: 0;
}

.calendar-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.calendar-month-nav .section-title {
  margin: 0;
  text-align: center;
  flex: 1;
}

.calendar-month-nav .btn-secondary {
  min-width: 38px;
  padding-inline: 0.55rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rail-muted);
  padding: 0.15rem 0;
}

.calendar-day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.2rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--rail-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
}

.calendar-day--empty {
  pointer-events: none;
  min-height: 34px;
}

.calendar-day:hover {
  background: color-mix(in srgb, var(--rail-surface) 80%, transparent);
}

.calendar-day.is-today {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--rail-border));
}

.calendar-day.is-selected {
  background: color-mix(in srgb, var(--accent) 16%, var(--rail-surface));
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rail-border));
}

.calendar-day.has-events .calendar-day__dot {
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.calendar-day-panel {
  display: grid;
  gap: var(--space-2);
  min-height: 0;
}

.calendar-day-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.calendar-day-panel__head .section-title {
  margin: 0;
}

.calendar-day-panel__head .btn-secondary {
  flex: none;
  min-height: 34px;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
}

.calendar-create:not([hidden]) {
  display: grid;
  gap: var(--field-gap);
  padding: 0.75rem;
  border: 1px solid var(--rail-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--rail-surface) 88%, black);
}

.calendar-create__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.calendar-event-list {
  display: grid;
  gap: var(--space-2);
  min-height: 2.5rem;
  max-height: 12rem;
  overflow: auto;
  padding: 0.15rem 0;
}

.calendar-event {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--rail-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--rail-surface) 92%, black);
  color: var(--rail-text);
}

.calendar-event__body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.calendar-event__body strong {
  color: var(--rail-text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

.calendar-event__body .helper-copy,
.calendar-event-list > .helper-copy {
  margin: 0;
  color: var(--rail-muted);
}

.calendar-event-list > .helper-copy {
  padding: 0.35rem 0.1rem;
}

.calendar-event__delete,
.todo-item__delete {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--rail-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.calendar-event__delete:hover,
.todo-item__delete:hover {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.calendar-create {
  gap: var(--field-gap);
}

.todo-create {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
}

.todo-create .text-input {
  min-width: 0;
}

.todo-section {
  display: grid;
  gap: var(--space-2);
}

.todo-list {
  display: grid;
  gap: 0.45rem;
}

.todo-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--rail-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--rail-surface) 88%, black);
}

.todo-item__main {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.todo-item__main input[type="checkbox"] {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.todo-item__title {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--rail-text);
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.todo-item.is-done .todo-item__title {
  color: var(--rail-muted);
  text-decoration: line-through;
}

.polls-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.polls-toolbar__copy {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.poll-compose:not([hidden]) {
  display: grid;
  gap: var(--field-gap);
  padding: var(--space-3);
  border: 1px solid var(--rail-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--rail-surface) 88%, black);
}

.poll-compose__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.poll-options-editor {
  display: grid;
  gap: var(--space-2);
}

.poll-options-editor__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.poll-options-list {
  display: grid;
  gap: var(--field-gap);
}

.poll-option-field__row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.poll-option-field__row .text-input {
  flex: 1;
  min-width: 0;
}

.poll-option-remove {
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--rail-border);
  border-radius: 999px;
  background: var(--rail-surface);
  color: var(--rail-text);
  cursor: pointer;
  line-height: 1;
}

.poll-options-add {
  width: fit-content;
}

.polls-section {
  display: grid;
  gap: var(--field-gap);
}

.polls-section--closed {
  padding-top: var(--space-1);
  border-top: 1px solid var(--rail-border);
}

.poll-list {
  display: grid;
  gap: var(--list-gap);
}

.poll-empty {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px dashed var(--rail-border);
  border-radius: 12px;
  text-align: center;
}

.poll-card {
  display: grid;
  gap: var(--field-gap);
  padding: 1rem;
  border: 1px solid var(--rail-border);
  border-radius: 16px;
  background: var(--rail-surface);
}

.poll-card--closed {
  opacity: 0.94;
}

.poll-card__head {
  display: grid;
  gap: var(--space-1);
}

.poll-card__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}

.poll-card__question {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.poll-card__meta,
.poll-card__hint {
  margin: 0;
}

.poll-card__options {
  display: grid;
  gap: var(--space-2);
}

.poll-option-row {
  display: grid;
  gap: 0.4rem;
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--rail-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--rail-bg) 35%, transparent);
  color: inherit;
  text-align: left;
}

.poll-option-row--interactive {
  cursor: pointer;
  font: inherit;
  touch-action: manipulation;
}

.poll-option-row--interactive:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--rail-border));
}

.poll-option-row.is-selected {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--rail-border));
  background: color-mix(in srgb, var(--accent) 10%, var(--rail-surface));
}

.poll-option__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.poll-option__label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.poll-option__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.poll-option__stat {
  flex: none;
  color: var(--rail-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.poll-option__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.poll-option__fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
  transition: width 0.25s ease;
}

.poll-option__fill--yours {
  background: var(--accent);
}

.poll-card__close {
  width: fit-content;
}

.rail-item--hidden {
  display: none !important;
}

.nebula-widget--app-disabled {
  display: none !important;
}

.widget-resize-handle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  opacity: 0.55;
}

.widget-resize-handle::before {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255, 255, 255, 0.7);
  border-bottom: 2px solid rgba(255, 255, 255, 0.7);
}
.nebula-widget--chat .window-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.chat-app__header {
  align-items: center;
  padding: 0.95rem 1rem;
}

.chat-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: transparent;
}

.chat-topics {
  display: grid;
  gap: var(--space-2);
  padding: 0.9rem 0.95rem 0.75rem;
  border-bottom: 1px solid var(--rail-border);
  background: color-mix(in srgb, var(--rail-bg) 90%, black);
  flex: none;
}

.chat-topics__header {
  display: grid;
  gap: var(--space-2);
}

.chat-topic-create {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
}

.chat-topic-create__input {
  min-width: 0;
}

.chat-topic-list {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  max-height: 7.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.chat-topic {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--rail-border);
  background: var(--rail-surface);
  color: var(--rail-text);
  cursor: pointer;
  text-align: left;
}

.chat-topic.is-active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rail-border));
  background: color-mix(in srgb, var(--accent) 12%, var(--rail-surface));
  box-shadow: 0 0 0 1px var(--accent-glow);
}

.chat-topic__title {
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 11rem;
}

.chat-topic__meta {
  font-size: 0.64rem;
  color: var(--rail-muted);
  white-space: nowrap;
}

.chat-topic-current {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.55rem 1rem 0;
  color: var(--rail-text);
  flex: none;
}

.chat-topic-current__label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rail-muted);
}

.chat-log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 1rem 0.75rem;
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  max-width: 88%;
}

.chat-row--mine {
  align-self: flex-end;
  flex-direction: row-reverse;
  margin-left: auto;
}

.chat-row--theirs {
  align-self: flex-start;
}

.chat-avatar {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #ecf3ff;
  background: linear-gradient(180deg, #6b8cff, #4a67d8);
}

.chat-bubble {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0.85rem;
  border-radius: 18px;
  border: 1px solid transparent;
  box-shadow: none;
}

.chat-bubble--theirs {
  background: var(--rail-surface);
  border-color: var(--rail-border);
  border-bottom-left-radius: 6px;
}

.chat-bubble--mine {
  background: linear-gradient(180deg, var(--accent-btn-top), var(--accent-btn-bottom));
  color: #08111d;
  border-bottom-right-radius: 6px;
}

.chat-bubble__name {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}

.chat-bubble__name:hover {
  text-decoration: underline;
}

.chat-bubble__text {
  margin: 0;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.94rem;
}

.chat-bubble__time {
  font-size: 0.68rem;
  opacity: 0.72;
  justify-self: end;
}

.chat-retention-note {
  margin: 0;
  padding: 0.45rem 0.85rem 0;
  font-size: 0.82rem;
}

.chat-compose {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem 0.9rem;
  border-top: 1px solid var(--rail-border);
  background: color-mix(in srgb, var(--rail-bg) 92%, black);
  flex: none;
}

.chat-image-compose:not([hidden]) {
  display: grid;
  gap: var(--space-2);
  padding: 0.75rem 0.85rem 0;
  border-top: 1px solid var(--rail-border);
  background: color-mix(in srgb, var(--rail-bg) 94%, black);
}

.chat-image-compose__input {
  min-width: 0;
}

.chat-compose__image {
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--rail-border);
  border-radius: 999px;
  background: var(--rail-surface);
  color: var(--rail-text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.chat-compose__image[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rail-border));
  background: color-mix(in srgb, var(--accent) 12%, var(--rail-surface));
}

.chat-image {
  display: grid;
  gap: var(--space-2);
}

.chat-image__open {
  width: fit-content;
}

.chat-image__preview {
  display: grid;
  gap: var(--space-2);
}

.chat-image__img {
  max-width: min(100%, 280px);
  border-radius: 12px;
  border: 1px solid var(--rail-border);
  background: rgba(0, 0, 0, 0.12);
}

.chat-image__note {
  margin: 0;
}

.chat-compose__input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--rail-border);
  border-radius: 999px;
  background: var(--rail-surface);
  color: var(--rail-text);
  padding: 0.8rem 1rem;
}

.chat-compose__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.chat-compose__send {
  flex: none;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--accent-btn-top), var(--accent-btn-bottom));
  color: #06101f;
  cursor: pointer;
}

.chat-compose__send svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-compose__send:hover {
  filter: brightness(1.05);
}

.window-titlebar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  cursor: move;
  user-select: none;
  border-bottom: 1px solid var(--rail-border);
  background: transparent;
  flex: none;
}

.window-titlebar__copy {
  min-width: 0;
}

.widget-subtitle {
  margin: 0.2rem 0 0;
  color: color-mix(in srgb, var(--rail-text) 70%, var(--rail-muted));
  font-size: 0.78rem;
  font-weight: 600;
}

.window-body {
  padding: var(--widget-pad-y) var(--widget-pad-x) var(--widget-pad-bottom);
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.window-body--sections,
.window-body.admin-panel,
.window-body.focus-panel,
.window-body.shared-note,
.window-body.jamboard-panel,
.window-body.browser-panel,
.window-body.tree-panel,
.window-body.polls-panel,
.window-body.calendar-panel,
.window-body.todo-panel,
.window-body.profile-panel {
  display: flex;
  flex-direction: column;
  gap: var(--block-gap);
}

.nebula-widget label {
  display: grid;
  gap: var(--control-gap);
  margin: 0;
  color: var(--rail-muted);
  font-size: 0.82rem;
}

.nebula-widget label.todo-item__main {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  font-size: inherit;
}

.nebula-widget label > span,
.nebula-widget label > .section-title {
  line-height: 1.35;
}

.window-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--rail-border);
  border-radius: 999px;
  background: var(--rail-surface);
  color: var(--rail-text);
  cursor: pointer;
  flex: none;
  line-height: 1;
}

.window-close__icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.window-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.panel-head,
.shared-note__foot,
.timer-actions,
.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.panel-head {
  margin-bottom: 1rem;
}

.page-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--rail-text) 72%, var(--rail-muted));
}

.panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rail-text);
}

.section-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--rail-text) 80%, var(--rail-muted));
  letter-spacing: 0.02em;
}

.stack-form .btn-primary,
.stack-form .btn-secondary,
.stack-form .btn-3d {
  margin-top: var(--space-1);
}

.nebula-widget .text-input {
  background: var(--rail-surface);
  border: 1px solid var(--rail-border);
  color: var(--rail-text);
}

.nebula-widget .text-input::placeholder {
  color: var(--rail-muted);
}

.nebula-widget .text-input:focus {
  border-color: rgba(132, 183, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(102, 163, 255, 0.16);
}

.nebula-widget .btn-primary {
  background: linear-gradient(180deg, var(--accent-btn-top), var(--accent-btn-bottom));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: #08111d;
}

.nebula-widget .btn-secondary,
.nebula-widget .btn-3d:not(.btn-primary) {
  background: var(--rail-surface);
  border: 1px solid var(--rail-border);
  color: var(--rail-text);
}

.feed-card {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: var(--rail-surface);
  border: 1px solid var(--rail-border);
  box-shadow: none;
  text-decoration: none;
  color: inherit;
}

.feed-card:hover,
.room-card--active {
  border-color: rgba(132, 183, 255, 0.45);
  background: rgba(132, 183, 255, 0.1);
}

.feed-card__icon {
  font-size: 1.15rem;
}

.feed-card__body {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.feed-card__title {
  font-weight: 700;
}

.feed-card__desc {
  font-size: 0.9rem;
  color: var(--rail-muted);
}

.spaces-section {
  display: grid;
  gap: var(--space-2);
}

.spaces-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.spaces-section__head .section-title,
.spaces-section__head .helper-copy {
  margin: 0;
}

.spaces-panel {
  display: flex;
  flex-direction: column;
  gap: var(--block-gap);
}

.spaces-here {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--rail-border);
}

.spaces-here__main {
  min-width: 0;
}

.spaces-here__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rail-muted);
}

.spaces-here__name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--rail-text);
  line-height: 1.2;
}

.spaces-here__meta {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--rail-muted);
  line-height: 1.4;
}

.spaces-here__number {
  font-variant-numeric: tabular-nums;
  color: var(--rail-text);
  font-weight: 650;
}

.spaces-here__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  flex: none;
}

.spaces-here__actions .btn-secondary {
  min-height: 34px;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
}

.spaces-room-list {
  display: grid;
  gap: 0.4rem;
}

.spaces-room {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--rail-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--rail-surface) 88%, black);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.12s ease, background 0.12s ease;
}

a.spaces-room:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--rail-border));
  background: color-mix(in srgb, var(--accent) 8%, var(--rail-surface));
}

.spaces-room.is-current {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--rail-border));
  background: color-mix(in srgb, var(--accent) 12%, var(--rail-surface));
}

.spaces-room__kind {
  flex: none;
  min-width: 3.4rem;
  padding: 0.22rem 0.45rem;
  border-radius: 6px;
  text-align: center;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--rail-border);
  color: var(--rail-muted);
}

.spaces-room__kind--public {
  color: color-mix(in srgb, var(--accent) 80%, var(--rail-text));
  border-color: color-mix(in srgb, var(--accent) 30%, var(--rail-border));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.spaces-room__kind--private {
  color: var(--rail-text);
  background: color-mix(in srgb, var(--rail-surface) 70%, black);
}

.spaces-room__body {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.spaces-room__name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--rail-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spaces-room__meta {
  font-size: 0.74rem;
  color: var(--rail-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spaces-room__state,
.spaces-room__go {
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.spaces-room__state {
  color: var(--accent);
  text-transform: uppercase;
}

.spaces-room__go {
  color: var(--rail-muted);
}

a.spaces-room:hover .spaces-room__go {
  color: var(--accent);
}

.spaces-tools {
  display: grid;
  gap: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--rail-border);
}

.spaces-tool {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.spaces-tool__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.spaces-tool__head .section-title,
.spaces-tool__head .helper-copy {
  margin: 0;
}

.spaces-tool__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.spaces-tool__row .text-input {
  min-width: 0;
}

.spaces-tool__status {
  margin: 0;
}

.spaces-empty {
  margin: 0;
}

.spaces-current__label {
  margin: 0 0 var(--space-2);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rail-muted);
}

.spaces-current__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--rail-border));
  background: color-mix(in srgb, var(--accent) 10%, var(--rail-surface));
}

.spaces-current__copy {
  min-width: 0;
}

.spaces-current__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--rail-text);
}

.spaces-current__meta {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--rail-muted);
}

.spaces-current__badge {
  flex: none;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--rail-border));
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spaces-actions {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-1);
  border-top: 1px solid var(--rail-border);
}

.spaces-action {
  border: 1px solid var(--rail-border);
  border-radius: 12px;
  background: var(--rail-surface);
  overflow: hidden;
}

.spaces-action__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.8rem 0.9rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--rail-text);
}

.spaces-action__summary::-webkit-details-marker {
  display: none;
}

.spaces-action__summary::after {
  content: "+";
  color: var(--rail-muted);
  font-size: 1rem;
  line-height: 1;
}

.spaces-action[open] .spaces-action__summary::after {
  content: "âˆ’";
}

.spaces-action__hint {
  color: var(--rail-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.spaces-action__body {
  padding: 0 0.9rem 0.9rem;
  border-top: 1px solid var(--rail-border);
}

.room-list--compact {
  gap: var(--space-2);
}

.room-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: var(--rail-surface);
  border: 1px solid var(--rail-border);
  text-decoration: none;
  color: inherit;
}

.room-row:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--rail-border));
  background: color-mix(in srgb, var(--accent) 8%, var(--rail-surface));
}

.room-row__icon {
  flex: none;
  font-size: 1.1rem;
  line-height: 1;
}

.room-row__body {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.room-row__name {
  font-weight: 700;
  color: var(--rail-text);
}

.room-row__meta {
  font-size: 0.78rem;
  color: var(--rail-muted);
}

.room-row__chevron {
  flex: none;
  color: var(--rail-muted);
  font-size: 1.1rem;
  line-height: 1;
}

.spaces-section--featured {
  gap: var(--space-2);
}

.feed-card--lounge {
  position: relative;
  align-items: flex-start;
  padding: 1rem 1.05rem;
  border-color: color-mix(in srgb, var(--accent) 42%, var(--rail-border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 16%, var(--rail-surface)),
    color-mix(in srgb, var(--accent) 6%, transparent)
  );
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.feed-card--lounge:hover,
.feed-card--lounge.room-card--active {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--rail-border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 22%, var(--rail-surface)),
    color-mix(in srgb, var(--accent) 10%, transparent)
  );
}

.feed-card__icon--lounge {
  font-size: 1.65rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.feed-card__badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feed-card__here {
  flex: none;
  align-self: center;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--rail-border);
  color: var(--rail-muted);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

.feed-card--private .feed-card__title {
  font-size: 0.96rem;
}

.pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.8rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: rgba(132, 183, 255, 0.08);
}

.pill {
  color: var(--accent);
}

.status-pill--idle {
  color: var(--muted);
}

.status-pill--focusing {
  color: var(--success);
  border-color: rgba(84, 212, 164, 0.32);
  background: rgba(84, 212, 164, 0.12);
}

.status-pill--break {
  color: var(--warning);
  border-color: rgba(247, 201, 111, 0.28);
  background: rgba(247, 201, 111, 0.12);
}

.status-pill--offline {
  color: var(--danger);
  border-color: rgba(255, 142, 153, 0.28);
  background: rgba(255, 142, 153, 0.08);
}

.stack-form,
.mini-stack {
  display: grid;
  gap: var(--field-gap);
  margin: 0;
}

.admin-section {
  display: grid;
  gap: var(--field-gap);
  margin: 0;
}

.room-list {
  display: grid;
  gap: var(--list-gap);
  margin: 0;
}

.focus-panel .timer-actions {
  gap: var(--space-2);
}

.shared-note__foot {
  margin-top: var(--space-1);
}

.nebula-widget input[type="range"] {
  margin-top: var(--space-1);
}

.text-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  color: var(--text);
  padding: 0.85rem 0.95rem;
}

.text-input::placeholder {
  color: color-mix(in srgb, var(--muted) 86%, transparent);
}

.text-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.text-area {
  resize: vertical;
  min-height: 112px;
}

.text-area--compact {
  min-height: 88px;
}

.btn-primary,
.btn-secondary,
.btn-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  font-weight: 700;
}

.btn-primary {
  color: #08111d;
  background: linear-gradient(180deg, #a1c8ff 0%, #66a3ff 100%);
}

.btn-secondary,
.btn-3d:not(.btn-primary) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-3d:hover {
  transform: translateY(-1px);
}

.btn-primary:active,
.btn-secondary:active,
.btn-3d:active {
  transform: translateY(1px);
}

.panel-title,
.page-title,
.section-title {
  margin: 0;
}

.page-title {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.05;
}

.shared-note__foot {
  flex-wrap: wrap;
}

#room-notes-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.chat-panel {
  min-height: 0;
}

.focus-clock {
  font-size: clamp(2.8rem, 8vw, 4.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  text-align: center;
}

.timer-actions {
  flex-wrap: wrap;
}

.timer-actions > * {
  flex: 1 1 120px;
}

.presence-list {
  display: grid;
  gap: var(--list-gap);
  padding: 0;
}

.presence-item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.presence-item__head {
  min-width: 0;
}

.presence-item__name {
  font-weight: 700;
}

.presence-item__profile-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.presence-item__profile-link:hover {
  color: var(--accent);
}

.presence-item__task {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.nebula-widget--profile {
  top: 64px;
  right: 72px;
  left: auto;
  width: 400px;
  height: 640px;
}

.profile-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 0;
}

.profile-panel > * {
  flex-shrink: 0;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--rail-border);
}

.profile-header__copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.profile-header__meta:empty {
  display: none;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--rail-border));
  background: color-mix(in srgb, var(--accent) 16%, var(--rail-surface));
  color: var(--rail-text);
  font-weight: 750;
  font-size: 1.15rem;
  overflow: hidden;
  flex: none;
}

.profile-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header__name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--rail-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-header__meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--rail-muted);
  line-height: 1.35;
}

.profile-block {
  display: grid;
  gap: var(--space-2);
}

.profile-block__head {
  display: grid;
  gap: 0.25rem;
}

.profile-block__head .section-title,
.profile-block__head .helper-copy {
  margin: 0;
}

.profile-form {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

.profile-form .text-area {
  resize: vertical;
  min-height: 4.5rem;
  max-height: 10rem;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.profile-fold {
  border: 1px solid var(--rail-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--rail-surface) 88%, black);
  overflow: hidden;
}

.profile-fold__summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 0.9rem;
  cursor: pointer;
  list-style: none;
  color: var(--rail-text);
}

.profile-fold__summary::-webkit-details-marker {
  display: none;
}

.profile-fold__summary::after {
  content: "+";
  margin-left: auto;
  flex: none;
  color: var(--rail-muted);
  font-weight: 700;
}

.profile-fold[open] .profile-fold__summary::after {
  content: "–";
}

.profile-fold__title {
  flex: none;
  font-size: 0.9rem;
  font-weight: 750;
}

.profile-fold__hint {
  min-width: 0;
  font-size: 0.74rem;
  color: var(--rail-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-fold__badge {
  flex: none;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--rail-border);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rail-muted);
}

.profile-fold__badge.is-on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--rail-border));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.profile-fold__body {
  display: grid;
  gap: 0.7rem;
  padding: 0 0.9rem 0.95rem;
  border-top: 1px solid var(--rail-border);
}

#profile-2fa-disable-wrap {
  display: grid;
  gap: 0.7rem;
}

.profile-fold--danger {
  border-color: color-mix(in srgb, var(--danger) 28%, var(--rail-border));
}

.profile-fold--danger .profile-fold__title,
.profile-fold--danger .profile-fold__hint {
  color: color-mix(in srgb, var(--danger) 75%, var(--rail-text));
}

.profile-view-bio {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--rail-border);
  background: color-mix(in srgb, var(--rail-surface) 88%, black);
  color: var(--rail-text);
  line-height: 1.5;
  white-space: pre-wrap;
}

.profile-2fa-qr {
  display: block;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.profile-2fa-secret-wrap code {
  word-break: break-all;
}

.nebula-widget--profile.is-readonly #profile-edit-section,
.nebula-widget--profile.is-readonly #profile-password-section,
.nebula-widget--profile.is-readonly #profile-2fa-section,
.nebula-widget--profile.is-readonly #profile-delete-section {
  display: none !important;
}

.nebula-widget--profile:not(.is-readonly) #profile-view-section {
  display: none !important;
}

.profile-status--error {
  color: #ff8f8f;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 174, 216, 0.28);
}

::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 900px) {
  .nebula-workspace {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .nebula-topbar {
    display: none;
  }

  .nebula-rail__mark {
    width: 42px;
    height: 42px;
  }

  .rail-item__label {
    font-size: 0.58rem;
    max-width: 72px;
  }

  .nebula-widget {
    min-width: 0;
    max-width: calc(100% - 24px);
    max-height: min(88dvh, 760px);
  }

  .nebula-widget.is-open {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100% - 24px);
    max-height: min(88dvh, 760px);
  }

  .nebula-widget.is-open .window-body {
    min-height: 0;
    overflow-y: auto;
  }

  .btn-primary,
  .btn-secondary,
  .btn-3d {
    min-height: 46px;
  }

  .poll-option-row--interactive {
    min-height: 48px;
  }
}

@media (max-width: 720px) {
  .site-header__inner {
    flex-wrap: wrap;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
  }

  .site-header__nav {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .page-wrap {
    padding: 1.25rem 0.9rem 1.75rem;
  }

  body.nebula-fullscreen .page-wrap {
    padding: 0;
  }

  .auth-widget__body.window-body {
    padding: 0.85rem 0.9rem 1rem;
  }

  .auth-signin {
    padding: 0.85rem;
  }

  .auth-signin__stage {
    grid-template-columns: 1fr;
    min-height: 0;
    width: min(100%, 420px);
  }

  .auth-signin__showcase {
    min-height: 220px;
  }

  .auth-signin__showcase-copy {
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.15rem 1.15rem 1.25rem;
  }

  .auth-signin__logo {
    width: min(100%, 170px);
  }

  .auth-signin__tagline {
    font-size: 1.1rem;
    max-width: 28ch;
  }

  .auth-signin__features {
    gap: 0.55rem;
  }

  .auth-signin__feature-copy {
    font-size: 0.84rem;
  }

  .auth-signin__panel {
    padding: 1.25rem 1.15rem 1.35rem;
  }

  .nebula-workspace {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .nebula-rail__brand {
    padding: 0.65rem 0.3rem 0.45rem;
  }

  .nebula-rail__mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .nebula-rail__nav,
  .nebula-rail__footer {
    padding-left: 0.3rem;
    padding-right: 0.3rem;
  }

  .rail-item {
    min-height: 42px;
    padding: 0.45rem 0.08rem;
    gap: 0.22rem;
  }

  .rail-item__icon {
    width: 22px;
    height: 22px;
  }

  .rail-item__icon svg {
    width: 17px;
    height: 17px;
  }

  .rail-item__label {
    font-size: 0.54rem;
    max-width: 64px;
    -webkit-line-clamp: 1;
  }

  .rail-section-label {
    font-size: 0.5rem;
    letter-spacing: 0.06em;
    padding: 0;
  }

  .nebula-viewport {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }

  .nebula-widget.is-open {
    position: static;
    display: flex;
    width: calc(100% - 1.5rem) !important;
    height: auto !important;
    min-height: 0;
    max-height: min(82dvh, 680px);
    margin: 0.75rem;
    flex: none;
  }

  .nebula-widget--chat.is-open {
    max-height: min(88dvh, 760px);
  }

  .nebula-widget--chat .chat-app {
    min-height: min(62dvh, 520px);
  }

  .nebula-widget.is-open .window-body {
    min-height: 0;
    overflow-y: auto;
    flex: 1 1 auto;
  }

  .widget-resize-handle {
    display: none;
  }

  .window-titlebar {
    cursor: default;
    padding-top: calc(0.9rem + env(safe-area-inset-top, 0px));
  }

  .window-close {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .chat-topics {
    padding: 0.55rem 0.65rem 0.5rem;
    gap: 0.45rem;
  }

  .chat-topics__header {
    gap: 0.4rem;
  }

  .chat-topics__header .helper-copy {
    display: none;
  }

  .chat-topics__header .section-title {
    margin: 0;
    font-size: 0.78rem;
  }

  .chat-topic-create .btn-secondary {
    min-height: 38px;
    padding: 0.45rem 0.7rem;
    font-size: 0.78rem;
  }

  .chat-topic-create__input {
    min-height: 38px;
    padding: 0.55rem 0.7rem;
    font-size: 0.86rem;
  }

  .chat-topic-list {
    flex-wrap: nowrap;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
  }

  .chat-topic {
    flex: none;
    padding: 0.28rem 0.55rem;
  }

  .chat-topic__title {
    font-size: 0.72rem;
    max-width: 8.5rem;
  }

  .chat-topic__meta {
    display: none;
  }

  .chat-topic-current {
    display: none;
  }

  .chat-retention-note {
    display: none;
  }

  .chat-log {
    padding: 0.75rem 0.75rem 0.55rem;
  }

  .chat-compose__send,
  .chat-compose__image {
    width: 44px;
    height: 44px;
  }

  .chat-compose__input,
  .text-input {
    min-height: 44px;
    font-size: 16px;
  }

  .jamboard-canvas {
    min-height: 240px;
  }

  .jam-sticky__handle {
    min-height: 34px;
  }

  .jam-sticky__remove {
    width: 32px;
    height: 32px;
  }

  .panel-head,
  .shared-note__foot {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .nebula-workspace {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .rail-item__label {
    font-size: 0.5rem;
    max-width: 56px;
  }

  .rail-section-label {
    font-size: 0.48rem;
    letter-spacing: 0.04em;
  }

  .nebula-widget.is-open {
    width: calc(100% - 1rem) !important;
    margin: 0.5rem;
    max-height: min(85dvh, 640px);
    min-height: 0;
  }

  .chat-topics__header > div:first-child {
    display: none;
  }

  .chat-topic-create {
    grid-template-columns: 1fr auto;
  }

  .jamboard-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .jamboard-toolbar .btn-primary,
  .jamboard-toolbar .btn-secondary {
    width: 100%;
  }
}

.palette-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.palette-swatch {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  padding: 0.55rem 0.4rem;
  border: 1px solid var(--rail-border);
  border-radius: 12px;
  background: var(--rail-surface);
  color: var(--rail-text);
  cursor: pointer;
}

.palette-swatch:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--rail-border));
}

.palette-swatch.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.palette-swatch__preview {
  width: 100%;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.palette-swatch__label {
  font-size: 0.68rem;
  color: var(--rail-muted);
}

.palette-swatch--nebula .palette-swatch__preview {
  background: linear-gradient(135deg, #242638 0%, #4578e8 100%);
}

.palette-swatch--aurora .palette-swatch__preview {
  background: linear-gradient(135deg, #1a2824 0%, #2bb893 100%);
}

.palette-swatch--ember .palette-swatch__preview {
  background: linear-gradient(135deg, #2a201c 0%, #e86a3a 100%);
}

.palette-swatch--rose .palette-swatch__preview {
  background: linear-gradient(135deg, #281c28 0%, #d66eb8 100%);
}

.palette-swatch--slate .palette-swatch__preview {
  background: linear-gradient(135deg, #222630 0%, #7a95b8 100%);
}

.rail-section-label {
  margin: 0;
  padding: 0 0.15rem;
  border-top: none;
  text-align: center;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--rail-text) 68%, var(--rail-muted));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.helper-copy {
  margin: 0;
  color: var(--rail-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.admin-panel,
.jamboard-panel {
  gap: var(--block-gap);
}

.admin-list {
  display: grid;
  gap: var(--list-gap);
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--rail-border);
  border-radius: 12px;
  background: var(--rail-surface);
}

.admin-item__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.jamboard-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.jamboard-canvas {
  position: relative;
  min-height: 320px;
  border: 1px dashed var(--rail-border);
  border-radius: 14px;
  background-color: color-mix(in srgb, var(--rail-surface) 55%, transparent);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.jam-sticky {
  position: absolute;
  display: grid;
  gap: 0.35rem;
  padding: 0 0.7rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  color: #1f2430;
}

.jam-sticky.is-dragging {
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

.jam-sticky__handle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 -0.7rem 0.2rem;
  min-height: 28px;
  padding: 0.35rem 0.7rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.jam-sticky__handle::before {
  content: "";
  width: 30px;
  height: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.14);
}

.jam-sticky.is-dragging .jam-sticky__handle {
  cursor: grabbing;
}

.jam-sticky__remove {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  cursor: pointer;
  touch-action: manipulation;
}

.jam-sticky__text {
  width: 100%;
  border: none;
  background: transparent;
  resize: none;
  color: inherit;
  font: inherit;
  line-height: 1.4;
}

.jam-sticky__text:focus {
  outline: none;
}

.jam-sticky__author {
  font-size: 0.68rem;
  opacity: 0.72;
}

.palette-swatch--frost .palette-swatch__preview {
  background: linear-gradient(135deg, #edf3fc 0%, #1f5fd6 100%);
}

.browser-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
}

.browser-frame-wrap {
  flex: 1 1 auto;
  min-height: 220px;
  border: 1px solid var(--rail-border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.browser-frame {
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: 0;
  background: #fff;
}

.tree-scene {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--rail-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(120, 180, 120, 0.12), rgba(40, 80, 40, 0.08));
  min-height: 180px;
}

.tree-grove {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-height: 2rem;
}

.tree-planted {
  font-size: 1.2rem;
  line-height: 1;
}

.tree-planted--more {
  font-size: 0.78rem;
  color: var(--rail-muted);
  align-self: center;
}

.tree-growing {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  text-align: center;
}

.tree-growing__sprite {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

.tree-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.tree-progress__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5ecf7d, #2f9b57);
  transition: width 0.4s ease;
}

.tree-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.tree-stat {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.5rem;
  border: 1px solid var(--rail-border);
  border-radius: 12px;
  background: var(--rail-surface);
  text-align: center;
}

.tree-stat strong {
  font-size: 1rem;
  color: var(--rail-text);
}

.tree-stat span {
  font-size: 0.68rem;
  color: var(--rail-muted);
}

.tree-contributors {
  display: grid;
  gap: var(--list-gap);
}

.tree-contributor {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
}

.admin-app-toggles {
  display: grid;
  gap: var(--list-gap);
}

.admin-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--rail-border);
  border-radius: 12px;
  background: var(--rail-surface);
  color: var(--rail-text);
  font-size: 0.86rem;
}

.admin-toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.admin-section--danger {
  padding-top: var(--space-2);
  border-top: 1px solid rgba(255, 120, 120, 0.2);
}

.btn-danger {
  border-color: rgba(255, 120, 120, 0.45) !important;
  color: #ffd4d4 !important;
  background: rgba(255, 90, 90, 0.12) !important;
}

.btn-danger:hover {
  background: rgba(255, 90, 90, 0.2) !important;
}
