/* Classroom teams share the garden's palette and readable, touch-friendly controls. */
.group-leaf{--group-color:#397245;--group-wash:#eff6dd;--group-border:#c7dea6}
.group-sky{--group-color:#246b91;--group-wash:#eaf7ff;--group-border:#b7dbea}
.group-lavender{--group-color:#72519d;--group-wash:#f1ecfc;--group-border:#d8c8ed}
.group-peach{--group-color:#935525;--group-wash:#fff1df;--group-border:#edcda6}
.group-rose{--group-color:#9a4563;--group-wash:#fff0f4;--group-border:#ebc1d0}
.group-aqua{--group-color:#246f69;--group-wash:#e9f8f2;--group-border:#b2ddd2}
.group-neutral{--group-color:#626959;--group-wash:#f1f2e9;--group-border:#d8ddcd}
#dialog:has(.groups-panel){width:min(740px,calc(100vw - 40px))}
.group-kicker{font-size:13px;color:#5b7355;font-weight:600;display:block;padding-right:36px;overflow-wrap:anywhere}
.group-toolbar{display:flex;gap:10px;margin:20px 0;flex-wrap:wrap}
.group-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.group-card{background:var(--group-wash);border:1px solid var(--group-border);border-radius:16px;padding:18px;min-width:0}
.group-card-title{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
#dialog .group-card h3{font-size:16px;line-height:1.5;margin:0;color:var(--group-color);overflow-wrap:anywhere}
.group-card-title>span{font-size:13px;white-space:nowrap;color:#53614f}
.group-dot{display:inline-block;width:10px;height:10px;background:var(--group-color);border-radius:50%;margin-right:7px;flex-shrink:0}
.group-stats{display:flex;gap:30px;margin:18px 0 12px}
.group-stats div{display:flex;flex-direction:column;gap:4px}
.group-stats strong{font-size:24px;line-height:1.2;color:var(--group-color);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.group-stats span{font-size:12px;color:#596653}
.group-names{font-size:13px;line-height:1.65;color:#53614f;min-height:43px;margin:0 0 14px;overflow-wrap:anywhere}
.group-card-actions{display:flex;flex-wrap:wrap;gap:8px}
.group-card-actions button{padding:8px 10px;flex:1;white-space:nowrap}
.group-unassigned{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:16px;background:#f5f5eb;border:1px dashed #cdd5bc;border-radius:14px;margin:16px 0 24px}
.group-unassigned p{font-size:13px;color:#5c6a52;line-height:1.6;margin:5px 0 0}
.group-unassigned button{flex-shrink:0}
.group-empty{background:#f3f8e8;padding:28px 20px;border-radius:16px;text-align:center;color:#486039}
.group-empty p{font-size:14px;line-height:1.7}
.group-color-picker{border:0;padding:0;margin:18px 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.group-color-picker legend{font-size:14px;font-weight:600;margin-bottom:10px}
.group-color-picker label{display:flex;align-items:center;gap:5px;min-height:44px;border:1px solid var(--group-border);background:var(--group-wash);color:var(--group-color);border-radius:10px;padding:8px;font-size:13px;cursor:pointer}
.group-color-picker label:has(:checked){outline:2px solid var(--group-color);outline-offset:1px}
.group-color-picker input{accent-color:var(--group-color);width:16px;height:16px;margin:0}
.group-color-picker .group-dot{margin:0;width:8px;height:8px}
.group-member-list .student-option>span{display:flex;flex-direction:column;gap:2px;overflow-wrap:anywhere}
.group-member-list .student-option small{font-size:12px;color:#647057;overflow-wrap:anywhere}
.group-member-list .student-option>small{max-width:35%;text-align:right}
#dialog .group-danger{color:#a53d33;border-color:#dfb6ad;background:#fff2e9}
.group-error{color:#963d28;background:#fff0e5;border:1px solid #e3b6a5;padding:12px;border-radius:10px;line-height:1.6}
.random-group-card{background:var(--group-wash);border:1px solid var(--group-border);padding:14px 16px;margin-top:10px;border-radius:12px}
.random-group-card strong{font-size:14px;color:var(--group-color)}
.random-group-card p{font-size:14px;line-height:1.8;margin:8px 0 0;overflow-wrap:anywhere}
.student-group{display:block;width:fit-content;max-width:100%;font-size:12px;font-weight:600;line-height:1.5;padding:3px 8px;border-radius:6px;background:var(--group-wash);color:var(--group-color);border:1px solid var(--group-border);margin:0 0 8px;overflow-wrap:anywhere}
#group-filter-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 20px;font-size:14px;font-weight:600}
#group-filter-bar select{font:inherit;min-height:44px;border:1px solid #cddcba;border-radius:10px;background:#fffef8;padding:8px 32px 8px 12px;color:#36553a;max-width:100%;min-width:160px}
#group-filter-bar button{min-height:44px;padding:8px 14px;font:inherit;border:1px solid #cddcba;border-radius:10px;background:#f3f8e6;color:#36553a}
#group-filter-bar[hidden],#group-empty-result[hidden]{display:none}
#group-empty-result{padding:32px 20px;background:#fffef5;border:1px dashed #cddcba;border-radius:16px;color:#5b7150;text-align:center;font-size:14px;line-height:1.7}
#dialog .setting-options button[data-action=groups]::before{content:"";background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234e7447' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3 20v-2a6 6 0 0112 0v2M16 5a3 3 0 010 6m3 9v-2a6 6 0 00-2-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:center}
@media(max-width:600px){
 #dialog:has(.groups-panel){width:calc(100vw - 24px)}
 .group-grid{grid-template-columns:1fr}.group-card{padding:16px}
 .group-color-picker{grid-template-columns:repeat(2,minmax(0,1fr))}
 #group-filter-bar{gap:8px}#group-filter-bar>label{width:100%}
 #group-filter-bar select{flex:1;min-width:0;width:0}
 .group-stats{gap:40px}.group-names{min-height:0}
 .group-unassigned{padding:12px}
}
/* Group viewing and roster management do not require permission to edit scoring rules. */
body.no-rules #settings{display:inline-flex}
body.no-rules [data-action=hunger]{display:none}
