:root {
  --paper: #F6F2E7;
  --paper-card: #FFFDF8;
  --ink: #21301F;
  --ink-soft: #4B5A47;
  --line: #D9D0BC;
  --line-strong: #C2B79E;
  --moss: #3F6B45;
  --moss-dark: #2A4A2E;
  --stamp-ants: #C0693A;
  --stamp-amphibians: #2E7A6E;
  --stamp-bugs: #6E8B2E;
  --stamp-lizards: #B9862F;
  --radius-card: 14px;
  --radius-control: 8px;
  --shadow-card: 0 1px 0 rgba(33,48,31,0.05), 0 6px 16px rgba(33,48,31,0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(33,48,31,0.05) 1px, transparent 0);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.55;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  border-bottom: 2px solid var(--line-strong);
  padding: 20px 0;
  background: var(--paper-card);
}
.header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--moss);
  color: var(--moss);
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.tagline {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* Hero */
.hero {
  padding: 48px 0 32px;
  border-bottom: 1px dashed var(--line-strong);
  margin-bottom: 32px;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 42px;
  line-height: 1.12;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.hero-sub {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0;
}

/* Section row */
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.section-row h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  margin: 0;
}

h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
}

/* Buttons */
.btn {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--radius-control);
  border: 1.5px solid var(--ink);
  background: var(--paper-card);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}
.btn:hover { background: var(--paper); }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--moss);
  border-color: var(--moss-dark);
  color: #F6F2E7;
}
.btn-primary:hover { background: var(--moss-dark); }
.btn-block { width: 100%; }
.btn-link {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
}
.btn-link:hover { color: var(--ink); }

/* Cards */
.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

/* Team list (home) */
.team-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 40px;
}
.team-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.team-row:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.team-row-name {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 2px;
}
.team-row-meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}
.team-row-arrow {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 18px;
}

/* Badges (stamp style) */
.badge {
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--line-strong);
  background: var(--paper);
}
.badge svg { width: 100%; height: 100%; }
.badge-sm { width: 52px; height: 52px; }
.badge-lg { width: 72px; height: 72px; }
.badge-xl { width: 108px; height: 108px; }
.badge-center { margin: 0 auto 16px; }

/* Forms */
.form-card { display: flex; flex-direction: column; gap: 20px; }
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
  display: block;
}
input[type="text"] {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  padding: 11px 14px;
  border-radius: var(--radius-control);
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
}
input[type="text"]:focus {
  outline: none;
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(63,107,69,0.15);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.category-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
}
.category-option.selected {
  border-color: var(--moss);
  border-width: 2px;
  background: #EAF0E4;
}
.category-option .badge { width: 28px; height: 28px; border-width: 1px; }

/* Profile / public cards */
.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.profile-team-name { font-size: 16px; font-weight: 600; margin: 0; }
.profile-team-cat { font-size: 13px; color: var(--ink-soft); margin: 0; }

.divider {
  border-top: 1px dashed var(--line-strong);
  margin: 16px 0;
}

.qr-block {
  border-top: 1px dashed var(--line-strong);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.qr-holder {
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.qr-caption { font-size: 12px; color: var(--ink-soft); margin: 6px 0 0; }
.qr-url { font-size: 12px; color: var(--moss-dark); font-weight: 600; margin: 0; word-break: break-all; cursor: pointer; }
.qr-url:hover { text-decoration: underline; }

.public-team-name { text-align: center; margin: 0 0 4px; }
.public-team-cat { text-align: center; font-size: 13px; color: var(--ink-soft); margin: 0 0 8px; }

.member-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.member-row { font-size: 14px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  margin-top: 20px;
}
.site-footer p {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  margin: 0;
}

@media (max-width: 480px) {
  .hero h1 { font-size: 32px; }
  .category-grid { grid-template-columns: 1fr; }
}
