:root {
  --orange: #e95a00;
  --orange-soft: #fff1df;
  --blue: #55b7df;
  --green: #0b7f00;
  --ink: #262626;
  --muted: #767676;
  --line: #e6e6e6;
  --dark: #1f1f1f;
  --shadow: 0 16px 42px rgba(35, 35, 35, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  letter-spacing: 0;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

img,
video {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 12px clamp(18px, 5vw, 48px);
  background: #fff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand img {
  display: block;
  width: min(260px, 46vw);
  height: auto;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.global-nav a,
.global-nav button {
  color: var(--ink);
  background: transparent;
  border: 0;
  text-decoration: none;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  transition: opacity 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

a:hover,
button:hover {
  opacity: 0.72;
}

.global-nav .admin-link,
.global-nav .instagram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  color: #fff !important;
  background: var(--orange);
  border-radius: 7px;
}

.global-nav .instagram-link {
  background: #e1306c;
}

.dropdown {
  position: relative;
}

.dropdown > button {
  padding: 12px 16px;
  color: #fff;
  background: var(--green);
  border-radius: 7px;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 220px;
  margin-top: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: 0.18s ease;
}

.dropdown-menu::before {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 10px;
  content: "";
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-menu a {
  display: block;
  padding: 12px;
  color: var(--ink);
  border-radius: 6px;
}

.dropdown-menu a:hover {
  color: var(--orange);
  background: var(--orange-soft);
}

.nav-toggle {
  position: relative;
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 0;
}

.nav-toggle span {
  position: absolute;
  right: 10px;
  left: 10px;
  display: block;
  height: 3px;
  background: var(--orange);
  transition: top 0.2s ease, transform 0.2s ease, opacity 0.15s ease;
}

.nav-toggle span:nth-child(1) {
  top: 13px;
}

.nav-toggle span:nth-child(2) {
  top: 21px;
}

.nav-toggle span:nth-child(3) {
  top: 29px;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  width: 100%;
  height: 100%;
  padding: 0;
  visibility: hidden;
  background: rgba(0, 0, 0, 0.58);
  border: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.hero-image {
  background: #fdf1df;
}

.hero-image picture,
.hero-image img {
  display: block;
  width: 100%;
}

.hero-image img {
  height: auto;
}

.section-block {
  padding: 92px clamp(18px, 5vw, 70px);
}

.section-rule {
  width: 86px;
  height: 2px;
  margin: 0 auto 30px;
  background: var(--orange);
}

.section-head {
  max-width: 920px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-head h2 {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: clamp(25px, 3vw, 38px);
}

.section-head p,
.hint,
.form-message {
  color: var(--muted);
}

.carousel-wrap {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.highlight-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 250px);
  gap: 28px;
  overflow-x: auto;
  padding: 10px 4px 28px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.post-grid.horizontal {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 28px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 4px 28px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.post-page {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  align-content: start;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.highlight-track::-webkit-scrollbar,
.post-grid.horizontal::-webkit-scrollbar {
  display: none;
}

.highlight-card,
.post-card {
  position: relative;
  min-height: 330px;
  padding: 0;
  overflow: hidden;
  background: #f2f2f2;
  border: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.highlight-card {
  scroll-snap-align: start;
}

.post-card {
  aspect-ratio: 1 / 1;
  min-height: 0;
}

.pin-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 30px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.24));
  pointer-events: none;
}

.media-tile {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.placeholder-card {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: 22px;
  background:
    linear-gradient(rgba(255,255,255,0.78), rgba(255,255,255,0.78)),
    repeating-linear-gradient(135deg, #e7e7e7 0 12px, #fafafa 12px 24px);
}

.placeholder-inner {
  display: grid;
  align-content: center;
  gap: 18px;
  width: 100%;
  height: 100%;
  text-align: center;
  background: rgba(255, 255, 255, 0.62);
  border: 12px solid var(--blue);
}

.placeholder-inner strong {
  margin: -12px -12px 10px;
  padding: 12px;
  color: #fff;
  background: var(--blue);
}

.placeholder-inner span {
  padding: 0 18px;
  font-size: 18px;
  line-height: 1.45;
}

.placeholder-icon {
  color: #006dae;
  font-size: 42px;
}

.card-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 42px 16px 16px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  text-align: left;
}

.card-overlay strong {
  display: block;
  font-size: 16px;
}

.card-overlay span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.circle-button,
.slide-button {
  position: absolute;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--orange);
  background: #fff;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.2);
  font-size: 38px;
  line-height: 1;
}

.circle-button {
  top: 50%;
}

.circle-button:first-child {
  left: -22px;
}

.circle-button:last-child {
  right: -22px;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 960px;
  margin: 0 auto 34px;
  background: #e9e9e9;
}

.category-tabs button {
  min-height: 48px;
  border: 1px solid #fff;
  background: transparent;
  font-weight: 800;
}

.category-tabs button.active {
  color: #fff;
  background: var(--orange);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.modal-card {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 0.8fr);
  gap: 34px;
  width: min(1080px, calc(100% - 40px));
  max-height: min(760px, calc(100% - 40px));
  padding: clamp(20px, 3vw, 44px);
  overflow-y: auto;
  background: #fff;
  border-radius: 34px;
  transform: translate(-50%, -50%);
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #f1f1f1;
  font-size: 24px;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.modal-slider {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
}

.modal-media {
  display: grid;
  place-items: center;
  min-height: 360px;
  background: #f4f4f4;
}

.modal-media img,
.modal-media video,
.modal-media-item {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.slide-button {
  top: 50%;
  transform: translateY(-50%);
}

.slide-button.prev {
  left: 12px;
}

.slide-button.next {
  right: 12px;
}

.modal-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 14px;
}

.modal-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d2d2d2;
}

.modal-dots button.active {
  background: var(--orange);
}

.modal-copy {
  padding: 24px 8px 24px 32px;
  border-left: 1px solid var(--line);
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.modal-copy h2 {
  margin: 10px 0;
  font-size: clamp(26px, 3vw, 30px);
}

.modal-date {
  color: var(--muted);
  font-weight: 800;
}

#modal-text {
  white-space: pre-wrap;
  line-height: 1.9;
}

.admin-page {
  background: #f5f5f5;
}

.admin-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 80px;
}

.login-panel {
  display: grid;
  min-height: calc(100vh - 170px);
  place-items: center;
}

.admin-card {
  padding: clamp(20px, 3vw, 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.admin-card h1,
.editor-head h1,
.admin-card h2 {
  margin: 0 0 14px;
}

.login-form,
.post-form,
.link-editor {
  display: grid;
  gap: 16px;
}

.login-form label,
.update-password,
.post-form label,
.link-editor label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 12px 13px;
  background: var(--orange-soft);
  border: 1px solid #ffd2aa;
  border-radius: 7px;
}

.check-row input {
  width: 20px !important;
  height: 20px;
}

.login-form input,
.update-password input,
.post-form input,
.post-form select,
.post-form textarea,
.link-editor input,
.inline-form input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #d9d9d9;
  border-radius: 7px;
  background: #fff;
}

.login-form button,
.admin-actions button,
.file-import,
.form-buttons button,
.inline-form button,
.link-editor button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 10px 16px;
  color: #fff;
  background: var(--orange);
  border: 0;
  border-radius: 7px;
  font-weight: 800;
}

.file-import input {
  display: none;
}

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

.admin-tools {
  display: grid;
  gap: 12px;
  min-width: min(430px, 100%);
}

.update-password {
  color: var(--ink);
}

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

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: 20px;
}

.slot-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.slot-tabs button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f6f6f6;
  font-weight: 800;
}

.slot-tabs button.active {
  color: #fff;
  background: var(--orange);
}

.new-slot-button {
  width: 100%;
  min-height: 44px;
  margin: 0 0 14px;
  color: #fff;
  background: var(--green);
  border: 0;
  border-radius: 7px;
  font-weight: 800;
}

.slot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.slot-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 9px;
  text-align: left;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.slot-item strong {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: #9a9a9a;
  border-radius: 50%;
}

.slot-item span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-item.filled strong {
  background: var(--orange);
}

.slot-item.unpublished {
  background: #eeeeee;
  color: #727272;
}

.slot-item.unpublished strong {
  background: #777;
}

.slot-item.active {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(233, 90, 0, 0.16);
}

.media-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
}

.media-preview img,
.media-preview video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 7px;
}

.form-buttons,
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.secondary {
  background: #555 !important;
}

.danger {
  background: #747474 !important;
}

.category-manager {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.category-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.category-row span {
  font-weight: 800;
}

.category-row button {
  min-height: 36px;
  padding: 8px 12px;
  color: #fff;
  background: #666;
  border: 0;
  border-radius: 6px;
}

@media (max-width: 900px) {
  html.nav-open,
  body.nav-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.nav-open {
    position: fixed;
    right: 0;
    left: 0;
    width: 100%;
    touch-action: none;
  }

  body.nav-open .site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
  }

  body.nav-open .nav-backdrop {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open .nav-backdrop:hover {
    opacity: 1;
  }

  .site-header {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .global-nav:not(.admin-nav) {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    padding: 16px 20px 22px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .global-nav.open {
    display: grid !important;
  }

  .dropdown-menu {
    position: static;
    display: none;
    margin-top: 8px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    box-shadow: none;
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu {
    transform: none;
  }

  .section-block {
    padding: 74px 12px;
    scroll-margin-top: 64px;
  }

  .section-rule {
    margin-bottom: 50px;
  }

  .highlight-track {
    grid-auto-columns: calc((100% - 14px) / 2);
    gap: 14px;
    padding-inline: 36px;
  }

  .post-grid.horizontal {
    grid-auto-columns: 100%;
    gap: 14px;
    padding-inline: 0;
  }

  .post-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .post-card .card-overlay strong {
    font-size: 14px;
    line-height: 1.35;
  }

  .highlight-card {
    min-height: 300px;
  }

  .circle-button:first-child {
    left: 10px;
  }

  .circle-button:last-child {
    right: 10px;
  }

  .category-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-inline: 12px;
  }

  .modal-card {
    grid-template-columns: 1fr;
    gap: 12px;
    border-radius: 22px;
  }

  .modal-copy {
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .editor-head {
    display: grid;
    align-items: start;
  }
}

@media (max-width: 560px) {
  .brand img {
    width: min(220px, 62vw);
  }

  .highlight-track {
    grid-auto-columns: calc((100% - 12px) / 2);
    gap: 12px;
  }

  .post-grid.horizontal {
    grid-auto-columns: 100%;
    gap: 12px;
  }

  .post-page {
    gap: 12px;
  }

  .placeholder-inner {
    border-width: 8px;
  }

  .placeholder-inner strong {
    margin: -8px -8px 6px;
    padding: 8px;
    font-size: 11px;
  }

  .placeholder-inner span {
    padding: 0 8px;
    font-size: 13px;
  }

  .admin-main {
    width: min(100% - 20px, 1180px);
    padding-top: 24px;
  }

  .slot-tabs {
    grid-template-columns: 1fr;
  }
}
