:root {
  --ink: #14213d;
  --ink-soft: #46506a;
  --paper: #f4f1e9;
  --paper-bright: #fffdf8;
  --orange: #ff5c35;
  --yellow: #ffd64a;
  --blue: #b9dbff;
  --mint: #c7f1d7;
  --line: rgba(20, 33, 61, 0.18);
  --shadow: 0 20px 60px rgba(20, 33, 61, 0.12);
  --radius: 22px;
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  width: min(1280px, calc(100% - 64px));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  padding: 14px max(32px, calc((100vw - 1280px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  color: white;
  background: var(--ink);
  border-radius: 50% 50% 50% 8px;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-style: italic;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  gap: 34px;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 650;
}

.site-nav > a:not(.nav-log-link) {
  position: relative;
  padding-block: 8px;
}

.site-nav > a:not(.nav-log-link)::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  background: var(--orange);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav > a:hover::after,
.site-nav > a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-log-link {
  display: inline-flex;
  gap: 20px;
  align-items: center;
  padding: 10px 15px;
  color: white;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 100px;
  transition: color 180ms ease, background 180ms ease;
}

.nav-log-link:hover {
  color: var(--ink);
  background: var(--yellow);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 11px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.eyebrow {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 8vw;
  align-items: center;
  min-height: 700px;
  padding-block: 80px 90px;
}

.hero-copy h1,
.page-intro h1 {
  margin: 24px 0 30px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(3.8rem, 7vw, 7rem);
  font-weight: 500;
  line-height: 0.97;
  letter-spacing: -0.055em;
}

.hero-copy h1 em,
.page-intro h1 em {
  color: var(--orange);
  font-weight: 500;
}

.hero-intro {
  max-width: 610px;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  gap: 30px;
  align-items: center;
  margin-top: 42px;
}

.button {
  display: inline-flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 20px;
  font-size: 0.9rem;
  font-weight: 750;
  border-radius: 100px;
}

.primary-button {
  color: white;
  background: var(--orange);
  border: 1px solid var(--orange);
  box-shadow: 0 8px 24px rgba(255, 92, 53, 0.22);
}

.primary-button:hover {
  background: #df3e1b;
}

.secondary-button {
  background: transparent;
  border: 1px solid var(--line);
}

.text-link {
  padding-block: 9px;
  font-size: 0.9rem;
  font-weight: 750;
  border-bottom: 1px solid var(--ink);
}

.hero-object {
  position: relative;
  display: grid;
  min-height: 500px;
  place-items: center;
}

.object-orbit {
  position: absolute;
  width: min(44vw, 520px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  animation: slow-spin 25s linear infinite;
}

.object-orbit::before,
.object-orbit::after {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
  inset: 11%;
}

.object-orbit::after {
  inset: 24%;
}

.object-orbit span {
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--orange);
  border-radius: 50%;
}

.object-orbit span:nth-child(1) { top: 8%; left: 20%; }
.object-orbit span:nth-child(2) { right: 4%; bottom: 31%; background: var(--yellow); }
.object-orbit span:nth-child(3) { bottom: 5%; left: 29%; width: 10px; height: 10px; background: var(--ink); }

.journal-card {
  position: relative;
  z-index: 2;
  width: min(390px, 80%);
  padding: 25px 28px 30px;
  background: var(--paper-bright);
  border: 1px solid var(--ink);
  border-radius: 5px 5px 36px 5px;
  box-shadow: 16px 18px 0 var(--blue), 17px 19px 0 var(--ink);
  transform: rotate(3deg);
}

.journal-topline,
.journal-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.journal-symbol {
  margin: 50px 0 24px;
  color: var(--orange);
  font-size: 3rem;
  line-height: 1;
}

.journal-quote {
  margin-bottom: 54px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 1.25rem;
  line-height: 1.8;
}

.ticker {
  overflow: hidden;
  padding: 15px 0;
  color: white;
  background: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.ticker div {
  width: max-content;
  animation: ticker 22s linear infinite;
}

.ticker span {
  padding: 0 34px;
  color: var(--yellow);
}

.about-section {
  display: grid;
  grid-template-columns: 0.45fr 1.25fr 0.8fr;
  gap: 6vw;
  padding-block: 130px;
  border-bottom: 1px solid var(--line);
}

.section-index {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.about-copy h2,
.section-heading h2 {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.about-copy p {
  max-width: 640px;
  margin-top: 32px;
  color: var(--ink-soft);
  line-height: 1.9;
}

.about-facts > div {
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.about-facts dt {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.about-facts dd {
  margin-top: 3px;
  font-weight: 700;
}

.portal-section {
  padding-block: 120px 140px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 48px;
}

.section-heading h2 {
  margin-top: 12px;
}

.section-number {
  color: var(--line);
  font-family: Georgia, serif;
  font-size: 6rem;
  line-height: 0.8;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.portal-card {
  display: flex;
  min-height: 320px;
  padding: 24px;
  flex-direction: column;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.portal-card:hover {
  position: relative;
  z-index: 2;
  box-shadow: 9px 9px 0 var(--ink);
  transform: translate(-5px, -5px);
}

.portal-card > span {
  align-self: flex-end;
  font-family: Georgia, serif;
  font-size: 1.35rem;
}

.portal-card h3 {
  margin: auto 0 9px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 2rem;
  font-weight: 500;
}

.portal-card p {
  min-height: 52px;
  color: var(--ink-soft);
}

.portal-card b {
  margin-top: 30px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.portal-work { background: var(--blue); }
.portal-social { background: var(--paper-bright); }
.portal-life { background: var(--mint); }
.portal-log { background: var(--yellow); }

.site-footer {
  display: flex;
  justify-content: space-between;
  padding-block: 24px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  border-top: 1px solid var(--line);
}

/* Inner pages */
.inner-page {
  padding-block: 78px 130px;
}

.page-intro {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 8vw;
  align-items: end;
  padding-bottom: 90px;
}

.page-intro h1 {
  margin-bottom: 0;
  font-size: clamp(3.7rem, 6.3vw, 6.7rem);
}

.page-intro > p {
  max-width: 440px;
  padding-bottom: 12px;
  color: var(--ink-soft);
  line-height: 1.9;
}

.work-list {
  border-top: 1px solid var(--ink);
}

.work-card {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 6vw;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}

.reverse-work .work-visual {
  order: 2;
}

.work-visual {
  position: relative;
  display: flex;
  min-height: 430px;
  padding: 24px;
  overflow: hidden;
  color: white;
  flex-direction: column;
  border: 1px solid var(--ink);
}

.work-visual::before,
.work-visual::after {
  position: absolute;
  content: "";
}

.visual-one {
  background: linear-gradient(125deg, #0c1740 0 35%, #ff5c35 35% 62%, #facf45 62%);
}

.visual-one::before {
  width: 45%;
  aspect-ratio: 1;
  right: 12%;
  top: 15%;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(255,255,255,0.12), 0 0 0 70px rgba(255,255,255,0.08);
}

.visual-two {
  background: repeating-linear-gradient(90deg, #14213d 0 13%, #b9dbff 13% 26%, #f4f1e9 26% 39%);
  color: var(--ink);
}

.visual-two::before {
  inset: 12% 18%;
  background: var(--orange);
  border-radius: 50% 4px 50% 4px;
  transform: rotate(13deg);
}

.visual-three {
  background: #d2f4df;
  color: var(--ink);
}

.visual-three::before {
  width: 250px;
  height: 250px;
  top: 40px;
  left: calc(50% - 125px);
  background: var(--yellow);
  border: 1px solid var(--ink);
  border-radius: 50%;
  box-shadow: 70px 70px 0 var(--orange), -70px 100px 0 var(--blue);
}

.work-visual > span,
.work-visual > b,
.work-visual > i {
  position: relative;
  z-index: 2;
}

.work-visual > span {
  align-self: flex-end;
  font-family: Georgia, serif;
  font-size: 2rem;
}

.work-visual > b {
  margin-top: auto;
  font-size: clamp(2.5rem, 5vw, 5.2rem);
  line-height: 0.86;
  letter-spacing: -0.07em;
}

.work-visual > i {
  margin-top: 20px;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.work-copy > span {
  color: var(--orange);
  font-size: 0.76rem;
  font-weight: 800;
}

.work-copy h2 {
  margin: 16px 0 24px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(2.7rem, 5vw, 5.2rem);
  font-weight: 500;
  line-height: 1;
}

.work-copy p {
  color: var(--ink-soft);
  line-height: 1.9;
}

.work-copy a {
  display: inline-flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 42px;
  padding: 12px 0;
  font-size: 0.82rem;
  font-weight: 750;
  border-bottom: 1px solid var(--ink);
}

.placeholder-note {
  margin-top: 34px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  text-align: center;
}

/* Social page */
.links-page {
  background: var(--blue);
}

.social-list {
  border-top: 1px solid var(--ink);
}

.social-row {
  display: grid;
  grid-template-columns: 60px 1fr 0.7fr auto;
  gap: 28px;
  align-items: center;
  min-height: 132px;
  padding: 24px 8px;
  border-bottom: 1px solid rgba(20, 33, 61, 0.45);
  transition: padding 180ms ease, background 180ms ease;
}

.social-row:hover {
  padding-inline: 22px;
  background: rgba(255, 255, 255, 0.3);
}

.social-index {
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.social-row small {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.social-row h2 {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 2.2rem;
  font-weight: 500;
}

.placeholder-link {
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 750;
  border: 1px solid var(--ink);
  border-radius: 100px;
}

.social-note {
  display: grid;
  grid-template-columns: 0.3fr 1fr;
  gap: 30px;
  max-width: 750px;
  margin: 100px 0 0 auto;
  padding: 34px;
  background: var(--yellow);
  border: 1px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(-1.5deg);
}

.social-note span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.social-note p {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 1.5rem;
  line-height: 1.6;
}

/* Moments */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px;
  align-items: start;
}

.photo-card:nth-child(1) { grid-column: 1 / span 7; }
.photo-card:nth-child(2) { grid-column: 9 / span 4; margin-top: 110px; }
.photo-card:nth-child(3) { grid-column: 2 / span 4; }
.photo-quote { grid-column: 7 / span 6; }
.photo-card:nth-child(5) { grid-column: 3 / span 9; }

.photo-placeholder {
  position: relative;
  display: flex;
  min-height: 340px;
  padding: 18px;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--ink);
}

.photo-tall .photo-placeholder {
  min-height: 630px;
}

.photo-wide .photo-placeholder {
  min-height: 440px;
}

.photo-placeholder::before,
.photo-placeholder::after {
  position: absolute;
  content: "";
}

.photo-one { background: linear-gradient(145deg, #c7f1d7 0 54%, #14213d 54%); color: white; }
.photo-one::before { width: 55%; height: 65%; top: 8%; right: 7%; background: var(--orange); border-radius: 50% 50% 6px 6px; }
.photo-two { background: var(--yellow); }
.photo-two::before { width: 70%; aspect-ratio: 1; top: 14%; left: 15%; background: var(--blue); border: 1px solid var(--ink); border-radius: 50%; }
.photo-three { background: repeating-linear-gradient(135deg, #fffdf8 0 28px, #ff5c35 28px 56px); }
.photo-three::before { width: 52%; aspect-ratio: 1; inset: 20% auto auto 24%; background: var(--yellow); border: 1px solid var(--ink); transform: rotate(15deg); }
.photo-four { background: linear-gradient(160deg, #b9dbff 0 38%, #14213d 38% 70%, #ff5c35 70%); color: white; }
.photo-four::before { width: 42%; height: 120%; top: -10%; left: 29%; border: 2px solid white; border-radius: 50%; transform: rotate(30deg); }

.photo-placeholder > span,
.photo-placeholder > b {
  position: relative;
  z-index: 2;
}

.photo-placeholder > span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.photo-placeholder > b {
  margin: auto;
  padding: 8px 13px;
  background: var(--paper-bright);
  color: var(--ink);
  border: 1px solid var(--ink);
  font-size: 0.8rem;
  transform: rotate(-4deg);
}

.photo-card figcaption {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
}

.photo-card figcaption span {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 1.2rem;
}

.photo-card figcaption small {
  color: var(--ink-soft);
}

.photo-quote {
  padding: 72px 40px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.5;
}

.photo-quote span {
  display: block;
  margin-top: 26px;
  font-family: Inter, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

/* Daylog */
.daylog-page {
  min-height: 100vh;
  background: #ebe7dd;
}

.daylog-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  min-height: calc(100vh - 80px);
}

.daylog-workspace {
  min-width: 0;
  padding: 52px clamp(28px, 5vw, 76px) 90px;
}

.daylog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 34px;
}

.daylog-heading h1 {
  margin-top: 8px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(2rem, 3.5vw, 3.8rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.calendar-card {
  padding: 24px;
  background: var(--paper-bright);
  border: 1px solid rgba(20, 33, 61, 0.13);
  border-radius: var(--radius);
  box-shadow: 0 12px 42px rgba(20, 33, 61, 0.07);
}

.calendar-toolbar,
.month-navigation {
  display: flex;
  align-items: center;
}

.calendar-toolbar {
  justify-content: space-between;
  margin-bottom: 19px;
}

.month-navigation {
  gap: 8px;
}

.month-navigation h2 {
  min-width: 126px;
  font-size: 1.05rem;
  text-align: center;
}

.month-navigation button,
.today-button {
  height: 38px;
  background: transparent;
  border: 1px solid var(--line);
}

.month-navigation button {
  width: 38px;
  border-radius: 50%;
}

.month-navigation button:hover,
.today-button:hover {
  background: var(--yellow);
}

.today-button {
  padding: 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 100px;
}

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

.weekday {
  padding: 7px 4px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 750;
  text-align: center;
}

.calendar-day {
  position: relative;
  min-width: 0;
  min-height: 64px;
  padding: 9px;
  background: #f7f4ed;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.84rem;
  text-align: left;
  transition: border 150ms ease, background 150ms ease, transform 150ms ease;
}

.calendar-day:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.calendar-day.outside-month {
  color: rgba(20, 33, 61, 0.35);
  background: transparent;
}

.calendar-day.today::after {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
  content: "";
}

.calendar-day.selected {
  color: white;
  background: var(--ink);
}

.calendar-day.selected.today::after {
  background: var(--yellow);
}

.record-dot {
  position: absolute;
  bottom: 9px;
  left: 9px;
  width: 18px;
  height: 3px;
  background: var(--orange);
  border-radius: 10px;
}

.daily-records {
  margin-top: 48px;
}

.records-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.records-heading h2 {
  margin-top: 6px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 2rem;
  font-weight: 500;
}

.records-heading > span {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

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

.record-card {
  padding: 20px 22px;
  background: var(--paper-bright);
  border: 1px solid transparent;
  border-radius: 15px;
  transition: border 180ms ease, box-shadow 180ms ease;
}

.record-card:hover {
  border-color: var(--line);
  box-shadow: 0 10px 30px rgba(20, 33, 61, 0.07);
}

.record-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.record-time {
  font-size: 0.78rem;
  font-weight: 800;
}

.mood-pill,
.record-tag {
  padding: 3px 9px;
  font-size: 0.7rem;
  background: var(--blue);
  border-radius: 100px;
}

.record-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.record-action {
  padding: 3px 7px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  font-size: 0.72rem;
}

.record-action:hover {
  color: var(--ink);
  text-decoration: underline;
}

.record-action.danger:hover {
  color: #b42318;
}

.record-text {
  margin-top: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.record-tags {
  display: flex;
  gap: 7px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.record-tag {
  background: #efebe2;
}

.empty-records {
  padding: 52px 20px;
  color: var(--ink-soft);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty-records .empty-mark {
  color: var(--orange);
  font-size: 2.4rem;
  line-height: 1;
}

.empty-records p:not(.empty-mark) {
  margin: 12px 0 3px;
  color: var(--ink);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 1.15rem;
}

.empty-records span {
  font-size: 0.82rem;
}

.assistant-panel {
  position: sticky;
  top: 0;
  display: flex;
  height: calc(100vh - 80px);
  min-height: 660px;
  padding: 34px 32px 25px;
  color: white;
  background: var(--ink);
  flex-direction: column;
}

.assistant-header {
  display: flex;
  gap: 13px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,0.17);
}

.assistant-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 50%;
  place-items: center;
  font-size: 1.15rem;
}

.assistant-header p {
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.assistant-header span {
  display: flex;
  gap: 6px;
  align-items: center;
  color: rgba(255,255,255,0.58);
  font-size: 0.68rem;
}

.assistant-header i {
  width: 6px;
  height: 6px;
  background: #70dc98;
  border-radius: 50%;
}

.assistant-intro {
  padding: 28px 0 18px;
}

.assistant-intro .eyebrow {
  color: var(--yellow);
}

.assistant-intro h2 {
  margin: 10px 0 14px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.25;
}

.assistant-intro > p:last-child {
  color: rgba(255,255,255,0.64);
  font-size: 0.82rem;
  line-height: 1.7;
}

.assistant-prompts {
  display: flex;
  gap: 7px;
  padding-bottom: 17px;
  flex-wrap: wrap;
}

.assistant-prompts span {
  padding: 5px 9px;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  font-size: 0.68rem;
}

.assistant-messages {
  display: flex;
  min-height: 90px;
  margin-bottom: 16px;
  overflow-y: auto;
  flex: 1;
  flex-direction: column;
  gap: 13px;
  scrollbar-width: thin;
}

.assistant-message {
  max-width: 92%;
  padding: 12px 14px;
  align-self: flex-start;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px 14px 14px 14px;
}

.assistant-message.user {
  align-self: flex-end;
  color: var(--ink);
  background: var(--blue);
  border-color: var(--blue);
  border-radius: 14px 5px 14px 14px;
}

.assistant-role {
  color: var(--yellow);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.assistant-message.user .assistant-role {
  color: var(--ink-soft);
}

.assistant-message p {
  margin-top: 4px;
  font-size: 0.8rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.assistant-form {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  padding: 7px;
  background: white;
  border-radius: 100px;
}

.assistant-form input {
  min-width: 0;
  padding: 6px 10px;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 0.82rem;
}

.assistant-form button {
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--yellow);
  border: 0;
  border-radius: 50%;
  font-size: 1.1rem;
}

.privacy-note {
  margin-top: 10px;
  color: rgba(255,255,255,0.4);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-align: center;
}

.record-dialog {
  width: min(600px, calc(100% - 32px));
  padding: 0;
  background: var(--paper-bright);
  border: 1px solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.record-dialog::backdrop {
  background: rgba(20, 33, 61, 0.62);
  backdrop-filter: blur(4px);
}

.record-dialog form {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.dialog-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 4px;
}

.dialog-topline h2 {
  margin-top: 4px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 2rem;
  font-weight: 500;
}

.dialog-topline button {
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.35rem;
}

.record-dialog label {
  display: grid;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 750;
}

.record-dialog input,
.record-dialog select,
.record-dialog textarea {
  width: 100%;
  padding: 11px 12px;
  background: #f5f1e8;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  font-size: 0.92rem;
}

.record-dialog input:focus,
.record-dialog select:focus,
.record-dialog textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,92,53,0.12);
}

.record-dialog textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-error {
  min-height: 20px;
  color: #b42318;
  font-size: 0.78rem;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@keyframes slow-spin {
  to { transform: rotate(360deg); }
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 1100px) {
  .home-hero {
    grid-template-columns: 1fr 0.85fr;
    gap: 30px;
  }

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

  .daylog-shell {
    grid-template-columns: minmax(0, 1fr) 350px;
  }

  .daylog-workspace {
    padding-inline: 32px;
  }

  .calendar-day {
    min-height: 54px;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 36px, 680px);
  }

  .site-header {
    min-height: 68px;
    padding: 12px 18px;
  }

  .menu-button {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    right: 0;
    left: 0;
    display: none;
    padding: 18px;
    background: var(--paper-bright);
    border-bottom: 1px solid var(--ink);
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 5px;
    align-items: stretch;
  }

  .site-nav[data-open="true"] {
    display: flex;
  }

  .site-nav a {
    padding: 11px 12px;
  }

  .nav-log-link {
    justify-content: space-between;
    margin-top: 8px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-block: 58px 90px;
  }

  .hero-copy h1,
  .page-intro h1 {
    font-size: clamp(3rem, 13vw, 5.4rem);
  }

  .hero-object {
    min-height: 460px;
  }

  .object-orbit {
    width: min(90vw, 460px);
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 45px;
    padding-block: 90px;
  }

  .about-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .section-number {
    font-size: 4rem;
  }

  .inner-page {
    padding-block: 55px 90px;
  }

  .page-intro {
    grid-template-columns: 1fr;
    gap: 35px;
    padding-bottom: 60px;
  }

  .work-card {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .reverse-work .work-visual {
    order: 0;
  }

  .social-row {
    grid-template-columns: 44px 1fr auto;
  }

  .social-row > p {
    display: none;
  }

  .photo-card:nth-child(n),
  .photo-quote {
    grid-column: span 6;
    margin-top: 0;
  }

  .photo-card:first-child,
  .photo-card:nth-child(5) {
    grid-column: span 12;
  }

  .daylog-shell {
    display: flex;
    flex-direction: column;
  }

  .daylog-workspace {
    padding: 42px 20px 70px;
  }

  .assistant-panel {
    position: relative;
    height: auto;
    min-height: 700px;
    top: auto;
  }

  .assistant-messages {
    min-height: 220px;
  }
}

@media (max-width: 540px) {
  .hero-copy h1,
  .page-intro h1 {
    letter-spacing: -0.045em;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .journal-card {
    width: 82%;
    padding: 21px;
  }

  .about-facts,
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
  }

  .section-number {
    font-size: 3rem;
  }

  .portal-card {
    min-height: 260px;
  }

  .site-footer {
    gap: 15px;
    flex-direction: column;
  }

  .work-visual {
    min-height: 340px;
  }

  .social-row {
    grid-template-columns: 38px 1fr;
    gap: 12px;
  }

  .social-row .placeholder-link {
    grid-column: 2;
    justify-self: start;
  }

  .social-note {
    grid-template-columns: 1fr;
    margin-top: 70px;
  }

  .photo-grid {
    gap: 50px;
  }

  .photo-card:nth-child(n),
  .photo-quote {
    grid-column: 1 / -1;
  }

  .photo-tall .photo-placeholder,
  .photo-wide .photo-placeholder,
  .photo-placeholder {
    min-height: 410px;
  }

  .photo-quote {
    padding: 25px 5px;
  }

  .daylog-heading {
    gap: 22px;
    align-items: start;
    flex-direction: column;
  }

  .calendar-card {
    padding: 14px 10px;
    border-radius: 16px;
  }

  .calendar-toolbar {
    gap: 12px;
  }

  .month-navigation {
    gap: 3px;
  }

  .month-navigation h2 {
    min-width: 105px;
    font-size: 0.92rem;
  }

  .month-navigation button {
    width: 32px;
    height: 32px;
  }

  .today-button {
    height: 34px;
    padding-inline: 9px;
  }

  .calendar-grid {
    gap: 3px;
  }

  .calendar-day {
    min-height: 46px;
    padding: 6px;
    border-radius: 8px;
    font-size: 0.76rem;
  }

  .record-dot {
    bottom: 6px;
    left: 6px;
    width: 12px;
  }

  .records-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .record-meta {
    align-items: start;
    flex-wrap: wrap;
  }

  .record-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .assistant-panel {
    padding: 30px 20px 22px;
  }

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

  .record-dialog form {
    padding: 22px 18px;
  }
}

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