:root {
  color-scheme: light;
  --ink: #2f182c;
  --muted: #725e6d;
  --line: #eadde5;
  --paper: #fffaf7;
  --panel: #ffffff;
  --soft: #f7edf0;
  --accent: #e85d75;
  --accent-2: #2f8f92;
  --gold: #c59642;
  --shadow: 0 20px 60px rgba(67, 27, 55, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic",
    "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff8f6 0%, #fffdf9 42%, #f4faf7 100%);
}

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

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

.shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 250, 247, 0.86);
  border-bottom: 1px solid rgba(234, 221, 229, 0.85);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: var(--ink);
  border-radius: 8px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.nav,
.footer nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.footer a {
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.nav a:hover,
.footer a:hover {
  color: var(--ink);
  background: var(--soft);
}

main {
  outline: none;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  min-height: min(760px, calc(100vh - 72px));
  padding: clamp(34px, 6vw, 82px) clamp(18px, 5vw, 72px) clamp(28px, 4vw, 46px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(255, 250, 247, 0.96) 0%,
      rgba(255, 250, 247, 0.9) 42%,
      rgba(255, 250, 247, 0.36) 100%
    ),
    url("/assets/hero-toutoi-times.png") center right / cover no-repeat;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(255, 250, 247, 0), #fffdf9);
  z-index: -1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: 0;
}

.lead {
  max-width: 660px;
  color: #5a4655;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.9;
}

.search-panel {
  max-width: 760px;
  margin-top: 30px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(234, 221, 229, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-input,
.field,
.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.search-input:focus,
.field:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  outline: 3px solid rgba(232, 93, 117, 0.2);
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 16px;
  color: #fff;
  font-weight: 800;
  background: var(--ink);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.secondary {
  color: var(--ink);
  background: var(--soft);
}

.btn.accent {
  background: var(--accent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #5f4c59;
  background: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 700;
}

.hero-side {
  display: grid;
  gap: 14px;
  align-self: end;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric {
  padding: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric strong {
  display: block;
  font-size: 24px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section {
  padding: clamp(38px, 5vw, 70px) clamp(18px, 5vw, 72px);
}

.section.alt {
  background: rgba(247, 237, 240, 0.5);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto 22px;
}

.section-head h2 {
  margin-bottom: 6px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.25;
}

.section-head p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.75;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(47, 24, 44, 0.06);
}

.thumb {
  display: grid;
  min-height: 160px;
  place-items: center;
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, #39213a, #e85d75 55%, #2f8f92);
  border-radius: 7px;
  font-weight: 900;
  text-align: center;
}

.card h3 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.45;
}

.card p,
.muted {
  color: var(--muted);
  line-height: 1.75;
}

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

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 62px) clamp(18px, 5vw, 32px);
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--accent);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 26px;
}

.detail-title {
  padding: clamp(22px, 4vw, 34px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-title h1 {
  font-size: clamp(30px, 5vw, 54px);
}

.detail-media {
  min-height: 300px;
}

.content-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}

.stack {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel h2,
.panel h3 {
  margin-bottom: 10px;
}

.list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.list li {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdfb;
}

.notice {
  padding: 14px;
  color: #654a16;
  background: #fff6df;
  border: 1px solid #f1d999;
  border-radius: 7px;
  line-height: 1.7;
}

.search-results {
  max-width: 1180px;
  margin: 18px auto 0;
}

.empty {
  padding: 30px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

.admin-menu {
  display: grid;
  gap: 8px;
  align-self: start;
}

.admin-menu button {
  justify-content: flex-start;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-form textarea {
  min-height: 120px;
  resize: vertical;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

  .nav,
  .footer nav {
    justify-content: flex-start;
  }

  .hero,
  .detail-hero,
  .content-band,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero::before {
    background:
      linear-gradient(
        180deg,
        rgba(255, 250, 247, 0.98) 0%,
        rgba(255, 250, 247, 0.86) 48%,
        rgba(255, 250, 247, 0.62) 100%
      ),
      url("/assets/hero-toutoi-times.png") center / cover no-repeat;
  }

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

@media (max-width: 560px) {
  .search-row,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .card-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
