:root {
  color-scheme: light;
  --paper: #f2f1ed;
  --ink: #191b1b;
  --muted: #555852;
  --line: #cecfca;
  --accent: #2a46b5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.8 Arial, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif; }
a { color: inherit; text-underline-offset: .25em; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.madoha-shell { width: min(calc(100% - 40px), 1160px); margin-inline: auto; }
.madoha-header { border-bottom: 1px solid var(--ink); }
.madoha-header .madoha-shell { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 72px; }
.madoha-logo { font: 900 31px/.95 Arial, sans-serif; letter-spacing: -.09em; text-decoration: none; }
.madoha-logo span { color: var(--accent); }
.madoha-header a { display: inline-flex; align-items: center; min-height: 44px; }
.case-head { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 24px 60px; padding-block: clamp(40px,7vw,100px) clamp(28px,5vw,60px); }
.case-label { color: var(--accent); font-size: 13px; font-weight: 700; }
.case-head h1 { margin: 8px 0 0; font-size: clamp(44px,8vw,116px); line-height: 1; letter-spacing: -.075em; }
.case-head p { margin: 0; max-width: 45ch; color: var(--muted); }
.case-head h2 { margin: 0 0 8px; line-height: 1.4; font-size: clamp(20px,2.2vw,29px); letter-spacing: -.04em; }
.case-previews { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,26%); align-items: start; gap: clamp(16px,4vw,48px); border-top: 1px solid var(--ink); padding-top: 20px; }
figure { margin: 0; min-width: 0; }
figcaption { margin-bottom: 10px; font-size: 14px; font-weight: 700; }
figure img { display: block; width: 100%; height: auto; background: #e2e1db; border: 1px solid var(--line); }
.madoha-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.madoha-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 18px; border: 1px solid var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.madoha-button.primary { background: var(--ink); color: white; }
.madoha-button:hover { border-color: var(--accent); }
.madoha-button.primary:hover { background: var(--accent); }
.case-live { margin-block: 26px clamp(48px,7vw,92px); }
.case-consult { border-top: 1px solid var(--ink); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-block: clamp(25px,4vw,48px); }
.case-consult h2 { margin: 0; font-size: clamp(20px,3vw,34px); line-height: 1.35; letter-spacing: -.04em; }
.madoha-footer { border-top: 1px solid var(--line); padding-block: 20px 38px; font-size: 14px; }
.madoha-footer .madoha-shell { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.madoha-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.madoha-document { width: min(calc(100% - 40px), 800px); margin-inline: auto; padding-block: clamp(48px,10vw,110px); }
.madoha-document h1 { font-size: clamp(30px,5vw,53px); line-height: 1.2; letter-spacing: -.055em; margin: 0 0 24px; }
.document-page main { width: min(calc(100% - 40px), 800px); margin: auto; padding-block: clamp(36px,6vw,74px); }
.document-page main header { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 40px; }
.document-page .logo { font: 900 29px/.95 Arial, sans-serif; letter-spacing: -.09em; text-decoration: none; }
.document-page .logo span { color: var(--accent) !important; }
.document-page .crumb { font-size: 12px; color: var(--muted); }
.document-page .meta { font-size: 13px; font-weight: 700; color: var(--accent); }
.document-page h1 { font-size: clamp(30px,5vw,53px); line-height: 1.2; letter-spacing: -.055em; margin: 14px 0 24px; }
.document-page h2 { font-size: clamp(20px,3vw,26px); line-height: 1.45; letter-spacing: -.04em; margin: 38px 0 12px; }
.document-page h3 { font-size: 17px; margin: 24px 0 8px; }
.document-page p, .document-page li, .document-page dd { overflow-wrap: anywhere; }
.document-page .notice { padding: 14px 18px; margin-block: 26px; border-left: 3px solid var(--accent); background: #e9ebf6; }
.document-page .notice p { margin: 0; }
.document-page .term-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.document-page .term-grid > div { background: #fbfaf7; padding: 16px; }
.document-page .term-grid strong, .document-page .term-grid small { display: block; }
.document-page .term-grid small { color: var(--muted); }
.document-page .button { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 18px; color: white; background: var(--ink); text-decoration: none; font-weight: 700; }
.document-page .button:hover { background: var(--accent); }
.document-page footer { border-top: 1px solid var(--line); margin-top: 46px; padding-top: 16px; font-size: 14px; }
.document-page footer a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 16px; }
.document-page .madoha-staging { padding: 11px 20px; color: white; background: #202423; text-align: center; font-size: 12px; line-height: 1.7; }
.document-page .placeholder { background: #fff0b7; }
@media (max-width: 650px) {
  .case-head, .case-previews { grid-template-columns: minmax(0,1fr); }
  .case-previews figure:last-child { width: min(100%,360px); }
}
@media (max-width: 480px) {
  .document-page .term-grid { grid-template-columns: minmax(0,1fr); }
  .document-page .crumb { display: none; }
}
@media print {
  .document-page { background: white; }
  .document-page .madoha-staging, .document-page .button { display: none; }
  .document-page main { width: 100%; padding: 0; }
}
