/*
Theme Name: Lulune Manual
Theme URI: https://manual.lulune-yomogi.com
Author: Lulune
Description: Private operation manual theme for Lulune S2 App.
Version: 1.0.0
Text Domain: lulune-manual
*/

:root {
  --blue: #3d8b62;
  --blue-dark: #2d6b4a;
  --text: #2b2b2b;
  --muted: #746f68;
  --line: #e2ded5;
  --bg: #faf9f7;
  --paper: #ffffff;
  --soft: #e8f5ee;
  --danger: #c0392b;
  --warning: #b7791f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Yu Gothic UI", sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

a {
  color: var(--blue-dark);
  text-underline-offset: 0.18em;
}

code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #edf2f7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.site-header {
  background: var(--blue);
  color: #fff;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 18px;
}

.site-logo {
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: #fff;
  text-decoration: none;
}

.site-logo strong {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.site-logo span {
  font-size: 13px;
  font-weight: 700;
}

.user-nav {
  display: flex;
  gap: 8px;
}

.user-nav a {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  font-size: 12px;
  text-decoration: none;
}

.site-nav {
  display: flex;
  justify-content: center;
  overflow-x: auto;
  background: var(--blue-dark);
}

.site-nav a {
  flex: 0 0 auto;
  min-width: 104px;
  padding: 11px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.is-current {
  background: rgba(255, 255, 255, 0.18);
}

.site-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 18px 48px;
}

.home-hero {
  width: 100vw;
  margin: 0 calc(50% - 50vw) 0;
  padding: 86px 18px 58px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: center;
}

.home-eyebrow {
  margin: 0 0 18px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.home-hero h1 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  font-weight: 800;
}

.home-hero p:not(.home-eyebrow) {
  max-width: 660px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 13px;
}

.manual-search {
  display: flex;
  max-width: 520px;
  margin: 22px auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}

.manual-search input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 18px;
  border: 0;
  font-size: 14px;
  outline: 0;
}

.manual-search button {
  width: 86px;
  border: 0;
  background: #233fab;
  color: #fff;
  font-weight: 700;
}

.manual-home {
  padding-top: 34px;
}

.home-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin: 0 0 34px;
}

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

.home-panel h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 20px;
  text-align: center;
}

.notice-feed,
.popular-feed {
  display: grid;
  gap: 0;
}

.notice-feed a,
.popular-feed a {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #eef1f5;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
}

.notice-feed a:last-child,
.popular-feed a:last-child {
  border-bottom: 0;
}

.notice-feed time,
.popular-feed small {
  color: var(--muted);
  font-size: 12px;
}

.popular-feed a {
  grid-template-columns: minmax(0, 1fr) auto;
}

.home-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 760px;
  margin: 16px auto 0;
}

.quick-links a {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.section-title {
  margin: 0 0 18px;
  text-align: center;
  font-size: 22px;
}

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

.helpdesk-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.helpdesk-card header {
  display: flex;
  gap: 12px;
  padding: 18px 18px 12px;
}

.helpdesk-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #233fab;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.helpdesk-card h3 {
  margin: 1px 0 4px;
  font-size: 17px;
}

.helpdesk-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.helpdesk-card ul {
  flex: 1;
  margin: 0;
  padding: 4px 18px 16px 64px;
  list-style: none;
}

.helpdesk-card li {
  margin: 7px 0;
}

.helpdesk-card li a {
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
}

.helpdesk-card li a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.helpdesk-card__more {
  display: block;
  margin-top: auto;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.helpdesk-card__more:hover {
  background: #f6f8fb;
}

.category-article-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.category-article-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.category-article-link:hover,
.category-article-link:focus-visible {
  border-color: rgba(36, 71, 184, 0.42);
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.08);
  outline: 0;
  transform: translateY(-1px);
}

.category-article-link__body,
.category-article-link__body strong,
.category-article-link__body span {
  display: block;
}

.category-article-link__body strong {
  color: #111827;
  font-size: 16px;
  line-height: 1.45;
}

.category-article-link__body span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.category-article-link__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.category-article-link__action::after {
  content: ">";
  margin-left: 8px;
}

.category-article-link:hover .category-article-link__action,
.category-article-link:focus-visible .category-article-link__action {
  background: var(--blue);
  color: #fff;
}

.flow-map {
  display: grid;
  gap: 10px;
  margin: 18px 0 24px;
}

.flow-step {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.flow-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.flow-step strong,
.flow-step small {
  display: block;
}

.flow-step small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.flow-lanes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 24px;
}

.flow-lane {
  border: 1px solid var(--line);
  background: #fff;
}

.flow-lane h3 {
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
  color: var(--blue-dark);
  font-size: 15px;
}

.flow-lane ol {
  margin: 0;
  padding: 12px 12px 12px 2em;
}

.manual-flow-diagram {
  margin: 24px 0 32px;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(31, 41, 55, 0.05);
  overflow: hidden;
}

.manual-flow-diagram__title {
  margin: 0;
  padding: 13px 18px;
  border-bottom: 1px solid #e5ebf2;
  background: #f7f9fc;
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

.ops-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  padding: 18px;
  counter-reset: flow-step;
}

.ops-flow__step {
  position: relative;
  min-height: 210px;
  padding: 14px 14px 13px;
  border: 1px solid #dce4ee;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.04);
  counter-increment: flow-step;
}

.ops-flow__step::before {
  content: counter(flow-step, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.ops-flow__step::after {
  content: "";
  position: absolute;
  top: 31px;
  right: -15px;
  width: 14px;
  height: 1px;
  background: #aab6c5;
}

.ops-flow__step:last-child::after {
  display: none;
}

.ops-flow__step h3 {
  margin: 0 0 5px;
  color: #111827;
  font-size: 15px;
  line-height: 1.45;
}

.ops-flow__step p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.ops-flow__step ul {
  margin: 0;
  padding-left: 1.25em;
}

.ops-flow__step li {
  margin: 0 0 5px;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
}

.ops-flow__step li::marker {
  color: var(--blue);
}

.ops-flow__step.is-teal::before {
  background: #0f766e;
}

.ops-flow__step.is-orange::before {
  background: #d97706;
}

.ops-flow__step.is-green::before {
  background: #16a34a;
}

.ops-flow__step.is-pink::before {
  background: #dc4662;
}

.process-map {
  position: relative;
  max-height: 560px;
  padding: 18px;
  background:
    radial-gradient(circle at 20px 20px, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    #090b10;
  background-size: 24px 24px;
  cursor: grab;
  overflow: auto;
  overscroll-behavior: contain;
  user-select: none;
}

.process-map.is-dragging {
  cursor: grabbing;
}

.process-map__legend {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  pointer-events: none;
}

.process-map__legend span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d0d7e2;
  font-size: 11px;
  font-weight: 800;
}

.process-map__grid {
  display: grid;
  grid-template-columns: 108px repeat(5, 178px);
  grid-auto-rows: minmax(116px, auto);
  gap: 22px 28px;
  align-items: stretch;
  width: max-content;
  min-width: 1080px;
  padding: 8px 28px 28px 6px;
}

.process-map__lane {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: #dce5f2;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.process-map__node {
  position: relative;
  padding: 13px 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 9px;
  background: #b9ea62;
  color: #172033;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.34), 0 14px 24px rgba(0, 0, 0, 0.2);
}

.process-map__node::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -30px;
  width: 28px;
  height: 2px;
  background: #4a4f5b;
}

.process-map__node::before {
  content: "";
  position: absolute;
  top: calc(50% - 5px);
  right: -33px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid #4a4f5b;
}

.process-map__node.no-arrow::after,
.process-map__node.no-arrow::before,
.process-map__node.ends-row::after,
.process-map__node.ends-row::before {
  display: none;
}

.process-map__node small {
  display: block;
  margin-bottom: 4px;
  color: rgba(23, 32, 51, 0.7);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.process-map__node strong {
  display: block;
  color: #162036;
  font-size: 13px;
  line-height: 1.4;
}

.process-map__node span {
  display: block;
  margin-top: 5px;
  color: rgba(23, 32, 51, 0.78);
  font-size: 11px;
  line-height: 1.5;
}

.process-map__node ul {
  margin: 7px 0 0;
  padding-left: 1.2em;
}

.process-map__node li {
  margin: 0 0 3px;
  color: #172033;
  font-size: 11px;
  line-height: 1.45;
}

.process-map__node.is-app {
  background: #8facff;
}

.process-map__node.is-check {
  background: #b9ea62;
}

.process-map__node.is-pay {
  background: #ffd45f;
}

.process-map__node.is-lock {
  background: #92e6b4;
}

.process-map__node.is-alert {
  background: #ff8096;
}

.process-map__decision {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 142px;
  padding: 26px 24px;
  border-color: rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  background: #ffb6bc;
  text-align: center;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.process-map__decision strong::before {
  content: "";
}

.process-map__branch {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-top: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.13);
  color: #172033;
  font-size: 10px;
  font-weight: 900;
}

.process-map__note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #d0d7e2;
  font-size: 12px;
  line-height: 1.65;
}


.flow-svg-map {
  position: relative;
  height: min(88vh, 880px);
  min-height: 600px;
  border: 1px solid #d0d7e3;
  border-radius: 12px;
  background-color: #f3f6fb;
  background-image:
    radial-gradient(circle, #c8d2e0 1px, transparent 1px);
  background-size: 28px 28px;
  cursor: grab;
  overflow: hidden;
  overscroll-behavior: contain;
  user-select: none;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.06);
}

.flow-svg-map.is-dragging {
  cursor: grabbing;
}

.flow-svg-map__hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  border: 1px solid #c8d2e0;
  color: #6b7a92;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  pointer-events: none;
  backdrop-filter: blur(4px);
  transition: opacity .3s;
}
.flow-svg-map:hover .flow-svg-map__hint {
  opacity: 0;
}

.flow-zoom-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flow-zoom-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #c8d2e0;
  border-radius: 8px;
  background: rgba(255,255,255,.95);
  color: #374151;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background .15s, border-color .15s;
}
.flow-zoom-controls button:hover {
  background: #fff;
  border-color: #5b7be9;
  color: #5b7be9;
}

.flow-svg {
  display: block;
  width: 1640px;
  height: 1080px;
  max-width: none;
  transform-origin: 0 0;
}

.flow-svg .flow-title {
  fill: #0d1117;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.flow-svg .node-label {
  fill: #0d1117;
  font-size: 13.5px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.flow-svg .node-sub {
  fill: #5a6a7e;
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.flow-svg .lane-label {
  fill: #1e2a3a;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.flow-svg .edge-label {
  fill: #374151;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}

.flow-svg .lane-bg {
  fill: rgba(255,255,255,.55);
  stroke: #dce4ef;
  stroke-width: 1.5;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.04));
}

.flow-svg .edge {
  fill: none;
  stroke: #2d3b50;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-svg .edge-muted {
  stroke: #94a3b8;
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}

.flow-svg .node-process {
  fill: #ffffff;
  stroke: #2d3b50;
  stroke-width: 2;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.10));
}

.flow-svg .node-action {
  fill: #d9f99d;
  stroke: #3f6212;
  stroke-width: 2;
  filter: drop-shadow(0 2px 4px rgba(63,98,18,.18));
}

.flow-svg .node-external {
  fill: #fef3c7;
  stroke: #92400e;
  stroke-width: 2;
  filter: drop-shadow(0 2px 4px rgba(146,64,14,.16));
}

.flow-svg .node-system {
  fill: #e0e7ff;
  stroke: #3730a3;
  stroke-width: 2;
  filter: drop-shadow(0 2px 4px rgba(55,48,163,.14));
}

.flow-svg .node-alert {
  fill: #ffe4e6;
  stroke: #be123c;
  stroke-width: 2;
  filter: drop-shadow(0 2px 4px rgba(190,18,60,.14));
}

.flow-svg .node-end {
  fill: #dbeafe;
  stroke: #1d4ed8;
  stroke-width: 2;
  filter: drop-shadow(0 2px 4px rgba(29,78,216,.14));
}

.flow-svg .node-decision {
  fill: #f8fafc;
  stroke: #2d3b50;
  stroke-width: 2;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.10));
}

.flow-diagram-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0 0;
  padding: 14px 16px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #f8fafc;
}

.flow-diagram-legend__item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.flow-diagram-legend__dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid;
  flex-shrink: 0;
}
.flow-diagram-legend__dot.action   { background:#d9f99d; border-color:#3f6212; }
.flow-diagram-legend__dot.external { background:#fef3c7; border-color:#92400e; }
.flow-diagram-legend__dot.system   { background:#e0e7ff; border-color:#3730a3; }
.flow-diagram-legend__dot.alert    { background:#ffe4e6; border-color:#be123c; }
.flow-diagram-legend__dot.end      { background:#dbeafe; border-color:#1d4ed8; }
.flow-diagram-legend__dot.process  { background:#ffffff; border-color:#2d3b50; }

.manual-flow-lanes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 4px 0 18px;
}

.manual-flow-lane {
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.manual-flow-lane h3 {
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid #dce4ef;
  background: linear-gradient(135deg, #eef2ff 0%, #f0f9ff 100%);
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}

.manual-flow-lane ul {
  margin: 0;
  padding: 10px 14px;
  list-style: none;
}

.manual-flow-lane li {
  padding: 3px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px;
  color: #374151;
}

.notice-panel {
  margin: 34px 0 0;
  padding: 28px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.notice-panel h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.notice-list {
  display: grid;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

.notice-list a {
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
}

.notice-list a:hover {
  background: var(--soft);
}

.manual-section {
  margin: 0;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.search-page {
  max-width: 880px;
  margin: 32px auto 0;
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
}

.search-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.search-header h1 {
  margin: 0;
  font-size: 26px;
}

.manual-search--inline {
  margin-bottom: 0;
}

.search-results-list {
  display: grid;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.search-result-item {
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.search-result-item strong,
.search-result-item span {
  display: block;
}

.search-result-item span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.empty-search {
  padding: 28px 0;
  text-align: center;
}

.manual-section header {
  margin-bottom: 16px;
}

.manual-section h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 22px;
}

.manual-section p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.manual-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.manual-list__item {
  min-height: 128px;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  text-decoration: none;
}

.manual-list__item:hover {
  background: var(--soft);
}

.manual-list__item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.manual-list__item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.doc {
  max-width: 1040px;
  margin: 28px auto 0;
  padding: 34px 42px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.doc-header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.doc-category {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.doc h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.35;
}

.doc-lead {
  margin: 10px 0 0;
  color: var(--muted);
}

.doc-body {
  padding-top: 24px;
}

.doc-body h2 {
  margin: 32px 0 12px;
  color: var(--blue-dark);
  font-size: 22px;
}

.doc-body h2:first-child {
  margin-top: 0;
}

.doc-body h3 {
  margin: 22px 0 8px;
  font-size: 17px;
}

.doc-body p {
  margin: 0 0 14px;
}

.doc-body img,
.manual-home img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.doc-body figure,
.manual-home figure {
  margin: 22px 0;
}

.doc-body figcaption,
.manual-home figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.doc-body .wp-block-image,
.manual-home .wp-block-image {
  margin: 22px 0;
}

.doc-body ul,
.doc-body ol {
  margin: 0 0 18px;
  padding-left: 1.35em;
}

.doc-body li {
  margin: 5px 0;
}

.manual-note,
.manual-warning,
.manual-check,
.emergency-card {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--blue);
  background: var(--soft);
}

.manual-warning,
.emergency-card.danger {
  border-left-color: var(--danger);
  background: #fff1f1;
}

.manual-check {
  border-left-color: var(--warning);
  background: #fff8e8;
}

.manual-table {
  display: table;
  width: 100%;
  margin: 18px 0 24px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-collapse: collapse;
  font-size: 13px;
}

@media (max-width: 640px) {
  .manual-table {
    display: block;
    overflow-x: auto;
  }
}

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

.manual-table th {
  background: #eef6fa;
  color: var(--blue-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

.doc-pager a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.doc-pager span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.emergency-dashboard,
.emergency-section {
  margin: 0 0 26px;
}

.emergency-status {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--danger);
  background: #fff;
  color: #fff;
}

.emergency-status span {
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

.emergency-status strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 24px;
}

.emergency-status p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.emergency-primary-grid,
.diagnosis-list.compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.emergency-tile,
.diagnosis-list details,
.emergency-flow-list details,
.emergency-record {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.emergency-tile {
  min-height: 118px;
  padding: 18px;
  color: var(--text);
  text-decoration: none;
}

.emergency-tile.danger {
  background: #fff1f1;
}

.emergency-tile span,
.diagnosis-list summary span,
.emergency-flow-list summary span {
  display: inline-flex;
  margin-right: 8px;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
}

.emergency-tile strong {
  display: block;
  margin-top: 12px;
  font-size: 17px;
}

.emergency-tile small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.emergency-quickbar {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.emergency-quickbar a {
  padding: 7px 12px;
  background: var(--soft);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.diagnosis-list,
.emergency-flow-list {
  display: grid;
}

.emergency-flow-list {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.diagnosis-list summary,
.emergency-flow-list summary {
  cursor: pointer;
  padding: 14px 16px;
  list-style: none;
  font-weight: 800;
}

.diagnosis-list summary::-webkit-details-marker,
.emergency-flow-list summary::-webkit-details-marker {
  display: none;
}

.diagnosis-list ol,
.emergency-flow-list ol {
  margin: 0;
  padding: 0 16px 16px 2em;
}

.emergency-record p {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.emergency-record p:last-child {
  border-bottom: 0;
}

.site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px;
  color: var(--muted);
  font-size: 12px;
}

.login {
  background: var(--bg);
}

.login h1 a {
  width: 120px;
  height: 72px;
  background: var(--blue);
  color: #fff;
  text-indent: 0;
  font-size: 0;
}

.login h1 a::after {
  content: "LULUNE\A Manual";
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  white-space: pre;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

.login form {
  border: 1px solid var(--line);
  box-shadow: none;
}

.login .button-primary {
  border-color: var(--blue);
  background: var(--blue);
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .site-header__bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 11px 14px;
  }

  .site-logo strong {
    font-size: 18px;
  }

  .site-logo span {
    font-size: 12px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-nav a {
    min-width: auto;
    padding: 10px 12px;
    font-size: 11px;
  }

  .site-main {
    padding: 0 14px 38px;
  }

  .home-hero {
    margin: 0 calc(50% - 50vw) 24px;
    padding: 64px 14px 34px;
  }

  .home-hero h1 {
    width: auto;
    padding: 0;
    font-size: 21px;
  }

  .manual-search {
    margin-top: 20px;
    margin-bottom: 0;
  }

  .manual-search input {
    height: 42px;
    font-size: 13px;
  }

  .manual-search button {
    width: 86px;
    font-size: 12px;
  }

  .manual-home {
    padding-top: 14px;
  }

  .home-columns,
  .helpdesk-grid,
  .category-article-list,
  .manual-list,
  .emergency-primary-grid,
  .diagnosis-list.compact {
    grid-template-columns: 1fr;
  }

  .category-article-link,
  .flow-lanes {
    grid-template-columns: 1fr;
  }

  .category-article-link {
    gap: 12px;
  }

  .category-article-link__action {
    width: 100%;
  }

  .flow-step {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .manual-flow-diagram {
    margin-right: -14px;
    margin-left: -14px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .ops-flow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .ops-flow__step {
    min-height: auto;
  }

  .ops-flow__step::after {
    display: none;
  }

  .process-map {
    overflow-x: auto;
    padding: 12px;
  }

  .process-map__grid {
    min-width: 820px;
  }

  .process-map__node {
    padding: 10px;
  }

  .manual-flow-lanes {
    grid-template-columns: 1fr;
  }

  .helpdesk-card {
    min-height: auto;
  }

  .helpdesk-card header {
    padding: 16px 16px 10px;
  }

  .helpdesk-card ul {
    padding: 4px 16px 14px 58px;
  }

  .notice-panel {
    padding: 24px 0;
  }

  .manual-list__item {
    min-height: auto;
    padding: 17px;
  }

  .doc {
    margin-top: 18px;
    padding: 24px 18px;
    border: 0;
  }

  .doc h1 {
    font-size: 24px;
  }

  .doc-body h2 {
    font-size: 20px;
  }

  .doc-pager {
    grid-template-columns: 1fr;
  }

  .emergency-record p {
    grid-template-columns: 1fr;
  }
}

.mermaid-container {
  height: auto !important;
  max-height: none !important;
  min-height: 300px;
  overflow-x: hidden;
  overflow-y: visible;
  cursor: default;
  padding: 20px 16px;
  background: #f3f6fb;
  background-image: radial-gradient(circle, #c8d2e0 1px, transparent 1px);
  background-size: 28px 28px;
}
.mermaid-container svg {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  transform: none !important;
}
.mermaid-container pre.mermaid,
.mermaid-container .mermaid { display: block; }
.mermaid-container .flow-zoom-controls,
.mermaid-container .flow-svg-map__hint { display: none; }

.doc-breadcrumbs { font-size: 13px; color: #5b6b62; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.doc-breadcrumbs a { color: #2d6b4a; text-decoration: none; }
.doc-breadcrumbs a:hover { text-decoration: underline; }
.doc-breadcrumbs__sep { color: #9aa8a0; }
.doc-subpages { margin-top: 32px; padding-top: 20px; border-top: 1px solid #dfe8e2; }
.doc-body .doc-tree { list-style: none; margin: 0; padding: 0; }
.doc-body .doc-tree li { margin: 0; padding-left: 0; }
.doc-body .doc-tree li::before { content: none; }
.doc-body .doc-tree p.doc-tree__lead { margin: 4px 0 0; }
.doc-tree--depth-1 { display: grid; gap: 10px; }
.doc-body .doc-tree li.doc-tree__item { position: relative; display: grid; grid-template-columns: 36px 1fr 20px; gap: 14px; align-items: start; margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); transition: border-color .15s, box-shadow .15s; }
.doc-tree__item:hover { border-color: var(--blue); box-shadow: 0 4px 14px rgba(45, 107, 74, .08); }
.doc-tree__num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--blue-dark); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.doc-tree__body { min-width: 0; }
.doc-tree__title { display: block; color: var(--text); font-size: 16px; font-weight: 700; line-height: 1.5; text-decoration: none; }
.doc-tree__title::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.doc-tree__item:hover .doc-tree__title { color: var(--blue-dark); }
.doc-tree__lead { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.doc-tree__arrow { align-self: center; width: 9px; height: 9px; border-top: 2px solid #b9c4bd; border-right: 2px solid #b9c4bd; transform: rotate(45deg); transition: border-color .15s, transform .15s; }
.doc-tree__item:hover .doc-tree__arrow { border-color: var(--blue); transform: translateX(3px) rotate(45deg); }
.doc-body .doc-tree.doc-tree--depth-2 { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line); }
.doc-tree--depth-2 li { margin: 0; }
.doc-tree--depth-2 a { display: inline-flex; align-items: center; gap: 5px; padding: 2px 0; color: var(--blue-dark); font-size: 13px; text-decoration: none; }
.doc-tree--depth-2 a::before { content: ""; width: 5px; height: 5px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: .6; }
.doc-tree--depth-2 a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .doc-body .doc-tree li.doc-tree__item { grid-template-columns: 1fr 14px; gap: 10px; padding: 14px; }
  .doc-tree__num { display: none; }
}
.helpdesk-card h3 a { color: inherit; text-decoration: none; }
.helpdesk-card h3 a:hover { text-decoration: underline; }
.site-nav { overflow-x: auto; }

.manual-image { margin: 18px 0 24px; }
.manual-image img { display: block; max-width: 100%; height: auto; border: 1px solid #dfe8e2; border-radius: 8px; }
.manual-image figcaption { margin-top: 6px; font-size: 12px; color: #5b6b62; }
.manual-image-slot { margin: 18px 0 24px; padding: 20px 18px; border: 2px dashed #b9cfc1; border-radius: 10px; background: #f6faf7; text-align: center; }
.manual-image-slot__label { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: #2d6b4a; }
.manual-image-slot__caption { margin: 0; font-size: 14px; color: #1c3327; }
.manual-image-slot__controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.manual-image .manual-image-slot__controls { justify-content: flex-start; }
.manual-image-slot__form { margin: 0; }
.manual-image-slot__file { position: relative; display: inline-block; cursor: pointer; }
.manual-image-slot__file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.manual-image-slot__file span,
.manual-image-slot__remove { display: inline-block; padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 700; border: 1px solid #2d6b4a; }
.manual-image-slot__file span { background: #2d6b4a; color: #fff; }
.manual-image-slot__remove { background: #fff; color: #2d6b4a; cursor: pointer; }

.mg { position: fixed; right: 20px; bottom: 20px; z-index: 9000; font-size: 14px; line-height: 1.6; }
.mg-toggle { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 26px; background: var(--blue-dark); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(29, 70, 48, .28); transition: transform .15s, background .15s; }
.mg-toggle:hover { background: #245a3d; transform: translateY(-2px); }
.mg-toggle:focus-visible { outline: 3px solid #9fd0b3; outline-offset: 2px; }
.mg-toggle__icon { position: relative; width: 22px; height: 18px; border-radius: 8px; background: #fff; }
.mg-toggle__icon::after { content: ""; position: absolute; left: 4px; bottom: -5px; border: 5px solid transparent; border-top-color: #fff; border-left-color: #fff; }
.mg.is-open .mg-toggle__icon { width: 18px; height: 18px; background: none; }
.mg.is-open .mg-toggle__icon::before,
.mg.is-open .mg-toggle__icon::after { content: ""; position: absolute; left: 8px; top: 0; bottom: auto; width: 2px; height: 18px; border: 0; background: #fff; transform: rotate(45deg); }
.mg.is-open .mg-toggle__icon::after { transform: rotate(-45deg); }
.mg.is-open .mg-toggle__label::after { content: "を閉じる"; }

.mg-panel { position: absolute; right: 0; bottom: 64px; display: flex; flex-direction: column; width: 380px; height: min(620px, calc(100vh - 110px)); border: 1px solid var(--line); border-radius: 16px; background: var(--bg); box-shadow: 0 16px 48px rgba(0, 0, 0, .18); overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .18s, transform .18s, visibility 0s .18s; }
.mg.is-open .mg-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .18s; }

.mg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--blue-dark); color: #fff; }
.mg-head__title strong { display: block; font-size: 15px; }
.mg-head__title span { display: block; font-size: 12px; opacity: .8; }
.mg-close { position: relative; flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); cursor: pointer; }
.mg-close:hover { background: rgba(255, 255, 255, .26); }
.mg-close::before,
.mg-close::after { content: ""; position: absolute; left: 16px; top: 9px; width: 2px; height: 16px; background: #fff; transform: rotate(45deg); }
.mg-close::after { transform: rotate(-45deg); }

.mg-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; overscroll-behavior: contain; }
.mg-row { display: flex; gap: 8px; margin: 0 0 10px; }
.mg-row--user { justify-content: flex-end; }
.mg-avatar { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--blue-dark); font-size: 12px; font-weight: 800; }
.mg-bubble { max-width: 82%; padding: 9px 13px; border-radius: 14px; word-break: break-word; }
.mg-bubble--bot { background: var(--paper); border: 1px solid var(--line); border-top-left-radius: 4px; color: var(--text); }
.mg-bubble--user { background: var(--soft); color: var(--blue-dark); font-weight: 700; border-top-right-radius: 4px; }

.mg-options { display: grid; gap: 6px; margin: 4px 0 12px 36px; }
.mg-option { display: block; width: 100%; padding: 11px 36px 11px 14px; border: 1.5px solid #cfe3d6; border-radius: 10px; background: var(--paper); color: var(--blue-dark); font: inherit; font-weight: 700; text-align: left; cursor: pointer; position: relative; transition: border-color .12s, background .12s; }
.mg-option::after { content: ""; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; margin-top: -4px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); opacity: .55; }
.mg-option:hover,
.mg-option:focus-visible { border-color: var(--blue); background: #f3f9f5; outline: none; }

.mg-cards { display: grid; gap: 8px; margin: 4px 0 12px 36px; }
.mg-card { display: block; padding: 12px 14px; border: 1.5px solid var(--blue); border-radius: 12px; background: var(--paper); color: var(--text); text-decoration: none; transition: background .12s, box-shadow .12s; }
.mg-card:hover,
.mg-card:focus-visible { background: #f3f9f5; box-shadow: 0 3px 10px rgba(45, 107, 74, .12); outline: none; }
.mg-card > span { display: block; }
.mg-card__chapter { color: var(--muted); font-size: 11px; font-weight: 700; }
.mg-card__title { font-size: 15px; font-weight: 800; line-height: 1.45; }
.mg-card__section { margin-top: 3px; color: var(--blue-dark); font-size: 13px; font-weight: 700; }
.mg-card__note { margin-top: 2px; color: var(--muted); font-size: 12px; }
.mg-card__go { margin-top: 8px; color: var(--blue-dark); font-size: 13px; font-weight: 800; }
.mg-card__go::after { content: " ›"; }

.mg-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 12px; border-top: 1px solid var(--line); background: var(--paper); }
.mg-actions[hidden] { display: none; }
.mg-action { flex: 1 1 auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.mg-action:hover { border-color: var(--blue); color: var(--blue-dark); }

.doc-body h2, .doc-body h3 { scroll-margin-top: 90px; }
.mg-flash { animation: mg-flash 2.2s ease-out; border-radius: 6px; }
@keyframes mg-flash { 0%, 35% { background: #fff3c4; box-shadow: 0 0 0 6px #fff3c4; } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }

@media (max-width: 640px) {
  .mg { right: 12px; bottom: 12px; }
  .mg-toggle { height: 48px; padding: 0 16px 0 14px; font-size: 14px; }
  .mg-panel { position: fixed; inset: 0; width: auto; height: auto; border: 0; border-radius: 0; }
  .mg.is-open .mg-toggle { display: none; }
  .mg-options, .mg-cards { margin-left: 0; }
  .mg-option { padding-top: 13px; padding-bottom: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .mg-panel, .mg-toggle, .mg-flash { transition: none; animation: none; }
}

.doc-body img.cert-mark {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
  width: auto;
  height: 36px;
  max-width: none;
  vertical-align: middle;
  margin: 0 10px 0 0;
}
