/* Thai Massage Community — navy/gold brand, from the design comps.
   Every colour in the mockups is a token here; markup should reuse these
   rather than hardcoding hex values. */

:root {
  --navy: #213551;
  --navy-soft: #3a5375;
  --gold: #d9a13b;
  --gold-ink: #a3762a;
  --gold-bg: #f7eed9;

  --ink: #1f2733;
  --body: #3d4652;
  --sub: #5b6572;
  --mute: #8a93a0;
  --faint: #a5adb8;

  --line: #e4e7eb;
  --line-soft: #eef0f3;
  --page: #f7f8fa;
  --shell: #eef0f3;
  --card: #fff;

  --green: #2e7d54;
  --green-bg: #e2f0e9;
  --blue-bg: #e6ebf2;
  --sell-fg: #a35b1f;
  --sell-bg: #fbf0e3;
  --buy-fg: #1f6ea3;
  --buy-bg: #e5f1fa;
  --bad: #b23b3b;
  --bad-bg: #fbeaea;

  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06);
  --sans: "Noto Sans Thai", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--shell);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  /* Keeps the footer at the bottom of the viewport on short pages instead of
     leaving the page background showing beneath it. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Every direct child of body is a flex item, so each needs a full-width basis
   — without it a flex item shrinks to its content and any `margin: 0 auto`
   centres that narrow box rather than the intended full-width one. */
body > * { width: 100%; flex: none; }

main {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  background: var(--page);
  /* Grows to push the footer to the bottom on short pages. */
  flex: 1 0 auto;
}

/* ---------- header ---------- */

.site-head {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
}

.site-head-in {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  background: #fff;
  border-radius: var(--radius);
  padding: 3px;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.2px;
}
.brand-name span { color: var(--gold); }

.head-right { display: flex; align-items: center; gap: 22px; }

nav.main { display: flex; gap: 20px; font-size: 13px; }
nav.main a { color: #b8c2d1; }
nav.main a:hover { color: #fff; text-decoration: none; }
nav.main a.on { color: #fff; font-weight: 600; }

/* Outstanding-work count beside a nav link — the admin review queue. Gold on
   navy, matching the bell badge. */
.nav-count {
  display: inline-block;
  min-width: 16px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  vertical-align: 1px;
}

.who { display: flex; align-items: center; gap: 10px; }

.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.pill-gold { color: var(--navy); background: var(--gold); }
.pill-plain { color: #fff; background: var(--navy-soft); }

.avatar {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--navy-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.avatar-lg { width: 34px; height: 34px; background: var(--blue-bg); color: var(--navy); }
.avatar-sm { width: 32px; height: 32px; background: var(--blue-bg); color: var(--navy); font-size: 11px; }

/* ---------- notification bell ---------- */

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

.bell-wrap { position: relative; }

.bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy-soft);
  color: #dbe3ee;
  text-decoration: none;
}
.bell:hover { background: #47618a; color: #fff; text-decoration: none; }

/* Unread gets the gold treatment, so the bell reads as "something new" even
   before the badge number registers. */
.bell.has-unread { color: var(--gold); }

.bell-icon { width: 18px; height: 18px; display: block; }

.bell-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  /* Gold on navy rather than a stock red — the count should read as part of
     the brand, not as an error state. */
  background: var(--gold);
  border: 2px solid var(--navy);
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
}
.bell-badge.is-hidden { display: none; }

.bell-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
  z-index: 60;
  overflow: hidden;
}
.bell-menu[hidden] { display: none; }

.bell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

/* A form button that has to read as a link. */
.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.linkish:hover { text-decoration: underline; }

.bell-list { max-height: 380px; overflow-y: auto; }

.bell-empty,
.notif-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--mute);
}

.bell-all {
  display: block;
  padding: 11px 16px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  background: var(--page);
}

/* ---------- notification rows ---------- */

.notif {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
}
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--page); text-decoration: none; }
/* Unread rows use the warm gold tint, matching the badge and the dot — the
   cool blue this used before came from a different design turn. */
.notif.unread { background: #fdf8ee; }
.notif.unread:hover { background: #faf1de; }

.notif-av { position: relative; flex: none; }

.notif-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-badge svg { width: 9px; height: 9px; display: block; }
.notif-badge-comment,
.notif-badge-reply { background: var(--navy); color: #fff; }
.notif-badge-post_vote,
.notif-badge-comment_vote { background: var(--gold); color: var(--navy); }

.notif-text { font-size: 12.5px; color: var(--body); line-height: 1.45; }
.notif-text strong { color: var(--ink); }

.notif-snip {
  font-size: 11.5px;
  color: var(--mute);
  line-height: 1.4;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-when { font-size: 11px; color: var(--gold-ink); margin-top: 3px; }

.notif-dot {
  flex: none;
  align-self: center;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
}

/* Full page */
.notif-page { max-width: 680px; margin: 0 auto; }
.notif-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ---------- board tabs ---------- */

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tabs a {
  padding: 13px 18px;
  font-size: 13px;
  color: var(--sub);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { font-weight: 700; color: var(--navy); border-bottom-color: var(--gold); }

.count {
  font-size: 10.5px;
  color: var(--mute);
  background: var(--shell);
  padding: 1px 7px;
  border-radius: 10px;
}

/* ---------- layout ---------- */

.wrap { padding: 22px 28px; }

.cols {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding: 22px 28px;
}

.feed { display: flex; flex-direction: column; gap: 12px; }
.side { display: flex; flex-direction: column; gap: 14px; }

.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}
.feed-head .label { font-size: 12px; color: var(--mute); }

.sorts { display: flex; gap: 8px; font-size: 11.5px; }
.sorts a { color: var(--mute); }
.sorts a.on { font-weight: 700; color: var(--navy); }

/* ---------- cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.card-row { display: flex; gap: 14px; }

.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: .4px;
}
.tag-hiring { color: var(--navy); background: var(--blue-bg); }
.tag-sellbuy { color: var(--gold-ink); background: var(--gold-bg); }
.tag-ask { color: var(--green); background: var(--green-bg); }

.deal {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.deal-sell { color: var(--sell-fg); background: var(--sell-bg); }
.deal-buy { color: var(--buy-fg); background: var(--buy-bg); }

.verified { font-size: 11px; font-weight: 600; color: var(--gold-ink); }
.byline { font-size: 11px; color: var(--mute); }

.card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  display: block;
}
a.card-title:hover { color: var(--navy); }

.excerpt {
  font-size: 12.5px;
  color: var(--sub);
  line-height: 1.5;
  margin: 0;
}

.price {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-ink);
  margin-bottom: 4px;
}

.stats {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--mute);
  flex-wrap: wrap;
}
.stats .answers { color: var(--green); font-weight: 600; }

/* A count with a leading line icon — keeps the icon optically aligned with
   the digits instead of sitting on the text baseline. */
.ico-stat { display: inline-flex; align-items: center; gap: 5px; }
.ico { width: 12px; height: 12px; flex: none; }

.thumb {
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 6px;
  background: repeating-linear-gradient(45deg, #e8ecf2, #e8ecf2 6px, #f2f4f8 6px, #f2f4f8 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 9px ui-monospace, monospace;
  color: var(--mute);
  text-align: center;
}

.min0 { min-width: 0; }

/* ---------- sidebar ---------- */

.side-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
}

.side-list { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.side-list .row { display: flex; justify-content: space-between; gap: 10px; }
.side-list .row a { color: var(--navy); font-weight: 600; }
.side-list .row .n { color: var(--mute); font-size: 11px; }

.locked {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--page);
  border: 1px dashed #c9d0d9;
  border-radius: 6px;
  font-size: 11px;
  color: var(--mute);
}

.note {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--gold-bg);
  border-radius: 6px;
  font-size: 11px;
  color: #6e5417;
  line-height: 1.5;
}
.note a { color: var(--gold-ink); font-weight: 700; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #2b4468; color: #fff; }

.btn-gold { background: var(--gold); color: var(--navy); font-weight: 700; }
.btn-gold:hover { background: #c8912f; }

.btn-ghost { background: #fff; color: var(--sub); border-color: #d5dae2; }
.btn-ghost:hover { background: var(--page); }

.btn-green { background: #fff; color: var(--green); border-color: var(--green); }
.btn-green:hover { background: var(--green-bg); }

.btn-block { width: 100%; }
.btn-sm { padding: 7px 16px; font-size: 12px; }

.btn[disabled], .btn-off {
  background: var(--line);
  color: var(--faint);
  border-color: var(--line);
  cursor: not-allowed;
}

.btn-vote.on { background: var(--gold-bg); border-color: var(--gold); color: var(--gold-ink); }

/* An upvote is a one-button POST form; it must not add layout of its own. */
.inline-form { display: inline; margin: 0; }

/* ---------- post detail ---------- */

.crumbs { padding: 16px 32px 0; font-size: 11.5px; color: var(--mute); }
.crumbs a { font-size: 11.5px; }
.crumbs .here { color: var(--sub); }

.post-head { padding: 14px 32px 24px; border-bottom: 1px solid var(--line-soft); background: #fff; }

.post-title {
  font-size: 23px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.3px;
  margin: 0 0 8px;
}

.author-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.author-name { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.author-sub { font-size: 11px; color: var(--mute); }

.post-body {
  font-size: 13.5px;
  color: var(--body);
  line-height: 1.65;
  white-space: pre-wrap;
  margin: 0;
}

.post-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.comments { padding: 20px 32px 26px; background: #fff; }
.comments-title { font-size: 13px; font-weight: 700; color: var(--ink); margin: 0 0 16px; }

.comment-list { display: flex; flex-direction: column; gap: 16px; }
/* scroll-margin keeps a linked comment clear of the sticky-ish header when
   the bell jumps straight to it. */
.comment { display: flex; gap: 10px; scroll-margin-top: 90px; }
.comment.reply { padding-left: 42px; }

.c-head { font-size: 11.5px; margin-bottom: 3px; }
.c-head .name { font-weight: 700; color: var(--ink); }
.c-head .when { color: var(--mute); }
.c-op { font-size: 10px; font-weight: 700; color: var(--gold-ink); }

.c-body { font-size: 12.5px; color: var(--body); line-height: 1.55; white-space: pre-wrap; margin: 0; }
.c-foot { display: flex; align-items: center; gap: 12px; margin-top: 5px; font-size: 11px; color: var(--mute); }
.c-foot button { font-size: 11px; padding: 2px 8px; }

.composer { display: flex; gap: 10px; margin-bottom: 20px; }
.composer .fields { flex: 1; display: flex; gap: 8px; }
.composer textarea {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d5dae2;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink);
  resize: vertical;
  min-height: 42px;
}
.composer textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; }

.composer-off {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--faint);
  background: var(--page);
}

/* ---------- emoji reactions ---------- */

.rx { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

.rx-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  color: var(--sub);
  cursor: pointer;
  line-height: 1.6;
}
.rx-pill:hover { background: var(--page); }
.rx-pill.on { background: var(--gold-bg); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }
.rx-pill.is-static { cursor: default; }

.rx-add { padding: 3px 9px; color: var(--mute); }

/* The picker is a <details>, so it opens with no JavaScript at all. */
.rx-picker { position: relative; display: inline-block; }
.rx-picker summary { list-style: none; }
.rx-picker summary::-webkit-details-marker { display: none; }

.rx-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  display: flex;
  gap: 2px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
  z-index: 20;
}

.rx-choice {
  border: 0;
  background: none;
  padding: 3px 6px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  line-height: 1;
}
.rx-choice:hover { background: var(--page); transform: scale(1.15); }

/* ---------- images ---------- */

.post-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin: 0 0 14px;
}

.card-thumb {
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.compose-thumb {
  display: block;
  max-width: 220px;
  height: auto;
  margin-top: 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.post-facts {
  margin-top: 12px;
  font-size: 13px;
  color: var(--body);
}
.post-facts strong { color: var(--mute); font-weight: 600; margin-right: 6px; }

/* ---------- segmented tabs ---------- */

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--shell);
  border-radius: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.seg-opt {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sub);
  text-decoration: none;
}
.seg-opt:hover { color: var(--ink); text-decoration: none; }
.seg-opt.on { background: #fff; color: var(--navy); box-shadow: var(--shadow); }

/* ---------- my posts management ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 6px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  text-align: center;
}
.stat b { display: block; font-size: 19px; color: var(--navy); line-height: 1.2; }
.stat span { font-size: 11px; color: var(--mute); }

.manage-row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.manage-actions { display: flex; gap: 6px; flex: none; }

/* ---------- inline reply on the notifications page ---------- */

.notif-reply {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px 58px;
  border-bottom: 1px solid var(--line-soft);
  /* Matches the unread row it sits under. */
  background: #fdf8ee;
}
.notif-reply input {
  flex: 1;
  padding: 7px 11px;
  border: 1px solid #d5dae2;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink);
}
.notif-reply input:focus { outline: 2px solid var(--gold); outline-offset: -1px; }

/* ---------- forms ---------- */

.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.form-actions .btn { flex: none; }

/* ---------- guest banner & flashes ---------- */

.guest-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 28px;
  background: #fbf6ea;
  border-bottom: 1px solid #f0e6cc;
  font-size: 12px;
  color: #7a6428;
}
.guest-bar a { font-weight: 600; color: var(--gold-ink); }

.flash {
  margin: 16px 28px 0;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12.5px;
}
.flash-ok { background: var(--green-bg); color: var(--green); }
.flash-bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- forms ---------- */

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  max-width: 560px;
  margin: 0 auto;
}
.form-card.wide { max-width: 760px; }

.form-title { font-size: 19px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.form-sub { font-size: 12px; color: var(--mute); margin: 0 0 20px; }

.field { display: block; margin-bottom: 14px; font-size: 12px; font-weight: 600; color: var(--sub); }

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 9px 12px;
  border: 1px solid #d5dae2;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; }

/* Amount field, Stripe style: symbol prefixed inside the box, currency picker
   parked on the right. Declared after `.field input`/`.field select` because
   those force width:100% at equal specificity — source order decides. */
.money-field {
  position: relative;
  display: flex;
  align-items: stretch;
  margin-top: 5px;
  border: 1px solid #d5dae2;
  border-radius: 6px;
  background: #fff;
}
.money-field:focus-within { outline: 2px solid var(--gold); outline-offset: -1px; }

.money-symbol {
  display: flex;
  align-items: center;
  padding: 0 2px 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  white-space: nowrap;
}

.money-field .money-amount {
  flex: 1;
  min-width: 0;
  width: auto;
  margin-top: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px 0 0 6px;
  background: transparent;
}
/* The wrapper already draws the focus ring for the whole control. */
.money-field .money-amount:focus { outline: none; }

.money-field .money-currency {
  flex: none;
  width: auto;
  margin-top: 0;
  padding: 9px 10px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  background: #fff;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.money-field .money-currency:focus { outline: none; }

/* With JavaScript the native select is swapped for the searchable menu below,
   which mirrors it. */
.money-field.is-enhanced .money-currency {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.money-picker {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-left: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.money-picker:hover { background: var(--page); }
.money-picker .chev { width: 11px; height: 11px; color: var(--mute); flex: none; }

.money-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 260px;
  max-height: 260px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
  z-index: 70;
  overflow: hidden;
}
.money-menu[hidden] { display: none; }

.money-search {
  flex: none;
  margin: 0;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  border-radius: 0;
}
.money-search:focus { outline: none; }

.money-options { overflow-y: auto; }

.money-option {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--body);
  text-align: left;
  cursor: pointer;
}
.money-option:hover,
.money-option.is-active { background: var(--page); }
.money-option[aria-selected="true"] { color: var(--navy); font-weight: 600; }
.money-option b { font-weight: 700; color: var(--ink); }

.money-empty { padding: 14px 12px; font-size: 12.5px; color: var(--mute); text-align: center; }

.hint { font-size: 11px; color: var(--mute); font-weight: 400; margin-top: 4px; }

.form-hint { font-size: 12px; color: var(--mute); line-height: 1.6; margin-top: 16px; text-align: center; }

.err {
  padding: 10px 12px;
  background: var(--bad-bg);
  color: var(--bad);
  border-radius: 6px;
  font-size: 12.5px;
  margin-bottom: 16px;
}

/* ---------- tables (roles, admin) ---------- */

.matrix { width: 100%; border-collapse: collapse; font-size: 12px; }
.matrix th {
  padding: 10px 8px;
  font-size: 10.5px;
  letter-spacing: .5px;
  color: var(--mute);
  text-align: center;
  font-weight: 700;
}
.matrix th:first-child { text-align: left; }
.matrix th.ok { color: var(--green); }
.matrix td {
  padding: 10px 8px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
  color: var(--body);
}
.matrix td:first-child { text-align: left; }
.matrix .yes { color: var(--green); font-weight: 700; }
.matrix .no { color: #c0c6cf; font-weight: 700; }

.info {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--blue-bg);
  border-radius: 6px;
  font-size: 11.5px;
  color: #3d5a85;
  line-height: 1.5;
}

.queue { display: flex; flex-direction: column; gap: 12px; }
.queue .card { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.queue form { display: inline; }

.status { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.status-pending { color: var(--gold-ink); background: var(--gold-bg); }
.status-approved { color: var(--green); background: var(--green-bg); }
.status-rejected { color: var(--bad); background: var(--bad-bg); }

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--mute);
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---------- footer ---------- */

.site-foot {
  /* body is a flex column, so this needs an explicit width to fill the row —
     a flex item shrinks to its content otherwise and `margin: 0 auto` then
     centres that narrow box instead of the full-width one. */
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 28px 34px;
  background: var(--page);
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--mute);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; padding: 18px; }
  .site-head-in { padding: 12px 18px; flex-wrap: wrap; }
  .head-right { gap: 14px; }
  .tabs { padding: 0 12px; }
  .crumbs, .post-head, .comments { padding-left: 18px; padding-right: 18px; }
  .wrap { padding: 18px; }
  .flash { margin: 14px 18px 0; }
  .guest-bar { padding: 10px 18px; }
  .comment.reply { padding-left: 20px; }
  .site-foot { padding: 18px; }
}

@media (max-width: 560px) {
  nav.main { gap: 14px; font-size: 12.5px; }
  .composer .fields { flex-direction: column; }
  .two-up { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .notif-reply { padding-left: 16px; }
  .manage-row { flex-direction: column; }
  .matrix { font-size: 11px; }
  .matrix th, .matrix td { padding: 8px 4px; }
}
