:root {
  --paper: #f7f6f2;
  --ink: #272822;
  --muted: #77786d;
  --forest: #343d32;
  --soft: #eae7df;
  --white: #fff;
  --line: #dfdfd7;
  --radius: 22px;
  --space: 24px;
  color-scheme: light;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
button {
  border: 0;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1 {
  font-size: 24px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.4px;
}
h2 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
}
h3 {
  font-size: 18px;
  line-height: 1.45;
  font-weight: 550;
}
small {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
p {
  overflow-wrap: anywhere;
}
img {
  display: block;
  width: 100%;
  object-fit: cover;
}
a,
button {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid #8f9f7a;
  outline-offset: 4px;
}
main:focus {
  outline: none;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: -70px;
  background: var(--forest);
  color: white;
  padding: 14px;
}
.skip-link:focus {
  top: 0;
}
.desktop-rail {
  display: none;
}
.app-page {
  min-height: 100dvh;
}
.demo-bar {
  height: 32px;
  padding: 7px var(--space) 0;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.4px;
  color: #8a8b81;
}
.demo-bar a {
  min-height: 24px;
}
.page-header {
  height: 70px;
  padding: 10px var(--space) 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.header-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  flex: 1;
}
.brand-title {
  font-size: 28px;
  letter-spacing: -0.7px;
}
.back-button {
  background: none;
  font-size: 30px;
  width: 28px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  margin-left: -4px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  font-size: 24px;
  flex-shrink: 0;
}
.search-button {
  font-size: 27px;
  margin-right: -10px;
}
.page-header .text-link {
  padding: 10px 0;
}
main {
  padding: 14px var(--space) 116px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}
.lead {
  color: var(--muted);
  font-size: 18px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 29px;
}
.section-heading h1 {
  font-size: 20px;
}
.text-link {
  font-size: 14px;
  background: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-underline-offset: 4px;
  padding: 6px 0;
  white-space: normal;
}
.section-heading .text-link {
  color: var(--muted);
  min-height: 29px;
}
.discover-layout,
.discover-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cat-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transform-origin: top left;
  transition: box-shadow 0.2s;
}
.photo {
  position: relative;
  background: var(--soft);
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
}
.photo img {
  height: 278px;
  object-position: center 47%;
  transition: transform 0.6s;
}
.photo figcaption {
  background: rgba(255, 255, 255, 0.93);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 7px;
  line-height: 1.5;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}
.cat-card .photo {
  border-radius: 18px 18px 0 0;
}
.cat-card .photo img {
  height: auto;
  aspect-ratio: 342/278;
}
.card-info {
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.identity h1,
.identity h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.card-info h2 {
  font-size: 24px;
  font-weight: 600;
}
.card-info p {
  color: var(--muted);
  font-size: 15px;
}
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1.5;
  padding: 7px 8px;
  border-radius: 8px;
  background: var(--soft);
  white-space: nowrap;
  width: fit-content;
  flex-shrink: 0;
}
.link-row {
  background: var(--white);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 88px;
}
.link-row > span:first-child {
  min-width: 0;
}
.link-row strong {
  display: block;
  font-size: 18px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.link-row small {
  display: block;
  margin-top: 6px;
  font-size: 14px;
}
.link-row > span:last-child {
  color: var(--muted);
  font-size: 24px;
}
.invitation-note {
  padding: 30px 12px 16px;
  text-align: center;
}
.invitation-note img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  margin: 0 auto 16px;
  opacity: 0.75;
}
.invitation-note h2 {
  font-size: 18px;
}
.invitation-note p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
  margin: 9px 0;
}
.note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.button {
  min-height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid transparent;
  transition:
    background 0.2s,
    transform 0.15s;
}
.button:active {
  transform: scale(0.99);
}
.primary {
  background: var(--forest);
  color: #fff;
}
.secondary {
  background: #fff;
  color: var(--forest);
  border-color: var(--line);
}
.quiet {
  background: none;
  color: var(--muted);
}
.button-pair {
  display: flex;
  gap: 10px;
}
.button-pair > * {
  flex: 1;
  min-width: 0;
}
.intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 0 1px;
}
.intro p,
.muted {
  color: var(--muted);
}
.info-box {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-box p {
  color: var(--muted);
  font-size: 15px;
}
.info-box small {
  display: block;
  margin-top: 6px;
}
.detail-layout,
.detail-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.profile-photo img {
  height: auto;
  aspect-ratio: 342/306;
}
.detail-copy .identity h1 {
  font-size: 28px;
}
.detail-copy .button.primary {
  margin-top: 12px;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
}
.tab {
  font-size: 17px;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--muted);
  position: relative;
}
.tab.selected {
  color: var(--ink);
  font-weight: 550;
}
.tab.selected:after {
  content: "";
  position: absolute;
  bottom: -4px;
  height: 2px;
  left: 0;
  right: 0;
  background: var(--forest);
}
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.timeline-item {
  border-left: 1px solid #d8d9d0;
  padding: 0 0 30px 19px;
  margin-left: 5px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.timeline-dot {
  position: absolute;
  left: -5px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 5px var(--paper);
}
.timeline-item:last-child {
  padding-bottom: 10px;
  border-color: transparent;
}
.timeline-item h2 {
  font-size: 18px;
}
.timeline-item > p {
  font-size: 15px;
  color: var(--muted);
}
.birth-photo img {
  height: auto;
  max-height: 310px;
  aspect-ratio: 4/3;
}
.record-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.record-photo img {
  height: 170px;
}
.welcome-photo img {
  height: 330px;
  object-position: center 33%;
}
.brand-page .intro h1 {
  font-size: 30px;
  line-height: 1.5;
}
.article {
  display: flex;
  flex-direction: column;
  gap: 18px;
  line-height: 1.85;
}
.article p {
  color: var(--muted);
}
.editorial-photo img {
  height: 360px;
}
.care-article {
  gap: 28px;
  padding-top: 10px;
}
.care-article section {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.care-article p {
  margin-top: 12px;
}
.chapter {
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}
form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border-radius: 18px;
  padding: 16px;
}
.field > span {
  font-size: 17px;
  font-weight: 550;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 3px 0;
  color: var(--ink);
  border-radius: 0;
  outline-offset: 7px;
  min-height: 30px;
  font-size: 16px;
}
.field textarea {
  resize: vertical;
  line-height: 1.65;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #929388;
}
.field select {
  appearance: auto;
}
.form-error {
  font-size: 14px;
  line-height: 1.5;
  color: #a04931;
}
.form-error:empty {
  display: none;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  padding: 8px 0;
  cursor: pointer;
}
.check-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--forest);
  margin: 1px 0;
  flex-shrink: 0;
}
.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.search-form .field {
  padding: 10px 14px;
}
.search-form .field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.search-form .button {
  width: auto;
  min-width: 64px;
}
.cat-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
.empty-state {
  text-align: center;
  background: #eeede5;
  border-radius: 22px;
  padding: 48px 24px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 16px;
}
.empty-state img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  margin: 0 0 8px;
  opacity: 0.65;
}
.empty-state p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
}
.empty-state .button {
  margin-top: 10px;
}
.journey-steps {
  padding: 16px;
  margin: 0;
  list-style: none;
  background: white;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.journey-steps li {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 16px;
}
.journey-steps li.current,
.journey-steps li.complete {
  color: var(--forest);
}
.journey-steps li.current {
  font-weight: 600;
}
.journey-steps li > span:first-child {
  width: 16px;
  text-align: center;
}
.update-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.update-card .photo img {
  height: 240px;
}
.update-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.update-text small {
  font-size: 14px;
}
.update-text h2 {
  font-size: 18px;
}
.journey-archive {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.archive-chapter {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.archive-chapter .section-heading h2 {
  font-size: 18px;
}
.video-poster {
  position: relative;
  padding: 0;
  background: none;
  border-radius: 18px;
  text-align: left;
  width: 100%;
}
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  color: white;
  background: #343d32b8;
  border: 1px solid #ffffff66;
  border-radius: 50%;
  font-size: 27px;
  backdrop-filter: blur(5px);
}
.video-label {
  position: absolute;
  bottom: 44px;
  right: 14px;
  background: #272822b3;
  color: white;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 12px;
}
.post-grid {
  display: grid;
  gap: 18px;
}
.post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: white;
  border-radius: 22px;
  padding: 16px;
}
.post-author {
  display: flex;
  gap: 10px;
  align-items: center;
}
.post-author strong {
  font-size: 15px;
  font-weight: 550;
}
.post-author small {
  display: block;
  font-size: 11px;
}
.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--forest);
  font-size: 14px;
}
.post-body {
  font-size: 17px;
  white-space: pre-wrap;
}
.post-card .photo img {
  height: auto;
  aspect-ratio: 310/290;
}
.post-photo-link {
  display: block;
}
.post-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.post-actions .text-link {
  min-height: 36px;
  color: var(--muted);
  padding: 0;
  font-size: 15px;
}
.post-actions [aria-pressed="true"] {
  color: var(--forest);
}
.cat-link {
  font-size: 12px;
  background: #e5e9df;
  border-radius: 7px;
}
.comments {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comment {
  background: white;
  padding: 16px;
  border-radius: 18px;
}
.comment strong {
  font-size: 14px;
}
.comment p {
  font-size: 15px;
  color: var(--muted);
  margin-top: 7px;
  white-space: pre-wrap;
}
.compose-photo img {
  height: 240px;
}
.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  gap: 12px;
}
.switch-row input {
  appearance: none;
  width: 42px;
  height: 25px;
  border-radius: 20px;
  background: #dbddd4;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.switch-row input:before {
  content: "";
  position: absolute;
  background: white;
  left: 3px;
  top: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  transition: transform 0.2s;
}
.switch-row input:checked {
  background: var(--forest);
}
.switch-row input:checked:before {
  transform: translateX(17px);
}
details {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}
summary {
  cursor: pointer;
  padding: 8px 0;
  min-height: 44px;
}
details p {
  margin-top: 10px;
}
.implementation-note {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.bottom-nav {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: #fffffff5;
  backdrop-filter: blur(14px);
  padding: 7px 0 calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #ebebe4;
  min-height: 80px;
}
.bottom-nav a {
  flex: 1;
  min-width: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
  font-size: 13px;
  gap: 2px;
  min-height: 52px;
}
.nav-icon {
  font-size: 23px;
  line-height: 27px;
}
.bottom-nav a[aria-current] {
  color: var(--forest);
  font-weight: 550;
}
.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 100px;
  transform: translate(-50%, 12px);
  max-width: min(90vw, 440px);
  background: #272822ee;
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 6px 24px #27282220;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
/* Ceremony: the selected cat-card node moves into this dialog, then into My. */
body.in-ritual {
  overflow: hidden;
}
.in-ritual #shell {
  filter: blur(2px);
  opacity: 0.16;
  transition:
    filter 0.5s,
    opacity 0.5s;
}
.ritual-dialog {
  border: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 38px 24px 20px;
  margin: auto;
  max-width: 440px;
  width: 100%;
  height: min(870px, 100dvh);
  max-height: 100dvh;
  overflow: auto;
  border-radius: 26px;
  box-shadow: 0 40px 120px #2728222b;
}
.ritual-dialog::backdrop {
  background: #f7f6f2d9;
}
.ritual-close {
  position: absolute;
  top: 2px;
  right: 8px;
  color: var(--muted);
}
.ritual-intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.ritual-intro h1 {
  font-size: 24px;
}
.ritual-intro p {
  color: var(--muted);
  font-size: 16px;
}
.ritual-stage {
  perspective: 1200px;
  width: 100%;
  height: 440px;
  transform-origin: top left;
}
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 750ms cubic-bezier(0.25, 0.7, 0.2, 1);
}
.ritual-front,
.ritual-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 22px;
  background: white;
  overflow: hidden;
  box-shadow: 0 18px 55px #27282214;
  border: 1px solid var(--line);
}
.ritual-front {
  display: flex;
  align-items: stretch;
}
.ritual-front .cat-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 22px;
  pointer-events: none;
}
.ritual-front .photo {
  flex: 1;
  min-height: 0;
}
.ritual-front .photo img {
  height: 100%;
  width: 100%;
  aspect-ratio: auto;
  object-position: center;
}
.ritual-front .card-info {
  padding: 24px 20px;
}
.ritual-back {
  transform: rotateY(180deg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ritual-back h2 {
  font-size: 28px;
  line-height: 1.5;
  margin: 2px 0 0;
}
.naming-field {
  padding: 0;
  gap: 16px;
}
.naming-field > span {
  font-weight: 400;
  color: var(--muted);
  font-size: 16px;
}
.naming-field input {
  font-size: 28px;
  font-weight: 550;
  background: var(--paper);
  padding: 16px;
  border-radius: 16px;
  line-height: 1.5;
  min-height: 74px;
}
.naming-field input::placeholder {
  font-size: 21px;
  font-weight: 400;
}
.ritual-back form {
  gap: 12px;
}
.ritual-dialog[data-phase="name"] .card-inner {
  transform: rotateY(180deg);
}
.ritual-dialog[data-phase="reveal"] .cat-name {
  animation: name-appear 0.7s both 0.25s;
}
.ritual-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 28px;
}
.ritual-actions .text-link {
  justify-content: flex-start;
  color: var(--muted);
}
.ritual-footnote {
  font-size: 12px;
  text-align: center;
  color: var(--muted);
  margin-top: 12px;
}
.utility-dialog {
  width: calc(100% - 40px);
  max-width: 480px;
  max-height: 90dvh;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 100px #27282230;
}
.utility-dialog::backdrop {
  background: #27282260;
  backdrop-filter: blur(3px);
}
#utility-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog-heading h2 {
  font-size: 20px;
}
.dialog-heading .icon-button {
  margin: -12px -12px -12px 0;
}
.utility-dialog p {
  font-size: 15px;
}
.video-progress {
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.video-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--forest);
  transition: width 0.9s linear;
}
.demo-video img {
  animation: demo-video 8s linear forwards;
}
.demo-video.paused img {
  animation-play-state: paused;
}
@keyframes demo-video {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.16) translate(-2%, 1%);
  }
}
@keyframes name-appear {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (hover: hover) {
  .cat-card:hover {
    box-shadow: 0 12px 30px #2728220b;
  }
  .cat-card:hover .photo img {
    transform: scale(1.025);
  }
  .link-row:hover {
    background: #fdfdfa;
  }
  .primary:hover {
    background: #454f40;
  }
  .text-link:hover {
    text-decoration: underline;
  }
  .ritual-front .cat-card:hover .photo img {
    transform: none;
  }
}
@media (min-width: 600px) {
  main {
    padding-top: 26px;
    gap: 22px;
  }
  .page-header,
  .demo-bar {
    max-width: 760px;
    margin: 0 auto;
  }
  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .owned-grid:has(.owned-slot:only-child) {
    grid-template-columns: minmax(0, 460px);
  }
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .discover-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 22px;
  }
  .discover-aside {
    gap: 16px;
  }
  .invitation-note {
    padding: 20px 5px 0;
  }
  .cat-card .card-info h2 {
    font-size: 24px;
  }
  .bottom-nav {
    width: 100%;
    max-width: 760px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border-radius: 18px 18px 0 0;
  }
  .photo img {
    height: 340px;
  }
  .detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .detail-copy h3 {
    font-size: 17px;
  }
  .detail-copy .link-row strong {
    font-size: 16px;
  }
  .detail-copy .link-row small {
    font-size: 13px;
  }
  .profile-photo img {
    height: 420px;
    aspect-ratio: auto;
  }
  .timeline,
  .record-list,
  .journey-archive {
    max-width: 640px;
  }
  .welcome-photo {
    max-width: 540px;
  }
  .welcome-photo img {
    height: 400px;
  }
  .journey-steps {
    flex-direction: row;
    gap: 14px;
    padding: 22px;
    justify-content: space-between;
  }
  .journey-steps li {
    flex-direction: column;
    font-size: 14px;
    gap: 5px;
    align-items: center;
  }
  .journey-steps li > span:first-child {
    font-size: 20px;
  }
  .update-card .photo img {
    height: 340px;
  }
  .update-card .photo {
    max-width: 620px;
  }
  .ritual-dialog {
    height: 830px;
  }
}
@media (min-width: 1050px) {
  .app-shell {
    max-width: 1280px;
    min-height: 100dvh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .desktop-rail {
    display: flex;
    flex-direction: column;
    padding: 52px 30px 32px;
    position: sticky;
    top: 0;
    height: 100dvh;
    border-right: 1px solid var(--line);
  }
  .brand {
    display: flex;
    align-items: center;
    font-size: 25px;
    gap: 10px;
    font-weight: 550;
    flex-wrap: wrap;
  }
  .brand img {
    width: 29px;
    height: 35px;
    object-fit: contain;
  }
  .brand span {
    display: block;
    font-size: 10px;
    letter-spacing: 3px;
    width: 100%;
    margin-left: 42px;
    margin-top: -8px;
    color: var(--muted);
  }
  .desktop-rail > p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.85;
    margin-top: 50px;
  }
  .desktop-rail nav,
  .desktop-rail #desktop-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 44px;
  }
  .desktop-rail #desktop-nav a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 16px;
  }
  .desktop-rail #desktop-nav a[aria-current] {
    background: #e9e9e0;
    color: var(--forest);
    font-weight: 550;
  }
  .rail-foot {
    margin-top: auto;
    color: var(--muted);
    font-size: 12px;
    line-height: 2;
  }
  .rail-foot small {
    font-size: 10px;
  }
  .status-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #7a8a69;
  }
  .app-page {
    padding: 25px 44px 0;
  }
  .demo-bar {
    padding-left: 0;
    padding-right: 0;
    max-width: 900px;
    font-size: 11px;
  }
  .page-header {
    padding: 22px 0 16px;
    height: 86px;
    max-width: 900px;
  }
  .header-title {
    font-size: 22px;
  }
  .brand-title {
    font-size: 32px;
  }
  main {
    max-width: 900px;
    padding: 30px 0 70px;
    gap: 22px;
  }
  .bottom-nav {
    display: none;
  }
  .discover-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.85fr);
    gap: 24px;
  }
  .discover-aside {
    gap: 18px;
  }
  .invitation-note {
    padding: 30px 10px 0;
  }
  .photo img {
    height: 360px;
  }
  .discover-layout .cat-card .photo img {
    aspect-ratio: 430/390;
  }
  .card-info {
    padding: 24px;
  }
  .card-info h2 {
    font-size: 27px;
  }
  .intro h1 {
    font-size: 28px;
  }
  .lead {
    font-size: 18px;
  }
  .section-heading {
    margin-bottom: 3px;
  }
  .toast {
    bottom: 40px;
  }
  .detail-layout {
    grid-template-columns: 1.05fr 1fr;
    gap: 32px;
  }
  .profile-photo img {
    height: 490px;
  }
  .post-card .photo img {
    aspect-ratio: 1;
  }
  .owned-grid:has(.owned-slot:only-child) {
    grid-template-columns: minmax(0, 430px);
  }
  .app-page:has(#name-form) {
    padding-top: 0;
  }
}
@media (max-width: 359px) {
  :root {
    --space: 18px;
  }
  .demo-bar {
    font-size: 9px;
    letter-spacing: 0;
  }
  .page-header {
    height: 64px;
  }
  .card-info {
    padding: 16px 14px;
  }
  .card-info h2 {
    font-size: 22px;
  }
  .card-info p {
    font-size: 13px;
  }
  .tag {
    font-size: 12px;
    padding: 6px;
  }
  .intro h1 {
    font-size: 23px;
  }
  .identity h1 {
    font-size: 25px !important;
  }
  .button-pair {
    flex-direction: column;
  }
  .ritual-dialog {
    padding: 36px 18px 16px;
    border-radius: 0;
  }
  .ritual-intro h1 {
    font-size: 22px;
  }
  .ritual-stage {
    height: 420px;
  }
  .ritual-back {
    padding: 20px;
    gap: 16px;
  }
  .ritual-back h2 {
    font-size: 25px;
  }
  .naming-field input {
    font-size: 25px;
  }
  .ritual-actions {
    margin-top: 22px;
  }
  .ritual-footnote {
    font-size: 11px;
  }
  .link-row strong {
    font-size: 17px;
  }
}
@media (max-height: 760px) {
  .ritual-stage {
    height: 390px;
  }
  .ritual-dialog {
    padding-top: 34px;
  }
  .ritual-intro {
    margin-bottom: 18px;
  }
  .ritual-back {
    gap: 12px;
    padding: 20px;
  }
  .ritual-back h2 {
    font-size: 26px;
  }
  .ritual-actions {
    margin-top: 20px;
  }
  .ritual-intro h1 {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .in-ritual #shell {
    filter: none;
  }
}
