/* Panalo Students — the surfaces. */

/* ---- Shared bits ------------------------------------------------------------- */

.tag + .tag {
  margin-left: 4px;
}
.meter {
  position: relative;
  display: inline-block;
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
  overflow: hidden;
}
.meter i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--tone, var(--world));
  border-radius: 2px;
}
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.small {
  font-size: 12.5px;
}
.member-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.member-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.member-list li:first-child {
  border-top: 0;
}
.member-list li b {
  flex: 1;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}
.task input {
  width: 18px;
  height: 18px;
  accent-color: var(--focus);
  flex: none;
}
.task-due {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}
.task-due.late {
  color: var(--time);
}

/* ---- Now --------------------------------------------------------------------- */

.now-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.now-instrument {
  position: sticky;
  top: calc(var(--bar-h) + 16px);
}
.orbit-wrap {
  position: relative;
  display: block;
  width: min(100%, 560px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
}
.orbit-wrap .orbit-svg,
.cal-orbit .orbit-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.orbit-world {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84%;
  height: 84%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.orbit-track {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1;
}
.orbit-past {
  fill: none;
  stroke: rgba(255, 196, 122, 0.22);
  stroke-width: 3;
}
.orbit-tick {
  stroke: var(--line-2);
  stroke-width: 1;
}
.orbit-tick.major {
  stroke: var(--line-3);
  stroke-width: 1.5;
}
.orbit-label {
  fill: var(--text-3);
  font: 600 9px var(--f-body);
  letter-spacing: 0.06em;
}
.orbit-lane {
  fill: none;
  stroke: rgba(255, 255, 255, 0.035);
  stroke-width: 16;
}
.orbit-lane.thin {
  stroke-width: 8;
}
.orbit-arc {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
}
.orbit-mark {
  cursor: pointer;
  transition: opacity var(--dur-1);
}
.orbit-mark.done {
  opacity: 0.45;
}
.orbit-mark:hover,
.orbit-mark:focus-visible {
  opacity: 1;
  filter: drop-shadow(0 0 6px currentColor);
  outline: none;
}
.orbit-focus {
  fill: none;
  stroke: var(--focus);
  stroke-width: 6;
  stroke-linecap: round;
}
.orbit-done {
  fill: var(--time);
}
.orbit-hand {
  stroke: var(--time);
  stroke-width: 1.6;
}
.orbit-hand-dot {
  fill: var(--time);
  filter: drop-shadow(0 0 6px var(--time));
}
.orbit-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  font-size: 12px;
}
.lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lg i {
  width: 14px;
  height: 4px;
  border-radius: 2px;
}
.lg-time i {
  background: var(--time);
}
.lg-focus i {
  background: var(--focus);
}
.lg-alert i {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  transform: rotate(45deg);
  background: var(--alert);
}
.lg-hand i {
  width: 2px;
  height: 12px;
  background: var(--time);
}

.now-log .panel {
  margin-bottom: 26px;
}
.now-next {
  display: grid;
  gap: 4px;
  padding: 6px 0 10px;
}
.now-next + .now-next {
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.now-title {
  font-size: 19px;
  font-weight: 600;
}
.now-when {
  color: var(--text-2);
  font-size: 14px;
}
.now-big {
  margin-bottom: 10px;
}
.now-big b {
  font: 400 24px/1.1 var(--f-display);
  letter-spacing: -0.03em;
}
.now-live {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--focus);
  font-size: 14px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--focus);
  box-shadow: 0 0 10px var(--focus);
  animation: breathe 2s ease-in-out infinite;
}
.now-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.now-list li {
  padding: 7px 0;
}
.now-list li a {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.now-list li a b {
  white-space: nowrap;
}
.now-list.tasks .task span:nth-child(2) {
  flex: 1;
}
.moon-line {
  display: grid;
  grid-template-columns: 1fr 120px auto;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  font-size: 14px;
}
.moon-line .meter {
  width: 100%;
}
.now-disc {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-2);
}
.now-drift {
  padding: 16px 0 30px;
  color: var(--text-2);
  border-top: 1px solid var(--line);
}
.now-drift a {
  color: var(--drift);
}
@media (max-width: 980px) {
  .now-grid {
    grid-template-columns: 1fr;
  }
  .now-instrument {
    position: static;
  }
  .orbit-wrap {
    width: min(100%, 420px);
  }
}

/* ---- Study Room: deep space at midnight --------------------------------------- */
/* Everything is dimmer and slower here, on purpose. */

body[data-view="study"].in-app {
  background: radial-gradient(ellipse 60% 50% at 50% 30%, rgba(154, 216, 255, 0.05), transparent 70%), #04050b;
}
body[data-view="study"] .sky {
  opacity: 0.18;
}
.study {
  max-width: 1080px;
  margin: 0 auto;
}
.study-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.study-center {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 8px 0 36px;
}
.study-dial {
  position: relative;
  width: min(74vw, 340px);
  aspect-ratio: 1;
}
.study-ring {
  width: 100%;
  height: 100%;
  transform: rotate(0deg);
}
.ring-track {
  fill: none;
  stroke: rgba(154, 216, 255, 0.1);
  stroke-width: 2;
}
.ring-arc {
  fill: none;
  stroke: var(--focus);
  stroke-width: 3;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 130px 130px;
  transition: stroke-dashoffset 0.25s linear;
}
.study[data-phase="rest"] .ring-arc {
  stroke: var(--world);
}
.ring-body {
  fill: #fff;
  filter: drop-shadow(0 0 6px var(--focus));
}
.study[data-status="idle"] .ring-body {
  opacity: 0;
}
.study-dial-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.study-readout {
  font: 300 clamp(48px, 11vw, 70px) / 1 var(--f-display);
  letter-spacing: -0.04em;
}
.study[data-status="paused"] .study-readout {
  opacity: 0.55;
}
.study-phase {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
}
.study-what {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
  width: min(100%, 560px);
}
.study-what .input {
  background: transparent;
  border-color: var(--line);
  text-align: center;
}
.study-what select.input {
  text-align: left;
}
.study-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}
.study-notice {
  max-width: 520px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.study-notice-text b {
  color: var(--focus);
}
.study-low {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  opacity: 0.78;
  transition: opacity var(--dur-2);
}
.study-low:hover,
.study-low:focus-within {
  opacity: 1;
}
.study-panel h2 {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--focus);
  margin-bottom: 12px;
}
.task-form {
  display: grid;
  grid-template-columns: 1fr 140px auto;
  gap: 8px;
  margin-bottom: 10px;
}
.task-form .input {
  min-height: 38px;
  padding: 7px 12px;
}
.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.task-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.task-list li .task {
  flex: 1;
}
.task-title {
  flex: 1;
  min-width: 0;
}
.task-list li.done .task-title {
  text-decoration: line-through;
  color: var(--text-3);
}
.task-x {
  opacity: 0;
}
.task-list li:hover .task-x,
.task-x:focus-visible {
  opacity: 1;
}
.done-list {
  margin-top: 8px;
}
.sound-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
  margin: 14px 0 6px;
}
.preset-custom {
  width: 90px;
  min-height: 34px !important;
  padding: 4px 10px !important;
}
.hist-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 6px;
  height: 78px;
}
.hist-bar {
  display: grid;
  justify-items: center;
  gap: 4px;
  align-content: end;
  height: 100%;
}
.hist-bar i {
  width: 100%;
  max-width: 18px;
  border-radius: 3px 3px 1px 1px;
  background: rgba(154, 216, 255, 0.35);
}
.hist-bar.today i {
  background: var(--focus);
}
.hist-bar span {
  font-size: 10.5px;
  color: var(--text-3);
}
.hist-sum {
  margin: 10px 0;
  font-size: 13.5px;
  color: var(--text-2);
}
.hist-log > li {
  grid-template-columns: 52px 1fr;
  font-size: 13.5px;
}
@media (max-width: 900px) {
  .study-low {
    grid-template-columns: 1fr;
  }
  .study-what {
    grid-template-columns: 1fr;
  }
}

/* Go dark: only the ring remains. */
body.midnight .bar,
body.midnight .dock,
body.midnight .study-low,
body.midnight .study-what,
body.midnight .study-top .kicker,
body.midnight .schema-banner {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
body.midnight .study-center {
  min-height: calc(100vh - 140px);
  align-content: center;
}
body.midnight .sky {
  opacity: 0;
}
.bar,
.dock {
  transition: opacity var(--dur-3), visibility var(--dur-3);
}

/* ---- Signals ------------------------------------------------------------------ */

.signals {
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr;
  gap: 0;
  height: calc(100vh - var(--bar-h) - 36px);
  height: calc(100dvh - var(--bar-h) - 36px);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  background: rgba(10, 13, 25, 0.6);
}
.sig-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 18px;
  border-right: 1px solid var(--line);
}
.sig-head {
  margin: 18px 0 14px;
}
.sig-head h1 {
  font-size: 24px !important;
}
.sig-list > .input {
  min-height: 40px;
  padding: 8px 14px;
}
.sig-chips-slot .chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 12px 0 4px;
  scrollbar-width: none;
}
.chip-count {
  font-size: 11px;
  color: var(--signal);
}
.sig-body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 18px;
  margin: 0 -8px;
  padding-inline: 8px;
}
.sig-group {
  margin-top: 14px;
}
.sig-group-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 4px 6px;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tone);
}
.sig-group-h small {
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-3);
  font-weight: 400;
}
.sig-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-radius: var(--r-2);
  text-decoration: none;
  transition: background var(--dur-1);
}
.sig-row:hover {
  background: rgba(255, 255, 255, 0.035);
}
.sig-row.active {
  background: rgba(185, 163, 255, 0.1);
}
.sig-row.door {
  grid-template-columns: 22px 1fr auto;
}
.sig-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.sig-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.sig-title b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.sig-row.unread .sig-title b {
  color: #fff;
}
.sig-preview {
  font-size: 13px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sig-row.unread .sig-preview {
  color: var(--text-2);
}
.sig-side {
  display: grid;
  justify-items: end;
  gap: 4px;
}
.sig-time {
  font-size: 11.5px;
  color: var(--text-3);
}
.sig-star {
  position: relative;
  width: 10px;
  height: 10px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--tone, var(--signal));
  opacity: var(--b, 0.6);
  box-shadow: 0 0 calc(var(--b, 0.6) * 12px) var(--tone, var(--signal));
}
.sig-star.online::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--world);
  box-shadow: 0 0 0 2px var(--bg);
}
.sig-star.pulsing {
  opacity: 1;
}
.sig-star.pulsing::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--tone, var(--signal));
  animation: pulse 2.2s var(--ease-out) infinite;
}
@keyframes pulse {
  from {
    transform: scale(0.5);
    opacity: 1;
  }
  to {
    transform: scale(1.6);
    opacity: 0;
  }
}

.thread-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.thread-idle {
  margin: auto;
  text-align: center;
  padding: 24px;
}
.idle-line {
  font-size: 40px;
  color: var(--signal);
}
.thread-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.thread-back {
  display: none;
  text-decoration: none;
}
.thread-title {
  flex: 1;
  min-width: 0;
}
.thread-title h2 {
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thread-title p {
  font-size: 12.5px;
  color: var(--text-3);
}
.thread-title .tag {
  color: var(--tone);
  border-color: color-mix(in srgb, var(--tone) 40%, transparent);
}
.thread-banner:empty {
  display: none;
}
.thread-banner .key-banner,
.key-banner {
  display: flex;
  gap: 12px;
  margin: 12px 20px 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 196, 122, 0.35);
  border-radius: var(--r-2);
  background: rgba(255, 196, 122, 0.06);
  font-size: 14px;
}
.key-banner-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.key-banner-btn {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: none;
  font-size: 13px;
}
.thread-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 10px;
  outline: none;
}
.thread-older {
  display: block;
  margin: 0 auto 10px;
}
.thread-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.thread-empty {
  text-align: center;
  padding: 40px 0;
}
.msg-day {
  align-self: center;
  margin: 14px 0 8px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.msg {
  position: relative;
  display: grid;
  max-width: min(78%, 620px);
  margin-top: 6px;
}
.msg.theirs {
  align-self: flex-start;
}
.msg.mine {
  align-self: flex-end;
  justify-items: end;
}
.msg.system {
  align-self: center;
  max-width: 90%;
}
.msg-who {
  font-size: 12px;
  font-weight: 600;
  color: var(--signal);
  margin: 0 0 3px 12px;
}
.msg-bubble {
  padding: 9px 13px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.msg.mine .msg-bubble {
  background: rgba(185, 163, 255, 0.16);
  border-color: rgba(185, 163, 255, 0.28);
}
.msg.theirs .msg-bubble {
  border-top-left-radius: 6px;
}
.msg.mine .msg-bubble {
  border-top-right-radius: 6px;
}
.msg-text {
  white-space: pre-wrap;
}
.msg-text a {
  color: var(--focus);
}
.msg-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 3px 8px 0;
  font-size: 11px;
  color: var(--text-3);
}
.msg.pending {
  opacity: 0.7;
}
.msg.failed .msg-state {
  color: var(--alert);
}
.msg-more {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-2);
  opacity: 0;
  transition: opacity var(--dur-1);
}
.msg.theirs .msg-more {
  right: -34px;
}
.msg.mine .msg-more {
  left: -34px;
}
.msg:hover .msg-more,
.msg-more:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .msg-more {
    opacity: 0.6;
  }
}
.msg-file-local {
  font-size: 13px;
  color: var(--text-2);
}
.key-request {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--text-2);
}
.key-request-share {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--signal);
  background: none;
  color: var(--signal);
  font-size: 12.5px;
}
/* Attachments rendered by src/mediabubble.js */
.media-frame {
  position: relative;
  max-width: 320px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-3);
  min-height: 60px;
}
.media-frame img,
.media-frame video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: cover;
}
.media-frame.loading {
  width: 220px;
  height: 140px;
}
.doc-card,
.locked-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  padding: 8px 4px;
  color: inherit;
  text-decoration: none;
  border: 0;
  background: none;
  text-align: left;
}
.doc-badge {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(231, 209, 155, 0.15);
  color: var(--archive);
  font-size: 11px;
  font-weight: 700;
}
.media-time {
  display: none;
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
}
.composer textarea {
  flex: 1;
  min-height: 42px;
  max-height: 160px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: rgba(7, 9, 18, 0.7);
  resize: none;
  line-height: 1.4;
}
.composer textarea:focus {
  outline: none;
  border-color: var(--signal);
}
.composer .btn {
  min-height: 42px;
}
.composer-note {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 14px;
  text-align: center;
}

.info-enc {
  font-size: 13.5px;
  margin-bottom: 8px;
}
.info-enc a {
  color: var(--focus);
}
.info-block {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.info-block h3 {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}
.info-hosts {
  margin-top: 4px;
}
.door-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
}
.door-code .code {
  font: 400 clamp(26px, 5vw, 36px) / 1 var(--f-display);
  letter-spacing: 0.06em;
  color: var(--time);
}
.qr canvas {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  image-rendering: pixelated;
}
.door-wait-h {
  margin-top: 18px;
}
.info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0 18px;
  border-top: 1px solid var(--line);
}
.code-input {
  font-size: 22px !important;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}
.new-slot {
  margin-top: 18px;
}

@media (max-width: 899px) {
  .signals {
    grid-template-columns: 1fr;
    height: calc(100dvh - var(--bar-h) - var(--dock-h) - 40px - env(safe-area-inset-bottom));
    border-radius: var(--r-2);
  }
  .signals .thread-pane {
    display: none;
  }
  .signals.thread-open .sig-list {
    display: none;
  }
  .signals.thread-open .thread-pane {
    display: flex;
  }
  .thread-back {
    display: inline-grid;
  }
  .msg {
    max-width: 86%;
  }
  .msg.theirs .msg-more {
    right: -30px;
  }
  .msg.mine .msg-more {
    left: -30px;
  }
  body[data-view="signals"] .surface {
    padding-inline: 10px;
  }
}

/* ---- Archive ------------------------------------------------------------------- */

.archive.dropping {
  outline: 2px dashed var(--archive);
  outline-offset: 10px;
  border-radius: var(--r-3);
}
.arch-search {
  max-width: 520px;
  margin-bottom: 14px;
}
.arch-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 8px;
}
.stratum {
  position: relative;
  margin-top: 26px;
  padding-left: 18px;
  border-left: 2px solid color-mix(in srgb, var(--archive) calc(60% - var(--depth) * 8%), transparent);
}
.stratum-h {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--archive);
}
.stratum-h small {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-3);
}
.artifacts {
  list-style: none;
  margin: 0;
  padding: 0;
}
.artifact {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.artifact-glyph {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: radial-gradient(circle at 35% 30%, rgba(231, 209, 155, 0.14), rgba(231, 209, 155, 0.03));
  border: 1px solid rgba(231, 209, 155, 0.18);
}
.glyph path {
  fill: none;
  stroke: var(--archive);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.artifact-label {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.artifact-title {
  font-size: 15.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artifact-file,
.artifact-prov {
  font-size: 12.5px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artifact-prov .scope.shared {
  color: var(--signal);
}
.artifact-note {
  font-size: 13px;
  color: var(--text-2);
  font-style: italic;
}
.artifact-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.no-preview {
  font-size: 12px;
  padding: 0 8px;
}
.preview-slot {
  padding-bottom: 14px;
}
.preview-img,
.preview-media {
  max-width: 100%;
  max-height: 64vh;
  margin: 0 auto;
  border-radius: var(--r-2);
}
.preview-audio {
  width: 100%;
}
.preview-text {
  max-height: 60vh;
  overflow: auto;
  padding: 14px;
  border-radius: var(--r-2);
  background: var(--bg);
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .artifact {
    grid-template-columns: 44px 1fr;
  }
  .artifact-glyph {
    width: 44px;
    height: 44px;
  }
  .artifact-actions {
    grid-column: 2;
  }
  .stratum {
    padding-left: 12px;
  }
}

/* ---- World ------------------------------------------------------------------------ */

.world-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
}
.world-stage {
  display: grid;
  place-items: center;
}
.world-globe {
  width: min(100%, 620px);
  aspect-ratio: 1;
  cursor: grab;
  touch-action: pan-y;
  border-radius: 50%;
}
.world-globe:active {
  cursor: grabbing;
}
.legend {
  list-style: none;
  margin: 0;
  padding: 0;
}
.legend-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.legend-row:first-child {
  border-top: 0;
}
.legend-swatch {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 8px var(--tone);
}
.legend-row b {
  display: block;
  font-size: 14.5px;
}
.legend-row small {
  color: var(--text-3);
  font-size: 12.5px;
}
.legend-val {
  color: var(--tone);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.world-lower {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  margin-top: 30px;
}
.world-lower .panel + .panel {
  margin-top: 0;
}
.moons {
  list-style: none;
  margin: 0;
  padding: 0;
}
.moon {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.moon:first-child {
  border-top: 0;
}
.moon-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: conic-gradient(#f6f2e4 var(--p), rgba(200, 210, 235, 0.15) 0);
}
.moon.full .moon-dot {
  box-shadow: 0 0 10px rgba(255, 230, 180, 0.7);
}
.moon-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.moon-body small {
  color: var(--text-3);
}
.moon-body .meter {
  width: 100%;
}
.log-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.disc-log p {
  font-size: 13px;
}
@media (max-width: 1000px) {
  .world-grid,
  .world-lower {
    grid-template-columns: 1fr;
  }
}

/* ---- Calendar -------------------------------------------------------------------- */

.cal-day {
  display: grid;
  grid-template-columns: minmax(280px, 480px) 1fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
}
.cal-orbit {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}
.agenda {
  list-style: none;
  margin: 0;
  padding: 0;
}
.agenda-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.agenda-item:first-child {
  border-top: 0;
}
.agenda-time {
  font-size: 13px;
  color: var(--tone);
  padding-top: 2px;
}
.agenda-body {
  display: grid;
  gap: 2px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.agenda-body .tag {
  color: var(--tone);
}
.week-grid {
  display: grid;
  grid-template-columns: 52px repeat(7, 1fr);
  --row: 46px;
}
.week-hours {
  display: grid;
  grid-template-rows: repeat(var(--hours), var(--row));
  padding-top: 58px;
}
.week-hours span {
  font-size: 11px;
  color: var(--text-3);
  transform: translateY(-7px);
}
.week-col {
  border-left: 1px solid var(--line);
}
.week-col.today {
  background: rgba(255, 196, 122, 0.035);
}
.week-day {
  display: grid;
  justify-items: center;
  width: 100%;
  height: 58px;
  padding: 6px 0;
  border: 0;
  background: none;
  font-size: 12px;
  color: var(--text-3);
}
.week-day b {
  font-size: 18px;
  color: var(--text);
}
.week-col.today .week-day b {
  color: var(--time);
}
.week-lane {
  position: relative;
  height: calc(var(--hours) * var(--row));
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--row));
}
.week-ev {
  position: absolute;
  left: 3px;
  right: 3px;
  display: grid;
  align-content: start;
  gap: 1px;
  padding: 4px 6px;
  overflow: hidden;
  border: 0;
  border-left: 3px solid var(--tone);
  border-radius: 6px;
  background: color-mix(in srgb, var(--tone) 16%, var(--bg));
  font-size: 11.5px;
  text-align: left;
}
.week-ev b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.week-ev span {
  color: var(--text-3);
}
.week-ev.point {
  min-height: 22px;
}
.week-now {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--time);
  box-shadow: 0 0 6px var(--time);
}
.week-list {
  display: none;
}
.week-list-day {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.week-list-day h3 {
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text-2);
}
@media (max-width: 860px) {
  .cal-day {
    grid-template-columns: 1fr;
  }
  .cal-orbit {
    max-width: 380px;
    margin: 0 auto;
  }
  .week-grid {
    display: none;
  }
  .week-list {
    display: block;
  }
}

/* ---- Drift ------------------------------------------------------------------------ */

body[data-view="drift"].in-app {
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 159, 198, 0.06), transparent 70%), var(--bg);
}
.drift-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.drift-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 7%, transparent), transparent 60%);
  transition: border-color var(--dur-2);
}
.drift-card.open {
  border-color: color-mix(in srgb, var(--tone) 45%, transparent);
}
.drift-card h2 {
  font: 400 18px/1.25 var(--f-display);
  letter-spacing: -0.03em;
}
.drift-card > .btn {
  justify-self: start;
  margin-top: auto;
}
.drift-card.opened:not(.open) {
  opacity: 0.75;
}
.drift-fact {
  font-size: 23px;
  line-height: 1.3;
}
.drift-prompt {
  font-size: 18px;
}
.drift-closing {
  margin: 34px 0 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.drift-end {
  font-size: 40px;
  color: var(--drift);
}
.breathe {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 12px 0;
}
.breathe-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid var(--world);
  box-shadow: 0 0 40px rgba(134, 232, 180, 0.25), inset 0 0 30px rgba(134, 232, 180, 0.15);
  transition-property: transform;
  transition-timing-function: ease-in-out;
}
.breathe-label {
  font-size: 18px;
}
.starlink-wrap {
  display: grid;
  gap: 8px;
}
.starlink {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: var(--r-2);
  background: radial-gradient(circle, rgba(134, 232, 180, 0.04), transparent 70%);
}
.sl-star {
  cursor: pointer;
  outline: none;
}
.sl-star circle:not(.sl-hit) {
  fill: var(--text-2);
  transition: fill var(--dur-1);
}
.sl-hit {
  fill: transparent;
}
.sl-star text {
  fill: var(--text-3);
  font-size: 4.5px;
  font-family: var(--f-body);
}
.sl-star.lit circle:not(.sl-hit) {
  fill: var(--world);
  filter: drop-shadow(0 0 2px var(--world));
}
.sl-star:focus-visible circle:not(.sl-hit) {
  stroke: var(--focus);
  stroke-width: 0.8;
}
.starlink line {
  stroke: var(--world);
  stroke-width: 0.7;
  opacity: 0.8;
}
.listen {
  display: grid;
  justify-items: center;
  gap: 10px;
}
.listen-orbit {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 1px solid rgba(134, 232, 180, 0.4);
  animation: spin 20s linear infinite;
}
.listen-orbit i {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--world);
  box-shadow: 0 0 10px var(--world);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.listen-left {
  font-size: 22px;
}
@media (max-width: 900px) {
  .drift-row {
    grid-template-columns: 1fr;
  }
  .drift-card {
    min-height: 0;
  }
}

/* ---- Safety and Settings ------------------------------------------------------------ */

.safety-cols,
.settings-cols {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}
.settings-cols {
  grid-template-columns: 1fr 1fr;
}
.settings-cols .panel + .panel {
  margin-top: 0;
}
.safety-cols > div .panel + .panel {
  margin-top: 30px;
}
.protect dt {
  font-weight: 600;
  margin-top: 14px;
}
.protect dd {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 14px;
}
.tips {
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 14px;
}
.tips li {
  margin-bottom: 8px;
}
.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.setting:first-of-type {
  border-top: 0;
}
.setting span {
  display: grid;
  gap: 2px;
}
.setting small {
  color: var(--text-3);
  font-size: 12.5px;
}
.setting input[type="checkbox"] {
  appearance: none;
  flex: none;
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  position: relative;
  cursor: pointer;
  transition: background var(--dur-1);
}
.setting input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-2);
  transition: transform var(--dur-1);
}
.setting input[type="checkbox"]:checked {
  background: var(--focus);
}
.setting input[type="checkbox"]:checked::after {
  transform: translateX(18px);
  background: var(--on-accent);
}
.pw-form {
  max-width: 420px;
}
@media (max-width: 900px) {
  .safety-cols,
  .settings-cols {
    grid-template-columns: 1fr;
  }
}

/* With motion reduced, nothing pulses, spins or breathes on its own. */
@media (prefers-reduced-motion: reduce) {
  .sig-star.pulsing::before,
  .live-dot,
  .listen-orbit,
  .splash svg {
    animation: none;
  }
}
:root[data-motion="reduce"] .sig-star.pulsing::before,
:root[data-motion="reduce"] .live-dot,
:root[data-motion="reduce"] .listen-orbit,
:root[data-motion="reduce"] .ht-line,
:root[data-motion="reduce"] .hero-world,
:root[data-motion="reduce"] .ignition,
:root[data-motion="reduce"] .h-disk {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .ht-line,
  .hero-kicker,
  .hero-sub,
  .hero-actions,
  .hero-world,
  .scroll-cue,
  .h-disk,
  .airlock-form,
  .surface,
  dialog.sheet[open],
  .toast {
    animation: none !important;
  }
  .ignition {
    display: none;
  }
}

/* Pieces of src/mediabubble.js, in Students' colours. */
.doc-meta {
  display: grid;
  min-width: 0;
}
.doc-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.doc-sub {
  font-size: 12px;
  color: var(--text-3);
}
.doc-download {
  margin-left: auto;
  color: var(--text-3);
}
.chat-image,
.chat-video {
  display: block;
  max-width: 100%;
  cursor: zoom-in;
}
.key-banner-text {
  color: var(--text);
}
.key-banner-icon,
.key-request-icon {
  color: var(--time);
}
.now-next .tag {
  justify-self: start;
}

/* Upload progress in the archive sheet. */
.upload-meter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.upload-meter[hidden] {
  display: none;
}
.upload-progress {
  flex: 1;
  height: 8px;
  appearance: none;
  border: 0;
  border-radius: 99px;
  overflow: hidden;
  background: var(--line-2);
  accent-color: var(--archive);
}
.upload-progress::-webkit-progress-bar {
  background: var(--line-2);
}
.upload-progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--archive), var(--time));
  transition: width 0.2s;
}
.upload-progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--archive), var(--time));
}
.upload-pct {
  min-width: 6ch;
  text-align: right;
  font-size: 13px;
  color: var(--text-2);
}

/* ---- The sky over Signals (sky.js) ------------------------------------------------ */
.sig-sky {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  min-height: 0;
  padding: 18px 20px 14px;
  background: radial-gradient(ellipse at 50% 40%, rgba(181, 156, 255, 0.07), transparent 65%);
}
.sig-sky-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sky-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-2);
}
.sky-unread {
  color: var(--signal);
}
.sky-back {
  display: none;
}
.sky-foot {
  font-size: 12px;
  text-align: center;
}
.sky-map {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
}
.sky-dust circle {
  fill: #dfe6ff;
  opacity: 0.35;
  animation: sky-twinkle var(--tw, 4s) ease-in-out var(--td, 0s) infinite;
}
@keyframes sky-twinkle {
  50% {
    opacity: 0.08;
  }
}
.sky-line {
  fill: none;
  stroke: var(--tone);
  stroke-width: 1;
  stroke-opacity: 0.32;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: sky-draw 1.6s cubic-bezier(0.6, 0, 0.2, 1) 0.2s forwards;
  transition: stroke-opacity 0.3s, stroke-width 0.3s;
}
@keyframes sky-draw {
  to {
    stroke-dashoffset: 0;
  }
}
.sky-cons.lit .sky-line {
  stroke-opacity: 0.75;
  stroke-width: 1.6;
}
.sky-name {
  font: 600 13px/1 var(--f-body);
  letter-spacing: 0.24em;
  fill: var(--tone);
  opacity: 0.55;
}
.sky-cons.lit .sky-name {
  opacity: 0.95;
}
.sky-star {
  cursor: pointer;
  outline: none;
  animation: sky-in 0.6s cubic-bezier(0.2, 1.3, 0.4, 1) both;
  animation-delay: calc(0.25s + var(--i, 0) * 0.07s);
  transform-box: fill-box;
}
@keyframes sky-in {
  from {
    opacity: 0;
  }
}
.sky-core {
  fill: #fff;
  opacity: calc(0.45 + 0.55 * var(--b, 1));
  transition: r 0.2s;
}
.sky-halo {
  fill: var(--tone);
  opacity: calc(0.18 * var(--b, 1));
  transition: opacity 0.25s;
}
.sky-star:hover .sky-halo,
.sky-star:focus-visible .sky-halo,
.sky-star.current .sky-halo {
  opacity: 0.55;
}
.sky-star:focus-visible .sky-core {
  stroke: var(--focus);
  stroke-width: 2;
}
.sky-pulse {
  fill: none;
  stroke: var(--tone);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: sky-pulse 2.2s ease-out infinite;
}
@keyframes sky-pulse {
  from {
    opacity: 0.9;
    transform: scale(0.8);
  }
  to {
    opacity: 0;
    transform: scale(2.6);
  }
}
.sky-online {
  fill: none;
  stroke: var(--world);
  stroke-width: 1.4;
}
.sky-label {
  font: 500 16px/1 var(--f-body);
  fill: var(--text);
  opacity: calc(0.55 + 0.45 * var(--b, 1));
}
.sky-star:hover .sky-label,
.sky-star:focus-visible .sky-label {
  opacity: 1;
  text-decoration: underline;
}
.sky-count {
  font: 600 13px/1 var(--f-body);
  fill: var(--tone);
}
.member-glyph {
  flex: none;
  width: 44px;
  height: 28px;
}
.member-glyph path {
  fill: none;
  stroke: var(--tone, var(--signal));
  stroke-opacity: 0.5;
  stroke-width: 0.8;
}
.member-glyph circle {
  fill: #fff;
}
.sky-toggle {
  display: none;
}
@media (max-width: 899px) {
  .sky-toggle {
    display: inline-flex;
  }
  .sky-back {
    display: inline-grid;
  }
  .signals.sky-open .sig-list {
    display: none;
  }
  .signals.sky-open .thread-pane {
    display: flex;
  }

}
@media (prefers-reduced-motion: reduce) {
  .sky-dust circle,
  .sky-line,
  .sky-star,
  .sky-pulse {
    animation: none;
    stroke-dashoffset: 0;
  }
}
:root[data-motion="reduce"] .sky-dust circle,
:root[data-motion="reduce"] .sky-line,
:root[data-motion="reduce"] .sky-star,
:root[data-motion="reduce"] .sky-pulse {
  animation: none;
  stroke-dashoffset: 0;
}

/* ---- Moderation (#/moderate) ------------------------------------------------ */
/* Calm and dense: a work tool, not a show. */
.moderate-page {
  max-width: 1180px;
  margin: 0 auto;
}
.mod-body {
  display: grid;
  gap: 18px;
}
.mod-stats {
  display: flex;
  gap: 12px;
}
.mod-stats > div {
  display: grid;
  gap: 2px;
  min-width: 96px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
}
.mod-stats b {
  font: 500 26px/1 var(--f-display);
  font-variant-numeric: tabular-nums;
}
.mod-stats span {
  font-size: 12.5px;
  color: var(--text-3);
}
.mod-list {
  display: grid;
  gap: 12px;
}
.mod-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--alert);
  border-radius: var(--r-2);
  background: var(--surface);
}
.mod-card.status-reviewing {
  border-left-color: var(--time);
}
.mod-card.status-closed {
  border-left-color: var(--line-3);
  opacity: 0.8;
}
.mod-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.mod-card-head time {
  margin-left: auto;
  font-size: 12.5px;
}
.mod-reason,
.mod-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
}
.mod-reason.reason-safety {
  color: var(--void);
  background: var(--alert);
  border-color: var(--alert);
}
.mod-who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: 16px;
}
.mod-repeat {
  font-size: 12.5px;
  color: var(--time);
}
.mod-banned {
  font-size: 12.5px;
  color: var(--alert);
}
.mod-details {
  margin: 0;
  white-space: pre-wrap;
}
.mod-evidence,
.mod-note {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--r-1);
  background: var(--surface-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mod-evidence small,
.mod-note small {
  font-size: 11.5px;
  color: var(--text-3);
}
.mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.mod-side {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.mod-log {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  max-height: 360px;
  overflow: auto;
}
.mod-door {
  max-width: 460px;
  margin: 6vh auto 0;
  display: grid;
  gap: 12px;
  padding: 26px;
}
.me-btn {
  position: relative;
}
.me-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--alert);
  box-shadow: 0 0 0 2px var(--bg);
}

/* ---- Livelier empty places --------------------------------------------------- */
/* Calendar: an empty day offers the five kinds of thing that go on an orbit. */
.cal-empty {
  display: grid;
  gap: 14px;
  padding: 6px 0 4px;
}
.cal-empty-lead {
  margin: 0;
  font: 400 clamp(20px, 2.2vw, 26px) / 1.2 var(--f-serif);
  font-style: italic;
  color: var(--text);
}
.quick-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 12px;
  border: 1px solid color-mix(in srgb, var(--tone) 35%, var(--line));
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--tone) 9%, var(--surface));
  color: var(--text);
  font: 600 13.5px/1 var(--f-body);
  cursor: pointer;
  transition: background var(--dur-1), border-color var(--dur-1), transform var(--dur-1);
}
.quick-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 8px var(--tone);
}
.quick-chip:hover {
  background: color-mix(in srgb, var(--tone) 18%, var(--surface));
  border-color: var(--tone);
  transform: translateY(-1px);
}
.quick-chip::before {
  content: "+";
  color: var(--tone);
  font-weight: 700;
  margin-right: -2px;
}
.tone-alert {
  --tone: var(--alert);
}

/* Archive: an empty archive shows the shelves it will become. */
.archive-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  margin-top: 8px;
  padding: clamp(22px, 4vw, 40px);
  border: 1px dashed color-mix(in srgb, var(--archive) 40%, var(--line));
  border-radius: var(--r-3);
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--archive) 9%, transparent), transparent 60%),
    var(--bg-2);
}
.archive-empty h3 {
  margin: 0 0 8px;
  font: 500 clamp(22px, 2.4vw, 30px) / 1.15 var(--f-display);
  letter-spacing: -0.02em;
}
.archive-empty p {
  margin: 0 0 18px;
  color: var(--text-2);
  max-width: 46ch;
}
.shelf-art {
  position: relative;
  width: min(100%, 340px);
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 2px solid color-mix(in srgb, var(--archive) 45%, transparent);
}
.shelf-file {
  display: grid;
  place-items: end start;
  aspect-ratio: 4 / 5;
  padding: 9px;
  border-radius: 6px 14px 6px 6px;
  font: 600 11px/1 var(--f-mono, monospace);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, var(--surface-2)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line));
  transform: rotate(var(--r, 0deg));
}
.shelf-file.f0 { --c: var(--alert); --r: -3deg; }
.shelf-file.f1 { --c: var(--time); --r: 2deg; }
.shelf-file.f2 { --c: var(--drift); --r: -1deg; }
.shelf-file.f3 { --c: var(--world); --r: 3deg; }
.shelf-file.f4 { --c: var(--archive); --r: -2deg; }
.shelf-file.f5 { --c: var(--focus); --r: 1deg; }
@media (max-width: 760px) {
  .archive-empty {
    grid-template-columns: 1fr;
  }
  .shelf-art {
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
  }
  .shelf-file {
    font-size: 8.5px;
    padding: 5px;
  }
}

/* Drift: how many of today's three, and when new ones arrive. */
.drift-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--text-2);
}
.drift-dots {
  display: inline-flex;
  gap: 5px;
}
.drift-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--drift);
}
.drift-dots i.on {
  background: var(--drift);
  box-shadow: 0 0 8px var(--drift);
}

/* The Study Room: quieter still. */
body[data-view="study"] .sky {
  opacity: 0.1;
}

/* Each Drift card carries a large, faint mark of what it is. */
.drift-card {
  position: relative;
  overflow: hidden;
  min-height: 240px;
}
.drift-card::after {
  content: attr(data-glyph);
  position: absolute;
  right: -6px;
  bottom: -34px;
  font: 300 150px/1 var(--f-serif);
  color: var(--tone, var(--drift));
  opacity: 0.09;
  pointer-events: none;
  transition: opacity var(--dur-2), transform var(--dur-3) var(--ease-out);
}
.drift-card:hover::after {
  opacity: 0.16;
  transform: rotate(-6deg) scale(1.04);
}
.drift-card.opened::after {
  opacity: 0.05;
}
.mod-due {
  font-size: 12px;
  color: var(--time);
}

/* The yearly rules reminder (rules-reminder.js). */
.rules-card {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  background: var(--surface-2);
  box-shadow: var(--shadow-2);
}
.rules-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
}
.rules-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 760px) {
  .rules-card {
    bottom: calc(var(--dock-h) + 12px + env(safe-area-inset-bottom));
  }
}

/* ---- The day as a ritual (phase 24) ------------------------------------------- */

/* Dawn: the first seconds of the day, over your own world. */
.dawn {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--s-6);
  padding: var(--gutter);
  background: var(--void);
  overflow: hidden;
  animation: dawn-in 900ms var(--ease-out) both;
}
.dawn.leaving {
  animation: dawn-out 450ms var(--ease-cine) both;
}
.dawn-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* The light coming up behind the world. */
  background:
    radial-gradient(60% 50% at 30% 62%, rgba(255, 196, 122, 0.16), transparent 70%),
    radial-gradient(90% 70% at 30% 70%, rgba(154, 216, 255, 0.07), transparent 75%);
  animation: dawn-glow 3600ms var(--ease-out) both;
}
.dawn-world {
  position: relative;
  justify-self: center;
  width: min(62vh, 46vw, 640px);
  aspect-ratio: 1;
  animation: dawn-rise 3200ms var(--ease-out) both;
}
.dawn-card {
  position: relative;
  max-width: 34rem;
}
.dawn-title {
  margin: 10px 0 6px;
  font: 400 clamp(34px, 5vw, 64px) / 1.02 var(--f-display);
  letter-spacing: -0.04em;
}
.dawn-day {
  display: block;
  animation: dawn-line 900ms var(--ease-out) 700ms both;
}
.dawn-of {
  display: block;
  font: italic 400 clamp(22px, 2.6vw, 32px) / 1.2 var(--f-serif);
  letter-spacing: 0;
  color: var(--text-2);
  animation: dawn-line 900ms var(--ease-out) 1000ms both;
}
.dawn-date,
.dawn-since {
  animation: dawn-line 700ms var(--ease-out) 500ms both;
}
.dawn-since {
  margin: 22px 0 6px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dawn-lines {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.dawn-lines li {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  color: var(--text);
  animation: dawn-line 700ms var(--ease-out) calc(1500ms + var(--i) * 280ms) both;
}
.dawn-lines li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--time);
  box-shadow: 0 0 10px var(--time);
}
.dawn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: dawn-line 700ms var(--ease-out) 2600ms both;
}
.dawn-skip {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
}
.dawn.still,
.dawn.still * {
  animation: none !important;
}
@keyframes dawn-in { from { opacity: 0; } }
@keyframes dawn-out { to { opacity: 0; transform: scale(1.02); } }
@keyframes dawn-glow { from { opacity: 0; transform: translateY(8%); } }
@keyframes dawn-rise { from { opacity: 0; transform: translateY(6%) scale(0.94); } }
@keyframes dawn-line { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 760px) {
  .dawn {
    grid-template-columns: 1fr;
    align-content: center;
    gap: var(--s-4);
    overflow-y: auto;
  }
  .dawn-world {
    width: min(58vw, 34vh, 320px);
  }
  .dawn-card {
    text-align: center;
    margin: 0 auto;
  }
  .dawn-lines li {
    padding-left: 0;
  }
  .dawn-lines li::before {
    display: none;
  }
  .dawn-actions {
    justify-content: center;
  }
}
body.in-dawn .fx-ambient {
  opacity: 0;
}

/* Today, on Now: the one thing, the week's stars, closing the day. */
.intention {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 12px;
}
.intention-label {
  flex-basis: 100%;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.intention-text {
  font: italic 400 21px / 1.25 var(--f-serif);
  flex: 1 1 14rem;
}
.intention.done .intention-text {
  color: var(--text-2);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--world) 60%, transparent);
}
.intention-set {
  margin-bottom: 12px;
  font: italic 400 19px / 1.3 var(--f-serif);
}
.rhythm-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.rhythm {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rhythm li {
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-3);
}
.rhythm i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid var(--line-3);
}
.rhythm li.lit i {
  border-color: transparent;
  background: var(--time);
  box-shadow: 0 0 10px color-mix(in srgb, var(--time) 70%, transparent);
}
.rhythm li.today i {
  outline: 1px solid color-mix(in srgb, var(--time) 55%, transparent);
  outline-offset: 3px;
}
.rhythm li.today span {
  color: var(--text);
}
.rhythm-line {
  margin: 0;
  font-size: 13px;
}
.closed-line {
  margin: 0;
}

/* The evening check-in. */
.chips.scale .chip {
  min-width: 0;
}
.checkin-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.act-on {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.act-on .mins {
  min-height: 34px;
  padding: 4px 8px;
  width: auto;
}
.intention-picks {
  margin-top: 4px;
}

/* World: this month, in stars; the journal. */
.world-days {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--s-5);
  margin-top: var(--s-5);
}
@media (max-width: 900px) {
  .world-days {
    grid-template-columns: 1fr;
  }
}
.sky-wrap {
  position: relative;
  z-index: 1;
}
.month-sky {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  /* Its own patch of night, so the month never mixes with the ambient stars. */
  background:
    radial-gradient(70% 80% at 50% 45%, rgba(255, 196, 122, 0.06), transparent 70%),
    var(--void);
}
.sky-num {
  font: 600 2.1px var(--f-body);
  fill: var(--text-3);
  text-anchor: middle;
}
.sky-star.today .sky-num {
  fill: var(--time);
}
.sky-link {
  stroke: color-mix(in srgb, var(--time) 45%, transparent);
  stroke-width: 0.22;
  stroke-linecap: round;
}
.sky-star circle:first-child {
  fill: none;
  stroke: var(--text-3);
  stroke-width: 0.18;
  opacity: 0.7;
}
.sky-star.future circle:first-child {
  opacity: 0.18;
}
.sky-star.lit circle:first-child {
  fill: var(--time);
  stroke: none;
  opacity: 1;
  filter: drop-shadow(0 0 1.2px var(--time));
}
.sky-today {
  fill: none;
  stroke: color-mix(in srgb, var(--time) 60%, transparent);
  stroke-width: 0.25;
  transform-box: fill-box;
  transform-origin: center;
  animation: sky-pulse 2.6s var(--ease-out) infinite;
}
@keyframes sky-pulse {
  0% { opacity: 0.9; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(1.5); }
}
@media (prefers-reduced-motion: reduce) {
  .sky-today { animation: none; }
}
html[data-motion="reduce"] .sky-today {
  animation: none;
}
.sky-caption {
  margin: 10px 0 0;
  font-size: 13px;
}
.journal {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.page {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.page-date {
  margin-right: 4px;
}
.page-line {
  margin: 2px 0 0;
  color: var(--text-2);
}

/* ---- Weeks, moments, seasons, time (batch 2) --------------------------------- */

/* The weekly chronicle: full-screen slides, tap through. */
.story {
  position: fixed;
  inset: 0;
  z-index: 62;
  display: grid;
  place-items: center;
  padding: calc(56px + env(safe-area-inset-top)) var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background: var(--void);
  overflow: hidden;
  animation: dawn-in 600ms var(--ease-out) both;
}
.story.leaving {
  animation: dawn-out 400ms var(--ease-cine) both;
}
.story-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 40% at 50% 30%, rgba(185, 163, 255, 0.1), transparent 70%),
    radial-gradient(60% 50% at 50% 100%, rgba(255, 196, 122, 0.08), transparent 70%);
}
.story-progress {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  left: var(--gutter);
  right: calc(var(--gutter) + 84px);
  display: flex;
  gap: 6px;
}
.story-progress span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--line-2);
  overflow: hidden;
}
.story-progress span i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--text);
}
.story-progress span.done i {
  width: 100%;
}
.story-progress span.now i {
  animation: story-fill var(--ms, 5200ms) linear both;
}
@keyframes story-fill { to { width: 100%; } }
.story-close {
  position: absolute;
  top: calc(6px + env(safe-area-inset-top));
  right: 10px;
  z-index: 2;
}
.story-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  border: 0;
  background: none;
  cursor: pointer;
  z-index: 1;
}
.story-nav.prev { left: 0; }
.story-nav.next { right: 0; width: 70%; }
.story-nav:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--line-3);
}
.story-stage {
  position: relative;
  width: min(36rem, 100%);
  pointer-events: none; /* taps go to the nav zones */
}
.slide {
  display: grid;
  gap: 14px;
  justify-items: start;
}
.slide.in > * {
  animation: dawn-line 700ms var(--ease-out) both;
}
.slide.in > *:nth-child(2) { animation-delay: 120ms; }
.slide.in > *:nth-child(3) { animation-delay: 240ms; }
.slide.in > *:nth-child(4) { animation-delay: 360ms; }
.slide.in > *:nth-child(5) { animation-delay: 480ms; }
.story-title {
  margin: 0;
  font: 400 clamp(44px, 9vw, 96px) / 0.95 var(--f-display);
  letter-spacing: -0.05em;
}
.story-serif {
  margin: 0;
  font: italic 400 clamp(22px, 3.2vw, 32px) / 1.2 var(--f-serif);
  color: var(--text-2);
}
.story-big-line {
  margin: 18px 0 0;
  font-size: 18px;
}
.story-num {
  font: 400 clamp(56px, 12vw, 120px) / 0.95 var(--f-display);
  letter-spacing: -0.05em;
  color: var(--tone, var(--text));
}
.story-sub {
  margin: 0;
  font-size: 17px;
  color: var(--text);
}
.story-pair {
  display: grid;
  gap: 6px;
}
.story-bars-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  width: 100%;
  height: 120px;
  align-items: end;
}
.story-bars-chart .sb {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
  gap: 6px;
  justify-items: center;
  font-size: 12px;
  color: var(--text-3);
}
.story-bars-chart i {
  align-self: end;
  width: 100%;
  height: 0;
  border-radius: 6px 6px 2px 2px;
  background: color-mix(in srgb, var(--focus) 45%, transparent);
  transition: height 900ms var(--ease-out);
}
.story-bars-chart.grow i {
  height: var(--h);
}
.story-bars-chart .sb.best i {
  background: var(--focus);
  box-shadow: 0 0 18px color-mix(in srgb, var(--focus) 50%, transparent);
}
.story-subjects {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  gap: 14px;
}
.story-subjects li {
  display: grid;
  grid-template-columns: minmax(6rem, auto) 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 17px;
}
.story-meter {
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.story-meter i {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--focus);
  animation: meter-in 1000ms var(--ease-out) 300ms both;
}
@keyframes meter-in { from { width: 0; } }
.story-list {
  margin: 0;
  padding-left: 1.1em;
  font-size: 17px;
  display: grid;
  gap: 6px;
}
.story-disc { margin: 0; }
.story-week {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.story-week li {
  display: grid;
  justify-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}
.story-week i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line-3);
}
.story-week li.lit i {
  border-color: transparent;
  background: var(--time);
  box-shadow: 0 0 16px color-mix(in srgb, var(--time) 70%, transparent);
}
.story-quotes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.story-quotes q {
  display: block;
  font: italic 400 clamp(20px, 2.8vw, 28px) / 1.25 var(--f-serif);
}
.story-worlds {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.story-worlds figure {
  margin: 0;
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
}
.story-globe {
  width: min(100%, 220px);
  aspect-ratio: 1;
}
.story-arrow {
  font-size: 28px;
  color: var(--text-3);
}
.story.still .slide > *,
.story.still .story-progress i,
.story.still .story-meter i {
  animation: none !important;
}

/* A discovery moment. */
.moment {
  position: fixed;
  inset: 0;
  z-index: 64;
  display: grid;
  place-items: center;
  background: radial-gradient(60% 60% at 50% 50%, rgba(255, 196, 122, 0.14), var(--void) 70%);
  animation: dawn-in 300ms var(--ease-out) both;
}
.moment.leaving {
  animation: dawn-out 380ms var(--ease-cine) both;
}
.moment-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #fff, rgba(255, 220, 170, 0.6) 20%, transparent 60%);
  animation: moment-flash 900ms var(--ease-out) both;
}
@keyframes moment-flash {
  0% { opacity: 1; transform: scale(0.2); }
  100% { opacity: 0; transform: scale(2.2); }
}
.moment-world {
  position: absolute;
  width: min(80vmin, 640px);
  aspect-ratio: 1;
  opacity: 0.55;
  animation: dawn-rise 1600ms var(--ease-out) both;
}
.moment-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 34rem;
  padding: 0 var(--gutter);
  text-align: center;
}
.moment-title {
  margin: 0;
  font: 400 clamp(36px, 7vw, 76px) / 1 var(--f-display);
  letter-spacing: -0.04em;
  text-shadow: 0 0 40px rgba(255, 196, 122, 0.45);
}
.moment-title span {
  display: inline-block;
  animation: moment-letter 600ms var(--ease-out) calc(250ms + var(--i) * 35ms) both;
}
@keyframes moment-letter {
  from { opacity: 0; transform: translateY(0.4em) scale(1.3); filter: blur(6px); }
}
.moment-detail {
  margin: 0;
  font: italic 400 clamp(19px, 2.4vw, 24px) / 1.3 var(--f-serif);
  color: var(--text-2);
  animation: dawn-line 700ms var(--ease-out) 900ms both;
}
.moment-card .btn {
  animation: dawn-line 700ms var(--ease-out) 1100ms both;
}
.moment.still *,
.moment.still {
  animation: none !important;
}
.moment.still .moment-flash {
  display: none;
}

/* Watch it grow. */
.timelapse {
  position: fixed;
  inset: 0;
  z-index: 62;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: calc(48px + env(safe-area-inset-top)) var(--gutter) calc(24px + env(safe-area-inset-bottom));
  background: radial-gradient(60% 60% at 50% 45%, rgba(134, 232, 180, 0.08), var(--void) 70%);
  text-align: center;
}
.timelapse-close {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top));
  right: 10px;
}
.timelapse-title {
  margin: 0;
  font: 400 clamp(26px, 4vw, 40px) / 1.1 var(--f-display);
  letter-spacing: -0.03em;
}
.timelapse-world {
  width: min(62vh, 82vw, 560px);
  aspect-ratio: 1;
}
.timelapse-date {
  margin: 0;
  font: 400 22px / 1.2 var(--f-display);
  letter-spacing: -0.02em;
}
.timelapse-stats {
  margin: 0;
}
.timelapse-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  width: min(30rem, 100%);
}
.timelapse-controls .range {
  flex: 1;
}

/* The season, on World. */
.season-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 10px 0 0;
  font-size: 13px;
}
.season-meter {
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
  overflow: hidden;
}
.season-meter i {
  display: block;
  height: 100%;
  background: var(--world);
}
body.in-story .fx-ambient {
  opacity: 0;
}

/* ---- Surface upgrades (batch 3) ------------------------------------------------ */

/* Calendar: quick add and exam countdowns. */
.quick-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  margin: 0 0 var(--s-4);
}
.quick-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-height: 1.4em;
}
.quick-preview {
  margin: 0;
  font-size: 13px;
}
.countdowns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 var(--s-4);
}
.countdown {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 0 6px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--drift) 35%, transparent);
  border-radius: var(--r-2);
  background: color-mix(in srgb, var(--drift) 7%, transparent);
  color: var(--text);
  text-align: left;
}
.countdown b {
  font: 400 28px / 1 var(--f-display);
  letter-spacing: -0.03em;
  color: var(--drift);
}
.countdown-title {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--text-2);
}
.now-list.exams li {
  display: grid;
  grid-template-columns: 5.5em 1fr auto;
  gap: 10px;
  align-items: baseline;
}
.exam-days {
  color: var(--drift);
}

/* Study: plan, reflection, subjects. */
.plan-label {
  align-self: center;
  margin-right: 4px;
}
.reflect {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 10px 0;
}
.subj-bars {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.subj-bars li {
  display: grid;
  grid-template-columns: minmax(5rem, 9rem) 1fr auto;
  gap: 8px;
  align-items: center;
}
.subj-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subj-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.subj-bar i {
  display: block;
  height: 100%;
  background: var(--focus);
}

/* Drift: kept facts. */
.drift-save {
  margin-top: 8px;
}
.drift-saved {
  margin-top: var(--s-5);
}
.drift-saved summary {
  cursor: pointer;
  font-weight: 600;
}
.saved-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.saved-list p {
  margin: 0 0 2px;
}

/* Archive: kinds and the count. */
.kind-chips {
  margin-top: 8px;
}
.arch-count {
  align-self: center;
  font-size: 13px;
}
