:root {
  --warm-white: #fffdf9;
  --paper: #fbf6ee;
  --sand: #f5f0e8;
  --sand-2: #ede5d8;
  --sand-3: #d4c8b0;
  --ink: #3a3530;
  --ink-soft: #65594b;
  --ink-mute: #8f8472;
  --ocean: #2e6b8a;
  --sky: #8fafc0;
  --amber: #b87b1a;
  --moss: #708566;
  --plum: #6e4658;
  --rose: #b87864;
  --line: rgba(58, 53, 48, 0.1);
  --sidebar: 250px;
  --radius-xl: 34px;
  --radius-lg: 24px;
  --shadow-soft: 0 20px 52px -36px rgba(58, 53, 48, 0.46);
  --shadow-blue: 0 18px 34px -20px rgba(46, 107, 138, 0.72);
  --serif: "Instrument Serif", Georgia, serif;
  --read: "Source Serif 4", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(76% 66% at 72% -12%, rgba(255, 226, 168, 0.22), rgba(255, 226, 168, 0) 58%),
    linear-gradient(180deg, #f8f2e8 0%, var(--sand) 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  background-size: 180px;
  content: "";
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.app {
  display: flex;
  height: 100vh;
  min-height: 100vh;
}

.app.is-gated .sidebar,
.app.is-gated .main,
.app.is-gated .mobile-tabbar,
.app.is-gated .mobile-auth-button {
  pointer-events: none;
  user-select: none;
  opacity: 0.45;
  filter: blur(2.5px) saturate(0.84);
  transform: scale(0.995);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex: 0 0 var(--sidebar);
  flex-direction: column;
  height: 100vh;
  padding: 30px 20px 24px;
  border-right: 1px solid rgba(237, 229, 216, 0.86);
  background: rgba(255, 253, 249, 0.86);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 12px;
  margin-bottom: 40px;
}

.brand-word {
  font-family: var(--serif);
  font-size: 39px;
  line-height: 1;
}

.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 0;
  border-radius: 13px;
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}

.nav-button:hover,
.nav-button.is-active {
  color: var(--ink);
  background: rgba(245, 240, 232, 0.9);
}

.nav-button.is-active::before {
  position: absolute;
  top: 50%;
  left: -20px;
  width: 3px;
  height: 22px;
  border-radius: 99px;
  background: var(--amber);
  transform: translateY(-50%);
  content: "";
}

.nav-icon {
  width: 22px;
  height: 22px;
  color: currentColor;
  opacity: 0.78;
}

.nav-button.is-active .nav-icon {
  opacity: 1;
}

.nav-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 74px;
  margin-top: 28px;
  padding: 16px 18px;
  border: 0;
  border-radius: 17px;
  color: var(--warm-white);
  background: var(--ocean);
  box-shadow: var(--shadow-blue);
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 38px -20px rgba(46, 107, 138, 0.78);
}

.nav-cta-title {
  display: block;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.08;
}

.nav-cta-sub {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.7px;
  line-height: 1.35;
  text-transform: uppercase;
  opacity: 0.78;
}

.side-spacer {
  flex: 1;
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 13px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.profile:hover {
  background: rgba(245, 240, 232, 0.86);
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--warm-white);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 253, 249, 0.35), rgba(255, 253, 249, 0) 32%),
    linear-gradient(135deg, #62629a, #dfaa8a);
  font-family: var(--serif);
  font-size: 19px;
}

.profile-name {
  display: block;
  font-size: 16px;
}

.profile-meta,
.eyebrow,
.section-label,
.tiny,
.tag-count,
.entry-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.profile-meta {
  display: block;
  margin-top: 1px;
  color: var(--ink-mute);
}

.main {
  flex: 1;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.canvas {
  width: min(1320px, calc(100% - 88px));
  margin: 0 auto;
  padding: 44px 0 92px;
}

.view {
  animation: view-rise 420ms cubic-bezier(0.2, 0.7, 0.25, 1) both;
}

@keyframes view-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero {
  position: relative;
  min-height: 328px;
  overflow: hidden;
  padding: 54px 56px;
  border-radius: var(--radius-xl);
  color: var(--warm-white);
  background:
    radial-gradient(28% 24% at 84% 46%, rgba(255, 226, 168, 0.58), rgba(255, 226, 168, 0) 66%),
    radial-gradient(70% 80% at 8% 2%, rgba(143, 175, 192, 0.72), rgba(143, 175, 192, 0) 62%),
    radial-gradient(78% 80% at 52% 100%, rgba(201, 184, 148, 0.74), rgba(201, 184, 148, 0) 68%),
    linear-gradient(135deg, #93a4b8 0%, #d7ccb9 48%, #f6db9e 100%);
  box-shadow: 0 34px 70px -44px rgba(58, 53, 48, 0.68);
}

.hero::before {
  position: absolute;
  right: 44px;
  top: 46%;
  width: 230px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.55);
  box-shadow: -82px 0 0 -1px rgba(255, 253, 249, 0.18);
  content: "";
}

.hero::after {
  position: absolute;
  right: 122px;
  top: calc(46% - 15px);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 220, 163, 0.5);
  filter: blur(1px);
  box-shadow: 0 0 24px rgba(255, 217, 153, 0.46);
  content: "";
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.eyebrow {
  color: var(--amber);
  margin-bottom: 14px;
}

.hero .eyebrow {
  color: rgba(255, 253, 249, 0.74);
}

.hero h1 {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: clamp(56px, 5.6vw, 82px);
  font-weight: 400;
  line-height: 0.9;
}

.hero h1 em,
.page-title em {
  font-style: italic;
  color: var(--ocean);
}

.hero h1 em {
  color: var(--warm-white);
}

.hero-sub {
  margin: 0 0 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 253, 249, 0.73);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 650;
  color: var(--ocean);
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 18px 34px -24px rgba(58, 53, 48, 0.66);
}

.button.secondary {
  color: rgba(255, 253, 249, 0.92);
  background: rgba(255, 253, 249, 0.12);
  border: 1px solid rgba(255, 253, 249, 0.27);
  box-shadow: none;
}

.button.dark {
  color: var(--warm-white);
  background: var(--ocean);
}

.button.paper {
  color: var(--ink-soft);
  background: rgba(255, 253, 249, 0.7);
  border: 1px solid rgba(212, 200, 176, 0.62);
  box-shadow: none;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}

.panel {
  border: 1px solid rgba(237, 229, 216, 0.78);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.56);
  box-shadow: var(--shadow-soft);
}

.panel-pad {
  padding: 28px 30px;
}

.now-list {
  display: grid;
}

.now-item {
  display: grid;
  grid-template-columns: 72px 1fr 48px;
  gap: 18px;
  align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.now-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.now-item:last-child {
  padding-bottom: 0;
}

.now-cover {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 14px 30px -24px rgba(58, 53, 48, 0.7);
}

.now-item h3,
.day-row h3,
.library-row h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 400;
  line-height: 1;
}

.now-item p,
.day-row p,
.library-row p,
.note-card p {
  margin: 7px 0 0;
  color: var(--ink-mute);
  font-family: var(--read);
  font-size: 17px;
  font-style: italic;
  line-height: 1.34;
}

.round-action {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: var(--warm-white);
  background: var(--ocean);
  font-size: 23px;
}

.arrow-link {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  color: rgba(58, 53, 48, 0.35);
  background: transparent;
  font-size: 23px;
}

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

.listen-card,
.feature-player {
  overflow: hidden;
  color: rgba(255, 253, 249, 0.92);
  background:
    radial-gradient(72% 90% at 100% 100%, rgba(235, 183, 147, 0.72), rgba(235, 183, 147, 0) 64%),
    linear-gradient(135deg, #53588e 0%, #877caf 48%, #dba887 100%);
  box-shadow: 0 26px 54px -34px rgba(83, 88, 142, 0.8);
}

.listen-card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-lg);
}

.listen-cover {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 22px;
  opacity: 0.38;
  box-shadow: 0 22px 44px -26px rgba(20, 24, 38, 0.72);
}

.listen-card .eyebrow,
.feature-player .eyebrow {
  position: relative;
  z-index: 1;
  color: rgba(255, 253, 249, 0.72);
}

.listen-title {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 62px);
  margin-bottom: 28px;
  font-family: var(--read);
  font-size: 30px;
  font-style: italic;
  font-weight: 430;
  line-height: 1.2;
}

.inline-player {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 16px;
  align-items: center;
}

.play {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  color: var(--plum);
  background: rgba(255, 253, 249, 0.86);
  font-size: 21px;
}

.track {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.28);
}

.track span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 253, 249, 0.86);
}

.player-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: rgba(255, 253, 249, 0.7);
}

.note-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.55);
  border: 1px solid rgba(237, 229, 216, 0.78);
}

.note-card blockquote {
  margin: 0;
  font-family: var(--read);
  font-size: 25px;
  font-style: italic;
  line-height: 1.34;
  color: var(--ink);
}

.memory-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.58);
  border: 1px solid rgba(237, 229, 216, 0.82);
}

.memory-card + .memory-card {
  margin-top: 14px;
}

.swatch {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: linear-gradient(135deg, #d6e4f7, #efe8d7, #e6d2b6);
}

.swatch.warm {
  background: linear-gradient(135deg, #fff1e4, #f7d3b4, #ebb793);
}

.swatch.tender {
  background: linear-gradient(135deg, #62629a, #8d82b0 52%, #e1aa87);
}

.swatch.tired {
  background: linear-gradient(135deg, #272e4f, #544f73, #7e6e7c);
}

.swatch.steady {
  background: linear-gradient(135deg, #dce6d2, #a9be97, #73886a);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 34px 6px 14px;
}

.section-label {
  color: var(--ink-mute);
}

.section-link {
  border: 0;
  color: var(--amber);
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.page-head {
  max-width: 920px;
  margin-bottom: 34px;
}

.page-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(54px, 6vw, 78px);
  font-weight: 400;
  line-height: 0.94;
}

.page-sub {
  margin: 11px 0 0;
  color: var(--ink-mute);
  font-family: var(--read);
  font-size: 22px;
  font-style: italic;
}

.journal-grid {
  display: grid;
  grid-template-columns: minmax(480px, 1.08fr) minmax(360px, 0.78fr);
  gap: 24px;
  align-items: start;
}

.journal-search-row {
  max-width: 920px;
  margin: -10px 0 28px;
}

.journal-search-row .tag-row {
  margin-bottom: 0;
}

.journal-archive {
  display: grid;
  gap: 20px;
}

.journal-archive > .section-label {
  margin: 2px 0 -6px;
}

.today-page {
  position: relative;
  min-height: 720px;
  padding: 36px;
  overflow: hidden;
  border: 1px solid rgba(237, 229, 216, 0.82);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.74), rgba(255, 253, 249, 0.52)),
    radial-gradient(110% 78% at 0% 0%, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0) 58%);
  box-shadow: var(--shadow-soft);
}

.today-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 154px;
  gap: 26px;
  align-items: start;
}

.today-page-head h2 {
  max-width: 540px;
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 68px;
  font-weight: 400;
  line-height: 0.92;
}

.today-cover {
  width: 154px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 22px 48px -32px rgba(58, 53, 48, 0.72);
}

.today-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.today-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--ink-mute);
  background: rgba(237, 229, 216, 0.52);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.today-writing {
  display: block;
  width: 100%;
  min-height: 172px;
  margin-top: 24px;
  padding: 0;
  resize: vertical;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--read);
  font-size: 31px;
  font-weight: 430;
  line-height: 1.25;
}

.today-writing:focus {
  box-shadow: inset 0 -2px 0 rgba(46, 107, 138, 0.26);
}

.today-timeline {
  display: grid;
  gap: 0;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.today-moment {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 18px;
  padding: 17px 0;
  border-top: 1px solid rgba(237, 229, 216, 0.68);
}

.today-moment:first-child {
  border-top: 0;
}

.today-moment time,
.today-moment span {
  color: var(--ink-mute);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.today-moment h3 {
  margin: 3px 0 6px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

.today-moment p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.42;
}

.empty-note {
  margin: 10px 0 0;
  color: var(--ink-mute);
  font-family: var(--read);
  font-size: 18px;
  font-style: italic;
}

.moment-audio,
.recording-preview {
  display: block;
  width: min(100%, 360px);
  margin-top: 12px;
}

.today-add {
  position: absolute;
  right: 34px;
  bottom: 34px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  color: var(--warm-white);
  background: var(--ocean);
  box-shadow: 0 18px 34px -24px rgba(46, 107, 138, 0.72);
  font-size: 30px;
  line-height: 1;
}

.searchbar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 0 22px;
  border: 1px solid var(--sand-3);
  border-radius: 18px;
  background: var(--warm-white);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.searchbar:focus-within {
  border-color: rgba(46, 107, 138, 0.78);
  box-shadow: 0 0 0 4px rgba(46, 107, 138, 0.12);
}

.searchbar input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 19px;
}

.searchbar input::placeholder {
  color: rgba(101, 89, 75, 0.62);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0 28px;
}

.tag-row > span:first-child {
  color: var(--ink-mute);
  font-family: var(--read);
  font-style: italic;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(212, 200, 176, 0.82);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 253, 249, 0.46);
}

.tag-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--moss);
}

.tag-dot.work {
  background: var(--ocean);
}

.tag-dot.inspiration {
  background: var(--amber);
}

.tag-dot.family {
  background: var(--rose);
}

.tag-count {
  color: var(--ink-mute);
  letter-spacing: 1px;
}

.calendar-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.58);
  border: 1px solid rgba(237, 229, 216, 0.82);
}

.calendar-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

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

.week-labels {
  margin-top: 25px;
  color: rgba(101, 89, 75, 0.55);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-align: center;
}

.calendar {
  margin-top: 10px;
}

.cal-day {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid rgba(212, 200, 176, 0.42);
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.34);
}

.cal-day::after {
  position: absolute;
  top: 9px;
  right: 9px;
  color: rgba(58, 53, 48, 0.45);
  font-family: var(--mono);
  font-size: 10px;
  content: attr(data-day);
}

.cal-day.calm {
  background: linear-gradient(135deg, #d6e4f7, #efe8d7, #e6d2b6);
}

.cal-day.warm {
  background: linear-gradient(135deg, #fff1e4, #f7d3b4, #ebb793);
}

.cal-day.tender {
  background: linear-gradient(135deg, #62629a, #8d82b0 52%, #e1aa87);
}

.cal-day.tired {
  background: linear-gradient(135deg, #272e4f, #544f73, #7e6e7c);
}

.cal-day.tired::after {
  color: rgba(255, 253, 249, 0.7);
}

.cal-day.steady {
  background: linear-gradient(135deg, #dce6d2, #a9be97, #73886a);
}

.cal-day.selected {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-mute);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.legend i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--sand-2);
}

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

.day-row,
.library-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(237, 229, 216, 0.82);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.58);
  box-shadow: 0 14px 36px -30px rgba(58, 53, 48, 0.44);
}

.day-row h3 {
  display: inline;
  margin-right: 10px;
}

.entry-meta {
  color: var(--amber);
  letter-spacing: 1.5px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
}

.library-shelves {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.9fr) minmax(0, 1.02fr);
  gap: 22px;
  align-items: start;
}

.feature-player {
  position: relative;
  overflow: hidden;
  max-width: 820px;
  min-height: 210px;
  margin: 40px 0 36px;
  padding: 34px;
  border-radius: 28px;
}

.feature-cover {
  position: absolute;
  right: 28px;
  top: 50%;
  width: 162px;
  height: 162px;
  object-fit: cover;
  border-radius: 28px;
  opacity: 0.52;
  transform: translateY(-50%);
  box-shadow: 0 24px 56px -30px rgba(20, 24, 38, 0.8);
}

.feature-player h2 {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 168px);
  margin: 22px 0 32px;
  font-family: var(--read);
  font-size: 34px;
  font-style: italic;
  font-weight: 430;
  line-height: 1.15;
}

.library-shelf {
  display: grid;
  gap: 14px;
}

.library-shelf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.library-row {
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 94px;
  cursor: pointer;
}

.library-row h3 {
  font-size: 29px;
  line-height: 1.05;
}

.library-row.is-active {
  border-color: rgba(46, 107, 138, 0.34);
  background: rgba(238, 244, 247, 0.54);
}

.play-tile {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  color: var(--ocean);
  background: linear-gradient(135deg, #ffe6be, #f7b25f);
}

.play-tile.with-cover {
  background: var(--sand-2);
}

.play-tile.with-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-tile.sky {
  background: linear-gradient(135deg, #d6e4f7, #8fafc0);
}

.play-tile.plum {
  background: linear-gradient(135deg, #62629a, #dfaa8a);
  color: var(--warm-white);
}

.play-tile.rose {
  background: linear-gradient(135deg, #f0c2ce, #b87864);
  color: var(--warm-white);
}

.play-tile button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: currentColor;
  background: rgba(255, 253, 249, 0.88);
}

.add-card {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 94px;
  padding: 18px 20px;
  border: 1px dashed rgba(143, 132, 114, 0.5);
  border-radius: 20px;
  color: var(--ink-soft);
  background: rgba(255, 253, 249, 0.35);
  text-align: left;
}

.mic-tile {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  color: var(--amber);
  background: rgba(245, 240, 232, 0.9);
  border: 1px solid rgba(212, 200, 176, 0.62);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(36, 33, 44, 0.46);
  backdrop-filter: blur(7px);
}

.modal {
  position: relative;
  width: min(860px, 100%);
  max-height: min(780px, 92vh);
  overflow: auto;
  border-radius: 30px;
  background: var(--warm-white);
  box-shadow: 0 50px 100px -35px rgba(0, 0, 0, 0.45);
  animation: modal-rise 280ms cubic-bezier(0.2, 0.7, 0.25, 1) both;
}

@keyframes modal-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: var(--ink-soft);
  background: rgba(58, 53, 48, 0.07);
}

.modal-hero {
  padding: 44px;
  color: var(--warm-white);
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(255, 226, 168, 0.52), rgba(255, 226, 168, 0) 58%),
    linear-gradient(135deg, #5b7980 0%, #87a7b2 58%, #f3e4c0 100%);
}

.modal-hero.evening {
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(192, 135, 96, 0.48), rgba(192, 135, 96, 0) 58%),
    linear-gradient(135deg, #1f2748 0%, #444c82 58%, #9e8aae 100%);
}

.modal-hero.capture {
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(246, 216, 181, 0.64), rgba(246, 216, 181, 0) 58%),
    linear-gradient(135deg, #d6a87a 0%, #87a7b2 100%);
}

.modal-hero.auth-hero {
  background:
    radial-gradient(80% 70% at 100% 0%, rgba(255, 226, 168, 0.5), rgba(255, 226, 168, 0) 58%),
    linear-gradient(135deg, #2e6b8a 0%, #7f789f 55%, #dba887 100%);
}

.modal h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 58px;
  font-weight: 400;
  line-height: 0.96;
}

.modal-hero p {
  max-width: 540px;
  margin: 16px 0 0;
  color: rgba(255, 253, 249, 0.76);
  font-family: var(--read);
  font-size: 21px;
  font-style: italic;
}

.modal-body {
  display: grid;
  gap: 18px;
  padding: 30px 44px 44px;
}

.mode-toggle {
  display: inline-flex;
  width: max-content;
  padding: 4px;
  border-radius: 999px;
  background: rgba(58, 53, 48, 0.06);
  border: 1px solid rgba(58, 53, 48, 0.1);
}

.mode-toggle button {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-mute);
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.mode-toggle button.is-on {
  color: var(--ink);
  background: var(--warm-white);
  box-shadow: 0 1px 6px rgba(58, 53, 48, 0.12);
}

.text-field {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  padding: 18px 20px;
  border: 1px solid rgba(212, 200, 176, 0.7);
  border-radius: 18px;
  outline: 0;
  color: var(--ink);
  background: var(--sand);
  font-family: var(--read);
  font-size: 21px;
  line-height: 1.38;
}

.text-field:focus {
  border-color: rgba(46, 107, 138, 0.78);
  box-shadow: 0 0 0 4px rgba(46, 107, 138, 0.12);
}

.recorder {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(212, 200, 176, 0.62);
  border-radius: 18px;
  background: rgba(245, 240, 232, 0.72);
}

.record-button {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  color: var(--warm-white);
  background: var(--rose);
  box-shadow: 0 16px 30px -18px rgba(184, 120, 100, 0.7);
}

.recorder.is-recording .record-button {
  background: var(--ocean);
}

.wave {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 44px;
}

.wave span {
  width: 8px;
  border-radius: 999px;
  background: rgba(46, 107, 138, 0.38);
}

.recorder.is-recording .wave span {
  animation: wave-pulse 680ms ease-in-out infinite alternate;
}

.recorder.is-recording .wave span:nth-child(2n) {
  animation-delay: 140ms;
}

.recorder.is-recording .wave span:nth-child(3n) {
  animation-delay: 260ms;
}

@keyframes wave-pulse {
  from {
    transform: scaleY(0.58);
    opacity: 0.55;
  }
  to {
    transform: scaleY(1.08);
    opacity: 1;
  }
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 6px;
}

.modal-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.auth-modal {
  width: min(720px, 100%);
}

.auth-body {
  display: grid;
  gap: 16px;
}

.auth-message,
.auth-error {
  margin: 0;
  color: var(--ink-mute);
  font-size: 15px;
  line-height: 1.45;
}

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

.auth-field span {
  color: var(--ink-mute);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.auth-field input {
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(212, 200, 176, 0.72);
  border-radius: 17px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 253, 249, 0.78);
  font-size: 18px;
}

.auth-field input:focus {
  border-color: rgba(46, 107, 138, 0.78);
  box-shadow: 0 0 0 4px rgba(46, 107, 138, 0.12);
}

.auth-primary {
  width: 100%;
}

.auth-primary:disabled,
.auth-link:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.auth-link {
  justify-self: start;
  border: 0;
  color: var(--ocean);
  background: transparent;
  font-family: var(--read);
  font-size: 18px;
  font-style: italic;
}

.auth-message {
  color: var(--ocean);
}

.auth-error {
  color: #9c3b23;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(48% 42% at 50% 48%, rgba(255, 253, 249, 0.68), rgba(255, 253, 249, 0.34) 52%, rgba(245, 240, 232, 0.1) 100%),
    linear-gradient(90deg, rgba(245, 240, 232, 0.68), rgba(255, 253, 249, 0.36));
}

.auth-gate::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(251, 246, 238, 0.58), rgba(251, 246, 238, 0.06) 28%, rgba(251, 246, 238, 0.06) 72%, rgba(251, 246, 238, 0.48)),
    linear-gradient(180deg, rgba(251, 246, 238, 0.22), rgba(251, 246, 238, 0.56));
  content: "";
}

.auth-card {
  position: relative;
  width: min(520px, 100%);
  padding: 34px;
  border: 1px solid rgba(237, 229, 216, 0.88);
  border-radius: 28px;
  background:
    radial-gradient(68% 48% at 100% 0%, rgba(255, 226, 168, 0.2), rgba(255, 226, 168, 0) 62%),
    rgba(255, 253, 249, 0.94);
  box-shadow: 0 38px 90px -42px rgba(58, 53, 48, 0.64);
  backdrop-filter: blur(24px);
  animation: modal-rise 280ms cubic-bezier(0.2, 0.7, 0.25, 1) both;
}

.auth-card-visual {
  position: absolute;
  top: 24px;
  right: 26px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 70% 22%, rgba(255, 253, 249, 0.86), rgba(255, 253, 249, 0) 30%),
    linear-gradient(135deg, #d9e8ef, #f0e8d4 58%, #efbd97);
  box-shadow: 0 18px 34px -26px rgba(58, 53, 48, 0.58);
}

.auth-card-visual span {
  width: 30px;
  height: 2px;
  margin-top: 20px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.9);
}

.auth-card h1 {
  max-width: 360px;
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: 54px;
  font-weight: 400;
  line-height: 0.96;
}

.auth-card > p {
  max-width: 390px;
  margin: 16px 0 24px;
  color: var(--ink-soft);
  font-family: var(--read);
  font-size: 20px;
  font-style: italic;
  line-height: 1.32;
}

.mobile-tabbar {
  display: none;
}

.mobile-auth-button {
  display: none;
}

@media (max-width: 1180px) {
  :root {
    --sidebar: 86px;
  }

  .sidebar {
    align-items: center;
    padding: 24px 13px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand-word,
  .brand-dot,
  .nav-label,
  .nav-cta-text,
  .profile-text {
    display: none;
  }

  .nav-button,
  .nav-cta {
    justify-content: center;
  }

  .nav-cta {
    min-height: 56px;
    padding: 0;
  }

  .canvas {
    width: min(1120px, calc(100% - 44px));
  }

  .home-grid,
  .journal-grid,
  .library-shelves {
    grid-template-columns: 1fr;
  }

  .feature-player {
    max-width: none;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .app {
    display: block;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    display: none;
  }

  .main {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .canvas {
    width: min(100% - 28px, 640px);
    padding: 20px 0 116px;
  }

  .hero {
    min-height: 430px;
    padding: 34px 28px;
  }

  .hero::before,
  .hero::after {
    top: auto;
    bottom: 76px;
  }

  .hero::before {
    right: 28px;
    width: 160px;
  }

  .hero::after {
    right: 86px;
  }

  .hero h1,
  .page-title {
    font-size: 54px;
  }

  .panel-pad,
  .note-card,
  .calendar-card {
    padding: 22px;
  }

  .today-page {
    min-height: auto;
    padding: 24px;
  }

  .today-page-head {
    grid-template-columns: 1fr 92px;
    gap: 16px;
  }

  .today-page-head h2 {
    font-size: 44px;
  }

  .today-cover {
    width: 92px;
    border-radius: 20px;
  }

  .today-writing {
    min-height: 150px;
    font-size: 24px;
  }

  .today-moment {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .today-add {
    position: static;
    margin: 18px 0 0 auto;
  }

  .now-item,
  .day-row,
  .library-row,
  .memory-card,
  .add-card {
    grid-template-columns: 46px 1fr;
  }

  .now-cover {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .feature-cover {
    right: 22px;
    top: 24px;
    width: 96px;
    height: 96px;
    transform: none;
  }

  .feature-player h2 {
    max-width: calc(100% - 72px);
  }

  .now-item .round-action,
  .now-item .arrow-link,
  .memory-card .status-dot,
  .day-row .status-dot,
  .add-card > .arrow-link {
    display: none;
  }

  .feature-player {
    margin: 24px 0;
  }

  .modal-backdrop {
    align-items: end;
    padding: 10px;
  }

  .modal {
    max-height: 94vh;
    border-radius: 24px;
  }

  .modal-hero,
  .modal-body {
    padding: 30px 24px;
  }

  .modal h2 {
    font-size: 46px;
  }

  .mobile-tabbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 7px;
    border: 1px solid rgba(237, 229, 216, 0.86);
    border-radius: 22px;
    background: rgba(255, 253, 249, 0.9);
    box-shadow: 0 18px 38px -22px rgba(58, 53, 48, 0.44);
    backdrop-filter: blur(18px);
  }

  .mobile-tabbar button {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-height: 52px;
    padding: 6px 3px;
    border: 0;
    border-radius: 16px;
    color: var(--ink-soft);
    background: transparent;
    font-size: 11px;
  }

  .mobile-tabbar button.is-active {
    color: var(--ink);
    background: var(--sand);
  }

  .mobile-auth-button {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 42;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid rgba(212, 200, 176, 0.78);
    border-radius: 999px;
    color: var(--ink-soft);
    background: rgba(255, 253, 249, 0.84);
    box-shadow: 0 14px 30px -24px rgba(58, 53, 48, 0.56);
  }
}
