:root {
  --bg: #f8f6f2;
  --card: #ffffff;
  --ink: #111111;
  --muted: #4d4d4d;
  --button-bg: #be643b;
  --button-text: #ffffff;
  --danger: #a6382b;
  --line: #a9c2c9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 1.2rem 0 2.5rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.8rem 0 1.4rem;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand-logo {
  max-height: 64px;
  width: auto;
  display: none;
  margin-bottom: 0.5rem;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

#eventSignUpHeading {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  margin-top: 0.2rem;
}

a,
button {
  font: inherit;
}

.btn,
button {
  background: var(--button-bg);
  color: var(--button-text);
  border: 0;
  border-radius: 0.6rem;
  padding: 0.7rem 1rem;
  min-height: 44px;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #1a73e8;
  outline-offset: 2px;
}

.btn.ghost,
button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.danger,
button.danger {
  background: var(--danger);
  color: #ffffff;
}

.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.event-icon {
  font-size: 2rem;
}

.event-icon.fa-mode {
  color: var(--button-bg);
}

.event-meta {
  color: var(--muted);
  font-size: 0.93rem;
}

.notice {
  margin: 0.8rem 0;
  padding: 0.7rem 0.85rem;
  border-radius: 0.7rem;
}

.notice.error {
  background: #ffe9e7;
  color: #6c1710;
}

.notice.success {
  background: #e5f9ef;
  color: #104b2f;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
}

label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.95rem;
}

input,
textarea,
select {
  font: inherit;
  font-size: 16px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.7rem 0.7rem;
  min-height: 44px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-line input {
  width: auto;
}

.row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.row > * {
  flex: 1;
  min-width: 180px;
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.45rem;
  text-align: left;
  font-size: 0.92rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-body {
  width: min(560px, 94vw);
  max-height: 92vh;
  overflow: auto;
}

.small {
  font-size: 0.88rem;
  color: var(--muted);
}

.site-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.icon-choice {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  border-radius: 0.7rem;
  padding: 0.45rem;
  text-align: left;
  display: grid;
  gap: 0.2rem;
}

.icon-choice-emoji {
  font-size: 1.35rem;
}

.icon-choice-fa {
  font-size: 1.15rem;
  color: var(--button-bg);
}

.icon-choice-label {
  font-size: 0.8rem;
  color: var(--muted);
}

@media print {
  header,
  .no-print,
  .actions {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .card {
    box-shadow: none;
  }
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}
