/* Logo font (Anton, SIL Open Font License: fonts/Anton-OFL.txt), stored on our own server. */
@font-face {
  font-family: "Anton";
  src: url("/assets/fonts/anton-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  /* Logo colours (from the "Adults Losing Logo" design): word mark for light backgrounds here, dark below. */
  --logo-adults: #121014;
  --logo-losing: #1F4FC2;
  --logo-tag: #5f5852;
  --logo-age: #9a6400;
  --bg: #f6f7f9;
  --card: #fff;
  --text: #1c2330;
  --muted: #687284;
  --line: #e2e6ec;
  --accent: #2f6fed;
  --ok: #1a8f4c;
  --warn: #b26a00;
  --danger: #c62f2f;
  color-scheme: light;
}
/* Display Theme (Settings dialog): data-theme on <html> is light, dark or system. */
:root[data-theme="dark"] {
  --logo-adults: #F4EDE4;
  --logo-losing: #3D7BF0;
  --logo-tag: #B8AFA6;
  --logo-age: #E8B04B;
  --bg: #12151b;
  --card: #1b2029;
  --text: #e6e9ef;
  --muted: #8d97a8;
  --line: #2b3240;
  --accent: #6a9bff;
  --ok: #4cc584;
  --warn: #f0a83a;
  --danger: #ff6b6b;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --logo-adults: #F4EDE4;
    --logo-losing: #3D7BF0;
    --logo-tag: #B8AFA6;
    --logo-age: #E8B04B;
    --bg: #12151b;
    --card: #1b2029;
    --text: #e6e9ef;
    --muted: #8d97a8;
    --line: #2b3240;
    --accent: #6a9bff;
    --ok: #4cc584;
    --warn: #f0a83a;
    --danger: #ff6b6b;
  }
}
* { box-sizing: border-box; }
/* Change log (admin) */
.changelog { width: 100%; border-collapse: collapse; }
.changelog th, .changelog td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.changelog-version, .changelog-date { white-space: nowrap; }
/* Settings dialog (gear icon in the main menu) */
.gear-button { background: none; border: 0; padding: 0 2px; font-size: 1.25rem; line-height: 1; color: inherit; cursor: pointer; }
.gear-button:hover { color: var(--accent); }
.prefs-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 16px 18px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.prefs-dialog::backdrop { background: rgba(0,0,0,.45); }
.prefs-dialog h2 { margin: 0 0 12px; font-size: 1.15rem; }
.prefs-dialog h3 { margin: 16px 0 6px; font-size: 1rem; }
.prefs-theme { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
/* Card Design: a small preview of the chosen design beside the list */
.prefs-cards-preview { display: inline-flex; gap: 3px; }
.prefs-cards-preview img { width: 30px; height: 42px; border-radius: 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.prefs-sounds { width: 100%; border-collapse: collapse; }
.prefs-sounds th, .prefs-sounds td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: center; font-size: .9rem; font-weight: 400; }
.prefs-sounds thead th { font-weight: 700; }
.prefs-sounds tbody th { text-align: left; }
.prefs-sounds tr.prefs-group th { text-align: left; font-weight: 700; padding-top: 12px; color: var(--muted, inherit); }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.top, .lobby, .foot { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.top { display: flex; align-items: center; gap: 12px; padding-top: 24px; flex-wrap: wrap; }
.top h1 { margin: 0; font-size: 1.6rem; }
.status { font-size: .85rem; font-weight: 600; }
.status--on { color: var(--ok); }
.status--off { color: var(--warn); }
.top-spacer { margin-left: auto; } /* pushes the menu links to the right */
.card {
  margin-top: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.card h2 { margin: 0 0 12px; font-size: 1.1rem; }
.messages {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 50vh;
  min-height: 240px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.messages li { padding: 3px 2px; overflow-wrap: anywhere; } /* 6px between messages */
.messages time { color: var(--muted); font-size: .8rem; }
.chat-form { display: flex; gap: 8px; margin-top: 12px; }
.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.chat-form button {
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.chat-form :disabled { opacity: .5; cursor: not-allowed; }
.error { color: var(--warn); margin: 8px 0 0; font-size: .9rem; }

/* Header / account */
a { color: var(--accent); }
/* Header: the word mark (ADULTS + LOSING with its tumbling N and G), in the logo's Anton font. */
.brand {
  display: inline-flex; align-items: flex-start; gap: .25em; padding-bottom: .2em;
  font-family: Anton, Impact, "Arial Narrow", sans-serif; font-weight: 400; font-size: 1.75rem;
  line-height: 1; letter-spacing: .027em; text-decoration: none; white-space: nowrap;
}
.brand-adults { color: var(--logo-adults); }
.brand-losing { color: var(--logo-losing); display: inline-flex; align-items: flex-start; }
.who { font-weight: 600; }
.inline { display: inline; margin: 0; }
.link-button {
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--accent); cursor: pointer; text-decoration: underline;
}
.badge {
  display: inline-block; padding: 0 6px; border-radius: 6px;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  vertical-align: middle; color: #fff; background: var(--muted);
}
.badge--moderator { background: var(--ok); }
.badge--admin { background: var(--danger); }
.badge--friend { background: #1e3a8a; }          /* dark blue "F" next to friends' names */
.name-badges .badge + .badge, .badge + .badge { margin-left: 2px; }

/* Flash messages */
.flash {
  max-width: 728px; margin: 16px auto 0; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card);
}
.flash--ok { border-color: var(--ok); }
.flash--error { border-color: var(--danger); color: var(--danger); }
ul.flash { padding-left: 32px; }
.auth .flash { margin: 0 0 12px; }

/* Landing page ("Before you enter…") */
.landing { max-width: 720px; margin: 0 auto; padding: 0 16px 24px; }
.landing-card { padding: 28px 30px; line-height: 1.65; }
.landing-card h1 { margin: 0 0 18px; font-size: 1.45rem; line-height: 1.3; }
.landing-card p { margin: 0 0 14px; }
.landing-ack { font-weight: 600; }
.landing-enter { text-align: center; margin: 24px 0 26px !important; }
.landing-button { display: inline-block; padding: 13px 34px; font-size: 1.1rem; }
.landing-button--classic { margin-top: 12px; }
.landing-parents { text-align: center; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: 0 !important; }
@media (max-width: 520px) { .landing-card { padding: 20px 18px; } }
/* On the landing photo: a black box at 50% opacity (any theme), light text with a soft shadow so it
   stays readable over the bright parts of the photo. */
.landing-page .landing-card {
  background: rgba(0, 0, 0, .5); border-color: rgba(255, 255, 255, .14);
  color: #f3f1ee; text-shadow: 0 1px 3px rgba(0, 0, 0, .85);
}
.landing-page .landing-card a:not(.button-link) { color: #9cbcff; }
.landing-page .landing-parents { color: #d2cdc8; border-top-color: rgba(255, 255, 255, .2); }
.landing-page .landing-button { text-shadow: none; }
/* Landing page: the primary logo replaces the "AdultsLosing" text at the top, on a transparent
   background (colours follow the theme). Sizes scale with the row's font size, in the proportions
   of the original 1200x630 design. */
.landing-page > .top { display: none; }
.landing-logo {
  margin: 28px 0 22px; padding: 0 0 4px;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.landing-logo-row { display: flex; align-items: center; gap: .39em; font-size: clamp(40px, 11vw, 72px); }
.landing-logo-card { flex: none; width: 1.34em; height: 1.79em; }
.landing-logo-words {
  margin: 0; display: flex; flex-direction: column; gap: .054em;
  font-family: Anton, Impact, "Arial Narrow", sans-serif; font-weight: 400; line-height: .95; letter-spacing: .027em;
}
.landing-logo-adults { color: var(--logo-adults); }
.landing-logo-losing { color: var(--logo-losing); display: flex; align-items: flex-start; }
.landing-logo-n, .brand-n { display: inline-block; transform: translateY(.054em) rotate(7deg); }
.landing-logo-g, .brand-g { display: inline-block; transform: translateY(.196em) rotate(19deg); transform-origin: bottom left; }
.landing-logo-tag { margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.landing-logo-tag > span:first-child { font-size: .95rem; font-weight: 700; letter-spacing: .33em; color: var(--logo-tag); }
/* Landing background: the photo, fixed, covering the window, centred. Its own layer so it can blur
   (scaled up a little so the blurred edges stay out of view). The logo sits on the photo's dark top,
   so it always uses the dark-background colours here. */
body.landing-page {
  background: #000;
  --logo-adults: #F4EDE4; --logo-losing: #3D7BF0; --logo-tag: #B8AFA6; --logo-age: #E8B04B;
}
.landing-bg {
  position: fixed; inset: 0; z-index: -1;
  background: #000 url("/assets/landing-bg.jpg") center center / cover no-repeat;
  filter: blur(6px); transform: scale(1.06);
  transition: filter 3s ease;
}
.landing-page .foot { color: #c9c9cf; text-shadow: 0 1px 2px #000; text-align: center; }
/* Intro (body.landing-intro for the first 2 s, see landing.php): sharp photo, upright letters, nothing
   else showing. Removing the class runs all three 3 s transitions at once. */
.landing-logo-n, .landing-logo-g { transition: transform 3s cubic-bezier(.3, 1.4, .5, 1); }
.landing-card, .landing-page > .flash, .landing-page .foot { transition: opacity 3s ease; }
.landing-intro .landing-bg { filter: none; }
.landing-intro .landing-logo-n, .landing-intro .landing-logo-g { transform: none; }
.landing-intro .landing-card, .landing-intro > .flash, .landing-intro .foot { opacity: 0; visibility: hidden; }
.landing-logo-age { font-size: .8rem; font-weight: 700; letter-spacing: .05em; color: var(--logo-age); border: 2px solid var(--logo-age); border-radius: 999px; padding: 1px 10px; }

/* Terms of Service */
.tos { max-width: 860px; margin: 0 auto; padding: 0 16px 24px; }
.tos-card { padding: 28px 32px; line-height: 1.65; }
.tos-card h1 { margin: 0 0 16px; font-size: 1.6rem; }
.tos-card h2 { margin: 26px 0 8px; font-size: 1.15rem; }
.tos-card h3 { margin: 20px 0 6px; font-size: 1rem; }
.tos-card p { margin: 0 0 12px; overflow-wrap: anywhere; }
.tos-card ul, .tos-card ol { margin: 0 0 12px; padding-left: 26px; }
.tos-card li { margin-bottom: 6px; }
.tos-roman { list-style: none; counter-reset: roman; padding-left: 38px !important; }
.tos-roman li { counter-increment: roman; position: relative; }
.tos-roman li::before { content: counter(roman, lower-roman) ")"; position: absolute; left: -34px; width: 28px; text-align: right; }
.tos-back { margin-top: 24px !important; }
@media (max-width: 520px) { .tos-card { padding: 20px 18px; } }

/* Login / register */
.auth { max-width: 420px; margin: 0 auto; padding: 0 16px; }
.auth h1 { margin: 0 0 16px; font-size: 1.4rem; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.stack input {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit; font-weight: 400;
}
.stack small { color: var(--muted); font-weight: 400; }
.stack button {
  padding: 11px 18px; border: 0; border-radius: 8px; background: var(--accent);
  color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.muted { color: var(--muted); font-size: .9rem; }
.small { font-size: .8rem; }
.nowrap { white-space: nowrap; }

/* Lobby: chat with the online list on its right */
.lobby--with-users {
  max-width: 1100px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 0 20px;
  align-items: start;
}
.users-card h2 { display: flex; gap: 6px; align-items: baseline; }
.users-card .count { color: var(--muted); font-weight: 400; font-size: .95rem; }
.user-list {
  list-style: none; margin: 0; padding: 0;
  max-height: calc(50vh + 70px); overflow-y: auto;
  border-top: 1px solid var(--line);
}
.user-list li { padding: 6px 2px; overflow-wrap: anywhere; }
.user-list a { color: var(--text); text-decoration: none; font-weight: 600; }
.user-list a:hover { text-decoration: underline; }
.users-card.is-stale .user-list { opacity: .5; }
@media (max-width: 720px) {
  .lobby--with-users { grid-template-columns: 1fr; }
  .user-list { max-height: none; display: flex; flex-wrap: wrap; gap: 4px 14px; border-top: 0; }
  .user-list li { padding: 2px 0; }
}

/* Profiles */
.who a, .chat-name { color: inherit; text-decoration: none; font-weight: 700; }
.who a:hover, .chat-name:hover { text-decoration: underline; }
.profile { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.profile h1 { margin: 0; font-size: 1.5rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-head + .muted { margin: 4px 0 16px; }
.button-link {
  padding: 8px 14px; border-radius: 8px; background: var(--accent); color: #fff;
  text-decoration: none; font-weight: 600; font-size: .9rem;
}
.profile-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 24px; margin: 0; }
.profile-field { min-width: 0; }
.profile-field--wide { grid-column: 1 / -1; }
.profile-field dt { font-size: .8rem; font-weight: 600; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.profile-field dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.vis { font-size: .7rem; font-weight: 600; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.vis--everyone { border-color: var(--ok); color: var(--ok); }
.vis--friends { border-color: var(--accent); color: var(--accent); }
.vis--admin { border-color: var(--danger); color: var(--danger); }
.profile-form { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.pf-row { display: grid; grid-template-columns: 1fr 150px; gap: 12px; align-items: end; }
.pf-head { font-size: .75rem; font-weight: 600; color: var(--muted); margin-bottom: -10px; }
.pf-input { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pf-input label { font-weight: 600; font-size: .9rem; }
.pf-input small { color: var(--muted); }
.pf-input input, .pf-input select, .pf-input textarea, .pf-vis select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit;
}
.pf-input textarea { resize: vertical; }
.pf-row--wide { align-items: start; }
.pf-row--wide .pf-vis { padding-top: 26px; }
.readonly { margin: 0; padding: 9px 0; }
.pf-actions { display: flex; gap: 16px; align-items: center; }
.pf-actions button {
  padding: 11px 18px; border: 0; border-radius: 8px; background: var(--accent);
  color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
@media (max-width: 520px) {
  .pf-row { grid-template-columns: 1fr; gap: 6px; }
  .pf-head { display: none; }
  .pf-vis::before { content: "Visible to"; display: block; font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
  .pf-row--wide .pf-vis { padding-top: 0; }
}

/* Lobby page layout: header, then the main content area filling the window,
   then the chat pane and online list docked at the bottom, both the same height.
   Dock height = 40% of the old chat pane (50vh of messages + 126px of tabs/input/padding). */
:root { --dock-height: max(146px, calc(20vh + 50px)); }
body.lobby-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lobby-page .foot { display: none; }
.lobby-page > .top, .lobby-page > .flash { flex: none; width: 100%; }
.lobby-page > .flash { width: calc(100% - 32px); }
.lobby-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}
.main-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 16px;
}
.main-content .welcome { margin: 0; font-size: 1.4rem; }
/* Pages shown inside the content area (Members, Friends, profiles, Admin) */
.main-content.is-loading { opacity: .55; transition: opacity .15s; }
.main-content .view > main { max-width: none; margin: 0; padding: 0; }
.main-content .view > main.profile { max-width: 760px; }
.main-content .view > main.profile:has(.profile-top) { max-width: 920px; } /* room beside the 255px picture */
.main-content .view > main > .card:first-child { margin-top: 0; }
.main-content .view > .flash { max-width: none; margin: 0 0 14px; }
.main-content :focus { outline: none; }
.top a.is-current { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.lobby-dock {
  flex: none;
  width: 100%;
  padding-bottom: 16px;
}
.lobby-dock .card {
  margin-top: 0;
  height: var(--dock-height);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.lobby-dock #chat-panes { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lobby-dock .messages { flex: 1; height: auto; min-height: 0; }
.lobby-dock .user-list { flex: 1; max-height: none; min-height: 0; }
.lobby-dock .users-card h2 { margin-bottom: 8px; }
.lobby-dock .chat-form { margin-top: 8px; }
.lobby-dock .error, .lobby-dock .chat-notice { flex: none; }

/* Phones: normal scrolling page; content, then chat, then the online list. */
@media (max-width: 720px) {
  body.lobby-page { height: auto; overflow: visible; display: block; }
  .main-content { overflow: visible; }
  .lobby-dock .users-card { height: auto; margin-top: 12px; }
}

/* Profile in its own window (profile.php?popup=1) */
.popup-page .top { padding-top: 12px; }
.popup-page .profile { padding-bottom: 16px; }
.popup-page .profile > .card:first-child { margin-top: 12px; }
.popup-page .foot { display: none; }

/* Chat tabs (Lobby + private chats) */
.chat-tabs {
  display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; margin: -4px 0 0;
  border-bottom: 1px solid var(--line); scrollbar-width: thin;
}
.chat-tab {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 7px 12px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0;
  background: none; color: var(--muted); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
}
.chat-tab:hover { color: var(--text); }
.chat-tab.is-active { color: var(--text); background: var(--card); border-color: var(--line); }
.chat-tab-unread {
  min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger);
  color: #fff; font-size: .7rem; line-height: 18px; text-align: center;
}
.chat-tab-close { color: var(--muted); font-size: 1.05rem; line-height: 1; padding: 0 2px; border-radius: 4px; }
.chat-tab-close:hover { color: var(--danger); background: var(--bg); }
.chat-card .messages { border-top: 0; }
.chat-head { display: flex; align-items: flex-end; gap: 8px; border-bottom: 1px solid var(--line); margin-top: -4px; }
.chat-head .chat-tabs { flex: 1; min-width: 0; border-bottom: 0; margin: 0; }
.sound-toggle {
  flex: none; margin-bottom: 4px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); cursor: pointer; font-size: 1rem; line-height: 1.2;
}
.sound-toggle[data-on="0"], .sound-toggle[data-on="0"]:hover { background: #d92626; border-color: #d92626; color: #fff; }  /* Global mute is on */
.sound-toggle:hover { border-color: var(--accent); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.messages li.mine .chat-name { color: var(--accent); }
.msg-delete {
  background: none; border: 0; padding: 0 3px; margin-left: 2px; cursor: pointer;
  font-size: .8rem; opacity: .55; vertical-align: middle;
}
.msg-delete:hover, .msg-delete:focus-visible { opacity: 1; }
/* With a mouse, only show the delete button on the message being pointed at. */
@media (hover: hover) {
  .messages li .msg-delete { visibility: hidden; }
  .messages li:hover .msg-delete, .messages li .msg-delete:focus-visible { visibility: visible; }
}
.chat-notice { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: .9rem; }
.pm-button {
  background: none; border: 0; padding: 0 2px; cursor: pointer; font-size: .9rem; opacity: .7;
}
.pm-button:hover { opacity: 1; }
.pf-section { font-size: 1.05rem; margin: 10px 0 -4px; padding-top: 14px; border-top: 1px solid var(--line); }

/* Friends */
.friends-link { position: relative; }
.req-badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; text-align: center; line-height: 18px;
}
.friends { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.friends h2 { margin: 0 0 12px; font-size: 1.1rem; }
.friends .count { color: var(--muted); font-weight: 400; font-size: .95rem; }
.add-friend { display: flex; gap: 8px; flex-wrap: wrap; }
.add-friend input {
  flex: 1; min-width: 160px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit;
}
.people { list-style: none; margin: 0; padding: 0; }
.people li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.people li:first-child { border-top: 0; }
.person { color: var(--text); font-weight: 600; text-decoration: none; }
.person:hover { text-decoration: underline; }
.actions, .friend-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form { display: inline; margin: 0; }
.friend-status { font-weight: 600; font-size: .9rem; color: var(--ok); }
.friend-status.muted { color: var(--muted); }

/* Profile pictures */
.avatar { border-radius: 10px; object-fit: cover; background: var(--line); vertical-align: middle; }
.avatar--large { width: 150px; height: 150px; }
.avatar--small { width: 50px; height: 50px; border-radius: 6px; }
.avatar--tiny { width: 45px; height: 45px; border-radius: 6px; margin-right: 8px; } /* members page: 28px + 60% */
.member-table td:first-child { white-space: nowrap; }
.avatar--admin { width: 44px; height: 44px; border-radius: 6px; }
/* Profile top: picture (150px + 70% = 255px) | name, member since, location, birthday | buttons (top right) */
.profile-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "pic summary actions";
  gap: 14px 22px;
  align-items: start;
  margin-bottom: 18px;
}
.profile-top .profile-pic { grid-area: pic; width: 255px; height: 255px; }
.profile-summary { grid-area: summary; min-width: 0; }
.profile-summary h1 { margin: 0 0 4px; }
.profile-summary p { margin: 4px 0; overflow-wrap: anywhere; }
.summary-label { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); margin-top: 10px; }
.profile-actions {
  grid-area: actions; justify-self: end;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; max-width: 260px;
}
.profile-actions .friend-actions { justify-content: flex-end; }
.button-link.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
/* Narrower (profile windows, small screens): buttons on their own row at the top right. */
@media (max-width: 760px) {
  .profile-top { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "actions actions" "pic summary"; }
  .profile-actions { max-width: none; }
}
.popup-page .profile-top { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "actions actions" "pic summary"; }
.popup-page .profile-actions { max-width: none; }
/* Phones: everything stacked, picture full size. */
@media (max-width: 520px) {
  .profile-top, .popup-page .profile-top { grid-template-columns: 1fr; grid-template-areas: "actions" "pic" "summary"; }
  .profile-top .profile-pic { width: 255px; height: 255px; max-width: 100%; }
}
.avatar-current { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.avatar-current p { flex-basis: 100%; margin: 0; }
.avatar-upload input[type="file"] { padding: 8px; }
.file-check { margin: -6px 0 0; min-height: 1.2em; }
.file-check.error { color: var(--danger); }
.avatar-remove { margin-top: 12px; }
/* Crop tool */
.cropper { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; margin: 12px 0; }
/* The crop area is 70% of its old size (was: full width, 60vh tall). */
.crop-stage { position: relative; display: inline-block; max-width: 70%; user-select: none; line-height: 0; }
.crop-image { display: block; max-width: 100%; max-height: 42vh; width: auto; height: auto; }
.crop-box {
  position: absolute; box-sizing: border-box; border: 2px solid #fff; cursor: move; touch-action: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); outline: none;
}
.crop-box:focus-visible { border-color: var(--accent); }
.crop-stage { overflow: hidden; }
.crop-handle {
  position: absolute; right: -8px; bottom: -8px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent); cursor: nwse-resize;
}
.crop-side { display: flex; flex-direction: column; gap: 8px; }
.crop-side p { margin: 0; }
.crop-preview { border-radius: 10px; background: var(--line); }
.crop-preview--small { border-radius: 6px; }
.crop-zoom { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }

/* PicSets */
.picsets { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.picsets h2 { margin: 0 0 12px; font-size: 1.1rem; }
.picsets .count { color: var(--muted); font-weight: 400; font-size: .95rem; }
.picset-create { margin-bottom: 8px; }
.picset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.picset-card { margin-top: 0; display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--text); }
.picset-card:hover { border-color: var(--accent); }
.picset-card img, .picset-empty { flex: none; width: 96px; height: 120px; border-radius: 6px; object-fit: cover; }
.picset-empty { display: grid; place-items: center; background: var(--bg); border: 1px dashed var(--line); color: var(--muted); font-size: .75rem; text-align: center; }
.picset-card-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.picset-status { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; vertical-align: middle; width: fit-content; }
.picset-status--verified { background: var(--ok); color: #fff; }
.picset-status--unverified { border: 1px solid var(--line); color: var(--muted); }
.picset-status--submitted { background: #b45309; color: #fff; }
.picset-status--community { background: #1e3a8a; color: #fff; }
.picset-rename { margin: 10px 0 0; max-width: 520px; }
.picset-intro p { margin: 6px 0; line-height: 1.55; }
.picset-intro p:first-child { margin-top: 0; }
.picset-intro p:last-child { margin-bottom: 0; }
.picset-community-head { margin-top: 20px; }
.picset-complete { border: 2px solid #22c55e; background: rgba(34, 197, 94, .14); }   /* bright green outline, green shading (light + dark themes) */
.picset-complete p { margin: 0; }
.picset-complete strong { color: var(--ok); }
/* Active PicSet: each card can be chosen; the active one is outlined in the accent colour. */
.picset-card-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.picset-card-wrap .picset-card { flex: 1; }
.picset-card-wrap.is-active .picset-card { border: 2px solid var(--accent); }
.picset-use { display: flex; gap: 10px; align-items: center; margin: 0; padding: 0 4px; }
.picset-active-label { color: var(--accent); font-weight: 700; font-size: .9rem; }
.picset-active-summary h2 { margin-bottom: 6px; }
.picset-active-summary p { margin: 4px 0; }
.picset-back { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.sort-head { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-head:hover, .sort-head.is-active { color: var(--accent); }
.picset-status--incomplete { border: 1px solid var(--danger); color: var(--danger); }
.picset-card-text .picset-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.picset-returned { margin: 10px 0 0; padding: 8px 12px; border-left: 4px solid var(--danger); background: var(--bg); border-radius: 6px; }
.picset-verify h2, .picset-review h2 { margin-bottom: 8px; }
.picset-verify p, .picset-verify ul { margin: 8px 0; line-height: 1.5; }
.picset-verify .verify-code { margin: 14px 0; font-size: 1.05rem; }
.picset-verify-body { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; margin-top: 12px; }
.picset-verify-body > .stack { flex: 1; min-width: 240px; gap: 14px; }
.picset-verify-current { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.picset-verify-img { display: block; max-width: min(100%, 400px); max-height: 400px; width: auto; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.picset-review .picset-verify-img { max-width: min(100%, 800px); max-height: 800px; margin: 10px 0; }
.submit-verify:disabled { opacity: .5; cursor: not-allowed; }
.picset-review-actions { display: flex; gap: 12px 20px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.picset-return { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.picset-return input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: .9rem; }
.picset-head { display: flex; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; align-items: flex-start; }
.picset-head h1 { margin: 0 0 6px; font-size: 1.4rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.picset-head p { margin: 4px 0; }
.verify-code strong { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; letter-spacing: .12em; }
.picset-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.picset-viewer { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.picset-large { width: 400px; height: 500px; max-width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 8px; background: var(--bg); }
.picset-thumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; flex: 1; min-width: 0; align-content: flex-start; }
.picset-thumbs li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.picset-thumbs img { width: 96px; height: 120px; border-radius: 6px; display: block; border: 2px solid transparent; }
.picset-thumbs li.is-selected img { border-color: var(--accent); }
.picset-num { position: absolute; top: 4px; left: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; padding: 0 5px; border-radius: 4px; }
.picset-tools { display: flex; gap: 2px; }
.icon-button { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 5px; padding: 0 7px; cursor: pointer; font-size: .85rem; line-height: 1.6; }
.icon-button:hover { border-color: var(--accent); }
.icon-button.danger { color: var(--danger); }

/* Member directory */
.members { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.members h2 { margin: 0 0 12px; font-size: 1.1rem; }
.members .count { color: var(--muted); font-weight: 400; font-size: .95rem; }
.member-filters { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-start; }
.sort-by { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.sort-by select {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit; font-size: .9rem; font-weight: 400;
}
.gender-filter { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; min-width: 0; }
.gender-filter legend { font-size: .8rem; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 4px; }
.check { display: inline-flex; align-items: center; gap: 5px; font-size: .9rem; cursor: pointer; }
.member-table td:first-child { font-weight: 600; }

/* Admin sections: Accounts / Chat history / Admin log */
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-nav-item {
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line);
  font-size: .9rem; font-weight: 600; text-decoration: none; color: var(--muted);
}
.admin-nav-item:hover { color: var(--text); border-color: var(--accent); }
.admin-nav-item.is-current { background: var(--accent); border-color: var(--accent); color: #fff; }
.admin-filters .date-label { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.admin-filters input[type="date"] {
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: .85rem;
}
.chat-log-text { overflow-wrap: anywhere; min-width: 220px; }
/* Admin Accounts: Created and Last login stacked in one column */
.account-dates span[title] { display: block; line-height: 1.45; }
.account-dates .muted { display: inline-block; min-width: 5.2em; }
a.small-button { display: inline-block; text-decoration: none; }
.messages li.pm-notice { color: var(--muted); font-size: .8rem; font-style: italic; padding-bottom: 6px; }
.main-content .view > main.admin > .admin-nav { margin-top: 0; }

/* Admin panel */
.admin { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.admin h2 { margin: 0 0 12px; font-size: 1.1rem; }
.wide .top, .wide .foot { max-width: 1100px; }
.wide .flash { max-width: 1068px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 14px; color: var(--muted); }
.stats strong { color: var(--text); }
.admin-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.admin-search input, .admin-search select, .row-form input, .row-form select {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit; font-size: .9rem;
}
.admin-search input { flex: 1; min-width: 180px; }
.admin-search button, .small-button {
  padding: 7px 14px; border: 0; border-radius: 8px; background: var(--accent);
  color: #fff; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.small-button.danger { background: var(--danger); }
.small-button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
.users { width: 100%; border-collapse: collapse; font-size: .92rem; }
.users th, .users td { text-align: left; vertical-align: top; padding: 10px 8px; border-top: 1px solid var(--line); }
.users th { font-size: .8rem; color: var(--muted); font-weight: 600; border-top: 0; }
.users tr.is-banned td { background: color-mix(in srgb, var(--danger) 7%, transparent); }
.row-form { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.row-form input[name="reason"] { width: 160px; }
.users td:nth-child(2) .row-form { margin-top: 0; }
.status-active { color: var(--ok); font-weight: 600; }
.status-banned { color: var(--danger); font-weight: 600; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin-top: 14px; }
.admin-log { list-style: none; margin: 0; padding: 0; }
.admin-log li { padding: 6px 0; border-top: 1px solid var(--line); }
.admin-log li:first-child { border-top: 0; }
.foot { color: var(--muted); font-size: .8rem; padding: 24px 16px; }

/* Friends page: requests side by side (stacked on narrow screens); friends list with pictures */
.friends-requests { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: start; }
.friends-requests > .card { min-width: 0; }
@media (max-width: 720px) { .friends-requests { grid-template-columns: 1fr; } }
.person-with-pic { display: flex; align-items: center; gap: 4px; min-width: 0; }
.people--pictures li { padding: 8px 0; }

/* Games page (the lobby's main page): Create a Game icons + active games */
.games-create { margin-top: 14px; }   /* just under the "Welcome, name" heading */
.games-create h2, .games-active h2 { margin: 0 0 12px; font-size: 1.1rem; }
.games-active .count { color: var(--muted); font-weight: 400; font-size: .95rem; }
.game-icons { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 18px; }
.game-icon {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 96px;
  background: none; border: 0; padding: 4px; border-radius: 12px; color: var(--text); font: inherit; cursor: pointer;
}
.game-icon img { width: 80px; height: 80px; display: block; border-radius: 14px; }
.game-icon-label { font-size: .78rem; font-weight: 600; text-align: center; line-height: 1.25; }
.game-icon:not(.is-disabled):hover img { box-shadow: 0 0 0 3px var(--accent); }
/* Disabled (nobody can create games yet): greyed out */
.game-icon.is-disabled { cursor: not-allowed; }
.game-icon.is-disabled img { filter: grayscale(1); opacity: .45; }
.game-icon.is-disabled .game-icon-label { color: var(--muted); }
.game-cell { display: flex; align-items: center; gap: 10px; }
.game-cell img { border-radius: 6px; flex: none; }
.game-players { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.game-score { display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); font-size: .8rem; font-weight: 700; text-align: center; }

/* Game table window (game.php): same docked chat + list as the lobby */
.game-top { gap: 10px; }
.game-top-icon { border-radius: 7px; flex: none; }
.game-top-title { display: flex; gap: 6px; align-items: baseline; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-board-row { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.game-board-row > .card { margin-top: 0; }
.game-board { min-height: 160px; }
.game-table-info h2, .game-board h2 { margin: 0 0 10px; font-size: 1.1rem; }
.game-host-line { margin: 0 0 4px; }
.game-settings fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0 6px; display: grid; gap: 10px; }
.game-settings legend { font-size: .8rem; font-weight: 600; color: var(--muted); padding: 0 4px; }
.game-settings fieldset:disabled { opacity: .65; }
.game-settings input, .game-settings select {
  width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: .9rem;
}
.game-settings label { display: grid; gap: 4px; font-size: .85rem; }
.badge--host { background: #b45309; }   /* table host */
.messages li.game-system { color: var(--muted); font-style: italic; font-size: .85rem; }
.game-page .user-list li[tabindex] { cursor: context-menu; }
.context-menu {
  position: fixed; z-index: 50; min-width: 140px; padding: 4px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.context-menu button { display: block; width: 100%; text-align: left; padding: 7px 12px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; cursor: pointer; }
.context-menu button:hover, .context-menu button:focus { background: var(--accent); color: #fff; outline: none; }
.game-ended { max-width: 640px; margin: 24px auto; padding: 0 16px; }
#game-closed { margin: 0 0 12px; }
@media (max-width: 720px) { .game-board-row { grid-template-columns: 1fr; } }
/* Table settings dialog (host only) */
.settings-dialog {
  width: min(420px, calc(100vw - 32px)); padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); color: var(--text); box-shadow: 0 16px 48px rgba(0,0,0,.35);
}
.settings-dialog::backdrop { background: rgba(0,0,0,.45); }
.settings-dialog h2 { margin: 0 0 4px; font-size: 1.15rem; }
.settings-dialog fieldset { margin: 8px 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; align-items: center; margin-top: 8px; }
/* 5-Card Draw table: five seats across, evenly spaced */
.poker-seats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: start; }
.seat {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0;
  padding: 12px 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
}
.seat.is-mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.seat-pic { width: 100%; max-width: 180px; aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; background: var(--bg); }
.seat-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.seat-pic.is-empty { border: 2px solid #9ca3af; background: transparent; }   /* nobody seated: grey outline */
.seat-name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-score { font-size: .9rem; font-weight: 600; color: var(--muted); }
.seat-button { min-width: 84px; letter-spacing: .04em; }
.seat-button.danger { background: var(--danger); }
#seat-error { margin: 10px 0 0; }
@media (max-width: 720px) { .poker-seats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Game windows: header flush with the top of the window, table chat is tight and 1px smaller */
.game-page > .game-top { padding-top: 0; }
.small-button.dark-gray { background: #374151; color: #fff; }
.game-page .card, .game-page .seat, .game-page .game-board-row, .game-page .poker-seats { margin-top: 0; }
.settings-dialog { margin-top: 0; }
.settings-dialog h2, .settings-dialog fieldset, .settings-dialog form { margin-top: 0; }
.game-page .messages li { padding-top: 0; padding-bottom: 0; font-size: 15px; }
.game-page .messages li.game-system { font-size: calc(.85rem - 1px); }
.game-page .messages time { font-size: calc(.8rem - 1px); }

/* Table settings dialog: sliders and yes/no choices */
.settings-dialog { max-height: calc(100vh - 32px); overflow-y: auto; }
.setting-slider { display: grid; gap: 2px; }
.setting-slider input[type="range"] { padding: 0; border: 0; background: none; accent-color: var(--accent); }
.setting-slider input[type="range"]:disabled { opacity: .45; }
.setting-label { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 600; }
.setting-label output { color: var(--accent); font-weight: 700; }
.setting-range { display: flex; justify-content: space-between; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.setting-choices { display: flex; gap: 14px; }
.game-settings .setting-choices input { width: auto; }
/* Host's privacy button */
.small-button.lock-toggle { background: var(--ok); color: #fff; min-width: 84px; letter-spacing: .04em; }
.small-button.lock-toggle.is-locked { background: #b45309; }
.game-lock-state { color: var(--muted); }
.setting-desc { margin: -4px 0 4px; line-height: 1.35; }
/* Table settings dialog: two columns (one on narrow windows) */
.settings-dialog { width: min(760px, calc(100vw - 32px)); }
.settings-dialog fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.settings-dialog fieldset > p { grid-column: 1 / -1; margin: 0; }
.setting { display: grid; gap: 4px; align-content: start; min-width: 0; }
.setting .setting-desc { margin: 0; }
@media (max-width: 620px) { .settings-dialog fieldset { grid-template-columns: minmax(0, 1fr); } }
/* Game window: full-width bar directly above the chat and table list */
/* Poker table area: never scrolls. The game updates list sits behind everything else in it, at the bottom left
   just above the pot bar (newest at the bottom), at most 30% of the window wide. */
.game-page #main-content:has(.poker-log) { position: relative; overflow: hidden; }
.game-page #main-content:has(.poker-log) > :not(.poker-log) { position: relative; z-index: 1; }
.poker-log {
  position: absolute; left: 16px; bottom: 8px; z-index: 0; width: 30vw; max-width: 30vw; margin: 0; padding: 0;
  list-style: none; display: flex; flex-direction: column; justify-content: flex-end; pointer-events: none;
  font-size: .9rem; line-height: 1.4; color: var(--muted);
}
.poker-log li { overflow-wrap: anywhere; }
.poker-log li:last-child { color: var(--text); font-weight: 600; }   /* the newest */
.game-page .game-bar { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 16px 12px; padding: 8px 12px; }
.game-bar-icon { border-radius: 7px; flex: none; display: block; }
/* Seat boxes: picture 10% smaller, credits to the right of the name, slimmer SIT/STAND */
.seat-pic { width: 90%; max-width: 162px; }
.seat-line { display: flex; justify-content: center; align-items: baseline; gap: 8px; max-width: 100%; min-width: 0; }
.seat-line .seat-name { min-width: 0; }
.seat-line .seat-score { flex: none; white-space: nowrap; }
.seat-button { padding-top: 3.5px; padding-bottom: 3.5px; }
.small-button.seat-button { padding-top: 3.5px; padding-bottom: 3.5px; }
/* Game windows: box padding halved; read-only settings stay easy to read */
.game-page .card { padding: 8px; }
.game-page .game-bar { padding: 4px 6px; }
.game-page .seat { padding: 6px 4px; }
.settings-dialog { padding: 9px 10px; }
.settings-dialog fieldset { padding: 5px 6px; }
.settings-dialog fieldset:disabled { opacity: 1; }
/* BURN control and sticky-seat dialogs */
.burn-box { display: inline-flex; align-items: center; gap: 4px; }
.burn-box select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: .9rem; }
.confirm-dialog { width: min(420px, calc(100vw - 32px)); }
.confirm-dialog p { margin: 6px 0; }
.dialog-actions .dialog-left { margin-right: auto; }
.game-page .seat-name { cursor: default; }
/* "hidden" must win over the display rules above */
.burn-box[hidden], .context-menu button[hidden], .context-menu[hidden] { display: none; }
/* Your own seat is outlined gray; blue when it's your turn */
.seat.is-mine { border-color: #9ca3af; box-shadow: 0 0 0 1px #9ca3af; }
.seat.is-mine.is-turn { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
/* Whose turn it is (everyone sees it): orange outline, over the gray "your seat" one. */
.poker-seats .seat.is-turn-seat { border-color: #f97316; box-shadow: 0 0 0 2px #f97316; }
/* LookBack window: one picture fits without scrolling; earlier ones are below it */
.seat-pic img { cursor: zoom-in; }
body.look-page { margin: 0; }
.look { padding: 6px 8px 12px; text-align: center; }
.look-title { margin: 0 0 6px; font-weight: 700; line-height: 22px; }
.look-pictures { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.look-picture { margin: 0; }
.look-picture img { display: block; height: min(625px, calc(100vh - 62px)); width: auto; max-width: 100%; border-radius: 8px; }
.look-picture figcaption { font-size: .8rem; color: var(--muted); line-height: 18px; }
/* Sign-up form's hidden bot trap */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Time to Act */
.seat-timer { min-height: 1.3em; line-height: 1.3em; font-size: .85rem; font-weight: 700; color: var(--accent); }
.setting-check { font-size: .85rem; font-weight: 600; }
.game-settings .setting-check input { width: auto; }
.setting-slider input[type="range"]:disabled + .setting-range { opacity: .45; }
.setting-group { grid-column: 1 / -1; margin: 6px 0 -4px; font-size: .95rem; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
/* BURN: one button showing the amount, with an arrow that opens the list */
.burn-box { gap: 0; }
.small-button.burn-main { border-radius: 8px 0 0 8px; }
.small-button.burn-arrow { border-radius: 0 8px 8px 0; padding-left: 8px; padding-right: 8px; border-left: 1px solid rgba(255, 255, 255, .45); }
.small-button.burn-main:disabled, .small-button.burn-arrow:disabled { opacity: .5; cursor: not-allowed; }
.burn-menu { min-width: 56px; }
.burn-menu button { padding: 2px 12px; text-align: center; }
/* LOCKED button with its invite arrow, and the invite list */
.small-button.lock-toggle.has-arrow { border-radius: 8px 0 0 8px; }
.small-button.lock-arrow { background: #b45309; color: #fff; border-radius: 0 8px 8px 0; padding-left: 8px; padding-right: 8px; border-left: 1px solid rgba(255, 255, 255, .45); }
#invite-search { width: 100%; box-sizing: border-box; margin: 6px 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: .9rem; }
.invite-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.invite-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 2px; border-top: 1px solid var(--line); }
.invite-list li:first-child { border-top: 0; }
.invite-list .small-button { padding-top: 3px; padding-bottom: 3px; }
/* Right-click menu sections */
.menu-section[hidden] { display: none; }
.menu-section + .menu-section { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.menu-title { padding: 2px 12px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
/* Short messages at the bottom of the window */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; max-width: min(480px, calc(100vw - 32px)); padding: 9px 14px; border-radius: 10px; background: #1f2937; color: #fff; border: 1px solid var(--ok); box-shadow: 0 8px 24px rgba(0,0,0,.3); font-size: .9rem; }
.toast--error { border-color: var(--danger); }
/* Right-click menus: options 15% smaller */
#user-menu button { font-size: .85rem; }
/* Result of a chat command (/coinflip …) */
.messages li.chat-command { font-style: italic; color: var(--muted); }
/* Multi-line command results (/help) */
.messages li.chat-command span, .messages li.game-system span { white-space: pre-line; }
/* Profile picture page: gallery and permanent/temporary choice */
.picture-heading { margin: 16px 0 8px; font-size: 1.05rem; }
.picture-heading .count { color: var(--muted); font-weight: 400; }
.picture-grid { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.picture-grid li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; border: 2px solid var(--line); border-radius: 10px; }
.picture-grid li.is-showing { border-color: var(--accent); }
.picture-grid label { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.picture-grid img { border-radius: 6px; display: block; }
.picture-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.temp-fields { display: inline-flex; gap: 10px; }
.temp-fields select { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.picture-mode:has(input[value="permanent"]:checked) .temp-fields { display: none; }
.temp-picture { margin: 12px 0; padding: 8px 12px; border-left: 4px solid var(--accent); background: var(--bg); border-radius: 6px; }
.temp-picture p { margin: 3px 0; }
/* 5-Card Draw table */
.pot-display { font-weight: 700; font-size: 1.05rem; }
.seat.is-winner { border-color: #22c55e; box-shadow: 0 0 0 1px #22c55e; }
.seat-rank { font-size: .82rem; font-weight: 700; margin-bottom: 4px; }
.seat-rank.seat-action { font-size: 1.15rem; letter-spacing: .01em; }   /* Checked, Bet 5, Folded, Sitting Out … */
/* Showdown hand under a seat: fanned left to right, each card overlapping the next with its corner index showing
   (up to 30px apart; closer together in a narrow column). */
.seat-stack { display: grid; grid-template-columns: repeat(4, minmax(6px, 30px)) auto; justify-content: center; }
.seat-stack .card-face { grid-row: 1; box-shadow: -2px 0 4px rgba(0, 0, 0, .3); }
.poker-center { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 12px 0 0; }
.poker-status { margin: 0; font-weight: 600; min-height: 1.4em; }
/* DEAL NEW HAND: centred in the bar, same size as SETTINGS */
.game-page .game-bar { position: relative; }
.deal-button { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
@media (max-width: 720px) { .deal-button { position: static; transform: none; } }
/* READY / UNREADY button (same place): UNREADY is an outline in the READY green. */
.deal-button { min-width: 96px; }
.deal-button.is-ready { background: transparent; color: #22c55e; box-shadow: inset 0 0 0 2px #22c55e; }
/* The READY badge: green outline and green text, in the SIT/STAND button's place (that button is taken out). */
.seat-col > .ready-badge {
  align-self: center; margin-top: 6px; box-sizing: border-box; min-width: 84px; padding: 1px 12px; text-align: center;
  border: 2px solid #22c55e; border-radius: 999px; color: #22c55e; font-weight: 800; font-size: .82rem;
  letter-spacing: .08em; line-height: 1.5;
}
.seat-col > .ready-badge[hidden] { display: none; }
.seat-col.is-ready > .seat-button { display: none; }
/* SIT / STAND / REMOVE and the READY badge are exactly the same height, so nothing below them moves. */
.seat-col > .seat-button, .seat-col > .ready-badge { box-sizing: border-box; height: 29px; }
.seat-col > .ready-badge { display: flex; align-items: center; justify-content: center; padding-top: 0; padding-bottom: 0; }
.seat-col > .ready-badge[hidden] { display: none; }
.poker-hand { display: flex; gap: 8px; justify-content: center; min-height: 0; }
.poker-card { display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* Playing cards: images from /assets/cards/<design>/ (160x224), shown at most 80px wide. */
.card-face { display: block; width: 80px; max-width: 80px; height: auto; aspect-ratio: 160 / 224; border-radius: 5px; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); user-select: none; -webkit-user-drag: none; }
.small-button.card-draw { padding: 2px 10px; font-size: .78rem; }
.poker-actions { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.poker-card--pick { padding: 0; border: 0; background: none; border-radius: 8px; cursor: pointer; }
.poker-card--pick:hover .card-face, .poker-card--pick:focus-visible .card-face { outline: 3px solid var(--accent); outline-offset: 1px; }
/* Showdown: hand name and cards directly under the seat box */
.seat-col { display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.seat-show { margin-top: 6px; text-align: center; }
/* Time to Act: beside the pot, after a white divider */
.turn-timer { padding-left: 10px; border-left: 1px solid #fff; font-weight: 700; font-size: 1.05rem; color: var(--text); line-height: 1.2; }
.turn-timer[hidden] { display: none; }
/* Seat boxes keep their size: a hidden SIT/STAND/REMOVE button still holds its space */
.seat-button[hidden] { display: inline-block; visibility: hidden; }
/* SIT / STAND below the seat box (space always reserved) */
.seat-col > .seat-button { align-self: center; margin-top: 6px; }
/* Dealer: white circle with a black D, over the seat box corner */
.seat { position: relative; }
.seat-pic-row { position: relative; display: flex; justify-content: center; width: 100%; }
.dealer-chip { position: absolute; right: -10px; bottom: 10px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #000; font-size: .85rem; font-weight: 800; line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,.5); transform: rotate(10deg); }
.dealer-chip[hidden] { display: none; }
/* BET / RAISE amounts: can be up to 50, so the list scrolls */
.bet-menu { max-height: 260px; overflow-y: auto; }
/* "At this table": names 6px apart, 15% smaller */
.game-page .user-list li { padding: 3px 2px; font-size: .85em; line-height: 1.2; }

/* PicSet pictures can't be selected, dragged, long-pressed to save, or printed (see assets/protect.js). */
img[src*="/picset-img.php"], img[src*="/game-pic.php"] {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
@media print {
  img[src*="/picset-img.php"], img[src*="/game-pic.php"] { visibility: hidden !important; }
}

/* "Take a picture" (assets/camera.js): the outline button beside Upload, and the live camera dialog. */
.pf-actions button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.camera-dialog {
  width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 16px 18px;
  color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px;
}
.camera-dialog::backdrop { background: rgba(0,0,0,.6); }
.camera-dialog h2 { margin: 0 0 12px; font-size: 1.15rem; }
.camera-stage { display: flex; justify-content: center; background: #000; border-radius: 8px; overflow: hidden; }
.camera-video, .camera-shot { display: block; max-width: 100%; max-height: 60vh; }
.camera-video[hidden], .camera-shot[hidden] { display: none; }
.camera-video.is-mirrored { transform: scaleX(-1); }
.camera-msg { min-height: 1.3em; margin: 10px 0; }
.camera-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.camera-actions button:not(.link-button) {
  padding: 10px 16px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent);
  color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.camera-actions button.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.camera-actions button:disabled { opacity: .5; cursor: not-allowed; }
.camera-actions .link-button { margin-left: auto; }
/* Camera Delay: the countdown number over the preview, and the flash when the picture is taken. */
.camera-stage { position: relative; }
.camera-count {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;
  font: 800 clamp(72px, 20vw, 168px)/1 system-ui, sans-serif; color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.85);
}
.camera-count[hidden] { display: none; }
.camera-count.is-tick { animation: camera-tick 1s ease-out; }
@keyframes camera-tick { from { transform: scale(1.35); opacity: 1; } to { transform: scale(1); opacity: .75; } }
.camera-stage.is-flash::after { content: ""; position: absolute; inset: 0; background: #fff; pointer-events: none; animation: camera-flash .45s ease-out forwards; }
@keyframes camera-flash { from { opacity: .9; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .camera-count.is-tick, .camera-stage.is-flash::after { animation: none; opacity: 0; } }
.camera-delay { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; }
.camera-delay[hidden] { display: none; }
.camera-delay select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; }

/* Site Settings (admin-site.php) */
.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; }
.site-status-choice { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-status-choice label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.game-access { width: 100%; border-collapse: collapse; }
.game-access th, .game-access td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.game-access tbody th { font-weight: 600; }
.game-access-name { display: inline-flex; align-items: center; gap: 10px; }
.game-access-name img { border-radius: 8px; }
.game-access select { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; }
.game-access select:disabled { opacity: .55; }
.game-access td .small { display: block; margin-top: 4px; }
.maintenance-note { margin: 0 0 14px; }
.pf-actions button.danger-button { background: var(--danger); }
.site-switches th { width: 40%; } .site-switches td .small { display: block; margin-top: 4px; }

/* Achievement toasts (assets/achievements.js): lower right, only the member who earned it sees them.
   Icon 60px on the left; name (top, level with the icon's top) and description beside it; a timer bar
   along the bottom shrinks over the 6 s it's shown (paused while the pointer is on it). Click = profile. */
.ach-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.ach-toast {
  pointer-events: auto; display: block; width: min(340px, calc(100vw - 32px)); padding: 0; margin: 0; overflow: hidden;
  font: inherit; text-align: left; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35); cursor: pointer; animation: ach-in .3s ease-out;
  transition: opacity .3s, transform .3s, border-color .15s;
}
.ach-toast:hover { border-color: var(--accent); }
.ach-toast:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ach-toast.is-leaving { opacity: 0; transform: translateX(24px); }
.ach-toast-body { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; }
.ach-toast-icon { flex: none; display: block; width: 60px; height: 60px; border-radius: 12px; }
.ach-toast-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ach-toast-name { display: block; margin-top: -2px; font-size: 1.02rem; line-height: 1.2; font-weight: 700; }
.ach-toast-desc { display: block; font-size: .87rem; line-height: 1.35; color: var(--muted); }
.ach-toast-timer { display: block; height: 4px; background: var(--line); }
.ach-toast-bar { display: block; height: 100%; background: var(--accent); transform-origin: left center; animation: ach-timer 6s linear forwards; }
.ach-toast.is-paused .ach-toast-bar { animation-play-state: paused; }
@keyframes ach-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes ach-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ach-toast { animation: none; } .ach-toast.is-leaving { transform: none; } }

/* Profile tabs (profile.php): Details / Achievements, below the picture. */
.profile-tabs { display: flex; gap: 4px; margin: 18px 0 14px; border-bottom: 1px solid var(--line); }
.profile-tabs [role="tab"] {
  margin-bottom: -1px; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer;
  background: none; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0;
}
.profile-tabs [role="tab"]:hover { color: var(--text); }
.profile-tabs [role="tab"][aria-selected="true"] { color: var(--text); background: var(--card); border-color: var(--line); box-shadow: 0 1px 0 var(--card); }
.profile-tabs [role="tab"]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Each achievement is drawn like its toast (.ach-toast-body): icon 60px left, name level with the icon's top,
   description under it, then the date earned. Not earned yet: no date, the whole block dimmed. */
.ach-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }   /* 2 columns */
@media (max-width: 480px) { .ach-list { grid-template-columns: minmax(0, 1fr); } }
.ach-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.12); scroll-margin: 20px; }
.ach-icon { flex: none; display: block; width: 60px; height: 60px; border-radius: 12px; }
.ach-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ach-name { display: block; margin-top: -2px; font-size: 1.02rem; line-height: 1.2; font-weight: 700; }
.ach-desc { display: block; font-size: .87rem; line-height: 1.35; color: var(--muted); }
.ach-when { display: block; font-size: .8rem; font-style: italic; color: var(--muted); }
.ach-item.is-locked { opacity: .4; box-shadow: none; }
.ach-item.is-locked .ach-icon { filter: grayscale(1); }
.ach-count { margin-left: 4px; font-weight: 600; color: var(--muted); }
.ach-item.is-target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.ach-category + .ach-category { margin-top: 22px; }
.ach-category-title { display: flex; align-items: center; gap: 4px; margin: 0 0 10px; font-size: 1rem; }

/* Tiered achievements (5 tiers: 1, 5, 10, 25, 50 times): 5 stars across the bottom of the icon, on a soft dark band.
   Not reached = embossed (pressed into the icon); reached = embossed gold. Profile and toast share the markup. */
.ach-icon-wrap { position: relative; flex: none; display: block; width: 60px; height: 60px; }
.ach-stars {
  position: absolute; left: 0; right: 0; bottom: 0; height: 15px; display: flex; justify-content: center; align-items: center; gap: 1px;
  border-radius: 0 0 12px 12px; background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.28));
}
.ach-star {
  display: block; width: 10px; height: 10px; background: rgba(0,0,0,.34);
  clip-path: polygon(50% 0%, 61.8% 35.4%, 100% 35.4%, 69.1% 57.3%, 80.9% 92.7%, 50% 70.8%, 19.1% 92.7%, 30.9% 57.3%, 0% 35.4%, 38.2% 35.4%);
  filter: drop-shadow(0 .6px 0 rgba(255,255,255,.45));   /* light catching the lower edge: pressed in */
}
.ach-star.is-gold {
  background: linear-gradient(160deg, #fff6c2 0%, #ffd34d 40%, #e2a20c 75%, #a86c00 100%);
  filter: drop-shadow(0 0 .4px rgba(70,40,0,.9)) drop-shadow(0 .8px .3px rgba(0,0,0,.55)) drop-shadow(0 -.4px 0 rgba(255,255,255,.55));   /* raised gold, thin outline */
}

/* Achievements with a numerical goal (tiers, "10 friends"): a progress bar along the bottom, the numbers to its right. */
.ach-text { flex: 1; }
.ach-progress { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ach-bar { flex: 1; height: 6px; border-radius: 999px; overflow: hidden; background: var(--line); }
.ach-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.ach-progress-num { flex: none; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Login / sign-up cards: Log in | Sign up tabs on top (auth_tabs() in layout.php). The login page is two columns
   (form | "or" | New to AdultsLosing? + Create an account) while sign-ups are open; one column under 640px. */
.auth-tabs { display: flex; margin: -4px 0 18px; border-bottom: 1px solid var(--line); }
.auth-tab {
  flex: 1; padding: 10px 12px; margin-bottom: -1px; text-align: center; font-weight: 700; font-size: 1.05rem;
  color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.is-current { color: var(--text); border-bottom-color: var(--accent); }
.auth--split { max-width: 760px; }
.auth--split .auth-split { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0 24px; align-items: stretch; }
.auth-or { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; width: 1px; background: var(--line); }
.auth-join { display: flex; flex-direction: column; justify-content: center; }
.auth-join h2 { margin: 0 0 8px; font-size: 1.2rem; }
.auth-join p { margin: 0 0 10px; }
.auth-join-button {
  display: block; margin-top: 6px; padding: 11px 18px; text-align: center; font-weight: 600; text-decoration: none;
  color: var(--accent); border: 2px solid var(--accent); border-radius: 8px; background: transparent;
}
.auth-join-button:hover, .auth-join-button:focus-visible { color: #fff; background: var(--accent); }
@media (max-width: 640px) {
  .auth--split .auth-split { grid-template-columns: minmax(0, 1fr); }
  .auth-or { flex-direction: row; margin: 18px 0 14px; }
  .auth-or::before, .auth-or::after { width: auto; height: 1px; }
}

/* Admin Stats (admin-stats.php) */
.stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.stats-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.stats-num { font-size: 1.8rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats-label { font-weight: 600; }
.stats-since { font-size: .8rem; color: var(--muted); }
.stats-pics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px; }
.stats-pic { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.stats-pic img { display: block; width: 96px; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.stats-pic-count { font-weight: 700; font-size: .9rem; }
.stats-pic-num { font-size: .8rem; color: var(--muted); max-width: 104px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Emoji (assets/emoji.js): the 😊 button beside each chat box, its picker, and the :shortcode suggestions. */
.chat-form .emoji-button { flex: none; padding: 0 8px; font-size: 1.15rem; line-height: 1; background: transparent; border: 1px solid var(--line); border-radius: 6px; color: inherit; cursor: pointer; }
.chat-form .emoji-button:hover:not(:disabled), .chat-form .emoji-button[aria-expanded="true"] { background: var(--line); }
.chat-form .emoji-button:disabled { opacity: .45; cursor: default; }
.emoji-pop { position: fixed; z-index: 1000; border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, .35); overflow: hidden; }
.emoji-pop emoji-picker { width: 100%; --border-radius: 10px; --emoji-size: 1.4rem; --num-columns: 8; }
.emoji-suggest { position: fixed; z-index: 1000; margin: 0; padding: 4px; list-style: none; background: var(--card, #fff); color: var(--text, inherit);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.emoji-suggest li { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: .9rem; }
.emoji-suggest li.is-active, .emoji-suggest li:hover { background: var(--line); }
.emoji-suggest-glyph { font-size: 1.25rem; width: 1.6rem; text-align: center; }
