:root {
  --ink: #f4f2ee;
  --muted: #9a9b9e;
  --paper: #08090a;
  --card: #111315;
  --card-raised: #17191c;
  --line: #292c30;
  --accent: #f05a37;
  --accent-soft: #301a15;
  --warm: #f4a34f;
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.7;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(41, 44, 48, 0.92);
  background: rgba(8, 9, 10, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner,
.nav-inner,
.page-shell,
.site-footer > div {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #090909;
  background: linear-gradient(145deg, #ffb05b, var(--accent));
  box-shadow: 0 0 24px rgba(240, 90, 55, .2);
  font-family: Georgia, serif;
  font-size: 20px;
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-stats {
  display: flex;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.header-stats div { min-width: 70px; padding: 5px 9px; border-right: 1px solid var(--line); text-align: center; }
.header-stats div:last-child { border-right: 0; }
.header-stats dt { color: var(--warm); font-family: Georgia, serif; font-size: 13px; font-weight: 700; line-height: 1.1; }
.header-stats dd { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.1; white-space: nowrap; }

.bookmark-link {
  padding: 8px 13px;
  border-radius: 999px;
  color: #ffb086;
  background: var(--accent-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.bookmark-link span {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  margin-left: 4px;
  place-items: center;
  border-radius: 999px;
  color: #08090a;
  background: var(--accent);
}

.category-nav { overflow-x: auto; scrollbar-width: none; }
.category-nav::-webkit-scrollbar { display: none; }
.nav-inner { display: flex; gap: 4px; padding-bottom: 8px; }
.nav-inner a {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.nav-inner a:hover, .nav-inner a.active { color: #ffae81; background: var(--accent-soft); }

.page-shell { padding: 48px 0 80px; }

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 46px;
  padding: clamp(34px, 8vw, 76px);
  border-radius: 28px;
  color: white;
  border: 1px solid #29211e;
  background: radial-gradient(circle at 85% 15%, rgba(240, 90, 55, .22), transparent 34%), linear-gradient(135deg, #111214, #1b1716 72%, #321710);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -120px;
  top: -160px;
  border: 55px solid rgba(255,255,255,.1);
  border-radius: 50%;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--warm);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
}
.hero .eyebrow { color: #ff9e68; }
.hero h1, .category-hero h1 { margin: 0; font-family: Georgia, "Yu Mincho", serif; line-height: 1.25; }
.hero h1 { max-width: 720px; font-size: clamp(34px, 6vw, 64px); }
.hero > p:last-child { max-width: 680px; margin: 22px 0 0; color: rgba(255,255,255,.82); }

.site-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
  margin-bottom: 46px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}
.site-about-copy h2 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 32px); }
.site-about-copy p:not(.eyebrow) { margin: 8px 0 0; color: #c1c0bd; font-size: 14px; }

.admin-news { margin-bottom: 46px; }
.admin-news-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 15px;
}
.admin-news-heading h2 { margin: 0; font-size: clamp(23px, 3vw, 31px); }
.admin-news-heading > span { color: var(--muted); font-size: 12px; }
.admin-news-entry {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 24px;
  overflow: hidden;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.admin-news-entry::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--warm), var(--accent));
}
.admin-news-entry time { color: var(--warm); font-family: Georgia, serif; font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.admin-news-entry h3 { margin: -4px 0 8px; color: var(--ink); font-size: 18px; }
.admin-news-entry p { margin: 0; color: #c1c0bd; font-size: 14px; }
.admin-news-history { margin-top: 12px; padding: 0 4px; color: var(--muted); }
.admin-news-history summary { cursor: pointer; color: #d7d4cf; font-size: 13px; font-weight: 700; }
.admin-news-history dl { display: grid; grid-template-columns: 112px 1fr; gap: 7px 18px; margin: 14px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: #0d0f11; font-size: 12px; }
.admin-news-history dt { color: var(--warm); font-family: Georgia, serif; }
.admin-news-history dd { margin: 0; }

.section-heading,
.category-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}
.section-heading h2 { margin: 0; font-size: clamp(26px, 4vw, 38px); }
.section-heading > p, .category-hero > p { margin: 0; color: var(--muted); }
.category-hero { padding: 12px 2px 24px; border-bottom: 1px solid var(--line); }
.category-hero h1 { font-size: clamp(36px, 6vw, 58px); }

.article-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.article-item {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 16px 18px 16px 22px;
  border-bottom: 1px solid var(--line);
  transition: background-color .18s ease;
}
.article-item:last-child { border-bottom: 0; }
.article-item:hover { background: var(--card-raised); }
.article-thumbnail {
  position: relative;
  flex: 0 0 128px;
  width: 128px;
  height: 72px;
  overflow: hidden;
  border: 1px solid #303338;
  border-radius: 10px;
  background: #202226;
}
.article-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease, opacity .25s ease;
}
.article-thumbnail:hover img { transform: scale(1.04); opacity: .9; }
.article-copy { min-width: 0; flex: 1; }
.article-title {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.article-title:hover { color: #ff9a6d; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 5px; color: var(--muted); font-size: 12px; }

.bookmark-button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 800;
}
.bookmark-button { flex: 0 0 auto; padding: 8px 11px; color: #ff9d72; background: var(--accent-soft); font-size: 12px; }
.bookmark-button.is-saved { color: #ffd08f; background: #392718; }
.primary-button { padding: 13px 22px; color: #08090a; background: linear-gradient(135deg, var(--warm), var(--accent)); }
.secondary-button { padding: 10px 16px; color: #ff9c91; background: #351c1d; }

.registered-sites { margin-top: 30px; }
.registered-sites summary { cursor: pointer; color: var(--accent); font-weight: 800; }
.site-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.site-card { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); text-decoration: none; font-size: 13px; }
.site-card:hover { border-color: #7c4638; background: var(--card-raised); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #c4cbc7; }
.status-dot.is-ok { background: #31a56f; }
.status-dot.is-stale { background: #db8a45; }

.empty-state, .notice { padding: 38px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); text-align: center; }
.empty-state h1, .empty-state h2, .notice h2 { margin-top: 0; }
.notice.error { color: #ff9c94; background: #281516; }
.notice.success { color: #8ad8aa; background: #10251a; }
.notice ul { display: inline-block; margin: 0; text-align: left; }

.bookmark-actions { margin-top: 18px; text-align: right; }

.contact-form { display: grid; gap: 17px; max-width: 760px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.contact-guidance { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 900px; margin-bottom: 24px; padding: 25px 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.contact-guidance h2 { margin: 0 0 8px; font-size: 22px; }
.contact-guidance p { margin: 7px 0; color: #c1c0bd; font-size: 13px; }
.contact-guidance ul { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 22px; margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.contact-guidance-notes { padding: 15px 18px; border-left: 2px solid var(--accent); background: #0d0f11; }
.contact-guidance-notes p::before { content: "※"; color: var(--warm); }
.contact-form label { display: grid; gap: 6px; font-weight: 700; }
.contact-form label span { color: var(--warm); font-size: 11px; }
.contact-form input, .contact-form textarea, .contact-form select { width: 100%; border: 1px solid #3a3d42; border-radius: 9px; padding: 11px 12px; background: #0d0f11; color: var(--ink); }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: 3px solid rgba(240,90,55,.16); border-color: var(--accent); }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.site-footer { padding: 28px 0 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer > div { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.site-footer a { color: var(--accent); }

@media (max-width: 760px) {
  .page-shell { padding-top: 28px; }
  .hero { border-radius: 20px; }
  .section-heading, .category-hero { align-items: start; flex-direction: column; gap: 8px; }
  .admin-news-heading { align-items: start; flex-direction: column; gap: 5px; }
  .site-about { grid-template-columns: 1fr; gap: 22px; padding: 22px; }
  .header-actions { gap: 7px; }
  .header-stats div { min-width: 42px; padding: 6px 7px; }
  .header-stats dd { display: none; }
  .contact-guidance { grid-template-columns: 1fr; gap: 18px; }
  .admin-news-entry { grid-template-columns: 1fr; gap: 8px; padding: 20px; }
  .admin-news-entry h3 { margin-top: 0; }
  .article-item { align-items: start; padding: 15px; }
  .article-thumbnail { flex-basis: 104px; width: 104px; height: 68px; }
  .article-title { font-size: 15px; }
  .site-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .header-inner, .nav-inner, .page-shell, .site-footer > div { width: min(100% - 20px, 1120px); }
  .header-inner { min-height: 58px; }
  .brand-mark { width: 30px; height: 30px; }
  .bookmark-link { padding: 7px 9px; font-size: 11px; }
  .hero { padding: 30px 22px; }
  .header-stats div { min-width: 38px; padding-inline: 5px; }
  .header-stats dt { font-size: 11px; }
  .contact-guidance { padding: 20px 16px; }
  .contact-guidance ul { grid-template-columns: 1fr; }
  .site-grid { grid-template-columns: 1fr; }
  .article-item { gap: 10px; }
  .article-thumbnail { flex-basis: 88px; width: 88px; height: 62px; border-radius: 8px; }
  .bookmark-button { padding: 7px 8px; }
  .contact-form { padding: 20px 16px; }
}
