body {
  margin: 0;
  padding: 0;
  color: #1f1a17;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: linear-gradient(180deg, #f7f2ea 0%, #f3ede3 100%);
}

header {
  text-align: center;
  padding: 28px 20px 20px;
  background:
    radial-gradient(circle at top, rgba(164, 112, 67, 0.14), transparent 38%),
    linear-gradient(180deg, #fffdf8 0%, #fbf7f0 100%);
  box-shadow: 0 6px 24px rgba(61, 44, 30, 0.06);
}

h1 {
  margin: 0;
  color: #231c18;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.site-mark {
  margin-bottom: 8px;
  color: #9a6842;
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.site-subtitle {
  margin: 10px 0 0;
  color: #7a6a5c;
  font-size: 16px;
}

main {
  padding: 4px 12px;
}

#exhibition-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: 1720px;
  margin: 0 auto;
}

.exhibition-card {
  display: flex;
  flex-direction: row;
  width: 650px;
  min-width: 650px;
  max-width: 650px;
  min-height: 200px;
  overflow: hidden;
  border: 1px solid rgba(133, 103, 77, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(252, 248, 241, 0.96) 100%);
  box-shadow: 0 12px 26px rgba(71, 53, 36, 0.08);
}

.exhibition-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 300px;
  min-width: 300px;
  overflow: hidden;
  background: #efe7dc;
}

.exhibition-card img {
  width: 100%;
  min-width: 0;
  height: auto;
  max-height: 400px;
  align-self: center;
  background: #efe7dc;
}

.exhibition-card img.cover-landscape,
.exhibition-card img.cover-portrait {
  object-fit: contain;
  object-position: center;
}

.ending-soon-badge,
.seen-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ending-soon-badge {
  background: rgba(152, 69, 43, 0.92);
  color: #fffaf4;
  box-shadow: 0 8px 18px rgba(95, 47, 30, 0.16);
}

.seen-badge {
  background: rgba(173, 223, 166, 0.96);
  color: #2d5a2d;
  box-shadow: 0 8px 18px rgba(108, 156, 103, 0.18);
}

.exhibition-info {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  padding: 15px;
}

.exhibition-info h3 {
  margin: 0 0 10px;
  color: #1f1f1f;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.exhibition-info p {
  margin: 2px 0;
  color: #5f5a54;
  font-size: 20px;
  line-height: 1.45;
}

.status-line.category-line {
  margin-top: 2px;
  color: #7a4b2a;
  font-weight: 600;
}

.status-line.category-line.free {
  color: #218838;
}

.date-line,
.time-line {
  color: #7b746d;
  font-size: 15px;
}

.location-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2f2a25;
  font-weight: 600;
  transition: color 220ms ease;
}

.location-line::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #a06a3f;
  opacity: 0.7;
  transition: transform 220ms ease, background-color 220ms ease, opacity 220ms ease;
}

.exhibition-card:hover .location-line {
  color: #7a4b2a;
}

.exhibition-card:hover .location-line::before {
  background: #7a4b2a;
  opacity: 1;
  transform: scale(1.15);
}

.description-line {
  color: #3f3832 !important;
  font-size: 18px !important;
  line-height: 1.5 !important;
}

.description-line strong {
  margin-right: 2px;
  color: inherit;
  font-weight: inherit;
}

.price-details {
  margin-top: 4px;
  color: #62564b;
  font-size: 18px;
}

.price-details summary {
  cursor: pointer;
  color: #94663b;
}

.price-details-body {
  margin-top: 6px;
  line-height: 1.5;
}

.source-link {
  margin-top: auto;
  text-align: left;
}

.source-link a {
  color: inherit;
  font-size: 18px;
  text-decoration: underline;
}

.source-link a:hover {
  color: #0056b3;
}

.seen-toggle-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 12px;
  border: none;
  border-radius: 999px;
  background: rgba(173, 223, 166, 0.94);
  color: #2d5a2d;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  box-shadow: 0 8px 16px rgba(108, 156, 103, 0.18);
  transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.exhibition-card:hover .seen-toggle-btn,
.exhibition-info:hover .seen-toggle-btn,
.seen-toggle-btn:focus-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.seen-toggle-btn:hover:not(:disabled) {
  background: rgba(160, 214, 151, 0.98);
}

.seen-toggle-btn:disabled {
  cursor: default;
}

dialog {
  width: 90%;
  max-width: 500px;
  padding: 20px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

dialog h2 {
  margin-top: 0;
}

dialog form {
  display: flex;
  flex-direction: column;
}

dialog label {
  margin-top: 10px;
  font-weight: bold;
}

dialog input,
dialog textarea {
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

dialog button {
  margin-top: 10px;
  padding: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

dialog button[type="submit"] {
  background-color: #28a745;
  color: white;
}

dialog button[type="submit"]:hover {
  background-color: #218838;
}

dialog button[type="button"] {
  background-color: #dc3545;
  color: white;
}

dialog button[type="button"]:hover {
  background-color: #c82333;
}

.tab-buttons {
  display: flex;
  margin-bottom: 20px;
}

.tab-buttons button {
  flex: 1;
  padding: 10px;
  border: none;
  background-color: #f0f0f0;
  cursor: pointer;
}

.tab-buttons button.active {
  background-color: #007bff;
  color: white;
}

.form-section {
  display: block;
}

.form-section.hidden,
.hidden {
  display: none;
}

#parse-loading {
  margin-top: 10px;
  color: #007bff;
}

#parse-error {
  margin-top: 10px;
  color: #dc3545;
}

.edit-btn {
  margin-right: 10px;
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  background-color: #ffc107;
  color: black;
  cursor: pointer;
}

.edit-btn:hover {
  background-color: #e0a800;
}

@media (max-width: 768px) {
  #exhibition-list {
    flex-direction: column;
    align-items: center;
  }

  .exhibition-card {
    flex-direction: column;
    width: 90%;
    min-width: 0;
    max-width: 420px;
    min-height: 0;
  }

  .exhibition-cover {
    width: 100%;
    min-width: 0;
  }

  .exhibition-card img {
    width: 100%;
    min-width: 0;
    height: 180px;
  }

  .seen-toggle-btn {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}
