
:where(:root) {
  --bg: #050505;
  --panel: #0d0d0f;
  --panel-2: #121215;
  --line: #242428;
  --text: #f4f4f5;
  --muted: #96969f;
  --accent: #2196ff;
  --accent-2: #2196ff;
  --danger: #ff6b6b;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.65;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .035; z-index: 10; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.site-header {
  height: 76px; padding: 0 clamp(20px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: rgba(5,5,5,.82); backdrop-filter: blur(16px);
}
.brand { color: var(--text); text-decoration: none; display: flex; gap: 11px; align-items: center; font: 700 16px "Space Grotesk"; letter-spacing: .08em; }
.brand-credit { color: var(--muted); font: 500 12px "Inter", sans-serif; letter-spacing: 0; white-space: nowrap; flex-shrink: 0; }
.brand-mark { color: var(--accent); font-family: monospace; font-size: 18px; }
nav { display: flex; gap: 8px; }
nav a { color: var(--muted); text-decoration: none; padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; }
nav a:hover, nav a.active { color: var(--text); background: var(--panel-2); }
main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.page { display: none; padding: 88px 0 70px; min-height: calc(100vh - 76px); }
.page.active { display: block; animation: enter .35s ease; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero { max-width: 850px; padding: 35px 0 70px; }
.eyebrow, .card-label { font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--muted); }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 15px var(--accent); }
h1, h2 { font-family: "Space Grotesk", sans-serif; line-height: 1.08; letter-spacing: -.045em; }
h1 { font-size: clamp(48px, 8vw, 92px); margin: 22px 0; }
h1 span { color: var(--accent); }
h2 { font-size: 30px; margin: 12px 0 20px; }
.lead { color: var(--muted); font-size: clamp(17px, 2.2vw, 21px); max-width: 700px; }
.content-grid { display: grid; grid-template-columns: 1.6fr .8fr; gap: 20px; }
.card { background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018)); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.about-card p { color: #c8c8ce; margin: 0 0 18px; }
.side-stack { display: grid; gap: 20px; }
.fun-card { min-height: 230px; }
.big-quote { color: var(--accent); font: 800 70px/0.7 Georgia, serif; margin: 35px 0 12px; }
.fun-card p { font-size: 20px; font-weight: 600; line-height: 1.45; }
.shrug-card { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.shrug { font-size: 32px; margin: 25px 0 4px; }
.shrug-card p { color: var(--muted); margin: 0; }
.cta-strip { margin-top: 20px; padding: 25px 28px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--panel); }
.cta-strip h2 { margin: 6px 0 0; font-size: 23px; }
.button { border: 0; cursor: pointer; color: #070807; background: var(--accent); text-decoration: none; padding: 12px 17px; border-radius: 11px; font-weight: 800; font-size: 14px; display: inline-flex; gap: 14px; align-items: center; transition: .18s ease; }
.button:hover { background: #d0ff77; transform: translateY(-1px); }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 42px; }
.page-heading h1 { font-size: clamp(48px, 7vw, 74px); margin: 13px 0 8px; }
.page-heading p { color: var(--muted); margin: 0; }
.centered { display: block; text-align: center; max-width: 700px; margin: 0 auto 52px; }
.centered .eyebrow { justify-content: center; }
.form-card { margin-bottom: 20px; }
.form-card form { margin-top: 22px; }
.form-row { display: grid; grid-template-columns: .65fr 1.35fr; gap: 15px; }
label { display: block; color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 16px; }
input, textarea { display: block; width: 100%; margin-top: 7px; border: 1px solid var(--line); border-radius: 11px; background: #080809; color: var(--text); padding: 13px 14px; outline: none; font: inherit; resize: vertical; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(183,255,60,.08); }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.muted { color: var(--muted); font-size: 12px; }
.error { color: var(--danger); margin-top: 10px; font-size: 13px; }
.thread-list { display: grid; gap: 12px; }
.thread-select-wrap { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 10px; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.thread-select-wrap input { display: inline-block; width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--accent); }
.thread-select-wrap span { user-select: none; }
.thread { padding: 22px 24px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.02); cursor: pointer; transition: .18s; }
.thread:hover { border-color: #3c3c42; background: rgba(255,255,255,.035); transform: translateY(-1px); }
.thread-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.thread h3 { font-family: "Space Grotesk"; font-size: 19px; margin: 0 0 7px; }
.thread p { color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { color: #6f6f77; font-size: 12px; margin-top: 12px; }
.reply-count { color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.loading { color: var(--muted); padding: 50px; text-align: center; }
.hidden { display: none !important; }
.social-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 820px; margin: 0 auto; }
.social-card { display: grid; grid-template-columns: 45px 1fr auto; align-items: center; gap: 15px; text-decoration: none; color: var(--text); padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); transition: .18s; }
.social-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.social-card.discord { grid-column: 1 / -1; }
.social-icon { width: 43px; height: 43px; border-radius: 12px; background: var(--panel-2); display: grid; place-items: center; font-size: 21px; font-weight: 800; }
.social-card b, .social-card small { display: block; }
.social-card small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.social-card strong { color: var(--accent); font-size: 19px; }
footer { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 35px; border-top: 1px solid var(--line); color: #5d5d64; display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .08em; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.82); backdrop-filter: blur(8px); }
.modal-card { position: relative; width: min(780px, 100%); max-height: 90vh; overflow: auto; background: #0b0b0d; border: 1px solid #29292d; border-radius: 20px; padding: 32px; box-shadow: 0 25px 90px rgba(0,0,0,.6); }
.modal-close { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; color: var(--muted); font-size: 28px; cursor: pointer; }
.modal-title { font: 700 28px/1.2 "Space Grotesk"; padding-right: 35px; margin: 10px 0; }
.post-body { color: #ccc; white-space: pre-wrap; }
.replies { margin-top: 32px; padding-top: 25px; border-top: 1px solid var(--line); }
.reply { padding: 15px 0; border-bottom: 1px solid var(--line); }
.reply:last-child { border-bottom: 0; }
.reply .post-body { margin-top: 5px; font-size: 14px; }
.reply-form { margin-top: 25px; }
@media (max-width: 760px) {
  .site-header { padding: 0 18px; }
  nav a { padding: 8px 9px; font-size: 13px; }
  main { width: min(100% - 28px, 1120px); }
  .page { padding-top: 55px; }
  .hero { padding-top: 10px; padding-bottom: 45px; }
  .content-grid, .social-grid, .form-row { grid-template-columns: 1fr; }
  .social-card.discord { grid-column: auto; }
  .page-heading, .cta-strip { align-items: flex-start; flex-direction: column; }
  .form-actions { align-items: flex-start; flex-direction: column; }
  footer { width: calc(100% - 28px); flex-direction: column; gap: 8px; }
}

.blue-name { color: #2196ff !important; }

.forum-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.secondary-button { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.secondary-button:hover { background: var(--panel); border-color: #3c3c42; }
.admin-panel { margin-top: -22px; margin-bottom: 20px; max-width: 520px; }
.thread-header-row, .reply-row { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.danger-button { border: 1px solid rgba(255,107,107,.35); background: transparent; color: var(--danger); border-radius: 9px; padding: 8px 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.danger-button:hover { background: rgba(255,107,107,.08); border-color: var(--danger); }
.danger-button.small { padding: 6px 9px; font-size: 11px; }
@media (max-width: 760px) {
  .forum-actions { width: 100%; }
  .forum-actions .button { flex: 1; justify-content: center; }
  .thread-header-row, .reply-row { flex-direction: column; }
}

.account-panel { margin-top: -22px; margin-bottom: 20px; max-width: 760px; }
.account-note { margin-top: 12px; }
.success-message { color: var(--accent); }

.thread-stats { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.like-button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 9px; padding: 6px 9px; font: inherit; font-size: 12px; cursor: pointer; transition: .15s ease; }
.like-button:hover { border-color: var(--accent); color: var(--text); }
.like-button.liked { color: var(--accent); border-color: rgba(183,255,60,.45); }
.reply .like-button { margin-top: 9px; }


.collection-heading { margin-bottom: 35px; }
.collection-summary { display: flex; justify-content: center; gap: 10px; margin: 0 auto 20px; color: var(--muted); font-size: 12px; }
.collection-summary span { border: 1px solid var(--line); background: var(--panel); padding: 8px 12px; border-radius: 999px; }
.collection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.collection-card { padding: 25px; }
.collection-card h2 { font-size: 24px; margin: 9px 0 17px; }
.device-list { margin: 0; padding-left: 25px; color: #c8c8ce; }
.device-list li { padding: 5px 0 5px 5px; line-height: 1.45; }
.device-list li::marker { color: var(--accent); font-weight: 700; }
@media (max-width: 760px) {
  .site-header { overflow-x: auto; }
  nav { flex-shrink: 0; }
  .collection-grid { grid-template-columns: 1fr; }
  .collection-summary { flex-wrap: wrap; }
}

.pinned-thread { border-color: rgba(183,255,60,.45); }
.pinned-label { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; margin-bottom: 6px; }
.owner-thread-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }


.hammer-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 6px;
  font-size: 0.95em;
  opacity: 0.75;
}
.hammer-button:hover { opacity: 1; background: rgba(255,255,255,0.08); }


.pagination { display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap; margin: 24px 0 8px; }
.pagination-button { min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.pagination-button:hover:not(:disabled) { border-color: var(--accent); }
.pagination-button.active { background: var(--accent); color: #08090a; border-color: var(--accent); }
.pagination-button:disabled { opacity: .4; cursor: not-allowed; }
.pagination-label { margin-left: 7px; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .pagination { gap: 5px; }
  .pagination-button { min-width: 34px; height: 34px; padding: 0 8px; }
}


.thread-lock-banner {
  margin: -4px 0 20px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 190, 70, .45);
  border-radius: 12px;
  background: rgba(255, 190, 70, .08);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.thread-lock-banner strong { font-size: 14px; }
.thread-lock-banner span { color: var(--muted); line-height: 1.5; }
.admin-lock-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-lock-row strong { display: block; margin-bottom: 4px; }
#new-thread-btn:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 760px) { .admin-lock-row { flex-direction: column; align-items: stretch; } }



.forum-toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.forum-toolbar .button { padding: 8px 12px; font-size: 12px; }

.admin-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.mini-btn { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 8px; padding: 4px 9px; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.mini-btn:hover { color: var(--text); border-color: #3c3c42; }
.mini-btn.ban:hover { color: var(--danger); border-color: var(--danger); }

.auth-tabs { display: flex; gap: 8px; margin: 14px 0 20px; }
.auth-tab { padding: 9px 16px; }
.auth-tab.active { background: var(--accent); color: #070807; border-color: var(--accent); }
.auth-warning { margin: 0 0 18px; padding: 13px 15px; border: 1px solid rgba(255,190,70,.45); border-radius: 12px; background: rgba(255,190,70,.08); color: #ffd27a; font-size: 13px; line-height: 1.55; }
.auth-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.auth-bar .button { padding: 8px 13px; font-size: 13px; }
.auth-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: #080809; flex-shrink: 0; }
.avatar-fallback { display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--accent); }
.auth-bar .avatar { width: 36px; height: 36px; font-size: 15px; }
.author-meta { display: flex; align-items: center; gap: 8px; }
.author-meta span { min-width: 0; }
.thread .avatar { width: 22px; height: 22px; font-size: 11px; }
#avatar-error { margin-top: 10px; }

.pinned-thread { border-color: rgba(33,150,255,.5); }

.like-button.liked { color: #ff6b81; border-color: rgba(255,107,129,.5); }
.like-button:hover { border-color: #ff6b81; }
.post-actions { margin-top: 12px; }
#thread-list { scroll-margin-top: 96px; }
#forum h1 { user-select: none; }

.rules-wrap { display: grid; gap: 16px; max-width: 820px; margin: 0 auto; }
.rules-card h2 { font-size: 24px; margin: 9px 0 16px; }
.rule-list { margin: 0; padding-left: 26px; color: #c8c8ce; }
.rule-list li { padding: 8px 0 8px 6px; line-height: 1.6; }
.rule-list li::marker { color: var(--accent); font-weight: 700; }
.rule-list strong { color: var(--text); }
.rules-card a, .page-heading a, .muted a { color: var(--accent); }

.post-img { display: block; max-width: min(100%, 300px); max-height: 200px; margin: 14px 0 4px; border: 1px solid var(--line); border-radius: 12px; background: #080809; object-fit: cover; cursor: zoom-in; transition: .15s ease; }
.post-img:hover { border-color: var(--accent); }
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.92); cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.img-badge { color: var(--accent); font-weight: 700; }
input[type="file"] { padding: 10px 12px; font-size: 13px; cursor: pointer; }

/* Small note under the Forum heading */
.heading-note { display: block; margin-top: 10px; font: 600 clamp(15px, 2vw, 20px) "Inter", sans-serif; letter-spacing: 0; color: var(--muted); }

.auth-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.recovery-box { border-color: rgba(255,190,70,.45); background: rgba(255,190,70,.05); }
.recovery-box p { margin: 12px 0; }
.recovery-code { font: 700 clamp(15px, 3.6vw, 22px)/1.4 "Space Grotesk", monospace; letter-spacing: .08em; text-align: center; padding: 16px; margin: 14px 0; border: 1px dashed rgba(255,190,70,.6); border-radius: 12px; background: #080809; color: #ffd27a; user-select: all; word-break: break-all; }
#recover-hint { margin: 0 0 18px; line-height: 1.55; }

.small-button { padding: 6px 10px; font-size: 12px; border-radius: 9px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.post-body textarea { margin-top: 0; }
.post-body .form-actions { margin-top: 8px; display: flex; justify-content: flex-start; gap: 8px; }


/* ---- profile pages ---- */
.author-link { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; min-width: 0; }
.author-link .author-name { color: #9a9aa3; font-weight: 600; }
.author-link:hover .author-name { color: var(--accent); text-decoration: underline; }
.auth-user strong a { color: inherit; text-decoration: none; }
.auth-user strong a:hover { color: var(--accent); text-decoration: underline; }

#profile { padding-top: 56px; }
.profile-back { display: inline-block; margin-bottom: 22px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.profile-back:hover { color: var(--text); }
.profile-head { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.profile-avatar .avatar { width: 112px; height: 112px; font-size: 46px; border-width: 2px; }
.profile-id { flex: 1 1 240px; min-width: 0; }
.profile-name { font: 700 clamp(32px, 5vw, 48px)/1.1 "Space Grotesk", sans-serif; letter-spacing: -.04em; margin: 0 0 8px; overflow-wrap: anywhere; }
.profile-tags { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-badge { padding: 3px 10px; border-radius: 999px; background: rgba(33,150,255,.14); color: var(--accent); font-size: 12px; font-weight: 800; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-actions .button { padding: 9px 14px; font-size: 13px; }
#profile-error:empty { display: none; }
.profile-grid { display: grid; grid-template-columns: 1.6fr .8fr; gap: 20px; margin-top: 20px; }
.profile-bio { margin: 14px 0 0; color: #c8c8ce; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-bio.empty { color: var(--muted); }
.profile-fact { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.profile-fact span { color: var(--muted); font-size: 12px; font-weight: 700; }
.profile-fact strong { overflow-wrap: anywhere; }
.profile-account { padding: 22px 26px; }
.profile-account .card-label { margin-bottom: 12px; }
.profile-stat { padding: 22px 26px; }
.profile-stat strong { display: block; font: 700 36px/1.1 "Space Grotesk", sans-serif; letter-spacing: -.03em; }
.profile-stat span { color: var(--muted); font-size: 13px; }
.profile-threads { margin-top: 34px; }
.profile-thread-list { display: grid; gap: 10px; margin-top: 14px; }
.profile-thread { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.02); color: inherit; text-decoration: none; transition: .18s; }
.profile-thread:hover { border-color: #3c3c42; background: rgba(255,255,255,.035); }
.profile-thread h3 { font: 600 17px "Space Grotesk", sans-serif; margin: 0 0 4px; overflow-wrap: anywhere; }
.profile-thread .meta { margin-top: 0; }
.heart-count { color: #ff6b81; font-size: 12px; font-weight: 700; }
.profile-missing { max-width: 520px; margin: 40px auto; text-align: center; }
.profile-missing h2 { margin-top: 0; }
#profile-form textarea { min-height: 110px; }
@media (max-width: 760px) {
  .profile-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .profile-id { flex: 0 0 auto; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-thread { flex-direction: column; align-items: flex-start; gap: 8px; }
}


/* ---- site search ---- */
.site-search { position: relative; flex: 0 1 210px; min-width: 130px; margin-left: 12px; color: var(--muted); }
.site-search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.site-search input { margin: 0; padding: 8px 12px 8px 33px; border-radius: 999px; font-size: 13px; background: rgba(255,255,255,.04); }
.site-search input::placeholder { color: #6f6f77; }
.site-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(33,150,255,.16); }
.search-results { position: fixed; z-index: 30; top: 82px; right: clamp(20px, 5vw, 72px); width: min(480px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow-y: auto; padding: 8px; background: #0b0b0d; border: 1px solid #29292d; border-radius: 16px; box-shadow: 0 25px 70px rgba(0,0,0,.65); }
.search-group { padding: 10px 12px 6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: inherit; text-decoration: none; }
.search-item:hover, .search-item.active { background: var(--panel-2); }
.search-item .avatar { width: 30px; height: 30px; font-size: 13px; }
.search-user { display: flex; flex-direction: column; min-width: 0; }
.search-title { font: 600 14px "Space Grotesk", sans-serif; overflow-wrap: anywhere; }
.search-meta { color: #6f6f77; font-size: 11px; }
.search-results mark { background: rgba(33,150,255,.24); color: var(--text); border-radius: 3px; padding: 0 1px; }
.search-empty { margin: 0; padding: 18px 14px; color: var(--muted); font-size: 13px; }
@media (max-width: 1000px) { .site-search { flex-basis: 160px; min-width: 120px; } }
@media (min-width: 761px) and (max-width: 900px) {
  .site-header { padding: 0 24px; }
  .site-header nav { gap: 2px; }
  .site-header nav a { padding: 9px 9px; font-size: 13px; }
  .site-search { flex-basis: 120px; min-width: 100px; margin-left: 8px; }
}
@media (max-width: 760px) {
  .brand { order: 0; }
  .site-search { order: 1; flex: 0 0 150px; margin: 0 10px; }
  .site-search input { font-size: 16px; } /* 16px stops iPhones zooming in on focus */
  .site-header nav { order: 2; }
  .search-results { left: 12px; right: 12px; width: auto; top: 80px; }
}


/* =====================================================================
   THEMES  (picked on the Customise page, saved in localStorage "tz_theme")
   Every colour below is a variable, so a theme only has to redefine them.
   Selectors use [data-theme="..."] (not just :root) so the swatches on the
   Customise page can preview each theme by carrying the same attribute.
   ===================================================================== */
:where(:root), [data-theme="dark"] {
  --bg: #050505;
  --bg-image: none;
  --panel: #0d0d0f;
  --panel-2: #121215;
  --line: #242428;
  --line-strong: #3c3c42;
  --text: #f4f4f5;
  --muted: #96969f;
  --faint: #6f6f77;
  --soft: #c8c8ce;
  --accent: #2196ff;
  --accent-rgb: 33,150,255;
  --accent-ink: #070807;
  --danger: #ff6b6b;
  --warn: #ffd27a;
  --input-bg: #080809;
  --card-bg: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  --modal-bg: #0b0b0d;
  --modal-line: #29292d;
  --header-bg: rgba(5,5,5,.82);
  --grid: rgba(255,255,255,.025);
  --tint: rgba(255,255,255,.02);
  --tint-2: rgba(255,255,255,.035);
}

/* Light: plain white */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-image: none;
  --panel: #f4f5f7;
  --panel-2: #eceef1;
  --line: #dcdfe4;
  --line-strong: #bfc5ce;
  --text: #111418;
  --muted: #5b616b;
  --faint: #7a808a;
  --soft: #2d3139;
  --accent: #1a73e8;
  --accent-rgb: 26,115,232;
  --accent-ink: #ffffff;
  --danger: #d93025;
  --warn: #8a5a00;
  --input-bg: #ffffff;
  --card-bg: #f7f8fa;
  --modal-bg: #ffffff;
  --modal-line: #d5d9df;
  --header-bg: rgba(255,255,255,.88);
  --grid: rgba(0,0,0,.045);
  --tint: rgba(0,0,0,.025);
  --tint-2: rgba(0,0,0,.05);
}

/* Colour themes: a soft dark two-colour gradient (--a top-left, --m middle, --b bottom-right) */
:where([data-theme]:not([data-theme="dark"]):not([data-theme="light"])) {
  --bg: var(--m);
  --bg-image: linear-gradient(135deg, var(--a) 0%, var(--m) 50%, var(--b) 100%);
  --panel: rgba(0,0,0,.26);
  --panel-2: rgba(255,255,255,.08);
  --line: rgba(255,255,255,.15);
  --line-strong: rgba(255,255,255,.28);
  --text: #f6f7f9;
  --muted: #b6bcc7;
  --faint: #939aa8;
  --soft: #e0e3e9;
  --accent-ink: #07100c;
  --danger: #ff8080;
  --warn: #ffd27a;
  --input-bg: rgba(0,0,0,.3);
  --card-bg: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  --modal-bg: color-mix(in srgb, var(--m) 72%, #000);
  --modal-line: rgba(255,255,255,.18);
  --header-bg: color-mix(in srgb, var(--m) 55%, rgba(0,0,0,.5));
  --grid: rgba(255,255,255,.03);
  --tint: rgba(255,255,255,.04);
  --tint-2: rgba(255,255,255,.07);
}
[data-theme="blue"]   { --a:#1f3d66; --m:#1d2d4b; --b:#2f3068; --accent:#58a9ff; --accent-rgb:88,169,255; }
[data-theme="green"]  { --a:#1f4c38; --m:#1f3b36; --b:#1c4a4b; --accent:#4cd495; --accent-rgb:76,212,149; }
[data-theme="orange"] { --a:#5c3516; --m:#4a2b1b; --b:#5b2b25; --accent:#ffa040; --accent-rgb:255,160,64; }
[data-theme="red"]    { --a:#5c2025; --m:#43212b; --b:#4b2142; --accent:#ff6070; --accent-rgb:255,96,112; }
[data-theme="purple"] { --a:#3e2b60; --m:#2f2951; --b:#28365f; --accent:#ab90ff; --accent-rgb:171,144,255; }
[data-theme="pink"]   { --a:#5b2a45; --m:#4a2a49; --b:#4a2b5b; --accent:#ff82bb; --accent-rgb:255,130,187; }
[data-theme="aurora"] { --a:#2c4a42; --m:#273f49; --b:#2d4064; --accent:#5fd2ba; --accent-rgb:95,210,186; }

/* ---- hook the whole site up to the variables ---- */
body { background: var(--bg-image), var(--bg); background-attachment: fixed; background-color: var(--bg); color: var(--text); }
body::before { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); }
.site-header { background: var(--header-bg); }
.card { background: var(--card-bg); }
.cta-strip { background: var(--panel); }
.blue-name { color: var(--accent) !important; }
.about-card p, .device-list, .rule-list, .profile-bio, .post-body { color: var(--soft); }
.meta, .search-meta, footer { color: var(--faint); }
.site-search input::placeholder { color: var(--faint); }
.author-link .author-name { color: var(--muted); }
input, textarea { background: var(--input-bg); }
input:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .16); }
.avatar { background: var(--input-bg); }
.button { color: var(--accent-ink); }
.button:hover { background: var(--accent); filter: brightness(1.15); }
.secondary-button { background: var(--panel-2); color: var(--text); }
.secondary-button:hover { background: var(--panel); border-color: var(--line-strong); filter: none; }
.auth-tab.active { color: var(--accent-ink); }
.pagination-button.active { color: var(--accent-ink); }
.thread, .profile-thread { background: var(--tint); }
.thread:hover, .profile-thread:hover { background: var(--tint-2); border-color: var(--line-strong); }
.pinned-thread { border-color: rgba(var(--accent-rgb), .55); }
.profile-badge { background: rgba(var(--accent-rgb), .16); }
.site-search input { background: var(--tint-2); }
.modal-card, .search-results { background: var(--modal-bg); border-color: var(--modal-line); }
.modal-backdrop { background: rgba(0,0,0,.7); }
.search-item:hover, .search-item.active { background: var(--panel-2); }
.search-results mark { background: rgba(var(--accent-rgb), .3); color: var(--text); }
.mini-btn:hover { border-color: var(--line-strong); }
.like-button.liked { border-color: rgba(255,107,129,.5); }
.auth-warning { color: var(--warn); }
.recovery-code { background: var(--input-bg); color: var(--warn); }
.error { color: var(--danger); }
.danger-button { color: var(--danger); }
.post-img, .social-card { background: var(--panel); }
.social-card:hover { border-color: var(--accent); }

/* ---- Customise page ---- */
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 900px; margin: 0 auto; }
.theme-option { font: inherit; color: var(--text); text-align: left; cursor: pointer; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--panel); transition: .18s ease; }
.theme-option:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.theme-option.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .2); }
.theme-preview { display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; height: 110px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-image), var(--bg); background-color: var(--bg); overflow: hidden; }
.tp-bar { height: 9px; width: 42%; border-radius: 99px; background: var(--accent); }
.tp-line { height: 7px; border-radius: 99px; background: var(--muted); opacity: .55; }
.tp-line.short { width: 65%; }
.theme-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 0 4px; }
.theme-meta strong { font: 700 16px "Space Grotesk", sans-serif; color: var(--text); }
.theme-meta small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.theme-check { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--accent); color: var(--accent-ink); opacity: 0; }
.theme-option.selected .theme-check { opacity: 1; }
.theme-note { text-align: center; margin-top: 26px; }
@media (max-width: 760px) { .theme-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .theme-preview { height: 86px; padding: 10px; } .theme-meta small { display: none; } }
@media (max-width: 420px) { .theme-grid { grid-template-columns: 1fr; } }

/* the page behind everything (also what shows when you overscroll) follows the theme too */
html { background: var(--bg); background-color: var(--bg); }

/* Forum message boxes (new thread, replies, editing) and the profile bio box have a fixed size: no dragging the corner. Long text just scrolls inside. */
#forum textarea, #profile textarea { resize: none; }

/* ---- social link buttons on profiles ---- */
.profile-links { display: flex; flex-wrap: wrap; gap: 8px; }
.link-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel-2); color: var(--text); font-size: 12.5px; font-weight: 700; text-decoration: none; transition: .15s ease; }
.link-pill:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.link-pill span { opacity: .7; }
.link-label { margin: 4px 0 12px; }
.link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 760px) { .link-grid { grid-template-columns: 1fr; } }

.profile-grid { align-items: start; }

/* My Phone Collection pop-up (profile page) */
button.link-pill { font-family: inherit; cursor: pointer; }
.pcol-text { margin-top: 14px; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; min-height: 80px; }
.pcol-actions { margin-top: 22px; display: flex; justify-content: flex-end; }
.pcol-count { margin: 6px 0 0; }

/* Profile banner: a wide 3:1 strip above the profile card */
.profile-banner { aspect-ratio: 3 / 1; max-height: 260px; width: 100%; overflow: hidden; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--input-bg, #080809); }
.profile-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-head.has-banner { border-top-left-radius: 0; border-top-right-radius: 0; }

/* "YouTube Member" badge on profiles (given by the admin) */
.profile-badge.yt-badge { background: rgba(255, 48, 48, .16); color: #ff5c5c; }

/* Users page (admin only) */
.users-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.users-count { font-size: 15px; }
.users-list { display: grid; gap: 8px; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); flex-wrap: wrap; }
.user-num { min-width: 44px; color: var(--muted); font-size: 12px; font-weight: 800; }
.user-name { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; overflow-wrap: anywhere; }
.user-name:hover .author-name { color: var(--accent); }
.user-date { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }

/* "OG" badge on profiles (given by the admin) */
.profile-badge.og-badge { background: rgba(255, 191, 36, .16); color: #ffc247; }

/* smaller "YouTube Member" badge next to names in threads and replies */
.profile-badge.post-badge { padding: 2px 8px; font-size: 11px; white-space: nowrap; flex: none; }

/* Chat page */
.chat-card { max-width: 860px; margin: 0 auto; padding: 0; overflow: hidden; }
.chat-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.chat-log { height: min(60vh, 560px); min-height: 320px; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.chat-online { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.chat-online::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 8px rgba(61,220,132,.7); flex: none; }
.chat-empty { margin: auto; text-align: center; }
.chat-msg { display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; border-radius: 12px; }
.chat-msg:hover { background: rgba(255,255,255,.04); }
.chat-msg.mine { background: rgba(var(--accent-rgb), .08); }
.chat-avatar { flex: none; line-height: 0; }
.chat-avatar .avatar { width: 34px; height: 34px; }
.chat-body { min-width: 0; flex: 1; }
.chat-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.chat-head time { color: var(--muted); font-size: 12px; }
.chat-text { margin-top: 2px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; }
.chat-reply { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; padding: 2px 8px; border-radius: 6px; opacity: 0; transition: opacity .12s, color .12s, background .12s; }
.chat-msg:hover .chat-reply, .chat-reply:focus-visible { opacity: 1; }
.chat-reply:hover { color: var(--accent); background: rgba(var(--accent-rgb), .12); }
@media (hover: none) { .chat-reply { opacity: .8; } }
.chat-msg.pinged { background: rgba(var(--accent-rgb), .14); box-shadow: inset 3px 0 0 var(--accent); }
.chat-msg.flash { animation: chat-flash 1.8s ease-out; }
@keyframes chat-flash { 0%, 35% { background: rgba(var(--accent-rgb), .3); } 100% { background: transparent; } }
.chat-mention { color: var(--accent); font-weight: 700; text-decoration: none; background: rgba(var(--accent-rgb), .12); padding: 0 4px; border-radius: 5px; }
.chat-mention:hover { background: rgba(var(--accent-rgb), .24); }
.chat-mention.me { background: rgba(var(--accent-rgb), .3); }
.chat-quote { display: flex; align-items: baseline; gap: 8px; max-width: 100%; margin: 3px 0 2px; padding: 3px 10px; border: 0; border-left: 3px solid rgba(var(--accent-rgb), .6); border-radius: 6px; background: rgba(var(--accent-rgb), .07); color: var(--muted); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
button.chat-quote:hover { background: rgba(var(--accent-rgb), .14); }
.chat-quote.gone { cursor: default; font-style: italic; }
.chat-quote-name { flex: none; color: var(--text); font-weight: 700; }
.chat-quote-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-replybar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--line); background: rgba(var(--accent-rgb), .07); font-size: 13px; }
.chat-replybar-label { min-width: 0; display: flex; gap: 8px; align-items: baseline; }
.chat-replybar-label strong { flex: none; }
.chat-replybar-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.chat-replybar-x { flex: none; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 8px; border-radius: 6px; }
.chat-replybar-x:hover { color: #ff5c5c; background: rgba(255,92,92,.12); }
.chat-replybar + .chat-form { border-top: 0; }
.chat-input-wrap { position: relative; flex: 1; min-width: 0; }
.chat-input-wrap input[type="text"] { width: 100%; }
.chat-suggest { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 20; width: min(320px, 100%); padding: 6px; background: var(--modal-bg, #0b0b0d); border: 1px solid var(--modal-line, #29292d); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.55); }
.chat-suggest-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; cursor: pointer; font-weight: 600; }
.chat-suggest-item:hover, .chat-suggest-item.active { background: var(--panel-2); }
.chat-suggest-item .avatar { width: 26px; height: 26px; font-size: 12px; }
.chat-del { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 6px; }
.chat-del:hover { color: #ff5c5c; background: rgba(255,92,92,.12); }
.chat-form { display: flex; gap: 10px; padding: 12px 16px 0; border-top: 1px solid var(--line); }
.chat-form input[type="text"] { flex: 1; min-width: 0; }
.chat-meta { display: flex; justify-content: space-between; gap: 12px; padding: 6px 16px 12px; font-size: 12px; min-height: 28px; }
.chat-login-note { padding: 16px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); }
.chat-login-note a { color: var(--accent); }

/* Chat: "is typing..." line */
.chat-status { display: flex; align-items: center; min-width: 0; }
.chat-typing { display: inline-flex; align-items: center; gap: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#chat-error:not(:empty) + .chat-typing { display: none; }
.typing-dots { display: inline-flex; gap: 3px; align-items: center; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .35; animation: typing-bounce 1.2s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .typing-dots i { animation: none; opacity: .7; } }

/* ---- Blog (admin-only posts, no likes or replies) ---- */
#blog .form-card { max-width: 760px; margin: 0 auto 20px; }
.blog-admin-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.blog-list { display: grid; gap: 18px; max-width: 760px; margin: 0 auto; }
.blog-post h2 { font-family: "Space Grotesk", sans-serif; font-size: clamp(22px, 3vw, 28px); margin: 4px 0 6px; overflow-wrap: anywhere; }
.blog-date { color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.blog-post .post-body { overflow-wrap: anywhere; line-height: 1.65; }
.blog-post .post-img { max-width: min(100%, 420px); max-height: 320px; margin-top: 18px; }
.blog-more { text-align: center; margin-top: 4px; }

.blog-edit-form { display: grid; gap: 12px; }
.blog-edit-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.blog-edit-form .blog-check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.blog-edit-form .form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.filter-intro { margin: 0 0 6px; font-size: 13px; }
.filter-section { padding: 14px 0; border-top: 1px solid var(--line); }
.filter-section h3 { margin: 0 0 4px; font: 700 16px "Space Grotesk", sans-serif; }
.filter-section p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 11px; font-size: 13px; overflow-wrap: anywhere; }
.filter-chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 6px; }
.filter-chip button:hover { color: var(--danger); }
.filter-add { display: flex; gap: 8px; }
.filter-add input { flex: 1; min-width: 0; }

.notif-btn { position: relative; flex: none; width: 36px; height: 36px; margin-left: 8px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.04); color: var(--muted); cursor: pointer; transition: .15s ease; }
.notif-btn:hover, .notif-btn:focus-visible { color: var(--text); border-color: var(--accent); }
.notif-dot { position: absolute; top: 5px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; border: 2px solid #0b0b0d; box-sizing: content-box; }
.notif-item { align-items: flex-start; }
.notif-item.unread { background: rgba(33,150,255,.09); }
.notif-thread { color: var(--soft); font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere; margin: 2px 0 3px; }
@media (max-width: 760px) { .notif-btn { order: 1; margin-left: 0; } }

.support-card { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.support-card > div { flex: 1 1 380px; min-width: 0; }
.support-card h2 { margin: 9px 0 10px; }
.support-card p { color: #c8c8ce; margin: 0; max-width: 640px; line-height: 1.55; }
.support-card strong { color: var(--text); font-weight: 700; }
.donate-button { flex: none; white-space: nowrap; justify-content: center; }
@media (max-width: 760px) { .donate-button { width: 100%; } }

.profile-favs { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.fav-title { color: var(--muted); font-size: 12px; font-weight: 700; }
.fav-row { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.fav-row em { flex: 0 0 150px; font-style: normal; color: var(--muted); font-size: 12.5px; }
.fav-chip { display: inline-block; padding: 6px 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel-2); font-size: 12.5px; font-weight: 700; overflow-wrap: anywhere; }
.fav-grid { display: grid; gap: 12px; margin-bottom: 8px; }
.fav-field { display: grid; grid-template-columns: 150px 1fr 1fr; gap: 8px; align-items: center; }
.fav-field span { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.fav-field input { margin: 0; min-width: 0; }
@media (max-width: 760px) { .fav-field { grid-template-columns: 1fr 1fr; } .fav-field span { grid-column: 1 / -1; } .fav-row em { flex-basis: 100%; } }

.yt-embed { margin: 16px 0 4px; display: grid; gap: 10px; justify-items: start; }
.yt-frame { position: relative; width: min(100%, 640px); aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #000; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Store (admin-only listings that link to Vinted) ---- */
#store .form-card { max-width: 760px; margin: 0 auto 20px; }
#store h1 { user-select: none; }
.store-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 920px; margin: 0 auto; }
.store-list > .loading, .store-list > .store-more { grid-column: 1 / -1; }
.store-item { display: flex; flex-direction: column; align-items: flex-start; }
.store-item h2 { font-family: "Space Grotesk", sans-serif; font-size: clamp(20px, 2.6vw, 24px); margin: 4px 0 6px; overflow-wrap: anywhere; }
.store-item .post-body { overflow-wrap: anywhere; line-height: 1.65; margin-bottom: 18px; }
.store-item .post-img.store-img { width: 100%; max-width: 100%; height: 240px; max-height: 240px; margin: 0 0 16px; }
.store-item .vinted-button { margin-top: auto; }
.store-item .blog-edit-form { width: 100%; }
@media (max-width: 760px) { .store-list { grid-template-columns: 1fr; } }

/* ---- Game (clicker) ---- */
.game-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; max-width: 980px; margin: 0 auto; align-items: start; }
.game-main { display: flex; flex-direction: column; align-items: center; text-align: center; }
.game-score { font: 700 clamp(34px, 6vw, 54px)/1.1 "Space Grotesk", sans-serif; letter-spacing: -.03em; margin: 12px 0 6px; max-width: 100%; overflow-wrap: anywhere; }
.game-rates { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-bottom: 22px; }
.game-click { width: min(240px, 70vw); aspect-ratio: 1; padding: 0; border: 2px solid var(--line-strong); border-radius: 24px; background: #000; overflow: hidden; cursor: pointer; transition: transform .08s ease, border-color .15s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; }
.game-click:hover { border-color: var(--accent); }
.game-click:active { transform: scale(.96); }
.game-click:focus-visible { outline: 3px solid rgba(var(--accent-rgb), .5); outline-offset: 3px; }
.game-click img { display: block; width: 100%; height: 100%; pointer-events: none; }

.game-items { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.game-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--tint); }
.game-item-info { min-width: 0; display: grid; gap: 2px; }
.game-item-info strong { font: 600 16px "Space Grotesk", sans-serif; }
.game-item-info .muted { line-height: 1.4; }
.game-owned { font-size: 12px; color: var(--soft); }
.game-buy { flex: none; white-space: nowrap; padding: 10px 14px; gap: 6px; }
.game-buy:disabled { opacity: .4; cursor: not-allowed; }
.game-buy:disabled:hover { transform: none; filter: none; }

.game-extra { max-width: 980px; margin: 18px auto 0; }
.game-extra-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.game-about summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.game-credits { padding-top: 8px; }
.game-credits h3 { font: 700 15px "Space Grotesk", sans-serif; margin: 16px 0 6px; }
.game-credits p { margin: 0 0 6px; color: var(--soft); font-size: 13px; overflow-wrap: anywhere; }
.game-credits a { color: var(--accent); }

@media (max-width: 760px) {
  .game-wrap { grid-template-columns: 1fr; }
  .game-item { flex-wrap: wrap; }
  .game-buy { width: 100%; justify-content: center; }
}

/* ---- menu with 10 tabs: never wrap a tab, never push the page sideways ---- */
nav a { white-space: nowrap; }
@media (min-width: 761px) {
  nav { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
}
@media (min-width: 761px) and (max-width: 1560px) {
  .brand-credit { display: none; }
  nav { gap: 2px; }
  nav a { padding: 9px 10px; }
}

/* ---- delete my account (inside Edit profile) ---- */
.danger-zone { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.danger-zone p { margin: 8px 0 14px; line-height: 1.5; }
#delete-account-form { margin-top: 16px; padding: 16px; border: 1px solid rgba(255,107,107,.35); border-radius: 14px; }
#delete-account-form .auth-warning { margin-top: 0; }
#delete-account-form .danger-button { padding: 10px 14px; }

/* ---- text can't be highlighted outside typing fields (works with protect.js) ---- */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
.recovery-code { -webkit-user-select: all; user-select: all; } /* the recovery code must stay copyable */

/* =====================================================================
   MOBILE POLISH (phones only: nothing in this block applies above 760px wide, so desktop/laptop looks are untouched)
   ===================================================================== */
@media (max-width: 760px) {
  /* header: two tidy rows (logo + search + bell, then the menu tabs in one swipeable strip) instead of one cramped, sideways-scrolling row */
  .site-header { height: auto; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px 0; overflow: visible; }
  .brand { order: 1; flex: 0 0 auto; font-size: 15px; }
  .brand-credit { display: none; }
  .site-search { order: 2; flex: 1 1 0; min-width: 0; margin: 0; }
  .notif-btn { order: 3; margin: 0; }
  .site-header nav { order: 4; flex: 0 0 100%; width: 100%; gap: 4px; padding: 2px 0 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .site-header nav::-webkit-scrollbar { display: none; }
  .site-header nav a { flex: none; padding: 8px 12px; font-size: 13px; }
  .search-results { top: 112px; max-height: min(65vh, 480px); }

  /* page spacing and headings */
  main { width: calc(100% - 28px); }
  .page { padding: 34px 0 48px; min-height: 0; scroll-margin-top: 120px; }
  .page-heading, .centered { margin-bottom: 28px; }
  h1 { font-size: clamp(34px, 11vw, 46px); margin: 14px 0; }
  .page-heading h1 { font-size: clamp(36px, 11.5vw, 48px); margin: 10px 0 8px; }
  h2 { font-size: 24px; margin: 8px 0 14px; }
  .page-heading p, .lead { font-size: 15px; line-height: 1.55; }
  .hero { padding: 6px 0 28px; }
  .heading-note { font-size: 14px; margin-top: 6px; }

  /* cards and grids */
  .card { padding: 20px; border-radius: 16px; }
  .content-grid, .side-stack { gap: 14px; }
  .fun-card { min-height: 0; }
  .big-quote { margin: 20px 0 8px; font-size: 56px; }
  .fun-card p { font-size: 18px; }
  .support-card { gap: 16px; }
  .support-card > div { flex-basis: 100%; }
  .social-grid { gap: 10px; }
  .social-card { padding: 18px; }
  .collection-card { padding: 20px; }
  .collection-card h2 { font-size: 21px; }
  .rules-wrap { gap: 12px; }
  .rules-card h2 { font-size: 21px; }
  .rule-list { padding-left: 22px; }
  .rule-list li { padding: 6px 0 6px 4px; font-size: 14.5px; }

  /* forms: comfortable tap targets, 16px text so iPhones don't zoom in, full-width buttons */
  input, textarea { font-size: 16px; padding: 12px 13px; }
  .button { padding: 12px 16px; justify-content: center; }
  .form-actions { align-items: stretch; gap: 10px; }
  .form-actions .button { width: 100%; }
  .auth-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 0 16px; }
  .auth-tab { padding: 10px 6px; font-size: 13px; text-align: center; justify-content: center; }
  .auth-bar { align-items: flex-start; }
  .recovery-box .form-actions { flex-direction: column; }
  .recovery-box .form-actions .button { width: 100%; }
  .forum-actions .danger-button, .forum-actions .button { flex: 1 1 calc(50% - 5px); text-align: center; }
  .forum-toolbar { justify-content: stretch; }

  /* threads, profiles, chat */
  .thread { padding: 16px; }
  .thread h3 { font-size: 17px; }
  .thread-top { align-items: flex-start; }
  .thread-stats { flex-wrap: wrap; }
  .profile-head { gap: 14px; }
  .profile-avatar .avatar { width: 88px; height: 88px; font-size: 36px; }
  .profile-actions { width: 100%; }
  .profile-actions .button { flex: 1 1 auto; }
  .profile-banner { max-height: 140px; }
  .modal { padding: 10px; align-items: end; }
  .modal-card { padding: 22px 18px; max-height: 92vh; border-radius: 18px; }
  .modal-title { font-size: 22px; }
  .chat-log { height: 56vh; min-height: 260px; padding: 10px; }
  .chat-form { padding: 10px 10px 0; gap: 8px; }
  .chat-meta { padding: 6px 10px 10px; }
  .chat-msg { padding: 6px 4px; }
  .chat-text { font-size: 15px; }
  .users-bar { align-items: stretch; }
  .user-date { margin-left: 0; white-space: normal; }
  .pagination { margin-top: 18px; }

  /* game */
  .game-wrap { gap: 14px; }
  .game-score { font-size: clamp(30px, 10vw, 42px); }
  .game-rates { margin-bottom: 16px; font-size: 12px; }
  .game-click { width: min(210px, 64vw); }
  .game-item { padding: 12px 14px; gap: 10px; }
  .game-item-info strong { font-size: 15px; }
  .game-buy { padding: 11px 14px; }
  .game-extra { margin-top: 14px; }
  .game-extra-row .button, .game-extra-row .danger-button { flex: 1 1 100%; justify-content: center; text-align: center; padding: 12px 14px; }

  /* themes + footer */
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .theme-option { padding: 8px; }
  .theme-preview { height: 70px; padding: 9px; }
  .theme-meta { margin-top: 8px; }
  .theme-meta strong { font-size: 14px; }
  .theme-note { margin-top: 18px; }
  footer { padding: 18px 0 26px; text-align: center; align-items: center; }
}
@media (max-width: 380px) {
  .auth-tab { font-size: 12px; padding: 10px 4px; }
  .site-search { flex-basis: 0; }
  .site-header nav a { padding: 8px 10px; }
}

/* ---- "More" menu button for tabs that don't fit (phones only; see mobile-menu.js) ---- */
.more-btn, .more-panel { display: none; }
@media (max-width: 760px) {
  .site-header nav { flex: 0 0 calc(100% - 46px); width: calc(100% - 46px); overflow: hidden; }
  .site-header nav a[data-overflow] { display: none; }
  .more-btn { order: 5; flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin: 0 0 8px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--muted); cursor: pointer; }
  .more-btn[hidden] { display: none; }
  .more-btn:hover, .more-btn[aria-expanded="true"], .more-btn.has-active { color: var(--text); border-color: var(--accent); }
  .more-btn.has-active { background: var(--panel); }
  .more-panel { position: fixed; right: 14px; z-index: 40; min-width: 170px; max-width: calc(100vw - 28px); max-height: 60vh; overflow-y: auto; padding: 6px; background: var(--modal-bg); border: 1px solid var(--modal-line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.55); }
  .more-panel:not([hidden]) { display: block; }
  .more-item { display: block; padding: 11px 14px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
  .more-item:hover, .more-item.active { color: var(--text); background: var(--panel-2); }
}

/* ---- phones: author line on threads/replies (name, badges, date) wraps instead of squashing the name under the badges ---- */
@media (max-width: 760px) {
  .author-meta { flex-wrap: wrap; align-items: center; gap: 6px 8px; }
  .author-meta .author-link { flex: 0 1 auto; max-width: 100%; }
  .author-meta .author-name { min-width: auto; overflow-wrap: anywhere; color: var(--text); font-weight: 700; }
  .author-meta .post-badge { flex: none; }
  .author-meta > span:last-child { white-space: nowrap; }
}

/* ---- Home: app download card ---- */
.app-card p { color: var(--soft); }
.app-card p.muted { color: var(--muted); }
.app-steps { margin: 14px 0 12px; padding-left: 22px; color: var(--soft); line-height: 1.55; max-width: 640px; }
.app-steps li { padding: 3px 0 3px 4px; }
.app-steps li::marker { color: var(--accent); font-weight: 700; }
.app-note { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; max-width: 640px; }

/* Blog: Google Drive link button */
.drive-embed { margin: 16px 0 4px; }
