/* The team board (templates/team_board.html). Built on library.css: same warm room, same cards, same gold. */

.board { max-width: 880px; margin: 0 auto; padding: 0 20px 60px; }
.board-head { text-align: center; padding: 18px 0 8px; }
.board-head h1, .board-gate h1 { margin: 0; font: 600 clamp(2rem, 5vw, 2.8rem)/1.1 var(--serif); }
.board-head .lede { margin-bottom: 22px; }
.gold { color: var(--gold); font-style: italic; }

/* --- not on the team / not logged in --- */
.board-gate { max-width: 520px; margin: 40px auto; padding: 36px 28px; text-align: center; background: var(--card);
    border: 1px solid var(--line); border-radius: var(--radius); }
.board-gate p { color: var(--muted); margin: 14px 0 22px; }
.board-gate a:not(.btn):not(.ghost) { color: var(--gold); }
.gate-ico { width: 44px; height: 44px; margin-bottom: 10px; }

/* --- writing a post --- */
.composer { margin: 0 0 18px; }
.composer > details > summary { list-style: none; width: fit-content; margin: 0 auto; }
.composer > details > summary::-webkit-details-marker { display: none; }
.composer > details[open] > summary { margin-bottom: 14px; }
#new-post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
    display: grid; gap: 14px; animation: rise 0.45s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.kinds { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kinds legend { width: 100%; margin-bottom: 8px; color: var(--muted); font-size: 0.88rem; }
.kinds label { cursor: pointer; }
.kinds input { position: absolute; opacity: 0; pointer-events: none; }
.kinds span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
    border: 1px solid var(--line); transition: border-color 0.2s, background 0.2s; }
.kinds input:checked + span { border-color: var(--gold); background: rgba(255, 184, 0, 0.12); }
.kinds input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.field { display: grid; gap: 6px; font-size: 0.88rem; color: var(--muted); }
.field input, .field textarea, .reply-form textarea, .status-pick select {
    width: 100%; font: 400 1rem var(--sans); color: var(--text); background: var(--bg-2);
    border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.field textarea, .reply-form textarea { resize: vertical; min-height: 44px; line-height: 1.5; }
.field input:focus, .field textarea:focus, .reply-form textarea:focus, .status-pick select:focus {
    outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.15); }
.form-actions { display: flex; justify-content: flex-end; }
.form-error { margin: 0; color: var(--danger); font-size: 0.9rem; }
.btn.small { padding: 7px 16px; font-size: 0.88rem; }
.btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* --- filters --- */
.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
    padding: 6px 13px; font: 500 0.86rem var(--sans); cursor: pointer; transition: all 0.2s; }
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.on { color: var(--ink); background: linear-gradient(135deg, var(--gold), var(--gold-2)); border-color: transparent; }
.show-done { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.88rem; cursor: pointer; }
.show-done input { accent-color: var(--gold); }
.board-empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* --- posts --- */
.posts { display: grid; gap: 10px; }
.post { --accent: var(--gold); background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent);
    border-radius: 16px; transition: border-color 0.2s, background 0.2s; }
.post:hover { background: var(--card-hover); }
.post.pinned { border-color: rgba(255, 184, 0, 0.45); border-left-color: var(--accent); }
.post.kind-bug { --accent: var(--danger); }
.post.kind-fix { --accent: var(--ok); }
.post.kind-maintenance { --accent: #8fb3ff; }
.post.status-fixed, .post.status-wont_do { opacity: 0.72; }
/* a post that arrived while you were looking slides in with a soft gold glow that fades */
.post.fresh { animation: arrive 2.4s var(--ease); }
@keyframes arrive {
    0% { opacity: 0; transform: translateY(-6px); box-shadow: 0 0 0 0 rgba(255, 184, 0, 0); }
    15% { opacity: 1; transform: none; box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.45), 0 0 26px rgba(255, 184, 0, 0.35); }
    100% { box-shadow: 0 0 0 0 rgba(255, 184, 0, 0); }
}
@media (prefers-reduced-motion: reduce) { .post.fresh { animation: none; } }
.post-head { list-style: none; cursor: pointer; padding: 14px 16px; display: grid; gap: 4px 12px;
    grid-template-columns: auto 1fr auto; grid-template-areas: "kind title tags" "kind meta tags"; align-items: center; }
.post-head::-webkit-details-marker { display: none; }
.post-kind { grid-area: kind; display: grid; justify-items: center; gap: 2px; min-width: 64px; font-size: 0.72rem;
    color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.post-kind .ico { width: 22px; height: 22px; }
.post-title { grid-area: title; font: 600 1.05rem/1.35 var(--sans); overflow-wrap: anywhere; }
.post-no { color: var(--accent); font-family: var(--serif); font-style: italic; }
.post-meta { grid-area: meta; color: var(--muted); font-size: 0.84rem; }
.post-tags { grid-area: tags; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.status-chip, .pin-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
    font-size: 0.76rem; font-weight: 700; white-space: nowrap; border: 1px solid var(--line-strong); }
.pin-chip { color: var(--gold); border-color: rgba(255, 184, 0, 0.4); }
.pin-chip .ico { width: 13px; height: 13px; }
.s-open { color: var(--text); }
.s-in_progress { color: #ffcf4a; border-color: rgba(255, 207, 74, 0.45); }
.s-needs_testing { color: #8fb3ff; border-color: rgba(143, 179, 255, 0.45); }
.s-fixed { color: var(--ok); border-color: rgba(116, 217, 159, 0.45); }
.s-wont_do { color: var(--muted); }

.post-inside { padding: 0 16px 16px 92px; display: grid; gap: 12px; }
.post-body, .reply-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.status-note { margin: 0; color: var(--muted); font-size: 0.84rem; font-style: italic; }
.post-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line); }
.status-pick { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.86rem; }
.status-pick select { width: auto; padding: 6px 10px; font-size: 0.9rem; }
.ghost.small { padding: 6px 13px; font-size: 0.86rem; }
.ghost.danger { color: var(--danger); }
.replies { display: grid; gap: 10px; }
.reply { padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.reply-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; font-size: 0.9rem; }
.reply-when { color: var(--muted); font-size: 0.8rem; }
.link-btn { margin-left: auto; background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.8rem; cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--danger); }
.reply-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.reply-form .form-error { grid-column: 1 / -1; }

@media (max-width: 640px) {
    .post-head { grid-template-columns: auto 1fr; grid-template-areas: "kind title" "kind meta" "tags tags"; }
    .post-tags { justify-content: flex-start; }
    .post-kind { min-width: 48px; }
    .post-inside { padding: 0 14px 14px; }
    .reply-form { grid-template-columns: 1fr; }
    .reply-form .btn { justify-self: end; }
}

/* --- Board / Chat tabs --- */
.tabs { display: flex; gap: 4px; width: fit-content; margin: 0 auto 20px; padding: 4px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 20px; border: 0; border-radius: 999px;
    background: transparent; color: var(--muted); font: 600 0.95rem var(--sans); cursor: pointer; transition: all 0.25s var(--ease); }
.tab:hover { color: var(--text); }
.tab.on { color: var(--ink); background: linear-gradient(135deg, var(--gold), var(--gold-2)); box-shadow: 0 6px 16px rgba(255, 150, 0, 0.25); }
.tab.on .ico { stroke: currentColor; }                              /* dark ink on the gold, like .ico-ink */
.tab.on .ico .f { fill: currentColor; fill-opacity: 0.2; }
.tab.on .ico .solid { fill: currentColor; }
.tab .ico { width: 17px; height: 17px; }
.tab-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff;
    font-size: 0.72rem; font-weight: 700; display: inline-grid; place-items: center; animation: rise 0.3s var(--ease); }
.tab-badge[hidden] { display: none; }

/* --- the general chat --- */
.chat { position: relative; display: grid; grid-template-rows: 1fr auto auto auto; min-height: 380px;
    height: min(calc(100dvh - 250px), 720px);                     /* the send box always fits on screen */
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-log { overflow-y: auto; padding: 16px 18px 8px; display: flex; flex-direction: column; gap: 2px; scroll-behavior: smooth; }
.chat-empty { margin: auto; color: var(--muted); }
.msg { position: relative; max-width: 78%; align-self: flex-start; margin-top: 10px; }
.msg.grouped { margin-top: 2px; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg-top { display: flex; align-items: baseline; gap: 8px; margin: 0 4px 3px; font-size: 0.85rem; }
.msg.mine .msg-top { justify-content: flex-end; }
.msg-when { color: var(--muted); font-size: 0.76rem; }
.msg-body { display: inline-block; margin: 0; padding: 8px 13px; border-radius: 16px 16px 16px 6px; text-align: left;
    background: var(--bg-2); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.msg.mine .msg-body { border-radius: 16px 16px 6px 16px; background: rgba(255, 184, 0, 0.13); border-color: rgba(255, 184, 0, 0.3); }
.post-link { color: var(--gold); font-weight: 700; text-decoration: none; }
.post-link:hover { text-decoration: underline; }
.msg-del { position: absolute; top: 50%; transform: translateY(-50%); right: -26px; width: 22px; height: 22px; padding: 0;
    border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1rem; line-height: 1;
    cursor: pointer; opacity: 0; transition: opacity 0.2s; }
.msg.mine .msg-del { right: auto; left: -26px; }
.msg:hover .msg-del, .msg-del:focus-visible { opacity: 1; }
.msg-del:hover { color: var(--danger); }
.new-msgs { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px;
    border: 0; background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: var(--ink); font: 700 0.82rem var(--sans);
    cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); animation: rise 0.3s var(--ease); }
.new-msgs[hidden] { display: none; }
.chat-form { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: end; padding: 12px; border-top: 1px solid var(--line); }
.chat-form textarea { width: 100%; resize: none; overflow-y: hidden; min-height: 44px; max-height: 140px; font: 400 1rem/1.45 var(--sans); color: var(--text);
    background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.chat-form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.15); }
/* the hint stays on one line, however narrow the box (Bliss's phone, 2026-10-04: it wrapped and got cut in half) */
.chat-form textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat .form-error { padding: 0 14px 10px; }

/* --- Liora's emojis in the chat (Bliss, 2026-10-04) --- */
.emoji { width: 1.45em; height: 1.45em; vertical-align: -0.38em; margin: 0 1px; object-fit: contain; }
.msg .msg-body.jumbo, .msg.mine .msg-body.jumbo { background: transparent; border-color: transparent; padding: 2px 0; }
.msg-body.jumbo .emoji { width: 48px; height: 48px; vertical-align: middle; }
.emoji-btn { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
    background: transparent; border: 1px solid var(--line); transition: transform 0.25s var(--ease), border-color 0.2s, background 0.2s; }
.emoji-btn img { width: 30px; height: 30px; filter: grayscale(0.35) opacity(0.85); transition: filter 0.2s; }
.emoji-btn:hover, .emoji-btn[aria-expanded="true"] { border-color: var(--gold); background: rgba(255, 184, 0, 0.1); transform: scale(1.06); }
.emoji-btn:hover img, .emoji-btn[aria-expanded="true"] img { filter: none; }
/* a tray between the messages and the message bar (Bliss, 2026-10-04: floating, it covered the sender's bubbles):
   the messages make room for it instead of hiding behind it */
.emoji-panel { height: 268px; margin: 0 12px; display: grid; grid-template-rows: auto auto 1fr; background: var(--bg-2);
    border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden; animation: tray 0.35s var(--ease); }
@keyframes tray { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.chat:has(.emoji-panel:not([hidden])) .new-msgs { bottom: 350px; }
.emoji-panel[hidden] { display: none; }
.emoji-search { margin: 10px 10px 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
    color: var(--text); font: 400 0.95rem var(--sans); }
.emoji-search:focus { outline: none; border-color: var(--gold); }
.emoji-tabs { display: flex; gap: 2px; padding: 0 8px 6px; border-bottom: 1px solid var(--line); }
.emoji-tab { flex: 1; height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
    display: grid; place-items: center; opacity: 0.55; transition: opacity 0.2s, background 0.2s; }
.emoji-tab:hover { opacity: 0.9; }
.emoji-tab.on { opacity: 1; background: rgba(255, 184, 0, 0.14); }
.emoji-tab-img { width: 26px; height: 26px; }
.emoji-grid { overflow-y: auto; padding: 6px 8px 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    align-content: start; gap: 2px; }
.emoji-heading { grid-column: 1 / -1; margin: 4px 4px 2px; color: var(--muted); font-size: 0.76rem; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase; }
.emoji-cell { aspect-ratio: 1; padding: 4px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
    display: grid; place-items: center; transition: background 0.15s, transform 0.15s; }
.emoji-cell:hover, .emoji-cell:focus-visible { background: rgba(255, 184, 0, 0.14); transform: scale(1.1); outline: none; }
.emoji-cell-img { width: 100%; height: 100%; max-width: 40px; max-height: 40px; }

@media (max-width: 640px) {
    .emoji-panel { margin: 0 8px; height: min(40vh, 300px); }
    .emoji-grid { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
    .chat-form { gap: 6px; padding: 10px; }
    .chat-form textarea { font-size: 16px; padding: 10px; }      /* 16px: iPhones don't zoom in when you tap it */
    .chat-form .btn { padding: 10px 16px; }
    .emoji-btn { width: 42px; height: 42px; }
}

@media (max-width: 640px) {
    .chat { height: calc(100dvh - 230px); min-height: 340px; }
    .msg { max-width: 88%; }
    .msg-del { opacity: 0.6; }                         /* no hover on phones */
    .tab { padding: 8px 16px; }
}

/* --- the Owners' Lounge (templates/lounge.html) --- */
.board-gate .house-rules { text-align: left; margin: 0 0 18px; padding: 16px 18px 16px 34px; border-radius: 16px;
    background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font-size: 0.93rem; line-height: 1.55; }
.house-rules li + li { margin-top: 8px; }
.house-rules code { font-size: 0.85em; color: var(--gold); }
.board-gate:has(.house-rules) { max-width: 640px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; text-align: left; color: var(--text); font-size: 0.93rem; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold); flex-shrink: 0; }
.check .ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: 2px; }
.check.agree { padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); }
.age-picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 4px; }
.age-pick { min-width: 120px; padding: 10px 18px; font-weight: 600; }
.age-pick:hover { border-color: var(--gold); color: var(--gold); }
.age-pick.on { border-color: var(--gold); color: var(--ink); background: linear-gradient(135deg, var(--gold), var(--gold-2)); }
.accept-btn { margin-top: 16px; min-width: 180px; }
.accept-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }
.board-gate .fine { margin: 10px 0 0; font-size: 0.82rem; }
.reminder { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 16px; color: var(--muted); font-size: 0.88rem; }
.reminder .ico { width: 16px; height: 16px; }
.field select { width: 100%; font: 400 1rem var(--sans); color: var(--text); background: var(--bg-2); border: 1px solid var(--line);
    border-radius: 12px; padding: 10px 12px; }
.by-name { font-weight: 700; color: var(--text); }
.role-chip { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 600;
    color: var(--muted); border: 1px solid var(--line-strong); white-space: nowrap; vertical-align: 1px; }
.role-chip.team { color: var(--ink); background: linear-gradient(135deg, var(--gold), var(--gold-2)); border-color: transparent; }
.role-chip.age { color: #8fb3ff; border-color: rgba(143, 179, 255, 0.45); }
.private-chip { color: #c9a7ff; border-color: rgba(201, 167, 255, 0.45); }
.twin-link { width: fit-content; color: var(--gold); font-size: 0.88rem; font-weight: 600; text-decoration: none; }
.twin-link::before { content: "↗ "; }
.twin-link:hover { text-decoration: underline; }

/* --- the Lounge chat: opt-in, rooms, reporting (Bliss, 2026-10-04) --- */
.chat:has(.chat-head) { grid-template-rows: auto 1fr auto auto auto; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.room-name { font-weight: 700; color: var(--gold); }
.room-pick { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.room-pick[hidden] { display: none; }
.room-pick select { font: 500 0.85rem var(--sans); color: var(--text); background: var(--bg-2); border: 1px solid var(--line);
    border-radius: 8px; padding: 4px 8px; }
.chat-head .link-btn { margin-left: auto; font-size: 0.82rem; }
.chat-optin { max-width: 640px; }
.chat-optin h2 { margin: 0 0 6px; font: 600 1.7rem/1.2 var(--serif); }
.chat-optin .btn { margin-top: 14px; }
.chat-optin .btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.msg-report { display: block; margin: 2px 4px 0; padding: 0; border: 0; background: none; color: var(--muted); font: 500 0.72rem var(--sans);
    cursor: pointer; opacity: 0; transition: opacity 0.2s, color 0.2s; }
.msg.mine .msg-report { margin-left: auto; }
.msg:hover .msg-report, .msg-report:focus-visible { opacity: 1; }
.msg-report:hover { color: var(--danger); }
.msg-top .role-chip { margin-left: 0; }
.msg-top { flex-wrap: wrap; }
@media (max-width: 640px) {
    .msg-report { opacity: 0.6; }                    /* no hover on phones */
    .chat-head { flex-wrap: wrap; gap: 8px; }
}
