/* The trainer card (client/js/ui/card; docs/superpowers/specs/2026-09-30-trainer-card-design.md):
   a pixel-kit window (client/css/social-ui.css) laid out as the approved previews
   (trainer-card/preview: t1-t3 the card, p1 / p2 the phone sheet, p4 sideways; their
   card.css values). Numbers use the game's GBA font (pokemon.ttf) at 16 and 32 px.
   The card picks its layout from the room #windows gives it (index.js): .desk (the
   720 px card), .phone (a full-height sheet, the buttons pinned) and .side (a short
   screen: two columns). The rank badges and tag chips are the Guild window's
   (guild.css .gd-rk, .gd-tag), in the colours below. */

/* ------------------------------------------------------------------ colours */
/* the 8 guild colours (--c base, --o outline, --l light, --t text on cream), grey
   for a rank, and --gt: the guild block's tint (the light tone mixed with white) */
.tc .c-red, .tc-msheet .c-red { --c: #e0523f; --o: #7c2216; --l: #f38775; --t: #b0362a; --gt: #fad1cb; }
.tc .c-orange, .tc-msheet .c-orange { --c: #f08a2c; --o: #7a3a08; --l: #f7b268; --t: #b0560e; --gt: #fce2c6; }
.tc .c-yellow, .tc-msheet .c-yellow { --c: #e8c23a; --o: #6e5608; --l: #f5dc78; --t: #8a6a00; --gt: #fbf2cc; }
.tc .c-green, .tc-msheet .c-green { --c: #4caf50; --o: #22602a; --l: #80d080; --t: #2e7d32; --gt: #cfedcf; }
.tc .c-teal, .tc-msheet .c-teal { --c: #2ba8a0; --o: #0f4e4a; --l: #62cbc3; --t: #18766f; --gt: #c3ebe8; }
.tc .c-blue, .tc-msheet .c-blue { --c: #3f7fd0; --o: #1e467e; --l: #74a8ec; --t: #2a5ea8; --gt: #cadef8; }
.tc .c-purple, .tc-msheet .c-purple { --c: #8a5cc7; --o: #452a70; --l: #ad89e2; --t: #6b3fa0; --gt: #e0d2f4; }
.tc .c-pink, .tc-msheet .c-pink { --c: #e0609a; --o: #7a1f4a; --l: #f08fbb; --t: #b0366e; --gt: #f9d4e5; }
.tc .c-grey, .tc-msheet .c-grey { --c: #8a9ab0; --o: #3e4a5e; --l: #c4ccd8; --t: #4e5868; }

/* ------------------------------------------------------------------ the window */
/* the dimmed room around it (a tap there closes the card) */
.window.tc-scrim { inset: 0; max-width: none; max-height: none; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0b1222a8; }
.window.tc-scrim.phone { padding: 0; align-items: stretch; justify-content: flex-end; }
.window.tc-scrim.side { padding: 6px; align-items: stretch; }
.tc :where(h2, h3, p) { margin: 0; }
.tc [aria-disabled=true] { cursor: default; }
.tc:focus { outline: none; }
.tc .g16 { font: 16px/1 "PokemonGBA", monospace; letter-spacing: 0; }
.tc .g32 { font: 32px/1 "PokemonGBA", monospace; letter-spacing: 0; }
.tc .tc-kick { color: var(--ink-3); font-size: 12px; line-height: 1; letter-spacing: .07em; text-transform: uppercase; }
.tc .tc-grow { flex: 1; }
.tc-mark { flex: none; display: inline-flex; }
.tc-mark svg, .tc-bn svg, .tc-pin svg { display: block; }

/* the card (t1): 720 px, the header, the badges, the tiles, the buttons */
.pxui.tc.desk { position: relative; width: 720px; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 14px 16px 16px; overflow-y: auto; overscroll-behavior: contain; box-shadow: inset 0 0 0 3px var(--ring), 0 18px 44px #00000080; }

/* ------------------------------------------------------------------ the header */
.tc-head { display: flex; align-items: stretch; gap: 14px; }
.tc-pic { position: relative; flex: none; width: 136px; height: 136px; overflow: hidden; border: 3px solid var(--frame); border-radius: 10px; background: #f3f8fd; box-shadow: inset 0 0 0 2px #ffffffb0; }
.tc-pic .tc-bd { position: absolute; left: 0; top: 0; display: block; }
/* the trainer's map sprite, one 16 x 32 frame at x4 (64 x 128: ui/card sets its size and left); its feet 6 px over the circle's foot (clothing preview c7) */
.tc-pic .tc-tr { position: absolute; left: 33px; bottom: 6px; max-width: none; image-rendering: pixelated; }
.tc-pic.bust { width: 100px; height: 106px; }
/* (the bust is 100 px high: the feet at its foot, so a tall hat keeps rows 6 and down) */
.tc-pic.bust .tc-tr { bottom: -4px; }
.tc-id { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.tc-name { margin: 0; font-size: 32px; font-weight: 700; line-height: 1; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-meta { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.tc-meta .g16 { color: var(--ink); }
.tc-pres { display: flex; align-items: center; gap: 7px; font-size: 14px; white-space: nowrap; }
.tc-pres .px-pres { width: 10px; height: 10px; }
.tc-pw { font-size: 13px; font-weight: 500; color: var(--online-text); }
.tc-pw[data-state=away] { color: var(--away-text); }
.tc-pw[data-state=busy] { color: var(--busy); }
.tc-pw[data-state=offline] { color: var(--ink-3); }
.tc-pl { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.tc-near { display: inline-flex; align-items: center; flex: none; height: 18px; padding: 0 5px; border: 2px solid #3d7a32; border-radius: 4px; background: #e4f4dc; color: #2a5a26; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.tc-msg { align-self: flex-start; max-width: 100%; padding: 3px 8px 4px; border-left: 4px solid var(--blue); border-radius: 2px 6px 6px 2px; background: #fff; color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-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; }
@media (hover: hover) { .tc-x:hover { border-color: var(--sel-line); } }

/* ------------------------------------------------------------------ the guild block */
/* its banner, [TAG] name, the rank, View guild; the whole block is the button. Its
   frame follows the level like the name tags' (guild-rules frameFor: bronze 4,
   silver 7, gold 10; 2 px a pixel: the dark line, then the bevel and the metal) */
.tc-guild { position: relative; flex: none; width: 226px; display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 10px 8px 6px; border: 3px solid var(--o); border-radius: 10px; background: linear-gradient(150deg, var(--gt) 0%, #ffffff 72%); color: var(--ink); text-align: left; text-transform: none; }
button.tc-guild { cursor: pointer; }
@media (hover: hover) { button.tc-guild:hover .tc-vg { color: var(--sel-line); } }
.tc-guild.fr { border: 0; padding: 12px 14px 12px 10px; border-radius: 4px; background: linear-gradient(150deg, var(--gt) 0%, #ffffff 72%) padding-box; box-shadow: 0 0 0 2px var(--fo), inset 2px 2px 0 var(--fh), inset -2px -2px 0 var(--fs), inset 0 0 0 4px var(--fm); }
.tc-guild.bronze { --fo: #3e2410; --fm: #b8743a; --fh: #e6a868; --fs: #7a4a1c; }
.tc-guild.silver { --fo: #2a3a55; --fm: #b4bcc6; --fh: #eef2f6; --fs: #7a8494; }
.tc-guild.gold { --fo: #5a3c00; --fm: #f0cc50; --fh: #fff2a8; --fs: #b08a24; }
.tc-stud { position: absolute; width: 2px; height: 2px; background: var(--fh); }
.tc-stud.tr { right: 2px; top: 2px; }
.tc-stud.bl { left: 2px; bottom: 2px; }
.tc-stud.br { right: 2px; bottom: 2px; }
.tc-bn { flex: none; display: block; overflow: hidden; }
.tc-bn canvas { image-rendering: pixelated; }
.tc-gi { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.tc-gk { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tc-glv { font-size: 12px; color: var(--ink-3); letter-spacing: .04em; white-space: nowrap; }
.tc-glv .g16 { font-size: 13px; color: var(--ink-2); }
.tc-gn { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 16px; font-weight: 700; color: var(--t); white-space: nowrap; }
.tc-gn .gd-tag { flex: none; }
.tc-gname { overflow: hidden; text-overflow: ellipsis; }
.tc-grk { display: flex; min-width: 0; }
/* (a long rank name ends in "…", the whole name in its title: the block keeps its size) */
.tc .tc-guild .gd-rk { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.tc-rkn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-vg { align-self: flex-start; color: var(--blue-dk); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-transform: none; white-space: nowrap; }
button.tc-vg { margin: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.tc-row3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tc-row3 .tc-vg { flex: none; align-self: center; }
/* no guild: a quiet dashed block with a grey banner */
.tc-guild.none { --o: var(--plain-line); border-style: dashed; background: #fbfbf6; color: var(--ink-3); }
.tc-guild.none .tc-gn { color: var(--ink-2); font-weight: 600; }
.tc-guild.none .tc-bn { width: 48px; height: 62px; display: flex; align-items: flex-start; justify-content: center; opacity: .55; }
.tc-guild.none .tc-bn svg { margin-top: -2px; }

/* ------------------------------------------------------------------ badges */
/* a section card with a pocket-style header (the Guild window's cards) */
.tc-card { position: relative; border: 3px solid var(--frame); border-radius: 12px; background: #fff; }
.tc-ch { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-bottom: 3px solid var(--rule); border-radius: 9px 9px 0 0; background: linear-gradient(#cfe6fa, #eef6fd); }
.tc-ch h3 { margin: 0; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.tc-n { margin-left: auto; display: flex; align-items: baseline; gap: 6px; color: var(--ink-2); font-size: 13px; }
.tc-n .g16 { color: var(--ink); }
/* your own card's level cap: a chip by the title; pressed, what it does under the badges */
.tc-cap { display: inline-flex; align-items: baseline; gap: 5px; height: 24px; margin: 0; padding: 4px 10px 0; border: 2px solid var(--rule); border-radius: 12px; background: #fff; color: var(--ink-2); font: inherit; font-size: 13px; line-height: 1; white-space: nowrap; cursor: pointer; }
.tc-cap .g16 { color: var(--ink); font-size: 14px; }
.tc-cap::after { content: "?"; align-self: center; display: inline-grid; place-items: center; width: 15px; height: 15px; margin-top: -3px; border-radius: 50%; background: var(--rule); color: #fff; font-size: 11px; font-weight: 700; }
.tc-cap:hover, .tc-cap.on { border-color: var(--blue); }
.tc-cap.on::after { background: var(--blue); }
.tc-cap:focus-visible { outline: 3px solid var(--sel-line); outline-offset: 1px; }
.tc-capwhy { margin: 0; padding: 7px 12px 9px; border-top: 2px dashed #e1ebf6; color: var(--ink-2); font-size: 13px; line-height: 1.35; }
/* two rows of 8 in round sockets, earned in colour, the rest as shadows */
.tc-rows { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px 9px; }
.tc-brow { display: grid; grid-template-columns: 62px repeat(8, 1fr); align-items: center; height: 46px; }
.tc-brow + .tc-brow { border-top: 2px dashed #e1ebf6; height: 50px; padding-top: 4px; }
.tc-rl { color: var(--ink-3); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.tc-bs { position: relative; justify-self: center; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.tc-sock { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: #eef3f8; box-shadow: inset 0 2px 0 #dde6f0; }
.tc-bs.got .tc-sock { background: #fdf3da; box-shadow: inset 0 2px 0 #f3e2b4; }
.tc-bs.hov .tc-sock { background: #fff; box-shadow: 0 0 0 3px var(--sel-line), inset 0 2px 0 #f3e2b4; }
.tc-bi { flex: none; display: block; width: 32px; height: 32px; background: url(/assets/card/badges.png) 0 0 / 256px 64px no-repeat; image-rendering: pixelated; }
.tc-bs.no .tc-sock > .tc-bi { filter: brightness(0); opacity: .14; }
/* the badge's tooltip (hover, focus or tap) */
.tc-tip { position: absolute; z-index: 12; left: 50%; bottom: calc(100% + 9px); transform: translateX(-50%); display: flex; align-items: center; gap: 9px; padding: 7px 12px 8px 8px; background: var(--cream); border: 3px solid var(--frame); border-radius: 8px; box-shadow: inset 0 0 0 2px var(--ring), 0 8px 18px #0000004d; white-space: nowrap; text-align: left; text-transform: none; pointer-events: none; }
.tc-tip::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -8px; border: 8px solid transparent; border-top-color: var(--frame); }
.tc-tip.r { left: auto; right: -11px; transform: none; }
.tc-tip.r::after { left: auto; right: 23px; margin-left: 0; }
.tc-tip.l { left: -11px; transform: none; }
.tc-tip.l::after { left: 23px; margin-left: 0; }
/* (moved inside the card by index.js fitTip: its arrow stays over the badge) */
.tc-tip.fit::after { left: var(--ax, 50%); right: auto; margin-left: -8px; }
/* (the top row on a phone or on its side: under the badge) */
.tc-tip.dn { top: calc(100% + 9px); bottom: auto; }
.tc-tip.dn::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--frame); }
.tc-tip .tc-bi.shade { filter: brightness(0); opacity: .2; }
.tc-tipt { display: flex; flex-direction: column; }
.tc-tip b { display: block; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.2; }
.tc-tip small { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.25; }
.tc-tip small.no { color: var(--ink-3); }

/* ------------------------------------------------------------------ the numbers */
/* 5 tiles (the Guild window's tiles): a label, the mark and a big number, a small line */
.tc-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.tc-tl { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px 10px 9px; border: 3px solid var(--blue); border-radius: 12px; background: var(--sky); }
.tc-k { color: var(--ink-2); font-size: 12px; line-height: 1; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.tc-v { display: flex; align-items: center; gap: 8px; height: 26px; white-space: nowrap; }
.tc-v .g32 { color: var(--ink); margin-top: 3px; }
.tc-ball { flex: none; display: block; width: 24px; height: 24px; image-rendering: pixelated; }
.tc-s { display: flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 13px; line-height: 1.1; white-space: nowrap; }
.tc-s .g16 { color: var(--ink); }
.tc-tl.muted { border-color: var(--plain-line); background: var(--plain); }
.tc-tl.muted .tc-ball { filter: grayscale(1); opacity: .45; }

/* your own card: money and BP, only you */
.tc-own { display: flex; align-items: center; gap: 14px; margin-top: -4px; padding: 6px 12px; border: 2px dashed var(--plain-line); border-radius: 8px; background: #fbfbf6; color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.tc-only { flex: none; width: 176px; display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.tc-it { display: flex; align-items: center; gap: 6px; }
.tc-it .g16 { color: var(--ink); }
.tc-sepv { flex: none; width: 2px; height: 18px; background: #e2e4dc; }

/* ------------------------------------------------------------------ the buttons */
.tc-acts { position: relative; display: flex; align-items: center; gap: 8px; }
.tc-acts .px-btn { height: 40px; padding: 0 16px; }
.tc .px-btn.dis { border-color: var(--plain-line); background: var(--plain); color: #8a92a0; box-shadow: none; }
.tc .px-btn.ok { border-color: #3d7a32; background: #e4f4dc; color: #2a5a26; cursor: default; }
.tc .px-btn[aria-expanded=true] { border-color: var(--sel-line); background: var(--sel); }
/* why a button is greyed: the server's words */
.tc-why { display: flex; align-items: flex-start; gap: 6px; margin-top: -6px; color: var(--ink-3); font-size: 13px; line-height: 1.3; }
.tc-why b { color: var(--ink-2); }
.tc-whyt { display: flex; flex-direction: column; min-width: 0; }
.tc-pin { flex: none; margin-top: 1px; }
.tc-why.flash { color: var(--danger); }
.tc-why.flash b { color: var(--danger); }
.tc-note { color: var(--ink-3); font-size: 13px; }
/* "Preview as others see it": the kit's ON / OFF switch, as a button */
.tc-sw { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.tc-toggle { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 66px; height: 32px; margin: 0; padding: 0; border: 3px solid var(--plain-line); border-radius: 6px; background: var(--plain); color: var(--ink-3); font-size: 15px; text-transform: uppercase; }
.tc-toggle::after { content: "OFF"; }
.tc-toggle[aria-checked=true] { border-color: var(--frame); background: var(--blue); color: #fff; }
.tc-toggle[aria-checked=true]::after { content: "ON"; }
/* the preview is on: a strip over the card */
.tc-prev { display: flex; align-items: center; gap: 8px; margin: -4px 0 -2px; padding: 6px 10px; border: 2px solid var(--sel-line); border-radius: 8px; background: #fff6e4; color: #6a4200; font-size: 14px; line-height: 1.35; }
.tc-prev b { flex: none; color: var(--ink); }

/* ------------------------------------------------------------------ More ▾ */
/* t1: the game menu (.px-menu, the ▶ cursor) by More, over the room around the card
   (index.js placeMenu); greyed choices say why under their name */
.tc-menu { position: absolute; z-index: 5; left: auto; top: auto; min-width: 258px; max-width: min(360px, calc(100% - 12px)); max-height: calc(100% - 12px); overflow-y: auto; overscroll-behavior: contain; padding: 8px 8px 6px; }
.tc-menu .px-item { min-height: 34px; color: var(--ink); }
.tc-menu .px-item.off { align-items: flex-start; color: #8a92a0; cursor: default; }
.tc-menu .px-item.off::before { line-height: 20px; }
.tc-menu .px-item .t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tc-menu .px-item .why { display: block; color: var(--ink-3); font-size: 13px; white-space: normal; }
.tc-menu .px-item.danger { color: var(--danger); }
.tc-menu .px-item.flash .why, .tc-mi .px-btn.flash .why { color: var(--danger); }
.tc-sep { height: 0; margin: 4px 6px; border-top: 2px dashed var(--rule); }
/* p3: a phone's bottom sheet over the card, 44 px rows */
.tc-mscrim { position: absolute; inset: 0; z-index: 5; background: #0b122280; }
.pxui.tc-msheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; max-height: calc(100% - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 8px 12px 14px; border-width: 4px 0 0; border-radius: 16px 16px 0 0; box-shadow: inset 0 3px 0 var(--ring), 0 -10px 30px #0006; }
.tc-msheet .tc-grab { margin: 0 auto 8px; }
.tc-mh { display: flex; align-items: center; gap: 10px; padding: 0 2px 8px; border-bottom: 2px dashed var(--rule); }
.tc-mh .px-face { width: 42px; height: 42px; }
.tc-mh .t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tc-mh b { display: flex; align-items: center; gap: 6px; font-size: 17px; }
.tc-mh .tc-pres { gap: 5px; }
.tc-mi { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.tc-mi .px-btn { justify-content: flex-start; width: 100%; height: auto; min-height: 44px; padding: 4px 14px; text-align: left; }
.tc-mi .px-btn.dis { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 50px; border-color: var(--plain-line); background: var(--plain); color: #8a92a0; box-shadow: none; cursor: default; }
.tc-mi .px-btn .why { color: var(--ink-3); font-size: 12px; font-weight: 400; text-transform: none; white-space: normal; }
.tc-mi .px-btn.danger { border-color: var(--red-edge); background: #fdf1ee; color: var(--danger); }
.tc-two { display: flex; gap: 6px; }
.tc-two .px-btn { flex: 1; justify-content: center; }
.tc-mi .tc-cancel { justify-content: center; margin-top: 4px; }

/* ------------------------------------------------------------------ phone (p1, p2) */
/* a full-height sheet: the sections stacked and scrolling, the buttons pinned */
.pxui.tc.phone { position: relative; width: 100%; height: calc(100% - 6px); display: flex; flex-direction: column; padding: 0; border-bottom: 0; border-radius: 16px 16px 0 0; box-shadow: inset 0 3px 0 var(--ring), 0 -10px 30px #0006; }
.tc-grab { flex: none; width: 48px; height: 5px; margin: 7px auto 3px; border-radius: 3px; background: #b8c4d4; }
.tc-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 9px; padding: 2px 10px 10px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.tc.phone > .tc-x { position: absolute; z-index: 3; right: 10px; top: 15px; width: 44px; height: 44px; }
.tc.phone .tc-head { gap: 12px; }
.tc.phone .tc-id { gap: 5px; }
.tc.phone .tc-kick { font-size: 11px; }
.tc.phone .tc-name { font-size: 28px; padding-right: 48px; }
.tc.phone .tc-meta { font-size: 13px; }
.tc.phone .tc-pres { flex-wrap: wrap; row-gap: 3px; font-size: 13px; }
.tc.phone .tc-msg { font-size: 13px; }
.tc.phone .tc-guild { width: auto; padding: 6px 10px 6px 6px; }
.tc.phone .tc-guild.fr { padding: 10px 14px 10px 10px; }
.tc.phone .tc-gi { gap: 4px; }
/* badges: two rows of 8, each cell a 44 x 44 tap target, the label over its row */
.tc.phone .tc-ch { height: 30px; }
.tc.phone .tc-rows { padding: 3px 2px 4px; gap: 2px; }
.tc.phone .tc-brow { grid-template-columns: repeat(8, minmax(0, 44px)); justify-content: center; height: auto; }
.tc.phone .tc-brow + .tc-brow { height: auto; padding-top: 3px; }
.tc.phone .tc-rl { grid-column: 1 / -1; padding: 0 8px; font-size: 10px; line-height: 14px; letter-spacing: .06em; }
.tc.phone .tc-sock { width: 38px; height: 38px; }
.tc.phone .tc-tip { padding: 6px 10px 7px 7px; }
.tc.phone .tc-tip small { font-size: 12px; }
/* tiles two by two, trophies across; your own: money and BP take the sixth */
.tc.phone .tc-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
.tc.phone .tc-tl { padding: 6px 10px; gap: 4px; }
.tc.phone .tc-stats:not(.six) .tc-tl:last-child { grid-column: 1 / -1; }
.tc-tl.own { border: 2px dashed var(--plain-line); background: #fbfbf6; padding: 7px 10px; }
.tc-tl.own .tc-k { display: flex; align-items: center; gap: 5px; color: var(--ink-3); font-size: 11px; }
.tc-m { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.tc-m .g16 { color: var(--ink); }
/* the pinned bar */
.tc-bar { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 14px; border-top: 3px solid var(--rule); background: var(--cream); box-shadow: 0 -8px 16px #f8f8f0; }
.tc-bar .tc-r { display: flex; gap: 8px; }
.tc-bar .px-btn { flex: 1; height: 44px; padding: 0 8px; font-size: 15px; }
.tc-bar .tc-more { flex: none; width: 104px; }
.tc-bar .tc-why { margin: 0; }
.tc-bar .tc-sw { justify-content: space-between; min-height: 44px; padding: 0 4px; font-size: 15px; }
.tc-bar .tc-toggle { width: 76px; height: 44px; }
.tc-bar .tc-note { flex: 1; align-self: center; }
/* (a narrow phone: the 8 badge cells keep their 44 px) */
@media (max-width: 389px) { .tc.phone .tc-body { padding-left: 5px; padding-right: 5px; } .tc.phone .tc-rows { padding-left: 0; padding-right: 0; } }
/* (a short room, a phone on its side between the pads: the buttons in one row) */
.tc.phone.short .tc-bar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 10px 8px; }
.tc.phone.short .tc-bar .tc-why { flex: 1 1 100%; }
.tc.phone.short .tc-bar .tc-r { flex: 1 1 auto; }
.tc.phone.short .tc-bar .tc-sw { flex: 1 1 auto; }

/* ------------------------------------------------------------------ sideways (p4) */
/* two columns: who, the guild and the buttons | the badges and the tiles */
.pxui.tc.side { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 12px; padding: 8px 12px; box-shadow: inset 0 0 0 3px var(--ring), 0 12px 30px #0008; }
.tc-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.tc.side .tc-head { gap: 10px; }
/* (tight: NEAR YOU on its own line and a status message still leave both button rows in view) */
.tc.side .tc-id { gap: 2px; }
.tc.side .tc-name { font-size: 24px; }
.tc.side .tc-meta, .tc.side .tc-pres { font-size: 12px; }
.tc.side .tc-pres { flex-wrap: wrap; row-gap: 2px; }
.tc.side .tc-msg { margin-top: 1px; padding: 1px 6px 2px; font-size: 12px; }
.tc.side .tc-guild { width: auto; padding: 4px 8px 4px 4px; gap: 8px; }
.tc.side .tc-guild.fr { padding: 8px 12px 8px 8px; }
.tc.side .tc-gi { gap: 3px; }
.tc.side .tc-acts { flex-direction: column; align-items: stretch; gap: 6px; margin-top: auto; }
.tc.side .tc-acts .tc-r { display: flex; gap: 6px; }
.tc.side .tc-acts .px-btn { flex: 1; height: 44px; padding: 0 6px; font-size: 14px; }
.tc.side .tc-acts .tc-more { flex: none; width: 92px; }
.tc.side .tc-acts .tc-sw { justify-content: space-between; min-height: 44px; font-size: 13px; }
.tc.side .tc-acts .tc-note { font-size: 12px; }
.tc.side .tc-why { margin: 0; font-size: 12px; }
/* (your own card: the money line, or the "Previewing" strip, in the top row) */
.tc.side .tc-own { flex: 1; min-width: 0; gap: 8px; margin: 0; padding: 4px 8px; font-size: 13px; overflow: hidden; }
.tc.side .tc-only { width: auto; font-size: 11px; }
.tc.side .tc-prev { flex: 1; min-width: 0; margin: 0; padding: 3px 8px; font-size: 12px; line-height: 1.25; }
.tc.side .tc-top .tc-why { flex: 1; min-width: 0; margin: 0; }
.tc-top { flex: none; display: flex; align-items: center; gap: 8px; }
.tc-top .tc-x { margin-left: auto; }
.tc.side .tc-ch { height: 28px; }
.tc.side .tc-rows { padding: 2px 10px 3px; gap: 0; }
.tc.side .tc-brow { grid-template-columns: 48px repeat(8, minmax(44px, 1fr)); height: 44px; }
.tc.side .tc-brow + .tc-brow { height: 46px; padding-top: 2px; }
.tc.side .tc-sock { width: 40px; height: 40px; }
.tc.side .tc-stats { flex: 1 0 auto; gap: 8px; }
.tc.side .tc-tl { justify-content: center; padding: 5px 8px 6px; gap: 3px; }
.tc.side .tc-v { display: contents; }
.tc.side .tc-v > :first-child { order: -1; }
.tc.side .tc-v .g32 { margin: 0; line-height: 24px; }
.tc.side .tc-k { font-size: 11px; letter-spacing: .05em; }
.tc.side .tc-s { font-size: 12px; }

/* ------------------------------------------------------------------ touch */
/* the kit's 44 px targets (social-ui.css gives them only inside .pxui.touch, the
   social layer; this card lives in #windows) */
@media (pointer: coarse) {
  .tc .px-btn, .tc-toggle, .tc button.tc-vg { min-height: 44px; }
  .tc-x { min-width: 44px; min-height: 44px; }
  .tc-acts .px-btn { height: 44px; }
  .tc-menu .px-item { min-height: 44px; }
  /* (the badges' header has no room for a 44 px chip: its target reaches past it) */
  .tc-cap { position: relative; }
  .tc-cap::before { content: ""; position: absolute; inset: -10px -4px; }
}
