*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --fg: #2c2c2c;
  --muted: #a1a6a6;
  --line: #edf0ec;
  --soft: #f7f9f8;
  --accent: #2d8c3d;
  --tag: #2d8c3d;
  --drawer: rgba(18, 24, 20, 0.5);
  --shadow: 0 24px 60px rgba(24, 33, 26, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html, body {
  min-height: 100%;
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Roboto', 'Noto Sans JP', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  /* background: radial-gradient(circle at top, rgba(247, 249, 248, 0.9), #fff 25%); */
  color: var(--fg);
}

a, button, input {
  font: inherit;
}

button {
  border: 0;
  background: transparent;
}

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

.home-main {
  padding: 28px 24px 96px;
}

.home-hero {
  width: min(100%, 1240px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-topbar {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-brand img {
  width: 145px;
  height: auto;
}

.hero-tagline {
  font-size: 12px;
  line-height: 1.4;
  color: #000;
}

.toolbar-shell {
  margin-top: 11px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.mobile-filter-btn {
  display: none;
}

.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #202020;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}

.filter-btn svg {
  width: 20px;
  height: 20px;
  color: #4b4b4b;
  flex: none;
}

.filter-btn:hover {
  border-color: #d7ddd6;
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filter-btn.active svg {
  color: #fff;
}

.search-pill {
  width: min(100%, 271px);
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.search-pill svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.search-pill input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.25px;
  color: var(--fg);
}

.search-pill input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.active-tags {
  width: min(100%, 1240px);
  margin: 20px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.active-tags:empty {
  display: none;
}

.active-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: #1d3322;
  font-size: 12px;
  font-weight: 500;
}

.active-tag button {
  color: #537f5d;
  cursor: pointer;
}

.clear-all-btn {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(45, 140, 61, 0.08);
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.gallery-header {
  width: min(100%, 1240px);
  margin: 18px auto 0;
}

.gallery-header h1 {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.gallery-header p {
  margin-top: 8px;
  max-width: 760px;
  color: #59625b;
  font-size: 14px;
  line-height: 1.7;
}

.gallery-wrap {
  /* width: min(100%, 1240px); */
  margin: 32px 30px 0;
}

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

.thumb-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.thumb-card:hover .thumb-img-wrap::after {
  transform: translateX(185%) rotate(18deg);
}

.thumb-card:hover .thumb-img-wrap {
  transform: scale(1.045);
  box-shadow: 0 12px 28px rgba(22, 28, 24, 0.12);
}

.thumb-frame {
  padding: 40px 24px;
  border-radius: 12px;
  background: linear-gradient(90deg, #f7f9f8 0%, #f7f9f8 100%);
  overflow: visible;
}

.thumb-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dfe4e0;
  box-shadow: 0 4px 10px rgba(22, 28, 24, 0);
  transform: scale(1);
  transform-origin: center center;
  transition: transform .6s cubic-bezier(.19, 1, .22, 1), box-shadow .6s cubic-bezier(.19, 1, .22, 1);
  will-change: transform;
}

.thumb-img-wrap::after {
  content: "";
  position: absolute;
  inset: -24%;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 38%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 255, 255, 0.32) 50%,
    rgba(255, 255, 255, 0.08) 55%,
    rgba(255, 255, 255, 0) 62%
  );
  transform: translateX(-185%) rotate(18deg);
  transition: transform 1.15s cubic-bezier(.19, 1, .22, 1);
  will-change: transform;
  pointer-events: none;
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.thumb-title {
  color: #2c2c2c;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumb-tags {
  min-height: 17px;
  padding-left: 12px;
  color: var(--tag);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 1px;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  white-space: normal;
}

.thumb-views {
  font-size: 11px;
  color: #b9b9b9;
  letter-spacing: 0;
  flex-shrink: 0;
}

.empty-state {
  padding: 80px 24px;
  text-align: center;
  color: #59625b;
}

.empty-state p {
  font-size: 15px;
  line-height: 1.7;
}

.sk-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sk-thumb {
  aspect-ratio: 392 / 273.5;
  border-radius: 12px;
  background: linear-gradient(90deg, #eef2ee 25%, #e4e9e4 37%, #eef2ee 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

.sk-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sk-line {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2ee 25%, #e4e9e4 37%, #eef2ee 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

.sk-line.short {
  width: 62%;
  height: 12px;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.menu-fab {
  position: fixed;
  top: 42px;
  right: max(32px, calc((100vw - 1240px) / 2));
  z-index: 20;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  /* box-shadow: 0 16px 40px rgba(45, 140, 61, 0.18); */
}

.menu-fab span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.site-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.4s var(--ease);
}

.site-drawer.active {
  visibility: visible;
  pointer-events: auto;
}

.site-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: var(--drawer);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.site-drawer.active .site-drawer-backdrop {
  opacity: 1;
}

.site-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 360px);
  height: 100%;
  background: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  box-shadow: -12px 0 32px rgba(24, 33, 26, 0.12);
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
}

.site-drawer.active .site-drawer-panel {
  transform: translateX(0);
}

.site-drawer-close {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--soft);
  color: #4c5b50;
  font-size: 24px;
  cursor: pointer;
}

.drawer-brand img {
  width: 145px;
}

.drawer-nav {
  display: grid;
  gap: 12px;
}

.drawer-nav a {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--soft);
  color: #1e2720;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.drawer-nav a.active {
  background: rgba(45, 140, 61, 0.09);
  color: var(--accent);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(19, 26, 21, 0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s var(--ease), visibility .2s var(--ease);
  z-index: 40;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-panel {
  width: min(100%, 680px);
  max-height: min(88vh, 840px);
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(16, 24, 18, 0.16);
  transform: translateY(16px);
  transition: transform .25s var(--ease);
}

.modal-overlay.open .modal-panel {
  transform: translateY(0);
}

.modal-head,
.modal-foot {
  position: sticky;
  background: #fff;
  z-index: 1;
}

.modal-head {
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
}

.modal-head h2 {
  font-size: 20px;
  font-weight: 600;
}

.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--soft);
  color: #57665a;
  font-size: 22px;
  cursor: pointer;
}

.modal-body {
  padding: 24px 28px 0;
}

.modal-section + .modal-section {
  margin-top: 24px;
}

.modal-section[data-axis="color"] {
  margin-bottom: 20px;
}

.modal-section-label {
  margin-bottom: 8px;
  color: #202020;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.pill-group,
.color-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #202020;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.pill-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pill-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: none;
}

.pill-icon svg {
  width: 100%;
  height: 100%;
}

.pill-icon img,
.meta-pill-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: invert(42%) sepia(35%) saturate(884%) hue-rotate(80deg) brightness(95%) contrast(89%);
}

.meta-pill:hover .meta-pill-icon img {
  filter: brightness(0) invert(1);
}

.pill.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.pill.selected .pill-icon img {
  filter: brightness(0) invert(1);
}

.color-btn {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  border-radius: 60px;
  border: 1px solid #edf0ec;
  background: #fff;
  cursor: pointer;
  gap: 8px;
  transition: all 0.2s;
}

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

.color-btn.selected .color-label {
  color: #fff;
}

.color-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.color-btn[data-id="white"] .color-circle {
  border: 1px solid #cacaca;
}

.color-label {
  font-size: 14px;
  color: #2c2c2c;
  white-space: nowrap;
}

.modal-foot {
  bottom: 0;
  display: grid;
  gap: 10px;
  padding: 18px 28px 24px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 24px 24px;
}

.apply-btn,
.reset-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.apply-btn {
  background: var(--accent);
  color: #fff;
}

.reset-btn {
  background: var(--soft);
  color: #425247;
}

footer.site-footer {
  margin-top: 40px;
  padding: 48px 24px 28px;
  background: #1a1a1a;
  color: #d4d4d8;
}

body.home-page footer.site-footer {
  display: none;
}

body.about-page {
  min-height: 100vh;
}

body.about-page footer.site-footer {
  display: none;
}

body.about-page .hero-brand-lockup {
  display: none;
}

.about-main {
  min-height: 100vh;
  padding: 37px 24px 96px;
}

.about-top {
  width: min(100%, 1240px);
  margin: 0 auto;
}

.about-topbar {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 74px;
}

.about-topbar .menu-fab {
  position: absolute;
  top: 5px;
  right: 0;
}

.about-crumb {
  width: min(100%, 780px);
  margin: 0px auto 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: #b9b9b9;
  font-size: 10px;
  line-height: 1.6;
  white-space: nowrap;
}

.about-crumb a {
  color: #b9b9b9;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.about-crumb span:last-child {
  color: #2c2c2c;
  overflow: hidden;
  text-overflow: ellipsis;
}

.about-section {
  width: min(100%, 720px);
  margin: 50px auto 0;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.about-logo-large img {
  width: 227px;
  height: auto;
}

.about-heading,
.about-subheading {
  color: #2c2c2c;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.about-copy,
.about-notice {
  width: 100%;
  color: #2c2c2c;
  font-size: 14px;
  line-height: 1.4;
}

.about-copy p + p,
.about-notice p + p {
  margin-top: 12px;
}

.about-notice strong {
  font-weight: 700;
}

.about-notice a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-inner {
  width: min(100%, 1100px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand h3,
.footer-col h4 {
  color: #fff;
}

.footer-brand h3 {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
}

.footer-brand p,
.footer-col a,
.footer-bottom {
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.7;
}

.footer-col h4 {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
}

.footer-col li + li {
  margin-top: 8px;
}

.footer-col a {
  text-decoration: none;
}

.footer-bottom {
  width: min(100%, 1100px);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 1080px) {
  .gallery-grid,
  .skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .home-main {
    padding: 24px 16px 72px;
  }

  .about-main {
    padding: 28px 16px 72px;
  }

  .home-hero {
    gap: 16px;
  }

  .hero-topbar {
    width: 394px;
    max-width: 100%;
    min-height: 53.8px;
  }

  .toolbar-shell {
    gap: 12px;
  }

  .filter-toolbar {
    gap: 8px;
  }

  .filter-btn {
    min-height: 40px;
    padding: 7px 11px;
  }

  .gallery-grid,
  .skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
  }

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

  .thumb-frame {
    padding: 32px 16px;
  }

  .thumb-title {
    font-size: 12px;
    white-space: normal;
    display: -webkit-box;
    min-height: 34px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .thumb-tags {
    min-height: 14px;
    padding-left: 0;
    font-size: 10px;
    white-space: normal;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .about-section {
    margin-top: 36px;
    gap: 24px;
  }
}

@media (max-width: 520px) {
  .home-main {
    padding: 16px 0 56px;
  }

  .about-main {
    padding: 16px 0 56px;
  }

  .hero-brand img {
    width: 145px;
  }

  .hero-topbar {
    width: 394px;
    max-width: 100%;
    min-height: 53.8px;
  }

  .toolbar-shell,
  .active-tags,
  .gallery-wrap {
    width: 386px;
    max-width: calc(100% - 32px);
    margin-left: auto;
    margin-right: auto;
  }

  .menu-fab {
    position: absolute;
    top: 6px;
    right: 0;
    width: 42px;
    height: 42px;
    gap: 3px;
    box-shadow: 0 12px 30px rgba(45, 140, 61, 0.18);
  }

  .menu-fab span {
    width: 14px;
  }

  .toolbar-shell {
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
  }

  .filter-toolbar {
    display: none;
  }

  .mobile-filter-btn {
    min-width: 112px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 50px;
    background: #fff;
    color: #202020;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    flex: none;
  }

  .mobile-filter-btn svg {
    width: 24px;
    height: 24px;
    flex: none;
  }

  .search-pill {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
    padding: 0 9px;
  }

  .search-pill svg {
    width: 20px;
    height: 20px;
  }

  .search-pill input {
    font-size: 14px;
  }

  .gallery-wrap {
    margin-top: 20px;
  }

  .active-tags {
    margin-top: 16px;
  }

  .about-topbar,
  .about-crumb,
  .about-section {
    width: 386px;
    max-width: calc(100% - 32px);
    margin-left: auto;
    margin-right: auto;
  }

  .about-topbar {
    min-height: 58px;
  }

  .about-topbar .menu-fab {
    top: 0;
  }

  .about-crumb {
    margin-top: 22px;
    padding: 0;
  }

  .about-section {
    margin-top: 28px;
    padding: 0;
    gap: 20px;
  }

  .about-logo-large img {
    width: min(227px, 100%);
  }
}

/* ─── Detail page ──────────────────────────────────────────────── */

body.detail-page footer.site-footer {
  display: none;
}

.detail-main {
  min-height: 100vh;
  padding: 0 0 120px;
}

.detail-top-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 37px max(32px, calc((100vw - 1240px) / 2)) 0;
}

.back-btn {
  position: absolute;
  left: max(32px, calc((100vw - 1240px) / 2));
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #f7f9f9;
  color: #2c2c2c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex: none;
  transition: background .2s var(--ease);
}

.back-btn:hover {
  background: #edf0ec;
}

.back-btn svg {
  width: 30px;
  height: 30px;
}

.detail-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.detail-brand .hero-brand img {
  width: 145px;
  height: auto;
}

.detail-crumb {
  width: 100%;
  max-width: 1240px;
  margin: 20px auto 0;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #b9b9b9;
  overflow: hidden;
}

.detail-crumb a {
  color: #b9b9b9;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  flex: none;
}

.detail-crumb span:last-child {
  color: #2c2c2c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-content {
  width: 100%;
  max-width: 1240px;
  margin: 20px auto 0;
  padding: 0 32px;
  display: flex;
  gap: 32px;
  align-items: stretch;
}

.detail-left {
  width: 440px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 32px;
  justify-content: center;
}

.detail-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.6;
  color: #2c2c2c;
}

.detail-channel {
  font-size: 14px;
  color: #A1A6A6;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-views {
  font-size: 14px;
  color: #b9b9b9;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-date {
  font-size: 14px;
  line-height: 1.6;
  color: #b9b9b9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-desc {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-desc > p {
  font-size: 14px;
  line-height: 1.8;
  color: #2c2c2c;
}

.detail-desc-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-desc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.6;
}

.detail-desc-bullet {
  color: var(--accent);
  font-size: 20px;
  margin-right: 2px;
  line-height: 1;
  vertical-align: middle;
}

.detail-desc-section p:not(.detail-desc-title) {
  font-size: 14px;
  line-height: 1.8;
  color: #1a1a1a;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 21px;
}

.meta-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-row dt {
  font-size: 14px;
  font-weight: 600;
  color: #2c2c2c;
  line-height: 1.4;
}

.meta-row dd {
  font-size: 14px;
  color: #2c2c2c;
  line-height: 1.4;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--accent);
  border-radius: 36px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease);
}

.meta-pill--icon {
  gap: 4px;
  font-weight: 500;
}

.meta-pill-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
}

.meta-pill-icon svg {
  width: 100%;
  height: 100%;
}

.meta-pill:hover {
  background: var(--accent);
  color: #fff;
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.meta-hashtag {
  font-size: 14px;
  color: var(--accent);
  line-height: 1.4;
  white-space: nowrap;
}

.meta-hashtag-link,
.meta-color-link {
  text-decoration: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}

.meta-hashtag-link:hover,
.meta-color-link:hover {
  opacity: .82;
}

.meta-comma {
  color: #2f2828;
  font-size: 12px;
  line-height: 1.4;
}

.meta-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-color-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #2c2c2c;
}

.meta-color-link {
  color: inherit;
}

.meta-color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.08);
  flex: none;
}

.detail-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.detail-img-frame {
  flex: 1;
  background: var(--soft);
  border-radius: 20px;
  padding: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
}

.detail-img-inner {
  width: 100%;
  position: sticky;
  top: 52px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dfe4e0;
}

.detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-img-caption {
  text-align: center;
  font-size: 12px;
  padding: 0 12px;
}

.detail-img-caption a {
  color: #b9b9b9;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.detail-img-caption a:hover {
  color: var(--accent);
}

/* Related section */

.detail-related {
  width: 100%;
  max-width: 1240px;
  margin: 56px auto 0;
  padding: 0 32px;
}

.detail-related[hidden] {
  display: none;
}

.related-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 20px 0 0;
  margin-bottom: 24px;
}

.related-title-group {
  display: flex;
  align-items: center;
  gap: 20px;
}

.related-mark {
  width: 58px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.related-mark img {
  width: 58px;
  height: auto;
  object-fit: contain;
}

.related-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c2c2c;
  line-height: 1.2;
}

.related-sub {
  font-size: 12px;
  font-weight: 400;
  color: #b9b9b9;
  line-height: 1.4;
  margin-top: 2px;
}

.related-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.related-more-arrow {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

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

/* Share bar */

.share-bar {
  position: fixed;
  bottom: 40px;
  right: max(32px, calc((100vw - 1440px) / 2 + 50px));
  z-index: 20;
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 11px 19px;
  width: 190px;
  height: 62px;
}

.share-bar[hidden] {
  display: none;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}

.share-btn:hover {
  opacity: 0.82;
  transform: scale(1.07);
}

.share-btn svg {
  width: 20px;
  height: 20px;
}

.share-btn--x {
  background: #000;
  color: #fff;
}

.share-btn--pin {
  background: #E60023;
  color: #fff;
}

.share-btn--copy {
  background: #eee;
  color: #555;
}

.share-btn--copy.copied {
  background: var(--soft);
  color: var(--accent);
}

/* Not found */

.detail-not-found {
  width: min(100%, 560px);
  margin: 80px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: #59625b;
}

.detail-not-found a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Detail responsive */

@media (max-width: 1080px) {
  .detail-content {
    flex-direction: column;
  }

  .detail-left {
    width: 100%;
    padding: 24px 0 0;
  }

  .detail-img-frame {
    padding: 32px;
  }

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

@media (max-width: 780px) {
  body.detail-page .menu-fab {
    position: absolute;
    top: 58px;
    right: 14px;
    width: 42px;
    height: 42px;
    gap: 3px;
    box-shadow: 0 12px 30px rgba(45, 140, 61, 0.18);
  }

  body.detail-page .menu-fab span {
    width: 14px;
  }

  .detail-main {
    padding: 0 0 72px;
  }

  .detail-top-bar {
    width: 394px;
    max-width: calc(100% - 26px);
    margin: 0 auto;
    padding: 52px 0 0;
    justify-content: center;
  }

  .back-btn {
    display: none;
  }

  .detail-brand .hero-brand img {
    width: 145px;
  }

  .detail-crumb {
    width: 386px;
    max-width: calc(100% - 34px);
    margin: 20px auto 0;
    padding: 0;
  }

  .detail-content {
    width: 100%;
    margin-top: 0;
    padding: 0;
    gap: 0;
  }

  .detail-right {
    order: -1;
    margin-top: 20px;
  }

  .detail-img-frame {
    background: var(--soft);
    border-radius: 0;
    padding: 40px 32px;
    gap: 14px;
  }

  .detail-img-inner {
    position: static;
    gap: 14px;
  }

  .detail-img-wrap {
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  }

  .detail-img-caption {
    padding: 0;
    font-size: 12px;
  }

  .detail-left {
    width: 100%;
    padding: 20px 20px 0;
    gap: 16px;
  }

  .detail-title {
    font-size: 16px;
    line-height: 1.6;
  }

  .detail-channel {
    font-size: 12px;
    line-height: 1.6;
    color: #b9b9b9;
  }

  .detail-views {
    display: none;
  }

  .detail-desc {
    gap: 16px;
  }

  .detail-desc > p,
  .detail-desc-section p:not(.detail-desc-title) {
    font-size: 12px;
    line-height: 1.6;
  }

  .detail-desc-title {
    font-size: 12px;
    line-height: 1.6;
  }

  .detail-meta {
    gap: 21px;
  }

  .meta-row dt,
  .meta-row dd {
    font-size: 14px;
  }

  .meta-pills {
    gap: 8px;
  }

  .meta-pill {
    padding: 8px 12px;
    font-size: 12px;
  }

  .meta-tags {
    gap: 4px;
  }

  .meta-hashtag {
    font-size: 14px;
  }

  .detail-related {
    margin-top: 32px;
    padding: 32px 16px 0;
    border-top: 1px solid var(--line);
  }

  .related-head {
    margin-bottom: 24px;
    padding: 0;
    align-items: center;
  }

  .related-title-group {
    gap: 20px;
  }

  .related-title {
    font-size: 14px;
    line-height: 1;
  }

  .related-sub {
    margin-top: 8px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
  }

  .related-more {
    font-size: 12px;
    gap: 4px;
  }

  .related-more-label {
    display: none;
  }

  .related-more-arrow {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .related-more-arrow img {
    display: block;
    width: 16px;
    height: 16px;
  }

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

  .share-bar {
    position: fixed;
    margin: 0;
    right: 20px;
    bottom: 20px;
    padding: 11px 19px;
    gap: 16px;
    width: 190px;
    height: 62px;
  }
}

/* ─── CMS page ──────────────────────────────────────────────── */

.cms-page {
  min-height: 100vh;
  background: #f7f7f5;
  color: #1c1c1c;
}

.cms-auth[hidden] {
  display: none;
}

.cms-auth {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(247, 247, 245, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cms-auth-card {
  width: min(100%, 420px);
  background: #fff;
  border: 1px solid #e6e8e4;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(15, 18, 15, 0.12);
  padding: 28px;
  display: grid;
  gap: 22px;
}

.cms-auth-logo img {
  width: 120px;
}

.cms-auth-copy h1 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
}

.cms-auth-copy p {
  margin-top: 8px;
  font-size: 14px;
  color: #727671;
  line-height: 1.6;
}

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

.cms-auth-form label {
  display: grid;
  gap: 8px;
}

.cms-auth-form span {
  font-size: 13px;
  font-weight: 700;
  color: #565954;
}

.cms-auth-form input {
  width: 100%;
  border: 1px solid #d9dcd8;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
}

.cms-auth-error {
  font-size: 13px;
  color: #cc3d3d;
}

.cms-auth-submit {
  width: 100%;
}

.cms-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
}

.cms-sidebar {
  background: #f3f3f1;
  border-right: 1px solid #dddeda;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.cms-brand {
  padding: 0 20px;
}

.cms-brand-logo img {
  width: 106px;
}

.cms-brand-sub {
  margin-top: 8px;
  font-size: 13px;
  color: #797b76;
}

.cms-nav-section {
  display: grid;
  gap: 10px;
}

.cms-nav-label {
  padding: 0 20px;
  font-size: 12px;
  font-weight: 700;
  color: #575a55;
}

.cms-nav {
  display: grid;
}

.cms-nav a {
  padding: 10px 16px 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #4c4f49;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.cms-nav a.active {
  background: #e9eae5;
  color: #111;
}

.cms-main {
  min-width: 0;
  padding: 28px 0 40px;
}

.cms-topbar {
  padding: 0 24px 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.cms-heading {
  display: flex;
  gap: 16px;
  align-items: baseline;
}

.cms-heading h1 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
}

.cms-heading p {
  font-size: 14px;
  color: #747772;
}

.cms-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cms-search {
  min-width: 220px;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #dddeda;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #767975;
}

.cms-search svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.cms-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.cms-action-btn,
.cms-primary-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.cms-action-btn {
  background: #fff;
  border: 1px solid #dddeda;
  color: #232421;
}

.cms-primary-btn {
  background: #1f1f1f;
  color: #fff;
}

.cms-table-wrap {
  background: #fff;
  border-top: 1px solid #e5e7e4;
  border-bottom: 1px solid #e5e7e4;
  position: relative;
  overflow: visible;
}

.cms-table-scroll {
  overflow-x: auto;
  overflow-y: visible;
}

.cms-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

.cms-table th,
.cms-table td {
  border-right: 1px solid #eceeeb;
  border-bottom: 1px solid #eceeeb;
  padding: 12px 14px;
  vertical-align: top;
  text-align: left;
  background: #fff;
}

.cms-action-col,
.cms-action-cell {
  width: 44px;
  min-width: 44px;
  padding-left: 10px;
  padding-right: 10px;
  text-align: center;
}

.cms-table th:last-child,
.cms-table td:last-child {
  border-right: 0;
}

.cms-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  color: #666964;
  background: #fff;
}

.cms-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  white-space: nowrap;
}

.cms-action-menu {
  position: relative;
  display: inline-block;
}

.cms-action-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #70756e;
  cursor: pointer;
}

.cms-action-trigger:hover,
.cms-action-menu.open .cms-action-trigger {
  color: #1c1f1c;
}

.cms-action-dots {
  font-size: 18px;
  line-height: 1;
}

.cms-action-delete-label {
  color: #1f2320;
  font-size: 14px;
}

.cms-status-cell {
  position: relative;
}

.cms-status-menu {
  position: relative;
  display: inline-block;
}

.cms-status-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.cms-status-trigger:hover .cms-status,
.cms-status-menu.open .cms-status-trigger .cms-status {
  color: #1c1f1c;
}

.cms-status-popover {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 188px;
  padding: 8px 0;
  border: 1px solid #e4e7e2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 44px rgba(22, 28, 22, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 8;
}

.cms-status-menu.open .cms-status-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cms-action-menu.open .cms-status-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cms-status-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border: 0;
  background: transparent;
  color: #1f2320;
  cursor: pointer;
  text-align: left;
}

.cms-status-option:hover {
  background: #f7f8f5;
}

.cms-status-option.current {
  font-weight: 700;
}

.cms-status-check {
  color: #1f2320;
  font-size: 14px;
  line-height: 1;
}

.cms-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
}

.cms-status.published i {
  background: #55d17a;
}

.cms-status.draft i {
  background: #cfcfcf;
}

.cms-title-cell {
  display: block;
  min-width: 280px; /* 横幅を広げました */
}

.cms-title-cell strong {
  font-size: 15px;
  line-height: 1.45;
  word-break: break-all; /* 長いタイトルでも折り返して表示 */
}

.cms-slug-cell {
  font-size: 13px;
  color: #767975;
}

.cms-thumb {
  width: 112px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.cms-tag-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
  max-width: 180px;
  padding-bottom: 2px;
}

.cms-tag-editor {
  position: relative;
}

.cms-tag-trigger {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.cms-tag-trigger:focus-visible,
.cms-status-trigger:focus-visible,
.cms-action-trigger:focus-visible,
.cms-tag-option:focus-visible,
.cms-status-option:focus-visible {
  outline: 2px solid #2d6cff;
  outline-offset: 2px;
}

.cms-tag-popover {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  max-height: calc(100vh - 32px);
  padding: 14px;
  border: 1px solid #e4e7e2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 44px rgba(22, 28, 22, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 8;
}

.cms-tag-editor.open .cms-tag-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cms-tag-popover-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.cms-tag-popover-head strong {
  font-size: 14px;
  color: #171a17;
}

.cms-tag-popover-head span {
  font-size: 11px;
  color: #7b8079;
}

.cms-tag-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e5e7e4;
  border-radius: 12px;
  background: #fafbf9;
  color: #747972;
}

.cms-tag-search-field svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.cms-tag-search-field input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #1b201b;
  font: inherit;
}

.cms-tag-search-field input:focus {
  outline: 0;
}

.cms-tag-option-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 260px;
  margin-top: 12px;
  overflow-y: auto;
}

.cms-tag-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #1f2320;
  cursor: pointer;
  text-align: left;
}

.cms-tag-option:hover {
  background: #f7f8f5;
}

.cms-tag-option:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.cms-tag-option.selected {
  background: #f2f8f2;
}

.cms-tag-option-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #55d17a;
  flex: none;
}

.cms-tag-option-label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
}

.cms-tag-option-check {
  font-size: 14px;
  line-height: 1;
}

.cms-tag-empty {
  margin: 0;
  padding: 12px 4px;
  color: #7b8079;
  font-size: 13px;
}

.cms-tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f7f2;
  color: #2b6d3b;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  flex: none;
}

.cms-description-cell {
  min-width: 240px;
  max-width: 320px;
  color: #5f645d;
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 2px 4px; /* 入力時と合わせる */
}

.cms-inline-editor.open {
  z-index: 10;
  background: #fff;
  outline: 2px solid var(--accent); /* セル選択時の緑枠 */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.cms-inline-trigger {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.cms-inline-trigger:hover {
  background: rgba(45, 140, 61, 0.04);
}

.cms-inline-value {
  min-width: 160px;
  color: #30352f;
  font-size: 13px;
  line-height: 1.5;
  min-height: 24px;
  padding: 2px 4px;
}

.cms-inline-edit {
  display: none;
  width: 100%;
}

.cms-inline-editor.open .cms-inline-trigger {
  display: none;
}

.cms-inline-editor.open .cms-inline-edit {
  display: block;
}

.cms-inline-input,
.cms-inline-textarea {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 2px 4px;
  margin: 0;
  font: inherit;
  color: inherit;
  line-height: inherit;
  display: block;
  outline: none;
}

.cms-inline-input {
  height: 1.5em; /* 1行に固定 */
}

.cms-inline-textarea {
  min-height: 1.6em; /* 1行から開始 */
  field-sizing: content; /* テキスト量に合わせて自動で伸びる（最新ブラウザ対応） */
  resize: none;
}

.cms-empty {
  text-align: center;
  color: #7a7c77;
  padding: 40px 20px;
}

.cms-modal[hidden] {
  display: none;
}

.cms-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.cms-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 25, 22, 0.42);
}

.cms-modal-panel {
  position: relative;
  width: min(100%, 920px);
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(15, 18, 15, 0.18);
}

.cms-modal-head {
  padding: 24px 24px 18px;
  border-bottom: 1px solid #eceeeb;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.cms-modal-head h2 {
  font-size: 20px;
  font-weight: 700;
}

.cms-modal-head p {
  margin-top: 6px;
  font-size: 13px;
  color: #787b76;
}

.cms-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f3f3f1;
  color: #444842;
  cursor: pointer;
  font-size: 24px;
}

.cms-form {
  padding: 24px;
  display: grid;
  gap: 20px;
}

.cms-form-autofill {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e5e7e4;
  border-radius: 18px;
  background: linear-gradient(180deg, #fafcf8 0%, #f5f7f3 100%);
}

.cms-form-autofill-copy {
  display: grid;
  gap: 6px;
}

.cms-form-autofill-copy strong {
  font-size: 15px;
  color: #171a17;
}

.cms-form-autofill-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #6b706a;
}

.cms-form-autofill-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.cms-form-autofill-status {
  margin: 0;
  font-size: 13px;
  color: #70756e;
}

.cms-form-autofill-status[data-tone="success"] {
  color: #2b6d3b;
}

.cms-form-autofill-status[data-tone="error"] {
  color: #c23d3d;
}

.cms-form-autofill-status[data-tone="loading"] {
  color: #3467d6;
}

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

.cms-form label,
.cms-form-wide {
  display: grid;
  gap: 8px;
}

.cms-form span,
.cms-form-wide span {
  font-size: 13px;
  font-weight: 700;
  color: #565954;
}

.cms-form input,
.cms-form select,
.cms-form textarea {
  width: 100%;
  border: 1px solid #d9dcd8;
  border-radius: 12px;
  background: #fff;
  padding: 11px 12px;
  font-size: 14px;
  font-family: inherit;
}

.cms-form select[multiple] {
  min-height: 112px;
  padding: 8px;
}

.cms-form textarea {
  resize: vertical;
}

.cms-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 980px) {
  .cms-shell {
    grid-template-columns: 1fr;
  }

  .cms-sidebar {
    display: none;
  }

  .cms-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .cms-actions {
    flex-wrap: wrap;
  }

  .cms-search {
    min-width: 0;
    width: 100%;
  }

  .cms-form-autofill-controls {
    grid-template-columns: 1fr;
  }

  .cms-form-grid {
    grid-template-columns: 1fr;
  }
}
