:root {
  --bg: #f6f6ef;
  --paper: #ffffff;
  --text: #222222;
  --muted: #6b6b6b;
  --line: #d7d2c7;
  --link: #0000ee;
  --accent: #ff6600;
  --accent-soft: #fff1e6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Verdana, Geneva, sans-serif;
  font-size: 13px;
  line-height: 1.35;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

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

input,
textarea,
select {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #b9b3a6;
  border-radius: 0;
  background: #fff;
  color: var(--text);
}

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

button,
.ghost-button {
  padding: 4px 8px;
  border: 1px solid #b9b3a6;
  background: #efefef;
  color: var(--text);
  border-radius: 0;
  cursor: pointer;
}

.chrome {
  width: min(1100px, calc(100vw - 16px));
  margin: 8px auto;
  background: var(--paper);
  border: 1px solid var(--line);
}

.site-header {
  background: var(--accent);
  color: #000;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wordmark {
  display: inline-block;
  color: #000;
  font-weight: 700;
  padding: 1px 4px;
  border: 1px solid #fff;
  background: #fff;
}

.tagline {
  color: #2b2b2b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a,
.site-nav button {
  color: #000;
}

.site-nav form {
  margin: 0;
}

.page {
  padding: 10px 12px 18px;
}

.hero {
  padding: 2px 0 10px;
}

.compact-hero h1,
.profile-header h1,
.panel h1 {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  text-transform: lowercase;
}

.lede,
.panel p,
.detail-list p,
.compatibility,
.dev-link p {
  color: var(--muted);
}

.lede {
  margin: 0 0 8px;
  max-width: 64ch;
}

.hero-search,
.compact-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.hero-search input {
  flex: 1 1 280px;
}

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

.two-up {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.landing-columns {
  align-items: start;
}

.panel {
  padding: 0;
  background: transparent;
  border: 0;
}

.grid.two-up > .panel:nth-child(odd) {
  padding-right: 6px;
}

.grid.two-up > .panel:nth-child(even) {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.page > .panel + .panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.panel h2 {
  margin: 0 0 6px;
  font-size: 14px;
  color: #000;
}

.panel-separator {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 10px 0;
}

.stack {
  display: grid;
  gap: 6px;
}

.stack label {
  font-size: 11px;
  color: var(--muted);
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.narrow {
  max-width: 920px;
}

.onboarding-shell {
  padding-top: 2px;
}

.onboarding-copy {
  margin-bottom: 12px;
}

.onboarding-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.onboarding-form {
  padding-right: 4px;
}

.onboarding-preview {
  padding: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdf8 0%, #fff8ee 100%);
}

.preview-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.preview-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #f0eadf;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  color: #5d4d2e;
}

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

.preview-body h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  font-family: Georgia, "Times New Roman", serif;
}

.preview-url {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 11px;
  word-break: break-all;
}

.preview-bio {
  margin: 0;
}

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.compact-list li,
.dense-list li {
  padding: 3px 0;
}

.dense-list li + li {
  border-top: 1px dotted var(--line);
}

.detail-list {
  display: block;
}

.detail-list p {
  margin: 2px 0 0;
}

.profile-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 2px 0 8px;
  border-bottom: 1px solid var(--line);
}

.stats {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.stats div {
  background: transparent;
  border: 0;
  padding: 0;
  min-width: 0;
}

.stats strong {
  display: inline;
  font-size: 13px;
  font-weight: 700;
}

.stats span {
  color: var(--muted);
  margin-left: 3px;
}

.love-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.love-people-count {
  color: var(--muted);
}

.inline-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  cursor: pointer;
}

.inline-link:hover {
  text-decoration: underline;
}

.action-link {
  white-space: nowrap;
}

.quick-upload-form {
  display: none;
}

.quick-comment-form {
  margin-top: 8px;
  max-width: 460px;
}

.quick-comment-form textarea {
  min-height: 0;
  height: 34px;
}

.flash-stack {
  margin-bottom: 8px;
}

.flash {
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
}

.flash + .flash {
  margin-top: 6px;
}

.flash-error {
  background: #fff2f2;
}

.flash-success {
  background: #f5f5ea;
}

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

.photo-card {
  margin: 0;
}

.photo-card img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
}

.photo-card figcaption {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.photo-card figcaption span {
  display: block;
}

.photo-caption-form {
  margin-top: 6px;
}

.photo-caption-form input {
  font-size: 12px;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-stack {
  gap: 4px;
}

.photo-admin-list {
  display: grid;
  gap: 0;
}

.photo-admin-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
}

.photo-admin-item + .photo-admin-item {
  border-top: 1px dotted var(--line);
}

.photo-admin-thumb img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #faf7ec;
}

.photo-admin-body {
  min-width: 0;
}

.photo-admin-meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
}

.photo-admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feed-layout {
  align-items: start;
}

.feed-list {
  display: grid;
  gap: 0;
}

.feed-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 10px;
  padding: 8px 0;
}

.feed-item + .feed-item {
  border-top: 1px dotted var(--line);
}

.feed-item-main {
  min-width: 0;
}

.feed-love,
.feed-copy,
.feed-meta {
  margin: 0;
}

.feed-love {
  font-weight: 700;
  margin-bottom: 2px;
}

.feed-copy {
  color: var(--text);
}

.feed-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.feed-icon {
  display: inline-block;
  width: 16px;
}

.feed-thumb img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #faf7ec;
}

.comment-compose {
  margin-bottom: 10px;
}

.comment-thread {
  display: grid;
  gap: 0;
}

.comment-item {
  padding: 8px 0;
  border-top: 1px dotted var(--line);
}

.comment-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.comment-head {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}

.comment-head a {
  font-weight: 700;
}

.comment-body {
  margin-top: 3px;
  white-space: pre-wrap;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  align-items: flex-start;
}

.comment-actions form {
  margin: 0;
}

.comment-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.comment-toggle summary {
  cursor: pointer;
  color: var(--link);
  list-style: none;
}

.comment-toggle summary::-webkit-details-marker {
  display: none;
}

.comment-form {
  min-width: min(360px, 78vw);
}

.comment-form textarea {
  min-height: 56px;
}

.comment-children {
  margin-left: 18px;
  border-left: 1px solid var(--line);
  padding-left: 10px;
  margin-top: 8px;
}

.comment-deleted .comment-body {
  color: var(--muted);
  font-style: italic;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 0;
}

.suggestions:empty {
  display: none;
}

.nav-add-love {
  display: inline-flex;
  align-items: center;
  position: relative;
  margin: 0;
}

.nav-add-love input {
  width: 110px;
  padding: 2px 6px;
  border: 1px solid rgba(0,0,0,0.25);
  background: rgba(255,255,255,0.85);
  font-size: 12px;
}

.nav-add-love .suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  min-width: 200px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 4px;
}

.suggestion-chip {
  padding: 2px 6px;
  border: 1px solid var(--line);
  background: #faf7ec;
}

.inline-loves {
  line-height: 1.8;
  margin: 0;
}

.inline-loves a {
  white-space: nowrap;
}

.inline-loves .people-count {
  color: var(--muted);
  font-size: 11px;
}

.love-entry {
  white-space: nowrap;
}

.love-remove {
  display: none;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  vertical-align: middle;
}

.love-entry:hover .love-remove {
  display: inline;
}

.love-remove:hover {
  color: #c00;
}

.info-panel ul li::before {
  content: "• ";
  color: var(--muted);
}

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

@media (max-width: 860px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-row {
    width: 100%;
  }

  .two-up,
  .profile-header {
    grid-template-columns: 1fr;
  }

  .panel + .panel,
  .grid.two-up > .panel:nth-child(even) {
    border-left: 0;
    padding-left: 0;
  }

  .grid.two-up > .panel:nth-child(odd) {
    padding-right: 0;
  }

  .grid.two-up > .panel:nth-child(even) {
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }

  .onboarding-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .onboarding-form {
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  html,
  body {
    font-size: 12px;
  }

  .chrome {
    width: calc(100vw - 8px);
    margin: 4px;
  }

  .page {
    padding: 8px;
  }

  .compact-hero h1,
  .profile-header h1,
  .panel h1 {
    font-size: 21px;
  }

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

  .photo-admin-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .photo-admin-thumb img {
    width: 72px;
    height: 72px;
  }

  .feed-item {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .feed-thumb img {
    width: 72px;
    height: 72px;
  }
}
