/* CCMA Members Lounge v2 — a gentlemen's club room: coffered mahogany ceiling, teal damask walls,
   tufted brown leather, Persian rug, parquet floor, brass lamp glow. Loaded AFTER app.css; delete to revert. */
:root {
  --mahogany: #3a1810; --mahogany-2: #5a2a1c; --wood-hi: #7a3a24;
  --teal: #0f3f3a; --teal-2: #14504a; --teal-d: #0a2b28;
  --leather: #6b3a1f; --leather-2: #8a4f2a; --leather-hi: #a8683a; --leather-d: #3d1d0e;
  --brass: #c9a24a; --brass-hi: #ecd088; --brass-d: #8f6f2a;
  --cream: #f6ead2; --cream-2: #dcc9a5; --rug: #5a1b1a;
  --bg: var(--teal); --ink: var(--cream); --muted: var(--cream-2); --line: rgba(201,162,74,.38);
  --navy: #2a120c; --navy-2: #4a2417; --gold: var(--brass); --gold-d: var(--brass-d); --card: var(--leather);
}
html { min-height: 100%; }
body {
  color: var(--cream); font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  background-color: var(--teal);
  /* damask-style wallpaper: diamond lattice + soft glow */
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(255,200,120,.20), transparent 60%),
    linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%),
    linear-gradient(-45deg, rgba(0,0,0,.18) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.18) 75%),
    radial-gradient(circle at 50% 50%, rgba(201,162,74,.10) 0 3px, transparent 4px);
  background-size: 100% 100%, 44px 44px, 44px 44px, 44px 44px;
  background-attachment: fixed;
  padding-bottom: 110px;
}
/* warm table-lamp glow on the left and right walls */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 3% 55%, rgba(255,190,90,.38), transparent 22%),
    radial-gradient(circle at 97% 45%, rgba(255,190,90,.30), transparent 22%),
    radial-gradient(ellipse at 50% 100%, rgba(255,140,50,.28), transparent 50%);
}
/* parquet floor along the bottom of the window */
body::after {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 84px; z-index: -1; pointer-events: none;
  border-top: 6px solid var(--mahogany);
  background:
    linear-gradient(180deg, rgba(0,0,0,.45), transparent 40%),
    repeating-linear-gradient(45deg, #a8743f 0 14px, #8a5a2c 14px 28px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,.18) 0 14px, transparent 14px 28px);
  background-blend-mode: normal, normal, multiply;
  box-shadow: 0 -10px 24px rgba(0,0,0,.45);
}
h1, h2, h3 { color: var(--brass-hi); letter-spacing: .02em; text-shadow: 0 2px 2px rgba(0,0,0,.6); }
a, .linklike { color: var(--brass-hi); }
button, input, .btn, .nav, .pill, .conn { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }

/* COFFERED CEILING: mahogany beams around teal panels, chandelier glow in the middle */
.topbar {
  position: sticky; top: 0; border-bottom: 0; color: var(--cream);
  background-color: var(--teal-d);
  background-image:
    radial-gradient(ellipse 340px 120px at 50% 0%, rgba(255,215,140,.55), transparent 70%),
    linear-gradient(90deg, var(--mahogany) 0 12px, transparent 12px calc(100% - 12px), var(--mahogany) calc(100% - 12px)),
    repeating-linear-gradient(90deg, var(--wood-hi) 0 6px, var(--mahogany) 6px 16px, transparent 16px 150px),
    linear-gradient(180deg, var(--teal-2), var(--teal-d));
  box-shadow: 0 8px 22px rgba(0,0,0,.6), inset 0 -10px 0 var(--mahogany), inset 0 -12px 0 var(--brass-d);
  padding-bottom: 12px;
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--brass-d), var(--brass-hi), var(--brass-d)); }
.brand small, .conn { color: var(--cream-2); }
.brand, .nav a, .nav button { text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.nav a:hover, .nav button:hover { background: rgba(0,0,0,.28); }
.nav a[aria-current="page"], .btn.gold { background: linear-gradient(180deg, var(--brass-hi), var(--brass)); color: #2a1604; text-shadow: none; }

/* MAIN ROOM: a Persian rug under the cards */
main {
  margin-top: 1.1rem; padding: 1.1rem; border-radius: 10px;
  background-color: var(--rug);
  background-image:
    radial-gradient(circle at 50% 50%, rgba(236,208,136,.18) 0 2px, transparent 3px),
    linear-gradient(45deg, rgba(236,208,136,.10) 25%, transparent 25% 75%, rgba(236,208,136,.10) 75%),
    linear-gradient(-45deg, rgba(0,0,0,.22) 25%, transparent 25% 75%, rgba(0,0,0,.22) 75%);
  background-size: 30px 30px, 60px 60px, 60px 60px;
  border: 3px solid var(--brass-d); outline: 8px solid #3a0f0e; outline-offset: -1px;
  box-shadow: 0 0 0 4px var(--brass-d), 0 18px 40px rgba(0,0,0,.6), inset 0 0 40px rgba(0,0,0,.5);
}

/* TUFTED LEATHER panels (diamond quilting with buttons, like the chesterfields) */
.card, .auth-card {
  position: relative; color: var(--cream);
  border: 1px solid #1d0c07; border-radius: 22px;
  background-color: var(--leather);
  background-image:
    radial-gradient(circle at 50% 50%, #1c0b05 0 2.5px, rgba(255,210,150,.5) 3px 4px, transparent 5px),
    linear-gradient(45deg, rgba(0,0,0,.28) 25%, transparent 25% 75%, rgba(0,0,0,.28) 75%),
    linear-gradient(-45deg, rgba(255,210,160,.10) 25%, transparent 25% 75%, rgba(255,210,160,.10) 75%),
    linear-gradient(160deg, var(--leather-hi), var(--leather) 50%, var(--leather-d));
  background-size: 58px 58px, 58px 58px, 58px 58px, 100% 100%;
  background-position: 29px 29px, 0 0, 0 0, 0 0;
  box-shadow: 0 12px 26px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,225,190,.28), inset 0 0 0 6px rgba(0,0,0,.2), inset 0 -8px 14px rgba(0,0,0,.35);
}
.card::after { content: ""; position: absolute; inset: 8px; border: 1.5px dashed rgba(236,208,136,.5); border-radius: 15px; pointer-events: none; }
.card > * { position: relative; z-index: 1; }
.card > h2:first-child { text-shadow: 0 2px 3px rgba(0,0,0,.8); }

/* GAME CHOICES: club armchairs with rolled arms */
.game-card {
  color: var(--cream); border: 1.5px solid var(--brass-d); border-radius: 26px 26px 12px 12px;
  background:
    radial-gradient(circle at 50% 22%, rgba(255,215,160,.22), transparent 60%),
    linear-gradient(180deg, var(--leather-hi), var(--leather-2) 60%, var(--leather-d));
  box-shadow: 0 7px 0 #1f0d07, 0 14px 20px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,225,190,.3), inset 8px 0 0 rgba(0,0,0,.16), inset -8px 0 0 rgba(0,0,0,.16);
  transition: transform .15s, box-shadow .15s;
}
.game-card:hover { border-color: var(--brass-hi); transform: translateY(-3px); box-shadow: 0 10px 0 #1f0d07, 0 18px 24px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,225,190,.35), inset 8px 0 0 rgba(0,0,0,.16), inset -8px 0 0 rgba(0,0,0,.16); }
.game-card span { color: var(--cream-2); }

/* buttons, fields */
.btn { background: linear-gradient(180deg, #7a4428, #3f1c11); border: 1px solid #1d0c07; color: var(--cream); box-shadow: inset 0 1px 0 rgba(255,225,190,.28), 0 2px 5px rgba(0,0,0,.45); }
.btn:hover { background: linear-gradient(180deg, #93532f, #4d2415); }
.btn.ghost { background: transparent; color: var(--brass-hi); border: 1.5px solid var(--brass-d); box-shadow: none; }
.btn.ghost:hover { background: rgba(201,162,74,.18); }
.field input, .chat-form input { background: #f8eed9; color: #2a1208; border: 1.5px solid var(--brass-d); }
.field label { color: var(--cream); }
.tabs { background: rgba(0,0,0,.35); } .tabs button { color: var(--cream-2); }
.tabs button[aria-selected="true"] { background: var(--leather-2); color: var(--brass-hi); }

/* chat: parchment ledger */
.chat-log { background: linear-gradient(180deg, #f6ead2, #ead9b8); border: 2px solid var(--brass-d); color: #2a1208; box-shadow: inset 0 3px 8px rgba(60,30,10,.4); }
.msg b { color: #5a2a14; } .msg.me b { color: #8f6200; } .msg time { color: #7a6548; } .msg.sys { color: #7a6548; }

.online-list li { background: rgba(0,0,0,.38); color: var(--cream); border: 1px solid var(--brass-d); }
.pill { background: rgba(0,0,0,.38); color: var(--brass-hi); border: 1px solid var(--brass-d); }
.pill.live { background: #1f3b26; color: #9fe0b0; } .pill.wait { background: #4a3510; color: var(--brass-hi); }
.table-row { border-top: 1px dashed rgba(236,208,136,.35); }
.notice { background: rgba(0,0,0,.35); border-color: var(--brass-d); color: var(--cream); }
.muted { color: var(--cream-2); }
.seat { background: rgba(0,0,0,.38); border-color: var(--brass-d); color: var(--cream); }
.seat.turn { background: #4a3510; border-color: var(--brass-hi); }
.banner { background: rgba(0,0,0,.38); color: var(--cream); border: 1px solid var(--brass-d); }
.banner.turn { background: #4a3510; color: var(--brass-hi); }
.banner.win { background: #1f3b26; color: #bff0ca; } .banner.lose { background: #4a1a14; color: #f6c7c1; }
.auth-wrap { background: radial-gradient(ellipse at 50% 0%, #1c6a60, var(--teal-d) 70%); }
.toast { background: #1c0a06; border: 1px solid var(--brass-d); }
.board8, .snake-board { border-color: var(--brass-d); box-shadow: 0 8px 22px rgba(0,0,0,.65); }
/* the green felt table from the photo */
.dom-table, .spades-trick { background: radial-gradient(ellipse at center, #1f8a56, #0f5a37); border-color: #3a1810; box-shadow: inset 0 0 34px rgba(0,0,0,.55); }
@media (max-width: 700px) { main { margin: .6rem; padding: .6rem; } body::after { height: 56px; } body { padding-bottom: 76px; } }

/* the illustrated room sits behind everything */
.room-bg { position: fixed; inset: 0; z-index: -3; pointer-events: none; }
.room-bg svg { width: 100%; height: 100%; display: block; }
body { background-image: none !important; background-color: #0f3f3a; }
body::before, body::after { display: none; }
main { background: none; border: 0; outline: 0; box-shadow: none; padding: 1rem; }
.topbar { background-color: rgba(10,30,28,.82); backdrop-filter: blur(2px); }

/* ---- v3.1: compact panels pushed to the sides so the fireplace, crest and bar stay visible ---- */
main { max-width: none; padding: .5rem .75rem; }
.card { padding: .5rem .7rem; margin-bottom: .5rem; border-radius: 14px; font-size: .88rem; background-size: 34px 34px, 34px 34px, 34px 34px, 100% 100%; background-position: 17px 17px, 0 0, 0 0, 0 0; }
.card::after { inset: 4px; border-radius: 10px; }
.card > h2:first-child { font-size: 1rem; margin-bottom: .25rem; }
.card p { margin-bottom: .35rem; }
.notice { padding: .35rem .6rem; font-size: .85rem; margin-bottom: .5rem; }
.game-cards { grid-template-columns: repeat(2, 1fr); gap: .4rem; }
.game-card { padding: .4rem .5rem; border-radius: 16px 16px 8px 8px; box-shadow: 0 4px 0 #1f0d07, 0 8px 12px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,225,190,.3); }
.game-card:hover { transform: translateY(-2px); }
.game-card .ico { font-size: 1.35rem; }
.game-card b { margin-top: .1rem; font-size: .9rem; }
.game-card span:not(.ico) { display: none; }
.table-row { padding: .3rem 0; gap: .4rem; }
.online-list li { font-size: .8rem; padding: .1rem .5rem; }
.chat-log { height: 150px; font-size: .85rem; padding: .35rem; }
.chat-log.short { height: 110px; }
.chat-form { margin-top: .35rem; }
.chat-form input { min-height: 36px; }
.btn { min-height: 36px; padding: .3rem .8rem; font-size: .9rem; }
.topbar-in { padding: .3rem 1rem; }

/* lobby: left panel | open room | right panel */
@media (min-width: 901px) {
  .club { grid-template-columns: minmax(250px, 24vw) minmax(0, 1fr) minmax(230px, 21vw); gap: 0; }
  .club > :first-child { grid-column: 1; }
  .club > :last-child { grid-column: 3; }
  /* while sitting at a game table, give the board room to breathe */
  .club:has(.board-wrap), .club:has(.table-head) { grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: .75rem; }
  .club:has(.board-wrap) > :last-child, .club:has(.table-head) > :last-child { grid-column: 2; }
}
