/* frunchroom base styles. Retro-lite: Myspace-era boxes, but legible. Profile CSS is scoped under #skin. */
:root {
  --bg: #e8eef6;
  --ink: #1d2733;
  --muted: #6b7a8c;
  --line: #9bb3d1;
  --head: #4f7cb8;
  --head-ink: #fff;
  --link: #0b4fa8;
  --accent: #ff7a1a;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 14px/1.45 Verdana, Tahoma, "Segoe UI", sans-serif;
}
a { color: var(--link); }
img { max-width: 100%; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .5rem 1rem; background: var(--head); color: var(--head-ink);
  border-bottom: 3px solid var(--accent);
}
.brand { font: bold 1.5rem Georgia, "Times New Roman", serif; text-decoration: none; letter-spacing: .5px; color: var(--head-ink); }
.top-tools { display: flex; align-items: center; gap: .5rem; }
.top-ic, .menu-btn, .top-me {
  position: relative; display: flex; align-items: center; gap: .45rem; padding: .32rem .7rem; border-radius: 6px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); color: #fff; text-decoration: none;
  font: inherit; font-weight: bold; cursor: pointer; line-height: 1.2;
}
.top-ic:hover, .menu-btn:hover, .top-me:hover, .menu[open] > .menu-btn { background: rgba(255, 255, 255, .28); }
.top-ic .nav-count { position: absolute; top: -.45rem; right: -.45rem; }
.top-me span { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-xs { flex: none; width: 22px; height: 22px; border-radius: 50%; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: min(30rem, 92vw); padding: .4rem .9rem 1rem;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 34px #0003;
}
.menu-h { margin: .7rem 0 .3rem; font-size: 11px; font-weight: bold; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; width: 100%;
  min-height: 4.6rem; padding: .55rem .3rem; border-radius: 8px; background: #f3f7fc; border: 1px solid #dfe7f2;
  color: var(--link); text-decoration: none; text-align: center; font: bold 12.5px/1.2 Verdana, Tahoma, sans-serif; cursor: pointer;
}
.tile .ic { width: 1.75rem; height: 1.75rem; }
.tile:hover { background: #fff3e6; border-color: var(--accent); }
.tile.on { background: var(--head); border-color: var(--head); color: #fff; }
.tile .nav-count { position: absolute; top: .3rem; right: .4rem; }
.menu-grid .logout { display: contents; }
.logout { margin: 0; }
.ic { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.3em; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 700px) {
  .top { padding: .45rem .7rem; gap: .4rem; }
  .brand { font-size: 1.3rem; }
  .top-tools { gap: .35rem; }
  .top-ic, .menu-btn, .top-me { padding: .32rem .55rem; }
  .top-me span { display: none; }
  .menu-panel { position: fixed; left: .5rem; right: .5rem; top: 3.5rem; width: auto; max-height: calc(100vh - 4.5rem); overflow: auto; }
}

.page { max-width: 62rem; margin: 1rem auto; padding: 0 1rem; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 1.5rem 0; }
.pagetitle { font: bold 1.4rem Georgia, serif; margin: .2rem 0 1rem; }
.muted { color: var(--muted); }
.flash { background: #fff6d6; border: 1px solid #e6cf7a; padding: .4rem .7rem; }

.box { background: #fff; border: 1px solid var(--line); margin-bottom: 1rem; }
.box h3 { margin: 0; padding: .3rem .7rem; background: var(--head); color: var(--head-ink); font-size: 13px; }
.box .body, .box > form { padding: .7rem; }
.narrow { max-width: 28rem; margin: 3rem auto; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.row { margin: .3rem 0; }

.btn, button.btn {
  display: inline-block; padding: .3rem .9rem; background: var(--accent); color: #fff; border: 0;
  border-radius: 3px; font: inherit; font-weight: bold; text-decoration: none; cursor: pointer;
}
button.link { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font: inherit; text-decoration: underline; }
form.inline { display: inline; margin: 0; }
textarea, input[type=text] { width: 100%; font: inherit; padding: .35rem; border: 1px solid var(--line); }
textarea.code { font-family: Consolas, monospace; font-size: 12px; }
.field { margin-bottom: .8rem; }
.field label { display: block; font-weight: bold; margin-bottom: .15rem; }
.errorlist { color: #b00020; margin: .2rem 0; padding-left: 1rem; }

.badge { display: inline-block; font-size: 11px; padding: 0 .4rem; border: 1px solid var(--line); border-radius: 8px; margin-right: .25rem; }
.badge.mod { border-color: var(--accent); }
.av-sm { width: 28px; height: 28px; border-radius: 3px; vertical-align: middle; margin-right: .3rem; }
.av-md { width: 64px; height: 64px; border-radius: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .8rem; }
.card { display: flex; flex-direction: column; gap: .2rem; align-items: center; text-align: center; padding: .8rem;
        background: #fff; border: 1px solid var(--line); text-decoration: none; color: inherit; }
.card:hover { border-color: var(--accent); }

/* profile */
.p-layout { display: grid; grid-template-columns: 15rem 1fr; gap: 1rem; align-items: start; }
.p-side { background: #fff; border: 1px solid var(--line); padding: .8rem; }
.p-name { font: bold 1.3rem Georgia, serif; margin: 0 0 .5rem; }
.p-avatar { width: 100%; max-width: 200px; border: 1px solid var(--line); }
.p-mood { margin: .6rem 0; }
.p-facts { list-style: none; margin: 0; padding: 0; }
.p-facts li { margin: .25rem 0; }
.wall-comment { display: flex; gap: .6rem; padding: .6rem 0; border-top: 1px dotted var(--line); }
.wall-comment .text p { margin: .2rem 0; }
.wall-comment .meta { font-size: 12px; }
#wall form textarea + button { margin-top: .3rem; }

@media (max-width: 700px) {
  .cols, .p-layout { grid-template-columns: 1fr; }
}

/* bbs */
.crumbs { margin: 0 0 .3rem; color: var(--muted); font-size: 12px; }
.titlebar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.rows > * { padding: .6rem .8rem; border-top: 1px solid #dfe7f2; }
.rows > *:first-child { border-top: 0; }
.row-board, .row-thread { display: grid; grid-template-columns: 1fr 7rem 12rem; gap: .8rem; align-items: start; }
.row-board .title, .row-thread .title { font-weight: bold; font-size: 15px; }
.title.unread { color: var(--ink); }
.dot { color: var(--accent); font-size: 12px; font-weight: bold; text-decoration: none; margin-left: .3rem; }
.count, .last { font-size: 12px; }
.pager { display: flex; gap: 1rem; align-items: center; margin: .6rem 0; }
.modbar { margin: 0 0 .8rem; }
.modbar.inline { display: inline; }
.modbar button.link { margin-right: .6rem; }
.post { display: grid; grid-template-columns: 9rem 1fr; gap: 0; padding: 0; }
.post-who { padding: .8rem; background: #f3f7fc; border-right: 1px solid #dfe7f2; text-align: center; font-size: 12px; }
.post-who strong { display: block; margin-top: .3rem; font-size: 13px; }
.post-main { padding: .8rem; min-width: 0; }
.post-meta { font-size: 12px; margin-bottom: .5rem; }
.post-meta form.inline { margin-left: .5rem; }
.post-body { overflow-wrap: anywhere; }
.post-body p { margin: .4rem 0; }
.post-body blockquote { margin: .5rem 0; padding-left: .8rem; border-left: 3px solid var(--line); color: var(--muted); }
.post-body pre { overflow: auto; background: #f3f7fc; padding: .5rem; }
.reply textarea { min-height: 7rem; }
@media (max-width: 700px) {
  .row-board, .row-thread { grid-template-columns: 1fr; gap: .2rem; }
  .post { grid-template-columns: 1fr; }
  .post-who { display: flex; gap: .6rem; align-items: center; text-align: left; border-right: 0; border-bottom: 1px solid #dfe7f2; }
  .post-who .av-md { width: 36px; height: 36px; }
  .post-who strong { display: inline; margin: 0; }
}

/* status + home */
.home-me { display: flex; gap: 1rem; align-items: flex-start; }
.home-me-main { flex: 1; min-width: 0; }
.home-me .pagetitle { margin-bottom: .4rem; }
.status-form { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.status-form input[type=text] { flex: 1 1 14rem; min-width: 0; }
.status-form select { padding: .35rem; border: 1px solid var(--line); font: inherit; }
.mood { color: var(--muted); font-style: italic; }
.online-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #2fb344; margin-right: .3rem; vertical-align: middle; }
.who { display: inline-block; margin: 0 .6rem .2rem 0; }
h4 { margin: .8rem 0 .2rem; font-size: 13px; }

/* calendar */
.viewtabs { margin: 0 0 .8rem; }
.row-event { display: grid; grid-template-columns: 5.5rem 1fr 7rem; gap: .8rem; align-items: start; }
.row-event .title { font-weight: bold; font-size: 15px; }
.row-event.canceled .title, h1.canceled, .chip.canceled { text-decoration: line-through; opacity: .65; }
.rsvp-cell { font-size: 12px; text-align: right; }
.copybox { font: 12px Consolas, monospace; }
.rsvp-buttons { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.btn.off { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.on { background: var(--accent); }
.invitees ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.monthgrid { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; }
.monthgrid th { background: var(--head); color: var(--head-ink); padding: .3rem; font-size: 12px; }
.monthgrid td { border: 1px solid var(--line); vertical-align: top; height: 6.5rem; padding: .2rem; overflow: hidden; }
.monthgrid td.out { background: #f1f4f8; color: var(--muted); }
.monthgrid td.today { background: #fff6d6; }
.daynum { display: block; font-size: 11px; color: var(--muted); }
.chip { display: block; font-size: 11px; line-height: 1.25; margin: 2px 0; padding: 1px 3px; background: #e6eefb; border-left: 3px solid var(--head); text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chip.going { border-left-color: var(--accent); background: #fff0e3; }
.daylabel { display: none; }
@media (max-width: 700px) {
  .row-event { grid-template-columns: 4.5rem 1fr; }
  .rsvp-cell { grid-column: 2; text-align: left; }
  .home-me .av-md { width: 48px; height: 48px; }
  /* month grid -> agenda: only days with events (and today), one per row */
  .monthgrid thead { display: none; }
  .monthgrid, .monthgrid tbody, .monthgrid tr, .monthgrid td { display: block; width: 100%; }
  .monthgrid td { height: auto; border: 0; border-top: 1px solid var(--line); padding: .45rem .7rem; }
  .monthgrid td:not(:has(.chip)):not(.today) { display: none; }
  .monthgrid td.out { background: #fff; color: inherit; }
  .daynum { display: none; }
  .daylabel { display: block; font-weight: bold; font-size: 13px; }
  .chip { font-size: 13px; white-space: normal; padding: 3px 6px; }
}

/* status "is" phrasing + mood never splits from its emoji */
.mood, .nowrap { white-space: nowrap; }
.feed-item { display: flex; gap: .55rem; align-items: flex-start; margin: .5rem 0; }
.feed-item .av-sm { flex: none; margin: 0; }
.feed-item > div { min-width: 0; }
.status-form .is { font-weight: bold; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.status-form .is + input[type=text] { flex: 1 1 12rem; }

/* birthdays */
.row-bday { display: grid; grid-template-columns: 5rem 1fr 8rem; gap: .8rem; align-items: center; }
.row-bday.today { background: #fff6d6; }
.chip.bday { border-left-color: #e0509a; background: #fdeaf4; }
.bday-fields select, .bday-fields input[type=number] { padding: .3rem; border: 1px solid var(--line); font: inherit; width: auto; }
.bday-fields input[type=number] { width: 4.5rem; }

.home-casino .big { font-size: 1.05rem; }

/* my mail */
.mail .body { padding-bottom: .4rem; }
.mail-row { display: block; padding: .28rem 0; font-weight: bold; text-decoration: none; }
.mail-row:hover { text-decoration: underline; }
.mail-row .mi { display: inline-block; width: 1.5rem; text-align: center; }
.mail-row.red { color: #c00000; }
.mail-row.green { color: #138a1e; }
.mail-row.blue { color: #123c9c; }
.mail-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; }
.mail-buttons a { display: block; text-align: center; padding: .85rem .4rem; background: #d6e6fa; color: #123c9c; font-weight: bold;
                  text-decoration: none; }
.mail-buttons a:hover { background: #c3dbf7; }

/* photos */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.ph-grid.small { grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); margin-bottom: .5rem; }
.ph { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #dfe7f2; border: 1px solid var(--line); text-decoration: none; }
.ph:hover { border-color: var(--accent); }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-by, .ph-badge, .ph-new { position: absolute; font-size: 11px; line-height: 1.3; color: #fff; background: rgba(20, 30, 45, .72); padding: 1px 6px; }
.ph-by { left: 0; right: 0; bottom: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ph-badge { right: 0; top: 0; }
.ph-badge.hot { background: #c00000; font-weight: bold; }
.ph-new { left: 0; top: 0; background: var(--accent); font-weight: bold; }
.ph.album { aspect-ratio: 4 / 3; }
.ph-stage { text-align: center; background: #10161e; padding: .4rem; }
.ph-big { display: inline-block; max-width: 100%; max-height: 80vh; width: auto; height: auto; vertical-align: top; }
.ph-nav { display: flex; justify-content: space-between; padding: .4rem .8rem; border-bottom: 1px solid #dfe7f2; }
.ph-caption { font-size: 15px; margin: 0 0 .5rem; overflow-wrap: anywhere; }
.ph-edit-row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: .4rem; }
.ph-edit select, .ph-actions select { padding: .35rem; border: 1px solid var(--line); font: inherit; }
.ph-edit-row input[type=text] { flex: 1 1 12rem; width: auto; }
.ph-actions { margin-top: .6rem; display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }
.ph-actions input[type=text] { width: 14rem; }
.comment-form { margin-top: .8rem; }
.comment-form button { margin-top: .3rem; }
#upload-form select, #upload-form input[type=file] { font: inherit; }
#upload-form select { padding: .35rem; border: 1px solid var(--line); }
#upload-form input[type=text] { width: auto; min-width: 14rem; }
.titlebar p { margin: 0; }

/* private messages */
.nav-count { display: inline-block; min-width: 1.2rem; padding: 0 .35rem; border-radius: 9px; background: var(--accent); color: #fff;
             font-size: 11px; font-weight: bold; line-height: 1.3; text-align: center; vertical-align: 1px; }
.dm-facts { margin: .4rem 0 .8rem; padding-left: 1.2rem; }
.dm-facts li { margin: .25rem 0; }
.dm-row { display: grid; grid-template-columns: 2rem 1fr auto; gap: .7rem; align-items: center; padding: .6rem .8rem; text-decoration: none; color: inherit; border-top: 1px solid #dfe7f2; }
.rows > .dm-row:first-child { border-top: 0; }
.dm-row:hover { background: #f3f7fc; }
.dm-row.unread { background: #fff6d6; }
.dm-row .av-sm { margin: 0; }
.dm-who { min-width: 0; }
.dm-preview { display: inline-block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; vertical-align: bottom; }
.dm-when { font-size: 12px; white-space: nowrap; }
.dm-people .who { margin-right: .2rem; }
.dm-warn { background: #fff6d6; border: 1px solid #e6cf7a; padding: .5rem .7rem; }
#dm-log { max-height: 58vh; min-height: 8rem; overflow-y: auto; padding: .4rem .2rem; border: 1px solid #dfe7f2; background: #f8fafd; }
.dm-day { text-align: center; font-size: 11px; color: var(--muted); margin: .6rem 0 .2rem; }
.dm-msg { display: flex; flex-direction: column; margin: .25rem .4rem; max-width: 80%; }
.dm-msg.mine { margin-left: auto; align-items: flex-end; }
.dm-msg.theirs { margin-right: auto; align-items: flex-start; }
.dm-bubble { padding: .4rem .7rem; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dm-msg.mine .dm-bubble { background: var(--head); color: #fff; }
.dm-msg.theirs .dm-bubble { background: #e6eefb; }
.dm-bubble.locked { background: #eceff3 !important; color: var(--muted) !important; font-style: italic; }
.dm-meta { font-size: 11px; color: var(--muted); }
.dm-meta button.link { font-size: 11px; color: var(--muted); }
.dm-send { display: flex; gap: .5rem; align-items: flex-end; margin-top: .6rem; }
.dm-send textarea { flex: 1; resize: vertical; min-height: 2.6rem; }
.dm-safety { margin: .8rem 0 .4rem; }
.dm-number { font: 15px Consolas, monospace; letter-spacing: .5px; }
#dm-settings summary { padding: .4rem .7rem; cursor: pointer; background: #f3f7fc; }
#dm-settings .body, .dm-convo .body { padding: .7rem; }
input[type=password] { width: 100%; max-width: 24rem; font: inherit; padding: .35rem; border: 1px solid var(--line); }
@media (max-width: 700px) { .dm-msg { max-width: 92%; } .dm-row { grid-template-columns: 2rem 1fr; } .dm-when { display: none; } }
.mail-buttons a:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* casino tab strip (every casino page) */
.ctabs { display: flex; align-items: stretch; gap: .25rem; flex-wrap: wrap; margin: 0 0 1rem; padding: .3rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.ctab { display: flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 6px; text-decoration: none; color: var(--link); font-weight: bold; }
.ctab:hover { background: #fff3e6; }
.ctab.on { background: var(--head); color: #fff; }
.ctab-bal { margin-left: auto; align-self: center; padding: 0 .5rem; color: var(--muted); white-space: nowrap; }
.ctab-bal strong { color: var(--ink); font-size: 1.05rem; }
@media (max-width: 700px) { .ctab span { font-size: 12px; } .ctab { padding: .35rem .5rem; flex: 1 1 auto; justify-content: center; } .ctab-bal { flex-basis: 100%; text-align: right; } }

/* amount shortcuts under a bet box (the book, blackjack, roulette); the script reveals them */
.chips { margin: 0; display: flex; gap: .3rem; flex-wrap: wrap; }
.chips[hidden] { display: none; }
.chips button { padding: .08rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.chips button:hover { border-color: var(--accent); }
