/* The Guild window (client/js/ui/guild; docs/superpowers/specs/2026-09-29-guilds-design.md
   section 7): a pixel-kit window (client/css/social-ui.css) laid out like the
   previews (guild-rework/preview: g1 the Guild Board, g2 found a guild, g3 the
   charter, g8 "How guilds work", and the phone pages; their common.css and
   guild.css values). The window picks its layout from the room #windows gives
   it (index.js): .wide and .mid (the cards | the detail; the form | the
   preview) and .phone (one column, full screen, the detail in a sheet), and
   .short for a phone on its side (the tabs in the header's row). Inside Hub
   (Hub → GUILD) it is .embedded: see "inside Hub" below. */

/* ------------------------------------------------------------------ colours */
/* the 8 guild colours: --c base, --o outline, --l light, --t text on cream */
.gd .c-red, .gd-rules .c-red { --c: #e0523f; --o: #7c2216; --l: #f38775; --t: #b0362a; }
.gd .c-orange, .gd-rules .c-orange { --c: #f08a2c; --o: #7a3a08; --l: #f7b268; --t: #b0560e; }
.gd .c-yellow, .gd-rules .c-yellow { --c: #e8c23a; --o: #6e5608; --l: #f5dc78; --t: #8a6a00; }
.gd .c-green, .gd-rules .c-green { --c: #4caf50; --o: #22602a; --l: #80d080; --t: #2e7d32; }
.gd .c-teal, .gd-rules .c-teal { --c: #2ba8a0; --o: #0f4e4a; --l: #62cbc3; --t: #18766f; }
.gd .c-blue, .gd-rules .c-blue { --c: #3f7fd0; --o: #1e467e; --l: #74a8ec; --t: #2a5ea8; }
.gd .c-purple, .gd-rules .c-purple { --c: #8a5cc7; --o: #452a70; --l: #ad89e2; --t: #6b3fa0; }
.gd .c-pink, .gd-rules .c-pink { --c: #e0609a; --o: #7a1f4a; --l: #f08fbb; --t: #b0366e; }

/* ------------------------------------------------------------------ the window */
.gd, .gd-rules { --gold: #8a5200; --green: #1e7a3c; }
.pxui.gd { width: min(1340px, calc(100% - 24px)); height: min(842px, calc(100% - 16px)); display: flex; flex-direction: column; padding: 12px 14px 14px; overflow: hidden; }
:where(.gd, .gd-rules, .gd-confirm) :where(h1, h2, h3, h4, p, dl) { margin: 0; }
.gd-kick { color: var(--ink-3); font-size: 13px; letter-spacing: .07em; text-transform: uppercase; }
.gd-muted { color: var(--ink-3); }
.gd-grow { flex: 1; }
.gd-empty { padding: 18px 8px; color: var(--ink-3); text-align: center; }
.gd-empty p { margin: 0 0 10px; }
.gd-empty.small { padding: 8px; font-size: 14px; text-align: left; }
.gd [aria-disabled=true], .gd .busy { opacity: .55; cursor: default; }
.gd canvas { image-rendering: pixelated; }
/* (the kit gives only buttons, inputs and selects the pixel font) */
.gd textarea { font: inherit; color: inherit; }
/* (a banner keeps its whole-pixel size: never stretched by its row) */
.gd canvas.gd-bn, .gd-rules canvas { flex: none; align-self: flex-start; }

/* the header: the mark, GUILDS, the kicker, the wallet, ? and ✕ */
.gd-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 2px 2px 10px; min-width: 0; }
.gd-head h1 { font-size: 22px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gd-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gd-mark { flex: none; display: inline-block; width: 20px; height: 28px; border: 3px solid #1e467e; border-top-width: 4px; background: linear-gradient(90deg, #3f7fd0 70%, #3169b5 70%); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.gd-wallet { margin-left: auto; flex: none; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 3px solid var(--frame); border-radius: 8px; background: #fff; white-space: nowrap; }
.gd-coin { flex: none; display: inline-block; width: 16px; height: 16px; border: 2px solid #8a5a00; border-radius: 50%; background: #ffd64a; }
.gd-money { font-weight: 700; font-variant-numeric: tabular-nums; }
.gd-x { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 3px solid var(--frame); border-radius: 8px; background: #fff; font-size: 18px; font-weight: 700; }
.gd-x.gd-help { border-color: var(--frame); background: #fff; }
@media (hover: hover) { .gd-x:hover { border-color: var(--sel-line); } }
/* a member's header: the banner, [TAG] name, the level and the counts */
.gd-head .gd-bn { flex: none; margin: -8px -10px -10px -12px; }
.gd-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gd.member .gd-head h1 { text-transform: none; letter-spacing: .02em; }
.gd-tagtxt { color: #2a5ea8; }
.gd-hline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }

/* the tabs */
.gd-tabs { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-bottom: 10px; border-bottom: 2px dashed var(--rule); }
.gd-tabs .px-pocket { font-size: 16px; }
.gd-tabnote { margin-left: auto; text-align: right; }
.gd-main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 12px; }
.gd-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.gd-notice { margin: 0 0 10px; padding: 7px 12px; border: 2px solid #c98a2a; border-radius: 8px; background: var(--announce); color: var(--ink); font-size: 14px; font-weight: 600; }

/* ------------------------------------------------------------------ small parts */
.gd-tag { display: inline-flex; align-items: center; flex: none; height: 22px; padding: 0 6px; border: 2px solid var(--o, #1e467e); border-radius: 5px; background: var(--c, #3f7fd0); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .06em; line-height: 1; text-transform: uppercase; text-shadow: 1px 1px 0 var(--o, #1e467e); white-space: nowrap; }
.gd-tag.c-yellow { color: #4a3a00; text-shadow: 1px 1px 0 var(--l); }
.gd-jm { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 24px; padding: 0 8px; border: 2px solid; border-radius: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.gd-jm.open { border-color: #3d7a32; background: #e4f4dc; color: #2a5a26; }
.gd-jm.apply { border-color: var(--blue); background: var(--sky); color: var(--blue-dk); }
.gd-jm.invite { border-color: var(--plain-line); background: var(--plain); color: var(--ink-2); }
.gd-jm.full { border-color: var(--red-edge); background: #fbe3de; color: var(--red-dk); }
.gd-lvl { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 24px; padding: 0 8px 0 6px; border: 2px solid var(--sel-line); border-radius: 6px; background: var(--sel); color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; }
.gd-star { color: #d49a16; font-size: 13px; }
.gd-meter { flex: none; display: inline-block; width: 54px; height: 10px; border: 2px solid var(--frame); border-radius: 3px; background: #fff; overflow: hidden; vertical-align: middle; }
.gd-meter i { display: block; height: 100%; background: var(--blue); }
.gd-meter.full i { background: var(--red); }
.gd-meter.xp i { background: #e8b43a; }
.gd-flag { display: inline-block; width: 12px; height: 14px; border-left: 2px solid #2a3a55; background: linear-gradient(#3f7fd0, #3f7fd0) 2px 0 / 9px 8px no-repeat; vertical-align: -2px; }
.gd-spot { position: absolute; top: -10px; right: 12px; padding: 1px 8px; border: 2px solid #8a5a00; border-radius: 5px; background: #ffe27a; color: #5a3a00; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.gd-spot.inline { position: static; }
.gd-note { margin-top: 7px; color: var(--ink-3); font-size: 13px; }
.gd-note.why, .gd-why { color: var(--danger); font-weight: 600; }
.gd-quote { padding: 8px 10px; border-left: 4px solid var(--c, var(--blue)); background: #f7fbff; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.gd-quote.small { margin: 6px 0 0; font-size: 13px; }
.gd-sect { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 2px 8px; }
.gd-sect h3 { font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.gd-you { display: inline-block; padding: 0 4px; border-radius: 3px; background: var(--sel-line); color: #fff; font-size: 11px; font-weight: 400; line-height: 15px; vertical-align: 2px; }
.gd-rk { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 22px; padding: 0 7px; border: 2px solid; border-radius: 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.gd-rk.founder { border-color: #8a5a00; background: #fff1c2; color: #6a4a00; }
.gd-rk.cofounder { border-color: #b0761a; background: #fdf0d8; color: #7a4a00; }
.gd-announce { display: block; margin-top: 6px; padding: 4px 8px; border-radius: 6px; background: var(--announce); color: var(--gold); font-weight: 700; }

/* ------------------------------------------------------------------ the board */
.gd-board { flex: 1; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); gap: 12px; }
.gd-board.wide { grid-template-columns: minmax(0, 1fr) 440px; }
.gd-board.mid { grid-template-columns: minmax(0, 1fr) 360px; }
.gd-results { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.gd-tools { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gd .gd-tools .gd-q { flex: 1 1 220px; min-width: 0; }
.gd-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gd-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 9px; border: 3px solid var(--plain-line); border-radius: 8px; background: var(--plain); font-size: 14px; font-weight: 600; white-space: nowrap; }
.gd-chip[aria-pressed=true] { border-color: var(--sel-line); background: var(--sel); }
.gd-tick { display: none; }
.gd-chip[aria-pressed=true] .gd-tick:not(.box)::before { content: "✓"; }
.gd-chip[aria-pressed=true] .gd-tick:not(.box) { display: inline; }
.gd-tick.box { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 3px solid var(--frame); border-radius: 4px; background: #fff; font-size: 12px; }
.gd-chip[aria-pressed=true] .gd-tick.box::before { content: "✓"; }
@media (hover: hover) { .gd-chip:hover { border-color: var(--sel-line); } }
.gd-rhead { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.gd-rtitle { font-size: 16px; white-space: nowrap; }
.gd-rtitle .gd-muted { font-size: 14px; font-weight: 400; }
.gd-sort { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.gd .gd-sortsel { height: 32px; font-size: 14px; }
.gd-gcards { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); grid-auto-rows: min-content; align-content: start; gap: 10px; overflow-y: auto; overscroll-behavior: contain; padding: 12px 2px 2px; }
.gd-gc { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 12px; row-gap: 5px; min-height: 150px; margin: 0; padding: 10px 12px 10px 10px; border: 3px solid var(--blue); border-radius: 12px; background: var(--slot); text-align: left; }
.gd-gc.sel { border-color: var(--sel-line); background: var(--sel); }
.gd-gc.spot { box-shadow: 0 0 0 2px #ffe27a; }
@media (hover: hover) { .gd-gc:hover { border-color: var(--sel-line); } }
.gd-gcbn { grid-row: 1 / 3; display: flex; justify-content: center; }
.gd-gcbn canvas { margin: -6px -10px -8px; }
.gd-gcnm { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 18px; white-space: nowrap; }
.gd-gcnm b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gd-gclv { margin-left: auto; color: var(--ink-2); font-size: 15px; font-weight: 600; }
.gd-gcfacts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14px; white-space: nowrap; }
.gd-mem { display: inline-flex; align-items: center; gap: 6px; }
.gd-ter { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.gd-ter.none { color: var(--ink-3); }
.gd-gcdesc { grid-column: 1 / -1; align-self: end; display: flex; align-items: center; min-height: 52px; padding: 5px 10px; border-radius: 8px; background: #ffffffb0; color: var(--ink-2); font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.gd-gc.sel .gd-gcdesc { background: #fff8ec; }
.gd-pager { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; }
.gd-pager:empty { display: none; }
.gd-pg { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 32px; padding: 0 6px; border: 3px solid var(--blue); border-radius: 6px; background: var(--sky); font-size: 14px; }
.gd-pgn { color: var(--ink-2); font-size: 14px; }
.gd-onl { display: flex; align-items: center; gap: 6px; }
.gd-myapps { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 2px solid var(--rule); border-radius: 10px; background: #f7fbff; color: var(--ink-2); font-size: 14px; }
.gd-myapps b { color: var(--ink); }
.gd-myapps .px-btn { margin-left: auto; }
/* the chosen guild */
.gd-detail { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 3px solid var(--frame); border-radius: 12px; background: #fff; overflow: hidden; }
.gd-plate { flex: none; display: flex; gap: 12px; padding: 10px 14px 10px 10px; background: linear-gradient(#cfe6fa, #eef6fd); border-bottom: 3px solid var(--rule); }
.gd-plate canvas { flex: none; margin: -6px -12px -10px -10px; }
.gd-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 6px; }
.gd-meta h2 { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 22px; line-height: 1.1; }
.gd-meta h2 span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-dscroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 14px; display: flex; flex-direction: column; gap: 10px; }
.gd-kv { display: grid; grid-template-columns: 96px 1fr; align-items: baseline; row-gap: 7px; font-size: 14px; }
.gd-kv dt { color: var(--ink-3); }
.gd-kv dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.gd-kv .gd-meter { width: 110px; }
.gd-apply { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 10px 14px 14px; border-top: 3px solid var(--sky); background: #f7fbff; }
.gd-applytop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gd-count { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.gd .gd-applytext { width: 100%; height: auto; min-height: 66px; padding: 7px 10px; line-height: 1.35; resize: vertical; }
.gd-apply .gd-act { width: 100%; height: 46px; font-size: 18px; }
.gd-applied { font-size: 14px; color: var(--ink-2); }
.gd-applied b { color: var(--ink); }
/* the phone's sheet */
.gd-sheethost:empty { display: none; }
.gd-scrim { position: absolute; inset: 0; z-index: 5; background: #0b122266; }
.gd-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; flex-direction: column; max-height: 90%; overflow-y: auto; overscroll-behavior: contain; border-top: 4px solid var(--frame); border-radius: 16px 16px 0 0; background: var(--cream); box-shadow: inset 0 3px 0 var(--ring), 0 -10px 30px #0006; }
/* (the facts at their own height: the sheet scrolls, so none stays under its
   pinned Apply; carried from the re-review, P1) */
.gd-sheet .gd-dscroll { flex: none; overflow: visible; }
.gd-grab { flex: none; display: flex; align-items: center; justify-content: center; width: 100%; height: 36px; margin: 0; padding: 0; border: 0; background: none; }
.gd-grab::before { content: ""; width: 48px; height: 5px; border-radius: 3px; background: #b8c4d4; }

/* ------------------------------------------------------------------ found a guild */
.gd-found { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.gd-refunds:empty { display: none; }
.gd-refunds { display: flex; flex-direction: column; gap: 6px; }
.gd-refund { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 2px solid #c98a2a; border-radius: 10px; background: var(--announce); font-size: 14px; }
.gd-refundtxt { flex: 1; min-width: 0; }
.gd-flow { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 440px; grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 14px; row-gap: 10px; }
.gd-top { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
/* the requirements */
.gd-reqs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; border: 3px solid var(--blue); border-radius: 12px; background: #eef5fc; }
.gd-req { display: flex; align-items: center; gap: 5px; min-height: 32px; padding: 2px 6px 2px 3px; border: 2px solid var(--rule); border-radius: 8px; background: #fff; font-size: 13px; }
.gd-req.no { border-color: var(--red-edge); background: #fdf0ed; }
.gd-req small { color: var(--ink-3); font-size: 12px; }
.gd-mk { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 2px solid #1e5a2c; border-radius: 5px; background: #2f9e4a; color: #fff; font-size: 13px; font-weight: 700; }
.gd-req.no .gd-mk { border-color: var(--red-dk); background: var(--red); }
.gd-allmet { margin-left: auto; padding: 1px 8px; border: 2px solid var(--plain-line); border-radius: 5px; background: var(--plain); color: var(--ink-2); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.gd-allmet.no { border-color: var(--red-edge); color: var(--red-dk); }
/* 1 Design — 2 Review — 3 Charter */
.gd-steps { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 2px; list-style: none; }
.gd-st { flex: none; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-3); font-size: 13px; font-weight: 600; text-transform: uppercase; }
.gd-st i { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 3px solid var(--plain-line); border-radius: 50%; background: var(--plain); font-size: 13px; font-style: normal; }
.gd-st.done { color: var(--green); }
.gd-st.done i { border-color: #1e5a2c; background: #2f9e4a; color: #fff; }
.gd-st.now { color: var(--ink); }
.gd-st.now i { border-color: var(--sel-line); background: var(--sel); }
.gd-stln { flex: 1; min-width: 8px; height: 3px; background: var(--rule); }
/* the form */
.gd-form { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px; border: 3px solid var(--blue); border-radius: 12px; background: #eef5fc; }
.gd-two { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 14px; }
.gd-fl { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gd-lab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.gd-lab .gd-kick { color: var(--ink); }
.gd-hint { margin: 0; color: var(--ink-3); font-size: 13px; }
.gd .gd-fl .px-field { width: 100%; height: 42px; font-size: 17px; }
.gd .gd-tagin { text-transform: uppercase; }
.gd .px-field.bad { border-color: var(--red-edge); }
.gd-line { min-height: 18px; color: var(--ink-3); font-size: 13px; overflow-wrap: anywhere; }
.gd-line:empty { min-height: 0; }
.gd-line.good { color: var(--green); }
.gd-line.bad { color: var(--danger); font-weight: 600; }
.gd-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gd-sw { position: relative; flex: none; width: 56px; height: 56px; padding: 0; border: 3px solid var(--o); border-radius: 8px; background: var(--c); box-shadow: inset 0 3px 0 #ffffff40, inset 0 -3px 0 #00000026; }
.gd-sw[aria-pressed=true] { outline: 3px solid var(--sel-line); outline-offset: 3px; }
.gd-sw[aria-pressed=true]::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; font-weight: 700; text-shadow: 1px 1px 0 var(--o); }
.gd-sw.c-yellow[aria-pressed=true]::after { color: #4a3a00; text-shadow: none; }
.gd-picked { color: var(--ink-2); font-size: 14px; }
.gd-embs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding-top: 6px; }
.gd-emb { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; height: 92px; padding: 2px; border: 3px solid var(--o, #1e467e); border-radius: 10px; background: var(--c, #3f7fd0); box-shadow: inset 0 3px 0 #ffffff40, inset 0 -3px 0 #00000026; }
.gd-emb small { max-width: 100%; overflow: hidden; color: #fff; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; text-shadow: 1px 1px 0 var(--o, #1e467e); }
.gd-emb[aria-pressed=true] { outline: 3px solid var(--sel-line); outline-offset: 3px; }
.gd-emb.locked { border: 3px dashed var(--plain-line); background: var(--plain); box-shadow: none; }
.gd-emb.locked small { color: var(--ink-3); text-shadow: none; }
.gd-emb.locked .gd-glyph { opacity: .35; filter: grayscale(1) brightness(.6); }
.gd.gd [aria-disabled=true].gd-emb { opacity: 1; }
.gd-lock { position: absolute; top: -10px; right: -6px; height: 18px; padding: 0 4px; border: 2px solid var(--plain-line); border-radius: 4px; background: #fff; color: var(--ink-2); font-size: 11px; line-height: 14px; white-space: nowrap; }
.gd-glyph { flex: none; display: inline-block; background-repeat: no-repeat; image-rendering: pixelated; }
.gd-later { margin-top: auto; padding: 8px 12px; border: 2px dashed #c98a2a; border-radius: 8px; background: var(--announce); color: var(--gold); font-size: 13px; }
.gd-later b { color: var(--ink); }
/* the live preview */
.gd-pv { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; border: 3px solid var(--frame); border-radius: 12px; background: #fff; }
.gd-pvhead { padding: 9px 12px 8px; background: linear-gradient(#cfe6fa, #eef6fd); border-bottom: 3px solid var(--rule); }
.gd-pvhead h3 { font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.gd-pvstage { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 6px 12px 0; }
.gd-pvnm { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.gd-pvname { max-width: 100%; overflow: hidden; font-size: 24px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.gd-tagwrap { margin: 0 12px; padding: 8px 10px 10px; border: 2px solid var(--rule); border-radius: 10px; background: #f7fbff; }
.gd-tagwrap .gd-kick { display: block; margin-bottom: 6px; }
.gd-ntagbox { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 128px; padding: 8px; border: 3px solid var(--frame); border-radius: 8px; background: linear-gradient(#6aa84f 0 70%, #c9a36b 70%); overflow: hidden; }
.gd-ntag { display: inline-block; height: 18px; padding: 0 5px; background: rgba(16, 20, 32, .6); color: #fff; font-size: 16px; line-height: 18px; white-space: nowrap; }
.gd-ow { width: 48px; height: 96px; margin-top: -30px; image-rendering: pixelated; }
.gd-pvnote { margin: 0 12px; color: var(--ink-2); font-size: 13px; }
.gd-starts { margin: auto 12px 12px; padding: 8px 10px; border: 2px solid var(--rule); border-radius: 10px; background: #eef5fc; font-size: 14px; line-height: 1.4; }
.gd-starts .gd-kick { display: block; margin-bottom: 3px; }
/* the footer: Next */
.gd-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: 0 -14px -14px; padding: 12px 18px 14px; border-top: 3px solid var(--sky); background: #f7fbff; border-radius: 0 0 8px 8px; }
.gd-foottxt { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.gd-foottxt .gd-muted { font-size: 13px; }
.gd-footbtn { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.gd-foot .gd-next { height: 50px; padding: 0 26px; font-size: 18px; }
/* 2 Review */
.gd-review { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; background: var(--cream); border: 4px solid var(--frame); border-radius: 12px; box-shadow: inset 0 0 0 3px var(--ring); }
.gd-found.review .gd-review { grid-column: 1 / -1; justify-self: center; width: min(620px, 100%); align-self: start; }
.gd-revhead { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 2px dashed var(--rule); }
.gd-revhead h3 { font-size: 17px; letter-spacing: .04em; text-transform: uppercase; }
.gd-revhead .gd-mark { width: 14px; height: 20px; border-width: 2px; }
.gd-done { margin-left: auto; padding: 1px 8px; border: 2px solid var(--plain-line); border-radius: 5px; background: var(--plain); color: var(--ink-2); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.gd-revsum { display: flex; align-items: center; gap: 12px; }
.gd-revname { display: flex; align-items: center; gap: 6px; font-size: 18px; }
.gd-cost { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.gd-cost b { font-size: 26px; font-variant-numeric: tabular-nums; }
.gd-terms { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.gd-terms li { display: flex; gap: 8px; }
.gd-terms li::before { content: "▶"; flex: none; color: var(--blue); font-size: 10px; line-height: 19px; }
.gd-revacts { display: flex; flex-wrap: wrap; gap: 8px; }
.gd-revacts .gd-pay { flex: 1 1 260px; height: 46px; font-size: 16px; }
/* 3 Charter */
.gd-found.charter .gd-flow { grid-template-rows: auto minmax(0, 1fr); }
.gd-found.charter .gd-steps { grid-column: 1 / -1; }
.gd-charter { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 14px; border: 3px solid var(--frame); border-radius: 12px; background: #fff; }
.gd-band { display: flex; align-items: center; gap: 12px; min-height: 88px; margin: 12px 12px 0; padding: 0 34px 0 4px; border-radius: 8px 0 0 8px; background: var(--c); color: #fff; box-shadow: inset 0 3px 0 #ffffff40, inset 0 -3px 0 var(--o); clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 50%, 100% 100%, 0 100%); text-shadow: 1px 1px 0 var(--o); }
.gd-band canvas { flex: none; margin: -4px -8px; }
.gd-bandtxt { min-width: 0; }
.gd-band small { display: block; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; opacity: .9; }
.gd-band b { display: block; font-size: 23px; line-height: 1.15; }
.gd-time { margin-left: auto; flex: none; text-align: right; }
.gd-time b { font-size: 28px; font-variant-numeric: tabular-nums; }
.gd-timer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 14px 0; color: var(--ink-2); font-size: 14px; }
.gd-meter.time { flex: 1; min-width: 80px; width: auto; }
.gd-charter .gd-sect { margin: 14px 14px 8px; }
.gd-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 14px; }
.gd-slot { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 170px; padding: 10px 12px; border: 3px solid var(--blue); border-radius: 12px; background: var(--slot); }
.gd-slot.me { border-color: var(--sel-line); background: var(--sel); }
.gd-slot.open { border: 3px dashed var(--plain-line); background: var(--plain); }
.gd-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gd-who b { display: block; font-size: 18px; }
.gd-who span { font-size: 13px; color: var(--ink-2); }
.gd-st2 { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.gd-signed { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border: 2px solid #1e5a2c; border-radius: 6px; background: #2f9e4a; color: #fff; font-size: 14px; font-weight: 700; }
.gd-plus { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 16px; font-weight: 700; }
.gd-plus i { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 3px dashed var(--plain-line); border-radius: 8px; background: #fff; font-size: 20px; font-style: normal; }
.gd-slot p { font-size: 13px; }
.gd-inv-form { display: flex; gap: 6px; margin-top: auto; }
.gd .gd-inv-form .px-field { flex: 1; width: 0; min-width: 0; height: 36px; }
.gd-inv-form .px-btn { height: 36px; }
.gd-waiting, .gd-rule2 { margin: 8px 14px 0; color: var(--ink-2); font-size: 13px; }
.gd-held { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 14px 0; padding: 9px 12px; border: 2px solid var(--rule); border-radius: 10px; background: #f7fbff; font-size: 15px; }
.gd-held > span:nth-child(2) { flex: 1 1 240px; }
.gd-after { margin: 14px 14px 0; padding: 10px 12px; border: 2px dashed #c98a2a; border-radius: 10px; background: #fffaf0; color: var(--ink-2); font-size: 14px; }
.gd-after .gd-kick { display: block; margin-bottom: 6px; }
.gd-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; }

/* ------------------------------------------------------------------ invites */
.gd-invites { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; overflow: hidden; }
.gd-invsec { display: flex; flex-direction: column; min-height: 0; }
.gd-invlist, .gd-applist { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.gd-inv { display: flex; gap: 12px; padding: 10px 12px; border: 3px solid var(--blue); border-radius: 12px; background: var(--slot); }
.gd-inv > canvas { flex: none; margin: -6px -12px -8px -10px; }
.gd-invbody { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.gd-invtext { font-size: 15px; }
.gd-inv.charter-row { align-items: center; border-color: var(--sel-line); background: #fff8ec; }
.gd-inv.charter-row > canvas { flex: none; margin: -3px -6px -4px -5px; }
.gd-inv.charter { flex-direction: column; background: var(--cream); border: 4px solid var(--frame); box-shadow: inset 0 0 0 3px var(--ring); }
.gd-invhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 2px dashed var(--rule); }
.gd-invhead h4 { font-size: 17px; letter-spacing: .04em; text-transform: uppercase; }
.gd-invhead .gd-muted { margin-left: auto; font-size: 13px; }
.gd-invhead .gd-mark { width: 14px; height: 20px; border-width: 2px; }
.gd-sign { display: flex; gap: 12px; align-items: flex-start; }
.gd-sign > canvas { flex: none; margin: -6px -12px -8px -10px; }
.gd-sign p { font-size: 16px; line-height: 1.35; }
.gd-acts { display: flex; gap: 8px; margin-top: 8px; }
.gd-acts .px-btn { flex: 1; height: 42px; font-size: 16px; }
.gd-app { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 3px solid var(--blue); border-radius: 12px; background: var(--slot); }
.gd-apptxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }

/* ------------------------------------------------------------------ a member's tabs (previews g4, g9b, g6, g9, g9c) */
.gd-member { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.gd-right { margin-left: auto; }
.gd-pres { flex: none; width: 10px; height: 10px; background: #2f9e4a; }
.gd-pres.off { background: none; box-shadow: inset 0 0 0 2px #8a94a4; }
.gd-good { color: var(--green); font-weight: 600; font-size: 14px; }
.gd-count { white-space: nowrap; }
.gd-note.why, .gd .why { color: var(--danger); font-weight: 700; }
/* a card: a white box with the preview's light-blue head */
.gd-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 0 12px 12px; border: 3px solid var(--frame); border-radius: 12px; background: #fff; }
.gd-card > .gd-cardhead:first-child { margin: 0 -12px; padding: 8px 12px 7px; border-radius: 9px 9px 0 0; background: linear-gradient(#cfe6fa, #eef6fd); border-bottom: 3px solid var(--rule); }
.gd-cardhead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.gd-cardhead h3 { display: flex; align-items: center; gap: 7px; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
/* rank badges: the Founder's crown, the Co-founders' star, a custom rank's diamond in its colour */
.gd-rk { gap: 4px; padding: 0 6px 0 4px; line-height: 1; }
.gd-rk.custom { border-color: var(--o, #6a7486); background: var(--l2, #eeeee4); color: var(--t, #4e5868); }
.gd .c-grey, .gd-confirm .c-grey { --c: #8a9ab0; --o: #3e4a5e; --l: #c4ccd8; --t: #4e5868; }
.gd-rk.c-red { --l2: #fbe3de; }
.gd-rk.c-orange { --l2: #fde8d2; }
.gd-rk.c-yellow { --l2: #fbf1c8; }
.gd-rk.c-green { --l2: #e4f4dc; }
.gd-rk.c-teal { --l2: #d8f1ee; }
.gd-rk.c-blue { --l2: #dcecfa; }
.gd-rk.c-purple { --l2: #ece2f8; }
.gd-rk.c-pink { --l2: #fbe2ee; }
.gd-rk.c-grey { --l2: #eeeee4; }
.gd-rkg { flex: none; display: inline-block; font-style: normal; }
.gd-rkg.crown { width: 14px; height: 11px; background: linear-gradient(#f0cc50 70%, #b08a24 70%); clip-path: polygon(0 20%, 25% 55%, 50% 0, 75% 55%, 100% 20%, 100% 100%, 0 100%); }
.gd-rkg.star::before { content: "★"; color: #d49a16; font-size: 13px; }
.gd-rkg.dia { width: 10px; height: 10px; margin: 0 1px; border: 2px solid var(--o, #3e4a5e); background: var(--c, #8a9ab0); transform: rotate(45deg); }
.gd-rkglyph { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; }
.gd-rkglyph.big { width: 24px; transform: scale(1.4); }
.gd-lockg { flex: none; display: inline-block; width: 10px; height: 11px; border: 2px solid currentColor; border-top-width: 5px; border-radius: 3px 3px 2px 2px; vertical-align: -1px; }
/* a picture per kind of log line */
.gd-lg { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; font-style: normal; font-size: 14px; }
.gd-lg.pin::before { content: ""; width: 10px; height: 10px; border: 2px solid #7c2216; border-radius: 50%; background: #e0523f; box-shadow: 0 7px 0 -3px #7c2216; }
.gd-lg.star::before { content: "★"; color: #d49a16; font-size: 16px; }
.gd-lg.crown::before { content: ""; width: 16px; height: 12px; background: linear-gradient(#f0cc50 70%, #b08a24 70%); clip-path: polygon(0 20%, 25% 55%, 50% 0, 75% 55%, 100% 20%, 100% 100%, 0 100%); }
.gd-lg.person::before { content: ""; width: 12px; height: 14px; border-radius: 6px 6px 2px 2px; background: radial-gradient(circle at 50% 28%, #4a7fc0 0 4px, transparent 4.5px), linear-gradient(transparent 55%, #4a7fc0 55%); }
.gd-lg.rank::before { content: ""; width: 9px; height: 9px; border: 2px solid #1e467e; background: #3f7fd0; transform: rotate(45deg); }
.gd-lg.flag::before { content: ""; width: 12px; height: 14px; border-left: 2px solid #2a3a55; background: linear-gradient(#3f7fd0, #3f7fd0) 2px 0 / 9px 8px no-repeat; }
.gd-lg.mail::before { content: ""; width: 14px; height: 10px; border: 2px solid #4e5868; background: #fff; }
.gd-lg.dot::before { content: ""; width: 6px; height: 6px; background: var(--ink-3); }

/* ---- OVERVIEW (g4) */
.gd-overview { display: flex; flex-direction: column; overflow: hidden; }
.gd-ov { display: grid; gap: 12px; }
/* (a computer: two columns that fill the window, each scrolling on its own; the log takes the room left) */
.gd-ov.wide, .gd-ov.mid { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
.gd-ov.wide { grid-template-columns: minmax(0, 1fr) 590px; }
.gd-ov.mid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.gd-ov.wide .gd-ovcol, .gd-ov.mid .gd-ovcol { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.gd-ov.wide .gd-logcard, .gd-ov.mid .gd-logcard { flex: 1 1 160px; }
.gd-ov.wide .gd-log, .gd-ov.mid .gd-log { flex: 1; min-height: 0; max-height: none; }
.gd-ovcol > .gd-card:not(.gd-logcard), .gd-ovcol > .gd-stats, .gd-ovcol > .gd-appstrip { flex: none; }
.gd-ov.phone { display: flex; flex-direction: column; gap: 10px; }
.gd-ovcol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gd-noticecard .gd-cardhead .gd-kick { font-size: 12px; }
.gd-noticebox { display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px 12px 10px; border: 2px dashed #c98a2a; border-radius: 10px; background: var(--announce); font-size: 18px; line-height: 1.35; }
.gd-notice-text { overflow-wrap: anywhere; }
.gd-noticeby { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 13px; color: var(--ink-2); }
.gd-noticeby .px-face { width: 24px; height: 24px; }
.gd-noticeedit { display: flex; flex-direction: column; gap: 6px; }
.gd .gd-noticein, .gd .gd-desc { width: 100%; height: auto; min-height: 70px; padding: 7px 10px; line-height: 1.35; resize: vertical; }
.gd-logcard { min-height: 120px; }
.gd-log { display: flex; flex-direction: column; gap: 5px; max-height: 300px; margin: 0; padding: 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.gd-logrow { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 3px 12px 3px 6px; border: 2px solid var(--rule); border-radius: 8px; background: #fff; font-size: 15px; }
.gd-logrow.level { border-color: var(--sel-line); background: var(--sel); font-weight: 700; }
.gd-logtext { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.gd-logat { flex: none; font-size: 13px; white-space: nowrap; }
.gd-chatcard { background: var(--cream); }
.gd-chatlines { display: flex; flex-direction: column; gap: 2px; max-height: 150px; overflow-y: auto; padding-top: 2px; font-size: 15px; }
.gd-cl { overflow-wrap: anywhere; }
.gd-cl b { color: #6b3fa0; }
.gd-cl.sys { color: var(--ink-2); font-style: italic; }
/* (a sticker at x1; an event's reminder, as the chat tints it) */
.gd-cl.sk canvas { display: inline-block; vertical-align: middle; image-rendering: pixelated; }
.gd-cl.ev { padding: 2px 6px; border-radius: 6px; background: #efe7f8; color: #4a2a80; font-style: normal; }
.gd-clt { display: inline-block; width: 46px; font-size: 13px; }
.gd-chatform { display: flex; align-items: center; gap: 6px; }
.gd-chan { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border: 3px solid #9b7cc8; border-radius: 8px; background: #efe7f8; color: #6b3fa0; font-size: 14px; text-transform: uppercase; }
.gd-chan::before { content: ""; width: 8px; height: 8px; background: currentColor; }
.gd .gd-chatin { flex: 1; width: 0; }
.gd-rankcard { gap: 4px; padding: 8px 12px; border-color: var(--sel-line); background: #fff6e6; }
.gd-rankrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.gd-rankwhat { flex: 1 1 200px; min-width: 0; font-size: 13px; color: var(--ink-2); }
.gd-up { font-size: 14px; font-weight: 600; color: var(--green); }
.gd-cardhead .gd-lvlh { font-size: 20px; letter-spacing: .04em; }
.gd-xpbar { display: flex; align-items: center; gap: 10px; }
.gd-xpbar .gd-meter { flex: 1; height: 18px; border-width: 3px; border-radius: 5px; }
.gd-xpbar .gd-meter i { background: linear-gradient(#f7c65a 0 30%, #e8a82d 30%); }
.gd-xpbar b { font-size: 17px; white-space: nowrap; }
.gd-next { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; }
.gd-ladderhead { display: flex; gap: 8px; }
.gd-ladderhead .gd-kick { font-size: 11px; }
.gd-ladder { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }
.gd-lv { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 54px; border: 2px solid var(--rule); border-radius: 6px; background: #f7fbff; font-size: 12px; line-height: 1.15; color: var(--ink-3); }
.gd-lv b { font-size: 16px; color: var(--ink-2); }
.gd-lv small { font-size: 11px; }
.gd-lv.done { border-color: var(--blue); background: var(--slot); color: var(--ink-2); }
.gd-lv.now { border-color: var(--sel-line); background: var(--sel); color: var(--ink); }
.gd-lv.look::after { content: ""; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border: 2px solid #8a5a00; border-radius: 50%; background: #ffd64a; }
.gd-sources { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; margin: 0; padding: 0; list-style: none; }
.gd-sources li { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 0 10px; border: 2px solid var(--rule); border-radius: 8px; background: #f7fbff; font-size: 14px; }
.gd-sources b { color: var(--gold); font-size: 15px; }
.gd-cap { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.gd-cap b { color: var(--ink); }
.gd-today { font-size: 14px; color: var(--ink-2); }
.gd-today.full { color: var(--gold); font-weight: 600; }
.gd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gd-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px; border: 3px solid var(--blue); border-radius: 12px; background: var(--slot); }
.gd-stat .gd-kick { font-size: 12px; }
.gd-stat b { font-size: 21px; }
.gd-stat small { font-size: 12px; color: var(--ink-2); }
.gd-stat.online b::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; background: #2f9e4a; }
.gd-appstrip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 2px dashed #c98a2a; border-radius: 12px; background: var(--announce); font-size: 14px; color: var(--ink-2); }
.gd-appstrip b { color: var(--ink); }
.gd-appstrip .px-btn { margin-left: auto; }
.gd-recform { display: flex; flex-direction: column; gap: 6px; }
.gd .gd-recin { width: 100%; }
.gd-recline { padding: 4px 8px; border-radius: 6px; background: var(--announce); color: var(--gold); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.gd-recbtn { align-self: flex-start; }

/* ---- MEMBERS (g9b; phone g5) */
.gd-members { display: grid; gap: 12px; overflow: hidden; }
.gd-members.wide { grid-template-columns: minmax(0, 1fr) 430px; }
.gd-members.mid { grid-template-columns: minmax(0, 1fr) 320px; }
.gd-mmain { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.gd-mtools { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.gd .gd-mq { width: 260px; max-width: 100%; }
.gd-seg { flex: none; display: inline-flex; border: 3px solid var(--blue); border-radius: 8px; background: var(--sky); overflow: hidden; }
.gd-segb { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 0; background: none; font-size: 14px; font-weight: 600; text-transform: uppercase; white-space: nowrap; }
.gd-segb + .gd-segb { border-left: 3px solid var(--blue); }
.gd-segb[aria-pressed=true] { background: var(--ink); color: #fff; }
.gd-mcount { font-size: 13px; }
.gd-invbtn { margin-left: auto; }
.gd-invform { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; padding: 8px 10px; border: 2px solid var(--rule); border-radius: 10px; background: #f7fbff; }
.gd .gd-invname { width: 220px; max-width: 100%; }
.gd-invnote { flex-basis: 100%; font-size: 13px; }
.gd-mhead, .gd-mr { display: grid; grid-template-columns: 24px 150px 118px minmax(0, 1fr) 76px 52px 32px; align-items: center; gap: 10px; }
.gd-mhead { flex: none; padding: 0 8px 2px 6px; color: var(--ink-3); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.gd-mhead span:first-child { grid-column: 1 / 3; }
.gd-mscroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.gd-mlist { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; }
.gd-mgrp { display: flex; align-items: center; gap: 8px; min-height: 22px; margin: 4px 4px 1px; color: var(--ink-3); font-size: 13px; letter-spacing: .07em; text-transform: uppercase; }
.gd-mgrp b { color: var(--ink-2); }
.gd-mgrp.over .gd-muted { color: var(--danger); font-weight: 700; }
.gd-grule { flex: 1; min-width: 12px; height: 0; border-top: 2px dashed var(--rule); }
.gd-gnote { text-transform: none; letter-spacing: 0; }
.gd-overcap { margin: 0 4px 4px; }
.gd-mr { min-height: 30px; padding: 1px 4px 1px 2px; border: 2px solid var(--rule); border-radius: 7px; background: #fff; font-size: 15px; cursor: pointer; }
.gd-mr.start { border-style: dashed; }
.gd-mr.sel { border-color: var(--sel-line); background: var(--sel); }
.gd-mr .px-face { width: 22px; height: 22px; border-radius: 4px; }
.gd-mr .gd-rk { height: 19px; font-size: 11px; }
.gd-mname { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; }
.gd-mname b { overflow: hidden; text-overflow: ellipsis; }
.gd-mwhere { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; }
.gd-where { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--ink-3); font-size: 14px; white-space: nowrap; }
.gd-where.on { color: var(--ink); }
.gd-upchip { flex: none; padding: 0 6px; border: 2px dashed #3d7a32; border-radius: 4px; background: #e4f4dc; color: #2a5a26; font-size: 12px; line-height: 16px; white-space: nowrap; }
.gd-mjoined { color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.gd-mxp { font-size: 14px; text-align: right; }
.gd-dots { display: flex; align-items: center; justify-content: center; width: 30px; height: 22px; padding: 0; border: 2px solid var(--blue); border-radius: 5px; background: var(--sky); font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: 1px; }
.gd-mr.sel .gd-dots { border-color: var(--sel-line); background: #fff; }
/* the ⋯ menu beside its row, and its rank list beside it */
.gd-mpopslot:empty { display: none; }
.gd-mpop { position: absolute; z-index: 4; top: 0; right: 8px; display: flex; align-items: flex-start; gap: 6px; }
/* (a computer: beside the list, over the Ranks card, pointing at its row: preview g9b) */
.gd-members.wide .gd-mpop { left: calc(100% + 4px); right: auto; }
.gd-members.wide .gd-mpop { gap: 2px; }
.gd-members.wide .gd-mmenu { min-width: 262px; }
.gd-members.wide .gd-msub { min-width: 150px; max-width: 160px; }
.gd-members.wide .gd-mmenu::before { content: ""; position: absolute; top: 22px; left: -13px; border: 9px solid transparent; border-right-color: var(--frame); border-left: 0; }
.gd-mmenu, .gd-msub { position: relative; min-width: 246px; }
.gd-msub { min-width: 190px; margin-top: 40px; }
.gd-mmhead .px-face { width: 34px; height: 34px; }
.gd-mmname { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.gd-mmname small { font-size: 13px; font-weight: 500; }
.gd-on { color: var(--green); }
.gd .px-item { font: inherit; font-size: 16px; }
.gd .px-item[aria-expanded=true] { background: var(--sel); }
.gd .px-item.off { color: var(--ink-3); }
.gd-tickmark { color: var(--green); font-weight: 700; }
/* the Ranks card beside the list */
.gd-ranksaside { overflow-y: auto; }
.gd-rkcard { padding: 7px 10px; border: 2px solid var(--rule); border-radius: 10px; background: #f7fbff; }
.gd-rkcard.founder { border-color: var(--sel-line); background: #fff6e6; }
.gd-rkcardh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 3px; }
.gd-rkcard p { color: var(--ink-2); font-size: 13px; line-height: 1.35; }
.gd-rkchips { display: flex; flex-wrap: wrap; gap: 5px; }
.gd-order { margin-top: auto; padding: 7px 10px; border: 2px dashed #c98a2a; border-radius: 8px; background: var(--announce); color: var(--gold); font-size: 13px; line-height: 1.35; }
.gd-order b { color: var(--ink); }

/* ---- APPLICATIONS */
.gd-apps { display: flex; flex-direction: column; gap: 8px; }
.gd-answers { flex: none; overflow: visible; }
.gd-answer { flex-wrap: wrap; align-items: flex-start; padding: 10px 12px; }
/* (the message has room of its own: on a narrow screen the buttons go under it) */
.gd-answer .gd-apptxt { flex: 1 1 240px; }
.gd-answer .gd-acts { flex: none; margin-top: 0; }
.gd-answer .gd-acts .px-btn { min-width: 110px; }

/* ---- SETTINGS (g6, g9, g9c) */
.gd-settings { display: flex; flex-direction: column; gap: 10px; }
.gd-subbar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gd-subnote { margin-left: auto; }
.gd-setpanel { flex: 1; min-height: 0; }
.gd-general { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.gd-setcol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gd-setnote { margin-top: 8px; font-size: 13px; }
.gd-jmodes { display: flex; flex-direction: column; gap: 8px; }
.gd-jmode { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border: 3px solid var(--blue); border-radius: 12px; background: #fff; text-align: left; }
.gd-jmode.on { border-color: var(--sel-line); background: var(--sel); }
.gd-jmode b { display: block; font-size: 16px; }
.gd-jmode small { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.3; }
.gd-radio { flex: none; width: 22px; height: 22px; margin-top: 2px; border: 3px solid var(--frame); border-radius: 50%; background: #fff; }
.gd-jmode.on .gd-radio { background: radial-gradient(circle, var(--sel-line) 0 5px, #fff 5.5px); }
.gd-setfoot { display: flex; align-items: center; gap: 10px; }
.gd-bnbuild { display: flex; flex-direction: column; gap: 8px; }
.gd-bnbuild .gd-swatches:not(.small) { gap: 8px; }
.gd-bnbuild .gd-swatches:not(.small) .gd-sw { width: 42px; height: 42px; }
.gd-bnpv { display: flex; align-items: center; gap: 14px; }
.gd-bnpv p { font-size: 13px; }
.gd-swatches.small { gap: 6px; }
.gd-sw.sm, .gd-swatches.small .gd-sw { width: 34px; height: 34px; border-radius: 7px; }
.gd-sw.locked { opacity: .45; }
.gd-sw.locked[aria-pressed=true] { opacity: 1; }
.gd-swatches.small .gd-chip { height: 34px; }
.gd-swatches .gd-chip.on { border-color: var(--sel-line); background: var(--sel); }
.gd-sets { flex-wrap: wrap; }
.gd-lvlmark { margin-left: 4px; font-size: 11px; opacity: .8; }
.gd-embpick { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding-top: 4px; }
.gd-embpick.many { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.gd-embpick .gd-emb { height: 48px; }
.gd-embpick .gd-lock { top: auto; bottom: -8px; right: 50%; transform: translateX(50%); font-size: 10px; }
.gd-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; }
.gd-look { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 4px 2px 6px; border: 3px solid var(--blue); border-radius: 10px; background: #fff; }
.gd-look.on { border-color: var(--sel-line); background: var(--sel); }
.gd-look.locked { border: 3px dashed var(--plain-line); background: var(--plain); }
.gd-look.locked canvas { opacity: .5; }
.gd-look small { max-width: 100%; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.gd-look .gd-lock { top: -8px; right: -4px; }
.gd-bnacts { margin-top: 2px; }
.gd-rnfields { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 8px; }
.gd .gd-rnfields .px-field { width: 100%; }
.gd-rnform, .gd-rninfo { display: flex; flex-direction: column; gap: 6px; }
.gd-rninfo .px-btn { align-self: flex-start; }
.gd-rncost { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.gd-danger { border-color: #b0281e; background: #fdf1ee; }
.gd-danger > .gd-cardhead:first-child { background: none; border-bottom-color: #f0c4bc; color: #b0281e; }
.gd-disband { width: 100%; }
/* RANKS: the ladder | the editor */
.gd-ranks { display: grid; gap: 12px; align-items: start; }
/* (a computer: the ladder and the editor fill the window; the editor's switches scroll, its Delete / Save stay in view: preview g9) */
.gd-settings.ranks.wide, .gd-settings.ranks.mid { overflow: hidden; }
.gd-settings.ranks.wide .gd-setpanel, .gd-settings.ranks.mid .gd-setpanel { display: flex; flex-direction: column; }
.gd-ranks.wide, .gd-ranks.mid { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
.gd-ranks.wide > .gd-card, .gd-ranks.mid > .gd-card { min-height: 0; }
.gd-ranks.wide .gd-rlcard, .gd-ranks.mid .gd-rlcard { overflow-y: auto; overscroll-behavior: contain; }
.gd-ranks.wide .gd-rkedit, .gd-ranks.mid .gd-rkedit { overflow: hidden; }
.gd-ranks.wide .gd-edbody, .gd-ranks.mid .gd-edbody { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.gd-ranks.wide { grid-template-columns: 500px minmax(0, 1fr); }
.gd-ranks.mid { grid-template-columns: 360px minmax(0, 1fr); }
.gd-rlcard { gap: 6px; border-color: var(--blue); background: #eef5fc; }
.gd-rladder { display: flex; flex-direction: column; gap: 6px; }
.gd-rrowwrap { display: flex; align-items: stretch; gap: 4px; }
.gd-rrow { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 52px; padding: 2px 10px 2px 8px; border: 3px solid var(--blue); border-radius: 12px; background: var(--slot); text-align: left; }
.gd-rrow.sel { border-color: var(--sel-line); background: var(--sel); }
.gd-rrow.over small { color: var(--danger); font-weight: 700; }
.gd-rrowtxt { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.gd-rrowtxt b { font-size: 17px; }
.gd-rrowtxt small { overflow: hidden; color: var(--ink-2); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.gd-rarrow { flex: none; color: var(--ink-2); font-size: 13px; }
.gd-fixed { flex: none; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-3); font-size: 13px; }
.gd-startchip { flex: none; display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border: 2px solid #3d7a32; border-radius: 4px; background: #e4f4dc; color: #2a5a26; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.gd-rmoves { flex: none; display: flex; flex-direction: column; gap: 3px; }
.gd-rmove { flex: 1; width: 34px; padding: 0; border: 2px solid var(--blue); border-radius: 6px; background: var(--sky); font-size: 12px; }
.gd-rdiv { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.gd-rdiv::after { content: ""; flex: 1; border-top: 2px dashed var(--rule); }
.gd-rdiv .gd-kick { font-size: 12px; }
.gd-radd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 44px; padding: 4px 12px; border: 3px dashed var(--plain-line); border-radius: 12px; background: var(--plain); color: var(--ink-2); font-size: 14px; text-align: left; }
.gd-radd b { color: var(--ink); font-size: 15px; }
.gd-radd small { margin-left: auto; font-size: 13px; }
.gd-radd.sel { border-color: var(--sel-line); background: var(--sel); }
.gd-startbox { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; padding: 8px 10px; border: 2px solid var(--rule); border-radius: 10px; background: #fff; font-size: 14px; }
.gd-startrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.gd-startrow .gd-kick { color: var(--ink); }
.gd .gd-startsel, .gd .gd-autosel { min-width: 112px; height: 32px; padding: 0 28px 0 8px; font-size: 14px; }
.gd .gd-autodays { width: 52px; height: 32px; padding: 0 4px; font-size: 14px; text-align: center; }
.gd-check { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 3px solid var(--frame); border-radius: 5px; background: #fff; font-size: 13px; font-weight: 700; }
.gd-check[aria-checked=true] { background: var(--blue); color: #fff; }
.gd-startfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gd-startfoot .px-btn { margin-left: auto; }
.gd-rkedit { padding-bottom: 0; }
.gd-edhead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 -12px; padding: 8px 12px 7px; border-radius: 9px 9px 0 0; background: linear-gradient(#cfe6fa, #eef6fd); border-bottom: 3px solid var(--rule); }
.gd-edhead h3 { font-size: 21px; }
.gd-edbody { display: flex; flex-direction: column; gap: 8px; }
.gd .gd-rkname { width: 100%; }
.gd-rknamefl { max-width: 360px; }
.gd-perms { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5px 8px; }
.gd-perms.fo { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gd-perm { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 4px 8px 4px 10px; border: 2px solid var(--rule); border-radius: 8px; background: #fff; font-size: 14px; line-height: 1.25; text-align: left; }
.gd-perm.off { background: #f7fbff; color: var(--ink-2); }
.gd-perm.locked, .gd-perm.fo { border-style: dashed; border-color: var(--plain-line); background: var(--plain); color: var(--ink-3); }
.gd-perm.ro { cursor: default; }
.gd-permname { flex: 1; min-width: 0; }
.gd-tog { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 28px; border: 3px solid var(--plain-line); border-radius: 6px; background: var(--plain); color: var(--ink-3); font-size: 13px; }
.gd-tog.on { border-color: var(--frame); background: var(--blue); color: #fff; }
.gd-perm.locked .gd-tog, .gd-perm.fo .gd-tog { width: 34px; background: #fff; }
.gd-chg { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 3px; background: var(--sel-line); color: #fff; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.gd-givenote { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.gd-edfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 -12px; padding: 10px 12px 12px; border-top: 3px solid var(--sky); border-radius: 0 0 9px 9px; background: #f7fbff; }
.gd-edfoot:empty { display: none; }
.gd-edfoot .gd-save { min-width: 130px; height: 44px; margin-left: auto; font-size: 17px; }
.gd-del { border-color: #b0281e; background: #fdf1ee; color: #b0281e; }
.gd-delnote { max-width: 300px; font-size: 13px; line-height: 1.3; }
.gd-cochips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gd-cochip { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 3px 10px 3px 4px; border: 3px solid var(--sel-line); border-radius: 10px; background: #fff6e6; font-size: 14px; text-align: left; }
.gd-cochip span { display: flex; flex-direction: column; line-height: 1.2; }
.gd-cochip small { color: var(--ink-2); font-size: 12px; }
.gd-cochip.add { border: 3px dashed var(--plain-line); background: var(--plain); font-weight: 600; }
.gd-appoint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gd .gd-appointsel, .gd .gd-handsel { min-width: 180px; height: 38px; }
.gd-handover { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 10px; border: 3px solid var(--sel-line); border-radius: 12px; background: #fff6e6; }
.gd-handrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gd-handrow p { flex: 1 1 200px; color: var(--ink-2); font-size: 13px; }
.gd-back { flex: none; }
/* a confirm with a field (the tag to disband, the name to hand over) */
.gd-confirmform { display: flex; flex-direction: column; gap: 6px; }
.gd-confirm .gd-confirmin { width: 100%; height: 44px; font-size: 17px; }

/* ------------------------------------------------------------------ "How guilds work" */
.window.gd-cardscrim { inset: 0; max-width: none; max-height: none; padding: 8px; display: flex; align-items: center; justify-content: center; background: #0b122280; }
.pxui.gd-rules { flex: none; width: min(760px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; padding: 14px 16px 16px; }
.gd-rules-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 2px dashed var(--rule); }
.gd-rules-head h2 { font-size: 22px; letter-spacing: .04em; text-transform: uppercase; }
.gd-rules-head .gd-x { margin-left: auto; }
.gd-rules-list { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.gd-rule { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 5px 12px 5px 6px; border: 3px solid var(--blue); border-radius: 12px; background: var(--slot); font-size: 15px; line-height: 1.3; }
.gd-tile { flex: none; display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; overflow: hidden; border: 3px solid var(--frame); border-radius: 8px; background: #fff; font-size: 15px; }
.gd-tile canvas { flex: none; }
.gd-crown { display: inline-block; width: 28px; height: 22px; background: linear-gradient(#f0cc50 70%, #b08a24 70%); clip-path: polygon(0 20%, 25% 55%, 50% 0, 75% 55%, 100% 20%, 100% 100%, 0 100%); }
.gd-tile-star { color: #d49a16; font-size: 26px; }
.gd-tile-glyph { color: var(--blue-dk); font-size: 24px; font-weight: 700; }
.gd-tile .gd-coin { width: 26px; height: 26px; border-width: 3px; }
.gd-tile .gd-flag { width: 22px; height: 26px; border-left-width: 3px; background-size: 17px 14px; background-position: 3px 0; }
.gd-rules-more { margin-top: 10px; padding: 7px 10px; border: 2px dashed #c98a2a; border-radius: 8px; background: var(--announce); color: var(--gold); font-size: 13px; line-height: 1.45; }
.gd-rules-more b { color: var(--ink); }
.gd-rules-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.gd-rules-ok { min-width: 160px; height: 46px; font-size: 18px; }
/* a confirm (parts.js confirmCard) */
.pxui.gd-confirm { flex: none; width: min(460px, 100%); max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; }
.gd-confirm h2 { margin: 0; font-size: 19px; letter-spacing: .03em; }
.gd-confirm .gd-acts .px-btn { height: 44px; }

/* ------------------------------------------------------------------ mid */
.gd.mid .gd-flow { grid-template-columns: minmax(0, 1fr) 340px; }
.gd.mid .gd-embs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gd.mid .gd-two { grid-template-columns: minmax(0, 1fr) 150px; }
.gd.mid .gd-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gd.mid .gd-invites { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
.gd.mid .gd-invlist, .gd.mid .gd-applist { overflow: visible; flex: none; }
/* a member's tabs */
.gd.mid .gd-general { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.gd.mid .gd-mhead, .gd.mid .gd-mr { grid-template-columns: 24px 120px 108px minmax(0, 1fr) 44px 32px; }
.gd.mid .gd-mjoined, .gd.mid .gd-mhead span:nth-child(4) { display: none; }
.gd.mid .gd-perms.fo { grid-template-columns: minmax(0, 1fr); }

/* ------------------------------------------------------------------ phone */
.pxui.gd.phone { width: calc(100% - 12px); height: calc(100% - 16px); padding: 10px 10px 0; }
.gd.phone .gd-head { gap: 8px; padding: 0 0 8px; }
.gd.phone .gd-head h1 { font-size: 19px; }
.gd.phone .gd-wallet { display: none; }
.gd.phone .gd-help { margin-left: auto; }
.gd.phone.member .gd-help { margin-left: 0; }
.gd.phone.member .gd-title { flex: 1; }
.gd.phone .gd-x { width: 44px; height: 44px; }
.gd.phone .gd-tabs { flex-wrap: nowrap; gap: 5px; padding-bottom: 8px; border-bottom: 0; overflow-x: auto; scrollbar-width: none; }
.gd.phone .gd-tabs .px-pocket { flex: none; height: 44px; padding: 0 11px; font-size: 14px; }
/* one column that scrolls */
.gd.phone .gd-main { display: block; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 0 0 10px; scroll-padding-bottom: 110px; }
.gd.phone .gd-body, .gd.phone .gd-board, .gd.phone .gd-results, .gd.phone .gd-found, .gd.phone .gd-invites, .gd.phone .gd-member { display: block; overflow: visible; }
.gd.phone .gd-results > * + *, .gd.phone .gd-found > * + *, .gd.phone .gd-invites > * + * { margin-top: 8px; }
.gd.phone .gd-gcards { display: flex; flex-direction: column; gap: 8px; overflow: visible; padding-top: 10px; }
.gd.phone .gd-gc { min-height: 0; }
.gd.phone .gd-gcdesc { min-height: 0; background: none; padding: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.gd.phone .gd-myapps { flex-wrap: wrap; }
.gd.phone .gd-flow { display: flex; flex-direction: column; gap: 10px; }
.gd.phone .gd-form { overflow: visible; }
.gd.phone .gd-two { grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; }
.gd.phone .gd-embs { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.gd.phone .gd-emb { height: 52px; }
.gd.phone .gd-lock { top: auto; bottom: -8px; right: 50%; transform: translateX(50%); font-size: 10px; }
.gd.phone .gd-form { padding: 0; border: 0; background: none; }
.gd.phone .gd-swatches { display: grid; grid-template-columns: repeat(4, minmax(44px, 1fr)); gap: 8px; }
.gd.phone .gd-sw { width: auto; height: 44px; }
.gd.phone .gd-pv.phone { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 8px 10px; overflow: visible; }
.gd.phone .gd-pv.phone .gd-pvnm { flex: 1; }
.gd.phone .gd-pv.phone .gd-ntagbox { width: 100%; height: 76px; }
.gd.phone .gd-pv.phone .gd-ow { width: 32px; height: 64px; margin-top: -20px; }
.gd.phone .gd-pvname { font-size: 18px; }
.gd.phone .gd-foot { position: sticky; bottom: 0; z-index: 2; flex-direction: column; align-items: stretch; gap: 4px; margin: 0; padding: 8px 0 10px; border-radius: 0; box-shadow: 0 -8px 10px -8px #0b122255; }
.gd.phone .gd-footbtn { margin: 0; flex-direction: column; align-items: stretch; }
.gd.phone .gd-foot .gd-next { width: 100%; }
.gd.phone .gd-footnote { font-size: 12px; text-align: center; }
.gd.phone .gd-reqs { padding: 6px; gap: 6px; }
.gd.phone .gd-req { font-size: 13px; }
.gd.phone .gd-steps { gap: 5px; }
.gd.phone .gd-st { font-size: 12px; gap: 4px; }
.gd.phone .gd-charter { overflow: visible; }
.gd.phone .gd-band { min-height: 70px; padding-right: 26px; }
.gd.phone .gd-band b { font-size: 15px; }
.gd.phone .gd-band small { font-size: 11px; }
.gd.phone .gd-time b { font-size: 20px; }
.gd.phone .gd-slots { grid-template-columns: minmax(0, 1fr); }
.gd.phone .gd-slot { min-height: 0; }
.gd.phone .gd-invlist, .gd.phone .gd-applist { overflow: visible; }
.gd.phone .gd-inv { flex-wrap: wrap; }
.gd.phone .gd-head .gd-bn { margin: -8px -14px -10px -14px; }
.gd.phone .gd-sheet .gd-apply { position: sticky; bottom: 0; }
.gd.phone .gd-noticeslot { position: sticky; top: 0; z-index: 3; }
/* a member's tabs: one column (g4, g5 and g9 phone pages) */
.gd.phone .gd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gd.phone .gd-noticebox { font-size: 16px; }
.gd.phone .gd-log { max-height: none; overflow: visible; }
.gd.phone .gd-members, .gd.phone .gd-mmain, .gd.phone .gd-mscroll { display: block; overflow: visible; }
.gd.phone .gd-mq { flex: 1 1 110px; width: auto; }
.gd.phone .gd-mlist { gap: 6px; }
.gd.phone .gd-mr { grid-template-columns: 40px minmax(0, 1fr) 44px; min-height: 60px; padding: 6px 6px 6px 8px; border: 3px solid var(--blue); border-radius: 12px; background: var(--slot); }
.gd.phone .gd-mr.off { background: #eef5fc; }
.gd.phone .gd-mr.sel { border-color: var(--sel-line); background: var(--sel); }
.gd.phone .gd-mr .px-face { width: 40px; height: 40px; }
.gd-mcol { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gd-mline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.gd-mline.small { font-size: 13px; }
.gd.phone .gd-dots { width: 44px; height: 44px; border-width: 3px; border-color: var(--frame); border-radius: 8px; background: #fff; }
.gd-msheet { padding: 0 0 12px; }
.gd-msheet .px-menu-head { margin: 0 12px 6px; }
.gd-sheetacts { display: flex; flex-direction: column; gap: 8px; padding: 4px 12px 8px; }
.gd-msheet .px-item { min-height: 48px; padding: 0 14px; border: 3px solid var(--blue); border-radius: 10px; background: var(--sky); font-weight: 600; text-transform: uppercase; }
.gd-msheet .px-item::before { display: none; }
.gd-msheet .px-item.danger { border-color: #b0281e; background: #fdf1ee; }
.gd-msheet .px-item.off { border-style: dashed; border-color: var(--plain-line); background: var(--plain); }
.gd-msub.phone { min-width: 0; margin: 4px 12px 8px; }
.gd-msheet .gd-cancel { margin: 0 12px; height: 48px; }
.gd.phone .gd-general, .gd.phone .gd-ranks { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.gd.phone .gd-subnote { display: none; }
.gd.phone .gd-perms, .gd.phone .gd-perms.fo { grid-template-columns: minmax(0, 1fr); }
.gd.phone .gd-swatches.small { display: grid; grid-template-columns: repeat(5, minmax(44px, 1fr)); gap: 6px; }
.gd.phone .gd-swatches.small .gd-sw { width: auto; height: 44px; }
.gd.phone .gd-embpick, .gd.phone .gd-embpick.many { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.gd.phone .gd-looks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gd.phone .gd-rrow { min-height: 58px; }
.gd.phone .gd-rarrow { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 3px solid var(--frame); border-radius: 8px; background: #fff; }
.gd.phone .gd-rkedit { border: 0; padding: 0; background: none; }
.gd.phone .gd-edhead { margin: 0; border-radius: 10px; }
/* (flush with the window's bottom edge: .gd-main keeps 10 px of padding under it) */
.gd.phone .gd-edfoot { position: sticky; bottom: -10px; z-index: 2; margin: 0; border-radius: 0; box-shadow: 0 -8px 10px -8px #0b122255; }
.gd.phone .gd-answer .gd-acts { flex: 1 1 100%; }
.gd.phone .gd-answer .gd-acts .px-btn { flex: 1; min-width: 0; }
.gd.phone .gd-edfoot .gd-save { flex: 1; }
/* (a phone: Delete rank and Save side by side, as preview g9 phone; where the members go is in the confirm) */
.gd.phone .gd-edfoot { flex-wrap: nowrap; }
.gd.phone .gd-delnote { display: none; }
.gd.phone .gd-rrowtxt .gd-startchip { align-self: flex-start; margin-top: 3px; }

/* ------------------------------------------------------------------ short */
/* A phone on its side (about 390 px high): one header row with the tabs in
   it, no kicker or tab note; the columns scroll on their own. */
.pxui.gd.short { padding: 6px 10px 8px; }
.pxui.gd.short.phone { padding: 6px 8px 0; }
.gd.short .gd-head { gap: 6px; padding: 0 0 6px; border-bottom: 2px dashed var(--rule); }
.gd.short .gd-head h1 { font-size: 18px; }
.gd.short .gd-head .gd-tabs { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; gap: 5px; padding: 0; border: 0; overflow-x: auto; scrollbar-width: none; }
.gd.short .gd-head .px-pocket { flex: none; height: 44px; padding: 0 10px; font-size: 14px; }
.gd.short .gd-wallet { height: 44px; gap: 5px; padding: 0 8px; font-size: 14px; }
.gd.short .gd-x { width: 44px; height: 44px; }
.gd.short .gd-main { padding-top: 6px; }
.gd.short .gd-head .gd-bn { display: none; }
.gd.short .gd-gc { min-height: 0; }
/* (the cards' column scrolls as one: the search, the chips, the cards, the pager) */
.gd.short:not(.phone) .gd-results { overflow-y: auto; overscroll-behavior: contain; }
.gd.short:not(.phone) .gd-gcards { flex: none; overflow: visible; padding-top: 12px; }
.gd.short .gd-myapps { padding: 4px 8px; font-size: 13px; }
.gd.short .gd-gcdesc { min-height: 0; }
.gd.short .gd-plate canvas { display: none; }
.gd.short .gd-apply { padding: 6px 10px 8px; }
.gd.short .gd-apply .gd-act { height: 44px; font-size: 16px; }
.gd.short .gd-flow { flex: none; }
.gd.short .gd-invites { overflow-y: auto; }
.gd.short .gd-invlist, .gd.short .gd-applist { flex: none; overflow: visible; }
.gd.short .gd-found { overflow-y: auto; }
.gd.short .gd-flow { grid-template-rows: auto auto auto; }
.gd.short .gd-form, .gd.short .gd-pv, .gd.short .gd-charter { overflow: visible; }
.gd.short .gd-foot { position: sticky; bottom: 0; z-index: 2; margin: 0; padding: 6px 10px; border-radius: 8px; }
.gd.short .gd-foot .gd-next { height: 44px; }
.gd.short .gd-foottxt .gd-muted { display: none; }
.gd.short.phone .gd-head h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gd.short.phone .gd-head .gd-mark { display: none; }
.gd.short .gd-log, .gd.short .gd-chatlines { max-height: none; }
/* (a member's header stays one row; the members' list takes the width, the Ranks card is in SETTINGS) */
.gd.short .gd-head .gd-hline { flex-wrap: nowrap; }
.gd.short .gd-head .gd-hline .gd-rk { display: none; }
.gd.short .gd-members.mid, .gd.short .gd-members.wide { grid-template-columns: minmax(0, 1fr); }
.gd.short .gd-ranksaside { display: none; }
.gd.short .gd-members.wide .gd-mpop { left: auto; right: 8px; }
.gd.short .gd-members.wide .gd-mmenu::before { display: none; }

/* ------------------------------------------------------------------ inside Hub */
/* Hub → GUILD (client/js/ui/hub/guild.js; social-hub preview v2 h7, v1's s5):
   the window built into Hub's panel (.gd.embedded, no .pxui: Hub is the
   kit's window). No frame, size, "?" or ✕ of its own (Hub's); its header
   (the banner, [TAG] name, the level and counts; the wallet and "How guilds
   work" as a text button), the kit's small tabs (.px-tab) under a dashed
   rule, then the tab. On a computer it fills Hub's panel and a tab's own
   lists scroll, as in the window; on a phone and on its side (.phone: a
   phone's room, or Hub's 640 px side panel) Hub's .hub-main scrolls it
   all, so nothing here bounds its height. Never .short. */
.gd.embedded { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.gd.embedded .gd-head { padding: 0 2px 8px; }
.gd.embedded .gd-head h2 { min-width: 0; overflow: hidden; font-size: 23px; font-weight: 700; letter-spacing: .02em; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.gd.embedded:not(.member) .gd-head h2 { font-size: 22px; letter-spacing: .04em; text-transform: uppercase; }
.gd.embedded .gd-rulesbtn { flex: none; }
.gd.embedded .gd-tabs { gap: 4px; padding: 2px 0 8px; }
.gd.embedded .gd-tabs .px-tab { flex: none; padding: 0 12px; }
.gd.embedded .gd-main { padding-top: 10px; }
.gd.embedded.phone { flex: none; }
.gd.embedded.phone .gd-head h2 { font-size: 19px; }
/* (a phone: the button on two lines, so the guild's name has the row) */
.gd.embedded.phone .gd-rulesbtn { width: 86px; height: auto; min-height: 40px; margin-left: auto; padding: 2px 6px; font-size: 12px; line-height: 1.15; white-space: normal; }
.gd.embedded.phone.member .gd-title { flex: 1; }
.gd.embedded.phone.member .gd-rulesbtn { margin-left: 0; }
/* (the tabs wrap onto a second row when they must: every one in view, with
   a mouse too; the window of its own scrolls them sideways) */
.gd.embedded.phone .gd-tabs { flex-wrap: wrap; overflow: visible; padding-bottom: 8px; border-bottom: 2px dashed var(--rule); }
.gd.embedded.phone .gd-main { overflow: visible; padding: 10px 0 0; }
/* a short wide computer screen (index.js COMPACT_MAX, 'wide' only: 1280 ×
   600, 1366 × 657): Hub's header and tabs sit above the Guild's, so it gives
   back a row: one header row with the tabs in it (as the window of its own
   on a phone on its side), a 1× banner, no tab note. The tabs never shrink
   or hide: the guild's name gives way ("…") */
.gd.embedded.compact .gd-head { gap: 8px; padding: 0 2px 6px; border-bottom: 2px dashed var(--rule); }
.gd.embedded.compact .gd-head .gd-bn { margin: -2px -4px -4px -6px; }
.gd.embedded.compact .gd-head h2 { font-size: 19px; }
.gd.embedded.compact .gd-head .gd-tabs { flex: none; flex-wrap: nowrap; padding: 0; border: 0; }
.gd.embedded.compact .gd-head .gd-title { flex: 0 1 auto; min-width: 0; }
.gd.embedded.compact .gd-main { padding-top: 8px; }
/* the Board's chosen guild, however short Hub is (carried from the review,
   I2: the window of its own had the room). With room, as the window: the
   plate, the facts scrolling in their own box, Apply / Join at the foot,
   nothing covered. Short of room, the facts keep a few rows (min-height)
   and the whole detail scrolls, Apply / Join and its words staying in view
   at its foot (sticky: it only sticks while the detail overflows; scrolled
   to the end, nothing is under it; the re-review, N2) */
.gd.embedded .gd-detail { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ring) transparent; }
.gd.embedded .gd-detail > .gd-dscroll { min-height: 64px; }
.gd.embedded .gd-detail > .gd-apply { position: sticky; bottom: 0; z-index: 1; }
/* (a short window: the block tighter, as the window of its own's .short) */
@media (max-height: 800px) {
  .gd.embedded .gd-detail > .gd-apply { gap: 4px; padding: 6px 10px 8px; }
  .gd.embedded .gd-detail .gd-applytext { height: 52px; min-height: 0; padding: 5px 8px; }
  .gd.embedded .gd-detail .gd-act { height: 44px; font-size: 16px; }
  .gd.embedded .gd-detail > .gd-apply .gd-note { margin-top: 0; font-size: 12px; }
}
/* (shorter still: the plate without its big banner, which the card beside it
   shows, as the window of its own's .short) */
@media (max-height: 700px) {
  .gd.embedded .gd-detail .gd-plate { padding: 6px 12px 8px; }
  .gd.embedded .gd-detail .gd-plate canvas { display: none; }
}

/* ------------------------------------------------------------------ the surfaces (plan Task 8) */
/* "Legendary guild" (level 10) on a Guild Board card and in its detail */
.gd-legend { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 22px; padding: 0 7px; border: 2px solid #8a5200; border-radius: 5px; background: linear-gradient(#fff2a8, #f0cc50); color: #5a3c00; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; box-shadow: inset 0 -2px 0 #b08a24; }
.gd-legend::before { content: "★"; color: #8a5200; }
.gd-gc .gd-legend { justify-self: start; }
/* another guild's card over a member's window ("View guild"): a sheet */
.gd-peekwrap { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; padding: 16px; }
.gd-peekwrap .gd-scrim { z-index: 0; }
.gd-peek { position: relative; z-index: 1; display: flex; flex-direction: column; width: min(460px, 100%); max-height: 100%; overflow: hidden; border: 4px solid var(--frame); border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 3px var(--ring), 0 16px 40px #00000073; }
.gd-peek .gd-dscroll { overflow-y: auto; }
.gd-peekfoot { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px 12px; border-top: 3px solid var(--sky); background: #f7fbff; }
.gd-peekfoot .gd-note { flex: 1; margin: 0; }
.gd.phone .gd-peekwrap { align-items: flex-end; padding: 0; }
.gd.phone .gd-peek { width: 100%; max-height: 90%; border-width: 4px 0 0; border-radius: 16px 16px 0 0; }
/* the Overview's flag-wave (level 3) */
.gd-waverow { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 2px dashed var(--rule); }
.gd-waveline { flex: 1; margin: 0; color: var(--ink-2); font-size: 14px; }
.gd-waveline.why { color: var(--red, #b0362a); }
.gd-wave { flex: none; }

/* ------------------------------------------------------------------ SETTINGS › EMBLEM (Phase 2: the custom emblem; previews e1, e2, e3) */
/* a computer: the editor | the live preview and the rules (e1); a phone: one
   column, the preview and the rules first, the bar at the foot (e2, e2b) */
.gd-emblem { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 452px); gap: 12px; align-items: start; min-width: 0; }
.gd-emblem.mid { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
.gd-emmain, .gd-emside { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gd-emed, .gd-emstate, .gd-emsec { border-color: var(--blue); background: #eef5fc; }
.gd-emed > .gd-cardhead:first-child, .gd-emstate > .gd-cardhead:first-child, .gd-emsec > .gd-cardhead:first-child { background: none; border-bottom: 2px dashed var(--rule); }
.gd-emed .gd-cardhead .gd-kick { font-size: 12px; }
.gd-emed .gd-right, .gd-emstate .gd-right, .gd-empv .gd-right, .gd-emrules .gd-right { margin-left: auto; }
/* the status chip: what everyone sees now */
.gd-emchip { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border: 2px solid var(--plain-line); border-radius: 6px; background: var(--plain); color: var(--ink-2); font-size: 13px; font-weight: 700; white-space: nowrap; }
.gd-emchip.ok { border-color: #3d7a32; background: #e4f4dc; color: #2a5a26; }
.gd-emchip.wait { border: 2px dashed #c98a2a; background: var(--announce); color: var(--gold); }
.gd-emchip.no { border-color: var(--red-edge); background: #fbe3de; color: var(--red-dk); }
/* the 6 inks */
.gd-empal { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.gd-ink { display: flex; align-items: center; gap: 7px; min-width: 0; height: 38px; padding: 0 6px 0 4px; border: 3px solid var(--plain-line); border-radius: 8px; background: #fff; font-size: 14px; text-align: left; }
.gd-ink[aria-checked=true] { border-color: var(--sel-line); background: var(--sel); }
.gd-inkname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-inkchip { flex: none; display: block; width: 24px; height: 24px; border: 2px solid #283040; border-radius: 4px; }
.gd-inkchip.clear { background: repeating-conic-gradient(#ffffff 0 25%, #e6ebf0 0 50%) 0 0 / 8px 8px; }
@media (hover: hover) { .gd-ink:hover, .gd-emtool:hover { border-color: var(--sel-line); } }
/* the tools, "Start from…" under its button */
.gd-emtoolrow { position: relative; }
.gd-emtools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 3px; }
.gd-emtool { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 6px; border: 3px solid var(--blue); border-radius: 8px; background: var(--sky); font-size: 12.5px; font-weight: 600; text-transform: uppercase; white-space: nowrap; }
.gd-emtool[aria-pressed=true], .gd-emtool[aria-expanded=true] { border-color: var(--sel-line); background: var(--sel); }
.gd-emtool.t-emclear { border-color: var(--plain-line); background: var(--plain); }
.gd-emtool[aria-disabled=true] { opacity: .55; }
.gd-tic { flex: none; width: 20px; height: 16px; image-rendering: pixelated; }
.gd-emon { display: inline-flex; align-items: center; height: 16px; padding: 0 4px; border-radius: 3px; background: var(--plain-line); color: #fff; font-size: 10px; }
.gd-emon.on { background: var(--blue); }
.gd-emsep { flex: none; width: 2px; height: 26px; margin: 0 1px; background: var(--rule); }
.gd-emstart { position: absolute; z-index: 5; top: calc(100% + 10px); right: 0; width: min(340px, 100%); padding: 8px 10px 10px; border: 4px solid var(--frame); border-radius: 12px; background: var(--cream); box-shadow: inset 0 0 0 3px var(--ring), 0 12px 32px #0000005c; }
.gd-emstarthead { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 0 2px 6px; border-bottom: 2px dashed var(--rule); font-size: 15px; }
.gd-emstarthead .gd-x { margin-left: auto; width: 32px; height: 32px; font-size: 14px; }
.gd-emsets { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.gd-emsets .gd-chip { height: 28px; padding: 0 7px; font-size: 12px; text-transform: uppercase; }
.gd-emsets .gd-chip[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: #fff; }
.gd-emstock { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.gd-emstock .gd-emb { height: 44px; }
.gd-emstart p { margin: 7px 2px 0; color: var(--ink-3); font-size: 12px; line-height: 1.3; }
/* the canvas: 16 x 16, the mirror line's label under it */
.gd-emwork { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.gd-emcvwrap { position: relative; justify-self: start; max-width: 100%; padding: 5px; border: 3px solid var(--frame); border-radius: 10px; background: #fff; line-height: 0; }
.gd-emcv { display: block; max-width: 100%; padding: 0; border: 0; border-radius: 0; background: none; cursor: crosshair; touch-action: none; }
.gd-emcv canvas { display: block; width: auto; max-width: 100%; height: auto; image-rendering: pixelated; touch-action: none; }
.gd-emcv:focus-visible { outline: 3px solid var(--sel-line); outline-offset: 3px; }
.gd-emaxis { position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%); padding: 0 5px; border-radius: 4px; background: #e08a3a; color: #fff; font-size: 11px; line-height: 16px; white-space: nowrap; }
.gd-emnotes { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; color: var(--ink-2); font-size: 13px; line-height: 1.35; }
.gd-emnotes .gd-kick { color: var(--ink); }
/* (sticky: Submit stays in view while the tab scrolls, on a short window too) */
.gd-emfoot { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px -12px -12px; padding: 8px 12px 12px; border-top: 2px dashed var(--rule); border-radius: 0 0 9px 9px; background: #eef5fc; }
.gd-emfoottxt { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; color: var(--ink-2); font-size: 13px; line-height: 1.3; }
.gd-emfoottxt b { color: var(--ink); font-size: 14px; }
.gd-emfoot .gd-line { flex: 1 1 100%; order: 3; }
.gd-emfoot .gd-line:empty { display: none; }
.gd-emfootbtns { display: flex; gap: 8px; }
.gd-emfootbtns .px-btn { height: 42px; }
/* the live preview: the flag-wave over you with your name tag, x1 and x2, the Board card */
.gd-empv { gap: 4px; }
/* (the preview and the rules: tighter heads, so both fit beside the editor) */
.gd-empv > .gd-cardhead:first-child, .gd-emrules > .gd-cardhead:first-child { padding-top: 5px; padding-bottom: 4px; }
.gd-emrules { gap: 6px; }
.gd-empvrow { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: stretch; }
.gd-emmap { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 132px; border: 3px solid var(--frame); border-radius: 8px; background: linear-gradient(#5f9a48 0 62%, #c9a36b 62%); overflow: hidden; }
.gd-emwave { display: block; padding: 1px; border: 2px solid #283040; border-radius: 6px; background: #fff; line-height: 0; }
.gd-emmap .gd-ntag { margin-top: 2px; }
/* (the trainer, 16 x 32 drawn x2: head and shoulders under the name tag, as board e1) */
.gd-emmap .gd-ow { width: 32px; height: 64px; margin: -22px 0 -14px; image-rendering: pixelated; }
.gd-empvside { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.gd-embns { display: flex; align-items: flex-end; gap: 16px; }
.gd-embns > span { display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--ink-2); font-size: 12px; }
.gd-emtxt { color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.gd-emtxt b { color: var(--ink); }
.gd-empvside .gd-emtxt { font-size: 12px; line-height: 1.35; }
.gd-emgc { min-height: 0; padding-top: 6px; padding-bottom: 6px; pointer-events: none; }
/* the rules */
.gd-emrulelist { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 12.5px; line-height: 1.3; }
.gd-emrulelist li { position: relative; padding-left: 16px; }
.gd-emrulelist li::before { content: "▶"; position: absolute; left: 0; color: var(--blue); font-size: 10px; line-height: 18px; }
.gd-emrulelist b { color: var(--ink); }
/* waiting for approval, not approved (e3) */
.gd-emcmp { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.gd-emb2 { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 92px; color: var(--ink-2); font-size: 12px; line-height: 1.2; text-align: center; }
.gd-emb2 canvas { image-rendering: pixelated; }
.gd-emarrow { color: var(--ink-3); font-size: 20px; }
.gd-emcmp > .gd-emtxt, .gd-emwhy { flex: 1 1 240px; min-width: 0; }
.gd-emwhy { padding: 8px 10px; border: 2px solid var(--red-edge); border-radius: 8px; background: #fdf1ee; color: var(--red-dk); font-size: 13.5px; line-height: 1.4; }
.gd-emwhy b { color: var(--ink); }
.gd-emacts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gd-emacts .gd-muted { flex: 1 1 220px; font-size: 13px; line-height: 1.35; }
/* the banner builder's "Custom" set with nothing approved yet */
.gd-emnone { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 6px 2px; font-size: 14px; }
.gd-emnone .gd-muted { flex: 1 1 220px; }
.gd-embpick .gd-emb canvas { image-rendering: pixelated; }
/* a phone (e2, e2b): one column; 6 inks in a row, the tools 4 x 2, the bar at the foot */
.gd-emblem.phone { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.gd.phone .gd-empal { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.gd.phone .gd-ink { flex-direction: column; justify-content: center; gap: 1px; height: 52px; padding: 0 2px; font-size: 11px; text-align: center; }
.gd.phone .gd-inkname { max-width: 100%; }
.gd.phone .gd-emtools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.gd.phone .gd-emtool { justify-content: center; gap: 3px; min-width: 0; height: 44px; padding: 0 3px; font-size: 12px; letter-spacing: 0; }
.gd.phone .gd-emtool .gd-tic { width: 16px; height: 13px; }
.gd.phone .gd-emtool .gd-emon { display: none; }
.gd.phone .gd-emstart { position: static; width: auto; margin-top: 8px; }
.gd.phone .gd-emsec.canvas { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gd.phone .gd-emsec.canvas .gd-emtxt { align-self: stretch; }
.gd.phone .gd-emsec.canvas .gd-emnotes { align-self: stretch; padding: 0; }
.gd.phone .gd-emcvwrap { justify-self: center; }
.gd.phone .gd-empvrow { grid-template-columns: auto minmax(0, 1fr); align-items: end; }
.gd.phone .gd-emfoot { position: sticky; bottom: 0; z-index: 2; margin: 0; padding: 8px 2px 10px; border-top: 2px dashed var(--rule); background: var(--cream); box-shadow: 0 -8px 10px -8px #0b122255; }
.gd.phone .gd-emfoottxt { display: none; }
.gd.phone .gd-emfootbtns { flex: 1; }
.gd.phone .gd-emfootbtns .px-btn { height: 44px; }
.gd.phone .gd-emfootbtns .px-btn.primary { flex: 1; }
.gd.phone .gd-emcmp { justify-content: center; }
/* (a phone on its side: too little height for a bar that stays; it ends the column) */
@media (max-height: 520px) {
  .gd.phone .gd-emfoot { position: static; box-shadow: none; }
}
.gd.phone .gd-empv, .gd.phone .gd-emrules { border-color: var(--blue); background: #eef5fc; }
.gd.phone .gd-empv > .gd-cardhead:first-child, .gd.phone .gd-emrules > .gd-cardhead:first-child { background: none; border-bottom: 2px dashed var(--rule); }

/* the Guild Board: a card with a custom emblem has ⋯ (Report emblem) */
.gd-gcwrap { position: relative; display: grid; min-width: 0; }
.gd-gcwrap > .gd-gc { width: 100%; min-width: 0; }
/* (⋯ at the facts row's end: the name row keeps its level and badges) */
.gd-gcwrap > .gd-gc .gd-gcfacts { padding-right: 40px; }
.gd-gcmore { position: absolute; z-index: 1; top: 41px; right: 10px; display: flex; align-items: center; justify-content: center; width: 34px; height: 30px; padding: 0; border: 2px solid var(--blue); border-radius: 6px; background: var(--sky); font-size: 15px; font-weight: 700; line-height: 1; }
.gd-gcmore[aria-expanded=true] { border-color: var(--sel-line); background: var(--sel); }
.gd-gcmenu { position: absolute; z-index: 4; top: 76px; right: 6px; min-width: 210px; }
.gd-gcmenu .px-item[aria-disabled=true] { color: var(--ink-3); }
.gd-peekreport { flex: none; }
/* the report card (parts.js confirmCard's choices) */
.gd-confirm h2 { display: flex; align-items: center; gap: 8px; }
.gd-confirm h2 canvas { flex: none; margin: -6px -4px -8px -6px; }
.gd-choices { display: flex; flex-direction: column; gap: 5px; }
.gd-choices .gd-kick { color: var(--ink); }
.gd-choice { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 9px; border: 2px solid var(--rule); border-radius: 8px; background: #fff; font-size: 14px; text-align: left; }
.gd-choice[aria-checked=true] { border-color: var(--sel-line); background: var(--sel); }
.gd-choice .gd-radio { width: 18px; height: 18px; margin: 0; }
.gd-choice[aria-checked=true] .gd-radio { background: radial-gradient(circle, var(--frame) 0 4px, #fff 4.5px); }
.gd-confirm .gd-note { margin: 0; line-height: 1.4; }

/* ------------------------------------------------------------------ EVENTS (Phase 2: the events calendar; previews e5, e6) */
/* a computer: the list | How events work and The reminder (e5); a phone: one
   column, the list first. New event is a window of its own (.gd-evscrim):
   a card on a computer, a full sheet on a phone (e6). */
.gd-events { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 12px; align-items: start; min-width: 0; }
.gd-events.mid { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); }
.gd-events.phone { display: flex; flex-direction: column; gap: 10px; }
.gd-evcol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gd-evlist { border-color: var(--blue); background: #eef5fc; }
.gd-evlist > .gd-cardhead:first-child .gd-kick { font-size: 12px; }
.gd-cal { flex: none; display: inline-block; width: 16px; height: 16px; border: 2px solid var(--frame); border-radius: 3px; background: linear-gradient(#4a7fc0 0 4px, #fff 4px); }
.gd-evrows { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gd-ev { position: relative; display: grid; grid-template-columns: 62px 64px minmax(0, 1fr) minmax(0, 160px) auto 36px; align-items: center; gap: 10px; min-height: 62px; padding: 5px 8px 5px 6px; border: 2px solid var(--rule); border-radius: 10px; background: #fff; }
.gd-ev.next { border-width: 3px; border-color: var(--sel-line); background: #fff8ec; }
.gd-ev.past { background: #f7fbff; color: var(--ink-2); }
.gd-evd { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 50px; border: 2px solid var(--frame); border-radius: 8px; background: var(--sky); line-height: 1.05; }
.gd-evd small { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.gd-evd b { font-size: 16px; white-space: nowrap; }
.gd-evtm { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.gd-evtm small { display: block; font-size: 11px; font-weight: 400; letter-spacing: .05em; color: var(--ink-3); }
.gd-evtt { min-width: 0; line-height: 1.3; }
.gd-evtt b { display: block; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.gd-evwhere { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.gd-evpin { flex: none; display: inline-block; width: 9px; height: 9px; margin: 0 2px 2px; border: 2px solid #1e467e; border-radius: 50% 50% 50% 0; background: #4a7fc0; transform: rotate(-45deg); }
.gd-evby { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; line-height: 1.2; }
.gd-evby .px-face { flex: none; width: 30px; height: 30px; }
.gd-evby > span { min-width: 0; }
.gd-evby b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-evby small { display: block; color: var(--ink-3); font-size: 12px; }
.gd-evin { justify-self: end; display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border: 2px solid var(--blue); border-radius: 13px; background: var(--sky); color: var(--blue-dk); font-size: 13px; font-weight: 700; white-space: nowrap; }
.gd-ev.next .gd-evin { border-color: var(--sel-line); background: var(--sel); color: var(--ink); }
.gd-ev.past .gd-evin { border-color: var(--plain-line); background: var(--plain); color: var(--ink-3); }
.gd .gd-evmore { width: 34px; height: 34px; padding: 0; font-size: 16px; }
.gd-evmore.none { display: block; width: 34px; }
.gd-evmore[aria-expanded=true] { border-color: var(--sel-line); background: var(--sel); }
.gd-evmenu { position: absolute; z-index: 4; top: calc(100% - 6px); right: 6px; min-width: 190px; }
.gd-evfold { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 4px 12px; border: 2px dashed var(--rule); border-radius: 10px; background: #f7fbff; color: var(--ink-2); font-size: 14px; text-align: left; }
.gd-evfold b { color: var(--ink); }
.gd-evfold .gd-muted { font-size: 13px; }
.gd-evcant { margin: 0; color: var(--ink-2); }
.gd-evlock { margin: 0; }
.gd-evrulelist { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.35; }
.gd-evrulelist li { display: flex; gap: 8px; }
.gd-evrulelist li::before { content: "▶"; flex: none; color: var(--blue); font-size: 10px; line-height: 19px; }
.gd-evremind p { font-size: 13px; line-height: 1.4; }
.gd-evpop { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 3px solid var(--frame); border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 2px var(--ring); font-size: 14px; line-height: 1.3; }
.gd-evpop canvas { flex: none; margin: -6px -8px -8px -10px; }
.gd-evpoptext { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.gd-evpopgo { flex: none; padding-left: 8px; border-left: 2px solid var(--rule); color: var(--blue-dk); font-weight: 700; white-space: nowrap; }
.gd-bell { position: relative; flex: none; display: inline-block; width: 16px; height: 16px; }
.gd-bell::before { content: ""; position: absolute; left: 2px; top: 1px; width: 12px; height: 11px; box-sizing: border-box; border: 2px solid #8a5a00; border-bottom-width: 3px; border-radius: 6px 6px 1px 1px; background: #f0cc50; }
.gd-bell::after { content: ""; position: absolute; left: 6px; top: 12px; width: 4px; height: 3px; border-radius: 0 0 2px 2px; background: #8a5a00; }
.gd-evline { padding: 6px 8px; border-radius: 6px; background: #efe7f8; color: #4a2a80; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.gd-evline .gd-clt { width: auto; margin-right: 6px; }
/* a phone: the day and date beside the time and title; who posted it and ⋯ under them */
.gd-events.phone .gd-ev { grid-template-columns: 54px minmax(0, 1fr) auto; grid-template-areas: "d tm in" "d tt tt" "d by more"; row-gap: 3px; column-gap: 8px; align-items: center; }
.gd-events.phone .gd-evd { grid-area: d; align-self: stretch; height: auto; min-height: 50px; }
.gd-events.phone .gd-evtm { grid-area: tm; display: flex; align-items: baseline; gap: 6px; font-size: 18px; }
.gd-events.phone .gd-evtt { grid-area: tt; }
.gd-events.phone .gd-evby { grid-area: by; }
.gd-events.phone .gd-evin { grid-area: in; }
.gd-events.phone .gd-evmore { grid-area: more; justify-self: end; }
/* (mid: "in 2 h" under the place, so the poster keeps its room) */
.gd-events.mid .gd-ev { grid-template-columns: 56px 58px minmax(0, 1fr) minmax(0, 120px) 36px; grid-template-areas: "d tm tt by more" "d tm in by more"; row-gap: 2px; }
.gd-events.mid .gd-evd { grid-area: d; }
.gd-events.mid .gd-evtm { grid-area: tm; }
.gd-events.mid .gd-evtt { grid-area: tt; align-self: end; }
.gd-events.mid .gd-evby { grid-area: by; }
.gd-events.mid .gd-evin { grid-area: in; justify-self: start; align-self: start; height: 22px; }
.gd-events.mid .gd-evmore { grid-area: more; }
/* New event (e6) */
.pxui.gd-evnew { flex: none; display: flex; flex-direction: column; width: min(540px, 100%); max-height: 100%; padding: 0; overflow: hidden; }
:where(.gd-evnew) :where(h2, p) { margin: 0; }
.gd-evnewhead { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px 14px; border-bottom: 2px dashed var(--rule); }
.gd-evnewhead h2 { flex: 1; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; }
.gd-evform { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px; padding: 2px 14px 10px; overflow-y: auto; overscroll-behavior: contain; }
.gd-evfld { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin-top: 8px; }
.gd-evlb { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--ink-2); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.gd-evlb small { color: var(--ink-3); font-size: 12px; letter-spacing: 0; text-transform: none; }
.gd-evnew .gd-evtitle { width: 100%; height: 44px; font-size: 16px; }
.gd-evdays { display: flex; gap: 5px; min-width: 0; padding: 2px 2px 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.gd-evday { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 50px; padding: 0; border: 3px solid var(--blue); border-radius: 8px; background: var(--sky); font-size: 16px; font-weight: 700; line-height: 1.05; }
.gd-evday small { font-size: 11px; font-weight: 400; letter-spacing: .05em; text-transform: uppercase; }
.gd-evday[aria-checked=true] { border-color: var(--sel-line); background: var(--sel); }
.gd-evtime { display: flex; align-items: center; gap: 6px; min-width: 0; }
.gd-evnew .gd-evsel { flex: none; width: 84px; height: 44px; font-size: 18px; font-weight: 700; }
.gd-evtime > b { font-size: 20px; }
.gd-evclock { flex: 1; min-width: 0; color: var(--ink-3); font-size: 12px; line-height: 1.3; }
.gd-evplace { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 10px; border: 3px solid var(--frame); border-radius: 8px; background: #fff; font-size: 16px; text-align: left; }
.gd-evplace.open { border-color: var(--sel-line); }
.gd-evcaret { margin-left: auto; color: var(--ink-3); font-size: 11px; }
.gd-evplist { display: flex; flex-direction: column; overflow: hidden; border: 3px solid var(--frame); border-radius: 0 0 8px 8px; border-top: 0; margin-top: -6px; padding-top: 4px; background: #fff; }
.gd-evplist[hidden] { display: none; }
.gd-evqrow { display: flex; align-items: center; gap: 6px; margin: 2px 6px 4px; padding: 0 8px; border: 2px solid var(--rule); border-radius: 6px; }
.gd-evlens { position: relative; flex: none; width: 11px; height: 11px; border: 2px solid var(--ink-3); border-radius: 50%; }
.gd-evlens::after { content: ""; position: absolute; right: -5px; bottom: -4px; width: 5px; height: 2px; background: var(--ink-3); transform: rotate(45deg); }
.gd-evnew .gd-evq { flex: 1; width: 0; height: 38px; border: 0; background: none; box-shadow: none; font-size: 15px; }
.gd-evopts { max-height: 220px; overflow-y: auto; overscroll-behavior: contain; }
.gd-evopt { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-top: 1px solid var(--rule); background: #fff; font-size: 15px; text-align: left; }
.gd-evopt small { margin-left: auto; color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.gd-evopt.on { background: var(--sel); font-weight: 700; }
.gd-evopt.on small { color: var(--ink-2); }
.gd-evprev { margin-top: 10px; padding: 8px 10px; border: 2px dashed #c98a2a; border-radius: 10px; background: var(--announce); color: #8a5200; font-size: 13px; line-height: 1.4; }
.gd-evprev b { color: var(--ink); }
.gd-evwhy:empty { display: none; }
.gd-evfoot { flex: none; display: flex; gap: 6px; padding: 8px 14px 12px; border-top: 2px dashed var(--rule); background: var(--cream); }
.gd-evfoot .px-btn { height: 44px; }
.gd-evfoot .px-btn.primary { flex: 1; }
@media (hover: hover) { .gd-evday:hover, .gd-evopt:hover, .gd-evplace:hover, .gd-evfold:hover { border-color: var(--sel-line); } }
/* a phone: the full sheet under the bar (e6) */
.window.gd-evscrim.phone { padding: 0; align-items: stretch; justify-content: stretch; }
.pxui.gd-evnew.phone { width: 100%; height: 100%; max-height: 100%; border-bottom: 0; border-radius: 14px 14px 0 0; }
.gd-evnew.phone .gd-evdays { margin: 0 -14px; padding: 2px 14px 6px; }

/* the kit's 44 px targets (social-ui.css gives them only inside .pxui.touch,
   the social layer; this window lives in #windows) */
@media (pointer: coarse) {
  .gd .px-btn, .gd .px-pocket, .gd .px-field, .gd-chip, .gd-x, .gd-pg, .gd-rules .px-btn, .gd-rules .gd-x, .gd-grab { min-height: 44px; }
  .gd-x, .gd-pg { min-width: 44px; }
  .gd .gd-sortsel { height: 44px; }
  .gd-sw, .gd-emb { min-height: 44px; min-width: 44px; }
  .gd .gd-inv-form .px-field, .gd-inv-form .px-btn { height: 44px; }
  .gd-apply .gd-act, .gd-acts .px-btn { min-height: 44px; }
  .gd-dots, .gd-segb, .gd-perm, .gd-rrow, .gd-rmove, .gd-jmode, .gd-look, .gd-check, .gd .px-tab, .gd .px-item, .gd-cochip, .gd-radd, .gd-mr { min-height: 44px; }
  .gd-dots, .gd-rmove, .gd-check { min-width: 44px; }
  .gd-sw.sm, .gd-swatches.small .gd-sw { min-width: 44px; min-height: 44px; }
  .gd .gd-startsel, .gd .gd-autosel, .gd .gd-autodays { height: 44px; }
  /* (inside Hub: its small tabs and "How guilds work") */
  .gd.embedded .px-tab, .gd.embedded .gd-rulesbtn { min-height: 44px; }
  /* (Settings › Emblem: the inks, the tools, Start from…'s sets and emblems; the Board's ⋯ and its report card) */
  .gd-ink, .gd-emtool, .gd-gcmore, .gd-choice, .gd-emsets .gd-chip, .gd-emstock .gd-emb, .gd-emstarthead .gd-x { min-height: 44px; }
  .gd-gcmore, .gd-emstarthead .gd-x { min-width: 44px; }
  /* (Events: a row's ⋯, the days, the places and their search, the fold) */
  .gd .gd-evmore, .gd-evday, .gd-evopt, .gd-evfold, .gd-evplace, .gd-evnew .gd-evq { min-height: 44px; }
  .gd .gd-evmore { min-width: 44px; }
}
