:root {
  color-scheme: light;
  --ink: #152431;
  --muted: #61727f;
  --line: #d8e1e7;
  --paper: #ffffff;
  --canvas: #f4f7f8;
  --blue: #0d5f83;
  --blue-dark: #084661;
  --blue-soft: #e9f5f9;
  --amber: #8b5600;
  --amber-soft: #fff6dc;
  --red: #a22b2b;
  --red-soft: #fff0ef;
  --green: #217052;
  --green-soft: #ebf7f0;
  --violet: #61469b;
  --violet-soft: #f2edff;
  --coral: #b9583c;
  --coral-soft: #fff0ea;
  --shadow: 0 10px 30px rgba(15, 42, 58, 0.08);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(205, 236, 247, .78), transparent 29rem),
    radial-gradient(circle at 96% 19%, rgba(255, 234, 187, .46), transparent 22rem),
    var(--canvas);
  line-height: 1.5;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

a { color: var(--blue-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #f0b942;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  color: white;
  background: var(--blue-dark);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  color: white;
  background: var(--blue-dark);
  box-shadow: 0 1px 0 rgba(255,255,255,0.12);
}

.header-inner, .header-search-wrap, main, .site-footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 74px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: white; text-decoration: none; white-space: nowrap; }
.brand strong { display: block; font-size: 0.98rem; letter-spacing: -0.01em; }
.brand small { display: block; opacity: 0.75; font-size: 0.7rem; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.46); border-radius: 9px; font-size: .76rem; font-weight: 800; letter-spacing: .05em; }

.primary-nav { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-left: auto; }
.primary-nav a { display: inline-flex; min-height: 42px; align-items: center; padding: 0 11px; color: rgba(255,255,255,.84); text-decoration: none; border-radius: 8px; font-size: .86rem; }
.primary-nav a:hover, .primary-nav a.is-active { color: white; background: rgba(255,255,255,.12); }
.menu-button { display: none; margin-left: auto; padding: 8px 11px; color: white; background: transparent; border: 1px solid rgba(255,255,255,.38); border-radius: 8px; }

.header-search-wrap { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 0 0 14px; }
.header-search-wrap input { min-width: 0; height: 42px; padding: 0 14px; color: var(--ink); background: white; border: 0; border-radius: 8px; }
.search-button { min-height: 42px; padding: 0 18px; color: white; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.38); border-radius: 8px; }
.search-button:hover { background: rgba(255,255,255,.2); }

main { min-height: calc(100vh - 220px); padding-block: 36px 54px; }

.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: .75rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 830px; margin-bottom: 14px; font-size: clamp(2rem, 4.6vw, 3.8rem); line-height: 1.04; letter-spacing: -.04em; }
h2 { font-size: clamp(1.38rem, 2.5vw, 2rem); line-height: 1.16; letter-spacing: -.025em; }
h3 { font-size: 1rem; line-height: 1.25; }
.lead { max-width: 740px; margin-bottom: 0; color: #435664; font-size: 1.08rem; }

.hero { position: relative; padding: 12px 0 32px; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: 3%; bottom: 5px; width: 122px; height: 122px; border: 18px solid rgba(73, 163, 197, .12); border-radius: 34px; transform: rotate(16deg); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(290px, .78fr); gap: 26px; align-items: end; }
.hero-card { padding: 23px; background: linear-gradient(145deg, #ffffff 0%, #effaff 100%); border: 1px solid #c8e2eb; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-card h2 { margin-bottom: 7px; font-size: 1.08rem; }
.hero-card p:last-child { margin-bottom: 0; color: var(--muted); }

.button-row, .filter-row, .chip-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 14px; color: var(--ink); text-decoration: none; border: 1px solid transparent; border-radius: 9px; font-weight: 700; font-size: .9rem; }
.button-primary { color: white; background: var(--blue); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { background: white; border-color: var(--line); }
.button-secondary:hover { background: #f7fafb; }
.button:disabled { cursor: not-allowed; opacity: .55; }

.notice { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin: 26px 0; padding: 15px 17px; border: 1px solid #edcc76; border-radius: 12px; color: #59420e; background: var(--amber-soft); }
.notice strong { display: block; margin-bottom: 2px; }
.notice p { margin: 0; }
.notice-icon { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #c68b20; border-radius: 50%; font-weight: 800; }
.notice-critical { border-color: #e6a6a2; color: #752725; background: var(--red-soft); }
.notice-critical .notice-icon { border-color: #cc625d; }
.notice-positive { border-color: #a9d6bf; color: #15543e; background: var(--green-soft); }
.notice-positive .notice-icon { border-color: #6eb38f; }

.section { margin-top: 38px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-heading p { margin: 0; color: var(--muted); }

.workflow-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 6px 0 24px; }
.workflow-step { position: relative; min-height: 128px; padding: 17px 16px 16px 62px; background: rgba(255,255,255,.88); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 7px 18px rgba(15, 42, 58, .045); }
.workflow-step > span { position: absolute; top: 17px; left: 16px; display: grid; place-items: center; width: 31px; height: 31px; color: #075373; background: #dff4fb; border: 1px solid #a9dce9; border-radius: 50%; font-size: .82rem; font-weight: 800; }
.workflow-step:nth-child(2) > span { color: #7d4d00; background: #fff1c8; border-color: #f0cf77; }
.workflow-step:nth-child(3) > span { color: #4b327d; background: #eee6ff; border-color: #c9b6f0; }
.workflow-step strong { display: block; margin: 2px 0 4px; font-size: .94rem; }
.workflow-step p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.42; }
.commure-strip .workflow-step:nth-child(1) > span { color: #4b327d; background: #eee6ff; border-color: #c9b6f0; }
.commure-strip .workflow-step:nth-child(2) > span { color: #075373; background: #dff4fb; border-color: #a9dce9; }
.commure-strip .workflow-step:nth-child(3) > span { color: #176142; background: #e5f7ed; border-color: #afd9c0; }

.commure-visual-guide { padding: 24px; margin-top: 12px; background: linear-gradient(145deg, #fbfaff, #f5fbff); border: 1px solid #d8cfec; border-radius: 18px; box-shadow: var(--shadow); }
.commure-path { display: flex; align-items: start; gap: 10px; padding: 13px 15px; margin: 18px 0; color: #393054; background: #f0ecfb; border: 1px solid #d7cbed; border-radius: 11px; font-size: .91rem; }
.commure-path span { flex: 0 0 auto; color: #685b85; font-weight: 760; }
.commure-path strong { font-weight: 720; }
.commure-screen-grid { display: grid; grid-template-columns: 1.05fr 1fr 1fr; gap: 14px; align-items: stretch; }
.commure-screen-card { display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none; background: white; border: 1px solid #d8ddea; border-radius: 13px; box-shadow: 0 4px 13px rgba(40, 32, 74, .06); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.commure-screen-card:hover { transform: translateY(-3px); border-color: #aa98d0; box-shadow: 0 12px 26px rgba(58, 41, 111, .15); }
.commure-screen-card img { display: block; width: 100%; aspect-ratio: 1.65 / 1; object-fit: cover; object-position: top center; background: #eff1f5; border-bottom: 1px solid #e1e4ea; }
.commure-screen-card:first-child img { aspect-ratio: .83 / 1; }
.commure-screen-copy { display: grid; gap: 5px; padding: 14px; }
.commure-screen-copy strong { color: #3c2a70; font-size: .94rem; }
.commure-screen-copy span { color: var(--muted); font-size: .81rem; line-height: 1.45; }
.commure-tip { padding: 13px 15px; margin: 16px 0; color: #4f347a; background: #f5f0ff; border: 1px solid #d9c8fa; border-radius: 11px; font-size: .89rem; }
.commure-tip code { padding: 1px 5px; color: #3b2864; background: white; border: 1px solid #d6c6ee; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.commure-order-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.commure-order-step { min-width: 0; padding: 14px 13px 12px; background: rgba(255,255,255,.82); border: 1px solid #ded8ed; border-radius: 12px; }
.commure-order-step > span { display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 10px; color: white; background: var(--violet); border-radius: 50%; font-size: .75rem; font-weight: 800; }
.commure-order-step h3 { margin: 0 0 5px; color: #3f2d70; font-size: .86rem; }
.commure-order-step p { margin: 0; color: var(--muted); font-size: .77rem; line-height: 1.42; }
.commure-settings-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 13px; }
.commure-settings { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .88rem; }
.commure-settings th, .commure-settings td { padding: 13px 15px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.commure-settings th { color: #59427f; background: #f5f1fd; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.commure-settings tr:last-child td { border-bottom: 0; }
.setting-state { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 780; }
.setting-on { color: #175a3e; background: #e5f7ed; }
.setting-off { color: #6d4171; background: #f5eafa; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card { padding: 17px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.stat-card strong { display: block; margin-bottom: 3px; font-size: 1.6rem; letter-spacing: -.04em; }
.stat-card span { color: var(--muted); font-size: .85rem; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; min-width: 0; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 4px 12px rgba(15, 42, 58, 0.035); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); font-size: .88rem; }
.card-footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 12px; }

.source-table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; }
.source-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: .88rem; }
.source-table th, .source-table td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.source-table th { color: var(--muted); background: #f8fafb; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.source-table tr:last-child td { border-bottom: 0; }

.badge { display: inline-flex; width: fit-content; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 999px; color: var(--blue-dark); background: var(--blue-soft); font-size: .72rem; font-weight: 750; line-height: 1.25; }
.badge-warning { color: #7d4d00; background: var(--amber-soft); }
.badge-locked { color: #8b2826; background: var(--red-soft); }
.badge-positive { color: #196245; background: var(--green-soft); }

.page-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px; margin-bottom: 22px; }
.page-header .lead { max-width: 790px; }

.filter-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .34fr); gap: 12px; padding: 14px; margin-bottom: 20px; background: #edf3f6; border: 1px solid var(--line); border-radius: 13px; }
.filter-panel input, .filter-panel select { width: 100%; min-height: 42px; padding: 0 12px; color: var(--ink); background: white; border: 1px solid #cbd7de; border-radius: 8px; }
.filter-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .82rem; }

.macro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.macro-card { position: relative; min-width: 0; padding: 20px 18px 18px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 4px 12px rgba(15, 42, 58, 0.025); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.macro-card::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 4px; background: linear-gradient(90deg, #0d5f83, #52a7c5); }
.macro-card-pe::before { background: linear-gradient(90deg, #217052, #65b98a); }
.macro-card-commure::before { background: linear-gradient(90deg, #61469b, #9b7ddb); }
.macro-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.macro-top h3 { margin: 5px 0 0; }
.macro-card summary { color: var(--blue-dark); cursor: pointer; font-size: .88rem; font-weight: 700; }
.macro-preview { max-height: 160px; margin: 14px 0 0; padding: 12px; overflow: auto; color: #2c404e; background: linear-gradient(145deg, #f8fbfc, #f2f8fa); border: 1px solid #e1e8ec; border-radius: 9px; white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; line-height: 1.5; }
.macro-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.small-button { min-height: 36px; padding: 0 11px; color: var(--blue-dark); background: white; border: 1px solid #bdcdd6; border-radius: 8px; font-size: .82rem; font-weight: 750; }
.small-button:hover { background: #f3f8fa; }
.small-button:disabled { cursor: not-allowed; color: #85615f; background: #faf4f3; border-color: #edc9c7; }

.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.guide-article, .side-card, .project-card { padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.guide-article > p { color: var(--muted); }
.guide-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 10px; padding: 6px; background: linear-gradient(90deg, #eef7fa, #f4f0ff); border: 1px solid var(--line); border-radius: 12px; }
.guide-tab { min-height: 40px; padding: 7px 11px; color: #45606f; background: transparent; border: 1px solid transparent; border-radius: 8px; font-size: .83rem; font-weight: 750; text-align: left; }
.guide-tab:hover { color: var(--blue-dark); background: white; }
.guide-tab[aria-selected="true"] { color: white; background: var(--blue); border-color: var(--blue); }
.guide-panels { background: #fbfcfc; border: 1px solid var(--line); border-radius: 12px; }
.guide-panel { padding: 21px; }
.guide-panel h3 { margin-bottom: 8px; font-size: 1.25rem; }
.guide-panel p:last-child { margin-bottom: 0; color: #435763; }
.guide-panel[hidden] { display: none; }
.guide-text { max-height: 660px; padding: 18px; overflow: auto; color: #283b46; background: #fbfcfc; border: 1px solid #e3ebee; border-radius: 10px; white-space: pre-wrap; font-size: .91rem; line-height: 1.65; }
.side-card { position: sticky; top: 145px; }
.side-card h3 { margin-bottom: 8px; }
.side-card ul, .project-card ul { padding-left: 20px; }
.side-card li, .project-card li { margin-bottom: 8px; color: #3b505c; }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-card h2 { margin-bottom: 10px; }
.project-card p { color: #435763; }
.privacy-box { padding: 18px; margin-top: 16px; color: #6c2926; background: var(--red-soft); border: 1px solid #e8b2ae; border-radius: 12px; }
.feedback-panel { margin-top: 16px; padding: 18px; color: var(--muted); background: #f8fafb; border: 1px dashed #bbcbd4; border-radius: 12px; }
.feedback-panel p:last-child { margin-bottom: 0; }

.empty-state { padding: 32px; text-align: center; background: white; border: 1px dashed #b9cbd4; border-radius: 14px; color: var(--muted); }
.search-summary { margin-bottom: 20px; color: var(--muted); }

.site-footer { padding: 25px 0 36px; color: #60717c; font-size: .78rem; border-top: 1px solid var(--line); }
.site-footer p { margin-bottom: 4px; }

.content-dialog { width: min(900px, calc(100% - 28px)); max-height: min(84vh, 800px); padding: 0; color: var(--ink); background: white; border: 0; border-radius: 16px; box-shadow: 0 25px 80px rgba(3, 26, 39, .35); }
.content-dialog::backdrop { background: rgba(7, 25, 36, .55); }
.dialog-header { display: flex; justify-content: space-between; gap: 18px; padding: 22px 24px 15px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-size: 1.25rem; }
.icon-button { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; color: var(--ink); background: #f1f5f6; border: 1px solid var(--line); border-radius: 8px; font-size: 1.5rem; line-height: 1; }
.dialog-message { margin: 16px 24px 0; padding: 12px; border-radius: 9px; color: #7d2b27; background: var(--red-soft); border: 1px solid #e7b1ad; font-size: .88rem; }
.macro-text { max-height: 52vh; margin: 0; padding: 20px 24px; overflow: auto; white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; line-height: 1.58; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 24px 22px; border-top: 1px solid var(--line); }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 40; max-width: min(390px, calc(100vw - 40px)); padding: 12px 15px; color: white; background: #1e465b; border-radius: 10px; box-shadow: 0 10px 26px rgba(1, 23, 34, .22); opacity: 0; transform: translateY(10px); transition: .18s ease; pointer-events: none; font-size: .9rem; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (hover: hover) {
  .card:hover, .macro-card:hover { transform: translateY(-3px); border-color: #a6c8d5; box-shadow: 0 12px 28px rgba(15, 42, 58, .1); }
  .workflow-step:hover { border-color: #a6c8d5; box-shadow: 0 10px 22px rgba(15, 42, 58, .08); }
}

@media (max-width: 900px) {
  .header-inner { gap: 12px; }
  .brand { white-space: normal; }
  .menu-button { display: inline-flex; }
  .primary-nav { display: none; position: absolute; top: 74px; left: 0; right: 0; padding: 12px 16px; background: var(--blue-dark); border-top: 1px solid rgba(255,255,255,.16); box-shadow: 0 12px 22px rgba(0,0,0,.14); }
  .primary-nav.is-open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-nav a { justify-content: center; }
  .hero-grid, .guide-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-strip { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .commure-screen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commure-screen-card:first-child { grid-column: span 2; }
  .commure-screen-card:first-child img { aspect-ratio: 1.7 / 1; }
  .commure-order-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .header-inner, .header-search-wrap, main, .site-footer { width: min(100% - 24px, 1180px); }
  .header-inner { min-height: 66px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand strong { font-size: .85rem; }
  .brand small { font-size: .64rem; }
  .primary-nav { top: 66px; grid-template-columns: 1fr !important; }
  .header-search-wrap { padding-bottom: 11px; }
  .header-search-wrap input, .search-button { height: 40px; }
  main { padding-block: 25px 38px; }
  h1 { font-size: 2.15rem; }
  .page-header { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .section-heading h2 { margin-bottom: 4px; }
  .guide-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .guide-tab { flex: 0 0 auto; white-space: nowrap; }
  .cards, .macro-grid, .project-grid { grid-template-columns: 1fr; }
  .workflow-step { min-height: 0; }
  .commure-visual-guide { padding: 17px; }
  .commure-path { display: grid; gap: 4px; }
  .commure-screen-grid, .commure-order-grid { grid-template-columns: 1fr; }
  .commure-screen-card:first-child { grid-column: auto; }
  .commure-screen-card img, .commure-screen-card:first-child img { aspect-ratio: 1.55 / 1; }
  .filter-panel { grid-template-columns: 1fr; }
  .dialog-header, .macro-text, .dialog-actions { padding-inline: 17px; }
  .dialog-actions { justify-content: stretch; }
  .dialog-actions .button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
