/* Group Maker (loads after timer.css; uses the lofi.css tokens and the shared .nd-panel / .nd-chip / .nd-portrait styles). */
.gm-pairpick { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-bottom: var(--s2); }
.gm-pairpick select { min-width: 0; width: 100%; }
.gm-rules { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: 4px; }
.gm-rule { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 6px 5px 10px; border-radius: var(--r-md); background: var(--raised); box-shadow: var(--shadow-1); font-size: var(--t-cap); font-weight: 600; }
.gm-rule.gm-none { background: transparent; box-shadow: none; color: var(--muted); font-weight: 500; padding-left: 2px; }
.gm-rule-x { min-height: 28px; height: 28px; min-width: 28px; padding: 0; border-radius: 8px; background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); font-size: 16px; }
.gm-rule-x:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
#gmApartCount, #gmTogetherCount, #gmHereCount { color: var(--muted); font-weight: 500; }

.gm-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 12px; gap: 10px; }
.gm-tools { display: inline-flex; gap: 8px; }
.gm-stage-wrap { position: relative; flex: 1; min-height: 240px; overflow: auto; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow-2); background-color: color-mix(in srgb, var(--room, var(--surface)) 62%, var(--surface)); background-image: radial-gradient(120% 90% at 50% 38%, rgb(255 255 255 / .35), rgb(255 255 255 / 0) 60%); scrollbar-width: thin; }
body[data-mode=dark] .gm-stage-wrap { background-image: radial-gradient(120% 90% at 50% 38%, rgb(255 255 255 / .04), rgb(255 255 255 / 0) 60%); }
.gm-stage { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; align-content: start; }
.gm-stage:empty { display: block; }
.gm-stage:empty::before { content: "Ready when you are"; display: grid; place-items: center; min-height: 200px; color: var(--muted); font: 600 clamp(18px, 2.4vw, 30px) var(--font-display); }
.gm-stage[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gm-stage[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gm-conflicts { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-md); border: 1px solid color-mix(in srgb, var(--warn-ink) 35%, var(--line)); background: color-mix(in srgb, var(--butter) 30%, var(--raised)); color: var(--ink); font-size: var(--t-body); }
.gm-conflicts[hidden] { display: none; }
.gm-conflicts ul { margin: 6px 0; padding-left: 18px; }
.gm-conflicts p { margin: 4px 0 0; color: var(--muted); font-size: var(--t-cap); }
.gm-card { --hue: #c98b6b; background: var(--raised); border-radius: 18px; border: 1px solid var(--line); border-top: 6px solid var(--hue); box-shadow: var(--shadow-2); padding: 10px 12px 12px; animation: gm-in .55s var(--gm-spring, cubic-bezier(.2, .9, .3, 1.15)) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes gm-in { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }
.gm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.gm-head h3 { margin: 0; font: 700 18px var(--font-display); letter-spacing: -.01em; flex: 1; }
.gm-count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--hue) 28%, var(--raised)); }
.gm-lock { min-height: 28px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650; background: transparent; box-shadow: none; }
.gm-lock[aria-pressed=true] { background: color-mix(in srgb, var(--hue) 30%, var(--raised)); border-color: var(--hue); }
.gm-members { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.gm-member { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gm-member .nd-portrait { flex: none; border-radius: 9px; }
.gm-name { font-size: 15px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.gm-print-only { display: none; }
.gm-main.gm-fs { position: fixed; inset: 0; z-index: 60; background: var(--bg); padding: 18px; }
.gm-main:fullscreen { background: var(--bg); padding: 18px; }
.gm-fs .nd-hint { display: none; }
.gm-fs .gm-name { font-size: clamp(18px, 2.1vw, 32px); }
.gm-fs .gm-head h3 { font-size: clamp(20px, 2.4vw, 36px); }
.gm-fs .gm-member .nd-portrait { zoom: 1.35; }
@media (max-width: 800px) { .gm-main { min-height: 70vh; } .gm-stage-wrap { min-height: 320px; } .gm-stage[data-count="2"], .gm-stage[data-count="3"] { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .gm-card { animation: none; } }
@media print {
 html, body { height: auto !important; overflow: visible !important; }
 body[data-module=groupmaker] > *:not(#moduleGroupMaker) { display: none !important; }
 body[data-module=groupmaker] #moduleGroupMaker { display: block !important; height: auto !important; background: #fff; }
 body[data-module=groupmaker] .gm-panel, body[data-module=groupmaker] .nd-top, body[data-module=groupmaker] .nd-controls, body[data-module=groupmaker] .gm-lock, body[data-module=groupmaker] .gm-conflicts { display: none !important; }
 body[data-module=groupmaker] .gm-main { padding: 0; }
 body[data-module=groupmaker] .gm-stage-wrap { overflow: visible; border: 0; box-shadow: none; background: none; padding: 0; }
 .gm-print-only { display: block !important; margin: 0 0 12px; font: 700 20px var(--font-display); color: #000; }
 .gm-stage { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 10px; }
 .gm-card { break-inside: avoid; animation: none; box-shadow: none; border: 1px solid #888; border-top: 5px solid var(--hue); background: #fff; }
 .gm-name, .gm-head h3 { color: #000; }
}
