:root {
  color-scheme: light;
  --ink: #2c2116;
  --muted: #6b5d49;
  --line: rgba(104, 78, 43, .28);
  --paper: #fffdf8;
  --accent: #7b4b1d;
  --accent-dark: #4f2f13;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 251, 241, .93), rgba(239, 224, 197, .88)),
    url("/media/sutter-buttes-ricefield-sunset-optimized.jpg?v=20260709-performance") center / cover fixed,
    #f1e4cf;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button, input, textarea { font: inherit; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, .96);
}

.site-header-inner,
.page-main,
.site-footer-inner {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
}

.memorial-name {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  text-decoration: none;
}

.back-link,
.button,
.share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: rgba(255, 253, 248, .84);
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover,
.button:hover,
.share-link:hover { border-color: var(--accent); background: #f2e4cc; }
.back-link:focus-visible, .button:focus-visible, .share-link:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(123, 75, 29, .3); outline-offset: 2px; }

.page-main { padding: clamp(38px, 7vw, 76px) 0 64px; }

.recording-header { max-width: 820px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h1 { margin: 0; font-size: clamp(38px, 7vw, 68px); line-height: 1.05; }
.description { margin: 18px 0 0; color: var(--muted); font-size: clamp(17px, 2.3vw, 21px); line-height: 1.6; }
.duration { margin: 13px 0 0; color: var(--accent-dark); font-size: 13px; font-weight: 800; }

.video-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(39, 28, 18, .75);
  border-radius: 7px;
  background: #080706;
  box-shadow: 0 22px 54px rgba(44, 33, 22, .2);
  aspect-ratio: 16 / 9;
}

.video-frame video { display: block; width: 100%; height: 100%; object-fit: contain; background: #080706; }

.recording-tools,
.share-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.recording-tools { padding: 16px 0 26px; border-bottom: 1px solid var(--line); }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
button.button { cursor: pointer; }

.recording-notes { max-width: 760px; padding: 28px 0; }
.recording-notes p { margin: 0; color: var(--muted); line-height: 1.65; }
.recording-notes a { color: var(--accent); font-weight: 800; }

.sharing { padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sharing h2, .comments h2 { margin: 0 0 13px; font-size: 28px; }
.share-status { min-height: 18px; margin: 10px 0 0; color: var(--accent); font-size: 13px; font-weight: 800; }

.comments { padding-top: 34px; }
.comment-list { display: grid; gap: 13px; margin-bottom: 24px; }
.comment-card { border-left: 3px solid var(--accent); padding: 13px 16px; background: rgba(255, 253, 248, .72); }
.comment-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.comment-name { margin: 0; font-weight: 900; }
.comment-date { color: var(--muted); font-size: 12px; }
.comment-text { margin: 9px 0 0; color: var(--muted); line-height: 1.6; white-space: pre-wrap; }
.comment-empty { color: var(--muted); }

.comment-form { display: grid; gap: 13px; max-width: 760px; padding-top: 22px; border-top: 1px solid var(--line); }
.comment-form h3 { margin: 0; font-size: 18px; }
.comment-form > p { margin: -3px 0 2px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.comment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--muted); font-size: 13px; font-weight: 800; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 11px; background: rgba(255, 253, 248, .9); color: var(--ink); }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.hidden-field { display: none; }

.site-footer { border-top: 1px solid var(--line); background: rgba(255, 253, 248, .7); }
.site-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 86px; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--accent-dark); font-weight: 800; text-decoration: none; }

@media (max-width: 640px) {
  body { background-attachment: scroll; }
  .site-header-inner, .site-footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding: 15px 0; }
  .back-link { width: 100%; }
  .page-main { padding-top: 34px; }
  .recording-tools, .share-tools { display: grid; grid-template-columns: 1fr 1fr; }
  .recording-tools .button, .share-tools .share-link { width: 100%; }
  .comment-grid { grid-template-columns: 1fr; }
  .comment-head { align-items: flex-start; flex-direction: column; gap: 4px; }
}
