/*
Theme Name: Lurena Manual
Theme URI: https://manual-s1app.lurena.jp
Author: Lurena
Description: Private operation manual theme for Lurena S1 App.
Version: 3.5.0
Text Domain: lurena-manual
*/

:root {
  --blue: #2447b8;
  --blue-dark: #1d3894;
  --text: #1f2933;
  --muted: #667085;
  --line: #dde5ec;
  --bg: #f6f8fa;
  --paper: #ffffff;
  --soft: #eef8fb;
  --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__alert {
  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 DIAGRAM — redesigned
   ============================================================ */

/* ── Wrapper & canvas ─────────────────────────────────────── */
.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;
}

/* hint badge */
.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;
}

/* zoom controls */
.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;
}

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

/* ── Typography ───────────────────────────────────────────── */
.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;
}

/* ── Lane backgrounds ─────────────────────────────────────── */
.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));
}

/* ── Edges ────────────────────────────────────────────────── */
.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;
}

/* ── Node shapes ──────────────────────────────────────────── */

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

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

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

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

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

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

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

/* ── Marker arrows (referenced in SVG defs) ───────────────── */
/* Defined inline in SVG; CSS adjusts via fill on the path */

/* ── Legend ───────────────────────────────────────────────── */
.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; }

/* ── Inline summary lanes ─────────────────────────────────── */
.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: block;
  width: 100%;
  margin: 18px 0 24px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-spacing: 0;
  border-collapse: separate;
  font-size: 13px;
}

.manual-table tbody {
  display: table;
  width: 100%;
  border-collapse: collapse;
}

.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: "LURENA\\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 SVG: 横幅100%フィット・縦スクロール ── */
.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; }
