/* 基本カラーはここを変更すると全体の印象を調整できます。 */
:root {
  --bg: #fff8e6;
  --surface: #ffffff;
  --text: #241b12;
  --muted: #725f42;
  --line: #f1c65f;
  --primary: #d97706;
  --primary-dark: #92400e;
  --accent: #b91c1c;
  --danger: #991b1b;
  --warning: #facc15;
  --warning-soft: #fff1b8;
  --ink: #1a1712;
  --shadow: 0 18px 45px rgba(120, 53, 15, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.22) 0 25%, transparent 25% 50%, rgba(250, 204, 21, 0.22) 50% 75%, transparent 75%) 0 0 / 34px 34px,
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 5vw, 64px);
  background: rgba(26, 23, 18, 0.96);
  border-bottom: 4px solid var(--warning);
  backdrop-filter: blur(12px);
}

.site-logo {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
}

.site-logo::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--warning);
  color: var(--ink);
  font-weight: 900;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fef3c7;
  font-size: 14px;
}

.site-nav a:hover {
  color: var(--warning);
}

.logout-button {
  border: 1px solid rgba(250, 204, 21, 0.65);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(250, 204, 21, 0.12);
  color: #ffffff;
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 500px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: 76vh;
  padding: clamp(40px, 7vw, 88px) clamp(18px, 6vw, 84px) 40px;
  background:
    linear-gradient(90deg, rgba(26, 23, 18, 0.92), rgba(26, 23, 18, 0.72)),
    linear-gradient(135deg, #facc15 0 25%, #1a1712 25% 50%, #facc15 50% 75%, #1a1712 75%) 0 0 / 48px 48px;
  color: #ffffff;
}

.hero h1,
.page-title h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.18;
}

.hero p,
.page-title p {
  color: #6f5c3d;
  max-width: 680px;
}

.hero p {
  color: #fde68a;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-visual {
  overflow: hidden;
  border: 4px solid var(--warning);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--warning-soft);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
}

.button-primary {
  background: var(--danger);
  color: #ffffff;
}

.button-primary:hover {
  background: #7f1d1d;
}

.button-secondary {
  background: var(--warning);
  color: var(--ink);
}

.button-danger {
  background: var(--danger);
  color: #ffffff;
}

.button-wide {
  width: 100%;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notice-band,
.warning-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px;
  background: var(--warning-soft);
  border: 2px solid var(--warning);
  border-left: 10px solid var(--danger);
  border-radius: 8px;
  box-shadow: 0 8px 0 rgba(26, 23, 18, 0.08);
}

.notice-band strong::before,
.warning-box strong::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--danger);
  color: #ffffff;
  font-weight: 900;
}

.warning-box {
  display: block;
  margin-bottom: 24px;
}

.warning-box p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section,
.page,
.narrow-page,
.article-page {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.section {
  padding: 56px 0;
}

.page,
.narrow-page,
.article-page {
  padding: 42px 0 72px;
}

.narrow-page {
  max-width: 820px;
}

.article-page {
  max-width: 900px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
}

.section-heading a {
  color: var(--primary);
  font-weight: 700;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.story-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-card,
.form-card,
.search-panel,
.admin-item,
.article {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 0 rgba(146, 64, 14, 0.12);
}

.story-card {
  overflow: hidden;
}

.story-card::before,
.admin-item::before,
.article::before,
.form-card::before,
.search-panel::before {
  content: "";
  display: block;
  grid-column: 1 / -1;
  height: 8px;
  background: repeating-linear-gradient(
    135deg,
    var(--warning) 0 18px,
    var(--ink) 18px 36px
  );
}

.story-card img,
.article-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #e8efec;
}

.story-card-body {
  padding: 18px;
}

.story-card h3 {
  margin: 8px 0;
  font-size: 19px;
  line-height: 1.45;
}

.story-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.meta-line,
.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--warning-soft);
  color: var(--danger);
  font-weight: 700;
  border: 1px solid var(--warning);
}

.page-title {
  margin-bottom: 28px;
}

.form-card {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 4vw, 34px);
}

.form-row {
  display: grid;
  gap: 18px;
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: #ffffff;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(250, 204, 21, 0.45);
  border-color: var(--danger);
}

textarea {
  resize: vertical;
}

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
}

.check-line input {
  width: auto;
  margin-top: 7px;
}

.form-success {
  margin: 0;
  color: var(--primary-dark);
  font-weight: 700;
}

.form-error {
  min-height: 24px;
  margin: 0;
  color: var(--danger);
  font-weight: 700;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  background: var(--surface);
  border: 2px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.article {
  overflow: hidden;
  margin-bottom: 36px;
}

.article-body {
  padding: clamp(22px, 4vw, 42px);
}

.article h1 {
  margin: 10px 0 14px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.25;
}

.article-text {
  white-space: pre-wrap;
  font-size: 17px;
}

.admin-list {
  display: grid;
  gap: 16px;
}

.admin-gate {
  max-width: 680px;
}

.admin-login-card h2 {
  margin: 0;
  font-size: 26px;
}

.admin-login-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px 18px;
  background: var(--warning-soft);
  border: 2px solid var(--warning);
  border-radius: 8px;
}

.admin-toolbar p {
  margin: 0;
  font-weight: 800;
}

.is-hidden {
  display: none !important;
}

.admin-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  padding: 16px;
}

.admin-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #e8efec;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.status {
  font-weight: 800;
}

.status.pending,
.status.private {
  color: var(--primary-dark);
}

.status.published {
  color: var(--danger);
}

.site-footer {
  padding: 28px;
  border-top: 4px solid var(--warning);
  background: var(--ink);
  color: #fef3c7;
  text-align: center;
}

.login-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.96) 0 12%, #1a1712 12% 24%, rgba(250, 204, 21, 0.96) 24% 36%, #1a1712 36% 48%, rgba(250, 204, 21, 0.96) 48% 60%, #1a1712 60% 72%, rgba(250, 204, 21, 0.96) 72% 84%, #1a1712 84% 100%);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(100%, 460px);
  padding: clamp(28px, 6vw, 46px);
  background: rgba(255, 255, 255, 0.94);
  border: 4px solid var(--warning);
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
}

.login-panel::before {
  content: "WARNING";
  display: inline-flex;
  margin-bottom: 14px;
  padding: 4px 10px;
  background: var(--danger);
  color: #ffffff;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.login-panel h1 {
  margin: 0;
  font-size: 34px;
}

.login-lead,
.small-note {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.small-note {
  margin-bottom: 0;
  font-size: 13px;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .story-grid,
  .story-grid.compact {
    grid-template-columns: 1fr;
  }

  .search-panel,
  .two-columns,
  .admin-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hero-actions,
  .button {
    width: 100%;
  }

  .notice-band {
    display: block;
  }
}
