:root {
  --rose-50: #fff8fa;
  --rose-100: #ffe7ee;
  --rose-200: #f8c7d4;
  --rose-300: #ef9fb7;
  --rose-500: #cf5e82;
  --ink: #171319;
  --muted: #766b73;
  --glass: rgba(255, 255, 255, 0.64);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --stroke: rgba(44, 31, 41, 0.12);
  --shadow: 0 24px 70px rgba(50, 22, 38, 0.16);
  --mint: #bde7d5;
  --amber: #ffd7a8;
  --blue: #b9d7ff;
  --violet: #c9b7ff;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 228, 236, 0.92), transparent 30rem),
    radial-gradient(circle at 88% 4%, rgba(189, 231, 213, 0.56), transparent 22rem),
    linear-gradient(135deg, #fff8fa 0%, #ffe7ee 46%, #f6fbff 100%);
  transition: background 650ms ease, color 650ms ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

body.theme-afternoon {
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 238, 243, 0.96), transparent 30rem),
    radial-gradient(circle at 74% 9%, rgba(185, 215, 255, 0.5), transparent 25rem),
    linear-gradient(135deg, #fffdfb 0%, #ffdbe6 48%, #eef8ff 100%);
}

body.theme-evening {
  --glass: rgba(255, 245, 247, 0.58);
  --glass-strong: rgba(255, 250, 252, 0.78);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 191, 168, 0.72), transparent 26rem),
    radial-gradient(circle at 82% 0%, rgba(201, 183, 255, 0.48), transparent 26rem),
    linear-gradient(135deg, #fff3ee 0%, #ffc4d5 48%, #e9ddff 100%);
}

body.theme-night {
  --ink: #fff8fa;
  --muted: #d9cbd4;
  --glass: rgba(26, 21, 35, 0.62);
  --glass-strong: rgba(32, 25, 43, 0.78);
  --stroke: rgba(255, 255, 255, 0.14);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
  background:
    radial-gradient(circle at 18% 10%, rgba(207, 94, 130, 0.28), transparent 27rem),
    radial-gradient(circle at 78% 3%, rgba(185, 215, 255, 0.28), transparent 25rem),
    linear-gradient(135deg, #14121f 0%, #251b31 50%, #111827 100%);
}

body.weather-rain {
  background-blend-mode: screen, normal, normal;
}

body.weather-mist {
  filter: saturate(0.92);
}

#skyCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.sakura-silhouette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.72;
}

.branch {
  position: absolute;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(62, 39, 49, 0.24), rgba(62, 39, 49, 0));
  transform-origin: left center;
}

.branch::before,
.branch::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50% 50% 50% 12%;
  background: rgba(248, 199, 212, 0.72);
  box-shadow:
    18px -8px 0 rgba(255, 231, 238, 0.76),
    36px 6px 0 rgba(239, 159, 183, 0.62),
    55px -10px 0 rgba(255, 231, 238, 0.68);
}

.branch-one {
  top: 74px;
  left: -48px;
  width: 320px;
  transform: rotate(14deg);
}

.branch-two {
  top: 18vh;
  right: -78px;
  width: 390px;
  transform: rotate(160deg);
}

.branch-three {
  bottom: 72px;
  left: -120px;
  width: 380px;
  transform: rotate(-10deg);
  opacity: 0.38;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: 0 16px 50px rgba(80, 37, 62, 0.12);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(207, 94, 130, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.92) 0 34%, transparent 35%),
    linear-gradient(135deg, #ffdbe6, #f6fff9);
  box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.65), 0 10px 24px rgba(207, 94, 130, 0.18);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(207, 94, 130, 0.16);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0));
}

.mark-petal {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 11px;
  height: 18px;
  margin: -18px 0 0 -5.5px;
  border-radius: 70% 70% 70% 12%;
  background: linear-gradient(180deg, #fff8fa 0%, #f8c7d4 42%, #cf5e82 100%);
  transform-origin: 50% 100%;
  box-shadow: 0 4px 10px rgba(207, 94, 130, 0.2);
}

.petal-a {
  transform: rotate(0deg);
}

.petal-b {
  transform: rotate(72deg);
}

.petal-c {
  transform: rotate(144deg);
}

.petal-d {
  transform: rotate(216deg);
}

.petal-e {
  transform: rotate(288deg);
}

.mark-dot {
  position: relative;
  z-index: 2;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cf5e82;
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: 0;
}

.brand-copy small,
.identity-chip small,
.eyebrow,
.panel-heading span,
.metric-row span,
.safety-row span {
  color: var(--muted);
}

.petal-o {
  position: relative;
  display: inline-block;
  width: 0.58em;
  margin: 0 -0.01em;
  color: transparent;
}

.petal-o::before {
  content: "";
  position: absolute;
  left: 0.02em;
  top: 0.06em;
  width: 0.5em;
  height: 0.82em;
  border-radius: 70% 70% 70% 16%;
  background: linear-gradient(180deg, #fff8fa 0%, #ef9fb7 48%, #cf5e82 100%);
  transform: rotate(-24deg);
  box-shadow: 0 2px 8px rgba(207, 94, 130, 0.32);
}

.nav-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.35);
}

body.theme-night .nav-tabs {
  background: rgba(255, 255, 255, 0.06);
}

.nav-tabs button,
.segmented button,
.category-list button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  color: inherit;
  background: transparent;
}

.nav-tabs button {
  padding: 0 14px;
  white-space: nowrap;
}

.nav-tabs button.is-active,
.segmented button.is-active,
.category-list button.is-active {
  color: #591b32;
  background: var(--glass-strong);
  box-shadow: 0 9px 20px rgba(207, 94, 130, 0.14);
}

body.theme-night .nav-tabs button.is-active,
body.theme-night .segmented button.is-active,
body.theme-night .category-list button.is-active {
  color: #fff8fa;
  background: rgba(255, 255, 255, 0.16);
}

.identity-chip {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 286px;
  padding: 9px 12px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

body.theme-night .identity-chip {
  background: rgba(255, 255, 255, 0.08);
}

.identity-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff8fa, #f8c7d4 58%, #bde7d5);
  color: #7a2946;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.owner-entry {
  margin-left: auto;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--stroke);
  border-radius: 7px;
  color: inherit;
  background: rgba(255, 255, 255, 0.38);
  font-size: 0.78rem;
  font-weight: 800;
}

body.theme-night .owner-entry {
  background: rgba(255, 255, 255, 0.08);
}

main {
  padding: 20px 0 56px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.intro-band,
.dashboard-grid,
.compose-layout,
.admin-layout,
.control-layout,
.owner-tools-grid {
  display: grid;
  gap: 18px;
}

.intro-band {
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: stretch;
  min-height: 272px;
  margin-bottom: 18px;
}

.intro-copy,
.weather-card,
.glass-panel,
.composer-card,
.post-card,
.compose-panel {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.intro-copy {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: end;
  padding: clamp(24px, 5vw, 48px);
}

.intro-copy > * {
  position: relative;
  z-index: 1;
}

.intro-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.16)),
    radial-gradient(circle at 82% 20%, rgba(255, 215, 168, 0.42), transparent 17rem),
    radial-gradient(circle at 74% 82%, rgba(189, 231, 213, 0.38), transparent 16rem);
}

body.theme-night .intro-copy::before {
  background:
    linear-gradient(90deg, rgba(20, 18, 31, 0.72), rgba(20, 18, 31, 0.2)),
    radial-gradient(circle at 82% 20%, rgba(185, 215, 255, 0.18), transparent 17rem),
    radial-gradient(circle at 74% 82%, rgba(207, 94, 130, 0.18), transparent 16rem);
}

.hero-quote {
  position: absolute;
  top: clamp(72px, 12vh, 116px);
  left: clamp(24px, 5vw, 48px);
  right: clamp(24px, 6vw, 76px);
  z-index: 1;
  max-width: 820px;
  margin: 0;
  padding: 14px 18px 14px 46px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.36);
  box-shadow: 0 18px 44px rgba(207, 94, 130, 0.08);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: clamp(0.98rem, 1.35vw, 1.18rem);
  line-height: 1.52;
  backdrop-filter: blur(18px);
  transition: opacity 260ms ease, transform 260ms ease;
}

body.theme-night .hero-quote {
  background: rgba(255, 255, 255, 0.07);
}

.hero-quote::before {
  content: "“";
  position: absolute;
  left: 16px;
  top: 5px;
  color: rgba(207, 94, 130, 0.58);
  font-size: 2.4rem;
  line-height: 1;
}

.hero-quote.is-changing {
  opacity: 0.2;
  transform: translateY(4px);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: clamp(2.45rem, 5.2vw, 4.4rem);
  line-height: 0.95;
}

h2 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
}

.intro-copy p:not(.eyebrow),
.compose-panel > p,
.compose-aside p,
.admin-letter p,
.calm-panel p {
  max-width: 640px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.weather-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 24px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.2)),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.86), transparent 7rem);
}

.weather-card::before {
  content: "";
  position: absolute;
  inset: auto -22% -34% 16%;
  height: 58%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.5), transparent 42%),
    linear-gradient(135deg, rgba(248, 199, 212, 0.26), rgba(189, 231, 213, 0.18));
  pointer-events: none;
}

body.theme-night .weather-card {
  background:
    linear-gradient(160deg, rgba(36, 29, 48, 0.78), rgba(36, 29, 48, 0.38)),
    radial-gradient(circle at 72% 20%, rgba(255, 255, 255, 0.16), transparent 7rem);
}

.mood-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 146px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.92), transparent 4.4rem),
    linear-gradient(155deg, rgba(255, 248, 250, 0.64), rgba(248, 199, 212, 0.16));
  box-shadow: inset 0 0 42px rgba(255, 255, 255, 0.34);
}

.window-pane {
  position: absolute;
  inset: 10px;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08) 62%, transparent),
    radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.44), transparent 4.6rem);
  box-shadow: inset 0 0 26px rgba(255, 255, 255, 0.28);
}

.garden-ground {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  z-index: 3;
  height: 52px;
  border-radius: 0 0 8px 8px;
  background:
    radial-gradient(circle at 22% 40%, rgba(255, 248, 250, 0.9) 0 3px, transparent 4px),
    radial-gradient(circle at 33% 56%, rgba(239, 159, 183, 0.58) 0 4px, transparent 5px),
    radial-gradient(circle at 74% 44%, rgba(255, 248, 250, 0.8) 0 3px, transparent 4px),
    linear-gradient(180deg, rgba(255, 231, 238, 0), rgba(189, 231, 213, 0.38) 34%, rgba(248, 199, 212, 0.34));
  pointer-events: none;
}

.garden-ground::before,
.garden-ground::after {
  content: "";
  position: absolute;
  bottom: 3px;
  width: 70px;
  height: 26px;
  border-radius: 50% 50% 0 0;
  background: radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.52), transparent 4px), rgba(189, 231, 213, 0.22);
}

.garden-ground::before {
  left: 18px;
}

.garden-ground::after {
  right: 12px;
}

body.theme-night .garden-ground {
  background:
    radial-gradient(circle at 22% 40%, rgba(255, 248, 250, 0.48) 0 3px, transparent 4px),
    radial-gradient(circle at 33% 56%, rgba(239, 159, 183, 0.34) 0 4px, transparent 5px),
    radial-gradient(circle at 74% 44%, rgba(185, 215, 255, 0.42) 0 3px, transparent 4px),
    linear-gradient(180deg, rgba(20, 18, 31, 0), rgba(62, 82, 82, 0.34) 34%, rgba(207, 94, 130, 0.18));
}

.window-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 75% 22%, rgba(255, 215, 168, 0.5), transparent 3.2rem),
    radial-gradient(circle at 38% 56%, rgba(248, 199, 212, 0.48), transparent 4.6rem);
}

body.theme-night .mood-visual {
  background:
    radial-gradient(circle at 72% 24%, rgba(185, 215, 255, 0.36), transparent 4.4rem),
    linear-gradient(155deg, rgba(20, 18, 31, 0.55), rgba(207, 94, 130, 0.14));
}

body.theme-night .window-glow {
  background:
    radial-gradient(circle at 76% 24%, rgba(185, 215, 255, 0.38), transparent 3.2rem),
    radial-gradient(circle at 38% 56%, rgba(207, 94, 130, 0.24), transparent 4.6rem);
}

body.weather-rain .mood-visual::after {
  content: "";
  position: absolute;
  inset: -20px;
  z-index: 4;
  pointer-events: none;
  background-image:
    linear-gradient(110deg, transparent 0 42%, rgba(185, 215, 255, 0.62) 43% 45%, transparent 46%),
    linear-gradient(110deg, transparent 0 58%, rgba(185, 215, 255, 0.42) 59% 60%, transparent 61%);
  background-size: 46px 78px, 72px 96px;
  animation: rainSheet 1.1s linear infinite;
}

.mood-orb {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff, #ffd7a8 62%, rgba(255, 215, 168, 0.12) 63%);
  box-shadow: 0 0 36px rgba(255, 215, 168, 0.54);
}

body.theme-night .mood-orb {
  background: radial-gradient(circle at 34% 30%, #fff, #b9d7ff 64%, rgba(185, 215, 255, 0.12) 65%);
  box-shadow: 0 0 36px rgba(185, 215, 255, 0.42);
}

.mood-petal {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 18px;
  height: 31px;
  margin-top: -31px;
  margin-left: -9px;
  border-radius: 70% 70% 70% 14%;
  background: linear-gradient(180deg, #fff8fa, #ef9fb7);
  box-shadow: 0 8px 18px rgba(207, 94, 130, 0.18);
  transform-origin: 50% 100%;
}

.mood-petal-one {
  transform: rotate(0deg);
}

.mood-petal-two {
  transform: rotate(72deg);
}

.mood-petal-three {
  transform: rotate(144deg);
}

.mood-petal-four {
  transform: rotate(216deg);
}

.mood-petal-five {
  transform: rotate(288deg);
}

.mood-center {
  position: relative;
  z-index: 5;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cf5e82;
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.62),
    0 10px 22px rgba(207, 94, 130, 0.24);
}

.mood-ring {
  position: absolute;
  z-index: 2;
  width: 108px;
  height: 108px;
  border: 1px dashed rgba(207, 94, 130, 0.24);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0));
}

.window-rain {
  position: absolute;
  z-index: 4;
  top: -28px;
  width: 2px;
  height: 46px;
  border-radius: 999px;
  background: rgba(185, 215, 255, 0.72);
  opacity: 0;
  transform: rotate(18deg);
  animation: windowRain 1.3s linear infinite;
}

.rain-one {
  left: 36%;
}

.rain-two {
  left: 58%;
  animation-delay: -0.7s;
}

.rain-three {
  left: 78%;
  animation-delay: -1.2s;
}

body.weather-rain .window-rain {
  opacity: 0.95;
}

.flow-petal {
  position: absolute;
  z-index: 5;
  left: -24px;
  width: 12px;
  height: 20px;
  border-radius: 70% 70% 70% 14%;
  background: linear-gradient(180deg, #fff8fa, #ef9fb7);
  box-shadow: 0 7px 14px rgba(207, 94, 130, 0.18);
  animation: flowPetal 8s cubic-bezier(0.45, 0, 0.32, 1) infinite;
}

.flow-one {
  top: 30px;
  animation-delay: -1s;
}

.flow-two {
  top: 66px;
  animation-delay: -3.2s;
  transform: scale(0.82);
}

.flow-three {
  top: 96px;
  animation-delay: -5.4s;
  transform: scale(0.72);
}

.flow-four {
  top: 48px;
  animation-delay: -6.6s;
  transform: scale(0.64);
}

.flow-five {
  top: 78px;
  animation-delay: -2.1s;
  transform: scale(0.5);
}

.flow-six {
  top: 112px;
  animation-delay: -4.7s;
  transform: scale(0.58);
}

.memory-bubble {
  position: absolute;
  left: 134px;
  bottom: 90px;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 24px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  opacity: 0.86;
  scale: 0.76;
  transform-origin: 25% 100%;
  animation: thoughtFloat 4.2s ease-in-out infinite;
  backdrop-filter: blur(10px);
}

.memory-bubble::before,
.memory-bubble::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.48);
}

.memory-bubble::before {
  left: 1px;
  right: auto;
  bottom: -7px;
  width: 6px;
  height: 6px;
}

.memory-bubble::after {
  left: -6px;
  right: auto;
  bottom: -13px;
  width: 4px;
  height: 4px;
}

.memory-bubble span {
  width: 8px;
  height: 12px;
  border-radius: 70% 70% 70% 14%;
  background: linear-gradient(180deg, #fff8fa, #ef9fb7);
  transform: rotate(-26deg);
}

.cartoon-boy {
  position: absolute;
  left: 113px;
  bottom: 17px;
  z-index: 9;
  width: 56px;
  height: 78px;
  scale: 0.62;
  transform-origin: 50% 78%;
  animation: boyBreathe 3.2s ease-in-out infinite;
}

.boy-head {
  position: absolute;
  left: 17px;
  top: 0;
  width: 31px;
  height: 32px;
  border-radius: 48% 48% 46% 46%;
  background: #ffd7c3;
  box-shadow:
    inset -4px -3px 0 rgba(188, 104, 92, 0.1),
    0 5px 14px rgba(80, 37, 62, 0.18);
}

.boy-hair {
  position: absolute;
  left: -2px;
  top: -5px;
  width: 34px;
  height: 18px;
  border-radius: 50% 55% 36% 30%;
  background: #2c2128;
  transform-origin: 88% 60%;
  animation: hairWind 1.9s ease-in-out infinite;
}

.boy-hair::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 6px;
  width: 12px;
  height: 7px;
  border-radius: 60% 20% 70% 20%;
  background: #2c2128;
  transform: rotate(25deg);
}

.boy-face {
  position: absolute;
  inset: 0;
}

.boy-eye {
  position: absolute;
  top: 17px;
  width: 3px;
  height: 5px;
  border-radius: 999px;
  background: #49323a;
  animation: softBlink 5s infinite;
}

.eye-left {
  left: 9px;
}

.eye-right {
  right: 9px;
}

.boy-blush {
  position: absolute;
  left: 8px;
  bottom: 7px;
  width: 16px;
  height: 4px;
  border-radius: 999px;
  background: rgba(239, 159, 183, 0.5);
  box-shadow: 14px 0 0 rgba(239, 159, 183, 0.32);
}

.boy-body {
  position: absolute;
  left: 15px;
  top: 29px;
  width: 32px;
  height: 31px;
  border-radius: 14px 14px 8px 8px;
}

.boy-shirt {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, #fff7bf, #ffd7a8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.46);
}

body.theme-afternoon .boy-shirt {
  background: linear-gradient(160deg, #bde7d5, #fff8fa);
}

body.theme-evening .boy-shirt {
  background: linear-gradient(160deg, #ffd7a8, #ef9fb7);
}

body.theme-night .boy-shirt {
  background: linear-gradient(160deg, #c9b7ff, #4a3a61);
}

.boy-scarf {
  position: absolute;
  left: 15px;
  top: 32px;
  z-index: 2;
  width: 42px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef9fb7, rgba(239, 159, 183, 0));
  transform-origin: 12px center;
  animation: scarfWind 1.4s ease-in-out infinite;
}

body.weather-rain .boy-scarf {
  background: linear-gradient(90deg, #b9d7ff, rgba(185, 215, 255, 0));
}

.boy-arm {
  position: absolute;
  top: 6px;
  width: 8px;
  height: 22px;
  border-radius: 999px;
  background: #ffd7c3;
}

.arm-left {
  left: -5px;
  transform: rotate(18deg);
}

.arm-right {
  right: -6px;
  transform: rotate(-32deg);
}

.boy-leg {
  position: absolute;
  top: 58px;
  width: 8px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, #273141, #171319);
  transform-origin: top center;
}

.leg-left {
  left: 20px;
  animation: legSwingLeft 2.2s ease-in-out infinite;
}

.leg-right {
  left: 34px;
  animation: legSwingRight 2.2s ease-in-out infinite;
}

.boy-leg::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -4px;
  width: 13px;
  height: 6px;
  border-radius: 999px;
  background: #fff8fa;
}

.boy-umbrella {
  position: absolute;
  left: 2px;
  top: -18px;
  z-index: -1;
  width: 66px;
  height: 34px;
  border-radius: 70px 70px 10px 10px;
  background:
    radial-gradient(circle at 50% 100%, transparent 0 11px, rgba(255, 255, 255, 0.42) 12px),
    linear-gradient(135deg, #b9d7ff, #fff8fa 58%, #ef9fb7);
  opacity: 0;
  transform: translateY(8px) rotate(-8deg);
  box-shadow: 0 10px 24px rgba(185, 215, 255, 0.22);
  transition: opacity 220ms ease, transform 220ms ease;
}

.boy-umbrella::after {
  content: "";
  position: absolute;
  left: 32px;
  top: 28px;
  width: 2px;
  height: 36px;
  background: rgba(62, 39, 49, 0.45);
  transform: rotate(8deg);
}

body.weather-rain .boy-umbrella {
  opacity: 1;
  transform: translateY(0) rotate(-8deg);
}

body.weather-rain .cartoon-boy {
  animation-name: boyRainHuddle;
}

body.weather-rain .memory-bubble {
  opacity: 0.52;
}

body.weather-mist .window-pane {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08) 62%, transparent),
    radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.46), transparent 5.4rem);
}

body.motion-paused .window-rain,
body.motion-paused .flow-petal,
body.motion-paused .cartoon-boy,
body.motion-paused .boy-hair,
body.motion-paused .boy-scarf,
body.motion-paused .boy-leg,
body.motion-paused .memory-bubble {
  animation-play-state: paused;
}

@keyframes flowPetal {
  0% {
    opacity: 0;
    transform: translate(-12px, 0) rotate(-18deg) scale(0.82);
  }
  12% {
    opacity: 0.95;
  }
  54% {
    transform: translate(132px, 18px) rotate(116deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(270px, -8px) rotate(224deg) scale(0.76);
  }
}

@keyframes windowRain {
  0% {
    transform: translateY(-36px) rotate(18deg);
  }
  100% {
    transform: translateY(190px) rotate(18deg);
  }
}

@keyframes rainSheet {
  0% {
    background-position: 0 0, 18px 0;
  }
  100% {
    background-position: -60px 98px, -42px 126px;
  }
}

@keyframes boyBreathe {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-2px) rotate(1deg);
  }
}

@keyframes boyRainHuddle {
  0%, 100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-1px) rotate(-2deg);
  }
}

@keyframes hairWind {
  0%, 100% {
    transform: skewX(0deg);
  }
  50% {
    transform: skewX(-12deg) translateX(1px);
  }
}

@keyframes scarfWind {
  0%, 100% {
    transform: rotate(4deg) scaleX(0.9);
  }
  50% {
    transform: rotate(-7deg) scaleX(1.14);
  }
}

@keyframes softBlink {
  0%, 92%, 100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.15);
  }
}

@keyframes legSwingLeft {
  0%, 100% {
    transform: rotate(6deg);
  }
  50% {
    transform: rotate(-8deg);
  }
}

@keyframes legSwingRight {
  0%, 100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(9deg);
  }
}

@keyframes thoughtFloat {
  0%, 100% {
    opacity: 0.72;
    transform: translate(0, 0) scale(0.92);
  }
  50% {
    opacity: 0.96;
    transform: translate(-3px, -6px) scale(1);
  }
}

.weather-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.weather-copy span,
.mood-note small,
.mood-stats small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.weather-card > .weather-copy > strong {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: 2.1rem;
  line-height: 1;
}

.weather-card small {
  color: var(--muted);
}

.mood-note {
  position: relative;
  z-index: 1;
  padding: 13px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
}

body.theme-night .mood-note {
  background: rgba(255, 255, 255, 0.07);
}

.mood-note p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.mood-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.mood-stats span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--stroke);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.34);
}

body.theme-night .mood-stats span {
  background: rgba(255, 255, 255, 0.08);
}

.mood-stats small {
  font-size: 0.68rem;
}

.mood-stats strong {
  font-size: 0.9rem;
}

.dashboard-grid {
  grid-template-columns: 270px minmax(0, 1fr) 300px;
  align-items: start;
}

.side-stack {
  display: grid;
  gap: 14px;
}

.glass-panel {
  padding: 18px;
}

.panel-heading,
.admin-title,
.metric-row,
.safety-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading {
  margin-bottom: 14px;
}

.panel-heading strong {
  font-size: 0.94rem;
}

.bloom-tree-panel p,
.admin-letter p {
  margin-bottom: 0;
}

.bloom-tree-panel {
  overflow: hidden;
}

.bloom-tree {
  position: relative;
  min-height: 260px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.96), transparent 4.6rem),
    radial-gradient(circle at 22% 22%, rgba(255, 231, 238, 0.72), transparent 5.8rem),
    linear-gradient(155deg, rgba(255, 248, 250, 0.72), rgba(248, 199, 212, 0.26), rgba(189, 231, 213, 0.14));
  box-shadow: inset 0 -28px 48px rgba(207, 94, 130, 0.08);
}

body.theme-night .bloom-tree {
  background:
    radial-gradient(circle at 82% 12%, rgba(185, 215, 255, 0.34), transparent 4.6rem),
    radial-gradient(circle at 22% 22%, rgba(207, 94, 130, 0.2), transparent 5.8rem),
    linear-gradient(155deg, rgba(20, 18, 31, 0.5), rgba(207, 94, 130, 0.16));
}

.tree-atmosphere {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  background:
    radial-gradient(circle at 80% 14%, rgba(255, 215, 168, 0.54), transparent 2.4rem),
    radial-gradient(circle at 28% 76%, rgba(255, 248, 250, 0.5), transparent 4rem);
}

.tree-illustration {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 18px 20px rgba(80, 37, 62, 0.12));
}

.tree-shadow {
  fill: rgba(80, 37, 62, 0.16);
}

.tree-hill {
  fill: url(#treeHill);
  opacity: 0.72;
}

.tree-trunk-shape {
  fill: url(#treeBark);
  opacity: 0.9;
}

.tree-branch-svg {
  fill: none;
  stroke: url(#treeBark);
  stroke-linecap: round;
  opacity: 0.92;
}

.branch-wide {
  stroke-width: 12;
}

.branch-top {
  stroke-width: 7;
}

.branch-low,
.branch-left {
  stroke-width: 6;
  opacity: 0.78;
}

.tree-clouds circle {
  fill: rgba(255, 231, 238, 0.78);
  stroke: rgba(255, 255, 255, 0.68);
  stroke-width: 1.2;
}

.tree-clouds circle:nth-child(2n) {
  fill: rgba(248, 199, 212, 0.72);
}

.tree-clouds circle:nth-child(3n) {
  fill: rgba(255, 248, 250, 0.86);
}

.tree-blossom-dots circle,
.tree-sparkles circle {
  fill: rgba(255, 255, 255, 0.82);
}

body.theme-night .tree-clouds circle {
  fill: rgba(248, 199, 212, 0.5);
  stroke: rgba(255, 248, 250, 0.16);
}

body.theme-night .tree-clouds circle:nth-child(3n) {
  fill: rgba(255, 248, 250, 0.38);
}

.tree-petals {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.tree-petal {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(13px * var(--s));
  height: calc(20px * var(--s));
  border: 0;
  border-radius: 70% 70% 70% 14%;
  background: linear-gradient(180deg, #fff8fa, var(--petal-color, #ef9fb7));
  box-shadow:
    0 8px 16px rgba(207, 94, 130, 0.18),
    7px 6px 0 -5px rgba(255, 248, 250, 0.9),
    -6px 8px 0 -6px rgba(248, 199, 212, 0.82);
  transform: translate(-50%, -50%) rotate(var(--r));
  transition: transform 180ms ease, filter 180ms ease;
}

.tree-petal:hover {
  filter: brightness(1.04);
  transform: translate(-50%, -50%) rotate(var(--r)) scale(1.12);
}

.tree-petal:focus-visible {
  outline: 3px solid rgba(207, 94, 130, 0.38);
  outline-offset: 3px;
}

.tree-petal.growth {
  --petal-color: #bde7d5;
}

.tree-petal.memory {
  --petal-color: #ef9fb7;
}

.tree-petal.quiet {
  --petal-color: #c9b7ff;
}

.tree-petal.life {
  --petal-color: #ffd7a8;
}

.fallen-petal {
  position: absolute;
  z-index: 3;
  bottom: 16px;
  width: 12px;
  height: 19px;
  border-radius: 70% 70% 70% 14%;
  background: linear-gradient(180deg, #fff8fa, #ef9fb7);
  opacity: 0.78;
}

.fall-one {
  left: 122px;
  transform: rotate(62deg);
}

.fall-two {
  left: 172px;
  bottom: 24px;
  transform: rotate(-28deg);
}

.fall-three {
  left: 74px;
  bottom: 18px;
  transform: rotate(118deg);
  opacity: 0.58;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-list button {
  width: 100%;
  padding: 0 12px;
  text-align: left;
}

.policy-panel ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
  line-height: 1.45;
}

.policy-panel li {
  position: relative;
  padding-left: 18px;
}

.policy-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose-300);
}

.feed-column {
  min-width: 0;
}

.story-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.story-rail button {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  color: inherit;
  background: var(--glass);
  box-shadow: 0 12px 36px rgba(50, 22, 38, 0.1);
  backdrop-filter: blur(18px);
}

.story-ring {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    linear-gradient(var(--rose-50), var(--rose-50)) padding-box,
    linear-gradient(135deg, var(--rose-300), var(--mint), var(--amber)) border-box;
  border: 2px solid transparent;
}

.composer-card {
  padding: 10px;
  margin-bottom: 14px;
}

.composer-trigger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 7px;
  color: inherit;
  background: rgba(255, 255, 255, 0.32);
  text-align: left;
}

body.theme-night .composer-trigger {
  background: rgba(255, 255, 255, 0.06);
}

.composer-trigger span:nth-child(2) {
  color: var(--muted);
}

.composer-trigger strong {
  padding: 10px 14px;
  border-radius: 7px;
  background: #171319;
  color: #fff8fa;
}

body.theme-night .composer-trigger strong {
  background: #fff8fa;
  color: #171319;
}

.feed-list {
  display: grid;
  gap: 14px;
}

.post-card {
  overflow: hidden;
}

.post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
}

.author-row {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.author-row strong,
.author-row small {
  display: block;
}

.author-row small,
.post-expiry,
.post-room,
.comment small {
  color: var(--muted);
}

.post-room {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.post-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 32px);
  min-height: 250px;
  margin: 0 16px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  color: inherit;
  background: rgba(255, 255, 255, 0.26);
}

.post-media:focus-visible {
  outline: 3px solid rgba(207, 94, 130, 0.5);
  outline-offset: 3px;
}

.post-media.uploaded {
  min-height: 0;
  background:
    linear-gradient(135deg, rgba(255, 248, 250, 0.76), rgba(248, 199, 212, 0.22)),
    rgba(23, 19, 25, 0.06);
}

body.theme-night .post-media.uploaded {
  background: rgba(255, 255, 255, 0.08);
}

.post-media.uploaded img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(680px, 72vh);
  object-fit: contain;
}

.post-art {
  position: relative;
  display: block;
  width: 100%;
  min-height: 250px;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.72), transparent 8rem),
    linear-gradient(135deg, rgba(248, 199, 212, 0.92), rgba(189, 231, 213, 0.72));
}

.post-art.memory {
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.78), transparent 8rem),
    linear-gradient(135deg, #ffdfeb, #dff7ff 52%, #ffe1be);
}

.post-art.growth {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.8), transparent 8rem),
    linear-gradient(135deg, #dff8ea, #ffdce8 58%, #fff6c9);
}

.post-art.quiet {
  background:
    radial-gradient(circle at 74% 18%, rgba(255, 255, 255, 0.22), transparent 8rem),
    linear-gradient(135deg, #1c1930, #4a2f56 58%, #87506a);
}

.post-art.life {
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.74), transparent 7rem),
    linear-gradient(135deg, #fff5d8, #ffd8e5 58%, #bde7d5);
}

.post-art::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
}

.post-art::after {
  content: "Bloomlog";
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: rgba(23, 19, 25, 0.38);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: clamp(2rem, 8vw, 5.4rem);
}

.post-art.quiet::after {
  color: rgba(255, 248, 250, 0.4);
}

.post-body {
  padding: 16px;
}

.post-body p {
  margin-bottom: 14px;
  font-size: 1.02rem;
  line-height: 1.62;
}

.reaction-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.reaction-row button {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: inherit;
  background: rgba(255, 255, 255, 0.42);
}

body.theme-night .reaction-row button {
  background: rgba(255, 255, 255, 0.08);
}

.reaction-row button.is-active {
  border-color: rgba(207, 94, 130, 0.36);
  background: rgba(248, 199, 212, 0.44);
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.comment-action,
.soft-action,
.primary-action,
.modal-close,
.mod-list button {
  min-height: 42px;
  border-radius: 7px;
}

.comment-action,
.soft-action,
.mod-list button {
  border: 1px solid var(--stroke);
  color: inherit;
  background: rgba(255, 255, 255, 0.38);
}

body.theme-night .comment-action,
body.theme-night .soft-action,
body.theme-night .mod-list button {
  background: rgba(255, 255, 255, 0.08);
}

.comment-action,
.soft-action {
  padding: 0 14px;
}

.primary-action {
  border: 0;
  padding: 0 18px;
  color: #fff8fa;
  background: #171319;
  box-shadow: 0 12px 28px rgba(23, 19, 25, 0.18);
}

body.theme-night .primary-action {
  color: #171319;
  background: #fff8fa;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
}

.weather-segment {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 8px;
}

.motion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  color: inherit;
  background: rgba(255, 255, 255, 0.34);
}

body.theme-night .motion-toggle {
  background: rgba(255, 255, 255, 0.08);
}

.motion-toggle span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.motion-toggle strong {
  font-size: 0.9rem;
}

body.motion-paused #skyCanvas {
  opacity: 0.32;
}

.safety-panel {
  display: grid;
  gap: 11px;
}

.safety-row,
.metric-row {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--stroke);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.22);
}

body.theme-night .safety-row,
body.theme-night .metric-row {
  background: rgba(255, 255, 255, 0.06);
}

.compose-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
}

.compose-panel {
  padding: clamp(22px, 4vw, 42px);
}

.compose-panel form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.compose-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

select,
textarea,
input[type="text"],
input[type="password"] {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  outline: none;
}

select,
input[type="text"],
input[type="password"] {
  min-height: 48px;
  padding: 0 14px;
}

textarea {
  resize: vertical;
  min-height: 180px;
  padding: 14px;
  line-height: 1.6;
}

body.theme-night select,
body.theme-night textarea,
body.theme-night input[type="text"],
body.theme-night input[type="password"] {
  background: rgba(255, 255, 255, 0.08);
  color: #fff8fa;
}

.image-picker {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 14px;
}

.upload-tile,
.image-preview {
  min-height: 132px;
  border: 1px dashed rgba(207, 94, 130, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.3);
}

.upload-tile {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--ink);
  cursor: pointer;
}

.upload-tile input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-tile span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff8fa;
  background: #171319;
  font-size: 1.8rem;
  line-height: 1;
}

.image-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  padding: 10px;
}

.image-preview.has-image span {
  display: none;
}

.image-preview img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 7px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compose-aside {
  position: sticky;
  top: 116px;
}

.mini-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.mini-rules span {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--muted);
}

.admin-layout,
.control-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.52fr);
}

.admin-inbox,
.moderation-panel,
.control-panel,
.metrics-panel,
.public-safety-card,
.gate-panel,
.word-panel,
.reports-panel,
.cleanup-panel,
.letter-editor-panel,
.safety-preview-card {
  padding: clamp(20px, 4vw, 36px);
}

.admin-title {
  align-items: end;
  margin-bottom: 22px;
}

.admin-title h2 {
  max-width: 760px;
  margin-bottom: 0;
}

.message-thread {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.message {
  width: min(520px, 92%);
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
}

.message p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.message.admin {
  justify-self: end;
  background: rgba(248, 199, 212, 0.34);
}

.admin-message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.public-safety-card,
.gate-panel,
.word-panel,
.reports-panel,
.cleanup-panel,
.letter-editor-panel,
.safety-preview-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.safety-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.safety-preview span,
.word-list button {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.28);
  font-weight: 800;
}

body.theme-night .safety-preview span,
body.theme-night .word-list button {
  background: rgba(255, 255, 255, 0.07);
}

.owner-gate {
  display: grid;
  place-items: center;
  min-height: 56vh;
}

.gate-panel {
  width: min(680px, 100%);
}

.owner-gate-form,
.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.owner-dashboard.is-locked,
.owner-gate.is-unlocked {
  display: none;
}

.owner-topline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.owner-topline h2,
.owner-topline p {
  margin-bottom: 0;
}

.mod-list {
  display: grid;
  gap: 12px;
}

.mod-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.25);
}

.mod-list small {
  color: var(--muted);
}

.mod-list button {
  padding: 0 12px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.status-dot.warn {
  background: #ffb15c;
}

.status-dot.danger {
  background: #cf5e82;
}

.status-dot.ok {
  background: #6abb92;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.owner-tools-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  margin-top: 18px;
}

.switch-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.26);
}

.switch-card input {
  width: 22px;
  height: 22px;
  accent-color: #cf5e82;
}

.switch-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.control-select {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-weight: 800;
}

.word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-list button {
  border-radius: 999px;
  color: inherit;
  cursor: pointer;
}

.report-list {
  display: grid;
  gap: 10px;
}

.report-list article {
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.25);
}

.report-list small,
.cleanup-panel small {
  color: var(--muted);
}

.storage-meter {
  overflow: hidden;
  height: 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.storage-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #bde7d5, #f8c7d4 58%, #ffd7a8);
}

.letter-editor-panel textarea {
  min-height: 130px;
}

.metrics-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.post-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
}

.post-modal.is-open {
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 19, 25, 0.42);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100vw - 28px));
  max-height: min(860px, 90vh);
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--glass-strong);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(24px);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 42px;
  padding: 0;
  border: 1px solid var(--stroke);
  color: inherit;
  background: rgba(255, 255, 255, 0.6);
  font-size: 1.4rem;
}

.modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.78fr);
  min-height: min(720px, 88vh);
}

.modal-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(720px, 88vh);
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 248, 250, 0.18), transparent 13rem),
    #171319;
}

.modal-media.uploaded img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(720px, 88vh);
  object-fit: contain;
}

.modal-media .post-art {
  min-height: min(720px, 88vh);
  border-radius: 0;
}

.modal-side {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  max-height: min(720px, 88vh);
  padding: 22px;
  overflow: auto;
}

.modal-side .post-head {
  padding: 0 54px 16px 0;
}

.modal-caption {
  margin-bottom: 16px;
  line-height: 1.62;
}

.comments {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.comment {
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
}

.comment p {
  margin-bottom: 0;
  color: var(--muted);
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 40px));
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  backdrop-filter: blur(20px);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .nav-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .identity-chip {
    justify-self: start;
  }

  .dashboard-grid,
  .compose-layout,
  .admin-layout,
  .control-layout,
  .owner-tools-grid {
    grid-template-columns: 1fr;
  }

  .right-stack,
  .compose-aside {
    position: static;
  }

  .side-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 10px;
  }

  .topbar {
    top: 8px;
    padding: 10px;
  }

  .nav-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(84px, 1fr));
  }

  .nav-tabs button {
    padding: 0 10px;
  }

  .identity-chip {
    width: 100%;
  }

  .intro-band {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .intro-copy {
    min-height: 380px;
  }

  .hero-quote {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin-bottom: 18px;
    padding: 12px 14px 12px 40px;
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 4rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .side-stack {
    grid-template-columns: 1fr;
  }

  .story-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-head,
  .post-actions,
  .panel-heading,
  .admin-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-media,
  .post-art {
    min-height: 210px;
  }

  .post-media.uploaded img {
    max-height: 72vh;
  }

  .modal-card {
    width: min(100%, calc(100vw - 16px));
    max-height: 92vh;
  }

  .modal-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .modal-media,
  .modal-media .post-art {
    min-height: 280px;
  }

  .modal-media.uploaded img {
    max-height: 62vh;
  }

  .modal-side {
    max-height: none;
    padding: 18px;
  }

  .modal-side .post-head {
    padding-right: 52px;
  }

  .reaction-row button {
    flex: 1 1 calc(50% - 8px);
  }

  .image-picker,
  .admin-message-form,
  .owner-gate-form,
  .inline-form,
  .comment-form,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .owner-topline {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-action,
  .soft-action {
    width: 100%;
  }

  .mod-list article {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mod-list button {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  #skyCanvas {
    display: none;
  }
}
