/* The policy pages (/privacy, /site-policy, /anti-social-forces), one implementation for the three.
   2026-11-14 owner chose L8 「トップの写真を表紙に」: the Top's photograph in the Top's rounded frame as the cover,
   a white Mincho title on it, then the text in Mincho on the Top's paper. The footer is the shared one
   (ec-shared.css §3, data-tone="paper").
   2026-11-15 owner chose the small details P1–P8, D5, D7, D8 (written by Sierra scripts/ui/hp_policy_build.py):
   P1 phrase line breaks, P2 the arrival light, P3 section links, P4 print, P6 the address block,
   P8 the cover changes among the Top's eight scenes, D5 copy buttons (site-shared.css), D7 selection, D8 focus. */
:root {
  --paper: #edf0e9;
  --ink: #213b3b;
  --quiet: #526260;
  --mincho: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", serif;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.9 "Hiragino Sans",
    "Noto Sans JP",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

/* Cover: the Top's frame and photograph */
/* P8: which scene is set on <html data-cover> by the inline script in the head (a different one each visit); without
   scripts the harbour. Under the photograph, a blurred 24px copy of it and its colour, so a slow photograph comes
   out of its own colours and a missing one leaves no broken image (S10). */
:root,
:root[data-cover="harbor"] {
  --cover: url("/assets/harbor.webp");
  --cover-blur: url("data:image/webp;base64,UklGRnQAAABXRUJQVlA4IGgAAADQAwCdASoYAA4APt1ep00opSOiMAgBEBuJQBOj+ABODw3tPpFw+IgAyWo39ljKvMVw00vGSietqSVgAOFDsQBI6RY37g7e6kQsb6YsqnQ1G1dPxeYJp9+SpN2m7WUUh6XTyHEU9HEAAA==");
  --cover-tint: #6d6563;
  --cover-at: 50% 62%;
}
:root[data-cover="satoyama"] {
  --cover: url("/assets/top-scenes/satoyama.webp");
  --cover-blur: url("data:image/webp;base64,UklGRnYAAABXRUJQVlA4IGoAAAAwBACdASoYAA4APt1gqU2opaQiMAgBEBuJQBOmUABqRGH86ZDYVBpPGkAA/rH/Xw8LSckIL0CXxuejXf3h+KXYtfdDo1n/xcUYHP6lAmcvT/cdFGpXv+ubYUWEstoHLHV7yFdZS2lqUAAA");
  --cover-tint: #67735d;
  --cover-at: 50% 58%;
}
:root[data-cover="station"] {
  --cover: url("/assets/station.webp");
  --cover-blur: url("data:image/webp;base64,UklGRoYAAABXRUJQVlA4IHoAAAAwBACdASoYAA4APt1cpkyopSOiMAgBEBuJZQAAYZMTIbQp2S0f2F4o1gAA4gccOlXnBs0IyXCXMkFuAZxX0+zFYu0z0x5hj2/cVdte5kBytrAYLvfCwd074Wdf7M4TjeH9vsDiNYhO3O5/9VwHRS0E5GI9soJ8lYAAAA==");
  --cover-tint: #7a746b;
  --cover-at: 50% 60%;
}
:root[data-cover="craft"] {
  --cover: url("/assets/top-scenes/workshop.webp");
  --cover-blur: url("data:image/webp;base64,UklGRnwAAABXRUJQVlA4IHAAAAAQBACdASoYAA4APt1ap0yopSOiMAgBEBuJZwAAVL/tsnEWc2jdhCpWAAD+mo1/XKWWaeI0PMgK9zpaU6b7dkXno5AGVOkS7SUZpBhfYxW1XVJgk1sB94rQaRnl50I0A9Bv1QUZBUMUNtTdCbMcfgAA");
  --cover-tint: #5d5b59;
  --cover-at: 50% 56%;
}
:root[data-cover="arcade"] {
  --cover: url("/assets/arcade.webp");
  --cover-blur: url("data:image/webp;base64,UklGRnwAAABXRUJQVlA4IHAAAADwAwCdASoYAA4APt1cqUyopSQiMAgBEBuJYwCdAGjS3tbKEautX9tQAP77h6b+Ze4fOulWaHpNi5KAzm7voer/6eFtOepu7aF9uMmAalW+ty5JRTFc/J8TM1mxF4Q9E6eWwAzS77x6Mg+bZF3JgAAA");
  --cover-tint: #54514f;
  --cover-at: 50% 60%;
}
:root[data-cover="fields"] {
  --cover: url("/assets/top-scenes/fields.webp");
  --cover-blur: url("data:image/webp;base64,UklGRnYAAABXRUJQVlA4IGoAAADwAwCdASoYAA4APt1apkyopSOiMAgBEBuJagCw7CHYBmH3+MRUYg4AAP7gBjwozTYX4ykfXr0hUwEyZtIkCTZzdQ6XPR9BUxoSXTDIhro/DdYBlyO+UJvlSAPxJ/On1KlTTF9y7cQAa+AA");
  --cover-tint: #4c4c1d;
  --cover-at: 50% 58%;
}
:root[data-cover="onsen"] {
  --cover: url("/assets/top-scenes/onsen.webp");
  --cover-blur: url("data:image/webp;base64,UklGRoQAAABXRUJQVlA4IHgAAADQAwCdASoYAA4APt1gqU2opaQiMAgBEBuJaACdAB5AbPfiE/9DRNgA/uX8u6CiwnFmzjHbOfSLWIQCnxg6apY+0U+CKvCgW//O9253lXavM+DpUgB3ynq11OUq8tYxgiEsWXCKC4BQMIYkxpnBcb/go5l+vzUIAAA=");
  --cover-tint: #323136;
  --cover-at: 50% 55%;
}
:root[data-cover="snowtown"] {
  --cover: url("/assets/top-scenes/snowtown.webp");
  --cover-blur: url("data:image/webp;base64,UklGRoYAAABXRUJQVlA4IHoAAACwAwCdASoYAA4APt1cp00opSOiMAgBEBuJQBOgA8gNv63HfbQqwAD+7rHKEqTzYqhDmgK5CbYsd9JRGBKviMsSOiO/i11WcmKUoRJxT36E2aJ8mtCQ0xShBk4ZiMN7C37crdEnPrhFRRQSPU0wk4tXOIDhfugyij8QAA==");
  --cover-tint: #474958;
  --cover-at: 50% 60%;
}
.policy-cover {
  position: relative;
  margin: var(--frame-inset);
  height: min(62vh, 600px);
  min-height: 380px;
  border-radius: 36px;
  overflow: hidden;
  isolation: isolate;
  background:
    var(--cover) var(--cover-at) / cover no-repeat,
    var(--cover-blur) var(--cover-at) / cover no-repeat,
    var(--cover-tint);
}
.policy-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(11 22 34 / var(--cover-shade, 0.12)), #0b162200 40%, #0b16228c);
}
/* the scenes with a bright sky behind the logo get a little more shade at the top */
:root:is([data-cover="satoyama"], [data-cover="craft"]) {
  --cover-shade: 0.26;
}
:root[data-cover="fields"] {
  --cover-shade: 0.34;
}
.policy-cover h1 {
  position: absolute;
  left: clamp(28px, 5vw, 80px);
  right: clamp(28px, 5vw, 80px);
  bottom: clamp(44px, 7vh, 76px);
  margin: 0;
  color: #f4f3ef;
  font: 400 clamp(34px, 4vw, 54px)/1.3 var(--mincho);
  letter-spacing: 0.04em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.policy-cover p {
  position: absolute;
  left: clamp(28px, 5vw, 80px);
  bottom: clamp(16px, 3vh, 34px);
  margin: 0;
  color: #f4f3efcc;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.policy-cover .cover-rev {
  margin-left: 1.2em;
}

/* Text */
.policy-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 96px 24px 128px;
  font-family: var(--mincho);
  font-size: 16.5px;
  line-height: 2.05;
}
.policy-body p,
.policy-body ul,
.policy-body ol {
  margin: 0;
}
/* P1: lines break between phrases (<wbr> from BudouX at build time; keep-all keeps the words whole in every browser),
   the last line of a paragraph is not left with one or two letters (pretty), 、。 may hang past the right edge
   (Safari), and a little space between Japanese and Latin letters or numbers where the browser has it. */
.policy-body :is(p, li, h2) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.policy-body :is(p, li) {
  text-wrap: pretty;
  hanging-punctuation: allow-end;
}
.policy-body,
.policy-cover h1 {
  text-autospace: normal;
}
.policy-intro {
  margin-bottom: 64px;
}
.policy-body h2 {
  text-wrap: balance;
  margin: 0 0 16px;
  font:
    500 18px/1.7 "Hiragino Sans",
    "Noto Sans JP",
    sans-serif;
  letter-spacing: 0.01em;
}
.policy-body section > * + * {
  margin-top: 14px;
}
.policy-body ul,
.policy-body ol {
  padding: 0;
  list-style: none;
}
.policy-body li {
  position: relative;
  padding-left: 1.1em;
}
.policy-body ul > li::before {
  content: "・";
  position: absolute;
  left: -0.1em;
}
.policy-body ol {
  counter-reset: item;
}
.policy-body ol > li {
  counter-increment: item;
  padding-left: 2em;
}
.policy-body ol > li::before {
  content: "(" counter(item) ")";
  position: absolute;
  left: 0;
}
.policy-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #213b3b59;
  text-underline-offset: 4px;
}
@media (hover: hover) {
  .policy-body a:hover {
    text-decoration-color: currentColor;
  }
}

/* P3: the section number is the link to its section (a section without a number: its title). Nothing shows until
   the pointer is on it or the keyboard reaches it. */
.policy-body h2 .sec-link {
  color: inherit;
  text-decoration: none;
  border-radius: 3px;
}
@media (hover: hover) {
  .policy-body h2 .sec-link:hover {
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-underline-offset: 5px;
  }
}

/* P2: arriving at a section (「下の窓口」, a section link, or a link from elsewhere) lights its title once.
   Reduced motion: the title keeps a still, pale mark instead. */
.policy-body section {
  margin-top: 64px;
  scroll-margin-top: 32px;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  .policy-body section:target > h2 {
    animation: policy-arrive 2.6s ease-out 1;
  }
}
@keyframes policy-arrive {
  0%,
  35% {
    background-color: #f1cdbd;
    box-shadow: 0 0 0 7px #f1cdbd;
  }
  100% {
    background-color: #f1cdbd00;
    box-shadow: 0 0 0 7px #f1cdbd00;
  }
}
@media (prefers-reduced-motion: reduce) {
  .policy-body section:target > h2 {
    background-color: #f1cdbd8c;
    box-shadow: 0 0 0 7px #f1cdbd8c;
  }
}
.policy-body section > h2 {
  width: fit-content;
  border-radius: 4px;
}

/* P6: the company and the contact desk as one block; the address breaks only at its spaces */
.policy-body .org > span {
  display: block;
}
.policy-body .desk > p + p {
  margin-top: 0;
}
.policy-body .nb {
  white-space: nowrap;
}
.policy-body .copy-button {
  margin-left: 0.4em;
}

/* D7: selected text in a pale vermilion on the paper. D8: the keyboard ring in the ink, around the shape it is on. */
::selection {
  background: #f1cdbd;
  color: #213b3b;
}
.policy-cover ::selection {
  background: #f4f3ef;
  color: #213b3b;
}
.policy-body :is(a, button):focus-visible,
.skip-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 3px;
}

/* P7: revisions, one line each under 制定 */
.policy-sign .rev a {
  margin-left: 0.5em;
}
.policy-sign {
  margin-top: 88px !important;
  text-align: right;
  font-size: 15px;
}

@media (max-width: 760px) {
  .policy-cover {
    height: 46vh;
    min-height: 300px;
    border-radius: 24px;
  }
  .policy-cover h1 {
    font-size: 30px;
    bottom: 52px;
  }

  .policy-body {
    padding: 64px 22px 96px;
    font-size: 16px;
    line-height: 2;
  }
  .policy-intro {
    margin-bottom: 48px;
  }
  .policy-body section {
    margin-top: 52px;
  }
  .policy-body ol > li {
    padding-left: 1.75em;
  }
  .policy-sign {
    margin-top: 64px !important;
  }
}

/* P4: printed (or saved as PDF), the page is a plain document: no photograph, header or footer, the title and the
   date in ink, Mincho text, and the address of the links that lead elsewhere. */
@media print {
  @page {
    margin: 18mm 17mm 20mm;
  }
  html,
  body {
    background: #fff;
  }
  body {
    color: #000;
  }
  .skip-link,
  .policy-cover > .header,
  .policy-cover .navigation,
  .policy-cover::after,
  .site-footer {
    display: none !important;
  }
  .policy-cover {
    height: auto;
    min-height: 0;
    margin: 0 0 9mm;
    border-radius: 0;
    overflow: visible;
    background: none;
  }
  .policy-cover h1,
  .policy-cover p {
    position: static;
    color: #000;
  }
  .policy-cover h1 {
    font-size: 20pt;
    line-height: 1.4;
  }
  .policy-cover p {
    margin-top: 2mm;
    font-size: 9pt;
    color: #333;
  }
  .policy-body {
    max-width: none;
    padding: 0;
    font-size: 10.5pt;
    line-height: 1.85;
  }
  .policy-intro {
    margin-bottom: 7mm;
  }
  .policy-body section {
    margin-top: 7mm;
  }
  .policy-body h2 {
    margin-bottom: 2mm;
    font-size: 11pt;
    break-after: avoid;
  }
  .policy-body :is(p, li) {
    orphans: 3;
    widows: 3;
  }
  .policy-body a {
    text-decoration: none;
  }
  .policy-body a[href^="/"]::after {
    content: "（https://meiroku.com" attr(href) "）";
    font-size: 8.5pt;
  }
  .policy-body section:target > h2 {
    animation: none;
    background: none;
    box-shadow: none;
  }
  .policy-sign {
    margin-top: 12mm !important;
    font-size: 9.5pt;
  }
}

/* The dates take two lines on the smallest phones (制定 and 改定 do not fit on one at 320px): 改定 starts its own line
   and the title rises by one line of the dates, so the two never meet (2026-11-17). */
@media (max-width: 359px) {
  .policy-cover .cover-rev {
    display: block;
    margin-left: 0;
  }
  .policy-cover:has(.cover-rev) h1 {
    bottom: calc(52px + 13px * 1.9);
  }
}

/* The Top's header (site-header.css, site-shared.js; owner 2026-11-17: 「ポリシーページもトップページと全く同じように
   ハンバーガーメニューのヘッダー共通して使えばいい」). The cover is its frame, as far in as the Top's stage (--frame-inset). There the
   menu covers the screen as it covers the Top's stage, and the page underneath stays still while it is open. The
   contact buttons are links here (the Top opens its form at /#contact). */
@media (max-width: 760px) {
  .policy-cover > nav.navigation {
    position: fixed;
    inset: var(--frame-inset);
  }
  html.menu-open {
    overflow: hidden;
  }
  /* Under the menu, the cover's scene, blurred, as the Top's living landscape is under its menu: the cover's own
     blurred copy (--cover-blur) over the whole frame (the menu's glass only blurs what is inside the cover, and the
     paper page below it would show through grey). It comes and goes with the menu. */
  html.menu-open .policy-cover::before {
    content: "";
    position: fixed;
    inset: var(--frame-inset);
    z-index: 14;
    border-radius: 24px;
    background:
      var(--cover-blur) var(--cover-at) / cover no-repeat,
      var(--cover-tint);
    filter: saturate(1.35);
    pointer-events: none;
  }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  html.menu-open .policy-cover::before {
    animation: m3-veil 0.55s ease both;
  }
}
