/* doggyspace, late-2000s readable edition.
   Open full-width header, centered measure, soft rounded cards.
   Type: Droid Sans (2007, the 2008–09 small-screen readability face commissioned
   by Google) first, then the era's workhorses. No webfont download needed. */

:root {
  --paper: #fffdf8;      /* wedding white */
  --card: #ffffff;
  --ink: #2b2620;
  --soft: #5f564b;
  --muted: #8a8177;
  --line: #e7ddc9;
  --accent: #1a73e8;
  --accent-deep: #1558b5;
  --accent-soft: #e8f0fe;
  --accent-ink: #ffffff;
  --link: #0b57d0;
  --visited: #5e35b1;
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Droid Sans", "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

a { color: var(--link); text-decoration: none; font-weight: 500; }
a:visited { color: var(--visited); }
a:hover { text-decoration: underline; }

/* ── full-width header, centered inner ── */
.topbar {
  width: 100%;
  background: #123a6d;
  color: #f2f7ff;
  border-bottom: 3px solid #0a2547;
}
.wrap {
  width: 1024px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-top: 14px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.brand { display: flex; gap: 10px; align-items: center; margin-right: auto; }
.brand-mark { font-size: 28px; }
.brand-words { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: bold; font-size: 22px; letter-spacing: -0.02em; }
.brand-sub { font-size: 12px; color: #bcd3f5; }
.nav { display: flex; gap: 16px; font-size: 14px; flex-wrap: wrap; }
.nav a { color: #f2f7ff; text-decoration: none; font-weight: 600; padding: 6px 10px; border-radius: 999px; }
.nav a:visited { color: #d7e5fb; }
.nav a:hover { text-decoration: none; background: rgba(255, 255, 255, 0.16); }
.nav a.active { background: rgba(255, 255, 255, 0.24); }

.account { font-size: 13px; display: flex; align-items: center; gap: 8px; color: #f2f7ff; }
.auth-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.auth-inline select { max-width: 170px; }
.navmsg { font-size: 12px; color: #ffd98a; min-height: 1.2em; }
.linkbtn {
  background: none; border: 0; padding: 0;
  color: var(--link); cursor: pointer; font-size: 12.5px; font-weight: 600;
}
.linkbtn:hover { text-decoration: underline; }

/* ── open two-column reader layout ── */
.layout {
  display: flex;
  gap: 20px;
  padding-top: 18px;
  align-items: flex-start;
  padding-bottom: 8px;
}
.content { flex: 1 1 auto; min-width: 0; display: grid; gap: 18px; align-content: start; }
.sidebar { flex: 0 0 300px; display: grid; gap: 16px; align-content: start; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(60, 45, 25, 0.07);
  padding: 22px 24px;
  overflow: hidden;
}
.card-side { padding: 0; }
.card-side .card-head { padding: 16px 18px 0; margin-bottom: 8px; }
.card-side .card-body { padding: 10px 18px 18px; }
.card-head { margin: 0 0 14px; }
.card-head h2 { margin: 0; font-size: 21px; padding: 2px 0; }
.card-head h3 { margin: 0; font-size: 14px; padding: 2px 0; }
.deck { margin: 2px 0 0; font-size: 13px; color: var(--soft); }
.tiny { font-size: 12px; }
.muted { color: var(--muted); }
.more-row { margin: 12px 0 0; }
.pickrow { font-size: 13px; color: var(--soft); }
.pickrow select { width: auto; min-width: 180px; }

/* ── forms ── */
input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  border: 1px solid #cfc3ab;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 7px 9px;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid #aecbfa;
  outline-offset: 1px;
  border-color: var(--accent);
}
textarea { resize: vertical; }
label { display: block; margin: 8px 0; font-size: 13px; }
.sideform { display: grid; gap: 8px; margin-top: 10px; }
.sideform.inline { grid-template-columns: 1fr 1fr auto; align-items: end; }

.btn {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: bold;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-deep);
  padding: 8px 20px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-soft); border-color: var(--accent-deep); }
.btn.primary { background: var(--accent); border-color: var(--accent-deep); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-deep); border-color: #0e3f86; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ── pet directory: roomy readable rows ── */
.petdir { display: grid; gap: 10px; }
.pound-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff;
}
.pound-face { font-size: 30px; line-height: 1; }
.pound-name { font-weight: bold; font-size: 15px; }
.pound-name small { font-weight: normal; color: var(--soft); font-size: 12.5px; }
.pound-bio { font-size: 14px; color: var(--soft); max-width: 62ch; }
.pound-meta { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; }

/* ── barks: measure-limited, airy ── */
.barks { display: grid; gap: 12px; }
.bark {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff;
}
.bark-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.bark-meta b { color: var(--ink); }
.bark-meta .pub {
  border: 1px solid #b9c4a8; color: #4a5a3a;
  padding: 0 6px; border-radius: 20px; font-size: 10.5px; font-weight: bold;
}
.bark-text { font-size: 15px; max-width: 68ch; }
.bark-ops { font-size: 12.5px; margin-top: 6px; display: flex; gap: 4px; }
.bark-ops button {
  background: none; border: 0; padding: 2px 6px;
  color: var(--link); cursor: pointer; font-size: 12.5px; font-weight: 600;
  border-radius: 999px;
}
.bark-ops button:hover { text-decoration: underline; background: var(--accent-soft); }
.bark-comments { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.bark-comment { font-size: 13.5px; background: #faf5e9; border-radius: var(--radius-sm); padding: 6px 9px; max-width: 68ch; }

/* ── groups ── */
.tablewrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.groups { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.groups th, table.groups td { padding: 9px 11px; text-align: left; vertical-align: top; }
table.groups thead th { background: #f5eedd; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--soft); }
table.groups tbody tr + tr td { border-top: 1px solid var(--line); }
table.groups tbody tr:hover td { background: #fffdf4; }
table.groups td.num { text-align: right; white-space: nowrap; }

/* ── profile: the owned page, calm edition ── */
.pageframe {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  margin: 10px 0 4px;
}
#pageInner { padding: 20px; }
.profile-top { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.profile-avatar { font-size: 46px; line-height: 1; }
.profile-top h3 { margin: 0; font-size: 24px; }
.profile-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; max-width: 70ch; }
.profile-cols { display: flex; gap: 22px; align-items: flex-start; }
.profile-main { flex: 1 1 auto; min-width: 0; }
.profile-side { flex: 0 0 230px; font-size: 13px; }
.profile-side h4, .profile-main h4 { margin: 14px 0 6px; font-size: 13px; color: var(--soft); }
.bio-text { font-size: 15px; max-width: 62ch; margin: 0; }
.medialinks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.friendgrid { display: flex; flex-wrap: wrap; gap: 8px; }
.friend {
  display: flex; gap: 8px; align-items: center;
  border: 1px solid var(--line); border-radius: 20px;
  padding: 4px 12px 4px 6px; font-size: 13px; background: #fff;
}
.friend .face { font-size: 20px; }

.customize {
  margin-top: 12px;
  border: 1px dashed #cfc3ab;
  border-radius: var(--radius);
  padding: 10px 14px;
  background: #fffdf4;
  font-size: 13.5px;
}
.customize summary { cursor: pointer; font-weight: bold; }
.customgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.wallhead { margin: 18px 0 10px; font-size: 15px; }
#wallList { padding-bottom: 4px; }

.prose p { max-width: 68ch; }
.rules { margin: 0 0 0 18px; padding: 0; font-size: 13.5px; display: grid; gap: 4px; }

.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding: 20px 2px 30px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ── login modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 60, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(10, 30, 60, 0.35);
  padding: 26px 28px 22px;
  width: 400px;
  max-width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h2 { margin: 0; font-size: 21px; padding-right: 32px; }
.modal > .muted { margin: 4px 0 6px; }
.modal-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--soft);
  font-size: 15px;
  cursor: pointer;
}
.modal-x:hover { background: var(--accent-soft); color: var(--ink); }
.modal-actions { display: flex; gap: 8px; margin-top: 12px; }
.modal-actions .btn { flex: 1; }
.divider {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.oauth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.oauth { border-color: #9ebbeb; color: var(--accent-deep); }
.authmsg { min-height: 1.4em; color: var(--accent-deep); font-weight: 600; font-size: 13px; margin-top: 10px; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { flex-basis: auto; width: 100%; }
  .sideform.inline { grid-template-columns: 1fr; }
  .customgrid { grid-template-columns: 1fr; }
  .profile-cols { flex-direction: column; }
  .profile-side { flex-basis: auto; width: 100%; }
  .topbar-inner { gap: 12px; }
}
