:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #22201d;
  --muted: #6f6a62;
  --line: #ded9d0;
  --accent: #155f4a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

.site-header,
main {
  width: min(100% - 2rem, 960px);
  margin-inline: auto;
}

.site-header { padding-block: 1rem; }
.site-header a { color: var(--ink); font-weight: 750; text-decoration: none; }
main { padding-bottom: 4rem; }

form,
.item-card,
article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

form { margin-block: 1rem; }
label, fieldset { display: block; margin-block: .75rem; }
fieldset { border: 0; padding: 0; }

input,
select,
textarea,
button {
  width: 100%;
  min-height: 44px;
  margin-top: .35rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .65rem .75rem;
  font: inherit;
}

input[type="radio"] { width: auto; min-height: auto; margin-right: .3rem; }
button { background: var(--accent); color: white; border-color: var(--accent); font-weight: 700; }
button:disabled { opacity: .5; }
a { color: var(--accent); }

.item-grid { display: grid; gap: 1rem; }
.item-card { overflow-wrap: anywhere; }
.item-card h2 { margin-block: .25rem; }
.item-meta { color: var(--muted); font-size: .9rem; }
.status-badge { display: inline-block; margin: 0; color: var(--accent); font-weight: 700; }
.htmx-indicator { display: none; width: min(100% - 2rem, 960px); margin: 0 auto 1rem; }
.htmx-request.htmx-indicator,
.htmx-request .htmx-indicator { display: block; }
.notice.error { border-left: 4px solid #b42318; background: #fff1f0; padding: .75rem; }
.source-content { white-space: pre-wrap; overflow-wrap: anywhere; }
img { display: block; max-width: 100%; height: auto; margin-block: 1rem; border-radius: 10px; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
nav { display: flex; justify-content: space-between; gap: 1rem; margin-block: 1rem; }

@media (max-width: 720px) {
  .site-header,
  main { width: min(100% - 1rem, 960px); }
  h1 { font-size: 1.6rem; }
  form, .item-card, article { border-radius: 10px; padding: .85rem; }
}
