/* Old Days Wall - retro mid-2000s style */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f4eee6;
  font-family: Verdana, Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #2a2320;
}
a { color: #8f3416; text-decoration: none; }
a:hover { text-decoration: underline; }

.page { max-width: 780px; margin: 0 auto; padding: 12px; }

.topbar {
  background: #5c2410;
  color: #f5ebe0;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar a, .topbar .linkbtn { color: #fbf3ea; }
.logo { font-size: 16px; letter-spacing: 1px; }
.subbar, .flash {
  background: #f5ebe0;
  color: #4a1d0c;
  border: 1px solid #d9c3a9;
  border-top: 0;
  padding: 4px 10px;
}
.flash { background: #fff4d9; border-color: #e2c27a; }

.content {
  background: #fffdf9;
  border: 1px solid #d9c3a9;
  border-top: 0;
  padding: 12px;
  min-height: 300px;
}
.footer { text-align: center; color: #6b625a; padding: 8px; }

.cols { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; }
@media (max-width: 560px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .cols.home > div:first-child { order: 2; }
  .cols.home .avatar { display: none; }
}

.box-title {
  background: #f5ebe0;
  color: #5c2410;
  border: 1px solid #d9c3a9;
  padding: 3px 5px;
  margin: 10px 0 4px;
  font-weight: bold;
}
.box-title:first-child { margin-top: 0; }

.avatar { width: 150px; height: 170px; object-fit: cover; border: 1px solid #8f3416; display: block; }
.avatar-sm { width: 44px; height: 44px; object-fit: cover; border: 1px solid #8f3416; display: block; flex-shrink: 0; }
.avatar-empty {
  background: #ead9c6; color: #5c2410; display: flex;
  align-items: center; justify-content: center; font-size: 22px;
}
.avatar-sm.avatar-empty { font-size: 14px; }

.side-links { line-height: 1.8; margin-top: 6px; }
.side-links > a { display: block; }
.friend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 76px)); gap: 6px; }
.friend-grid a { text-align: center; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.friend-grid .avatar-sm { width: 100%; height: auto; aspect-ratio: 1 / 1; margin-bottom: 2px; }
.friend-grid .avatar-sm.avatar-empty { font-size: 18px; }

.name { font-size: 15px; color: #5c2410; margin: 0 0 2px; }
.muted { color: #6b625a; }
.info td { padding: 2px 8px 2px 0; vertical-align: top; }
.info td:first-child { color: #6b625a; white-space: nowrap; }

.post { border-bottom: 1px dotted #d9c3a9; padding: 6px 2px; display: flex; gap: 8px; }
.post .body { white-space: pre-wrap; word-wrap: break-word; margin-top: 2px; }
.post .meta { color: #6b625a; font-size: 10px; }

.row { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dotted #d9c3a9; }
.row .grow { flex: 1; min-width: 0; }

input[type=text], input[type=email], input[type=password], textarea, input[type=file] {
  font: inherit;
  border: 1px solid #b9ab9a;
  padding: 4px;
  width: 100%;
  background: #fff;
}
textarea { min-height: 50px; resize: vertical; }
label { display: block; margin: 8px 0 2px; color: #444441; }
button, .btn {
  font: inherit;
  background: #8f3416;
  color: #fff;
  border: 1px solid #5c2410;
  padding: 3px 10px;
  cursor: pointer;
  display: inline-block;
}
button.light, .btn.light { background: #f5ebe0; color: #5c2410; border-color: #d9c3a9; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: none; }
.linkbtn:hover { text-decoration: underline; }
form.inline { display: inline; }
.error { color: #b42318; margin: 6px 0; }

.welcome { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; }
@media (max-width: 560px) { .welcome { grid-template-columns: 1fr; } }
.welcome h1 { font-size: 18px; color: #5c2410; font-weight: normal; margin: 0 0 8px; }
.welcome p { font-size: 12px; line-height: 1.6; }

/* Comments and likes */
.replies { background: #faf4ec; border-left: 2px solid #ead9c6; margin-top: 6px; padding: 4px 6px; }
.likes { color: #5a514a; padding: 2px 0 4px; }
.comment { display: flex; gap: 6px; padding: 4px 0; border-top: 1px dotted #ead9c6; }
.comment:first-child { border-top: 0; }
.comment .grow { flex: 1; min-width: 0; }
.body-inline { white-space: pre-wrap; overflow-wrap: anywhere; }
.avatar-xs { width: 26px; height: 26px; object-fit: cover; border: 1px solid #8f3416; display: block; flex-shrink: 0; font-size: 11px; }
.avatar-xs.avatar-empty { font-size: 11px; display: flex; }
.comment-form { display: flex; gap: 4px; margin-top: 6px; }
.comment-form input { flex: 1; min-width: 0; }
.post .grow { flex: 1; min-width: 0; }

/* Messages and alerts */
.row-link { color: inherit; }
.row-link:hover { background: #faf4ec; text-decoration: none; }
.unread { background: #fff4d9; }
.badge { background: #8f3416; color: #fff; padding: 0 5px; font-size: 10px; }
.who { color: #8f3416; font-weight: bold; }
.snippet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { border: 1px solid #d9c3a9; background: #f5ebe0; padding: 2px 8px; }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-top: 8px; }
.photo-grid img, .photo-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid #d9c3a9; display: block; }
.photo-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.photo-full img { max-width: 100%; border: 1px solid #8f3416; display: block; }
.upload-form { max-width: 360px; margin-bottom: 8px; }

/* Launch features: settings, reports, admin, invites, legal pages */
button.danger, .btn.danger { background: #fff; border-color: #b42318; color: #b42318; }
button.danger:hover, .btn.danger:hover { background: #b42318; color: #fff; }
.quiet, .quiet-links a, .quiet-links .linkbtn { color: #6b625a; font-size: 10px; }
.quiet-links { margin-top: 6px; }
.settings { max-width: 420px; }
.settings form { margin-bottom: 4px; }
.quote { background: #faf4ec; border-left: 2px solid #d9c3a9; padding: 6px 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
fieldset.choices { border: 1px solid #d9c3a9; padding: 6px 8px; margin: 8px 0; }
fieldset.choices legend { padding: 0 4px; color: #5c2410; }
label.choice, label.check { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0; color: #2a2320; }
label.check input, label.choice input { margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.stat { border: 1px solid #d9c3a9; background: #f5ebe0; padding: 6px 8px; }
.stat-n { font-size: 18px; color: #5c2410; font-variant-numeric: tabular-nums; }
.report { border-bottom: 1px dotted #d9c3a9; padding: 8px 0; display: grid; gap: 4px; }
.report-photo { max-width: 160px; border: 1px solid #d9c3a9; }
.code { font-family: "Courier New", monospace; font-size: 13px; letter-spacing: 1px; color: #5c2410; }
.copy-field { margin-top: 3px; font-size: 10px !important; }
.invite-note { background: #fff4d9; border: 1px solid #e2c27a; padding: 6px 8px; }
.legal { max-width: 620px; font-size: 12px; line-height: 1.65; }
.legal h1 { font-size: 18px; font-weight: normal; color: #5c2410; margin: 0 0 4px; }
.legal h2 { font-size: 13px; color: #5c2410; margin: 16px 0 4px; }
.legal ul { padding-left: 18px; margin: 4px 0; }
.footer a { color: #6b625a; }

/* Accent for things that are new or need attention */
.unread { box-shadow: inset 3px 0 0 #1f6f63; }
.badge.new { background: #1f6f63; }
.linkbtn { color: #8f3416; }
.topbar .linkbtn { color: #fbf3ea; }
.linkbtn.quiet, .quiet-links .linkbtn { color: #6b625a; }
.confirm-bar { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.older { margin-top: 10px; text-align: center; }
/* Team and roles (admin panel only) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.role-form select { font: inherit; border: 1px solid #b9ab9a; background: #fff; padding: 2px; }
.danger-badge { background: #b42318; }
.log-row { padding: 4px 0; border-bottom: 1px dotted #d9c3a9; }
.quote-inline { background: #faf4ec; padding: 0 4px; }
/* Rows with buttons wrap on narrow screens instead of squeezing the text */
.row { flex-wrap: wrap; }
.row .grow { flex: 1 1 170px; overflow-wrap: anywhere; }

/* Right column on the home page */
.rail .mini { display: flex; gap: 6px; align-items: flex-start; padding: 5px 0; border-bottom: 1px dotted #d9c3a9; }
.rail .mini .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rail .mini-actions { display: flex; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.rail .mini-actions button { font-size: 10px; padding: 1px 6px; }
.online-row { align-items: center; color: #2a2320; }
.online-row:hover { background: #faf4ec; text-decoration: none; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #1f6f63; flex-shrink: 0; }
.cols.home > .rail { grid-column: 1 / -1; }

/* Desktop: a wider page, slightly larger text, and three columns on the home page */
@media (min-width: 900px) {
  body { font-size: 12px; }
  .page { max-width: 1040px; padding: 16px 20px; }
  .logo { font-size: 18px; }
  .cols { grid-template-columns: 180px minmax(0, 1fr); gap: 18px; }
  .cols.home { grid-template-columns: 170px minmax(0, 1fr) 230px; }
  .cols.home > .rail { grid-column: auto; }
  .post .meta, .quiet, .quiet-links a, .quiet-links .linkbtn { font-size: 11px; }
  .friend-grid a { font-size: 11px; }
}
.rail .online-row { align-items: center; gap: 8px; }
.rail > .box-title:first-child { margin-top: 0; }

/* "« back" link at the top of inner pages */
.backbar { margin: -4px 0 8px; font-size: 11px; }
.backbar a { color: #6b625a; }
.backbar a:hover { color: #8f3416; }
.filters { margin: 8px 0 4px; }
.filters strong { color: #5c2410; }
.row .btn.light { padding: 2px 8px; }
.hint { color: #6b625a; font-size: 10px; margin-top: 2px; }

/* City suggestions under the field */
.city-wrap { position: relative; }
.city-pop { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fffdf9; border: 1px solid #8f3416; border-top: 0;
  max-height: 260px; overflow-y: auto; box-shadow: 0 3px 8px rgba(60, 30, 10, .18); }
.city-opt { padding: 8px 8px; cursor: pointer; border-bottom: 1px dotted #d9c3a9; }
.city-opt:last-child { border-bottom: 0; }
.city-opt strong { color: #8f3416; font-weight: normal; }
.city-opt span { color: #6b625a; font-size: 11px; }
.city-opt:hover, .city-opt.on { background: #f4e3d3; }
/* iPhone zooms into fields with text under 16px; keep them at 16px on phones */
@media (max-width: 760px) {
  input[type=text], input[type=email], input[type=password], input[type=search], textarea, select { font-size: 16px; }
}

/* What you like: chips in the edit form, tags on profiles */
details.tastes { border: 1px solid #d9c3a9; margin: 6px 0; background: #fffdf9; }
details.tastes summary { cursor: pointer; padding: 6px 8px; color: #5c2410; font-weight: bold; list-style: none; }
details.tastes summary::-webkit-details-marker { display: none; }
details.tastes summary::before { content: "+ "; color: #8f3416; }
details.tastes[open] summary::before { content: "\2212  "; }
details.tastes summary .taste-count { font-weight: normal; }
details.tastes .chip-list { padding: 0 6px 8px; }
label.chip { display: inline-block; margin: 4px 2px 0 0; cursor: pointer; position: relative; border: 0; background: none; padding: 0; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; padding: 3px 8px; border: 1px solid #d9c3a9; background: #fff; color: #444441; font-size: 11px; }
.chip input:checked + span { background: #8f3416; border-color: #5c2410; color: #fff; }
.chip input:checked + span::before { content: "\2713 "; }
.chip input:focus-visible + span { outline: 2px solid #8f3416; outline-offset: 1px; }
.tag { display: inline-block; margin: 0 2px 3px 0; padding: 0 5px; border: 1px solid #d9c3a9; background: #fbf5ee; font-size: 11px; }
.tag.same { border-color: #1f6f63; color: #1f6f63; background: #eef6f4; }
.same-taste { color: #1f6f63; margin: 6px 0; }
.same-taste a { color: #1f6f63; text-decoration: underline; }
@media (max-width: 760px) { .chip span { padding: 6px 10px; font-size: 13px; } }

/* Shared links: a small card with the page's picture on the left, like 2000s link shares */
.linkcard { display: flex; gap: 8px; margin: 6px 0 4px; padding: 6px; border: 1px solid #d9c3a9; background: #fbf5ee; max-width: 520px; }
.linkcard-img { flex: 0 0 auto; display: block; }
.linkcard-img img { width: 110px; height: 82px; object-fit: cover; display: block; border: 1px solid #d9c3a9; background: #fff; }
.linkcard-text { min-width: 0; flex: 1; }
.linkcard-title { font-weight: bold; color: #8f3416; display: block; overflow-wrap: anywhere; }
.linkcard-site { color: #6b625a; font-size: 10px; margin: 1px 0 3px; }
.linkcard-desc { color: #444441; font-size: 11px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.linkcard-preview { position: relative; margin-top: 4px; }
.linkcard-preview .linkcard { margin: 0; padding-right: 26px; }
.linkcard-x { position: absolute; top: 2px; right: 2px; background: none; border: 0; color: #6b625a; font-size: 18px; line-height: 1; padding: 2px 6px; cursor: pointer; z-index: 1; }
.linkcard-x:hover { color: #b42318; }
.post .body a, .comment .body-inline a, .msg .body a { overflow-wrap: anywhere; }
@media (max-width: 560px) { .linkcard-img img { width: 84px; height: 70px; } }

/* Notifications: the whole row opens what it is about; the name still opens the profile */
.row.notif { position: relative; cursor: pointer; }
.row.notif:hover { background: #f5ebe0; }
.notif-link::after { content: ""; position: absolute; inset: 0; }
.row.notif .grow > a:not(.notif-link), .row.notif .grow .muted a { position: relative; z-index: 1; }
.row.notif .avatar-sm, .row.notif .avatar-empty { flex-shrink: 0; }
.note-quote { margin: 3px 0 1px; padding: 2px 8px; border-left: 2px solid #d9c3a9; color: #2a2320; }
.comment.hl { background: #fff4d9; box-shadow: inset 3px 0 0 #1f6f63; animation: hlfade 3s ease-out 1.5s forwards; }
@keyframes hlfade { to { background: transparent; box-shadow: inset 3px 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .comment.hl { animation: none; } }
.comment { scroll-margin-top: 80px; }
/* "Brought 4 people to Old Days Wall" under the name on profiles */
.brought { color: #1f6f63; margin: 2px 0; }
.brought strong { font-variant-numeric: tabular-nums; }

/* Encrypted messages */
.e2ee-box { border: 1px solid #1f6f63; background: #eef6f4; padding: 8px 10px; margin: 8px 0; }
.e2ee-box p { margin: 4px 0 6px; }
.e2ee-box input[type=password] { max-width: 220px; display: inline-block; }
.e2ee-note { font-size: 10px; }
.snippet-text { display: inline; }
.e2ee.locked { color: #6b625a; font-style: italic; }
.unenc { font-size: 10px; }

/* The slogan under the name on the welcome page */
.tagline { font-size: 14px; color: #8f3416; margin: -2px 0 10px; }
/* Drop-downs (beliefs in Edit profile) */
select { font: inherit; border: 1px solid #b9ab9a; padding: 4px; width: 100%; background: #fff; color: #2a2320; }
