@font-face {
  font-family: "Mates Display";
  src: url("/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Mates Display";
  src: url("/fonts/fraunces-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Mates Text";
  src: url("/fonts/literata-text.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Mates Text";
  src: url("/fonts/literata-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #1b140f;
  --surface: #2a1d16;
  --surface-2: #3a281e;
  --line: rgba(243, 214, 184, 0.18);
  --text: #f6efe6;
  --muted: #c4ad9a;
  --accent: #e25b2a;
  --accent-ink: #2a1208;
  --warm: #e7c27a;
  --danger: #e15a4a;
  --tint: rgba(226, 91, 42, 0.14);
  --field: #140e0b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --display: "Mates Display", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Mates Text", "Iowan Old Style", Palatino, Georgia, serif;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(226, 91, 42, 0.16), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(231, 194, 122, 0.1), transparent 50%),
    var(--bg);
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

.icon { width: 22px; height: 22px; fill: currentColor; }
.muted { color: var(--muted); }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
h1, h2, h3, .mark, .wordmark-sm, .btn { font-family: var(--display); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; }
.card {
  background: rgba(42, 29, 22, 0.94);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: none;
  margin-bottom: 16px;
}
.pad { padding: 20px 22px; }
.pad h1, .pad h2, .card h2, .card h3 { margin: 0 0 12px; font-size: 22px; }
.empty { padding: 28px 22px; }
.banner { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid transparent; }
.banner-notice { background: var(--tint); color: #ffd2c2; border-color: rgba(226, 91, 42, 0.4); }
.banner-error { background: rgba(255, 107, 125, 0.12); color: #ffc1c9; border-color: rgba(255, 107, 125, 0.35); }

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  padding: 9px 16px;
  text-decoration: none;
}
.btn-blue, .btn-green { background: var(--accent); color: var(--accent-ink); }
.btn-blue:hover, .btn-green:hover { background: #f08955; }
.btn-gray { background: transparent; color: var(--text); border-color: var(--line); }
.btn-gray:hover { background: var(--tint); }
.btn-danger { background: var(--danger); color: #2a060c; }
.btn-danger:hover { background: #ff8b99; }
.danger-zone { border-color: rgba(255, 107, 125, 0.45); }
.btn-block { display: block; width: 100%; height: 48px; font-size: 16px; }
.btn-row { display: flex; gap: 8px; }
.text-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; }
.text-btn:hover { color: var(--text); }

.avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--surface-2);
}
.avatar-sm { width: 36px; height: 36px; border-radius: 10px; font-weight: 700; }
.avatar-md { width: 44px; height: 44px; font-weight: 700; }
.avatar-lg { width: 104px; height: 104px; border-radius: 24px; font-size: 40px; font-weight: 700; }
.avatar-fallback { color: #fff; }
.av-0 { background: #c4512c; }
.av-1 { background: #c47b2b; }
.av-2 { background: #a33d55; }
.av-3 { background: #d6b25e; color: #1a1408; }
.av-4 { background: #6b4a38; }
.av-5 { background: #7a4e3a; }
.av-6 { background: #8a5a2f; }
.av-7 { background: #5c3a32; }

.app { display: grid; grid-template-columns: 112px minmax(0, 1fr); min-height: 100vh; }
.dock {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 10px 16px;
  border-right: 1px solid var(--line);
  background: rgba(27, 20, 15, 0.88);
  z-index: 20;
}
.mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.06em;
  text-decoration: none;
  line-height: 1;
}
.dock-nav { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.dock-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dock-link:hover, .dock-link:focus-visible { background: var(--tint); color: var(--text); }
.badge {
  position: absolute;
  top: 4px;
  right: 12px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--warm);
  color: #2a2108;
  font-size: 11px;
  letter-spacing: 0;
  line-height: 18px;
  text-align: center;
}
.account { position: relative; margin-top: auto; }
.account summary { list-style: none; cursor: pointer; border-radius: 12px; }
.account summary::-webkit-details-marker { display: none; }
.menu {
  position: absolute;
  left: calc(100% + 10px);
  bottom: 0;
  width: 240px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 30;
}
.menu a, .menu button {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  color: var(--text);
}
.menu a small { display: block; color: var(--muted); font-weight: 400; }
.menu a:hover, .menu button:hover { background: var(--tint); }

.stage { min-width: 0; }
.search, .stage-main { width: min(760px, calc(100% - 40px)); margin-left: auto; margin-right: auto; }
.search { margin-top: 22px; }
.search input, .login-panel input, .stack input, .stack textarea, .mind, .comment-form input, .auth-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
  padding: 12px 14px;
  outline: none;
}
.search input:focus, .login-panel input:focus, .stack input:focus, .stack textarea:focus, .mind:focus, .comment-form input:focus, .auth-card input:focus,
.stack select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(226, 91, 42, 0.22);
}
.page-intro { margin: 8px 0 18px; }
.page-intro h1 { margin: 0; font-size: 40px; }
.page-intro p { margin: 6px 0 0; }
.orbit { margin-bottom: 18px; }
.orbit h2 { margin: 0 0 10px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.orbit-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.orbit-person {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(42, 29, 22, 0.8);
  text-decoration: none;
  font-weight: 650;
}
.orbit-person:hover { border-color: var(--accent); }

.composer { padding: 16px 18px 14px; }
.composer-top { display: flex; gap: 12px; align-items: flex-start; }
.mind { min-height: 72px; resize: vertical; }
.composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.composer-privacy { display: flex; align-items: center; gap: 8px; }
.composer-privacy select, .stack select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--text);
  padding: 8px 12px;
}
.stack select { width: 100%; border-radius: 14px; }
.stack input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; padding: 0; border-radius: 4px; accent-color: var(--accent); }
.privacy-note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.privacy-note a { color: var(--accent); }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 650; margin: 8px 0; }
.post-sub { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.post-sub a { color: var(--muted); text-decoration: none; }
.vis {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--warm);
}
.post-body a { color: var(--accent); font-weight: 700; text-decoration: none; }
.login-hint { margin: 8px 16px 14px; color: var(--muted); }
.login-hint a, .auth-switch a { color: var(--accent); font-weight: 700; text-decoration: none; }
.wordmark-sm { color: var(--text); font-size: 26px; font-weight: 700; letter-spacing: -0.04em; text-decoration: none; }
.photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--warm);
  font-weight: 700;
  cursor: pointer;
}
.photo-btn:hover { background: rgba(240, 195, 106, 0.1); }
.photo-btn input, .cam input { display: none; }
.post-preview { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 16px; margin-top: 8px; }

.post { overflow: hidden; }
.post-head, .person, .person-id, .comment, .comment-form, .profile-id {
  display: flex;
  gap: 12px;
  align-items: center;
}
.post-head { padding: 16px 18px 0; }
.post-meta { display: flex; flex-direction: column; flex: 1; }
.post-meta a, .comment-bubble a, .person-id strong { font-weight: 700; text-decoration: none; }
.post-meta time, .person-id small { color: var(--muted); font-size: 13px; }
.post-body { margin: 12px 18px; white-space: pre-wrap; }
.post-image { display: block; width: 100%; max-height: 560px; object-fit: cover; }
.like-count { padding: 8px 18px 0; color: var(--muted); font-size: 14px; }
.post-actions { display: flex; gap: 8px; margin: 12px 18px 4px; }
.action {
  display: inline-grid;
  place-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.action:hover { border-color: var(--accent); color: var(--text); }
.action.liked { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.comments { padding: 8px 18px 16px; }
.comment { align-items: flex-start; margin-bottom: 8px; }
.comment-bubble { background: var(--field); border: 1px solid var(--line); border-radius: 16px; padding: 8px 12px; }
.comment-bubble p { margin: 2px 0 0; }
.comment-form input { border-radius: 999px; }

.person { justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person-id { text-decoration: none; min-width: 0; }
.person-id span, .friend-tile span { display: flex; flex-direction: column; min-width: 0; }
.person-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.profile-card { overflow: hidden; }
.cover {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(120deg, #4a2618, #2a1d16 55%, #6a4020);
}
.cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-form { position: absolute; right: 16px; bottom: 16px; }
.cam {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(27, 20, 15, 0.72);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}
.cam-sm { padding: 7px; border-radius: 12px; }
.profile-id { align-items: center; padding: 18px 22px 20px; }
.avatar-wrap { position: relative; }
.avatar-form { position: absolute; right: -6px; bottom: -6px; }
.profile-id h1 { margin: 0; font-size: 34px; }
.profile-url { margin: 2px 0 0; font-size: 14px; }
.profile-url a { color: var(--accent); text-decoration: none; }
.field-hint { margin: -4px 0 0; font-size: 13px; color: var(--muted); }
.profile-actions { margin-left: auto; }
.profile-grid { display: flex; flex-direction: column; gap: 16px; }
.profile-grid > div:first-child { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; align-items: start; }
.stack { display: grid; gap: 8px; margin-top: 12px; }
.stack textarea { min-height: 88px; }
.friend-grid { display: flex; flex-direction: column; gap: 8px; }
.friend-tile {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}
.friend-tile:hover { background: var(--tint); }
.friend-tile .avatar { width: 40px; height: 40px; }

.guest-app { min-height: 100vh; }
.guest-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.guest-nav { display: flex; gap: 8px; }

.auth-body { min-height: 100vh; }
.login-wrap, .signup-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}
.login-wrap > *, .signup-wrap > * { min-width: 0; }
.login-visual, .signup-visual {
  position: relative;
  min-height: 100vh;
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.signup-visual { padding: 0; justify-content: flex-end; }
.life-grid {
  display: grid;
  flex: 1;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  margin: 0;
  min-height: 0;
}
.life-grid img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; display: block; border-radius: 22px; }
.photo-credit { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.photo-credit a { color: var(--muted); }
.signup-visual .photo-credit {
  position: absolute;
  left: 20px;
  bottom: 16px;
  margin: 0;
  color: #f4fff9;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.signup-visual .photo-credit a { color: #f4fff9; }
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0;
}
.login-panel h1 { margin: 0 0 18px; font-size: 40px; line-height: 1.05; overflow-wrap: anywhere; }
.login-panel form, .auth-card form { display: grid; gap: 12px; }
.auth-switch { margin: 8px 0 0; }
.signup-banner { width: 100%; height: 100%; min-height: 100vh; object-fit: cover; display: block; border-radius: 0; margin: 0; }
.signup-card { width: min(460px, calc(100% - 48px)); }
body.auth-body > main.auth-card {
  width: min(440px, calc(100% - 32px));
  margin: 12vh auto;
  padding: 28px;
}

.public-hero { display: grid; grid-template-columns: 1.15fr 0.85fr; overflow: hidden; min-height: 240px; }
.public-hero > img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; display: block; }
.public-hero .pad { display: flex; flex-direction: column; justify-content: center; }
.empty-life img { width: 100%; height: 180px; object-fit: cover; display: block; border-radius: 16px; margin-bottom: 12px; }

@media (max-width: 900px) {
  .login-wrap, .signup-wrap, .public-hero, .profile-grid > div:first-child { grid-template-columns: 1fr; }
  .login-visual, .signup-visual { min-height: 0; height: auto; padding: 16px 16px 0; }
  .signup-banner { height: 200px; min-height: 0; }
  .life-grid { flex: none; height: 220px; }
  .login-wrap, .signup-wrap { width: 100%; max-width: 100%; }
  .login-panel, .signup-card { width: calc(100vw - 40px); }
  .login-panel { padding: 24px 0 48px; }
  .login-panel h1 { font-size: 28px; }
  .page-intro h1 { font-size: 32px; }
}
@media (max-width: 760px) {
  .app { display: block; padding-bottom: 76px; }
  .dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: 68px;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 6px 8px;
    background: rgba(27, 20, 15, 0.96);
  }
  .dock .mark { display: none; }
  .dock-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .dock-nav { flex-direction: row; justify-content: space-around; }
  .account { margin-top: 0; }
  .menu { left: auto; right: 0; bottom: 64px; }
  .search, .stage-main, .guest-bar { width: min(760px, calc(100% - 24px)); }
  .cover { height: 160px; }
  .avatar-lg { width: 84px; height: 84px; font-size: 32px; }
  .profile-id { flex-wrap: wrap; }
  .profile-id h1 { font-size: 28px; }
  .profile-actions { margin-left: 0; width: 100%; }
  .guest-bar { padding-top: 14px; }
}
