:root {
  color-scheme: light;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e0e0e0;
  --bg: #fafafa;
  --card-bg: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.6;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 12px 48px;
}

.page-header .title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.page-header h1 {
  font-size: 1.4rem;
  margin: 0;
}

.today {
  font-size: 0.85rem;
  color: var(--muted);
}

.lead {
  color: var(--muted);
  margin: 8px 0;
}

.notice {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #6d4c00;
}

.filters {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

.filter-group legend {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0 4px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 4px 8px 4px 0;
  font-size: 0.9rem;
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.event-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.event-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.event-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.event-name.cancelled {
  text-decoration: line-through;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.badge-red { background: #e53935; }
.badge-blue { background: #1e88e5; }
.badge-orange { background: #fb8c00; }
.badge-green { background: #43a047; }
.badge-gray { background: #9e9e9e; }

.event-info {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 8px 0;
}

.status-label {
  display: inline-block;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 4px 0 10px;
}

.status-success { background: #e6f4ea; color: #1e7e34; }
.status-info { background: #e8f0fe; color: #1a56db; }
.status-error { background: #fdecea; color: #c62828; }
.status-caption { background: #f0f0f0; color: var(--muted); }

.btn {
  display: block;
  text-align: center;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border-radius: 8px;
  background: #1e88e5;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.btn:hover {
  background: #1667ab;
}

.caption {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 6px 0 0;
}

.event-details {
  margin-top: 10px;
  font-size: 0.9rem;
}

.event-details summary {
  cursor: pointer;
  color: #1e88e5;
}

.no-match {
  text-align: center;
  color: var(--muted);
  margin-top: 24px;
}

/* ---- セミナー申込 ---- */

.btn-apply {
  background: #43a047;
}

.btn-apply:hover {
  background: #2e7d32;
}

.btn-outline {
  background: #fff;
  color: #1e88e5;
  border: 1px solid #1e88e5;
}

.btn-outline:hover {
  background: #e8f0fe;
}

.back-link {
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.back-link a {
  color: #1e88e5;
  text-decoration: none;
}

.seminar-title {
  font-size: 1.3rem;
  margin: 0 0 8px;
}

.availability {
  margin: 16px 0 8px;
}

.seminar-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px 16px;
  margin: 0;
}

.form-section legend {
  font-weight: 700;
  padding: 0 4px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}

.field-label {
  font-size: 0.9rem;
}

.required {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 4px;
  background: #fdecea;
  color: #c62828;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
}

.field input,
.field select,
.field textarea {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid #c9ced6;
  border-radius: 8px;
  background: #fff;
  width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid #90caf9;
  border-color: #1e88e5;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.dog-row {
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  margin-top: 12px;
}

.dog-row:first-child {
  border-top: none;
  margin-top: 0;
}

.dog-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dog-row-title {
  font-weight: 700;
}

.link-button {
  background: none;
  border: none;
  color: #c62828;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  padding: 4px;
}

.form-error {
  background: #fdecea;
  color: #c62828;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0;
}

button.btn {
  border: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button.btn-outline {
  border: 1px solid #1e88e5;
}

button.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.result {
  margin-top: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

[hidden] {
  display: none !important;
}

.seminar-description {
  white-space: pre-line;
  margin: 12px 0 0;
  font-size: 0.95rem;
}
