:root {
  --ivory: #b0b4b0;
  --paper: #fffdf8;
  --cream: #f6f3ed;
  --stone: #b3b7b2;
  --stone-deep: #7f8980;
  --taupe: #69736c;
  --charcoal: #26302c;
  --charcoal-soft: #3c4741;
  --ink-muted: #68736b;
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, 0.84);
  --gold: #879187;
  --gold-dark: #4f5b54;
  --line: rgba(38, 48, 44, 0.16);
  --shadow: 0 22px 60px rgba(38, 48, 44, 0.13);
  --shadow-soft: 0 12px 36px rgba(38, 48, 44, 0.08);
  --radius: 8px;
  --sans: "Inter", "Avenir Next", "Helvetica Neue", Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Cormorant Garamond", "Bodoni 72", "Didot", "Libre Baskerville", "Iowan Old Style", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ivory);
  color: var(--charcoal);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--charcoal);
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.app {
  min-height: 100vh;
}

.landing {
  background: var(--ivory);
}

.landing-bar {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px clamp(18px, 4vw, 54px);
  color: var(--on-dark);
  mix-blend-mode: normal;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 50%;
  background: var(--stone);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(38, 48, 44, 0.16);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-title {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
}

.brand-kicker,
.eyebrow,
.meta,
.field-note,
.tag,
.sense-label,
.table-heading {
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-kicker {
  color: rgba(248, 240, 232, 0.72);
}

.landing-actions,
.hero-actions,
.page-actions,
.row-actions,
.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero {
  min-height: 92svh;
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(30, 39, 35, 0.78), rgba(30, 39, 35, 0.28) 48%, rgba(30, 39, 35, 0.08)),
    var(--hero-image, url("./assets/sensorium-forest-hero.png")) center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(38, 48, 44, 0), rgba(176, 180, 176, 0.98));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(790px, 100%);
  padding: 142px clamp(18px, 6vw, 72px) 108px;
  color: var(--on-dark);
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0;
}

.hero h1 {
  font-size: clamp(58px, 11vw, 150px);
}

.hero .tagline {
  margin: 24px 0 0;
  max-width: 580px;
  font-family: var(--display);
  font-size: clamp(25px, 4vw, 44px);
  line-height: 1.08;
}

.hero p {
  max-width: 560px;
  margin: 22px 0 0;
  color: rgba(248, 240, 232, 0.82);
  font-size: 17px;
  line-height: 1.75;
}

.section {
  padding: clamp(46px, 8vw, 96px) clamp(18px, 5vw, 68px);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 28px;
}

.section-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
}

.section-copy {
  max-width: 590px;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.7;
}

.section-header .section-title,
.page-header .page-title {
  color: var(--on-dark);
}

.section-header .eyebrow,
.page-header .eyebrow,
.page-header .muted {
  color: var(--on-dark-muted);
}

.section-header .section-copy,
.editorial-panel .section-copy {
  color: var(--on-dark-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-card,
.panel,
.quote-card,
.ritual-card,
.entry-card,
.media-card,
.admin-card,
.sense-card,
.calendar-day,
.auth-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: var(--shadow-soft);
}

.feature-card {
  min-height: 190px;
  padding: 22px;
  display: grid;
  align-content: space-between;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.feature-card:hover,
.entry-card:hover,
.media-card:hover,
.ritual-list-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 91, 84, 0.42);
  box-shadow: var(--shadow);
}

.feature-card h3,
.panel h3,
.media-card h3,
.entry-card h3,
.ritual-list-card h3,
.admin-card h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.05;
}

.feature-card p,
.media-card p,
.entry-card p,
.ritual-list-card p,
.admin-card p {
  margin: 14px 0 0;
  color: var(--ink-muted);
  line-height: 1.6;
}

.image-band {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.image-panel {
  min-height: 460px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: url("./assets/sensorium-ritual.png") center / cover no-repeat;
}

.image-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(38, 48, 44, 0), rgba(38, 48, 44, 0.52));
}

.editorial-panel {
  border-left: 1px solid var(--gold);
  padding: 28px 0 28px 34px;
  align-self: center;
}

.editorial-quote {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1;
  color: var(--on-dark);
}

.button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  color: var(--paper);
  background: var(--gold-dark);
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  background: #3f4a44;
}

.button.secondary {
  color: var(--charcoal);
  border-color: rgba(38, 48, 44, 0.24);
  background: rgba(255, 253, 248, 0.78);
}

.button.secondary:hover {
  background: var(--paper);
}

.button.ghost {
  color: inherit;
  border-color: transparent;
  background: transparent;
}

.button.small {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 13px;
}

.button.icon {
  width: 40px;
  min-width: 40px;
  padding: 0;
}

.icon svg {
  width: 18px;
  height: 18px;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 0.72fr);
  background: var(--ivory);
}

.auth-art {
  position: relative;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(38, 48, 44, 0.3), rgba(38, 48, 44, 0.74)),
    url("./assets/sensorium-hero.png") center / cover no-repeat;
  color: var(--paper);
  display: flex;
  align-items: end;
  padding: clamp(28px, 5vw, 72px);
}

.auth-art h1 {
  margin: 0;
  max-width: 620px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(46px, 8vw, 96px);
  line-height: 0.96;
}

.auth-side {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: clamp(22px, 5vw, 54px);
}

.auth-panel {
  width: min(100%, 560px);
  justify-self: center;
  padding: clamp(24px, 4vw, 38px);
  box-shadow: var(--shadow);
}

.auth-panel h2,
.page-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
}

.step-row {
  display: flex;
  gap: 8px;
  margin: 24px 0 28px;
}

.step-dot {
  height: 4px;
  flex: 1;
  border-radius: 999px;
  background: rgba(38, 48, 44, 0.16);
}

.step-dot.active {
  background: var(--gold);
}

.membership-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.membership-option {
  min-height: 156px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
  cursor: pointer;
}

.membership-option.selected {
  border-color: rgba(79, 91, 84, 0.72);
  box-shadow: 0 0 0 3px rgba(79, 91, 84, 0.12);
}

.membership-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.membership-option-content {
  display: grid;
  gap: 14px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.membership-option-heading,
.membership-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.membership-option-heading {
  color: var(--charcoal);
}

.membership-summary {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
}

.membership-summary h3 {
  margin-bottom: 0;
}

.payment-plan-settings {
  display: grid;
  gap: 14px;
}

.payment-plan-config {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.58);
}

.payment-plan-config > .eyebrow {
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: var(--charcoal-soft);
  font-size: 13px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(38, 48, 44, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.88);
  color: var(--charcoal);
  padding: 12px 13px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(79, 91, 84, 0.68);
  box-shadow: 0 0 0 3px rgba(79, 91, 84, 0.14);
  background: var(--paper);
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-muted);
  line-height: 1.55;
}

.checkbox-field input {
  width: 18px;
  margin-top: 3px;
}

.shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  padding: 28px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.78);
  backdrop-filter: blur(16px);
}

.sidebar .brand-title {
  color: var(--charcoal);
}

.sidebar .brand-kicker {
  color: var(--ink-muted);
}

.nav-list,
.admin-tabs {
  display: grid;
  gap: 6px;
  align-content: start;
}

.nav-button,
.tab-button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 11px 12px;
  text-align: left;
}

.nav-button svg,
.tab-button svg {
  width: 18px;
  height: 18px;
}

.nav-button.active,
.tab-button.active {
  color: var(--charcoal);
  border-color: rgba(79, 91, 84, 0.32);
  background: rgba(79, 91, 84, 0.09);
}

.nav-button:hover,
.tab-button:hover {
  color: var(--charcoal);
  background: rgba(38, 48, 44, 0.04);
}

.admin-tabs .tab-button {
  color: var(--on-dark-muted);
}

.admin-tabs .tab-button.active {
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.admin-tabs .tab-button:hover {
  color: var(--on-dark);
  background: rgba(255, 255, 255, 0.1);
}

.profile-mini {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.7);
}

.avatar,
.avatar-large {
  border: 1px solid rgba(79, 91, 84, 0.34);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(79, 91, 84, 0.22), rgba(255, 253, 248, 0.76)),
    var(--stone);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--gold-dark);
  font-family: var(--display);
}

.avatar {
  width: 44px;
  height: 44px;
  font-size: 22px;
}

.avatar-large {
  width: 92px;
  height: 92px;
  font-size: 42px;
}

.avatar img,
.avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-mini strong,
.profile-mini span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-mini span {
  color: var(--ink-muted);
  font-size: 12px;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 16px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.78);
  backdrop-filter: blur(16px);
}

.page {
  padding: clamp(24px, 4vw, 50px);
  animation: pageIn 260ms ease both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.daily-hero {
  position: relative;
  min-height: clamp(320px, 42vw, 520px);
  display: grid;
  align-items: end;
  overflow: hidden;
  margin: 0 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(18, 28, 23, 0.78), rgba(18, 28, 23, 0.32) 52%, rgba(18, 28, 23, 0.1)),
    var(--hero-image, url("./assets/sensorium-forest-hero.png")) center / cover no-repeat;
  box-shadow: var(--shadow);
}

.daily-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 28, 23, 0), rgba(18, 28, 23, 0.42));
  pointer-events: none;
}

.daily-hero-content {
  position: relative;
  z-index: 1;
  width: min(660px, 100%);
  padding: clamp(24px, 5vw, 54px);
  color: var(--on-dark);
}

.daily-hero-content h2 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(42px, 6vw, 86px);
  line-height: 0.96;
}

.daily-hero-content p {
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--on-dark-muted);
  font-size: 16px;
  line-height: 1.7;
}

.daily-hero .hero-actions {
  margin-top: 22px;
}

.daily-hero .button.secondary {
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.daily-hero .button.secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.page-hero {
  position: relative;
  min-height: clamp(250px, 30vw, 380px);
  display: grid;
  align-items: end;
  overflow: hidden;
  margin: 0 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(18, 28, 23, 0.74), rgba(18, 28, 23, 0.32) 54%, rgba(18, 28, 23, 0.08)),
    var(--hero-image, linear-gradient(var(--stone), var(--stone))) center / cover no-repeat;
  box-shadow: var(--shadow-soft);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 28, 23, 0), rgba(18, 28, 23, 0.34));
  pointer-events: none;
}

.page-hero-content {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  padding: clamp(22px, 4vw, 42px);
  color: var(--on-dark);
}

.page-hero-content h2 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
}

.page-hero-content p {
  max-width: 540px;
  margin: 14px 0 0;
  color: var(--on-dark-muted);
  font-size: 15px;
  line-height: 1.7;
}

.journal-page-hero {
  --hero-image: url("./assets/journal-hero.png");
}

.calendar-page-hero {
  --hero-image: url("./assets/calendar-hero.png");
}

.rituals-page-hero {
  --hero-image: url("./assets/rituals-hero.png");
}

.library-page-hero {
  --hero-image: url("./assets/library-hero.png");
}

.date-line,
.muted {
  color: var(--ink-muted);
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.quote-card {
  min-height: 390px;
  padding: clamp(24px, 5vw, 54px);
  display: grid;
  align-content: space-between;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.94), rgba(246, 243, 237, 0.82)),
    var(--paper);
}

.quote-card.compact-quote {
  min-height: 260px;
}

.quote-card.image-backed {
  position: relative;
  overflow: hidden;
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(17, 28, 23, 0.78), rgba(17, 28, 23, 0.34)),
    var(--hero-image) center / cover no-repeat;
}

.quote-card.image-backed .eyebrow,
.quote-card.image-backed footer {
  color: rgba(255, 253, 248, 0.82);
}

.quote-card blockquote {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(42px, 6.5vw, 88px);
  line-height: 0.98;
}

.quote-card footer {
  margin-top: 26px;
  color: var(--ink-muted);
}

.announcement-stack {
  display: grid;
  gap: 12px;
}

.announcement-card {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(17, 28, 23, 0.78), rgba(17, 28, 23, 0.32)),
    var(--hero-image, url("./assets/calendar-hero.png")) center / cover no-repeat;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.announcement-card h3,
.announcement-card p {
  max-width: 680px;
}

.announcement-card .eyebrow,
.announcement-card p {
  color: rgba(255, 253, 248, 0.84);
}

.ritual-card {
  overflow: hidden;
  background: var(--paper);
}

.ritual-card .ritual-image,
.media-image,
.entry-thumb {
  background: url("./assets/sensorium-ritual.png") center / cover no-repeat;
}

.ritual-card .ritual-image {
  background: var(--hero-image, url("./assets/sensorium-ritual.png")) center / cover no-repeat;
}

.ritual-image {
  min-height: 230px;
}

.ritual-card .content,
.media-card .content,
.entry-card .content,
.admin-card,
.panel {
  padding: 20px;
}

.stack {
  display: grid;
  gap: 18px;
}

.panel {
  box-shadow: none;
}

.panel.no-pad {
  padding: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.sense-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sense-card {
  min-height: 122px;
  padding: 14px;
  display: grid;
  gap: 12px;
  box-shadow: none;
}

.sense-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(79, 91, 84, 0.34);
  color: var(--gold-dark);
  border-radius: 50%;
}

.sense-icon svg {
  width: 19px;
  height: 19px;
}

.sense-card.complete {
  background: rgba(79, 91, 84, 0.1);
  border-color: rgba(79, 91, 84, 0.34);
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(38, 48, 44, 0.12);
}

.progress-fill {
  height: 100%;
  background: var(--gold);
}

.content-grid,
.archive-grid,
.library-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.entry-card,
.media-card,
.ritual-list-card {
  overflow: hidden;
  background: rgba(255, 253, 248, 0.86);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.entry-thumb,
.media-image {
  min-height: 150px;
}

.media-image {
  background-image: var(--media-image, url("./assets/sensorium-ritual.png"));
}

.entry-card .content,
.media-card .content {
  display: grid;
  gap: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(79, 91, 84, 0.32);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--gold-dark);
  background: rgba(79, 91, 84, 0.08);
}

.media-viewer {
  margin-bottom: 18px;
}

.uploaded-video,
.uploaded-image,
.uploaded-document {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--charcoal);
}

.uploaded-video {
  display: block;
  aspect-ratio: 16 / 9;
}

.uploaded-image {
  max-height: 72vh;
  object-fit: contain;
  background: var(--paper);
}

.uploaded-document {
  display: block;
  min-height: 68vh;
  background: var(--paper);
}

.uploaded-audio,
.download-panel {
  min-height: 180px;
  display: grid;
  place-items: center;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.76);
}

.uploaded-audio audio {
  width: min(100%, 720px);
}

.uploaded-audio .sense-icon,
.download-panel .sense-icon {
  width: 54px;
  height: 54px;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--gold-dark);
  font-weight: 700;
  text-decoration: underline;
}

.filters {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) repeat(4, minmax(150px, 0.45fr));
  gap: 10px;
  margin-bottom: 18px;
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.36fr);
  gap: 18px;
  align-items: start;
}

.journal-form {
  display: grid;
  gap: 18px;
}

.journal-section {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.journal-section h3 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 32px;
}

.range-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--gold-dark);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  aspect-ratio: 1;
  background: var(--cream);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.calendar-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.36fr);
  gap: 18px;
  align-items: start;
}

.calendar-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 8px;
}

.calendar-head div {
  color: var(--ink-muted);
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-day {
  position: relative;
  min-height: 96px;
  padding: 10px;
  text-align: left;
  box-shadow: none;
  background: rgba(255, 253, 248, 0.72);
  color: var(--charcoal);
}

.calendar-day.outside {
  opacity: 0.34;
}

.calendar-day.selected {
  border-color: rgba(79, 91, 84, 0.76);
  background: rgba(79, 91, 84, 0.1);
}

.calendar-day .indicator {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.ritual-layout,
.library-layout,
.admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

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

.ritual-list-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
  background: rgba(255, 253, 248, 0.78);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: var(--charcoal-soft);
  line-height: 1.55;
}

.steps li::before {
  content: counter(step);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(79, 91, 84, 0.38);
  border-radius: 50%;
  color: var(--gold-dark);
}

.video-frame {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(38, 48, 44, 0.16), rgba(38, 48, 44, 0.62)),
    var(--hero-image, url("./assets/sensorium-hero.png")) center / cover no-repeat;
  display: grid;
  place-items: center;
  color: var(--paper);
  overflow: hidden;
}

.meditation-prompt {
  min-height: 260px;
  display: grid;
  align-content: end;
  color: var(--paper);
  background:
    linear-gradient(180deg, rgba(17, 28, 23, 0.14), rgba(17, 28, 23, 0.72)),
    var(--hero-image, url("./assets/sensorium-hero.png")) center / cover no-repeat;
}

.meditation-prompt .eyebrow,
.meditation-prompt .muted {
  color: rgba(255, 253, 248, 0.84);
}

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

.admin-layout > *,
.admin-tabs {
  min-width: 0;
  max-width: 100%;
}

.admin-tabs {
  position: sticky;
  top: 96px;
}

.cms-access-panel {
  max-width: 760px;
}

.cms-page-picker {
  width: min(100%, 360px);
}

.cms-image-preview {
  width: 100%;
  min-height: 260px;
  aspect-ratio: 16 / 7;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(18, 28, 23, 0.05), rgba(18, 28, 23, 0.24)),
    var(--hero-image, linear-gradient(var(--stone), var(--stone))) center / cover no-repeat;
  box-shadow: var(--shadow-soft);
}

.ritual-image-preview {
  min-height: 220px;
  aspect-ratio: 16 / 8;
}

.record-image-preview {
  min-height: 220px;
  aspect-ratio: 16 / 8;
}

.form-grid > .full {
  grid-column: 1 / -1;
}

.data-table {
  display: grid;
  gap: 10px;
}

.data-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.45fr) minmax(130px, 0.45fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.76);
}

.data-row.compact {
  grid-template-columns: minmax(160px, 1fr) auto;
}

.ritual-data-row {
  grid-template-columns: minmax(260px, 1fr) minmax(92px, auto) auto auto auto;
}

.content-data-row {
  grid-template-columns: minmax(260px, 1fr) minmax(92px, auto) auto auto auto;
}

.data-row.selected {
  border-color: rgba(255, 253, 248, 0.7);
  background: rgba(255, 253, 248, 0.88);
}

.data-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ritual-thumb {
  width: 72px;
  height: 54px;
  flex: 0 0 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--hero-image, url("./assets/sensorium-ritual.png")) center / cover no-repeat;
}

.record-thumb {
  width: 72px;
  height: 54px;
  flex: 0 0 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.88), rgba(231, 235, 230, 0.76)),
    var(--hero-image, url("./assets/sensorium-logo.png")) center / cover no-repeat;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
}

.stat strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 46px;
  line-height: 1;
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.spec-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.64);
}

.spec-item h4 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 24px;
}

.spec-item p,
.spec-item li {
  color: var(--ink-muted);
  line-height: 1.55;
}

.spec-item ul {
  margin: 0;
  padding-left: 18px;
}

.notice {
  border-left: 3px solid var(--gold);
  padding: 14px 16px;
  color: var(--charcoal-soft);
  background: rgba(79, 91, 84, 0.09);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.notice.error {
  border-left-color: #8f4f4f;
  color: #6e3838;
  background: rgba(143, 79, 79, 0.1);
}

.notice.subtle {
  border-left-color: rgba(79, 91, 84, 0.42);
  color: var(--ink-muted);
  background: rgba(255, 253, 248, 0.54);
}

.toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid rgba(79, 91, 84, 0.42);
  border-radius: var(--radius);
  background: rgba(38, 48, 44, 0.94);
  color: var(--paper);
  box-shadow: var(--shadow);
}

.mobile-nav {
  display: none;
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(38, 48, 44, 0.24);
  border-radius: var(--radius);
  color: var(--ink-muted);
  padding: 24px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .feature-grid,
  .content-grid,
  .archive-grid,
  .library-grid,
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .today-grid,
  .entry-layout,
  .calendar-wrap,
  .ritual-layout,
  .library-layout,
  .admin-layout,
  .image-band {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    position: static;
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tab-button {
    min-width: max-content;
  }
}

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

  .sidebar {
    display: none;
  }

  .main {
    padding-bottom: 82px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 30;
    inset: auto 0 0 0;
    display: grid;
    grid-template-columns: repeat(var(--mobile-columns, 5), minmax(0, 1fr));
    gap: 2px;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.92);
    backdrop-filter: blur(16px);
  }

  .mobile-nav.single {
    grid-template-columns: 1fr;
  }

  .mobile-nav .nav-button {
    min-height: 54px;
    display: grid;
    place-items: center;
    gap: 3px;
    padding: 6px;
    font-size: 11px;
    text-align: center;
  }

  .mobile-nav svg {
    width: 18px;
    height: 18px;
  }

  .topbar {
    position: static;
  }

  .page,
  .section {
    padding: 24px 16px;
  }

  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-art {
    min-height: 38vh;
  }

  .auth-side {
    min-height: auto;
  }

  .landing-bar {
    color: var(--paper);
    padding: 16px;
  }

  .landing-actions .button.secondary {
    display: none;
  }

  .feature-grid,
  .content-grid,
  .content-grid.two,
  .archive-grid,
  .library-grid,
  .admin-grid,
  .sense-grid,
  .stat-grid,
  .spec-list {
    grid-template-columns: 1fr;
  }

  .section-header,
  .page-header,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .membership-options {
    grid-template-columns: 1fr;
  }

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

  .calendar-day {
    min-height: 70px;
    padding: 7px;
  }

  .data-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero {
    min-height: 90svh;
  }

  .hero-content {
    padding: 124px 18px 82px;
  }
}

@media (max-width: 520px) {
  .brand-title {
    font-size: 20px;
  }

  .hero-actions,
  .page-actions,
  .row-actions,
  .inline-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .button.icon {
    width: 40px;
  }

  .filters {
    grid-template-columns: 1fr;
  }
}

/* Complimentary quiz library */
.quiz-library-page .page-title,
.quiz-library-page .section-title,
.quiz-library-page h2,
.quiz-library-page h3,
.quiz-library-page h4 {
  font-family: var(--sans);
}

.quiz-library-hero {
  align-items: center;
  background: var(--charcoal);
  border-radius: var(--radius);
  color: var(--on-dark);
  display: grid;
  gap: clamp(34px, 7vw, 90px);
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  min-height: 480px;
  overflow: hidden;
  padding: clamp(42px, 7vw, 90px);
  position: relative;
}

.quiz-library-hero::before {
  background: radial-gradient(circle, rgba(176, 180, 176, .34), transparent 67%);
  content: "";
  height: 520px;
  position: absolute;
  right: -150px;
  top: -120px;
  width: 520px;
}

.quiz-library-hero > div { position: relative; z-index: 1; }
.quiz-library-hero h2 { font-size: clamp(43px, 5.8vw, 78px); font-weight: 400; letter-spacing: -.055em; line-height: .98; margin: 12px 0 24px; max-width: 820px; }
.quiz-library-hero p { color: var(--on-dark-muted); font-size: 16px; line-height: 1.7; margin: 0 0 30px; max-width: 670px; }
.quiz-library-hero .button { background: var(--paper); color: var(--charcoal); }

.quiz-library-orbit { aspect-ratio: 1; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; display: grid; margin: 0 auto; max-width: 340px; place-items: center; position: relative; width: 100%; }
.quiz-library-orbit::before, .quiz-library-orbit::after { border: 1px solid rgba(255,255,255,.13); border-radius: 50%; content: ""; inset: 15%; position: absolute; }
.quiz-library-orbit::after { inset: 31%; }
.quiz-library-orbit strong { font-size: clamp(20px, 2.4vw, 31px); font-weight: 400; letter-spacing: .16em; line-height: 1.18; text-align: center; }
.quiz-library-orbit span { color: var(--quiz-sense); font-family: Georgia, serif; font-size: 31px; position: absolute; }
.quiz-library-orbit span:nth-child(1) { left: 48%; top: -17px; }
.quiz-library-orbit span:nth-child(2) { right: -10px; top: 25%; }
.quiz-library-orbit span:nth-child(3) { bottom: 18%; right: 4%; }
.quiz-library-orbit span:nth-child(4) { bottom: -16px; left: 46%; }
.quiz-library-orbit span:nth-child(5) { bottom: 18%; left: 4%; }
.quiz-library-orbit span:nth-child(6) { left: -10px; top: 25%; }

.quiz-library-section { margin-top: clamp(58px, 8vw, 100px); }
.quiz-collection-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quiz-collection-card { background: rgba(255,253,248,.84); border: 1px solid var(--line); border-top: 5px solid var(--quiz-accent); border-radius: var(--radius); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; min-height: 410px; padding: 24px; }
.quiz-collection-meta { align-items: center; color: var(--ink-muted); display: flex; font-size: 9px; font-weight: 600; justify-content: space-between; letter-spacing: .14em; text-transform: uppercase; }
.quiz-collection-symbol { align-items: center; border: 1px solid color-mix(in srgb, var(--quiz-accent) 62%, transparent); border-radius: 50%; color: var(--quiz-accent); display: flex; font-family: Georgia, serif; font-size: 34px; height: 76px; justify-content: center; margin: 35px 0 29px; width: 76px; }
.quiz-collection-card h3 { font-size: clamp(22px, 2.1vw, 31px); font-weight: 400; letter-spacing: -.035em; line-height: 1.12; margin: 0; }
.quiz-collection-card p { color: var(--ink-muted); font-size: 13px; line-height: 1.65; margin: 16px 0 25px; }
.quiz-collection-card > a { align-items: center; border-top: 1px solid var(--line); color: var(--charcoal); display: flex; font-size: 9px; font-weight: 650; justify-content: space-between; letter-spacing: .14em; margin-top: auto; padding-top: 18px; text-decoration: none; text-transform: uppercase; }

.quiz-history-section { padding-bottom: 40px; }
.quiz-library-status { background: rgba(255,253,248,.75); border: 1px dashed var(--line); border-radius: var(--radius); padding: clamp(38px, 6vw, 75px); text-align: center; }
.quiz-library-status h3 { font-size: clamp(28px, 4vw, 48px); font-weight: 400; letter-spacing: -.04em; margin: 12px auto 14px; }
.quiz-library-status p { color: var(--ink-muted); line-height: 1.65; margin: 0 auto 25px; max-width: 650px; }
.quiz-library-status.error { border-color: rgba(128, 69, 58, .35); }
.quiz-history-list { display: grid; gap: 22px; }
.quiz-history-card { background: rgba(255,253,248,.88); border: 1px solid var(--line); border-left: 6px solid var(--quiz-accent); border-radius: var(--radius); box-shadow: var(--shadow-soft); overflow: hidden; }
.quiz-history-card > header { align-items: center; display: grid; gap: 28px; grid-template-columns: 1fr auto; padding: 30px clamp(24px, 4vw, 48px); }
.quiz-history-card header h3 { font-size: clamp(25px, 3vw, 42px); font-weight: 400; letter-spacing: -.04em; line-height: 1.08; margin: 10px 0 0; }
.quiz-history-primary { align-items: center; display: flex; gap: 13px; min-width: 180px; }
.quiz-history-primary > span { align-items: center; border: 1px solid var(--quiz-accent); border-radius: 50%; color: var(--quiz-accent); display: flex; font-family: Georgia, serif; font-size: 27px; height: 62px; justify-content: center; width: 62px; }
.quiz-history-primary small, .quiz-history-pattern small, .quiz-history-answers small { color: var(--ink-muted); display: block; font-size: 8px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.quiz-history-primary strong { display: block; font-size: 19px; font-weight: 500; margin-top: 4px; }
.quiz-history-intro { border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 16px; line-height: 1.7; margin: 0; padding: 27px clamp(24px, 4vw, 48px); }
.quiz-history-pattern { background: var(--cream); border-top: 1px solid var(--line); display: grid; gap: 34px; grid-template-columns: 1fr 220px; padding: 27px clamp(24px, 4vw, 48px); }
.quiz-history-pattern ul { display: grid; gap: 8px; grid-template-columns: repeat(6, minmax(0, 1fr)); list-style: none; margin: 14px 0 0; padding: 0; }
.quiz-history-pattern li { align-items: center; border-top: 2px solid var(--score-color); display: grid; gap: 4px; grid-template-columns: auto 1fr auto; padding-top: 9px; }
.quiz-history-pattern li span { color: var(--score-color); font-family: Georgia, serif; font-size: 15px; }
.quiz-history-pattern li b, .quiz-history-pattern li strong { font-size: 8px; font-weight: 600; }
.quiz-history-pattern > div:last-child { border-left: 1px solid var(--line); padding-left: 30px; }
.quiz-history-pattern > div:last-child > strong { display: block; font-size: 17px; font-weight: 500; line-height: 1.4; margin-top: 13px; }
.quiz-history-card details { border-top: 1px solid var(--line); }
.quiz-history-card summary { align-items: center; cursor: pointer; display: flex; font-size: 9px; font-weight: 650; justify-content: space-between; letter-spacing: .14em; list-style: none; padding: 20px clamp(24px, 4vw, 48px); text-transform: uppercase; }
.quiz-history-card summary::-webkit-details-marker { display: none; }
.quiz-history-card summary span { font-size: 21px; transition: transform .2s ease; }
.quiz-history-card details[open] summary span { transform: rotate(45deg); }
.quiz-history-details { background: rgba(246,243,237,.72); border-top: 1px solid var(--line); padding: 10px clamp(24px, 4vw, 48px) 40px; }
.quiz-history-answers { list-style: none; margin: 0; padding: 0; }
.quiz-history-answers > li { border-bottom: 1px solid var(--line); display: grid; gap: 30px; grid-template-columns: 1fr 1fr; padding: 22px 0; }
.quiz-history-answers p { font-size: 13px; line-height: 1.55; margin: 0; }
.quiz-history-answers strong { display: block; font-size: 13px; font-weight: 550; line-height: 1.5; margin-top: 5px; }
.quiz-history-ritual { background: var(--paper); margin-top: 34px; padding: 28px; }
.quiz-history-ritual ol { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); margin: 23px 0 0; padding-left: 20px; }
.quiz-history-ritual li { font-size: 12px; line-height: 1.55; padding-left: 5px; }
.quiz-history-ritual blockquote { border-top: 1px solid var(--line); font-family: var(--sans); font-size: 17px; line-height: 1.5; margin: 28px 0 0; padding-top: 23px; text-align: center; }

@media (max-width: 1120px) {
  .quiz-collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-library-hero { grid-template-columns: 1fr; }
  .quiz-library-orbit { width: min(100%, 320px); }
}

@media (max-width: 840px) {
  .quiz-history-pattern { grid-template-columns: 1fr; }
  .quiz-history-pattern > div:last-child { border-left: 0; border-top: 1px solid var(--line); padding: 22px 0 0; }
  .quiz-history-pattern ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .quiz-library-hero { padding: 38px 24px; }
  .quiz-library-hero h2 { font-size: 43px; }
  .quiz-collection-grid { grid-template-columns: 1fr; }
  .quiz-collection-card { min-height: 360px; }
  .quiz-history-card > header { align-items: start; grid-template-columns: 1fr; }
  .quiz-history-primary { min-width: 0; }
  .quiz-history-pattern ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-history-answers > li, .quiz-history-ritual ol { grid-template-columns: 1fr; }
}
