* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; margin: 0; color: #1c2733; background: #f7f5ef; }
header { padding: 12px 18px 10px; background: #123c3c; color: #fff; }
header a { color: #fff; text-decoration: none; }
.headrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.brand { font-weight: 700; font-size: 1.15rem; color: #fff; }
.tabnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
a.tab { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 7px 7px 6px; border-radius: 10px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); color: #eaf4f2; font-size: 0.78rem; font-weight: 600; line-height: 1.15; text-align: center; }
a.tab:hover { background: rgba(255,255,255,0.14); color: #fff; }
a.tab img { display: block; width: 54px; height: 40px; object-fit: cover; border-radius: 6px; }
.who a { color: #cfe3df; }
.who a:hover { color: #fff; }
.logo { height: 30px; width: 30px; aspect-ratio: 1; vertical-align: middle; margin-right: 8px; border-radius: 6px; }
.searchbox { margin: 0; }
.searchbox input { width: 150px; padding: 5px 8px; margin: 0; }
.howcard { background: #fff; border: 1px solid #d8d2c2; border-radius: 8px; padding: 10px 16px; margin: 12px 0; }
.howcard ul { margin: 6px 0; }
.planbanner { background: #fdecec; border: 1px solid #d99; border-radius: 8px; padding: 8px 14px; margin-bottom: 12px; }
.who { margin-left: auto; font-size: 0.9rem; color: #cfe3df; }
main { max-width: 860px; margin: 0 auto; padding: 18px; }
footer { text-align: center; padding: 18px; color: #667; }
label { display: block; margin: 10px 0; }
input, textarea, select { width: 100%; padding: 8px; margin-top: 4px; border: 1px solid #b9c2c9; border-radius: 6px; }
button, .button { background: #123c3c; color: #fff; border: 0; padding: 8px 14px; border-radius: 6px; cursor: pointer; text-decoration: none; }
.err { color: #a11; font-weight: 600; }
.ok { color: #176117; font-weight: 600; }
.note { color: #55606a; font-size: 0.92rem; }
.meta { color: #77828c; font-size: 0.88rem; }
.tag { background: #ffe9a8; border-radius: 4px; padding: 1px 6px; font-size: 0.82rem; }
ul.posts { list-style: none; padding: 0; }
ul.posts li { background: #fff; border: 1px solid #e2ddd0; border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
form.vote { display: inline-flex; gap: 4px; align-items: center; vertical-align: middle; }
form.vote button { padding: 2px 7px; background: #e8e2d2; color: #333; }
form.report { display: inline; }
form.report button { background: none; color: #889; padding: 2px 4px; font-size: 0.8rem; }
form.blockform { display: inline-block; margin-left: 6px; }
form.blockform button { background: #fff; color: #a11; border: 1px solid #a11; padding: 5px 12px; font-size: 0.88rem; border-radius: 6px; }
form.blockform button:hover { background: #fdf0f0; }
.bartrack { background: #e8e2d2; border-radius: 6px; height: 14px; margin: 4px 0 10px; max-width: 430px; overflow: hidden; }
.bartrack .bar { background: #22635e; height: 100%; border-radius: 6px; min-width: 2px; }
.comment, .msg { background: #fff; border: 1px solid #e2ddd0; border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
form.reply input { width: 70%; display: inline-block; }
.modal { background: #fff; border: 3px solid #b3541e; border-radius: 12px; padding: 22px; max-width: 560px; margin: 30px auto; box-shadow: 0 10px 40px rgba(0,0,0,0.25); }
.tagcard { display: inline-block; background: #eef6f6; border: 1px solid #123c3c; border-radius: 8px; padding: 3px 9px; margin: 2px; color: #123c3c; text-decoration: none; font-weight: 600; }
.tagpicker { position: absolute; background: #fff; border: 1px solid #b9c2c9; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.2); z-index: 50; max-height: 220px; overflow: auto; min-width: 240px; }
.tagpicker div { padding: 7px 10px; cursor: pointer; }
.tagpicker div:hover { background: #eef6f6; }
#board { display: grid; grid-template-columns: repeat(8, 1fr); width: min(92vw, 480px); border: 3px solid #123c3c; }
#board .sq { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: clamp(20px, 6vw, 38px); cursor: pointer; user-select: none; }
#board .light { background: #f0d9b5; } #board .dark { background: #b58863; }
#board .sel { outline: 3px solid #e6b800; outline-offset: -3px; }
#board .hint { box-shadow: inset 0 0 0 4px rgba(23,97,23,0.55); }
#grid { display: grid; gap: 4px; width: min(92vw, 420px); }
#grid .cell { aspect-ratio: 1; background: #fff; border: 2px solid #123c3c; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; cursor: pointer; }

/* Discord style Social Corner shell: channel rail, message stream,
   member panel. Colors stay in the Second Desk navy and teal family. */
main.wide { max-width: 1460px; }
.chatwrap { display: grid; grid-template-columns: 248px minmax(0, 1fr) 228px; gap: 14px; align-items: start; }
.rail { background: #123c3c; border-radius: 10px; padding: 10px 8px 12px; position: sticky; top: 12px; }
.railhead { color: #fff; font-weight: 700; padding: 4px 8px 10px; display: flex; align-items: center; gap: 6px; }
.railgroup { color: #9fc4c0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin: 12px 8px 4px; }
a.chan { display: flex; align-items: center; gap: 4px; color: #dcebe8; text-decoration: none; padding: 5px 8px; border-radius: 6px; font-size: 0.95rem; }
a.chan:hover { background: #1a4d4a; }
a.chan.active { background: #22635e; color: #fff; font-weight: 600; }
a.chan .hash { color: #8fb8b2; font-weight: 700; flex: none; }
a.chan .channame { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
a.chan .chancount { margin-left: auto; color: #9fc4c0; font-size: 0.8rem; }
a.chan .unread { width: 8px; height: 8px; border-radius: 50%; background: #ff6b5e; flex: none; margin-left: 2px; }
.railme { border-top: 1px solid #22635e; margin-top: 12px; padding: 10px 8px 2px; color: #fff; display: flex; align-items: center; gap: 8px; }
.railme a { color: #cfe3df; }
.chatmain { min-width: 0; }
.chanhead { border-bottom: 2px solid #e2ddd0; padding-bottom: 6px; margin-bottom: 10px; }
.chanhead h1 { margin: 4px 0; }
.chanhead .hash, h1 .hash { color: #77828c; }
.members { background: #fff; border: 1px solid #e2ddd0; border-radius: 10px; padding: 10px 12px; position: sticky; top: 12px; }
.members h3 { margin: 8px 0 6px; font-size: 0.85rem; color: #55606a; text-transform: uppercase; letter-spacing: 0.05em; }
.member { display: flex; align-items: center; gap: 7px; padding: 3px 0; }
.member .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.member .dot.on { background: #2e9e5b; }
.member .dot.off { background: #c3cbd1; }
.membername { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; font-weight: 700; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 0.8rem; }
.msgrow { display: flex; gap: 10px; background: #fff; border: 1px solid #e2ddd0; border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.msgrow.lead { border-color: #b9c2c9; }
.msgbody { min-width: 0; flex: 1; }
.msghead .msgname { font-weight: 700; }
.msgtitle { font-size: 1.05rem; font-weight: 600; margin: 2px 0; }
.msgtitle a { color: #123c3c; }
.msgexcerpt { margin: 2px 0 6px; color: #39434c; }
.msgfoot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.threadtitle { margin: 2px 0 6px; font-size: 1.4rem; }
.reactions { display: inline-flex; gap: 4px; flex-wrap: wrap; }
form.rxnform { display: inline; margin: 0; }
.rxn { background: #f1eee3; border: 1px solid #d8d2c2; border-radius: 12px; padding: 1px 8px; font-size: 0.85rem; cursor: pointer; color: #333; }
.rxn.mine { background: #ffe9a8; border-color: #c9a227; font-weight: 700; }
.rxn.static { cursor: default; }
.boardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.boardcard { display: block; background: #fff; border: 1px solid #e2ddd0; border-radius: 10px; padding: 14px; text-decoration: none; color: #1c2733; }
.boardcard:hover { border-color: #123c3c; }
.boardtile { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: #123c3c; color: #fff; font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.boardart { display: block; width: 100%; height: 110px; border-radius: 10px; overflow: hidden; background: #123c3c; margin-bottom: 10px; }
.boardart img { display: block; width: 100%; height: 100%; object-fit: cover; }
.boardname { display: block; font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.boardblurb { display: block; color: #39434c; font-size: 0.92rem; margin-bottom: 8px; }
@media (max-width: 980px) {
  .chatwrap { grid-template-columns: 1fr; }
  .rail, .members { position: static; }
  .rail { display: block; }
}
.pickerbox { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.picker { display: flex; flex-wrap: wrap; gap: 8px; }
.pickitem { display: flex; flex-direction: column; align-items: center; width: 76px; font-size: 12px; text-align: center; }
.pickitem img { width: 56px; height: 56px; }
.wraps { display: flex; gap: 8px; margin-top: 6px; }
.wrapchip { display: inline-block; width: 22px; height: 22px; border-radius: 6px; }
.giftcard { display: flex; gap: 12px; align-items: center; background: #fffdf4; border: 1px solid #e6ddc4; border-radius: 10px; padding: 10px; margin: 8px 0; max-width: 420px; }
.giftcard img { width: 72px; height: 72px; }
.reportlink { font-size: 13px; }
.poolcontrols { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 10px 0; }
.poolcontrols label { display: flex; gap: 8px; align-items: center; }
