.group-heading {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem;
  padding: .4rem 0 1.2rem;
}
.group-heading h2 { font: 800 clamp(1.9rem,4vw,3rem)/1.06 var(--display); }
.group-heading p { margin: .35rem 0 0; }
.group-layout { display: grid; grid-template-columns: minmax(12rem,.55fr) minmax(0,1.45fr); align-items: start; gap: clamp(.9rem,3vw,2.3rem); }
.group-directory {
  min-width: 0; background: #eee6d6; border: 1px solid #bfae91; border-radius: 7px;
  padding: .85rem; box-shadow: inset 0 -3px 0 #d8cbb4;
}
.group-directory h3 { margin: .05rem .15rem .8rem; font: 700 .94rem/1.2 var(--body); }
.group-directory [data-groups] { display: grid; gap: .65rem; }
.group-file {
  position: relative; display: grid; width: 100%; gap: .15rem; padding: .7rem .8rem;
  border: 1px solid #b8a07a; border-radius: 3px 6px 5px 5px; color: var(--ink); background: #fff9ec;
  text-align: left; box-shadow: 0 2px 0 #bbaa8c; overflow-wrap: anywhere;
}
.group-file::before {
  position: absolute; height: 5px; width: 28px; content: ''; top: -4px; left: 12px;
  border: 1px solid #b8a07a; border-bottom: 0; border-radius: 4px 4px 0 0; background: inherit;
}
.group-file[aria-pressed=true] { background: #dcefe6; border-color: #426f5c; box-shadow: inset 4px 0 #426f5c, 0 2px 0 #9ea98d; }
.group-file-title { font-weight: 700; }
.group-file-count, .group-help { font-size: .94rem; }
.group-sheet {
  background: #fffdf7; min-width: 0; padding: clamp(.85rem,3vw,1.65rem); border: 1px solid #9d907c;
  border-radius: 4px 9px 5px 4px; box-shadow: 3px 3px 0 #e4dac6;
}
.group-sheet-header, .group-tools { display: flex; align-items: center; justify-content: space-between; gap: .6rem .9rem; flex-wrap: wrap; }
.group-sheet-header h3 { font: 800 clamp(1.5rem,4vw,2.2rem)/1.13 var(--display); }
.group-sheet-header .quiet-link, .group-post .quiet-link { min-height: 35px; }
.group-tools { border-bottom: 1px solid #d4c6ad; padding: .5rem 0 .85rem; margin-bottom: 1rem; align-items: start; }
.group-roster { min-width: 0; flex: 1 1 130px; }
.group-roster summary { display: list-item; width: fit-content; padding: .49rem 0; cursor: pointer; font-weight: 700; }
.group-roster ul { list-style: none; display: flex; flex-wrap: wrap; gap: .42rem; margin: 0; padding: 0; }
.group-roster li { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid #cec3af; border-radius: 20px; background: #fbf6ea; padding: .13rem .5rem .13rem .19rem; font-size: .93rem; max-width: 100%; overflow-wrap: anywhere; }
.group-portrait { display: block; flex: 0 0 auto; object-fit: contain; border-radius: 50%; background: #efe8d4; }
.group-compose { padding-bottom: .9rem; border-bottom: 1px solid #c6baa2; gap: .47rem; }
.group-compose textarea { background-color: #fffdf7; }
.group-post { padding: .8rem 0; border-bottom: 1px dashed #d3c7b1; }
.group-post:last-child { border: 0; padding-bottom: 0; }
.group-post header { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
.group-post time { margin-left: auto; font-size: .86rem; }
.group-post p, .group-dialog p { overflow-wrap: anywhere; white-space: pre-line; }
.group-post p { margin: .45rem 0 0; }
.group-post .quiet-link { font-size: .85rem; }
.group-feed-empty { padding: .9rem 0 0; color: #554938; }
.group-notice:not(:empty) { margin: 0 0 .8rem; padding: .33rem .65rem; border-left: 3px solid #426f5c; background: #e9f1e8; }
.group-notice[data-error=true], .group-error:not(:empty) { background: #fae4d9; color: #742c1c; }
.group-error:not(:empty) { padding: .4rem .55rem; }
.group-empty-layout { grid-template-columns: 1fr; }
.group-empty-layout .group-directory { display: none; }
.group-empty { display: grid; justify-items: start; gap: .4rem; }
.group-empty h3 { font-size: 1.5rem; }
.group-symbol { object-fit: contain; }
.group-dialog {
  width: min(calc(100% - 1rem),32rem); max-height: 90vh; max-height: 90dvh; overflow-y: auto;
  padding: clamp(.9rem,3vw,1.55rem); color: var(--ink); border: 1.5px solid var(--ink);
  border-radius: 7px; background: var(--paper); box-shadow: 4px 5px 0 #908171;
}
.group-dialog::backdrop { background: rgba(37,31,24,.48); }
.group-dialog h3 { font: 800 clamp(1.55rem,4vw,2rem)/1.1 var(--display); }
.group-checks { border: 0; padding: 0; margin: .15rem 0 0; min-width: 0; }
.group-checks legend { margin-bottom: .4rem; font-size: 1rem; font-weight: 700; }
.group-check-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .35rem; max-height: 36vh; overflow: auto; }
.group-dialog .field-form label.group-check {
  display: flex; align-items: center; gap: .38rem; padding: .37rem; min-height: 44px; min-width: 0;
  border: 1px solid #c9beab; border-radius: 5px; background: var(--white); cursor: pointer; font-weight: 400;
}
.group-dialog .group-check:has(input:checked) { background: #e5efe6; border-color: #67856f; }
.group-check span { overflow-wrap: anywhere; min-width: 0; }
.group-form-actions { display: flex; align-items: center; gap: .5rem .8rem; flex-wrap: wrap; }
.group-danger { color: #812f1e; margin-left: auto; }
@media (max-width: 680px) {
  .group-layout { grid-template-columns: minmax(0,1fr); }
  .group-directory [data-groups] { grid-template-columns: repeat(auto-fit,minmax(min(128px,100%),1fr)); }
  .group-directory h3 { margin-bottom: .55rem; }
  .group-directory { padding: .65rem; }
  .group-file { padding: .5rem .65rem; }
}
@media (max-width: 390px) {
  .group-check-list { grid-template-columns: 1fr; }
}
