:root {
  --bg: #0a1a2a;
  --bg-alt: rgba(20, 45, 60, 0.9);
  --card: rgba(255, 255, 255, 0.92);
  --text: #1b2b3b;
  --accent: #c71f37;
  /* julröd */
  --accent-dark: #93182b;
  --accent-green: #1b4332;
  /* vintergrön */
  --accent-gold: #ffda77;
  --snow: rgba(255, 255, 255, 0.4);
  --snow-light: rgba(255, 255, 255, 0.25);
  --twinkle: rgba(255, 255, 255, 0.75);
  --shadow: 0 18px 35px rgba(0, 0, 0, 0.25);
  --font-title: "Playfair Display", "Georgia", serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.16), transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(7, 23, 42, 0.95) 0%, rgba(16, 45, 76, 0.89) 45%, rgba(32, 70, 110, 0.92) 100%),
    url("https://images.unsplash.com/photo-1513791053011-1e6b287fd0ec?auto=format&fit=crop&w=2000&q=70") center/cover fixed,
    var(--bg);
  background-attachment: fixed;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Snöfall */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20px 30px, var(--snow), transparent),
    radial-gradient(1.5px 1.5px at 80px 100px, var(--snow-light), transparent),
    radial-gradient(2px 2px at 200px 80px, var(--snow-light), transparent),
    radial-gradient(2px 2px at 300px 200px, var(--snow), transparent);
  background-size: 200px 200px;
  animation: snowfall 12s linear infinite;
  opacity: 0.85;
}

@keyframes snowfall {
  from {
    transform: translateY(-10%);
  }

  to {
    transform: translateY(10%);
  }
}

/* Julglitter (blinkande ljus) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(3px 3px at 10% 10%, var(--accent-gold), transparent),
    radial-gradient(3px 3px at 40% 20%, #ff595e, transparent),
    radial-gradient(3px 3px at 70% 10%, #6a994e, transparent),
    radial-gradient(3px 3px at 90% 30%, #ffca3a, transparent),
    radial-gradient(3px 3px at 30% 80%, #d62828, transparent);
  background-size: 400px 400px;
  animation: twinkle 4s infinite ease-in-out alternate;
  opacity: 0.5;
}

.wrapper {
  width: min(960px, 92%);
  margin: 0 auto;
}

.site-header {
  background: rgba(11, 30, 51, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(7px);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.site-header h1 {
  font-family: var(--font-title);
  margin: 0;
  font-size: 1.6rem;
}

.site-header h1 a {
  color: #fff;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

nav a {
  color: #f7fff7;
  text-decoration: none;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

main {
  flex: 1 0 auto;
  padding: 3rem 0 4rem;
  display: grid;
  gap: 2.5rem;
}

.hero {
  text-align: center;
  color: #fefefe;
  padding: 4rem 2rem;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(214, 40, 40, 0.88), rgba(45, 106, 79, 0.85));
  box-shadow: var(--shadow);
}

.hero h2 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto 2rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-note {
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.btn {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(214, 40, 40, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(214, 40, 40, 0.45);
  background: var(--accent-dark);
}

.btn.secondary {
  background: var(--accent-green);
  box-shadow: 0 12px 24px rgba(45, 106, 79, 0.35);
}

.btn.secondary:hover {
  background: #255541;
}

.btn.small {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.btn.danger {
  background: #b51717;
  box-shadow: 0 10px 22px rgba(181, 23, 23, 0.35);
}

.btn.danger:hover {
  background: #931010;
}

.info-grid {
  background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.16), transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(7, 23, 42, 0.95) 0%, rgba(16, 45, 76, 0.89) 45%, rgba(32, 70, 110, 0.92) 100%),
    url("https://images.unsplash.com/photo-1513791053011-1e6b287fd0ec?auto=format&fit=crop&w=2000&q=70") center/cover fixed,
    var(--bg);
  border-left: 5px solid var(--accent);
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  color: #FFF;
}

.card {
  background: var(--card);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;

  pointer-events: none;
}

.card h2,
.card h3 {
  font-family: var(--font-title);
  margin-top: 0;
}

.cardxl {
  grid-column: 1 / -1;
  padding: 3rem 3.5rem;
  display: grid;
  gap: 1.25rem;
}

.cardxl h3 {
  margin-bottom: 0.25rem;
}

.cardxl ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cardxl li {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
  font-size: 0.98rem;
}

.cardxl li strong {
  font-weight: 700;
  white-space: nowrap;
}

.top-groups-card {
  padding: 2.25rem;
  display: grid;
  gap: 1.75rem;
  background: linear-gradient(135deg, rgba(214, 40, 40, 0.08), rgba(27, 67, 50, 0.1)), var(--card);
}

.top-groups-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.top-groups-header h3 {
  margin: 0;
}

.top-groups-header p {
  margin: 0.35rem 0 0;
  color: rgba(27, 43, 59, 0.75);
}

.top-groups-icon {
  font-size: 2.75rem;
  filter: drop-shadow(0 6px 14px rgba(214, 40, 40, 0.25));
}

.top-group-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.top-group-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1.15rem;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(12, 30, 48, 0.85), rgba(16, 55, 75, 0.78));
  box-shadow: 0 16px 36px rgba(7, 18, 32, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.top-group-rank {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(214, 40, 40, 0.35);
  font-size: 1.6rem;
}

.top-group-item:nth-child(1) .top-group-rank {
  background: var(--accent-gold);
  color: var(--text);
  box-shadow: 0 10px 20px rgba(255, 218, 119, 0.45);
}

.top-group-item:nth-child(2) .top-group-rank {
  background: #adb5bd;
  color: var(--text);
}

.top-group-item:nth-child(3) .top-group-rank {
  background: #d4a373;
  color: var(--text);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top-group-meta h4 {
  margin: 0;
  font-size: 1.05rem;
  color: #f7fbff;
}

.top-group-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
}

.top-group-meta span {
  font-size: 0.95rem;
  color: rgba(224, 236, 247, 0.82);
}


.cardxl code {
  font-family: "Fira Code", "Consolas", monospace;
  font-size: 0.92rem;
}

.info-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.info-grid article {
  border-radius: 16px;
  padding: 1.7rem;
  box-shadow: var(--shadow);
  position: relative;
}

.info-grid article::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 65%);
  pointer-events: none;
}

.flash-messages {
  display: grid;
  gap: 0.75rem;
}

.flash {
  background: rgba(255, 255, 255, 0.9);
  border-left: 5px solid var(--accent);
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid.inline {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
}

.form-grid.inline .full {
  grid-column: 1 / -1;
}

.form-grid .form-actions,
.form-grid.inline .form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.form-grid .form-actions .btn.secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid rgba(16, 32, 48, 0.2);
  box-shadow: none;
}

.form-grid .form-actions .btn.secondary:hover {
  background: rgba(45, 106, 79, 0.12);
}

label {
  font-weight: 700;
  display: grid;
  gap: 0.4rem;
  color: var(--text);
}

label.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--text);
}

label.checkbox-label span {
  font-weight: 600;
}

label.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.quill-field {
  display: grid;
  gap: 0.5rem;
}

.quill-field .ql-toolbar {
  border: 1px solid rgba(16, 32, 48, 0.2);
  border-radius: 12px 12px 0 0;
  background: rgba(16, 32, 48, 0.08);
  padding: 0.45rem 0.6rem;
}

.quill-field .ql-toolbar .ql-formats {
  margin-right: 0.6rem;
}

.quill-field .ql-toolbar button {
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease;
  border-radius: 6px;
}

.quill-field .ql-toolbar button:hover,
.quill-field .ql-toolbar button:focus-visible {
  background: rgba(214, 40, 40, 0.15);
  color: var(--accent-dark);
  outline: none;
}

.quill-field .ql-container {
  border: 1px solid rgba(16, 32, 48, 0.2);
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: rgba(255, 255, 255, 0.95);
  min-height: 160px;
  font-family: inherit;
  color: var(--text);
}

.quill-field .ql-editor {
  min-height: 140px;
  line-height: 1.6;
}

.quill-field .ql-editor.ql-blank::before {
  color: rgba(16, 32, 48, 0.5);
  font-style: normal;
}

.rich-text-content {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
  line-height: 1.6;
  word-break: break-word;
}

.rich-text-content p {
  margin: 0;
}

.rich-text-content ul,
.rich-text-content ol {
  margin: 0.35rem 0 0.35rem 1.1rem;
  padding: 0;
}

.rich-text-content li {
  margin-bottom: 0.25rem;
}

.rich-text-content a {
  color: var(--accent-green);
  text-decoration: underline;
}

.rich-text-block {
  display: grid;
  gap: 0.3rem;
}

.rich-text-card {
  display: grid;
  gap: 0.4rem;
}

input,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(16, 32, 48, 0.2);
  background: rgba(255, 255, 255, 0.95);
  font: inherit;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(214, 40, 40, 0.15);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.current-image {
  margin-bottom: 2rem;
  text-align: center;
}

.current-image img {
  max-width: 220px;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.image-forms {
  display: grid;
  gap: 2rem;
}

.profile-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.profile-avatar img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.profile-avatar.empty {
  background: rgba(214, 40, 40, 0.1);
  padding: 1.2rem;
  border-radius: 16px;
}

.assignment-avatar {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.assignment-avatar img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(214, 40, 40, 0.6);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.avatar-placeholder {
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(214, 40, 40, 0.15);
  color: rgba(11, 30, 51, 0.8);
  font-size: 2.5rem;
  font-weight: 800;
  border: 3px dashed rgba(214, 40, 40, 0.5);
}

.avatar-placeholder.small {
  width: 56px;
  height: 56px;
  font-size: 1.4rem;
  border-width: 2px;
}

.participant-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-auto-rows: 1fr;
}

.participant-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  padding: 1rem 1.2rem;
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.participant-list li:nth-child(3n) {
  grid-column: span 2;
  transform: scale(1.04);
}

.participant-list li:nth-child(5n) {
  grid-column: span 2;
  padding: 1.2rem 1.4rem;
}

.participant-list li img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(45, 106, 79, 0.35);
}

.participant-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.participant-meta strong {
  font-size: 1rem;
}

.participant-meta span {
  font-size: 0.85rem;
  color: rgba(16, 32, 48, 0.75);
}

.participant-info {
  font-style: italic;
}

.site-footer {
  background: rgba(8, 23, 40, 0.85);
  color: rgba(255, 255, 255, 0.8);
  padding: 1.5rem 0;
  text-align: center;
  margin-top: auto;
}

.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
}

.table thead {
  background: rgba(214, 40, 40, 0.1);
}

.table tbody tr:nth-child(odd) {
  background: rgba(45, 106, 79, 0.08);
}

.table tbody tr:hover {
  background: rgba(214, 40, 40, 0.1);
}

.member-card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 1.5rem;
}

.member-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(16, 32, 48, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  position: relative;
  overflow: hidden;
}

.member-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(214, 40, 40, 0.12), transparent 60%);
  pointer-events: none;
}

.member-card-header {
  position: relative;
  z-index: 1;
}

.member-card-header h4 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.35rem;
}

.member-card-sub {
  display: block;
  color: rgba(16, 32, 48, 0.6);
  font-weight: 600;
  margin-top: 0.2rem;
}

.member-card-details {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.member-card-details li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.95rem;
}

.member-card-details li strong {
  color: rgba(16, 32, 48, 0.75);
}

.member-card-details a {
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 600;
}

.member-card-details a:hover {
  text-decoration: underline;
}

.member-card-actions {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.member-card-actions .btn.small {
  min-width: 0;
}

.member-card-note {
  opacity: 0.65;
  font-style: italic;
}

.member-card-empty {
  margin: 1.5rem 0 0;
  padding: 1.2rem 1.4rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(16, 32, 48, 0.2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.group-meta {
  background: rgba(255, 255, 255, 0.75);
}

.meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  font-size: 0.9rem;
}

.meta-grid div {
  background: rgba(214, 40, 40, 0.08);
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
}

.share-link {
  min-width: 220px;
}

.share-link input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(16, 32, 48, 0.2);
  background: rgba(255, 255, 255, 0.92);
  font-family: "Fira Code", "Consolas", monospace;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.share-link input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.18);
}

.dashboard {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard .span-two {
  grid-column: 1 / -1;
}

code {
  background: rgba(16, 32, 48, 0.1);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.group-search {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.group-search label {
  font-weight: 700;
  color: rgba(16, 32, 48, 0.75);
}

.group-search input {
  max-width: 360px;
}

.group-card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.group-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 1.8rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  border: 1px solid rgba(16, 32, 48, 0.08);
  position: relative;
  overflow: hidden;
}

.group-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(214, 40, 40, 0.12), transparent 60%);
  pointer-events: none;
}

.group-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.group-card-header h4 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.35rem;
}

.group-card-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(16, 32, 48, 0.08);
  color: rgba(16, 32, 48, 0.85);
}

.status.drawn {
  background: rgba(27, 67, 50, 0.18);
  color: var(--accent-green);
}

.status.pending {
  background: rgba(214, 40, 40, 0.12);
  color: var(--accent);
}

.status.registration-open {
  background: rgba(27, 67, 50, 0.18);
  color: var(--accent-green);
}

.status.registration-closed {
  background: rgba(214, 40, 40, 0.15);
  color: var(--accent);
}

.group-card-details {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 0;
  position: relative;
  z-index: 1;
}

.group-card-details div {
  display: grid;
  gap: 0.25rem;
}

.group-card-details dt {
  font-weight: 700;
  font-size: 0.85rem;
  color: rgba(16, 32, 48, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.group-card-details dd {
  margin: 0;
  font-size: 0.98rem;
}

label.share-link {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
  color: rgba(16, 32, 48, 0.75);
  position: relative;
  z-index: 1;
}

.group-card-meta {
  display: grid;
  gap: 0.6rem;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.group-card-meta>div {
  background: rgba(214, 40, 40, 0.08);
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
}

.group-card-actions {
  position: relative;
  z-index: 1;
  justify-content: flex-end;
}

.group-card-empty-state {
  margin-top: 1.5rem;
  text-align: center;
  font-style: italic;
  color: rgba(16, 32, 48, 0.6);
}

.group-card-note {
  font-size: 0.9rem;
  color: rgba(16, 32, 48, 0.65);
  font-style: italic;
  margin: -0.5rem 0 0;
}

fieldset.form-grid {
  border: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: inherit;
}

fieldset[disabled] {
  opacity: 0.65;
}

@media (max-width: 900px) {
  main {
    padding: 2.5rem 0 3.2rem;
  }

  .hero {
    padding: 3rem 1.5rem;
  }

  .info-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .cta-buttons {
    gap: 0.75rem;
  }
}

@media (max-width: 640px) {
  .site-header .wrapper {
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    justify-content: center;
    width: 100%;
    gap: 0.5rem;
  }

  nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .wrapper {
    width: min(560px, 96%);
  }

  .card {
    padding: 1.8rem;
  }

  .cardxl {
    padding: 2.1rem;
  }

  .cardxl ul {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
  }

  .member-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-card {
    padding: 1.4rem;
  }

  .dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard .span-two {
    grid-column: 1 / -1;
  }

  .participant-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .participant-list li,
  .participant-list li:nth-child(5n) {
    grid-column: auto;
  }

  .profile-avatar {
    align-items: center;
  }

  .profile-avatar img {
    width: 140px;
    height: 140px;
  }

  .assignment-avatar img,
  .avatar-placeholder {
    width: 96px;
    height: 96px;
  }

  .avatar-placeholder {
    font-size: 2rem;
  }

  .table {
    font-size: 0.9rem;
  }
}

.bildindex {
  max-width: 400px;
  width: 400px;
  margin-top: 20px;
  margin-bottom: 20px;
  border-radius: 16px;
  border: 2px solid rgba(16, 32, 48, 0.2);
  box-shadow: var(--shadow);
  display: block;
  margin: 0 auto;
}