:root {
  --bg: #07080a;
  --panel: rgba(14, 18, 24, 0.58);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f2eee6;
  --muted: #9b968c;
  --accent: #d6f25c;
  --accent-ink: #12140a;
  --radius: 20px;
  --font-display: "Syne", sans-serif;
  --font-heading: "Manrope", sans-serif;
  --font-body: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(40, 70, 100, 0.18), transparent 55%),
    var(--bg);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(10, 14, 18, 0.58);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 0;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.35rem;
}

.nav {
  display: flex;
  gap: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

/* Hide admin-only nav until role is known; html.is-admin from boot.js avoids flicker. */
html:not(.is-admin) [data-admin-only] {
  display: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  transition: transform 0.25s ease, background 0.25s ease;
}

.btn[hidden] {
  display: none !important;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.hero {
  position: relative;
  min-height: min(78vh, 740px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: transparent;
  padding: 0 0 1.25rem;
}

/* Atmosphere: cropped top panel with fade — not full-screen wallpaper */
.atmosphere {
  --spot-photo: url("/assets/bg/bg-beam.jpg");
  position: fixed;
  inset: 0 0 auto;
  height: min(42vh, 460px);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}

.atmosphere::before {
  content: "";
  position: absolute;
  inset: 0.75rem 0.75rem auto;
  height: calc(100% - 0.75rem);
  border-radius: 22px;
  background-color: #0a1016;
  background-image: var(--spot-photo);
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  filter: saturate(1.05) contrast(1.02) brightness(0.92);
  opacity: 0.5;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0.75rem 0.75rem auto;
  height: calc(100% - 0.75rem);
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(7, 8, 10, 0.2) 0%,
    rgba(7, 8, 10, 0.55) 55%,
    rgba(7, 8, 10, 0.95) 100%
  );
  pointer-events: none;
}

.atmosphere--home {
  display: none;
}

.atmosphere--login {
  --spot-photo: url("/assets/bg/bg-beam.jpg");
}

.atmosphere--search {
  --spot-photo: url("/assets/bg/bg-archive.jpg");
}

.atmosphere--search::before {
  background-position: 70% 18%;
  filter: saturate(1.12) contrast(1.06) brightness(0.86) hue-rotate(-12deg);
}

.atmosphere--search::after {
  background:
    radial-gradient(ellipse 70% 55% at 75% 15%, rgba(56, 120, 170, 0.28), transparent 60%),
    linear-gradient(
      180deg,
      rgba(6, 12, 18, 0.22) 0%,
      rgba(6, 9, 12, 0.58) 52%,
      rgba(7, 8, 10, 0.96) 100%
    );
}

.atmosphere--event {
  --spot-photo: url("/assets/bg/bg-stage.jpg");
}

.atmosphere--about {
  --spot-photo: url("/assets/bg/bg-about.jpg");
}

.atmosphere--about::before {
  background-position: 30% 55%;
  filter: saturate(0.98) contrast(1.03) brightness(0.9) hue-rotate(22deg);
}

.atmosphere--about::after {
  background:
    radial-gradient(ellipse 65% 50% at 25% 40%, rgba(110, 90, 160, 0.26), transparent 62%),
    linear-gradient(
      180deg,
      rgba(10, 8, 16, 0.24) 0%,
      rgba(8, 7, 12, 0.58) 55%,
      rgba(7, 8, 10, 0.96) 100%
    );
}

.atmosphere--cabinet {
  --spot-photo: url("/assets/bg/bg-cabinet.jpg");
}

.atmosphere--admin {
  --spot-photo: url("/assets/bg/bg-admin.jpg");
}

.atmosphere--admin::before {
  background-position: 50% 78%;
  filter: saturate(1.18) contrast(1.1) brightness(0.82) hue-rotate(-26deg);
}

.atmosphere--admin::after {
  background:
    radial-gradient(ellipse 60% 48% at 50% 20%, rgba(40, 90, 70, 0.22), transparent 58%),
    linear-gradient(
      180deg,
      rgba(5, 10, 12, 0.28) 0%,
      rgba(5, 8, 10, 0.62) 50%,
      rgba(7, 8, 10, 0.97) 100%
    );
}

.spotlight-bg {
  display: none;
}

body > .top,
body > .hero,
body > .section,
body > main,
body > .footer {
  position: relative;
  z-index: 1;
}

.hero-stage {
  position: absolute;
  inset: 0.75rem;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  z-index: 0;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: stage-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-media {
  position: absolute;
  inset: -4%;
  background-color: #0a1016;
  background-image: url("/assets/bg/bg-beam.jpg");
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  filter: saturate(1.08) contrast(1.03) brightness(1.02);
  transform: scale(1.04);
  animation: drift 36s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      105deg,
      rgba(7, 8, 10, 0.82) 0%,
      rgba(7, 8, 10, 0.52) 28%,
      rgba(7, 8, 10, 0.2) 55%,
      rgba(7, 8, 10, 0.28) 100%
    ),
    linear-gradient(
      180deg,
      rgba(7, 8, 10, 0.2) 0%,
      transparent 28%,
      rgba(7, 8, 10, 0.42) 68%,
      rgba(7, 8, 10, 0.72) 100%
    ),
    linear-gradient(
      128deg,
      transparent 42%,
      rgba(214, 242, 92, 0.05) 49%,
      rgba(214, 242, 92, 0.1) 50.5%,
      rgba(214, 242, 92, 0.04) 52%,
      transparent 60%
    );
  animation: beam-breathe 12s ease-in-out infinite alternate;
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
}

.hero-frame {
  position: absolute;
  inset: 0.85rem;
  border: 1px solid rgba(214, 242, 92, 0.22);
  border-radius: 16px;
  pointer-events: none;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.2);
}

.hero-frame::before,
.hero-frame::after {
  content: "";
  position: absolute;
  width: 2.4rem;
  height: 2.4rem;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.85;
}

.hero-frame::before {
  top: 0.55rem;
  left: 0.55rem;
  border-width: 2px 0 0 2px;
}

.hero-frame::after {
  right: 0.55rem;
  bottom: 0.55rem;
  border-width: 0 2px 2px 0;
}

.hero-mark {
  position: absolute;
  z-index: 2;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(242, 238, 230, 0.72);
  pointer-events: none;
}

.hero-mark-tl {
  top: 1.55rem;
  left: 1.7rem;
  color: rgba(214, 242, 92, 0.9);
}

.hero-mark-tr {
  top: 1.55rem;
  right: 1.7rem;
}

.hero-mark-bl,
.hero-rule {
  display: none;
}

@keyframes drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.09) translate3d(-1.2%, -1%, 0);
  }
}

@keyframes beam-breathe {
  from {
    opacity: 0.88;
  }
  to {
    opacity: 1;
  }
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes glow {
  from {
    opacity: 0.75;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(1.5%, -1%, 0);
  }
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  gap: 2.4rem;
  padding: 4.8rem 0 3.2rem;
  animation: copy-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes copy-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-lead {
  max-width: 36rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  font-weight: 700;
  margin: 0 0 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
  flex-shrink: 0;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.8rem, 12vw, 7.6rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  max-width: none;
  text-wrap: balance;
}

.hero-sub {
  margin: 1.15rem 0 0;
  max-width: 26rem;
  color: rgba(242, 238, 230, 0.78);
  font-size: 1.06rem;
  line-height: 1.55;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.65rem;
}

.hero-actions .btn-ghost {
  background: rgba(7, 8, 10, 0.28);
  backdrop-filter: blur(6px);
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-signals {
  list-style: none;
  margin: 0;
  padding: 1.05rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 40rem;
}

.hero-signals li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1.4rem 0.15rem 0;
  min-width: 7rem;
  position: relative;
}

.hero-signals li + li {
  padding-left: 1.4rem;
}

.hero-signals li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  bottom: 0.35rem;
  width: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-signals strong {
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}

.hero-signals span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.stats {
  display: none;
}

.section {
  padding: 2.5rem 0 3.5rem;
  margin-top: -0.5rem;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 8, 10, 0.35) 2.5rem, transparent 5rem);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.media-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  margin: 0 0 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.media-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.65rem 0.85rem 0.75rem;
  margin-bottom: -1px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.media-tab:hover {
  color: var(--text);
}

.media-tab.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.media-tab:focus-visible {
  outline: 2px solid rgba(214, 242, 92, 0.55);
  outline-offset: 3px;
  border-radius: 4px;
}

.month-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin: 0 0 1.35rem;
}

.month-recent,
.month-fav,
.month-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  text-shadow: none;
  transform: none;
}

.month-recent:hover,
.month-fav:hover,
.month-chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  transform: none;
}

.month-recent.is-active,
.month-fav.is-active,
.month-chip.is-active {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.month-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 1 auto;
  max-width: min(100%, 18rem);
}

.month-pick[hidden] {
  display: none !important;
}

.fav-media-grid {
  margin-top: 0.25rem;
}

.month-pick-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.month-pick select {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(45deg, transparent 50%, rgba(242, 238, 230, 0.55) 50%) right 0.85rem top 1.05rem / 0.35rem 0.35rem no-repeat,
    linear-gradient(135deg, transparent 50%, rgba(242, 238, 230, 0.55) 50%) right 0.55rem top 1.05rem / 0.35rem 0.35rem no-repeat,
    rgba(10, 14, 18, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55rem 2rem 0.55rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
}

.month-pick select:focus-visible {
  outline: 2px solid rgba(214, 242, 92, 0.55);
  outline-offset: 2px;
}

.month-pick select option {
  background: #12161c;
  color: var(--text);
}

.events-feed {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.month-block {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.month-heading {
  margin: 0;
  padding: 0.15rem 0 0.1rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(242, 238, 230, 0.78);
}

.events {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 1180px) {
  .events {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.event {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  min-height: 280px;
  background: #101218;
  display: flex;
  flex-direction: column;
  justify-content: end;
  isolation: isolate;
  transition: transform 0.35s ease;
}

.event:hover {
  transform: translateY(-3px);
}

.event-pin {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.55);
  color: rgba(242, 238, 230, 0.45);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.event-share {
  position: absolute;
  top: 0.75rem;
  left: auto;
  right: calc(0.75rem + 2.2rem + 0.4rem);
  z-index: 3;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.55);
  color: rgba(242, 238, 230, 0.72);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.event:not(:has(.event-pin)) .event-share {
  right: 0.75rem;
}

.event-share:hover,
.event-share:focus-visible {
  color: var(--accent);
  border-color: rgba(214, 242, 92, 0.45);
  outline: none;
}

.event-share.is-shared {
  color: var(--accent);
  border-color: rgba(214, 242, 92, 0.4);
  background: rgba(214, 242, 92, 0.12);
}

.event-share:disabled,
.event-pin:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn.is-shared {
  border-color: rgba(214, 242, 92, 0.45);
  color: var(--accent);
}

.event-pin:hover,
.event-pin:focus-visible {
  color: var(--accent);
  border-color: rgba(214, 242, 92, 0.45);
  outline: none;
}

.event-pin.is-on {
  color: var(--accent);
  border-color: rgba(214, 242, 92, 0.4);
  background: rgba(214, 242, 92, 0.12);
}

.event:first-child {
  grid-column: 1 / -1;
  min-height: 380px;
}

.event:first-child h3 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.event-bg-video {
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(214, 242, 92, 0.06), transparent 55%),
    radial-gradient(circle at 16% 84%, rgba(70, 100, 150, 0.1), transparent 42%),
    linear-gradient(165deg, #141a16 0%, #0f1419 55%, #0c1015 100%) !important;
}

.event-bg-circle {
  background:
    radial-gradient(ellipse 70% 55% at 68% 22%, rgba(214, 242, 92, 0.07), transparent 52%),
    radial-gradient(circle at 22% 78%, rgba(80, 110, 160, 0.1), transparent 40%),
    linear-gradient(165deg, #131914 0%, #0e1318 100%) !important;
}

.event-cover-mark {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  pointer-events: none;
}

.event.has-feed-badge .event-cover-mark {
  top: 3.05rem;
}

.event-feed-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 3;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 12, 16, 0.72);
  color: rgba(242, 238, 230, 0.88);
  backdrop-filter: blur(8px);
}

.event-feed-badge-pinned {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.event-feed-badge-new {
  color: var(--accent);
  border-color: rgba(214, 242, 92, 0.4);
  background: rgba(214, 242, 92, 0.12);
}

.event-cover-mark span {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  line-height: 1;
  color: rgba(214, 242, 92, 0.72);
  text-transform: uppercase;
}

.event-cover-mark span::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 0.45rem;
  border-style: solid;
  border-width: 0.28rem 0 0.28rem 0.45rem;
  border-color: transparent transparent transparent rgba(214, 242, 92, 0.7);
  vertical-align: 0.05em;
}

.event:first-child .event-cover-mark span {
  font-size: 0.76rem;
}

.event-play-circle {
  border-radius: 999px;
  outline: 3px solid rgba(214, 242, 92, 0.35);
  outline-offset: 6px;
}

.event-bg-video::before {
  content: none;
}

.event.event-video::after {
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.72));
}

.event-play {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #101208;
  font-size: 1.15rem;
  box-shadow:
    0 0 0 10px rgba(214, 242, 92, 0.12),
    0 16px 40px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.event-bg-voice {
  background:
    radial-gradient(circle at 40% 40%, rgba(214, 242, 92, 0.12), transparent 45%),
    linear-gradient(160deg, #1a2116, #0d1018 60%) !important;
}

.event-bg-empty {
  background: linear-gradient(160deg, #1a1f14, #0d1018) !important;
}

.event-kind {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  z-index: 2;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(7, 8, 10, 0.72);
  border: 1px solid rgba(214, 242, 92, 0.35);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.shot-video {
  background: transparent;
}

.shot-circle {
  background: transparent;
}

.video-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: 0.85rem;
  position: relative;
  background:
    radial-gradient(circle at 65% 35%, rgba(214, 242, 92, 0.18), transparent 42%),
    linear-gradient(165deg, #171c16 0%, #0d1118 60%, #12161e 100%);
}

.video-card[style*="url("],
.circle-card[style*="url("] {
  background-size: cover;
  background-position: center;
}

.circle-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: 0.85rem;
  position: relative;
  background:
    radial-gradient(circle at 50% 42%, rgba(214, 242, 92, 0.22), transparent 40%),
    linear-gradient(165deg, #181f17 0%, #0d1118 60%, #12161e 100%);
}

.play-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(214, 242, 92, 0.92);
  color: #12140a;
  font-size: 0.95rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.play-orb-circle {
  width: 4.2rem;
  height: 4.2rem;
  box-shadow:
    0 0 0 8px rgba(214, 242, 92, 0.12),
    0 10px 30px rgba(0, 0, 0, 0.35);
}

.shot-duration {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  padding: 0.2rem 0.48rem;
  border-radius: 7px;
  background: rgba(7, 8, 10, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f2eee6;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.shot:has(.shot-delete) .shot-duration {
  right: 2.55rem;
}

.video-card .shot-title,
.circle-card .shot-title {
  position: static;
  padding: 0;
  background: none;
  color: #c9c3b8;
}

.event:hover .event-bg {
  transform: scale(1.05);
}

.event::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.85));
  z-index: -1;
}

.event-body {
  padding: 1.2rem;
}

.event-meta {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.event h3 {
  margin: 0.35rem 0 0.2rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}

.event p {
  margin: 0;
  color: #c9c3b8;
  font-size: 0.92rem;
}

.page-hero {
  padding: 2.8rem 0 1.2rem;
}

.back-to-list {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  transition: color 0.2s ease;
}

.back-to-list:hover {
  color: var(--accent);
}

.event-page .event-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0 0 1.35rem;
}

.event-page .back-to-list {
  margin: 0;
  padding: 0.5rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 650;
  background: rgba(7, 8, 10, 0.35);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.event-page .back-to-list:hover {
  color: var(--text);
  border-color: rgba(214, 242, 92, 0.45);
  background: rgba(214, 242, 92, 0.08);
}

.event-page .event-kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  font-weight: 700;
}

.event-page .event-head {
  margin-bottom: 0.55rem;
}

.event-page .event-title-editable {
  color: var(--text);
}

.event-page .event-title-editable:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(214, 242, 92, 0.45);
  text-underline-offset: 0.12em;
}

.event-page #event-meta {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.event-page .event-rename-hint {
  margin-top: 0.35rem;
}

.page-hero h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums;
}

.page-hero p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  max-width: 40rem;
  line-height: 1.55;
}

.filter-block {
  margin-top: 1.2rem;
}

.filter-label {
  font-size: 0.82rem;
  font-weight: 650;
  margin-bottom: 0.55rem;
  color: var(--text);
}

.filter-label span {
  color: var(--muted);
  font-weight: 500;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 0.4rem;
}

.filter-count {
  margin: 1rem 0 1rem !important;
  color: var(--accent) !important;
  font-size: 0.9rem !important;
  font-weight: 600;
}

.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  cursor: pointer;
}

.chip.active,
.chip:hover {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.shot {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #12141a;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.7s ease forwards;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.shot:hover img {
  transform: scale(1.06);
}

.shot .badge {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  background: rgba(7, 8, 10, 0.78);
  color: var(--accent);
  border: 1px solid rgba(214, 242, 92, 0.35);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.shot .badge-video {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.shot .badge-circle {
  color: var(--accent);
  border-color: rgba(214, 242, 92, 0.35);
}

.shot .shot-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.4rem 0.65rem 0.65rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  font-size: 0.8rem;
  color: #ebe6dc;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.shot-title-meta {
  color: #ebe6dc;
}

.shot-title-cap {
  color: rgba(235, 230, 220, 0.72);
  font-size: 0.74rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shot-voice {
  background: linear-gradient(160deg, #151a12, #0d1018 60%);
}

.voice-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.45rem;
  padding: 0.8rem;
  position: relative;
}

.voice-card .badge {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
}

.voice-card strong {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
}

.voice-card .shot-title {
  position: static;
  padding: 0;
  background: none;
  color: var(--muted);
}

.wave {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 42px;
  margin: 1.5rem 0 0.2rem;
}

.wave i {
  display: block;
  width: 5px;
  border-radius: 99px;
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}

.wave i:nth-child(1) {
  height: 18px;
}
.wave i:nth-child(2) {
  height: 30px;
  animation-delay: 0.1s;
}
.wave i:nth-child(3) {
  height: 22px;
  animation-delay: 0.2s;
}
.wave i:nth-child(4) {
  height: 38px;
  animation-delay: 0.05s;
}
.wave i:nth-child(5) {
  height: 16px;
  animation-delay: 0.15s;
}
.wave i:nth-child(6) {
  height: 28px;
  animation-delay: 0.25s;
}
.wave i:nth-child(7) {
  height: 20px;
  animation-delay: 0.12s;
}

@keyframes pulse {
  0%,
  100% {
    transform: scaleY(0.7);
    opacity: 0.7;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

.search-box {
  display: flex;
  gap: 0.7rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.7rem;
  margin: 1.2rem 0 1.6rem;
  backdrop-filter: blur(10px);
}

.search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 0.55rem 0.7rem;
}

.results {
  display: grid;
  gap: 0.75rem;
}

.result {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.result img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.result h3 {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-variant-numeric: lining-nums;
}

.result p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.result-snippet {
  margin-top: 0.4rem !important;
  color: var(--text) !important;
  font-size: 0.9rem !important;
  line-height: 1.4;
  max-width: 42rem;
}

.result-why {
  color: var(--accent, #c8f06a);
  font-weight: 650;
  margin-right: 0.15rem;
}

.result-why::after {
  content: " ·";
  margin-left: 0.15rem;
  color: var(--muted);
  font-weight: 500;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.3rem;
  background: rgba(10, 12, 16, 0.55);
  backdrop-filter: blur(10px);
}

.panel + .panel {
  margin-top: 0.9rem;
}

.panel h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
}

.panel p,
.panel li {
  color: var(--muted);
  line-height: 1.6;
}

.about-page .lead {
  max-width: 38rem;
  font-size: 1.08rem;
  color: #c9c3b8;
}

.about-page .panel {
  margin-top: 1rem;
}

.about-page .panel ul {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
}

.about-page .panel li + li {
  margin-top: 0.35rem;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.6rem 0 0.5rem;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}

.lightbox.open {
  display: flex;
}

.lightbox-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  max-width: min(1100px, 100%);
}

.lightbox img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 12px;
}

.lightbox-inner p {
  margin: 0;
  color: #d8d2c6;
  text-align: center;
  max-width: min(640px, 92vw);
  line-height: 1.45;
}

.lightbox-nav {
  display: none;
}

.lightbox-nav:not([hidden]) {
  display: block;
}

.lightbox-side {
  position: fixed;
  top: 50%;
  z-index: 110;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.82);
  color: #f2efe8;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.lightbox-side:hover,
.lightbox-side:focus-visible {
  border-color: rgba(214, 242, 92, 0.55);
  color: var(--accent, #d6f25c);
  outline: none;
}

#lightbox-prev {
  left: max(0.75rem, env(safe-area-inset-left));
}

#lightbox-next {
  right: max(0.75rem, env(safe-area-inset-right));
}

.lightbox-pos {
  position: fixed;
  left: 50%;
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  z-index: 110;
  transform: translateX(-50%);
  min-width: 4.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
  color: #c9c3b8;
  font-size: 0.88rem;
  font-weight: 650;
  font-variant-numeric: lining-nums tabular-nums;
  pointer-events: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.lightbox-inner .lb-meta {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

.lightbox-inner .lb-text {
  display: block;
  color: #ebe6dc;
  font-size: 0.98rem;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 6.5rem;
  overflow: auto;
}

.voice-player {
  width: min(440px, 92vw);
  padding: 1.1rem 1.15rem 0.95rem;
  border-radius: 22px;
  border: 1px solid rgba(214, 242, 92, 0.22);
  background:
    radial-gradient(circle at 20% 0%, rgba(214, 242, 92, 0.12), transparent 45%),
    linear-gradient(160deg, #171c16 0%, #0f1319 55%, #12161e 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.voice-player-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
}

.voice-play,
.voice-rate {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.voice-play {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(214, 242, 92, 0.25);
}

.voice-rate {
  min-width: 3rem;
  height: 2.2rem;
  border-radius: 999px;
  padding: 0 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: lining-nums;
}

.voice-wave {
  height: 2.4rem;
  display: flex;
  align-items: end;
  gap: 3px;
}

.voice-wave i {
  flex: 1;
  display: block;
  border-radius: 99px;
  background: rgba(214, 242, 92, 0.55);
  height: 28%;
  transform-origin: bottom;
}

.voice-wave i:nth-child(3n) { height: 62%; }
.voice-wave i:nth-child(4n) { height: 40%; }
.voice-wave i:nth-child(5n) { height: 88%; }
.voice-wave i:nth-child(2n) { height: 50%; }

.voice-wave.playing i {
  animation: voice-pulse 0.9s ease-in-out infinite alternate;
}

.voice-wave.playing i:nth-child(odd) { animation-delay: 0.12s; }
.voice-wave.playing i:nth-child(3n) { animation-delay: 0.24s; }
.voice-wave.playing i:nth-child(5n) { animation-delay: 0.36s; }

@keyframes voice-pulse {
  from { transform: scaleY(0.55); opacity: 0.7; }
  to { transform: scaleY(1); opacity: 1; }
}

.voice-seek {
  margin-top: 0.85rem;
}

.voice-seek input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}

.voice-seek input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
  box-shadow: 0 0 0 4px rgba(214, 242, 92, 0.18);
}

.voice-seek input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
}

.voice-times {
  margin-top: 0.45rem;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: lining-nums tabular-nums;
  font-family: var(--font-heading);
}

.panel strong {
  color: var(--text);
}

.event-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(214, 242, 92, 0.14), transparent 36%),
    radial-gradient(circle at 18% 78%, rgba(90, 130, 190, 0.12), transparent 42%),
    linear-gradient(155deg, #1c2618 0%, #12181f 48%, #0e1218 100%);
  background-size: cover;
  background-position: center;
  z-index: -1;
  transition: transform 0.6s ease;
}

.event-bg-cover {
  background-color: #101218;
  filter: saturate(1.05) contrast(1.02);
}

.event-bg-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 8, 10, 0.15) 0%, rgba(7, 8, 10, 0.55) 48%, rgba(7, 8, 10, 0.92) 100%);
  pointer-events: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.page-status {
  margin: 0.35rem 0 0 !important;
  color: var(--accent) !important;
  font-size: 0.9rem !important;
  min-height: 1.2em;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 2rem 1.2rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.result-ph {
  width: 96px;
  height: 72px;
  border-radius: 10px;
  background: #12141a;
}

.result-ph-video {
  display: grid;
  place-items: center;
  color: rgba(214, 242, 92, 0.9);
  font-size: 1.1rem;
  background:
    radial-gradient(circle at 65% 35%, rgba(214, 242, 92, 0.2), transparent 45%),
    linear-gradient(160deg, #171c16, #0d1118);
}

.result-ph-photo {
  display: grid;
  place-items: center;
  color: rgba(214, 242, 92, 0.75);
  font-size: 1.05rem;
  background: linear-gradient(160deg, #1a1f16, #10141a);
}

.result-ph-voice {
  display: grid;
  place-items: center;
  color: rgba(214, 242, 92, 0.9);
  font-size: 1.15rem;
  background:
    radial-gradient(circle at 40% 50%, rgba(214, 242, 92, 0.16), transparent 50%),
    linear-gradient(160deg, #171c16, #0d1118);
}

.result-ph-circle {
  display: grid;
  place-items: center;
  border-radius: 999px;
  width: 72px;
  height: 72px;
  color: rgba(214, 242, 92, 0.95);
  font-size: 1rem;
  background:
    radial-gradient(circle at 50% 40%, rgba(214, 242, 92, 0.25), transparent 50%),
    linear-gradient(160deg, #171c16, #0d1118);
  box-shadow: inset 0 0 0 2px rgba(214, 242, 92, 0.25);
}

#lightbox-video {
  max-width: min(920px, 92vw);
  max-height: 72vh;
  border-radius: 16px;
  background: #000;
}

#lightbox-video:not([hidden]) {
  display: block;
}

.circle-player[hidden],
.media-loading[hidden],
#lightbox-video[hidden],
#media-stage[hidden] {
  display: none !important;
}

.circle-player:not([hidden]) {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
}

.circle-frame {
  position: relative;
  width: min(360px, 78vw);
  height: min(360px, 78vw);
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  outline: none;
}

.circle-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
  z-index: 2;
}

.circle-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 3.5;
}

.circle-ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
}

#circle-video {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: cover;
  border-radius: 999px;
  background: #0a0c10;
  z-index: 1;
  pointer-events: none;
}

.circle-frame.is-paused .circle-ring-bg {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 5;
}

.circle-frame.is-paused .circle-ring-fg,
.circle-frame.is-scrubbing .circle-ring-fg {
  stroke-width: 5;
}

.circle-knob-wrap {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.circle-frame.is-paused .circle-knob-wrap,
.circle-frame.is-scrubbing .circle-knob-wrap {
  opacity: 1;
}

.circle-knob {
  position: absolute;
  top: 2.5%;
  left: 50%;
  width: 15px;
  height: 15px;
  margin-left: -7.5px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow:
    0 0 0 5px rgba(214, 242, 92, 0.18),
    0 6px 16px rgba(0, 0, 0, 0.35);
}

.circle-play-hint {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: #12140a;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.circle-frame.is-paused:not(.is-scrubbing) .circle-play-hint {
  opacity: 1;
  background: radial-gradient(circle, rgba(214, 242, 92, 0.92) 0 1.5rem, transparent 1.55rem);
}

.circle-meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: lining-nums tabular-nums;
  font-family: var(--font-heading);
  text-align: center;
  display: grid;
  gap: 0.25rem;
  justify-items: center;
}

.circle-scrub-hint {
  font-size: 0.78rem;
  color: rgba(214, 242, 92, 0.75);
}

.circle-scrub-hint[hidden] {
  display: none !important;
}

.media-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: min(320px, 86vw);
  min-height: 220px;
  gap: 0.75rem;
}

.media-loading {
  justify-items: center;
  gap: 0.45rem;
  padding: 1.6rem 1.4rem;
  border-radius: 22px;
  border: 1px solid rgba(214, 242, 92, 0.22);
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 242, 92, 0.14), transparent 55%),
    #12161c;
  color: #d8d2c6;
  text-align: center;
  max-width: 280px;
}

.media-loading:not([hidden]) {
  display: grid;
}

.media-loading strong {
  color: var(--text);
  font-family: var(--font-heading);
}

.media-loading span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.media-spinner {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 3px solid rgba(214, 242, 92, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  margin-bottom: 0.35rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

code {
  font-family: ui-monospace, Consolas, monospace;
  color: var(--accent);
}

@media (max-width: 800px) {
  .nav {
    display: none;
  }
  .top-actions .btn-ghost:not(#logout-btn) {
    display: none;
  }
  .hero {
    min-height: min(72vh, 640px);
  }
  .hero-stage {
    inset: 0.55rem;
    border-radius: 18px;
  }
  .hero-mark-tr,
  .hero-mark-bl,
  .hero-rule {
    display: none;
  }
  .hero-copy {
    padding: 4.2rem 0 2.4rem;
  }
  .events {
    grid-template-columns: 1fr;
  }
  .event,
  .event:first-child {
    grid-column: auto;
    min-height: 240px;
  }
  .result {
    grid-template-columns: 72px 1fr;
  }
  .result-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }
  .result-actions .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media,
  .hero-veil,
  .hero-stage,
  .hero-copy {
    animation: none !important;
  }
}

.auth-shell {
  min-height: 80vh;
  display: grid;
  align-content: center;
  position: relative;
  z-index: 1;
}

.auth-card {
  max-width: 420px;
  margin-top: 1.1rem;
  padding: 1rem 1.1rem 1.15rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  margin: 0 0 1rem;
  padding: 0.3rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}

.auth-tabs[hidden] {
  display: none !important;
}

.auth-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 0.7rem 0.55rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  line-height: 1.2;
}

.auth-tab.active,
.auth-tab:hover {
  color: var(--accent-ink);
  background: var(--accent);
}

.auth-panel {
  margin-top: 0;
}

.auth-panel label {
  display: block;
  margin: 0.75rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-panel label:first-of-type {
  margin-top: 0;
}

.auth-panel input,
.admin-form input,
.admin-form select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d1016;
  color: var(--text);
  font: inherit;
  min-height: 2.75rem;
  box-sizing: border-box;
}

.auth-panel .btn,
.auth-submit {
  display: block;
  width: 100%;
  margin-top: 1.15rem;
  text-align: center;
}

.auth-error {
  color: #ff7a7a;
  min-height: 1.2em;
  margin: 0.5rem 0 0;
}

.muted {
  color: var(--muted);
}

.whoami {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin-right: 0.35rem;
}

.admin-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font-weight: 600;
}

.admin-block-lead {
  margin: 0.35rem 0 1rem;
  max-width: 40rem;
  line-height: 1.5;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-stat {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
}

.admin-stat.is-ok {
  border-color: rgba(198, 232, 106, 0.28);
}

.admin-stat.is-warn {
  border-color: rgba(255, 196, 92, 0.4);
}

.admin-stat.is-bad {
  border-color: rgba(255, 122, 122, 0.45);
  background: rgba(255, 80, 80, 0.08);
}

.admin-stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.admin-stat strong {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
}

.admin-backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.admin-progress {
  margin-top: 0.65rem;
  max-width: 28rem;
}

.admin-progress-bar {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.admin-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #c6e86a, #8fd3ff);
  transition: width 0.25s ease;
}

.admin-progress #backup-progress-text {
  margin: 0.4rem 0 0;
  font-size: 0.86rem;
}

.admin-restore {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
  margin-top: 0.85rem;
}

.admin-restore select {
  min-width: 16rem;
  max-width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
}

.admin-toggle-inline {
  margin: 0;
  align-items: center;
}

.admin-tools .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-alert {
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 122, 122, 0.35);
  background: rgba(255, 80, 80, 0.1);
  color: #ffb4b4;
  font-size: 0.9rem;
  line-height: 1.45;
}

.admin-tools {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.4rem;
}

.admin-tool {
  display: grid;
  gap: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.admin-tool .btn {
  justify-self: start;
}

.admin-tool .muted {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 36rem;
}

.admin-ops-msg {
  margin: 0.9rem 0 0;
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-ops-msg.is-ok {
  color: #c6e86a;
}

.admin-stat-note {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.admin-extra {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.admin-extra summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.92rem;
  margin-bottom: 0.6rem;
}

.admin-extra .admin-tool {
  border-top: 0;
  padding-top: 0.35rem;
}

.admin-form {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.1fr 0.9fr auto;
  gap: 0.55rem;
  margin: 0.8rem 0 1rem;
  align-items: stretch;
}

.admin-field {
  display: grid;
  gap: 0.25rem;
  align-content: end;
}

.admin-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.admin-form .btn {
  min-height: 2.75rem;
  padding: 0 1.1rem;
  white-space: nowrap;
  align-self: end;
}

#invite-form {
  grid-template-columns: 7rem 7rem max-content;
  align-items: end;
  justify-content: start;
}

@media (max-width: 900px) {
  .admin-form {
    grid-template-columns: 1fr 1fr;
  }
  .admin-form .btn {
    grid-column: 1 / -1;
  }
  #invite-form {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-table-wrap {
  overflow-x: auto;
  margin-top: 0.8rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.65rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table th:nth-child(1),
.admin-table td.col-login {
  width: 14%;
}

.admin-table th:nth-child(2),
.admin-table td.col-name {
  width: 16%;
}

.admin-table th:nth-child(3),
.admin-table td.col-role {
  width: 14%;
}

.admin-table th:nth-child(4),
.admin-table td.col-status {
  width: 10%;
}

.admin-table th:nth-child(5),
.admin-table td.col-when {
  width: 12%;
  white-space: nowrap;
}

.admin-table th:nth-child(6),
.admin-table td.admin-actions {
  width: 34%;
}

.live-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.35rem;
  border-radius: 50%;
  background: #c6e86a;
  box-shadow: 0 0 0 0 rgba(198, 232, 106, 0.55);
  animation: live-pulse 2s ease-out infinite;
  vertical-align: middle;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(198, 232, 106, 0.45);
  }
  70% {
    box-shadow: 0 0 0 0.55rem rgba(198, 232, 106, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(198, 232, 106, 0);
  }
}

#people-panel.is-flash {
  animation: people-flash 1.4s ease;
}

@keyframes people-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(198, 232, 106, 0.35);
  }
  35% {
    box-shadow: 0 0 0 6px rgba(198, 232, 106, 0.22);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(198, 232, 106, 0);
  }
}

.admin-table select {
  width: 100%;
  max-width: 9.5rem;
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1016;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-pill.is-on {
  color: #c6e86a;
  background: rgba(214, 242, 92, 0.12);
  border: 1px solid rgba(214, 242, 92, 0.28);
}

.status-pill.is-off {
  color: #9b968c;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.status-pill.is-owner {
  color: #10140c;
  background: rgba(214, 242, 92, 0.92);
  border: 1px solid rgba(214, 242, 92, 0.35);
}

.owner-shield {
  font-size: 0.82rem;
}

.admin-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  justify-content: flex-start;
  align-items: center;
}

.admin-actions .btn {
  padding: 0.4rem 0.65rem;
  font-size: 0.78rem;
  min-height: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}

.admin-list {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
}

.admin-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-list code {
  color: var(--accent);
}

.invite-row.is-used,
.invite-row.is-expired {
  opacity: 0.72;
}

.invite-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.invite-badge-active {
  color: #12140a;
  background: var(--accent);
}

.invite-badge-used {
  color: #c9c3b8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.invite-badge-expired {
  color: #ffb4b4;
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 122, 122, 0.3);
}

.event-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.event-head h1 {
  margin: 0;
}

.event-title-wrap {
  flex: 1;
  min-width: min(100%, 16rem);
}

.event-title-editable {
  cursor: pointer;
  border-radius: 8px;
  outline: none;
}

.event-title-editable:hover {
  color: #e8ffb0;
}

.event-title-editable:focus-visible {
  box-shadow: 0 0 0 2px rgba(198, 232, 106, 0.35);
}

.event-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.btn-danger {
  border-color: rgba(255, 120, 120, 0.35) !important;
  color: #ffb4b4 !important;
}

.btn-danger:hover {
  background: rgba(255, 80, 80, 0.12) !important;
  border-color: rgba(255, 120, 120, 0.55) !important;
}

.shot-delete {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  left: auto;
  z-index: 5;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(7, 8, 10, 0.72);
  color: #ffb4b4;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.shot-delete:hover {
  background: rgba(180, 40, 40, 0.85);
  color: #fff;
  border-color: transparent;
}

.shot-cover-mark {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 6;
  height: 1.7rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: rgba(214, 242, 92, 0.95);
  color: #10140c;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  pointer-events: none;
}

.shot.is-album-cover {
  outline: 2px solid rgba(214, 242, 92, 0.75);
  outline-offset: -2px;
}

.shot:has(.shot-cover-mark) .badge {
  top: 2.4rem;
}

.cover-hint {
  margin: 0.35rem 0 0;
  color: #9a958a;
  font-size: 0.88rem;
}

body.is-picking-cover .cover-hint {
  color: #d6f25c;
}

.gallery-pick-cover .shot.is-cover-pickable {
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(214, 242, 92, 0.35);
}

.gallery-pick-cover .shot.is-cover-pickable::after {
  content: "Выбрать";
  position: absolute;
  inset: auto 0.5rem 0.5rem 0.5rem;
  z-index: 6;
  height: 2rem;
  border-radius: 999px;
  background: rgba(214, 242, 92, 0.92);
  color: #10140c;
  font-size: 0.78rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.gallery-pick-cover .shot:not(.is-cover-pickable) {
  opacity: 0.35;
  filter: grayscale(0.4);
}

.event-rename {
  display: none;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin: 0.15rem 0 0;
  width: 100%;
}

.event-rename[hidden] {
  display: none !important;
}

.event-head.is-editing .event-title-editable {
  display: none !important;
}

.event-head.is-editing .event-rename {
  display: flex;
}

.event-rename input {
  flex: 1 1 16rem;
  min-width: 0;
  min-height: 2.6rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  font: inherit;
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 700;
}

.event-rename .btn {
  flex: 0 0 auto;
}

.event-rename-hint {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  line-height: 1.35;
}

.btn.is-fav {
  border-color: rgba(198, 232, 106, 0.45);
  color: #d7f08a;
}

.whoami-link {
  color: inherit;
  text-decoration: none;
}

.whoami-link:hover {
  color: var(--accent, #c6e86a);
}

.cabinet-page {
  padding: 1.6rem 0 3rem;
}

.profile-hero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.profile-hero-main {
  display: flex;
  align-items: start;
  gap: 1.15rem;
  min-width: 0;
}

.profile-avatar-wrap {
  position: relative;
  width: 7.2rem;
  height: 7.2rem;
  border-radius: 999px;
  padding: 0;
  border: 2px solid rgba(214, 242, 92, 0.35);
  background: rgba(10, 12, 16, 0.7);
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar[hidden] {
  display: none !important;
}

.profile-avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--accent);
  letter-spacing: -0.04em;
}

.profile-avatar-fallback[hidden] {
  display: none !important;
}

.profile-avatar-edit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.35rem 0.2rem;
  background: rgba(0, 0, 0, 0.62);
  color: #f2eee6;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.profile-avatar-wrap:hover .profile-avatar-edit,
.profile-avatar-wrap:focus-visible .profile-avatar-edit {
  opacity: 1;
}

.profile-hero-text {
  min-width: 0;
}

.profile-role {
  margin: 0 0 0.25rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-hero-text h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  line-height: 1.05;
}

.profile-hero-text h1.is-numeric {
  font-family: Manrope, "Segoe UI", sans-serif;
  font-weight: 750;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.profile-handle {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.profile-bio {
  margin: 0.7rem 0 0;
  max-width: 34rem;
  color: rgba(242, 238, 230, 0.88);
  font-size: 0.98rem;
  line-height: 1.45;
}

.signals-open {
  position: relative;
}

.signals-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--accent, #c8f06a);
  color: var(--accent-ink, #12140e);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.signals-badge[hidden] {
  display: none !important;
}

.signals-rail {
  border-color: color-mix(in srgb, var(--accent, #c8f06a) 35%, var(--line, #333));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent, #c8f06a) 10%, transparent), transparent 55%),
    rgba(0, 0, 0, 0.22);
}

.signals-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.mail-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.mail-card {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line, #333);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.mail-card.is-read {
  opacity: 0.72;
}

.mail-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.mail-from {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.mail-from strong {
  display: block;
}

.mail-meta {
  display: block;
  color: var(--muted, #9a9a94);
  font-size: 0.85rem;
}

.mail-body {
  margin: 0.75rem 0 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.signal-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent, #c8f06a) 22%, var(--line, #333));
  background: rgba(8, 10, 12, 0.55);
  border-left: 3px solid var(--accent, #c8f06a);
}

.signal-card.is-read {
  opacity: 0.62;
  border-left-color: var(--line, #333);
}

.signal-card strong {
  font-size: 1rem;
}

.signal-card p {
  margin: 0;
  color: var(--muted, #9a9a94);
  font-size: 0.88rem;
}

.signal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.signal-card.is-idea {
  border-left-color: #9ec5ff;
}

.idea-open-btn {
  white-space: nowrap;
}

.people-circle-tag {
  align-self: center;
  font-size: 0.88rem;
}

.idea-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  align-items: end;
  justify-items: center;
}

.idea-sheet[hidden] {
  display: none !important;
}

.idea-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(4, 6, 10, 0.64);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.idea-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(34rem, 100vw);
  max-height: min(88vh, 720px);
  overflow: auto;
  padding: 1.35rem 1.25rem 1.5rem;
  border-radius: 22px 22px 0 0;
  border: 1px solid color-mix(in srgb, var(--accent, #c8f06a) 28%, var(--line, #333));
  border-bottom: 0;
  background:
    linear-gradient(165deg, rgba(36, 42, 34, 0.98), rgba(12, 14, 16, 0.99)),
    #101214;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.45);
  animation: idea-sheet-in 0.28s ease;
}

@keyframes idea-sheet-in {
  from {
    transform: translateY(24px);
    opacity: 0.35;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.idea-sheet-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.idea-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #9a9a94);
  font-weight: 700;
}

.idea-sheet-head h2 {
  margin: 0;
  font-family: Syne, sans-serif;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  letter-spacing: -0.03em;
}

.idea-lead {
  margin: 0.75rem 0 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.idea-kinds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.idea-kind {
  border: 1px solid var(--line, #333);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted, #9a9a94);
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  padding: 0.6rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.idea-kind:hover {
  color: var(--text, #f2f2f0);
}

.idea-kind.is-active {
  background: color-mix(in srgb, var(--accent, #c8f06a) 82%, #fff);
  color: var(--accent-ink, #12140e);
  border-color: transparent;
}

.idea-form textarea {
  width: 100%;
  min-height: 10rem;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid var(--line, #333);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  font: inherit;
  padding: 0.9rem 1rem;
  line-height: 1.45;
}

.idea-form textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent, #c8f06a) 45%, var(--line, #333));
}

.idea-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.idea-form-foot .cabinet-msg {
  margin: 0;
  flex: 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 720px) {
  .idea-sheet {
    align-items: center;
  }

  .idea-sheet-panel {
    border-radius: 22px;
    border-bottom: 1px solid color-mix(in srgb, var(--accent, #c8f06a) 28%, var(--line, #333));
  }
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  font-weight: 650;
}

.profile-stats strong {
  color: var(--text);
  font-weight: 750;
}

.profile-stats span {
  color: var(--muted);
  font-weight: 500;
}

.profile-meta {
  margin: 0.55rem 0 0;
  font-size: 0.86rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1rem;
}

.profile-since {
  color: var(--muted, #9a9a94);
}

.profile-presence {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted, #9a9a94);
}

.profile-presence::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(154, 154, 148, 0.7);
  flex-shrink: 0;
}

.profile-presence.is-online {
  color: color-mix(in srgb, var(--accent, #c8f06a) 82%, #fff);
  font-weight: 650;
}

.profile-presence.is-online::before {
  background: var(--accent, #c8f06a);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #c8f06a) 22%, transparent);
}

.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

.cabinet-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  justify-items: end;
  align-items: stretch;
}

.cabinet-sheet[hidden] {
  display: none !important;
}

.cabinet-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(4, 6, 10, 0.62);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.cabinet-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(26rem, 100vw);
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.85rem;
  padding: 1.25rem 1.2rem 1.5rem;
  background:
    linear-gradient(180deg, rgba(28, 32, 28, 0.98), rgba(12, 14, 16, 0.98)),
    #101214;
  border-left: 1px solid color-mix(in srgb, var(--accent, #c8f06a) 22%, var(--line, #333));
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.45);
  animation: cabinet-sheet-in 0.28s ease;
  overflow: auto;
}

@keyframes cabinet-sheet-in {
  from {
    transform: translateX(18px);
    opacity: 0.4;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.cabinet-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cabinet-sheet-head h2 {
  margin: 0;
  font-family: Syne, sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.cabinet-sheet-x {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.cabinet-sheet-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line, #333);
}

.cabinet-sheet-tab {
  border: 0;
  background: transparent;
  color: var(--muted, #9a9a94);
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cabinet-sheet-tab:hover {
  color: var(--text, #f2f2f0);
}

.cabinet-sheet-tab.is-active {
  background: color-mix(in srgb, var(--accent, #c8f06a) 82%, #fff);
  color: var(--accent-ink, #12140e);
}

.cabinet-sheet-body {
  min-height: 0;
}

.cabinet-sheet-pane[hidden] {
  display: none !important;
}

.cabinet-sheet .cabinet-form {
  max-width: none;
}

.cabinet-form textarea {
  min-height: 5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  font: inherit;
  resize: vertical;
}

.whoami {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.whoami-avatar {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.whoami-avatar-fallback {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(214, 242, 92, 0.14);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid rgba(214, 242, 92, 0.28);
}

.cabinet-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.cabinet-head h1 {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(2rem, 5vw, 3rem);
}

.cabinet-meta {
  margin: 0;
  font-size: 0.92rem;
}

.cabinet-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.15rem;
}

.cabinet-section-head h2 {
  margin: 0;
}

.cabinet-section-link {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.cabinet-section-link:hover {
  color: var(--accent);
}

.cabinet-form {
  display: grid;
  gap: 0.65rem;
  max-width: none;
  margin-top: 0.55rem;
}

.cabinet-form label {
  display: grid;
  gap: 0.3rem;
}

.cabinet-form label span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.cabinet-form input {
  min-height: 2.45rem;
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
}

.cabinet-form input:disabled {
  opacity: 0.65;
}

.cabinet-form .btn {
  justify-self: start;
  margin-top: 0.15rem;
}

.cabinet-msg {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.cabinet-msg.is-ok {
  color: #c6e86a;
}

.cabinet-msg.is-bad {
  color: #ffb4b4;
}

.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.cabinet-card {
  display: grid;
  grid-template-rows: 148px auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  color: inherit;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  padding: 0;
  font: inherit;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.cabinet-card:hover,
.cabinet-card:focus-visible {
  border-color: color-mix(in srgb, var(--accent, #c8f06a) 45%, var(--line));
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
  outline: none;
}

.cabinet-card-media {
  background: center / cover no-repeat rgba(255, 255, 255, 0.04);
}

.cabinet-card-media.is-empty,
.cabinet-card-media.is-video,
.cabinet-card-media.is-circle,
.cabinet-card-media.is-voice {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.cabinet-card-media.is-empty {
  background:
    radial-gradient(circle at 70% 20%, rgba(214, 242, 92, 0.08), transparent 45%),
    rgba(255, 255, 255, 0.03);
}

.cabinet-card-media.is-video {
  color: rgba(242, 238, 230, 0.72);
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(214, 242, 92, 0.1), transparent 55%),
    radial-gradient(circle at 16% 84%, rgba(70, 100, 150, 0.14), transparent 42%),
    linear-gradient(165deg, #141a16 0%, #0f1419 55%, #0c1015 100%);
}

.cabinet-card-media.is-circle {
  color: rgba(242, 238, 230, 0.72);
  background:
    radial-gradient(ellipse 70% 55% at 68% 22%, rgba(214, 242, 92, 0.12), transparent 52%),
    radial-gradient(circle at 22% 78%, rgba(80, 110, 160, 0.14), transparent 40%),
    linear-gradient(165deg, #131914 0%, #0e1318 100%);
}

.cabinet-card-media.is-voice {
  color: rgba(242, 238, 230, 0.72);
  background:
    radial-gradient(circle at 30% 40%, rgba(214, 242, 92, 0.08), transparent 50%),
    linear-gradient(165deg, #12161a 0%, #0d1116 100%);
}

.cabinet-card-body {
  display: grid;
  gap: 0.18rem;
  padding: 0.75rem 0.85rem 0.85rem;
}

.cabinet-card-body strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.cabinet-card-body span {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.cabinet-card-when {
  color: rgba(214, 242, 92, 0.75) !important;
  font-weight: 600;
}

.cabinet-fav {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.cabinet-fav .cabinet-card {
  margin: 0;
  width: 100%;
}

.cabinet-fav-remove,
.cabinet-fav .btn {
  justify-self: stretch;
  width: 100%;
  min-height: 2.4rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-color: color-mix(in srgb, var(--line) 80%, #fff);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cabinet-fav-remove:hover,
.cabinet-fav .btn:hover,
.cabinet-fav-remove:focus-visible,
.cabinet-fav .btn:focus-visible {
  background: rgba(255, 180, 180, 0.12);
  border-color: rgba(255, 180, 180, 0.45);
  color: #ffc9c9;
  outline: none;
}

.people-hint {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
}

.people-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.people-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line, #2a2a2a) 70%, transparent);
}

.people-row:last-child {
  border-bottom: 0;
}

.people-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.people-main:hover strong {
  text-decoration: underline;
}

.people-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.people-avatar {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.people-online-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent, #c8f06a);
  border: 2px solid #12140e;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #c8f06a) 28%, transparent);
}

.people-row.is-online .people-text span {
  color: color-mix(in srgb, var(--accent, #c8f06a) 72%, #fff);
}

.shared-with {
  font-size: 0.78rem !important;
  color: color-mix(in srgb, var(--accent, #c8f06a) 65%, #9a9a94) !important;
}

.people-avatar-fallback {
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent, #c8f06a) 18%, #1a1a1a);
  color: var(--text, #f2f2f0);
  font-family: Syne, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.people-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.people-text strong {
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.people-new {
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--accent, #c8f06a);
  vertical-align: middle;
}

.people-text span {
  font-size: 0.82rem;
  color: var(--muted, #9a9a94);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.people-row .btn {
  flex-shrink: 0;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
}

.profile-avatar-wrap.is-static {
  cursor: default;
  pointer-events: none;
}

.profile-avatar-wrap.is-static .profile-avatar-edit {
  display: none;
}

@media (max-width: 820px) {
  .cabinet-head {
    align-items: start;
    flex-direction: column;
  }

  .profile-hero {
    flex-direction: column;
  }

  .profile-hero-main {
    width: 100%;
  }

  .profile-avatar-wrap {
    width: 6.2rem;
    height: 6.2rem;
  }

  .people-row {
    flex-wrap: wrap;
  }
}

.lightbox-inner .btn + .btn {
  margin-left: 0.4rem;
}

.title-live-flash {
  animation: title-live-flash 0.9s ease;
}

@keyframes title-live-flash {
  0% { color: #e8ffb0; }
  100% { color: inherit; }
}
