:root {
  --ink: #171717;
  --paper: #fffdf8;
  --paper-strong: #ffffff;
  --mist: #f1f2fb;
  --muted: #5e6272;
  --lemon: #ffe66e;
  --mint: #63d9b6;
  --pink: #ffc6da;
  --sky: #bfe8ff;
  --lime: #d9ff30;
  --peach: #ffd9b8;
  --line: rgba(23, 23, 23, 0.14);
  --shadow: 0 18px 45px rgba(37, 38, 56, 0.12);
  --card-shadow: 0 12px 0 rgba(23, 23, 23, 0.08);
  --radius-xl: 38px;
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: "Avenir Next", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.9) 0 10px, transparent 11px),
    radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.75) 0 8px, transparent 9px),
    radial-gradient(circle at 88% 68%, rgba(255, 255, 255, 0.78) 0 12px, transparent 13px),
    linear-gradient(180deg, #f3f3fb 0%, #ebeef7 52%, #eef0f8 100%);
  background-attachment: fixed;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -90px;
  right: -80px;
  width: 340px;
  height: 340px;
  border-radius: 40% 60% 58% 42%;
  background: rgba(217, 255, 48, 0.28);
  filter: blur(8px);
}

body::after {
  left: -90px;
  bottom: -80px;
  width: 300px;
  height: 300px;
  border-radius: 58% 42% 60% 40%;
  background: rgba(99, 217, 182, 0.16);
  filter: blur(8px);
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 28px;
}

.loading-page {
  display: grid;
  place-items: center;
}

.surface-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), var(--card-shadow);
}

.loading-card {
  max-width: 520px;
  padding: 42px 34px;
  text-align: center;
  animation: rise-in 480ms ease;
}

.loading-mark,
.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 2px solid var(--ink);
  border-radius: 22px;
  background: var(--lime);
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(23, 23, 23, 0.08);
}

.loading-card h1,
.showcase-copy h1,
.workspace-header h2,
.space-hero h3,
.auth-card h2,
.welcome-card h2,
.feature-card h2,
.empty-state-panel h3,
.helper-panel h3 {
  margin: 0;
  font-family: "Arial Rounded MT Bold", "Avenir Next", "Trebuchet MS", sans-serif;
  letter-spacing: -0.03em;
}

.loading-card h1 {
  margin-top: 18px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.95;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy,
.sidebar-copy,
.side-copy,
.feature-card p,
.welcome-card p,
.empty-state-panel p,
.mini-note,
.member-meta small,
.pet-chip small,
.file-label small,
.author-badge small {
  color: var(--muted);
  line-height: 1.6;
}

.loading-dots {
  display: inline-flex;
  gap: 10px;
  margin-top: 18px;
}

.loading-dots span {
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--mint);
  animation: pulse-dot 1.1s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
  animation-delay: 120ms;
}

.loading-dots span:nth-child(3) {
  animation-delay: 240ms;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 430px);
  gap: 26px;
  align-items: center;
}

.auth-showcase,
.library-rail,
.detail-rail {
  display: grid;
  gap: 18px;
}

.showcase-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  padding: 26px;
  min-height: 440px;
  animation: rise-in 560ms ease;
}

.showcase-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 26px;
  border: 1px dashed rgba(23, 23, 23, 0.18);
  pointer-events: none;
}

.showcase-art {
  position: relative;
  display: grid;
  place-items: center;
  padding: 18px;
}

.mascot-badge {
  position: relative;
  width: 230px;
  height: 230px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 16px 0 rgba(23, 23, 23, 0.08);
}

.mascot-badge::before,
.mascot-badge::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 52px;
  height: 70px;
  border: 2px solid var(--ink);
  border-radius: 50px 50px 26px 26px;
  background: var(--paper);
}

.mascot-badge::before {
  left: 42px;
  transform: rotate(-18deg);
}

.mascot-badge::after {
  right: 42px;
  transform: rotate(18deg);
}

.mascot-face {
  position: absolute;
  inset: 44px;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.mascot-face::before {
  content: "";
  width: 44px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--peach);
}

.mascot-eyes {
  display: flex;
  gap: 24px;
  align-items: center;
}

.mascot-eye {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ink);
}

.mascot-smile {
  width: 50px;
  height: 22px;
  border-bottom: 3px solid var(--ink);
  border-radius: 0 0 999px 999px;
}

.floating-mini-card {
  position: absolute;
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper-strong);
  box-shadow: 0 8px 0 rgba(23, 23, 23, 0.08);
  animation: float-bob 3.4s ease-in-out infinite;
}

.floating-mini-card strong {
  font-size: 0.92rem;
}

.floating-mini-card small {
  color: var(--muted);
}

.floating-mini-card:nth-of-type(1) {
  top: 28px;
  left: 12px;
}

.floating-mini-card:nth-of-type(2) {
  right: 8px;
  bottom: 34px;
  animation-delay: 240ms;
}

.showcase-copy {
  align-self: center;
  padding-right: 12px;
}

.showcase-copy h1 {
  font-size: clamp(2.2rem, 4vw, 4.3rem);
  line-height: 0.94;
  margin-bottom: 16px;
}

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

.feature-card {
  min-height: 170px;
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.phone-stage {
  display: grid;
  place-items: center;
}

.phone-shell {
  width: min(100%, 430px);
  padding: 12px;
  border: 3px solid rgba(255, 255, 255, 0.84);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 28px 70px rgba(39, 43, 60, 0.18);
  backdrop-filter: blur(14px);
}

.dashboard-shell {
  position: sticky;
  top: 24px;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 12px;
  font-size: 0.83rem;
  font-weight: 800;
}

.status-icons {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.status-icons span {
  display: inline-block;
  height: 10px;
  border-radius: 999px;
  border: 2px solid var(--ink);
}

.status-icons span:nth-child(1) {
  width: 12px;
}

.status-icons span:nth-child(2) {
  width: 18px;
}

.status-icons span:nth-child(3) {
  width: 24px;
  background: var(--ink);
}

.phone-screen {
  max-height: calc(100vh - 92px);
  overflow: auto;
  padding: 16px;
  border: 2px solid rgba(23, 23, 23, 0.12);
  border-radius: calc(var(--radius-xl) - 10px);
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 255, 255, 0.8) 0 2px, transparent 3px),
    linear-gradient(180deg, #fffefb 0%, #fff8ef 100%);
}

.phone-screen::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.welcome-card,
.auth-card,
.rail-card,
.composer-card,
.mini-stat,
.space-hero,
.post-card,
.side-panel,
.empty-feed,
.empty-state-panel {
  padding: 20px;
}

.welcome-card {
  margin-bottom: 14px;
}

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

.auth-card-header {
  display: grid;
  gap: 6px;
}

.stack-form,
.compact-form {
  display: grid;
  gap: 14px;
}

.stack-form label,
.compact-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  padding: 14px 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(23, 23, 23, 0.18);
  border-radius: var(--radius-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(23, 23, 23, 0.42);
  box-shadow: 0 0 0 4px rgba(99, 217, 182, 0.2);
  transform: translateY(-1px);
}

.primary-button,
.ghost-button,
.tiny-button {
  border: 2px solid var(--ink);
  border-radius: 18px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  padding: 13px 16px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 6px 0 rgba(23, 23, 23, 0.12);
}

.ghost-button {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-weight: 700;
}

.tiny-button {
  padding: 8px 12px;
  background: var(--pink);
  font-size: 0.86rem;
  font-weight: 800;
}

.primary-button:hover,
.ghost-button:hover,
.tiny-button:hover,
.space-list-item:hover,
.fact-card-button:hover,
.feature-card:hover,
.pet-chip:hover,
.member-row:hover,
.post-card:hover,
.mini-stat:hover {
  transform: translateY(-2px) rotate(-0.35deg);
}

.full-width {
  width: 100%;
}

.invite-banner,
.notice-banner {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: var(--paper);
}

.accent-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(255, 230, 110, 0.45), rgba(255, 198, 218, 0.36));
}

.label-chip,
.section-heading span,
.hero-chip,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.8rem;
  font-weight: 800;
}

.notice-banner {
  margin-top: 0;
}

.success-banner {
  background: rgba(99, 217, 182, 0.28);
}

.error-banner {
  background: rgba(255, 198, 218, 0.4);
}

.dashboard-page {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(350px, 440px) minmax(260px, 320px);
  gap: 20px;
  align-items: start;
}

.rail-card {
  display: grid;
  gap: 16px;
}

.brand-card h1 {
  font-size: 1.7rem;
  line-height: 1;
}

.brand-topline {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-heading,
.workspace-header,
.post-header,
.post-footer,
.member-row,
.member-meta,
.author-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  font-size: 1.06rem;
}

.section-heading-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 280px);
}

.section-heading-actions .ghost-button,
.section-heading-actions .primary-button {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.space-list,
.member-stack,
.pet-chip-group,
.roadmap-list,
.feed-stack {
  display: grid;
  gap: 12px;
}

.space-list-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 8px 0 rgba(23, 23, 23, 0.06);
}

.active-space {
  transform: translateY(-2px);
  box-shadow: 0 12px 0 rgba(23, 23, 23, 0.08);
}

.space-art,
.avatar-bubble,
.pet-mini-badge {
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--paper-strong);
  font-weight: 900;
}

.space-art {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  overflow: hidden;
}

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

.space-meta {
  display: grid;
  gap: 4px;
}

.space-meta small {
  color: var(--muted);
}

.workspace-header {
  margin-bottom: 14px;
}

.workspace-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1;
}

.logout-button {
  flex: 0 0 auto;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.mini-stat {
  display: grid;
  gap: 4px;
}

.mini-stat-button {
  width: 100%;
  text-align: left;
}

.mini-stat span,
.fact-card span {
  font-size: 0.82rem;
  color: var(--muted);
}

.mini-stat strong,
.fact-card strong {
  font-size: 1.7rem;
  line-height: 1;
}

.space-hero {
  display: grid;
  gap: 18px;
}

.hero-portrait {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 2px solid var(--ink);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.44);
  overflow: hidden;
}

.portrait-ring {
  width: min(230px, 78%);
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper-strong);
  box-shadow: 0 10px 0 rgba(23, 23, 23, 0.08);
}

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

.hero-chip {
  position: absolute;
  right: 16px;
  bottom: 16px;
  background: var(--paper-strong);
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 3rem;
}

.hero-content p {
  margin: 0;
}

.hero-content > p {
  margin-top: 10px;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.fact-card {
  min-width: 0;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 6px;
}

.fact-card-button {
  width: 100%;
  text-align: left;
}

.fact-card small {
  color: var(--muted);
  line-height: 1.4;
}

.hero-action-block {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.hero-action-heading {
  margin-bottom: 0;
}

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

.composer-card {
  margin-bottom: 14px;
}

.file-label input[type="file"] {
  padding: 10px;
  background: rgba(255, 255, 255, 0.95);
}

.feed-stack {
  padding-bottom: 4px;
}

.post-card {
  display: grid;
  gap: 14px;
}

.feed-stack .post-card:nth-child(odd) {
  transform: rotate(-0.35deg);
}

.feed-stack .post-card:nth-child(even) {
  transform: rotate(0.35deg);
}

.author-badge {
  justify-content: flex-start;
}

.author-badge > div {
  display: grid;
  gap: 4px;
}

.avatar-bubble {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  font-size: 0.9rem;
}

.post-caption,
.post-text {
  margin: 0;
  line-height: 1.65;
}

.post-caption {
  font-weight: 800;
}

.post-media-frame {
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
}

.post-media {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.post-text {
  padding: 14px 16px;
  border: 2px dashed rgba(23, 23, 23, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.post-footer {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.side-panel {
  display: grid;
  gap: 14px;
}

.pet-chip {
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 22px;
  display: grid;
  gap: 8px;
}

.pet-mini-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 0.84rem;
}

.member-row {
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
}

.member-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  min-width: 0;
}

.member-meta .avatar-bubble {
  grid-row: 1 / span 2;
}

.member-meta strong {
  display: block;
  grid-column: 2;
}

.member-meta small {
  grid-column: 2;
}

.roadmap-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.helper-panel {
  min-height: 220px;
}

.hidden-panel {
  display: none;
}

.empty-feed,
.empty-state-panel,
.empty-sidebar-card {
  text-align: center;
}

.empty-state-panel {
  display: grid;
  gap: 12px;
}

.surface-panel-soft {
  background: rgba(255, 255, 255, 0.86);
}

.tone-lemon {
  background: linear-gradient(180deg, rgba(255, 230, 110, 0.5), rgba(255, 253, 248, 0.98));
}

.tone-mint {
  background: linear-gradient(180deg, rgba(99, 217, 182, 0.42), rgba(255, 253, 248, 0.98));
}

.tone-pink {
  background: linear-gradient(180deg, rgba(255, 198, 218, 0.48), rgba(255, 253, 248, 0.98));
}

.tone-sky {
  background: linear-gradient(180deg, rgba(191, 232, 255, 0.54), rgba(255, 253, 248, 0.98));
}

@keyframes pulse-dot {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes float-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

@media (max-width: 1280px) {
  .dashboard-page {
    grid-template-columns: minmax(250px, 300px) minmax(360px, 1fr);
  }

  .detail-rail {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .page {
    padding: 18px;
  }

  .auth-page,
  .dashboard-page,
  .showcase-card {
    grid-template-columns: 1fr;
  }

  .dashboard-page {
    gap: 18px;
  }

  .library-rail {
    order: 2;
  }

  .phone-stage {
    order: 1;
  }

  .detail-rail {
    order: 3;
    grid-template-columns: 1fr;
  }

  .dashboard-shell {
    position: static;
  }

  .phone-shell {
    width: min(100%, 470px);
  }

  .showcase-grid,
  .mini-stats,
  .hero-facts,
  .hero-action-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 14px;
  }

  .showcase-card,
  .feature-card,
  .auth-card,
  .welcome-card,
  .rail-card,
  .composer-card,
  .mini-stat,
  .space-hero,
  .post-card,
  .side-panel,
  .empty-feed,
  .empty-state-panel {
    padding: 16px;
  }

  .phone-shell {
    padding: 10px;
    border-radius: 30px;
  }

  .phone-screen {
    max-height: none;
    padding: 14px;
    border-radius: 24px;
  }

  .status-bar,
  .section-heading,
  .workspace-header,
  .accent-banner,
  .post-header,
  .member-row,
  .member-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .showcase-copy h1,
  .loading-card h1 {
    font-size: 2.2rem;
  }

  .mascot-badge {
    width: 190px;
    height: 190px;
  }
}

/* Mobile Web App Layout Overrides */

.dashboard-page {
  display: block;
}

.app-shell {
  width: min(100%, 480px);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.room-detail-shell {
  display: grid;
  gap: 16px;
  animation: rise-in 240ms ease;
}

.room-detail-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.back-nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.room-detail-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.room-detail-copy .eyebrow {
  margin-bottom: 0;
}

.room-detail-copy strong {
  font-size: 1rem;
  line-height: 1.15;
}

.auth-entry-card {
  width: min(100%, 430px);
  justify-self: center;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.app-header-card,
.section-card {
  padding: 20px;
}

.app-header-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.app-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-header-card h1 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1;
}

.section-card {
  display: grid;
  gap: 14px;
}

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

.action-button {
  width: 100%;
  min-height: 72px;
  padding: 16px 14px;
  border: 2px solid var(--ink);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 0 rgba(23, 23, 23, 0.06);
  text-align: center;
  display: grid;
  place-items: center;
  gap: 0;
}

.action-button strong {
  font-size: 1rem;
}

.action-button small {
  color: var(--muted);
  line-height: 1.45;
}

.space-list.space-gallery,
.pet-library-grid,
.pet-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.space-catalog-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
}

.space-card-hero {
  aspect-ratio: 0.9;
  border: 2px solid var(--ink);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  display: grid;
  place-items: center;
}

.space-card-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.space-card-letter {
  font-size: 2.2rem;
  font-weight: 900;
}

.space-card-meta {
  display: grid;
  gap: 6px;
}

.space-card-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.space-card-meta strong {
  font-size: 1rem;
  line-height: 1.15;
}

.space-card-meta small {
  color: var(--muted);
  line-height: 1.45;
}

.empty-sidebar-card {
  grid-column: 1 / -1;
}

.pet-library-stack,
.selected-pet-grid {
  display: grid;
  gap: 12px;
}

.pet-library-card,
.pet-picker-card,
.selected-pet-card {
  border: 2px solid var(--ink);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 0 rgba(23, 23, 23, 0.06);
}

.pet-library-card,
.pet-picker-card {
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 8px;
  text-align: left;
}

.pet-library-photo,
.pet-picker-photo,
.selected-pet-photo {
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
}

.pet-library-photo img,
.pet-picker-photo img,
.selected-pet-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pet-picker-card {
  width: 100%;
}

.selected-pet-picker-card {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 4px rgba(99, 217, 182, 0.26),
    0 8px 0 rgba(23, 23, 23, 0.08);
}

.selected-pet-grid {
  grid-template-columns: 1fr;
}

.selected-pet-card {
  padding: 10px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.selected-pet-photo {
  width: 72px;
  aspect-ratio: 1;
}

.selected-pet-card strong {
  display: block;
  margin-bottom: 4px;
}

.selected-pet-card small,
.pet-library-card small,
.pet-picker-card small {
  color: var(--muted);
  line-height: 1.45;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 23, 23, 0.32);
  backdrop-filter: blur(8px);
}

.modal-backdrop.hidden-panel {
  display: none;
}

.modal-sheet {
  width: min(100%, 520px);
  max-height: min(88vh, 860px);
  overflow: auto;
  padding: 20px;
}

.modal-sheet::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.modal-close-row {
  display: flex;
  justify-content: flex-end;
}

.create-space-modal,
.pet-picker-modal,
.pet-profile-create-modal,
.info-modal {
  display: grid;
  gap: 16px;
}

.pet-picker-grid .mini-note {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .page {
    padding: 14px;
  }

  .app-header-card,
  .section-card,
  .modal-sheet {
    padding: 16px;
  }

  .app-header-card,
  .app-header-main,
  .section-card .section-heading,
  .invite-banner.accent-banner,
  .room-detail-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .space-list.space-gallery,
  .action-grid,
  .pet-library-grid,
  .pet-picker-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-heading-actions {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .space-list.space-gallery,
  .action-grid,
  .pet-library-grid,
  .pet-picker-grid {
    grid-template-columns: 1fr;
  }

  .selected-pet-card {
    grid-template-columns: 1fr;
  }

  .selected-pet-photo {
    width: 100%;
  }

  .section-heading-actions .ghost-button,
  .section-heading-actions .primary-button {
    flex: 1 1 0;
  }
}
