/* Together and cloud (#40): Players tab, group and class sheets, town, street, visit, account, restore prompt. */
.tg-card { gap: 12px; }
.tg-room { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.08); color: inherit; }
.tg-room > .sf, .tg-room > svg { color: var(--accent); flex: none; width: 28px; }
.tg-roomtxt { flex: 1; display: grid; min-width: 0; }
.tg-roomtxt b { font-size: 17px; }
.tg-roomtxt small { font-size: 12px; }
.tg-visit { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; font-size: 15px; white-space: nowrap; }
.tg-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tg-tile { display: grid; gap: 4px; text-align: left; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: inherit; }
.tg-tile > .sf { color: var(--accent); }
.tg-tile .din { font-size: 19px; margin-top: 2px; }
.tg-tile small { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.tg-tile small i { font-style: normal; }
.secondary-btn { padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); font-size: 13px; font-weight: 600; color: var(--ink); }
.secondary-btn.wide { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 12px; font-size: 15px; }
.secondary-btn.danger, .link.danger, .st-danger.tg { color: var(--stamp); }
.tg-hold { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tg-hold span { flex: 1; }
.tg-error { display: flex; gap: 6px; align-items: center; color: var(--orange); font-size: 13px; }
.tg-ok { display: flex; gap: 8px; align-items: center; color: var(--good); font-size: 20px; font-weight: 600; }
.tg-field { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.tg-input { width: 100%; padding: 12px 14px; font: inherit; font-size: 19px; color: var(--ink); background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.3); border-radius: 12px; outline: none; }
.tg-input:focus { border: 2px solid var(--accent); padding: 11px 13px; }
.tg-input.code { font: 800 34px/1.1 var(--num); letter-spacing: 6px; text-align: center; text-transform: uppercase; }
.tg-select { width: 100%; padding: 10px; border-radius: 10px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid rgba(243,235,216,.3); }
.tg-spin { position: fixed; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: var(--accent); animation: tg-spin .8s linear infinite; pointer-events: none; }
@keyframes tg-spin { to { transform: rotate(360deg); } }

/* sheets with their own page stack */
.together { display: block !important; padding: 0 !important; }
.tg-page { padding: 4px 16px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 14px; align-content: start; max-width: 640px; margin: 0 auto; }
.tg-page[hidden] { display: none; }
.tg-bar { display: flex; align-items: center; gap: 8px; margin: 0 -16px; padding: 0 12px; min-height: 40px; }
.tg-bar h3 { margin: 0; font-size: 22px; }
.tg-content { display: grid; gap: 14px; }
.tg-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.tg-row > b { flex: 1; }
.tg-rowmain { flex: 1; display: flex; align-items: center; gap: 10px; text-align: left; color: inherit; min-width: 0; }
.tg-rowmain > span:first-child { flex: 1; display: grid; }
.tg-rowmain.solo { width: 100%; padding: 8px 0; }
.tg-rowmain small { font-size: 12px; }
.tg-member { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 16px; }
.tg-member > span:first-child { display: grid; }
.tg-member small { font-size: 12px; }
details.tg-member { display: block; }
details.tg-member summary { cursor: pointer; }
.tg-status { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; }
.tg-status span { display: grid; gap: 3px; }
.tg-status small { font-size: 13px; }
.tg-board { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.tg-board > span:nth-child(2) { flex: 1; display: grid; }
.tg-board .tg-rank { width: 26px; font-size: 18px; color: rgba(235,235,245,.6); }
.tg-board.mine .tg-rank { color: var(--accent); }
.tg-qr { display: grid; gap: 8px; justify-items: center; text-align: center; }
.tg-qrbox canvas { width: min(260px, 70vw); height: auto; border-radius: 16px; image-rendering: pixelated; display: block; }
.tg-code { font-size: 40px; letter-spacing: 6px; }
.tg-apple { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; font-size: 17px; font-weight: 600; background: #fff; color: #000; border-radius: 10px; }
.tg-google { border: 1px solid #dadce0; }
.tg-apple + .tg-google { margin-top: 8px; }

/* the offer, a note on paper */
.tg-offer { position: relative; display: grid; gap: 8px; padding: 14px; background: var(--ink); color: var(--deep); border-radius: 6px; transform: rotate(-.8deg); }
.tg-offer.big { transform: rotate(.6deg); padding: 16px; gap: 12px; }
.tg-offer h3 { margin: 0; font-size: 26px; }
.tg-offer small { opacity: .7; }
.tg-offerhead { display: flex; gap: 10px; align-items: flex-start; padding-right: 64px; }
.tg-ico { font-size: 28px; line-height: 1; }
.tg-price { font-size: 36px; margin-top: 4px; }
.tg-stamp { position: absolute; top: 10px; right: 10px; padding: 3px 6px 0; border: 2px solid var(--stamp); color: var(--stamp); text-transform: uppercase; font-size: 16px; transform: rotate(8deg); }
.tg-offerbtns { display: flex; gap: 8px; }
.tg-sell { padding: 7px 14px; border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 600; font-size: 13px; }
.tg-sell:disabled { opacity: .4; }
.tg-offer .secondary-btn { background: transparent; color: var(--deep); border-color: rgba(15,42,73,.4); }
.tg-cant { color: var(--stamp); opacity: 1 !important; }
.tg-presets { display: flex; gap: 8px; }
.tg-presets button { flex: 1; display: grid; gap: 2px; justify-items: center; padding: 10px 4px; border-radius: 8px; border: 1px dashed rgba(15,42,73,.25); background: rgba(15,42,73,.06); color: var(--deep); }
.tg-presets button.on { background: var(--accent); border-color: transparent; }
.tg-presets b { font-size: 18px; }
.tg-presets small { font-size: 11px; }
.tg-send { padding: 12px; border-radius: 10px; background: var(--deep); color: var(--ink); font-size: 22px; }
.tg-send:disabled { opacity: .4; }
.tg-bigstamp { position: absolute; left: 50%; top: 50%; padding: 8px 14px 4px; border: 3.5px solid var(--stamp); color: var(--stamp); text-transform: uppercase; font-size: 36px; transform: translate(-50%, -50%) rotate(-9deg); pointer-events: none; background: rgba(243,235,216,.55); }

/* the town: lots along an avenue on a mown lawn (TownViews.swift). Colours are the iOS ground's, from TownGround. */
.tg-townsheet { --lawn: #3C6345; --stripe: #416B4A; --asphalt: #57585C; --edge: rgba(233,228,214,.8); background: var(--deep) !important; color: var(--ink); }
.tg-townsheet .tg-bar h3 { color: var(--ink); }
/* Lawn with 22 px stripes, and the avenue down the middle; it scrolls with the content. */
.tg-townsheet:has(> .tg-page.root:not([hidden])) { background-color: var(--lawn) !important; background-attachment: local !important;
  background-image:
    linear-gradient(var(--edge), var(--edge)), linear-gradient(var(--edge), var(--edge)),
    repeating-linear-gradient(to bottom, var(--accent) 0 14px, transparent 14px 26px),
    linear-gradient(var(--asphalt), var(--asphalt)),
    repeating-linear-gradient(90deg, var(--stripe) 0 22px, var(--lawn) 22px 44px) !important;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat !important;
  background-size: 2px 100%, 2px 100%, 2.5px 100%, 56px 100%, auto !important;
  background-position: calc(50% - 23px) 0, calc(50% + 23px) 0, 50% 0, 50% 0, 0 0 !important; }
.tg-page.tg-townpage { max-width: none; padding: 4px 0 calc(40px + env(safe-area-inset-bottom)); gap: 0; }
.tg-townhead { text-align: center; display: grid; gap: 4px; width: calc(100% - 32px); max-width: 560px; justify-self: center; margin-bottom: 14px; padding: 12px 14px; border-radius: 18px; background: rgba(0,0,0,.5); }
.tg-townhead h2 { margin: 0; font-size: 36px; color: var(--ink); }
.tg-townhead p { opacity: .75; }
.tg-seg { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.tg-seg button { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 13px; }
.tg-seg button.on { background: var(--accent); color: #000; }
.tg-empty { text-align: center; padding: 20px; margin: 40px 24px; border-radius: 14px; background: rgba(0,0,0,.5); color: var(--ink); }
/* The avenue is 56 wide; a side is what is left of the width (600 at most) either side of it. */
.tg-town { container-type: inline-size; --side: calc((min(100cqw, 600px) - 56px) / 2); }
.tg-row { display: grid; grid-template-columns: var(--side) 56px var(--side); width: calc(var(--side) * 2 + 56px); margin: 0 auto; padding: 12px 0; align-items: start; }
.tg-row > .tg-isle { grid-column: 1; grid-row: 1; justify-self: end; }
.tg-row.right > .tg-isle { grid-column: 3; justify-self: start; }
.tg-row > .tg-park { grid-column: 3; grid-row: 1; }
.tg-row.right > .tg-park { grid-column: 1; }
.tg-isle { --lw: calc(min(var(--side) - 14px, 172px) * var(--s) / 1.10); --u: calc(var(--lw) / 170); position: relative; width: var(--lw); display: grid; gap: 6px; justify-items: center; }
.tg-island { display: grid; justify-items: center; width: 100%; color: inherit; }
.tg-sign { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; max-width: var(--side); padding: 3px 12px 0; margin-bottom: -8px; background: var(--ink); color: var(--deep); border-radius: 4px; font-size: 22px; line-height: 1.2; box-shadow: 0 2px 3px rgba(0,0,0,.3); }
.tg-sign.ribboned { margin-bottom: 0; }
.tg-sign > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-sign .sf { color: var(--accent); margin-top: -3px; }
.tg-sign .sf:nth-child(2) { color: var(--stamp); }
.tg-lot { position: relative; display: block; width: 100%; aspect-ratio: 232 / 172; }
.tg-lot .tg-lotart { display: block; width: 100%; height: 100%; filter: drop-shadow(0 4px 3px rgba(0,0,0,.35)); }
.tg-lot.right .tg-lotart { transform: scaleX(-1); }
/* The machines sit on the floor (180 x 120 of the lot's 232 x 172), at 90% of its width and 84% of its height. */
.tg-shops { position: absolute; left: 50%; top: 50%; width: 69.83%; height: 43.45%; transform: translate(-50%, -50%); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px;
  --gap: calc(var(--u) * 4); --fit: min((var(--lw) * .6983 - var(--gap) * (var(--n) - 1)) / var(--n), var(--lw) * .4345 / var(--rows) - 2px); }
.tg-frow { display: flex; align-items: flex-end; justify-content: center; gap: var(--gap); }
.tg-shop { font-size: calc(min(var(--fit), var(--sz) * var(--u)) * .85); line-height: 1; filter: drop-shadow(0 3px 2px rgba(0,0,0,.4)); }
.tg-pennant { position: absolute; top: -34px; left: -10px; pointer-events: none; }
.tg-lot.right .tg-pennant { left: auto; right: -10px; }
.tg-lotplate { display: grid; justify-items: center; width: max-content; max-width: var(--side); margin-top: 6px; padding: 3px 10px 1px; border-radius: 8px; background: rgba(0,0,0,.45); }
.tg-comp { font-size: 12px; font-weight: 600; color: rgba(243,235,216,.85); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-prof { font-size: 19px; color: #99eb8c; white-space: nowrap; }
.tg-prof.neg { color: var(--stamp); }
.tg-island:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
/* A few round trees across the avenue from each lot. */
.tg-park { position: relative; height: 120px; }
.tg-tree { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; background: #2F6B3F; border: 1.5px solid #1F3D28; box-sizing: border-box; box-shadow: 3px 5px 0 rgba(0,0,0,.22); }
.tg-tree::after { content: ""; position: absolute; left: 20%; top: 18%; width: 42%; height: 36%; border-radius: 50%; background: rgba(90,154,98,.8); }
/* A side street across the avenue after every two lots: 58 tall, the road 46 of it, with no lines across the avenue. */
.tg-cross { display: grid; grid-template-columns: 1fr 56px 1fr; height: 58px; }
.tg-cross i { background:
    linear-gradient(var(--edge), var(--edge)) 0 10px / 100% 2px no-repeat,
    linear-gradient(var(--edge), var(--edge)) 0 46px / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--accent) 0 14px, transparent 14px 26px) 0 27.75px / calc(100% - 6px) 2.5px no-repeat,
    linear-gradient(var(--asphalt), var(--asphalt)) 0 6px / 100% 46px no-repeat; }
.tg-cross i:last-child { background-position: 0 10px, 0 46px, 100% 27.75px, 0 6px; }

/* a street: the baked winding road, 393 wide and scaled to fit (street.js). The sheet's full width, 600 at most, in the middle. */
.tg-visittitle { margin: 0; font-size: 34px; text-align: center; color: var(--ink); }
.tg-street { position: relative; width: calc(100% + 32px); max-width: 600px; justify-self: center; background: #17122E; overflow: hidden; }
.tg-stage { position: absolute; left: 0; top: 0; width: 393px; transform-origin: 0 0; opacity: 0; }
.tg-stage.on { opacity: 1; transition: opacity .25s; }
.tg-stage > img, .tg-sprite, .tg-car, .tg-beam, .tg-carbody, .tg-walker, .tg-beacon { position: absolute; max-width: none; pointer-events: none; user-select: none; -webkit-user-select: none; }
.tg-car, .tg-walker { left: 0; top: 0; will-change: transform; }
.tg-carbody { inset: 0; background-size: 400% 400%; }
.tg-beam { background-size: 100% 100%; transform-origin: 50% 100%; }
.tg-beacon { width: 14px; height: 14px; border-radius: 50%; background: #291233; opacity: 0; z-index: 1; }
.tg-words { position: absolute; inset: 0; z-index: 100000; pointer-events: none; }
.tg-word { position: absolute; transform: translateY(-50%); text-align: center; white-space: nowrap; font-size: 0; line-height: 1; }
.tg-word > span { display: inline-block; vertical-align: top; }
.tg-word > .cut { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tg-towername { font-size: calc(26px * var(--fit, 1)); letter-spacing: 1.2px; line-height: 1; color: rgba(255,255,255,.95); text-shadow: 0 0 2px #FF4FBF, 0 0 7px rgba(255,79,191,.8); }
.tg-towerprofit { font-size: calc(14px * var(--fit, 1)); line-height: 1; color: #BFF7FF; text-shadow: 0 0 3px rgba(64,230,255,.9); }
.tg-tag { position: absolute; transform: translate(-50%, -50%) rotate(-6deg); white-space: nowrap; font: 11px "Marker Felt", "Comic Sans MS", cursive; color: rgba(64,230,255,.85); }
.tg-plate { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.55); font-size: 13px; line-height: 1.3; color: #99EB8C; }
.tg-plate.loss { color: var(--stamp); }
.tg-plate.sale { font-size: 14px; color: var(--ink); }
.tg-hit { position: absolute; z-index: 100001; border-radius: 12px; }
.tg-hit.still { cursor: default; }
.tg-hit:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* visiting a business */
.tg-floor { display: grid; place-items: center; min-height: 160px; border-radius: 14px; background: var(--lawn); overflow: hidden; } /* the lot stands on lawn, as on iOS */
.tg-floorfallback { font-size: 72px; }
.tg-floor canvas { max-width: 100%; height: auto; }
.tg-figures { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 0; border-radius: 12px; background: rgba(23,62,107,.85); text-align: center; }
.tg-figures b { display: block; font-size: 20px; color: var(--ink); }
.tg-figures b.good { color: #99eb8c; }
.tg-figures b.bad { color: var(--stamp); }
.tg-figures small { font-size: 11px; opacity: .6; }
.tg-chips { display: flex; gap: 8px; flex-wrap: wrap; }

/* the pill in the strip */
.pill .tg-platename { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* the restore prompt (over the intro too) */
.tg-alertwrap { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: rgba(0,0,0,.45); padding: 20px; }
.tg-alert { width: min(320px, 100%); display: grid; gap: 12px; padding: 20px; border-radius: 18px; background: #1d2740; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.tg-alert h3 { margin: 0; font-size: 24px; text-align: center; }
.tg-alert p { font-size: 14px; line-height: 1.35; opacity: .85; text-align: center; }

/* a group's menu (restart, end, leave, delete) and the email-code sign-in */
.tg-menu { position: relative; }
.tg-menu summary { list-style: none; cursor: pointer; }
.tg-menu summary::-webkit-details-marker { display: none; }
.tg-menuitems { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 2px; }
.tg-row:has(details[open]) { flex-wrap: wrap; }
.tg-row:has(details[open]) .tg-menu { flex-basis: 100%; }
.tg-email { display: grid; gap: 10px; padding: 12px 16px; }
.tg-email .link { padding: 8px 0; }
