* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: #f3f5f7;
  color: #13202b;
}

.app-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: grid;
  gap: 20px;
}

.panel {
  background: #ffffff;
  border: 1px solid #d9e0e6;
  border-radius: 8px;
  padding: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-size: 1.4rem;
}

.panel-header p {
  margin-top: 6px;
  color: #4f6474;
  max-width: 680px;
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  padding: 14px;
  margin-bottom: 20px;
  border: 1px solid #d9e0e6;
  border-radius: 8px;
  background: #f8fafc;
}

.auth-panel small {
  grid-column: 1 / -1;
  color: #4f6474;
}

.festival-form {
  display: grid;
  gap: 16px;
}

.form-title {
  font-size: 1.1rem;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid #c4d0d9;
  border-radius: 6px;
  padding: 12px;
  background: #fcfdff;
  color: #13202b;
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  background: #1260cc;
  color: white;
  cursor: pointer;
  min-height: 44px;
}

button.secondary-button {
  background: #e8edf2;
  color: #13202b;
}

button.delete-button {
  background: #f7dadc;
  color: #8d1f2b;
  padding: 10px 12px;
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.status {
  min-height: 24px;
  margin-top: 12px;
  color: #35556c;
}

.manual-details {
  border: 1px solid #d9e0e6;
  border-radius: 8px;
  padding: 12px 14px;
}

.manual-details summary {
  color: #244055;
  cursor: pointer;
  font-weight: 700;
}

.manual-details[open] summary {
  margin-bottom: 12px;
}

.manual-details > p {
  color: #4f6474;
  margin-bottom: 16px;
}

.manual-details label + label,
.manual-details .field-grid + label,
.manual-details label + .field-grid {
  margin-top: 14px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label small {
  color: #4f6474;
  font-weight: 400;
  line-height: 1.4;
}

.form-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-actions {
  flex-shrink: 0;
}

.card-actions button {
  min-height: 40px;
  padding: 9px 12px;
}

.festival-list {
  display: grid;
  gap: 12px;
}

.festival-card {
  border: 1px solid #d9e0e6;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.festival-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.festival-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: #4f6474;
}

.festival-meta span {
  overflow-wrap: anywhere;
}

.occurrence-list {
  align-items: baseline;
}

.festival-summary {
  color: #244055;
  line-height: 1.45;
}

.festival-notes {
  color: #35556c;
  line-height: 1.45;
}

a {
  color: #1260cc;
}

@media (max-width: 720px) {
  .panel-header,
  .festival-row {
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    grid-template-columns: 1fr;
  }

  .auth-panel small {
    grid-column: auto;
  }

  .card-actions {
    width: 100%;
  }
}
