/* Butter's Design site styles (loaded after system.css). Shared by every page; pages are built from src/ by tools/build.sh. */

/* Text font: IBM Plex Sans JP (SIL OFL 1.1, IBMPlexSansJP-OFL.txt). tools/subset-font.sh keeps only the
   characters on the pages and renames the subset "BD Sans JP" (OFL Reserved Font Name "Plex").
   Only the big "Butter's Design" keeps system.css's Chicago (owner, 2026-11-16). */
@font-face {
  font-family: "BD Sans JP";
  src: url("BDSansJP-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "BD Sans JP";
  src: url("BDSansJP-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
/* Layout follows the system.css docs page: a sticky contents window on the left, one large dialog on the right. */
/* Spacing between letters and lines, set to commonly recommended values for Japanese text on screens
   (owner, 2026-11-16): body 16px / line height 1.8 / letters +0.04em; small text (13–15px) line height 1.7;
   headings line height 1.4–1.5 with proportional kana (palt) and +0.04em; buttons +0.06em.
   The Chicago wordmark keeps its own bitmap spacing. */
:root {
  --lh-text: 1.8;
  --lh-small: 1.7;
  --lh-heading: 1.4;
  --lh-subheading: 1.5;
  --ls-text: 0.04em;
  --ls-heading: 0.04em;
  --ls-button: 0.06em;
  --text-font: "BD Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", YuGothic, Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  color: #000;
  font-family: var(--text-font);
  font-size: 16px;
  line-height: var(--lh-text);
  letter-spacing: var(--ls-text);
  /* Body text fills each line like a printed Japanese book; only the line-start rules for 、。ー small kana
     apply (owner, 2026-11-17). Headings and short labels below keep breaking between phrases. */
  word-break: normal;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
}
p, dd, li { text-wrap: pretty; }
/* ...and both edges line up, as in print (the last line stays on the left) */
.main p:not(.case-lead):not(.desc):not(.case-tech), .main dd { text-align: justify; }
h1, h2, h3, dt, figcaption, .desc, .page-kicker, .case-lead, .pages .page-name, .alert-title,
.toc, ul.menubar, .title-bar .title {
  word-break: auto-phrase;
}
p { margin: 0; }
.heading { -webkit-font-smoothing: none; }
/* Headings: proportional kana and a little extra space */
.page-title, .work-title, .others-title, .subheading,
.pages .page-name, .alert-title, .title-bar .title {
  font-feature-settings: "palt"; letter-spacing: var(--ls-heading);
}
a:focus-visible, .btn:focus-visible { outline: 2px dotted #000; outline-offset: 3px; }
.nw { white-space: nowrap; }
.pixel { shape-rendering: crispEdges; flex: none; }

/* Menu bar (phones only; the contents window takes its place on wider screens) */
.menubar-wrap { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid #000; }
ul.menubar {
  margin: 0; padding: 0 2px;
  align-items: center; cursor: default;
  font-family: var(--text-font); font-size: 15px; font-weight: 700; line-height: 1.4; letter-spacing: 0.02em;
}
ul.menubar > li[role=menu-item] { padding: 0; }
ul.menubar > li[role=menu-item] > a { display: flex; align-items: center; min-height: 36px; padding: 0 7px; }
ul.menubar .logo svg { width: 32px; height: 25px; }
@media (min-width: 760px) { .menubar-wrap { display: none; } }

/* Layout */
/* Full window width like the docs page; the text inside the dialog is capped so lines stay readable and sits on the left (owner, 2026-11-16) */
.layout { padding: 18px 12px 40px; }
@media (min-width: 760px) {
  .layout { display: flex; align-items: flex-start; gap: 24px; padding: 18px 20px; }
}

/* Contents window */
.sidebar { display: none; }
@media (min-width: 760px) {
  .sidebar {
    display: flex; flex-direction: column; flex: none;
    width: 248px; min-width: 0; margin: 0;
    position: sticky; top: 18px; height: calc(100vh - 36px);
    font-family: var(--text-font); box-shadow: 2px 2px 0 #000;
  }
}
/* Wider on desktops so most entries fit on one line; 「新規事業の／コンサルティング・サポート」 takes two
   (owner, 2026-11-16). Tablets keep 248px so the main dialog keeps its room. */
@media (min-width: 1024px) {
  .sidebar { width: 300px; }
}
@media (min-width: 760px) {
  /* 目次 text one size down, 15 → 14px (owner, 2026-11-17) */
  .sidebar .window-pane { flex: 1; min-height: 0; padding: 12px 8px 12px 14px; font-size: 14px; line-height: var(--lh-small); letter-spacing: var(--ls-text); }
}
.title-bar .title { font-family: var(--text-font); font-size: 16px; font-weight: 700; line-height: 1.2; }
.title-bar button { pointer-events: none; }
.toc { margin: 0; padding-left: 18px; }
.toc > li { margin: 8px 0; }
.toc ul { margin: 4px 0 0; padding-left: 20px; list-style: circle; }
.toc ul li { margin: 4px 0; }

/* Main dialog */
.main { flex: 1; min-width: 0; margin: 0; padding: 28px 16px 24px; }
@media (min-width: 760px) { .main { padding: 44px 44px 32px; } }
.main-inner { max-width: 1100px; margin: 0; }
/* The footer sits at the bottom of the dialog: the dialog fills the screen height (below) and the page's own
   content takes the free space above the footer (owner, 2026-11-16) */
.main { display: flex; flex-direction: column; }
.main-inner { flex: 1 0 auto; width: 100%; display: flex; flex-direction: column; }
.page-content { flex: 1 0 auto; }

.masthead { text-align: left; }
/* Icon sizes are whole multiples of the 32x25 drawing so every dot stays square */
.masthead-icon { width: 64px; height: 50px; display: block; margin: 0; }
@media (min-width: 640px) { .masthead-icon { width: 96px; height: 75px; } }
.heading {
  margin: 12px 0 0; font-family: Chicago, var(--text-font); font-weight: normal;
  font-size: clamp(36px, 7vw, 60px); line-height: 1.15; letter-spacing: 0;
}
.desc { margin-top: 18px; font-size: 16px; line-height: var(--lh-text); }
/* Opening sentence right under the masthead; its heading was dropped (owner, 2026-11-16) */
.lead { margin: 40px 0 0; max-width: 46em; }

.subheading {
  margin: 56px 0 16px; font-family: var(--text-font); font-weight: 700;
  font-size: 30px; line-height: var(--lh-heading);
}
.main p + p { margin-top: 1em; }

.example { margin-top: 16px; padding: 12px 0 12px 24px; border-left: 1px solid #000; }
@media (max-width: 479px) { .example { padding-left: 16px; } }

/* Buttons (anchors styled with system.css .btn) */
/* IBM Plex Sans JP draws Japanese letters about 0.07em above the middle of the line, so text in a frame
   gets 1–2px more room above than below (same height as before) to look centred (owner, 2026-11-16) */
a.btn {
  display: inline-block; text-align: center;
  padding: 6px 18px 4px;
  font-family: var(--text-font); font-size: 15px; font-weight: 700; line-height: 1.5;
  letter-spacing: var(--ls-button);
}
a.btn-default { padding: 8px 20px 6px; }
@media (max-width: 479px) { a.btn { width: 100%; } }

/* Business info */
.info { margin: 0; border: 1px solid #000; padding: 4px 20px; }
.info div { display: grid; gap: 2px; padding: 12px 0; border-top: 1px dotted #000; }
.info div:first-child { border-top: 0; }
@media (min-width: 640px) { .info div { grid-template-columns: 8em 1fr; align-items: baseline; gap: 16px; } }
.info dt { font-weight: 700; }
.info dd { margin: 0; }
@media (max-width: 479px) { .info { padding: 4px 14px; } }

/* Contact (alert box) */
.alert-box { margin: 0; max-width: 560px; }
.alert-contents { padding: 16px 20px; }
.alert-body { display: flex; gap: 16px; align-items: flex-start; }
.alert-icon { width: 32px; height: 25px; margin-top: 2px; }
.alert-title { margin: 0 0 4px; font-size: 17px; font-weight: 700; line-height: var(--lh-subheading); }
.alert-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
@media (max-width: 479px) {
  .alert-contents { padding: 14px; }
  .alert-body { flex-direction: column; gap: 8px; }
  .alert-icon { margin-top: 0; }
}

/* Footer */
.site-footer { margin-top: 56px; padding-top: 16px; border-top: 1px solid #000; font-size: 14px; line-height: var(--lh-small); }
/* The copyright line uses the wordmark's Chicago (owner, 2026-11-16) */
.site-footer p { font-family: Chicago, var(--text-font); letter-spacing: 0; -webkit-font-smoothing: none; }

/* ---- Pages (owner split the one page into top / 事業内容 / 事業者の情報 / お問い合わせ, 2026-11-16) ---- */

/* The dialog reaches the bottom of the screen like the contents window, even on short pages */
/* Desktop: 18px above and below, so the dialog's bottom lines up with the contents window's.
   Phones: below the 37px menu bar, with the layout's 18px top and 40px bottom padding. */
.main { min-height: calc(100vh - 95px); min-height: calc(100svh - 95px); }
@media (min-width: 760px) { .main { min-height: calc(100vh - 36px); } }

/* Current page in the menus */
.toc a[aria-current="page"] { font-weight: 700; text-decoration: none; }
ul.menubar > li[role=menu-item] > a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Sub-page head: the wordmark back to the top page, then the page's own title */
.brandline {
  display: inline-flex; align-items: center; gap: 10px;
  color: #000; text-decoration: none;
  font-family: Chicago, var(--text-font); font-size: 22px; line-height: 1.2; letter-spacing: 0;
  -webkit-font-smoothing: none;
}
.brandline svg { width: 32px; height: 25px; }
.page-title {
  margin: 28px 0 8px; font-family: var(--text-font); font-weight: 700;
  font-size: 34px; line-height: var(--lh-heading);
}
@media (max-width: 479px) { .page-title { font-size: 30px; } }

/* Top page: list of the other pages */
.pages { margin: 48px 0 0; max-width: 720px; border: 1px solid #000; }
.pages a {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; border-top: 1px dotted #000;
  color: #000; text-decoration: none;
}
.pages a:first-child { border-top: 0; }
.pages a:hover, .pages a:focus-visible { background: #000; color: #fff; outline: none; }
.pages .page-text { flex: 1; min-width: 0; }
.pages .page-name { display: block; font-size: 18px; font-weight: 700; line-height: var(--lh-subheading); }
.pages .page-note { display: block; font-size: 14px; line-height: var(--lh-small); }
.pages .arrow { flex: none; font-weight: 700; }

/* Short note under a section, e.g. office hours on the contact page */
.note { margin-top: 16px; font-size: 15px; line-height: var(--lh-small); }

/* Space between a sub-page's title and its body */
.page-body { margin-top: 28px; }

/* On phones the sticky menu bar covers the top of the screen, so jumps to a heading stop below it */
@media (max-width: 759px) { html { scroll-padding-top: 56px; } }

/* "制作実績を見る" under each business on 事業内容 */
.more a::after { content: " ›"; font-weight: 700; }

/* ---- 制作実績 (owner, 2026-11-16): /works/ lists the businesses, /works/<business>/ lists the work ---- */
.page-kicker { margin: 28px 0 0; font-size: 15px; font-weight: 700; line-height: var(--lh-subheading); }
.page-kicker + .page-title { margin-top: 2px; }
/* An English label above a title uses the wordmark's Chicago (owner, 2026-11-16); Chicago has no bold */
.page-kicker[lang="en"] {
  font-family: Chicago, var(--text-font); font-weight: normal; font-size: 16px;
  letter-spacing: 0; -webkit-font-smoothing: none;
}
.page-kicker[lang="en"] + .page-title { margin-top: 4px; }
.page-desc { margin-top: 12px; max-width: 46em; }
.page-desc + .pages { margin-top: 32px; }

.works { margin-top: 32px; border-top: 1px solid #000; }
.work { padding: 22px 0; border-bottom: 1px dotted #000; }
.work-date { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; line-height: var(--lh-small); font-variant-numeric: tabular-nums; }
/* The title opens each work in the list now (no date or label above it: owner, 2026-11-17) */
.work-title {
  margin: 0 0 6px; font-family: var(--text-font); font-weight: 700;
  font-size: 20px; line-height: var(--lh-subheading);
}
.main .work-body p + p { margin-top: 0.5em; }
.work-role { font-size: 14px; line-height: var(--lh-small); }
/* Marks shown only in the local build (tools/build.sh --release leaves these entries out) */
.badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px 0;
  background: #000; color: #fff; font-size: 12px; font-weight: 700; line-height: calc(1.7em - 1px);
  vertical-align: 2px; white-space: nowrap;
}
.works-empty { margin-top: 32px; padding: 20px; border: 1px dotted #000; }

.others-title {
  margin: 56px 0 12px; font-family: var(--text-font); font-weight: 700;
  font-size: 18px; line-height: var(--lh-subheading);
}
.pages.others { margin-top: 0; }

/* Phone menu bar with 制作実績 added: labels stay on one line; narrow phones get a slightly smaller bar,
   and the very narrowest wrap to a second row instead of running off the screen */
ul.menubar { flex-wrap: wrap; }
ul.menubar > li[role=menu-item] > a { white-space: nowrap; }
@media (max-width: 399px) {
  ul.menubar { font-size: 14px; letter-spacing: 0; }
  ul.menubar > li[role=menu-item] > a { padding: 0 4px; }
}

/* Links on hover (owner, 2026-11-16): no animation, but a clear change — black and white swap, like a
   selected item on the old Mac (the page list and the menu bar already work this way).
   The black reaches 2px past the text with a shadow, so nothing moves. Only on devices with a mouse,
   so a tap on a phone does not leave a link stuck in black. */
@media (hover: hover) {
  a:hover {
    background: #000; color: #fff; text-decoration: none;
    box-shadow: 0 0 0 2px #000;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
  }
  /* The wordmark: only the name turns black, so the butter's black outline stays visible */
  .brandline:hover { background: none; color: #000; box-shadow: none; }
  .brandline:hover span { background: #000; color: #fff; box-shadow: 0 0 0 2px #000; }
  /* Buttons look pressed, the same as system.css's own pressed button */
  a.btn:hover { box-shadow: none; border-radius: 6px; }
  a.btn-default:hover { border-radius: 12px; }
  /* The page list and the menu bar keep their own full-row black */
  .pages a:hover, ul.menubar a:hover { box-shadow: none; }
}

/* 事業内容: each business is a large heading with its text below across the full width, like the
   system.css docs page's sections ("Contributing, Credits, etc.") (owner, 2026-11-16).
   Headings use the text font only: Chicago is never mixed with IBM Plex Sans JP in one line (owner). */
.service { margin-top: 48px; }
.page-head + .service { margin-top: 36px; }
.service-title {
  margin: 0 0 14px; font-family: var(--text-font); font-weight: 700;
  font-size: 26px; line-height: var(--lh-heading);
  font-feature-settings: "palt"; letter-spacing: var(--ls-heading);
}
@media (max-width: 479px) { .service-title { font-size: 22px; } }

/* A work with its own page (owner, 2026-11-17): its title in the list links to the page (picture optional),
   and the page holds the write-up in sections with diagrams made in HTML (.case-diagram, below) */
.work-thumb { display: block; width: 100%; max-width: 480px; margin: 4px 0 14px; }
.work-thumb img { display: block; width: 100%; height: auto; border: 1px solid #000; }
.page-head .work-date { margin-top: 12px; }
/* Readability pass (owner, 2026-11-17): lines kept to about 40 characters, the facts in a table near the
   top, sections set apart by space (no rule: owner, 2026-11-17), and every point in a framed list with dotted dividers */
.case-lead {
  margin-top: 28px; max-width: 40em;
  font-size: 20px; font-weight: 700; line-height: 1.6;
  font-feature-settings: "palt"; letter-spacing: var(--ls-heading);
}
.case-body { margin-top: 16px; max-width: 40em; }
.case-facts { margin-top: 28px; max-width: 46em; }
@media (min-width: 640px) { .case-facts div { grid-template-columns: 11em 1fr; } }
.case-figure { margin: 24px 0 0; max-width: 840px; }
.case-figure img { display: block; width: 100%; height: auto; border: 1px solid #000; }
/* Each diagram opens at full size (small on phones); no black hover box around a picture */
.case-zoom { display: block; }
@media (hover: hover) { a.case-zoom:hover, a.work-thumb:hover { background: none; box-shadow: none; } a.case-zoom:hover img, a.work-thumb:hover img { outline: 2px solid #000; } }
.case-figure figcaption { margin-top: 8px; font-size: 14px; line-height: var(--lh-small); }
/* Case-study spacing, one step per level so the page does not look crowded (owner, 2026-11-17).
   Phone / from 760px: paragraph to paragraph 1em; text and diagram 32 / 40px above, 1.2 times below; before a numbered point
   (【1】…) 48 / 56px whatever comes before it; between sections 64 / 72px (space only, no rule; 80 / 96px
   looked too wide to the owner, 2026-11-17).
   A heading sits close to what it heads: 14px under a numbered point, 16px when a diagram follows it. */
.case-section { margin-top: 64px; }
@media (min-width: 760px) { .case-section { margin-top: 72px; } }
.page-head + .case-section { margin-top: 48px; }
.case-section > p { max-width: 40em; }
.case-figure + p { margin-top: 24px; }
.case-sub {
  margin: 48px 0 14px; font-family: var(--text-font); font-weight: 700;
  font-size: 18px; line-height: var(--lh-subheading);
  font-feature-settings: "palt"; letter-spacing: var(--ls-heading);
}
@media (min-width: 760px) { .case-sub { margin-top: 56px; } }
.service-title + .case-sub { margin-top: 8px; }
.case-list { margin: 0; max-width: 46em; border: 1px solid #000; padding: 4px 20px; }
.case-list div { padding: 14px 0; border-top: 1px dotted #000; }
.case-list div:first-child { border-top: 0; }
.case-list dt { font-weight: 700; line-height: var(--lh-subheading); }
.case-list dd { margin: 4px 0 0; }
@media (max-width: 479px) { .case-list { padding: 4px 14px; } }
.case-back { margin-top: 56px; }
.case-back a::before { content: "‹ "; font-weight: 700; }

/* ── Case-study diagrams (owner, 2026-11-17) ─────────────────────────────────────────────────────
   The gym work's six figures are HTML and CSS instead of wide pictures, whose text shrank to about 4px
   on a phone. Black and white like the rest of the site (the owner chose this over the pictures' blue).
   Phone first: boxes stack and arrows point down. When the figure is 820px wide or more
   (a container query, so the sidebar's width is counted; a 1280px-wide screen with the sidebar gives
   about 824px), each flow runs left to right like the pictures. Every rule here stays inside .case-diagram. */
.case-diagram {
  container-type: inline-size;
  /* No outer frame (owner, 2026-11-17): the diagram lines up with the text and is set apart by space */
  /* Space below a diagram is 1.2 times the space above it (owner, 2026-11-17) */
  --dg-gap: 32px;
  max-width: 1000px; margin: var(--dg-gap) 0 calc(var(--dg-gap) * 1.2); padding: 0;
  --dg-mute: #555;
  font-size: 14px; line-height: var(--lh-small); letter-spacing: 0.02em;
  word-break: auto-phrase;
  scroll-margin-top: 56px; /* a link to #fig-… stops below the phone menubar */
}
@media (min-width: 760px) { .case-diagram { --dg-gap: 40px; } }
.case-sub + .case-diagram { margin-top: 16px; }
.case-diagram ul, .case-diagram ol { list-style: none; margin: 0; padding: 0; }
.case-diagram li { margin: 0; }
.case-diagram .dg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.case-diagram .dg-ico {
  display: block; flex: none; width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.case-diagram .dg-ico.is-big { width: 34px; height: 34px; }
.case-diagram .dg-icobox {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid currentColor;
}
.case-diagram .dg-icobox .dg-ico { width: 24px; height: 24px; }

/* The pictures' own title, lead and closing line are left out (owner, 2026-11-17): the text around each figure says it */

/* Words */
.case-diagram .dg-label { height: 22px; margin: 0 0 8px; font-size: 13px; font-weight: 700; line-height: 22px; letter-spacing: var(--ls-text); white-space: nowrap; }
.case-diagram .dg-name { display: block; font-size: 16px; font-weight: 700; line-height: 1.45; }
.case-diagram .dg-sub { display: block; font-size: 13px; color: var(--dg-mute); line-height: 1.6; }
.case-diagram .dg-body { display: block; line-height: 1.7; }
.case-diagram .dg-small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.6; }
.case-diagram .dg-note { margin-top: 10px; font-size: 13px; color: var(--dg-mute); }
.case-diagram .dg-center { text-align: center; text-wrap: balance; }

/* Boxes: a plain frame; .is-on = a thick frame (shown, passed on); .is-off = dashed and grey (held back);
   .dg-strong = black with white letters (the system's own step) */
.case-diagram .dg-panel { padding: 12px 10px; border: 1px solid #000; }
.case-diagram .dg-panel.is-on { border-width: 2px; padding: 11px 9px; }
.case-diagram .dg-panel-title { font-size: 16px; font-weight: 700; line-height: 1.5; }
.case-diagram .dg-panel-title + .dg-sub { margin-top: 0; }
.case-diagram .dg-card { padding: 10px; border: 1px solid #000; background: #fff; }
.case-diagram .dg-card-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid #000; font-size: 15px; font-weight: 700;
}
.case-diagram .dg-card-head .dg-sub { margin-left: 4px; font-weight: 400; }
.case-diagram .dg-who { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.case-diagram .dg-who .dg-sub { color: #000; }
.case-diagram .dg-items { display: flex; flex-direction: column; gap: 10px; }
.case-diagram .dg-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  padding: 8px 10px; border: 1px solid #000; background: #fff; font-weight: 700; line-height: 1.5;
}
/* The icon, date and words stay together (.dg-main); when the row is too narrow the tag drops to its own
   line on the right, and the words wrap only when they alone do not fit */
.case-diagram .dg-main { display: flex; flex: 1 1 auto; align-items: center; gap: 8px; min-width: 0; }
.case-diagram .dg-main .dg-text { min-width: 0; }
.case-diagram .dg-date { flex: none; font-weight: 400; font-variant-numeric: tabular-nums; }
.case-diagram .is-on { border-width: 2px; }
.case-diagram .dg-item.is-on { padding: 7px 9px; }
.case-diagram .is-off { border-style: dashed; color: var(--dg-mute); }
.case-diagram .dg-tag {
  display: inline-flex; align-items: center; gap: 3px; flex: none; margin-left: auto; padding: 0 8px;
  border: 1px solid currentColor; border-radius: 999px; background: #fff;
  font-size: 12px; font-weight: 700; line-height: 1.7; white-space: nowrap;
}
.case-diagram .dg-tag.is-on { border: 1px solid #000; background: #000; color: #fff; }
.case-diagram .dg-tag .dg-ico { width: 12px; height: 12px; stroke-width: 2.6; }
.case-diagram .dg-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 12px 14px; border: 1px solid #000; text-align: center;
}
.case-diagram .dg-box.is-on { padding: 11px 13px; }
.case-diagram .dg-stack { display: flex; flex-direction: column; gap: 14px; }
.case-diagram .dg-strong {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 16px 14px; background: #000; color: #fff; text-align: center;
}
.case-diagram .dg-strong .dg-sub { color: #ddd; }
.case-diagram .dg-rule { display: block; width: 70%; margin: 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.6); }
.case-diagram .dg-check, .case-diagram .dg-dots { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.case-diagram .dg-check li { display: flex; align-items: baseline; gap: 6px; }
.case-diagram .dg-check .dg-ico { width: 13px; height: 13px; stroke-width: 2.4; transform: translateY(1px); }
.case-diagram .dg-dots li { padding-left: 1em; text-indent: -1em; }

/* Arrows (decoration only: aria-hidden). Down on phones, right when the flow runs across. */
.case-diagram .dg-arrow {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 0 12px; font-size: 13px; font-weight: 700; line-height: 1.5;
}
.case-diagram .dg-arrow-label { white-space: nowrap; }
.case-diagram .dg-arrow-line { position: relative; flex: none; width: 2px; height: 24px; background: #000; }
.case-diagram .dg-arrow-line::after {
  content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  border-top: 9px solid #000; border-left: 6px solid transparent; border-right: 6px solid transparent;
}
.case-diagram .dg-arrow.is-no { color: var(--dg-mute); font-weight: 400; }
.case-diagram .dg-arrow.is-no .dg-arrow-line { background: none; border-left: 2px dashed #555; }
.case-diagram .dg-arrow.is-no .dg-arrow-line::after { display: none; }
.case-diagram .dg-x {
  position: absolute; left: 50%; top: 100%; width: 12px; height: 12px; transform: translate(-50%, 2px);
  fill: none; stroke: #000; stroke-width: 2.2; stroke-linecap: round;
}
.case-diagram .dg-arrows { display: flex; justify-content: center; gap: 32px; padding-bottom: 10px; }


/* 1: the member's page; 2: a Notion page and the member's screen */
.case-diagram .dg-phone { position: relative; padding: 12px 12px 26px; border: 2px solid #000; border-radius: 22px; }
.case-diagram .dg-phone::after {
  content: ""; position: absolute; left: 50%; bottom: 9px; width: 56px; height: 4px; margin-left: -28px;
  border-radius: 2px; background: #000;
}
.case-diagram .dg-phone-head {
  margin-bottom: 10px; padding: 7px; border-radius: 8px; background: #000; color: #fff;
  font-weight: 700; text-align: center;
}
.case-diagram .dg-notion { display: flex; flex-direction: column; gap: 10px; }
.case-diagram .dg-notion .dg-card-head { margin-bottom: 0; }
.case-diagram .dg-block { padding: 10px 12px; border: 1px solid #000; }
.case-diagram .dg-block.is-on { padding: 9px 11px; }
.case-diagram .dg-block-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; line-height: 1.5; }
.case-diagram .dg-bars i { display: block; width: 92%; height: 6px; margin-top: 7px; background: #000; }
.case-diagram .dg-bars i:nth-child(2) { width: 74%; }
.case-diagram .dg-bars i:nth-child(3) { width: 58%; }
.case-diagram .is-off .dg-bars i { background: #bbb; }
.case-diagram .dg-marker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  padding: 8px 12px; border: 2px solid #000; font-weight: 700; line-height: 1.5;
}
.case-diagram .dg-marker-note { margin-left: auto; font-size: 12px; white-space: nowrap; }

/* Numbered steps, joined by arrows */
/* The steps are a figure of their own, under the paragraph they show (owner, 2026-11-17) */
.case-diagram .dg-steps { display: flex; flex-direction: column; gap: 36px; }
.case-diagram .dg-step {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid #000; background: #fff;
}
.case-diagram .dg-step.is-strong { background: #000; color: #fff; }
.case-diagram .dg-step-no { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.case-diagram .dg-step-text { display: block; font-size: 15px; font-weight: 700; line-height: 1.5; }
.case-diagram .dg-step:not(:last-child)::before {
  content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 18px; margin: 4px 0 0 -1px; background: #000;
}
.case-diagram .dg-step:not(:last-child)::after {
  content: ""; position: absolute; left: 50%; top: calc(100% + 22px); transform: translateX(-50%);
  border-top: 9px solid #000; border-left: 6px solid transparent; border-right: 6px solid transparent;
}

/* 4: two panels; 5: the member and their records; 6: how the log is used */
.case-diagram .dg-two { display: grid; align-items: start; gap: 14px; }
.case-diagram .dg-points { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.case-diagram .dg-point { display: flex; align-items: center; gap: 12px; }
.case-diagram .dg-point-title { display: block; font-size: 15px; font-weight: 700; line-height: 1.5; }
.case-diagram .dg-panel .dg-items { margin-top: 12px; }
.case-diagram .dg-panel-title + .dg-who { margin: 12px 0 0; }
.case-diagram .dg-tree { display: flex; align-items: center; margin-top: 12px; }
.case-diagram .dg-tree-root {
  display: flex; flex: 0 1 84px; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; border: 1px solid #000; background: #fff; font-weight: 700; line-height: 1.5; text-align: center;
}
.case-diagram .dg-tree-list { position: relative; flex: 1 1 auto; min-width: 0; padding-left: 24px; }
.case-diagram .dg-tree-list::before { content: ""; position: absolute; left: 11px; top: 21px; bottom: 21px; border-left: 2px solid #000; }
.case-diagram .dg-tree-list::after { content: ""; position: absolute; left: 0; top: 50%; width: 11px; margin-top: -1px; border-top: 2px solid #000; }
.case-diagram .dg-tree-list li { position: relative; padding: 8px; }
.case-diagram .dg-tree-list li::before { content: ""; position: absolute; left: -13px; top: 50%; width: 13px; margin-top: -1px; border-top: 2px solid #000; }
.case-diagram .dg-use-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; font-weight: 700; line-height: 1.5; }
.case-diagram .dg-use-head .dg-tag { margin-left: 0; }
.case-diagram .dg-quote { display: inline-block; margin-top: 10px; padding: 3px 12px; border: 1px solid #000; border-radius: 10px; }
.case-diagram .dg-then { margin-top: 8px; font-weight: 700; }
.case-diagram .dg-time { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 12px; }
.case-diagram .dg-time::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 6px; border-top: 2px solid #000; }
.case-diagram .dg-time li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.case-diagram .dg-time li::before { content: ""; width: 14px; height: 14px; border: 2px solid #000; border-radius: 50%; background: #fff; }
.case-diagram .dg-time li.is-now::before { background: #000; }

@container (min-width: 600px) {
  .case-diagram .dg-two { grid-template-columns: 1fr 1fr; }
}
/* Wide figures: the flow runs left to right, as in the pictures */
@container (min-width: 820px) {
  /* Tidy rows (owner, 2026-11-17): the labels sit on one line at the top; the side columns stretch to the
     same height (a phone frame grows to match the panel beside it); arrows and the black box sit in the
     middle of the boxes, below the label line (--dg-l) */
  .case-diagram .dg-flow { display: grid; align-items: stretch; --dg-l: 0px; }
  .case-diagram .dg-flow:has(.dg-label) { --dg-l: 30px; }
  .case-diagram .dg-flow > .dg-arrow, .case-diagram .dg-flow > .dg-strong, .case-diagram .dg-flow > .dg-box { align-self: center; margin-top: var(--dg-l); }
  .case-diagram .dg-col { display: flex; flex-direction: column; min-width: 0; }
  .case-diagram .dg-col > :last-child { flex: 1 1 auto; }
  /* ...but the member's page keeps its own height: stretched, it was mostly empty */
  .case-diagram .dg-col > .dg-phone { flex: 0 0 auto; }
  .case-diagram .dg-stack > * { flex: 1 1 0; }
  .case-diagram .dg-arrow { flex-direction: column-reverse; gap: 6px; padding: 0 6px; text-align: center; }
  .case-diagram .dg-arrow-line { align-self: flex-start; width: calc(100% - 9px); min-width: 20px; height: 2px; }
  .case-diagram .dg-arrow-line::after {
    left: 100%; top: 50%; transform: translateY(-50%);
    border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid #000; border-right: 0;
  }
  .case-diagram .dg-arrow.is-no .dg-arrow-line { border-left: 0; border-top: 2px dashed #555; }
  .case-diagram .dg-x { left: 100%; top: 50%; transform: translate(2px, -50%); }
  .case-diagram .dg-arrows { flex-direction: column; justify-content: space-around; align-self: stretch; gap: 0; padding: 48px 0 24px; }
  .case-diagram .dg-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
  .case-diagram .dg-step:not(:last-child)::before { left: 100%; top: 50%; width: 24px; height: 2px; margin: -1px 0 0 6px; }
  .case-diagram .dg-step:not(:last-child)::after {
    left: calc(100% + 30px); top: 50%; transform: translateY(-50%);
    border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid #000; border-right: 0;
  }
  /* Floors add up to 820px (measured at 1280px, where the figure is 824px) so no row wraps: a trainer row
     with its tag needs about 318px, a page row about 220px, the first arrow 112px (「共有」にすると on one
     line) and the second 60px */
  .dg-ai .dg-item { padding: 6px 8px; font-size: 13px; }
  .dg-ai .dg-main { gap: 6px; }
  .dg-ai .dg-item.is-on { padding: 5px 7px; }
  .dg-ai .dg-flow { grid-template-columns: minmax(0, 1.5fr) 34px minmax(0, 1.1fr) 34px minmax(0, 0.85fr) 34px minmax(0, 1fr); }
  .dg-ai .dg-strong { padding: 16px 12px; }
  .dg-draft .dg-flow { grid-template-columns: minmax(0, 1.7fr) minmax(104px, 0.45fr) minmax(0, 0.95fr); }
  .dg-migrate .dg-tree-root { flex-basis: 108px; padding: 14px 8px; }
  .dg-migrate .dg-flow { grid-template-columns: minmax(0, 1fr) 48px minmax(0, 0.95fr) 48px minmax(0, 1.35fr); }
  .dg-ops .dg-flow { grid-template-columns: minmax(0, 0.95fr) 44px minmax(0, 0.95fr) 44px minmax(0, 1.6fr); }
}

/* ── 「ご要望と、その実現」の図 (owner, 2026-11-17) ─────────────────────────────────────────────────────────
   Drawn as two SVGs after the owner's sample pictures (white cards with a light grey frame, round badges, grey
   speech bubbles) with dot-style icons like the rest of the site: the wide one (1000×432) when the figure is
   880px or wider, so its text stays near full size; the tall one (320×1208) otherwise, at its own size.
   The words are SVG text in the page's font. */
.case-diagram .dg-svg { display: block; width: 100%; height: auto; letter-spacing: 0; font-family: inherit; }
.case-diagram .dg-svg.is-wide { display: none; }
.case-diagram .dg-svg.is-narrow { max-width: 320px; }
@container (min-width: 880px) {
  .case-diagram .dg-svg.is-wide { display: block; }
  .case-diagram .dg-svg.is-narrow { display: none; }
}

/* ── Contact form (owner, 2026-11-17) ───────────────────────────────────────────────────────────────
   Fields and the button follow system.css (1.5px frames, the double-framed default button), in the text
   font: Chicago is never used for Japanese. 16px in the fields so phones do not zoom in. Errors are black
   on white with a black 「!」 mark (the site has no colour); the checkbox is system.css's, made larger. */
/* Spacing (owner, 2026-11-17): the page's text is as wide as the form; 48px before the form so it reads as its
   own part (nothing follows it any more); the field name sits 8px above its box */
.contact-page > p { max-width: 44em; } /* the opening sentence fits on one line (owner's line break) */
.contact-form { max-width: 44em; margin: 48px 0 0; font-family: var(--text-font); font-size: 16px; } /* system.css gives forms a monospace font */
.contact-form .form-field > label:first-child { margin-bottom: 8px; }
.contact-form .form-field + .form-field { margin-top: 28px; }
.contact-form label { display: block; font-size: 15px; font-weight: 700; line-height: var(--lh-subheading); }
.contact-form .req {
  display: inline-block; margin-left: 6px; padding: 0 6px; background: #000; color: #fff;
  font-size: 12px; font-weight: 700; line-height: 1.7; vertical-align: 1px;
}
.contact-form input[type="email"], .contact-form textarea {
  display: block; width: 100%; margin: 0; padding: 9px 10px 7px; border: 1.5px solid #000; border-radius: 0;
  background: #fff; color: #000; font-family: var(--text-font); font-size: 16px; line-height: 1.7;
  letter-spacing: var(--ls-text); -webkit-appearance: none; appearance: none;
}
.contact-form textarea { min-height: 14em; resize: vertical; }
/* system.css turns a focused field black; a long message is easier to write on white, so a thick frame instead */
.contact-form input[type="email"]:focus, .contact-form input[type="email"]:focus-visible,
.contact-form textarea:focus {
  outline: none; background: #fff; color: #000; box-shadow: 0 0 0 2px #000;
}
.contact-form .is-error input[type="email"], .contact-form .is-error textarea { border-width: 3px; padding: 7.5px 8.5px 5.5px; }
.main .contact-form .field-count { margin: 6px 0 0; font-size: 13px; line-height: var(--lh-small); text-align: right; font-variant-numeric: tabular-nums; }
.contact-form .field-count.is-over { font-weight: 700; }
.main .contact-form .field-error {
  display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0;
  font-size: 14px; font-weight: 700; line-height: var(--lh-small); text-align: left;
}
.contact-form .err-mark {
  flex: none; display: inline-block; width: 18px; height: 18px; margin-top: 2px; background: #000; color: #fff;
  font-size: 13px; font-weight: 700; line-height: 18px; text-align: center;
}
/* The checkbox: system.css draws it on the label; larger, and lined up with Japanese text */
.contact-form .form-check { margin-top: 28px; }
.contact-form input[type="checkbox"] + label { margin-left: 0; padding-left: 30px; font-size: 15px; line-height: 1.6; cursor: pointer; }
.contact-form input[type="checkbox"] + label::before { left: 0; top: 2px; width: 18px; height: 18px; }
.contact-form input[type="checkbox"]:checked + label::after { left: 3px; top: 5px; }
.contact-form .is-error input[type="checkbox"] + label::before { border-width: 3px; }
.contact-form .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.contact-form .btn {
  min-width: 11em; padding: 8px 28px 6px; font-family: var(--text-font); font-size: 15px; font-weight: 700;
  line-height: 1.5; letter-spacing: var(--ls-button);
}
.contact-form .btn:disabled { cursor: progress; }
@media (hover: hover) { .contact-form .btn:not(:disabled):hover { background: #000; color: #fff; border-radius: 12px; } }
.main .contact-form .form-status { margin: 0; font-size: 14px; font-weight: 700; line-height: var(--lh-small); text-align: left; }
@media (max-width: 479px) { .contact-form .btn { width: 100%; } }
/* The list of what to fix, at the top after a failed send */
.contact-form .form-errors { margin-bottom: 28px; padding: 14px 18px; border: 3px solid #000; }
.contact-form .form-errors:focus { outline: none; }
.main .contact-form .form-errors-title { margin: 0 0 6px; font-weight: 700; text-align: left; }
.contact-form .form-errors ul { margin: 0; padding-left: 1.2em; font-size: 14px; line-height: var(--lh-small); }
.contact-form .form-errors li + li { margin-top: 4px; }
/* Left empty by people, out of sight */
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-done { margin: 48px 0 0; }
/* The 送信しました box: no rule on its left, as wide as the form was (owner, 2026-11-17) */
.contact-done .alert-box { max-width: 44em; }
.contact-done:focus { outline: none; }

/* 個人情報の取り扱い */
.policy { max-width: 40em; }
.policy h2 {
  margin: 40px 0 10px; font-family: var(--text-font); font-weight: 700; font-size: 18px;
  line-height: var(--lh-subheading); font-feature-settings: "palt"; letter-spacing: var(--ls-heading);
}
.policy ul { margin: 0; padding-left: 1.4em; }
.policy li + li { margin-top: 4px; }
.policy ul + p { margin-top: 12px; }

/* The page send.php shows when JavaScript is off: a plain white page */
.nojs-page { background: #fff; }
.nojs-page .main { max-width: 760px; min-height: 100vh; margin: 0 auto; }
