:root {
  --luma-aqua: #5ee7f7;
  --luma-aqua-strong: #19bfd8;
  --luma-ice: #e7fbff;
  --luma-sky: #b9f3fb;
  --luma-ink: #102d42;
  --luma-deep: #08283b;
  --luma-panel: #103d57;
  --luma-line: #9adbe5;
  --luma-paper: #ffffff;
  --luma-mist: #f7fbfc;
  --luma-shadow: rgba(22, 74, 94, 0.09);
  --luma-menu-width: 272px;
}

body.luma-shell-active {
  color: var(--luma-ink);
  background-color: var(--luma-mist);
}

body.luma-shell-active,
body.luma-shell-active button,
body.luma-shell-active input {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

body.luma-shell-active * {
  box-sizing: border-box;
}

.luma-guide-menu {
  position: fixed;
  z-index: 9998;
  inset: 0 auto 0 0;
  width: var(--luma-menu-width);
  height: 100dvh;
  overflow: hidden;
  color: var(--luma-ink);
  background: linear-gradient(180deg, #f7fdfe 0%, #e9f8fa 62%, #def3f6 100%);
  border-right: 3px solid #68d7e4;
  box-shadow: 8px 0 24px rgba(22, 74, 94, 0.14);
}

.admin-bar .luma-guide-menu {
  top: 32px;
  height: calc(100dvh - 32px);
}

.luma-menu-sky {
  display: grid;
  grid-template-columns: 1fr 0.72fr 0.36fr;
  gap: 5px;
  height: 9px;
  background: #0c6e8a;
}

.luma-menu-sky span:nth-child(1) { background: var(--luma-aqua); }
.luma-menu-sky span:nth-child(2) { background: #31cde2; }
.luma-menu-sky span:nth-child(3) { background: #fff; }

.luma-menu-brand {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 11px;
  align-items: center;
  min-height: 82px;
  padding: 15px 14px;
  background: rgba(255, 255, 255, 0.56);
  border-bottom: 1px solid #c8e8ed;
}

.luma-menu-brand strong,
.luma-menu-brand small {
  display: block;
}

.luma-menu-brand strong {
  color: var(--luma-deep);
  font-size: 18px;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

.luma-menu-brand small {
  margin-top: 4px;
  color: #397b89;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.luma-brand-gem {
  width: 34px;
  height: 34px;
  background:
    linear-gradient(135deg, transparent 24%, #dcfcff 25% 42%, transparent 43%),
    linear-gradient(45deg, #19bfd8 0 45%, #7ef0fb 46% 73%, #c9fbff 74%);
  border: 3px solid #041b29;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.28);
  transform: rotate(45deg) scale(0.76);
}

.luma-drawer-close {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--luma-deep);
  font-size: 27px;
  line-height: 30px;
  background: #fff;
  border: 1px solid #a9d8df;
  border-radius: 0;
}

.luma-menu-scroll {
  height: calc(100% - 130px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 12px 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--luma-aqua-strong) #dff2f5;
}

.luma-menu-home,
.luma-menu-group > summary {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 8px 9px;
  color: var(--luma-ink) !important;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid transparent;
}

.luma-menu-home {
  margin-bottom: 9px;
  background: rgba(255, 255, 255, 0.78);
  border-color: #a9dfe6;
  box-shadow: 0 4px 12px rgba(22, 74, 94, 0.08);
}

.luma-menu-home strong,
.luma-menu-home small {
  display: block;
}

.luma-menu-home strong { font-size: 15px; font-weight: 800; }
.luma-menu-home small { margin-top: 3px; color: #3b7180; font-size: 11px; font-weight: 600; }

.luma-menu-group {
  margin: 0 0 7px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid #c8e7ec;
}

.luma-menu-group > summary {
  list-style: none;
  font-size: 15px;
  font-weight: 800;
}

.luma-menu-group > summary::-webkit-details-marker { display: none; }

.luma-menu-group[open] > summary {
  color: #0d6d82 !important;
  background: #dff7fa;
  border-bottom-color: #c8e7ec;
}

.luma-summary-caret {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.luma-menu-group[open] .luma-summary-caret { transform: rotate(225deg) translate(-1px, -1px); }

.luma-menu-group > ul {
  margin: 0 !important;
  padding: 6px 9px 10px 47px !important;
  list-style: none !important;
}

.luma-menu-group li { margin: 0 !important; padding: 0 !important; list-style: none !important; }

.luma-menu-group li a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 39px;
  padding: 8px 8px 8px 13px;
  color: #12384a !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none !important;
  border-left: 2px solid #a9dfe6;
}

.luma-menu-group li a::before {
  position: absolute;
  left: -3px;
  width: 4px;
  height: 4px;
  content: "";
  background: var(--luma-aqua);
}

.luma-menu-group li a small {
  min-width: 21px;
  padding: 1px 5px;
  color: var(--luma-deep);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  background: var(--luma-sky);
}

.luma-menu-group .sub-menu {
  margin: 0 0 4px 10px !important;
  padding: 2px 0 4px 10px !important;
  list-style: none !important;
  border-left: 2px solid #c6e8ed;
}

.luma-menu-group .sub-menu a {
  min-height: 36px;
  padding-left: 11px;
  color: #245366 !important;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.35);
  border-left: 0;
}

.luma-menu-group .sub-menu a::before { display: none; }
.luma-menu-group .menu-item-has-children > a { font-weight: 800; }

.luma-group-heading strong,
.luma-group-heading small {
  display: block;
}

.luma-group-heading strong {
  color: inherit;
  font-size: 15px;
  line-height: 1.35;
}

.luma-group-heading small {
  margin-top: 2px;
  color: #497885;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
}

.luma-custom-menu-icon {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.luma-expandable-category > details > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 10px;
  gap: 8px;
  align-items: center;
  min-height: 41px;
  padding: 8px 8px 8px 13px;
  color: #12384a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
  border-left: 2px solid #a9dfe6;
}

.luma-expandable-category > details > summary::-webkit-details-marker { display: none; }

.luma-expandable-category > details > summary small {
  min-width: 24px;
  padding: 2px 5px;
  color: #0c4a5e;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  background: #c8f0f5;
}

.luma-category-caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid #397b89;
  border-bottom: 2px solid #397b89;
  transform: rotate(45deg) translateY(-2px);
}

.luma-expandable-category > details[open] > summary {
  color: #075c71;
  background: #e2f7fa;
}

.luma-expandable-category > details[open] .luma-category-caret {
  transform: rotate(225deg) translate(-1px, -1px);
}

.luma-expandable-category > details > ul {
  margin: 2px 0 0 10px !important;
  padding: 3px 0 3px 10px !important;
  list-style: none !important;
  border-left: 2px solid #c6e8ed;
}

.luma-expandable-category > details > ul a {
  min-height: 35px;
  padding-left: 10px;
  color: #245366 !important;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.38);
  border-left: 0;
}

.luma-expandable-category > details > ul a::before { display: none; }

.luma-category-all {
  min-height: 33px !important;
  margin: 4px 0 7px 20px;
  color: #087087 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  border-left: 0 !important;
}

.luma-category-all::before { display: none; }

.luma-menu-home:hover,
.luma-menu-group > summary:hover,
.luma-menu-group li a:hover {
  color: #07394d !important;
  background-color: #d5f3f7;
}

.luma-pixel-icon {
  display: block;
  width: 38px;
  height: 38px;
  image-rendering: pixelated;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(2px 3px 0 rgba(1, 18, 28, 0.26));
}

.luma-icon-home {
  background-image: url('../img/icon-home.png');
}

.luma-icon-mob {
  background-image: url('../img/icon-mob.png');
}

.luma-icon-water {
  background-image: url('../img/icon-water.png');
}

.luma-icon-book {
  background-image: url('../img/icon-book.png');
}

.luma-menu-search {
  margin-top: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border-top: 3px solid var(--luma-aqua-strong);
}

.luma-menu-search p {
  margin: 0 0 8px;
  color: #397b89;
  font-size: 12px;
  font-weight: 800;
}

.luma-menu-search .search-box,
.luma-menu-search .search-form {
  display: flex;
  margin: 0;
}

.luma-menu-search input[type="search"],
.luma-menu-search input[type="text"] {
  min-width: 0;
  height: 37px;
  margin: 0;
  padding: 0 10px;
  color: var(--luma-ink);
  font-size: 12px;
  background: #fff;
  border: 0;
  border-radius: 0;
}

.luma-menu-search button,
.luma-menu-search input[type="submit"] {
  min-width: 39px;
  height: 37px;
  margin: 0;
  padding: 0 8px;
  color: var(--luma-deep);
  font-size: 11px;
  font-weight: 700;
  background: var(--luma-aqua);
  border: 0;
  border-radius: 0;
}

.luma-unofficial-note {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  margin: 0;
  padding: 9px 12px;
  color: #255866;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  background: #d9f0f3;
  border-top: 1px solid #c1e3e8;
}

.luma-drawer-toggle {
  display: none;
  position: fixed;
  z-index: 9996;
  top: 12px;
  left: 12px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  background: var(--luma-deep);
  border: 2px solid var(--luma-aqua);
  border-radius: 0;
  box-shadow: 4px 4px 0 rgba(8, 40, 59, 0.25);
}

.luma-toggle-pixels {
  width: 18px;
  height: 14px;
  background: linear-gradient(#5ee7f7 0 3px, transparent 3px 6px, #5ee7f7 6px 9px, transparent 9px 12px, #5ee7f7 12px);
}

.luma-drawer-overlay {
  position: fixed;
  z-index: 9997;
  inset: 0;
  background: rgba(5, 27, 40, 0.66);
  backdrop-filter: blur(2px);
}

.luma-drawer-overlay[hidden] { display: none; }

body.luma-shell-active a:focus-visible,
body.luma-shell-active button:focus-visible,
body.luma-shell-active summary:focus-visible,
body.luma-shell-active input:focus-visible {
  outline: 3px solid #ffdf61;
  outline-offset: 3px;
}

/* Cocoon shell */
@media (min-width: 1120px) {
  body.luma-shell-active { padding-left: var(--luma-menu-width); }

  body.luma-shell-active #container,
  body.luma-shell-active #header-container,
  body.luma-shell-active .footer {
    width: 100%;
    min-width: 0;
  }

  body.luma-shell-active #navi-in,
  body.luma-shell-active #content {
    width: min(calc(100% - 32px), 1180px);
    max-width: 1180px;
  }

  body.luma-shell-active #content {
    display: flex;
    align-items: flex-start;
    gap: 24px;
  }

  body.luma-shell-active #main {
    float: none;
    flex: 1 1 640px;
    min-width: 0;
    width: auto;
  }

  body.luma-shell-active #sidebar {
    float: none;
    flex: 0 0 286px;
    width: 286px;
  }
}

body.luma-shell-active .header-container {
  background: linear-gradient(110deg, #ffffff, #effcff 58%, #d9f8fc);
  border-bottom: 3px solid #69dce9;
}

body.luma-shell-active .site-name-text,
body.luma-shell-active .site-name-text a {
  color: var(--luma-deep) !important;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.54);
}

body.luma-shell-active .navi {
  color: #fff;
  background: var(--luma-deep);
  border-bottom: 3px solid var(--luma-aqua);
}

body.luma-shell-active .navi-in a { color: #fff; font-weight: 700; }
body.luma-shell-active .navi-in a:hover { background: var(--luma-panel); }

body.luma-shell-active #main,
body.luma-shell-active #sidebar > div,
body.luma-shell-active .sidebar > div {
  background: var(--luma-paper);
  border: 1px solid #dcecef;
  border-radius: 4px;
  box-shadow: 0 8px 24px var(--luma-shadow);
}

body.luma-shell-active #main { padding: clamp(20px, 3.2vw, 38px); }

body.luma-shell-active .entry-title {
  position: relative;
  padding-left: 19px;
  color: var(--luma-ink);
  font-weight: 800;
  line-height: 1.5;
}

body.luma-shell-active .entry-title::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  content: "";
  background: linear-gradient(var(--luma-aqua) 0 70%, var(--luma-aqua-strong) 70%);
  box-shadow: 4px 0 0 var(--luma-ice);
}

body.luma-shell-active .article h2,
body.luma-shell-active .widget h2 {
  position: relative;
  padding: 18px 18px 16px 52px;
  color: var(--luma-ink);
  background: linear-gradient(90deg, #ecfbfd, #ffffff);
  border: 0;
  border-left: 7px solid var(--luma-aqua-strong);
  border-bottom: 1px solid var(--luma-line);
  border-radius: 0;
}

body.luma-shell-active .article h2::before,
body.luma-shell-active .widget h2::before {
  position: absolute;
  top: 50%;
  left: 20px;
  width: 19px;
  height: 19px;
  content: "";
  background: linear-gradient(135deg, #bff9ff 0 44%, #21bdd3 45% 72%, #0e718c 73%);
  border: 2px solid #0a546a;
  box-shadow: 3px 3px 0 rgba(8, 40, 59, 0.18);
  transform: translateY(-50%) rotate(45deg);
}

body.luma-shell-active .article h3 {
  padding: 10px 14px;
  color: var(--luma-ink);
  border-left: 5px solid var(--luma-aqua);
  border-bottom: 2px dotted var(--luma-line);
}

body.luma-shell-active .toc {
  background: #fbfeff;
  border: 1px solid var(--luma-line);
  border-radius: 4px;
  box-shadow: none;
}

body.luma-shell-active .toc-title {
  color: var(--luma-ink);
  font-weight: 800;
}

body.luma-shell-active .entry-card-wrap,
body.luma-shell-active .related-entry-card-wrap {
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid #dcecef;
  border-left: 4px solid var(--luma-aqua);
  border-radius: 3px;
  box-shadow: 0 5px 16px rgba(22, 74, 94, 0.07);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

body.luma-shell-active .entry-card-wrap:hover,
body.luma-shell-active .related-entry-card-wrap:hover {
  transform: translate(-2px, -2px);
  box-shadow: 0 10px 22px rgba(25, 191, 216, 0.13);
}

body.luma-shell-active .cat-label,
body.luma-shell-active .tag-label {
  color: var(--luma-deep);
  background: var(--luma-aqua);
  border-radius: 0;
}

body.luma-shell-active .pagination-next-link,
body.luma-shell-active .page-numbers,
body.luma-shell-active .btn,
body.luma-shell-active .wp-block-button__link {
  color: var(--luma-deep);
  font-weight: 700;
  background: var(--luma-aqua);
  border: 2px solid var(--luma-deep);
  border-radius: 0;
  box-shadow: 3px 3px 0 rgba(8, 40, 59, 0.2);
}

/* Navigation and future ad units stay visually distinct. */
body.luma-shell-active .ad-area,
body.luma-shell-active .adsbygoogle,
body.luma-shell-active [id^="google_ads"] {
  clear: both;
  margin-block: 28px;
}

@media (max-width: 1119px) {
  .luma-guide-menu {
    transform: translateX(calc(-100% - 12px));
    transition: transform 0.22s ease;
  }

  .luma-guide-menu.is-open { transform: translateX(0); }
  .luma-drawer-toggle { display: inline-flex; }
  .luma-drawer-close { display: block; }
  body.luma-drawer-open { overflow: hidden; }

  body.luma-shell-active .header-container-in {
    padding-left: 112px;
  }
}

@media (max-width: 782px) {
  .admin-bar .luma-guide-menu {
    top: 46px;
    height: calc(100dvh - 46px);
  }
  .admin-bar .luma-drawer-toggle { top: 58px; }
}

@media (max-width: 834px) {
  body.luma-shell-active #content { width: min(calc(100% - 24px), 760px); }
  body.luma-shell-active #main { padding: 22px 16px; }
  body.luma-shell-active .article h2 { padding: 15px 12px 13px 43px; }
  body.luma-shell-active .article h2::before { left: 15px; width: 16px; height: 16px; }
}

@media (max-width: 420px) {
  .luma-guide-menu { width: min(88vw, 326px); }
  .luma-drawer-toggle { left: 8px; top: 8px; }
  body.luma-shell-active .header-container-in { padding-left: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  .luma-guide-menu,
  body.luma-shell-active .entry-card-wrap,
  body.luma-shell-active .related-entry-card-wrap {
    transition: none;
  }
}
