:root {
  --bg: #f4fbfb;
  --paper: #ffffff;
  --ink: #162527;
  --muted: #607579;
  --line: #cde9ea;
  --brand: #00a8b5;
  --brand-2: #00d5c8;
  --accent: #ff5ca8;
  --soft: #e7ffff;
  --shadow: 0 18px 42px rgba(0, 120, 132, 0.13);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(0, 213, 200, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 213, 200, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, #f8ffff 0%, var(--bg) 42%, #eefafa 100%);
  background-size: 36px 36px, 36px 36px, auto;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
}

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

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #06292d;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(0, 213, 200, 0.14);
}

.brand strong { display: block; font-size: 18px; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: 12px; line-height: 1.2; }

.site-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  color: #31565b;
  font-size: 14px;
}

.site-menu a:hover { color: var(--brand); }

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

main { width: 100%; }

.hero {
  min-height: 500px;
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(420px, 1.08fr);
  align-items: stretch;
  gap: clamp(28px, 5vw, 72px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(42px, 7vw, 82px) clamp(22px, 4vw, 42px) 28px;
  overflow: hidden;
}

.hinami-hero {
  position: relative;
  min-height: clamp(520px, 62vw, 720px);
  max-width: none;
  grid-template-columns: minmax(0, 1120px);
  align-items: center;
  padding: clamp(54px, 8vw, 92px) clamp(22px, 5vw, 68px) clamp(42px, 6vw, 72px);
  isolation: isolate;
}

.hinami-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(244, 251, 251, 0.96) 0%, rgba(244, 251, 251, 0.8) 30%, rgba(244, 251, 251, 0.24) 58%, rgba(244, 251, 251, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(0, 168, 181, 0.1));
}

.hinami-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(244, 251, 251, 0), var(--bg));
}

.hinami-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 620px);
  justify-self: center;
}

.hinami-hero .hero-copy {
  justify-self: start;
  max-width: 640px;
  padding: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

.hero h1 {
  margin: 0;
  font-size: clamp(54px, 11vw, 136px);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 10px 34px rgba(0, 168, 181, 0.18);
}

.hero p {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 20px;
}

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

.hinami-hero-note {
  position: absolute;
  right: clamp(18px, 4vw, 62px);
  bottom: clamp(22px, 5vw, 58px);
  display: grid;
  gap: 4px;
  max-width: min(360px, 34vw);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: #173538;
  padding: 14px 16px;
  box-shadow: 0 18px 42px rgba(0, 83, 90, 0.18);
  backdrop-filter: blur(12px);
}

.hinami-hero-note span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.hinami-hero-note strong {
  font-size: 17px;
  line-height: 1.45;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button.primary {
  border-color: #00b9c8;
  background: linear-gradient(135deg, #00d5c8, #33e8ff);
  color: #082b30;
  box-shadow: 0 10px 24px rgba(0, 168, 181, 0.22);
}

.hero-carousel {
  position: relative;
  min-height: 360px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(0, 168, 181, 0.22);
  background: var(--paper);
}

.hero-carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0, 168, 181, 0.16)),
    linear-gradient(90deg, rgba(0, 213, 200, 0.22), transparent 32%, rgba(255, 92, 168, 0.16));
  pointer-events: none;
}

.hero-carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  animation: heroFade 25s infinite;
  animation-delay: calc(var(--slide) * 5s);
}

@keyframes heroFade {
  0% { opacity: 0; transform: scale(1.035); }
  6% { opacity: 1; }
  22% { opacity: 1; }
  28% { opacity: 0; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.08); }
}

.latest,
.topic-hero,
.grid-section,
.topic-section,
.article-shell,
.admin-shell,
.editor-shell,
.auth-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px clamp(18px, 4vw, 32px);
}

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

.section-head h2 {
  margin: 0;
  font-size: 32px;
}

.section-head p { margin: 0; color: var(--muted); }

.topic-hero {
  padding-top: clamp(54px, 7vw, 92px);
  padding-bottom: 20px;
  text-align: center;
}

.topic-hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(360px, 48vw, 540px);
  max-width: none;
  margin: 0;
  padding: clamp(64px, 8vw, 104px) clamp(22px, 5vw, 68px) clamp(54px, 7vw, 82px);
  isolation: isolate;
  overflow: hidden;
}

.topic-hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(244, 251, 251, 0.9) 0%, rgba(244, 251, 251, 0.66) 45%, rgba(244, 251, 251, 0.92) 100%),
    linear-gradient(90deg, rgba(244, 251, 251, 0.96), rgba(244, 251, 251, 0.38) 54%, rgba(244, 251, 251, 0.12));
}

.topic-hero-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 110px;
  background: linear-gradient(180deg, rgba(244, 251, 251, 0), var(--bg));
}

.topic-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}

.topic-hero h1 {
  max-width: 780px;
  margin: 0 auto;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
}

.topic-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 20px;
}

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

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  padding: 24px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

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

.topic-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 120, 132, 0.05);
}

.topic-card:hover {
  border-color: rgba(0, 168, 181, 0.42);
  box-shadow: var(--shadow);
}

.topic-card span,
.topic-card small {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.topic-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.topic-card p {
  margin: 0;
  color: var(--muted);
}

.search-form {
  display: flex;
  gap: 10px;
  max-width: 680px;
  margin-top: 24px;
}

.search-form input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  padding: 9px 12px;
}

.topic-chip {
  display: grid;
  min-height: 112px;
  align-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(231,255,255,0.72)),
    var(--paper);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.topic-chip::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 34px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-2), var(--accent));
}

.topic-chip:hover {
  border-color: var(--brand-2);
  box-shadow: var(--shadow);
}

.topic-chip strong {
  font-size: 20px;
}

.topic-chip span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.post-card {
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  transition: transform 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 8px 24px rgba(0, 120, 132, 0.05);
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(0, 168, 181, 0.42);
}

.post-card a {
  display: flex;
  min-height: inherit;
  flex-direction: column;
  padding: 22px;
}

.post-card.featured {
  min-height: 260px;
  border-left: 6px solid var(--accent);
  background:
    linear-gradient(90deg, rgba(0, 213, 200, 0.12), transparent 40%),
    rgba(255, 255, 255, 0.94);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.post-meta span {
  color: var(--brand);
  font-weight: 700;
}

.post-meta a,
.breadcrumb a,
.source-note a {
  color: var(--brand);
  font-weight: 800;
}

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

.post-card h2,
.post-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.post-card p {
  margin: 12px 0 18px;
  color: var(--muted);
}

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

.tags span {
  border: 1px solid rgba(0, 168, 181, 0.22);
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--soft);
  color: #226167;
  font-size: 13px;
}

.article {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 8px;
}

.profile-cover {
  margin: 0 0 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-shell {
  position: relative;
}

.article h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 7vw, 64px);
  line-height: 1.12;
  color: #10282d;
}

.lead {
  color: var(--muted);
  font-size: 20px;
  border-left: 4px solid var(--brand-2);
  padding-left: 16px;
}

.read-context {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 14px;
}

.read-context span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: #226167;
  padding: 4px 10px;
  font-size: 13px;
}

.article-hinami {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin: 22px 0 18px;
  border: 1px solid rgba(0, 168, 181, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(231, 255, 255, 0.92), rgba(255, 255, 255, 0.92)),
    var(--paper);
  padding: 14px 18px 14px 14px;
  box-shadow: 0 12px 30px rgba(0, 120, 132, 0.08);
}

.article-hinami img {
  display: block;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: contain;
  object-position: center;
}

.article-hinami p {
  margin: 0;
}

.article-hinami p:not(.section-kicker) {
  color: #31565b;
  font-size: 16px;
  line-height: 1.65;
}

.article-body {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.article-body p {
  margin: 0 0 18px;
}

.article-body ul {
  padding-left: 22px;
}

.article-body li {
  margin-bottom: 8px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.photo-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 120, 132, 0.1);
}

.photo-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 180ms ease;
  cursor: zoom-in;
}

.photo-grid figure:hover img {
  transform: scale(1.025);
}

.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(4, 18, 22, 0.86);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}

.lightbox img {
  display: block;
  max-width: min(1080px, 96vw);
  max-height: 88vh;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  object-fit: contain;
}

.lightbox button {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #09282d;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.article-body h2 {
  margin-top: 34px;
  padding-top: 6px;
  color: #0f4e56;
}
.article-body a { color: var(--brand-2); text-decoration: underline; }
.source { color: var(--muted); font-size: 14px; }

.source-note {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 18px;
}

.source-note p {
  margin: 0 0 10px;
  color: var(--muted);
}

.source-note .section-kicker {
  color: var(--brand);
}

.after-article {
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.next-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 213, 200, 0.16), rgba(255, 92, 168, 0.08)),
    var(--paper);
  padding: 24px;
}

.next-step h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.35;
}

.next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.recommend-block {
  margin-top: 30px;
}

.section-head.compact {
  align-items: start;
}

.section-head.compact h2 {
  font-size: 26px;
}

.compact-grid .post-card {
  min-height: 210px;
}

.compact-grid .post-card h2,
.compact-grid .post-card h3 {
  font-size: 19px;
}

.site-footer {
  position: relative;
  margin-top: 64px;
  padding: 52px clamp(18px, 4vw, 56px) 70px;
  border-top: 1px solid rgba(0, 168, 181, 0.18);
  background:
    linear-gradient(180deg, rgba(244, 251, 251, 0), rgba(231, 255, 255, 0.78) 18%, rgba(255, 255, 255, 0.92)),
    linear-gradient(90deg, rgba(0, 213, 200, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 213, 200, 0.06) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  color: var(--muted);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 12px;
  background: linear-gradient(90deg, var(--brand-2), var(--accent), #ffd36b, var(--brand-2));
  opacity: 0.7;
}

.footer-story {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.85fr) minmax(220px, 0.75fr);
  align-items: stretch;
  gap: 22px;
  max-width: 1120px;
  margin: 0 auto;
}

.footer-hinami {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 220px;
}

.footer-hinami img {
  width: min(150px, 34vw);
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(0, 120, 132, 0.18));
}

.footer-hinami h2 {
  margin: 0 0 12px;
  color: #12373b;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.25;
}

.footer-hinami p {
  margin: 0;
}

.footer-hinami p:not(.section-kicker),
.footer-note p {
  color: #46686d;
  font-size: 15px;
  line-height: 1.75;
}

.footer-map {
  display: grid;
  gap: 10px;
}

.footer-map a {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(0, 168, 181, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  padding: 12px 14px;
}

.footer-map a:hover {
  border-color: var(--brand-2);
  box-shadow: 0 12px 26px rgba(0, 120, 132, 0.1);
}

.footer-map span {
  color: #0f4e56;
  font-weight: 800;
}

.footer-map small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.footer-note {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid rgba(0, 168, 181, 0.2);
  padding-left: 20px;
}

.footer-note p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(0, 168, 181, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #0f4e56;
  font-weight: 700;
  padding: 5px 11px;
}

.auth-shell {
  min-height: 68vh;
  display: grid;
  place-items: center;
}

.panel,
.editor {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel { max-width: 420px; }

label {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.content-input {
  min-height: 420px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-head h1 { margin: 0; }

.admin-actions,
.editor-actions,
.admin-row-actions,
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.button.compact,
button.button.compact {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 14px;
}

.button.danger {
  border-color: #ffb3c7;
  background: #fff5f8;
  color: #9d174d;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

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

.admin-stats strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
}

.admin-stats span,
.admin-title-cell small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.admin-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.8fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 16px;
  margin-bottom: 16px;
}

.admin-filters label {
  margin-bottom: 0;
}

.notice {
  border: 1px solid rgba(0, 168, 181, 0.28);
  border-radius: 8px;
  background: var(--soft);
  color: #07545b;
  font-weight: 700;
  padding: 10px 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.published {
  background: #ddfff5;
  color: #006456;
}

.status-pill.draft {
  background: #fff5d6;
  color: #7a4a00;
}

.admin-title-cell a {
  display: inline-block;
  font-weight: 800;
}

.empty-state {
  color: var(--muted);
  text-align: center;
}

.editor-actions {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  border: 1px solid #ffd1dc;
  border-radius: 8px;
  background: #fff8fa;
  margin-top: 18px;
  padding: 18px 20px;
}

.danger-zone h2,
.danger-zone p {
  margin: 0;
}

.danger-zone h2 {
  font-size: 20px;
}

.danger-zone p {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th { color: var(--muted); }
.error { color: var(--brand); font-weight: 700; }

@media (max-width: 820px) {
  .site-header {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .site-menu {
    display: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 12px;
  }

  .site-menu.open {
    display: grid;
  }

  .site-menu a {
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    padding: 10px 12px;
    font-weight: 700;
  }

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

  .hinami-hero {
    min-height: 620px;
    align-items: end;
    padding-top: 44px;
    padding-bottom: 34px;
  }

  .hinami-hero::before {
    background:
      linear-gradient(180deg, rgba(244, 251, 251, 0.14) 0%, rgba(244, 251, 251, 0.34) 36%, rgba(244, 251, 251, 0.92) 68%, var(--bg) 100%);
  }

  .hinami-hero-bg {
    object-position: 66% top;
  }

  .hinami-hero .hero-copy {
    max-width: none;
  }

  .hinami-hero .hero-copy p {
    font-size: 17px;
  }

  .hinami-hero-note {
    position: relative;
    right: auto;
    bottom: auto;
    max-width: none;
    margin-top: 18px;
  }

  .article-hinami {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .article-hinami img {
    width: 82px;
  }

  .site-footer {
    margin-top: 44px;
    padding: 42px clamp(18px, 4vw, 28px) 52px;
  }

  .footer-story {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-hinami {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: auto;
    gap: 14px;
  }

  .footer-hinami img {
    width: 96px;
  }

  .footer-hinami h2 {
    font-size: 24px;
  }

  .footer-map {
    grid-template-columns: 1fr;
  }

  .footer-note {
    border-left: 0;
    border-top: 1px solid rgba(0, 168, 181, 0.2);
    padding-left: 0;
    padding-top: 18px;
  }

  .hero-carousel { min-height: 360px; }

  .post-grid,
  .topic-grid,
  .topic-index-grid,
  .photo-grid,
  .two-col,
  .admin-stats,
  .admin-filters {
    grid-template-columns: 1fr;
  }

  .search-form {
    flex-direction: column;
  }


  .section-head,
  .admin-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-actions,
  .editor-actions,
  .admin-row-actions,
  .filter-actions,
  .danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions .button,
  .admin-actions button,
  .editor-actions .button,
  .editor-actions button,
  .filter-actions .button,
  .filter-actions button,
  .danger-zone .button {
    width: 100%;
  }

  .topic-chip {
    min-height: 86px;
  }

}

@media (min-width: 821px) and (max-width: 1100px) {
  .topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
