/* OWNED BY: community builder. Uses core's variables with fallbacks.
   Surfaces follow site.css's cards: --card/--bubble backgrounds with --text ink and --line borders,
   which site.css flips for prefers-color-scheme: dark. Fixed light fills (buttons, inputs, status
   chips) set their own dark ink so they stay readable in both schemes. */
.cb-page { max-width: 640px; margin: 0 auto; padding: 24px 16px 48px; }
.cb-page-wide { max-width: 1100px; }
.cb-card {
  background: var(--card, #fbf3e4); color: var(--text, #16181d);
  border: 3px solid var(--line, #16181d); border-radius: var(--radius, 16px);
  box-shadow: 6px 6px 0 var(--shadow-c, #16181d); padding: 24px 20px;
}
.cb-card h1, .cb-head h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1.05; margin: 0 0 12px; }
.cb-lede { font-size: 1.1rem; }
.cb-small, .cb-meta { font-size: .9rem; opacity: .75; }

.cb-btn {
  display: inline-block; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  border: 3px solid var(--ink, #16181d); border-radius: 999px; padding: 10px 20px;
  background: #fff; color: var(--ink, #16181d); box-shadow: 3px 3px 0 var(--ink, #16181d);
  transition: transform .08s, box-shadow .08s;
}
.cb-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink, #16181d); }
.cb-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink, #16181d); }
.cb-btn:disabled { opacity: .6; cursor: wait; }
.cb-btn-primary { background: var(--orange, #f28c28); }
.cb-btn-google { background: #fff; width: 100%; text-align: center; box-sizing: border-box; }
.cb-btn-ok { background: #8fe3a0; }
.cb-btn-bad { background: #ff9d8f; }

.cb-form { display: grid; gap: 8px; margin-top: 12px; }
.cb-form label { font-weight: 800; margin-top: 8px; }
.cb-form input, .cb-form textarea, .cb-comment-form textarea {
  font: inherit; width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 3px solid var(--ink, #16181d); border-radius: calc(var(--radius, 16px) / 2); background: #fff; color: var(--ink, #16181d);
}
.cb-form button { margin-top: 12px; justify-self: start; }
.cb-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 4px; font-weight: 800; }
.cb-or::before, .cb-or::after { content: ""; flex: 1; border-top: 2px dashed currentColor; opacity: .4; }
.cb-flash { background: var(--bubble, #fff); color: var(--text, #16181d); border: 2px solid var(--line, #16181d); border-radius: 10px; padding: 8px 12px; }
.cb-flash-bad { background: #ffe1dc; color: #16181d; border-color: #16181d; }
.cb-empty { font-style: italic; opacity: .8; }

/* Blame vote */
.cb-blame { margin: 24px 0; }
.cb-blame-q { font-weight: 900; font-size: 1.2rem; margin: 0 0 8px; }
.cb-blame-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cb-blame-btn {
  position: relative; overflow: hidden; font: inherit; font-weight: 900; font-size: clamp(1rem, 4vw, 1.25rem);
  min-height: 72px; padding: 12px; cursor: pointer; color: var(--ink, #16181d);
  border: 3px solid var(--ink, #16181d); border-radius: var(--radius, 16px); box-shadow: 4px 4px 0 var(--ink, #16181d);
  background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.cb-blame-btn::before { /* fill bar showing the share once you've voted */
  content: ""; position: absolute; inset: auto 0 0 0; height: var(--pct, 0%); opacity: .9; transition: height .4s ease; z-index: 0;
}
.cb-blame-clanker::before { background: var(--blue, #1f4fd1); }
.cb-blame-human::before { background: var(--orange, #f28c28); }
.cb-blame-btn > span { position: relative; z-index: 1; }
.cb-blame-pct { font-size: 1.8rem; line-height: 1; }
.cb-blame-btn.is-mine { outline: 4px solid var(--ink, #16181d); outline-offset: 2px; }
.cb-blame-clanker[style] .cb-blame-label, .cb-blame-clanker[style] .cb-blame-pct { text-shadow: 0 0 6px #fff, 0 0 2px #fff; }
.cb-vote-msg { font-size: .9rem; margin: 8px 0 0; opacity: .8; }
.is-busy { opacity: .6; pointer-events: none; }

/* Term thumbs */
.cb-term-vote { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.cb-term-btn {
  font-size: 1.4rem; cursor: pointer; background: #fff; color: #16181d; border: 3px solid var(--ink, #16181d); border-radius: 999px;
  width: 52px; height: 52px; box-shadow: 3px 3px 0 var(--ink, #16181d);
}
.cb-term-btn.is-mine { background: var(--orange, #f28c28); }
.cb-term-score { font-weight: 900; font-size: 1.5rem; min-width: 2ch; text-align: center; }

/* Comments */
[data-comments] { margin: 32px 0; }
.cb-comments-title { font-size: 1.5rem; margin: 0 0 12px; }
.cb-comment-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.cb-comment { background: var(--bubble, #fff); color: var(--text, #16181d); border: 2px solid var(--line, #16181d); border-radius: calc(var(--radius, 16px) / 1.5); padding: 12px 14px; }
.cb-comment-meta { margin: 0 0 4px; font-size: .9rem; }
.cb-comment-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cb-comment-form { display: grid; gap: 8px; }
.cb-comment-as { margin: 0; font-size: .9rem; opacity: .8; }
.cb-comment-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cb-count { font-size: .85rem; opacity: .7; }
.cb-comment-status:empty { display: none; }
.cb-comment-status { padding: 10px 12px; border-radius: 10px; border: 2px solid var(--ink, #16181d); color: #16181d; }
.cb-comment-status.is-ok { background: #dff7e4; }
.cb-comment-status.is-wait { background: var(--cream, #fbf3e4); }
.cb-comment-status.is-bad { background: #ffe1dc; }
.cb-turnstile { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 50; }

/* Spotted gallery */
.cb-head { margin-bottom: 24px; }
.cb-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.cb-sighting {
  background: var(--card, #fbf3e4); color: var(--text, #16181d); border: 3px solid var(--line, #16181d); border-radius: var(--radius, 16px);
  box-shadow: 5px 5px 0 var(--shadow-c, #16181d); overflow: hidden; display: flex; flex-direction: column;
}
.cb-sighting-img img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-bottom: 3px solid var(--line, #16181d); background: #fff; }
.cb-sighting-text { padding: 14px 16px; }
.cb-sighting h2 { font-size: 1.25rem; margin: 0 0 4px; }
.cb-where { font-weight: 700; color: var(--link, #1f4fd1); margin: 0 0 8px; }
.cb-source { font-size: .9rem; margin: 8px 0 4px; overflow-wrap: anywhere; }
.cb-clanker-says { font-size: .9rem; font-style: italic; margin: 4px 0 8px; padding: 6px 10px; border-left: 4px solid var(--orange, #f28c28); background: rgba(242, 140, 40, .08); }
.cb-clanker-says strong { font-style: normal; }
.cb-sighting blockquote, .cb-admin-item blockquote { margin: 0 0 8px; padding-left: 12px; border-left: 4px solid var(--orange, #f28c28); white-space: pre-wrap; overflow-wrap: anywhere; }
.cb-pager { display: flex; justify-content: space-between; margin-top: 24px; font-weight: 800; }

/* Admin */
.cb-admin { max-width: 900px; margin: 0 auto; padding: 24px 16px; }
.cb-admin-sec { margin: 28px 0; }
.cb-admin-sec h2 .cb-count { font-size: 1rem; background: var(--orange, #f28c28); border-radius: 999px; padding: 2px 10px; opacity: 1; color: #16181d; }
.cb-admin-item { background: var(--bubble, #fff); color: var(--text, #16181d); border: 2px solid var(--line, #16181d); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.cb-admin-item h3 { margin: 0 0 6px; }
.cb-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cb-actions form { margin: 0; }
.cb-admin-img { max-width: 100%; max-height: 320px; border: 2px solid var(--ink, #16181d); border-radius: 8px; margin: 6px 0; }

@media (max-width: 420px) {
  .cb-blame-row { grid-template-columns: 1fr; }
}
