:root {
  --ink: #2f1a10;
  --muted: #5f4637;
  --line: #6a462f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 230, 194, 0.4), transparent 35%),
    linear-gradient(145deg, #b88f69 0%, #9c7658 45%, #7f5e47 100%);
}

.page {
  width: min(940px, 100%);
  margin: 0 auto;
  padding: 1rem;
}

.hero,
.article-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(247, 226, 194, 0.92);
  box-shadow: 0 10px 30px rgba(45, 24, 15, 0.22);
}

.article-card {
  margin-top: 0.9rem;
}

.location-layout {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 0.9rem;
}

.location-layout .article-card {
  margin-top: 0;
}

.experiences-panel {
  display: grid;
  gap: 0.7rem;
}

.experience-rows {
  display: grid;
  gap: 0.45rem;
  width: 100%;
}

.experience-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 0.9fr) auto;
  gap: 0.45rem;
  align-items: center;
  border: 1px solid rgba(106, 70, 47, 0.35);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 241, 217, 0.45);
}

.experience-row-head {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: transparent;
}

.experience-row-title {
  font-weight: 600;
}

.experience-row-date,
.experience-row-type {
  color: var(--muted);
}

.experience-row-action button {
  width: auto;
  margin-top: 0;
  border-radius: 999px;
  padding: 0.28rem 0.76rem;
}

.stories-pagination {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.stories-pagination button {
  width: auto;
  margin-top: 0;
  border-radius: 999px;
  padding: 0.3rem 0.74rem;
}

.stories-pagination span {
  color: var(--muted);
}

.experiences-actions {
  display: flex;
  justify-content: flex-start;
}

.experiences-actions button {
  width: auto;
  margin-top: 0;
  border-radius: 999px;
  padding: 0.36rem 0.9rem;
}

.submit-experience-section button {
  width: auto;
  margin-top: 0.45rem;
  border-radius: 999px;
  padding: 0.36rem 0.9rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 0.45rem;
  text-decoration: none;
  color: #f3e6d2;
  background: #4a2c1e;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
}

.back-link + .back-link {
  margin-left: 0.45rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  color: var(--muted);
}

h1 {
  margin: 0.2rem 0 0;
  font-family: "UnifrakturCook", "Times New Roman", serif;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

h2 {
  margin: 0 0 0.45rem;
}

.story-block + .story-block {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

#storiesWrap {
  display: block;
  width: 100%;
}

.entry-card {
  border: 1px solid rgba(106, 70, 47, 0.45);
  border-radius: 12px;
  background: rgba(255, 241, 217, 0.6);
  overflow: hidden;
  display: grid;
}

.entry-media {
  width: 100%;
  height: 148px;
  object-fit: cover;
  display: block;
}

.entry-content {
  padding: 0.55rem;
}

.entry-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  max-height: 2.4em;
  overflow: hidden;
}

.entry-type {
  margin: 0.3rem 0 0;
  color: #5f4637;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.entry-excerpt {
  margin: 0.38rem 0 0;
  color: #4c382d;
  font-size: 0.96rem;
  line-height: 1.35;
  max-height: 2.8em;
  overflow: hidden;
}

.entry-actions {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.45rem;
}

.entry-actions button {
  margin-top: 0;
  width: auto;
  border-radius: 999px;
  padding: 0.3rem 0.72rem;
  background: #4a2c1e;
  color: #f3e6d2;
}

.entry-actions button:hover {
  background: #66402d;
}

.story-media-grid {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.55rem;
}

.story-media-item {
  margin: 0;
  border: 1px solid rgba(106, 70, 47, 0.35);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 241, 217, 0.55);
}

.story-media-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.story-media-item figcaption {
  padding: 0.35rem 0.45rem;
  color: #5f4637;
  font-size: 0.85rem;
}

.story-title {
  margin: 0;
  font-size: 1.2rem;
}

.story-meta {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

input,
textarea,
button,
a,
select {
  font: inherit;
}

label {
  display: block;
  margin: 0.55rem 0 0.28rem;
  color: var(--muted);
}

input,
textarea,
button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.52rem 0.6rem;
  background: #f5e4c6;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

button {
  margin-top: 0.7rem;
  background: #4a2c1e;
  color: #f3e6d2;
  cursor: pointer;
}

button:hover {
  background: #66402d;
}

.consent {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.consent input {
  width: auto;
  margin-top: 0.2rem;
}

.link-button {
  border: 0;
  padding: 0;
  margin: 0;
  width: auto;
  background: transparent !important;
  color: #d8bf86 !important;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: #f2d9a4 !important;
}

.collapsible {
  border: 1px solid rgba(106, 70, 47, 0.35);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  background: rgba(255, 241, 217, 0.5);
}

.collapsible summary {
  cursor: pointer;
  color: #4a2c1e;
  font-weight: 600;
}

.section-collapsible > summary {
  font-size: 1.16rem;
}

.section-collapsible[open] > summary {
  margin-bottom: 0.55rem;
}

.mode-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.mode-pill {
  width: auto;
  margin-top: 0;
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  background: #5b3725;
  color: #f3e6d2;
  border: 1px solid #6a462f;
}

.mode-pill.active {
  background: #3e2318;
  box-shadow: inset 0 0 0 1px rgba(255, 236, 208, 0.35);
}

.location-photo-preview {
  margin-top: 0.55rem;
  border: 1px solid rgba(106, 70, 47, 0.35);
  border-radius: 10px;
  padding: 0.4rem;
  background: rgba(255, 241, 217, 0.55);
}

.location-photo-preview img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  display: block;
}

.hidden {
  display: none !important;
}

.submission-modal {
  border: 0;
  padding: 0;
  background: transparent;
}

.submission-modal::backdrop {
  background: rgba(21, 12, 8, 0.68);
}

.submission-modal.dialog-fallback-open,
.image-lightbox.dialog-fallback-open {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border: 0;
  padding: 1rem;
  background: rgba(21, 12, 8, 0.68);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.modal-card {
  width: min(760px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid #6a462f;
  border-radius: 14px;
  background: rgba(247, 226, 194, 0.98);
  padding: 0.95rem;
}

.submit-experience-card {
  width: min(820px, calc(100vw - 2rem));
}

.modal-close {
  width: auto;
  float: right;
  margin-top: 0;
  border-radius: 8px;
  padding: 0.18rem 0.45rem;
}

.modal-card h3 {
  margin: 0;
}

.modal-meta {
  margin: 0.3rem 0 0;
  color: #5f4637;
}

.modal-media {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.modal-media figure {
  margin: 0;
  border: 1px solid rgba(106, 70, 47, 0.35);
  border-radius: 10px;
  overflow: hidden;
}

.modal-media img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  background: rgba(255, 241, 217, 0.55);
}

.modal-media figcaption {
  padding: 0.4rem;
  color: #5f4637;
  font-size: 0.85rem;
}

.modal-body {
  margin: 0.7rem 0 0;
  color: #3f2a20;
  white-space: pre-wrap;
  line-height: 1.45;
}

.image-lightbox {
  border: 0;
  padding: 0;
  background: transparent;
}

.image-lightbox::backdrop {
  background: rgba(8, 5, 4, 0.86);
}

.lightbox-card {
  width: min(1200px, calc(100vw - 1.4rem));
  max-height: calc(100vh - 1.4rem);
  overflow: auto;
  border: 1px solid #6a462f;
  border-radius: 12px;
  background: rgba(31, 19, 13, 0.96);
  padding: 0.55rem;
}

.lightbox-close {
  width: auto;
  float: right;
  margin-top: 0;
  border-radius: 8px;
  padding: 0.18rem 0.45rem;
  background: #5c3724;
}

.lightbox-card img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 4rem);
  object-fit: contain;
  margin-top: 0.35rem;
}

@media (max-width: 980px) {
  .location-layout {
    grid-template-columns: 1fr;
  }

  .experiences-panel,
  #storiesWrap,
  .experience-rows,
  .experience-row {
    width: 100%;
  }

  .experience-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }

  .experience-row-head {
    display: none;
  }
}

/* Dark/gold site theme overrides */
:root {
  --ink: #f4f1e7;
  --muted: #c7bea9;
  --line: #8c6d31;
}

body {
  color: var(--ink) !important;
  background:
    radial-gradient(circle at 18% 8%, rgba(185, 147, 70, 0.14), transparent 32%),
    radial-gradient(circle at 80% 82%, rgba(143, 29, 36, 0.12), transparent 35%),
    linear-gradient(180deg, #101217 0%, #111318 100%) !important;
}

.hero,
.article-card,
.entry-card,
.story-media-item,
.collapsible,
.modal-card,
.lightbox-card,
.location-photo-preview {
  background: #181d25 !important;
  border-color: var(--line) !important;
}

label,
.meta,
.muted,
.entry-type,
.entry-excerpt,
.story-meta,
.story-media-item figcaption,
.modal-meta,
.modal-media figcaption,
.modal-body {
  color: var(--muted) !important;
}

input,
textarea,
button,
.mode-pill {
  background: #10141b !important;
  color: var(--ink) !important;
  border-color: #3f4a5e !important;
}

button,
.entry-actions button,
.mode-pill.active,
.modal-close,
.lightbox-close {
  background: #8f1d24 !important;
  border-color: #71161b !important;
  color: #fff3e6 !important;
}

button:hover,
.entry-actions button:hover,
.modal-close:hover,
.lightbox-close:hover {
  background: #b02b34 !important;
}
