:root {
  color-scheme: light;
  --ink: #1d2528;
  --muted: #657174;
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(29, 37, 40, 0.14);
  --accent: #2e7d72;
  --accent-dark: #1f5f56;
  --rose: #c45870;
  --sky: #d8eef1;
  --leaf: #e7f1dc;
  --paper: #fffaf3;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(216, 238, 241, 0.82), rgba(231, 241, 220, 0.72)),
    var(--paper);
}

a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.auth-shell,
.home-shell {
  min-height: 100vh;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.auth-shell {
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.auth-panel {
  width: min(100%, 460px);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(29, 37, 40, 0.12);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 4.75rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.auth-panel h1 {
  font-size: clamp(2.4rem, 11vw, 4rem);
}

.lead,
.welcome p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.stack {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

label {
  font-weight: 800;
}

select,
button,
input,
textarea {
  width: 100%;
  border-radius: 8px;
  font: inherit;
}

select,
input[type="file"],
textarea {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

select,
input[type="file"] {
  min-height: 48px;
  padding: 0 14px;
}

input[type="file"] {
  padding: 11px 14px;
}

textarea {
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
}

input[type="range"] {
  accent-color: var(--accent);
}

.primary-button {
  min-height: 48px;
  border: 0;
  padding: 0 18px;
  color: #fff;
  background: var(--accent);
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(46, 125, 114, 0.24);
}

.primary-button:hover {
  background: var(--accent-dark);
}

.status {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.status[data-tone="error"] {
  color: #9d2442;
}

.status[data-tone="success"] {
  color: var(--accent-dark);
}

.quiet-link {
  display: inline-block;
  margin-top: 16px;
}

.home-shell {
  padding: 22px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.welcome {
  padding: min(14vh, 140px) 0 0;
}

.welcome h1 {
  max-width: 820px;
}

.welcome p:not(.eyebrow) {
  max-width: 620px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 46px;
}

.profile-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 142px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(29, 37, 40, 0.1);
}

.profile-card h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 88px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(46, 125, 114, 0.18);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--rose));
  font-size: 2.2rem;
  font-weight: 900;
}

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

.avatar-large {
  width: 132px;
  margin-bottom: 10px;
  font-size: 3rem;
}

.mood-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink);
  font-weight: 850;
}

.mood-emoji {
  font-size: 2rem;
  line-height: 1;
}

.profile-status {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.profile-editor {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 440px);
  gap: 44px;
  align-items: start;
  padding: min(10vh, 96px) 0 0;
}

.profile-form {
  display: grid;
  gap: 13px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(29, 37, 40, 0.1);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0;
}

.secondary-link {
  flex: 0 0 auto;
}

.home-feed {
  margin-top: 44px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.feed-notice {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0 0 16px;
  padding: 6px 12px;
  border: 1px solid rgba(46, 125, 114, 0.2);
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(231, 241, 220, 0.75);
  font-weight: 850;
}

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 460px);
  gap: 44px;
  align-items: start;
  padding: min(10vh, 96px) 0 0;
}

.feed-intro p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.composer {
  display: grid;
  gap: 13px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(29, 37, 40, 0.1);
}

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

.full-post-list {
  margin-top: 36px;
  padding-bottom: 42px;
}

.compact-post-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 30px rgba(29, 37, 40, 0.08);
}

.post-card.is-new {
  border-color: rgba(46, 125, 114, 0.36);
  background: rgba(231, 241, 220, 0.76);
}

.post-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.post-card time {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.post-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.seen-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.seen-divider::before,
.seen-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.seen-divider span {
  text-align: center;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
}

@media (max-width: 560px) {
  .auth-shell,
  .home-shell {
    width: min(100% - 22px, 1120px);
  }

  .auth-panel {
    padding: 26px 20px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    gap: 12px;
  }

  .profile-grid,
  .profile-editor,
  .feed-layout,
  .compact-post-list {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-card {
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 16px;
  }

  .avatar {
    width: 72px;
  }
}
