/*
 * 会員サイトの共通スタイル。2012〜2019年の公式メンバーサイトの雰囲気（苔色の地、金属枠、
 * 羊皮紙の中央パネル、左右のバナー列）を、公式画像を使わず CSS と自作 SVG で再現する。
 * インラインの style/script は CSP で禁止しているので、見た目はすべてこのファイルに置く。
 */

:root {
  --page-w: 980px;
  --side-w: 176px;
  --gap: 10px;

  --ink: #2b1d10;
  --ink-soft: #5b4630;
  --ink-mute: #8a7254;
  --link: #6b2a08;
  --link-hover: #b2400c;

  --parch: #fbf2de;
  --parch-line: #dcc8a0;

  --steel-hi: #eef1f3;
  --steel: #a9b0b6;
  --steel-mid: #7d858c;
  --steel-lo: #4b5258;
  --steel-edge: #24282c;

  --night: #36424c;

  --gold-1: #fff3bd;
  --gold-2: #e5b84c;
  --gold-3: #9c6914;

  --ok: #2f7d32;
  --warn: #c07a06;
  --bad: #b3261e;
  --unknown: #6d6d6d;

  --font:
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui,
    sans-serif;
  --font-head:
    "Hiragino Kaku Gothic StdN", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo,
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  /* 周辺を暗くして（ビネット）タイルの繰り返しを目立たなくする。MHF-Z の背景の陰影に寄せる */
  background:
    radial-gradient(ellipse 70% 90% at 50% 35%, transparent 45%, rgba(8, 14, 4, 0.6) 100%) fixed,
    #34472a url("/assets/tex/stone.svg") fixed;
  min-height: 100vh;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid #ffcf4a;
  outline-offset: 2px;
}

img {
  max-width: 100%;
}

/* hidden 属性は UA の display: none なので、display を指定したクラス（.field など）に負ける */
[hidden] {
  /* biome-ignore lint/complexity/noImportantStyles: 同じ詳細度の後続クラスより優先させるため */
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ───────────────────────── 最上部のユーティリティバー ───────────────────────── */

.topbar {
  background: #000;
  border-bottom: 1px solid #1a1a1a;
  color: #e6e6e6;
  font-size: 11px;
}

.topbar__inner {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 12px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f0c64a;
  text-shadow: 0 1px 0 #000;
}

.topbar__brand img {
  width: 20px;
  height: 20px;
}

.topbar__links {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.topbar__links li + li::before {
  content: "|";
  color: #8a8a8a;
  margin: 0 8px;
}

.topbar__links a {
  color: #f2f2f2;
}

.topbar__links a:hover {
  color: #ffd46b;
}

/* ───────────────────────── ページ本体（MHF-Z 風の焦げ茶の革） ───────────────────────── */

.page {
  max-width: var(--page-w);
  margin: 0 auto;
  background: #2f241e url("/assets/tex/leather.svg");
  border-left: 1px solid #120c09;
  border-right: 1px solid #120c09;
  box-shadow:
    0 0 0 1px rgba(255, 220, 170, 0.06),
    0 0 50px rgba(0, 0, 0, 0.7);
  position: relative;
}

/* ───────────────────────── ヘッダー（タイトルと紋章） ───────────────────────── */

.masthead {
  position: relative;
  height: 168px;
  padding: 22px 30px 0;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 55%, rgba(170, 60, 20, 0.45), transparent 60%),
    linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.55));
}

.masthead::before {
  /* 背後の光彩 */
  content: "";
  position: absolute;
  inset: -40% -10% auto 20%;
  height: 320px;
  background: radial-gradient(closest-side, rgba(255, 200, 110, 0.22), transparent);
  pointer-events: none;
}

.masthead::after {
  /* ナビの上に落ちる影 */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.masthead__crest {
  position: relative;
  width: 104px;
  height: 104px;
  flex: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.7));
}

.masthead__title {
  position: relative;
  margin: 0;
  line-height: 1.05;
}

.masthead__kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.42em;
  color: #e9cf96;
  text-shadow: 0 1px 0 #000;
  margin-bottom: 6px;
}

.masthead__name {
  display: block;
  font-family: var(--font-head);
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(
    180deg,
    var(--gold-1) 0%,
    #f6d77a 38%,
    var(--gold-3) 52%,
    #d9a843 70%,
    #fff0b0 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px rgba(60, 30, 2, 0.6);
  filter: drop-shadow(0 2px 0 #1a0c02) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.7));
}

.masthead__sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.12em;
}

.badge-unofficial {
  padding: 1px 8px;
  border-radius: 2px;
  background: linear-gradient(#8a1f12, #561107);
  border: 1px solid #2a0703;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.masthead__sub em {
  font-style: normal;
  color: #f2e7b8;
  text-shadow: 0 1px 2px #000;
}

/* ───────────────────────── グローバルナビ（黒鉄の枠にクリーム色の板） ───────────────────────── */

.gnav {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 5px 30px;
  background: linear-gradient(#4a4a4a, #1e1e1e 45%, #0d0d0d 55%, #2e2e2e);
  border-top: 1px solid #6b6b6b;
  border-bottom: 1px solid #000;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 3px 6px rgba(0, 0, 0, 0.6);
}

.gnav::before,
.gnav::after {
  /* 両端の鋲（縦に3つ） */
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 26px;
  margin-top: -13px;
  background:
    radial-gradient(circle at 50% 3px, #e8e2d4 0 2px, transparent 2.5px) 0 0 / 6px 10px repeat-y;
}

.gnav::before {
  left: 10px;
}

.gnav::after {
  right: 10px;
}

.gnav__drawer {
  display: none;
}

.gnav__list {
  list-style: none;
  margin: 0;
  padding: 0 6px;
  display: flex;
  justify-content: space-between;
  border-radius: 3px;
  background: linear-gradient(#f4ecdc, #ddd1b8 50%, #c9bb9c 51%, #e6dcc6);
  border: 1px solid #000;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 2px rgba(80, 60, 30, 0.4);
}

.gnav__list li {
  flex: 1;
  text-align: center;
  position: relative;
}

.gnav__list li + li::before {
  /* 刻み込まれた区切り線 */
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2px;
  background: linear-gradient(90deg, #8f7f62 50%, #fffaf0 50%);
}

.gnav__list a {
  display: block;
  padding: 6px 4px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #2a1f14;
  text-shadow: 0 1px 0 #fff;
}

.gnav__list a:hover,
.gnav__list a:focus-visible {
  color: #9c2a06;
  text-decoration: none;
  background: linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
}

.gnav__list a[aria-current="page"] {
  color: #b0300a;
  background: linear-gradient(rgba(120, 80, 20, 0.18), rgba(255, 255, 255, 0.15));
  box-shadow: inset 0 1px 3px rgba(60, 30, 0, 0.35);
}

/* ───────────────────────── 3カラム ───────────────────────── */

.columns {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr) var(--side-w);
  /* HTML の順は中央→左→右（読み上げの順）。見た目は領域で左｜中央｜右に置く */
  grid-template-areas: "left main right";
  gap: var(--gap);
  padding: 14px 12px 18px;
}

.columns > main {
  grid-area: main;
}

.columns > .side--left {
  grid-area: left;
}

.columns > .side--right {
  grid-area: right;
}

.columns--solo {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "main";
  max-width: 640px;
  margin: 0 auto;
}

.side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 320px;
  /* 下部のつる模様（MHF-Z の左右カラムの装飾を自作 SVG で再現） */
  background: url("/assets/vine.svg") 50% 100% / 64px auto no-repeat;
}

/* 左右のバナー列（黒鉄の細い枠） */
.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid #0b0806;
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(214, 180, 120, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.05);
}

.rail + .rail {
  margin-top: 4px;
}

.rail__title {
  margin: 0 0 2px;
  padding: 4px 6px;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #f8ecd2;
  background: linear-gradient(#7a1a0a, #4a0d04);
  border: 1px solid #1a0402;
  border-radius: 2px;
  text-shadow: 0 1px 0 #000;
  box-shadow: inset 0 1px 0 rgba(255, 200, 150, 0.25);
}

/* ───────────────────────── バナー（自作。公式画像は使わない） ───────────────────────── */

.bnr {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 64px;
  padding: 8px 9px 22px;
  border: 2px solid #1d1c10;
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 2px 3px rgba(0, 0, 0, 0.5);
  color: #fff;
  text-decoration: none;
  isolation: isolate;
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}

.bnr:hover,
.bnr:focus-visible {
  text-decoration: none;
  color: #fff;
  filter: brightness(1.1) saturate(1.1);
  transform: translateY(-1px);
}

.bnr::before {
  /* 斜めの光の帯 */
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.22) 46%, transparent 52%),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 0 6px, transparent 6px 12px);
}

.bnr__title {
  display: block;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-shadow:
    -1px -1px 0 #2a1205,
    1px -1px 0 #2a1205,
    -1px 1px 0 #2a1205,
    1px 1px 0 #2a1205,
    0 3px 3px rgba(0, 0, 0, 0.6);
}

.bnr__title small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.bnr__pill {
  position: absolute;
  right: 5px;
  bottom: 4px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  border-radius: 9px;
  background: linear-gradient(#5ec43c, #23700f);
  border: 1px solid #10380a;
  text-shadow: 0 1px 0 #10380a;
}

.bnr__pill::after {
  content: " ▶";
  font-size: 8px;
}

.bnr--fire {
  background: linear-gradient(160deg, #f6c14b 0%, #e2711c 40%, #9c2310 100%);
}

.bnr--sky {
  background: linear-gradient(160deg, #aee3ff 0%, #3c8fd6 45%, #173f80 100%);
}

.bnr--moss {
  background: linear-gradient(160deg, #e2ef9a 0%, #7aa52b 45%, #2e4c0f 100%);
}

.bnr--blood {
  background: linear-gradient(160deg, #ff9e7a 0%, #c8321b 45%, #5a0b05 100%);
}

.bnr--steel {
  background: linear-gradient(160deg, #f1f4f6 0%, #8e98a1 45%, #39414a 100%);
}

.bnr--night {
  background: linear-gradient(160deg, #b9a6ff 0%, #5a3fb0 45%, #1f1250 100%);
}

.bnr--pill-blue .bnr__pill {
  background: linear-gradient(#5fb4ff, #1d5fb6);
  border-color: #0b2a57;
  text-shadow: 0 1px 0 #0b2a57;
}

.bnr--pill-red .bnr__pill {
  background: linear-gradient(#ff7b5c, #b3261e);
  border-color: #4a0b06;
  text-shadow: 0 1px 0 #4a0b06;
}

/* 下段の「金属プレート」リンク */
.plate-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #f4ecdc;
  background: linear-gradient(#4a3f36, #231c17 55%, #15100c);
  border: 1px solid #000;
  border-top-color: #8a6a3a;
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 160, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.06);
  text-shadow: 0 1px 0 #000;
}

.plate-link::before {
  content: "»";
  color: #e2b54a;
}

.plate-link:hover,
.plate-link:focus-visible {
  color: #ffe08a;
  text-decoration: none;
}

/* ───────────────────────── 中央の羊皮紙パネル ───────────────────────── */

.scroll {
  position: relative;
  padding: 20px 20px 26px;
  background: var(--parch) url("/assets/tex/parchment.svg");
  border-radius: 10px;
  border: 2px solid #6b4a24;
  box-shadow:
    0 0 0 2px #1b120b,
    0 0 0 4px #8a6a3a,
    0 0 0 5px #120c08,
    0 6px 16px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    inset 0 0 36px rgba(140, 92, 32, 0.38);
  min-height: 420px;
  /* 左右のカラムがある画面でも、長い URL・IPv4 などで中央のカラムを押し広げない */
  min-width: 0;
  overflow-wrap: break-word;
}

.scroll > * + * {
  margin-top: 18px;
}

.page-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 900;
  color: #4a2008;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  padding-bottom: 8px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #8a5a1c, #e8c06a 40%, transparent) 1;
}

.page-title::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: none;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #ffe9a3, #b47a1c);
  border: 1px solid #4a2a05;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.lead {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

/* 見出し帯（MHF-Z 風の焦げ茶の帯 + MORE） */
.sec {
  margin: 0;
}

.sec__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 6px;
  padding: 5px 10px 5px 22px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fbf1dc;
  background:
    radial-gradient(ellipse at 80% 50%, rgba(160, 70, 30, 0.45), transparent 70%),
    linear-gradient(#5a3a28, #3a2418 55%, #24160e);
  border: 1px solid #120a05;
  border-bottom: 2px solid #8a3a14;
  box-shadow: inset 0 1px 0 rgba(255, 210, 160, 0.2);
  text-shadow: 0 1px 0 #000;
}

.sec__head::before {
  /* 左端の三角 */
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  margin-top: -5px;
  border: 5px solid transparent;
  border-left: 7px solid #e2b54a;
  border-right: 0;
}

.sec__head h2,
.sec__head h3 {
  margin: 0;
  font-size: inherit;
}

.more {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.more::before {
  content: "▶ ";
  font-size: 8px;
}

.more:hover,
.more:focus-visible {
  color: #ffd46b;
  text-decoration: none;
}

/* お知らせ一覧 */
.news {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news li {
  display: grid;
  grid-template-columns: 7.2em minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: baseline;
  padding: 5px 4px;
  border-bottom: 1px dotted var(--parch-line);
}

.news time {
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.news a {
  color: #3a2814;
}

.news a:hover {
  color: var(--link-hover);
}

.tag-new {
  display: inline-block;
  margin-left: 6px;
  padding: 0 4px;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
  line-height: 14px;
  letter-spacing: 0.04em;
  color: #fff;
  border-radius: 2px;
  background: linear-gradient(#e83a22, #b5180a);
  border: 1px solid #fff;
  outline: 1px solid #7a0d04;
  vertical-align: 1px;
}

/* 重要な記事の印（一覧・記事の見出し） */
.tag-important {
  display: inline-block;
  margin-right: 6px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 900;
  line-height: 15px;
  color: #fff;
  border-radius: 2px;
  background: linear-gradient(#ee9a2a, #c86a0e);
  border: 1px solid #7a3a04;
  vertical-align: 1px;
}

/* 一覧のページ送り */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* 2019年版風のカテゴリタグ */
.cat {
  display: inline-block;
  min-width: 5.4em;
  padding: 0 6px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  color: #fff;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}

.cat--service {
  background: linear-gradient(#8a5fc4, #5a3592);
}

.cat--event {
  background: linear-gradient(#4fae49, #23711d);
}

.cat--campaign {
  background: linear-gradient(#4b93d8, #1f5ea8);
}

.cat--trouble {
  background: linear-gradient(#a8902a, #6c5a10);
}

.cat--maint {
  background: linear-gradient(#d5583f, #962515);
}

/* 重要なお知らせ（MHF-Z 風: 濃い赤の見出し + オレンジの本文 + 右上の紋） */
.important {
  position: relative;
  overflow: hidden;
  border: 1px solid #3a0802;
  box-shadow: 0 2px 4px rgba(60, 20, 0, 0.35);
}

.important::after {
  /* 右上の白い紋（同心円）。公式の紋様の代わりに CSS で描く */
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle,
    rgba(255, 245, 220, 0.55) 0 3px,
    transparent 3px 8px
  );
  pointer-events: none;
}

.important__head {
  margin: 0;
  padding: 6px 12px;
  position: relative;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fff;
  background: linear-gradient(#7d1605, #5a0d02);
  text-shadow: 0 1px 0 #000;
}

.important .news {
  position: relative;
  padding: 4px 8px 6px;
  background: linear-gradient(#ee9a2a, #e2861a);
}

.important .news li {
  border-bottom: 0;
}

.important .news time {
  color: #fff6e0;
}

.important .news a {
  color: #fff;
  text-shadow: 0 1px 0 rgba(90, 30, 0, 0.5);
}

.important .news a:hover {
  color: #3a0d00;
}

/* ───────────────────────── TOP のヒーローバナー ───────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  border: 3px solid #2a1405;
  border-radius: 4px;
  min-height: 150px;
  padding: 18px 22px;
  color: #fff;
  background:
    radial-gradient(
      circle at 18% 40%,
      rgba(255, 238, 160, 0.95),
      rgba(255, 170, 40, 0.6) 18%,
      transparent 42%
    ),
    repeating-conic-gradient(
      from 0deg at 18% 40%,
      rgba(255, 210, 90, 0.28) 0 6deg,
      transparent 6deg 14deg
    ),
    linear-gradient(120deg, #6e1309 0%, #b1360f 40%, #3c0c05 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 140, 0.6),
    0 3px 6px rgba(0, 0, 0, 0.4);
  isolation: isolate;
}

.hero::after {
  /* 下部の装飾帯 */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  z-index: -1;
}

.hero__seal {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 104px;
  height: 104px;
  margin-top: -52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 14px;
  line-height: 1.2;
  color: #4a0d02;
  background:
    radial-gradient(circle, #fff6c8 0 55%, transparent 56%),
    conic-gradient(#f6b33a 0 10deg, #ffd977 10deg 20deg);
  -webkit-mask:
    radial-gradient(circle, #000 66%, transparent 67%),
    repeating-conic-gradient(#000 0 10deg, transparent 10deg 20deg);
  mask:
    radial-gradient(circle, #000 66%, transparent 67%),
    repeating-conic-gradient(#000 0 10deg, transparent 10deg 20deg);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
  transform: rotate(-8deg);
}

.hero__body {
  margin-left: 130px;
}

.hero__kicker {
  display: inline-block;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #ffe9a6;
  border: 1px solid rgba(255, 230, 150, 0.6);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.25);
}

.hero__title {
  margin: 6px 0 0;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fffbe6 0%, #ffe08a 45%, #e59b22 55%, #fff1b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px #3a0a02;
  filter: drop-shadow(0 2px 0 #2a0601) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
}

.hero__meta {
  margin: 10px 0 0;
  display: inline-block;
  padding: 2px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(#2f5bb2, #173576);
  border: 1px solid #0b1a3d;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ヒーロー下の小バナー2枚並び */
.mini-bnrs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-bnrs .bnr {
  min-height: 56px;
}

/* ───────────────────────── お知らせ帯（警告・情報） ───────────────────────── */

.notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.notice__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
}

.notice__text strong {
  display: block;
}

.notice--warn {
  background: linear-gradient(#fff3cf, #ffe39a);
  border-color: #c99417;
  color: #4d3300;
}

.notice--warn .notice__icon {
  background: linear-gradient(#ffb13b, #c06d00);
}

.notice--bad {
  background: linear-gradient(#ffe0da, #ffc1b5);
  border-color: #c2402c;
  color: #5a1007;
}

.notice--bad .notice__icon {
  background: linear-gradient(#ff6f55, #a5210f);
}

.notice--info {
  background: linear-gradient(#e6f1ff, #cfe2fb);
  border-color: #5c8ccc;
  color: #10325f;
}

.notice--info .notice__icon {
  background: linear-gradient(#5aa0f2, #1f5ea8);
}

/* ───────────────────────── ボタン ───────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 18px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  border-radius: 4px;
  border: 1px solid #3a1503;
  background: linear-gradient(#e59a3c, #b0520f 55%, #8a3a06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 2px 3px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
  cursor: pointer;
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
  color: #fff;
  text-decoration: none;
  filter: brightness(1.08);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.35);
}

.btn--primary {
  border-color: #0d2f0a;
  background: linear-gradient(#7fd15a, #3a8f1f 55%, #1f5c0f);
}

.btn--steel {
  color: #1f2326;
  border-color: #2b3034;
  background: linear-gradient(var(--steel-hi), #c3c9ce 50%, #8d959c);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn--steel:hover,
.btn--steel:focus-visible {
  color: #1f2326;
}

.btn--danger {
  border-color: #3d0703;
  background: linear-gradient(#ff7a5e, #b8301c 55%, #7c1408);
}

.btn--big {
  padding: 12px 28px;
  font-size: 16px;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  filter: grayscale(0.7) brightness(0.9);
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ───────────────────────── カード・表・フォーム ───────────────────────── */

.card {
  padding: 14px 16px;
  background: rgba(255, 252, 242, 0.75);
  border: 1px solid #c9b27f;
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(90, 60, 20, 0.2);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -2px 0 10px;
}

.card__title {
  margin: 0;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 900;
  color: #4a2008;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 10px 12px;
  border-radius: 6px;
  background: linear-gradient(#fffaf0, #f3e3c0);
  border: 1px solid #cdb27a;
}

.stat__label {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
}

.stat__value {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 900;
  color: #4a2008;
}

.stat__value small {
  font-size: 12px;
  color: var(--ink-soft);
}

.kv {
  display: grid;
  grid-template-columns: 9em minmax(0, 1fr);
  gap: 6px 12px;
  margin: 0;
}

.kv dt {
  color: var(--ink-mute);
}

.kv dd {
  margin: 0;
  font-weight: 700;
}

.mono {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.95em;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  background: rgba(255, 252, 242, 0.85);
  border: 1px solid #b89c64;
  border-radius: 4px;
  overflow: hidden;
}

.table th,
.table td {
  padding: 7px 10px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #e3d2ac;
}

.table thead th {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #fff;
  background: linear-gradient(#6a5a3e, #3d3220);
  text-shadow: 0 1px 0 #000;
  border-bottom: 1px solid #1f170b;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: rgba(255, 238, 190, 0.45);
}

.field {
  display: grid;
  gap: 4px;
}

.field label,
.field .label {
  font-weight: 700;
  color: #4a2008;
}

.field .hint {
  font-size: 11px;
  color: var(--ink-mute);
}

.req {
  margin-left: 6px;
  padding: 0 5px;
  font-size: 10px;
  color: #fff;
  border-radius: 2px;
  background: #a5210f;
}

.input {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fffdf6;
  border: 1px solid #a88c58;
  border-radius: 4px;
  box-shadow: inset 0 2px 3px rgba(90, 60, 20, 0.15);
}

.input:focus {
  outline: 2px solid #e8a33a;
  outline-offset: 0;
  border-color: #8a5a1c;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: #b0520f;
}

/* ───────────────────────── 状態チップ・期限メーター ───────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid;
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.chip--ok {
  color: var(--ok);
  background: #e3f4dc;
  border-color: #9ccf8a;
}

.chip--warn {
  color: #8a5300;
  background: #fff1cf;
  border-color: #e3b65a;
}

.chip--bad {
  color: var(--bad);
  background: #ffe1dc;
  border-color: #e59a8c;
}

.chip--unknown {
  color: var(--unknown);
  background: #eeeeea;
  border-color: #c3c3bb;
}

.chip--pending {
  color: #1f5ea8;
  background: #e2eefc;
  border-color: #98bbe6;
}

.chip--pending::before {
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

.meter {
  position: relative;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(#3a2f20, #5a4a33);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.meter__bar {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 5px;
  background: linear-gradient(#a6f07a, #3f9a1d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* 幅は 5% 刻みのクラスで指定する（インライン style を使わないため） */
.w-0 {
  width: 0%;
}
.w-5 {
  width: 5%;
}
.w-10 {
  width: 10%;
}
.w-15 {
  width: 15%;
}
.w-20 {
  width: 20%;
}
.w-25 {
  width: 25%;
}
.w-30 {
  width: 30%;
}
.w-35 {
  width: 35%;
}
.w-40 {
  width: 40%;
}
.w-45 {
  width: 45%;
}
.w-50 {
  width: 50%;
}
.w-55 {
  width: 55%;
}
.w-60 {
  width: 60%;
}
.w-65 {
  width: 65%;
}
.w-70 {
  width: 70%;
}
.w-75 {
  width: 75%;
}
.w-80 {
  width: 80%;
}
.w-85 {
  width: 85%;
}
.w-90 {
  width: 90%;
}
.w-95 {
  width: 95%;
}
.w-100 {
  width: 100%;
}

.meter--warn .meter__bar {
  background: linear-gradient(#ffd877, #d48a07);
}

.meter--bad .meter__bar {
  background: linear-gradient(#ff8f7a, #b3261e);
}

/* IP スロット（マイページ/IP管理） */
.slots {
  display: grid;
  gap: 10px;
}

.slot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 6px;
  background: linear-gradient(#fffaf0, #f4e6c6);
  border: 1px solid #c9ad74;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.slot__no {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 15px;
  color: #fff;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f7cf72, #a8661a 70%);
  border: 2px solid #4a2805;
  text-shadow: 0 1px 0 #4a2805;
}

.slot__ip {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 17px;
  font-weight: 700;
  color: #2b1d10;
}

.slot__ip .chip {
  margin-left: 8px;
  font-family: var(--font);
  vertical-align: 2px;
}

.slot__meta {
  grid-column: 2;
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-soft);
}

.slot__actions {
  grid-row: 1 / span 2;
  grid-column: 3;
  display: grid;
  gap: 6px;
}

.slot--empty {
  background:
    repeating-linear-gradient(-45deg, rgba(160, 130, 80, 0.08) 0 8px, transparent 8px 16px),
    rgba(255, 250, 238, 0.6);
  border-style: dashed;
}

.slot--empty .slot__no {
  filter: grayscale(1) opacity(0.6);
}

.slot--expired {
  background: linear-gradient(#fff2ee, #f8d9d0);
  border-color: #d78f80;
}

/* 置換・削除の確認（JS を使わず details で開閉し、チェックを入れてから送信する） */
.slot-action > summary {
  list-style: none;
  cursor: pointer;
}

.slot-action > summary::-webkit-details-marker {
  display: none;
}

.slot-action__form {
  display: grid;
  gap: 6px;
  max-width: 260px;
  margin-top: 6px;
  font-size: 12px;
}

.slot-action__form .check {
  align-items: flex-start;
}

/* 登録済み IPv4 の手動延長（選択・リスクの確認。延長は ip-renew.js がパスキーで行う） */
.renew-form {
  display: grid;
  gap: 10px;
}

.renew-form__targets {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.renew-form .check {
  align-items: flex-start;
}

.renew-form__ip {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: 700;
  margin-right: 6px;
}

/* 右カラムの「接続状況」ミニカード */
.status-card {
  padding: 8px;
  border-radius: 4px;
  background: var(--parch) url("/assets/tex/parchment.svg");
  border: 2px solid #2a2d18;
  box-shadow: inset 0 0 12px rgba(140, 92, 32, 0.35);
  font-size: 11px;
}

.status-card__ip {
  display: grid;
  gap: 3px;
  padding: 6px 0;
  border-bottom: 1px dotted var(--parch-line);
}

.status-card__ip:last-of-type {
  border-bottom: 0;
}

.status-card__ip .mono {
  font-weight: 700;
  font-size: 12px;
}

.status-card .chip {
  font-size: 10px;
  padding: 0 6px;
}

/* ───────────────────────── 記事（お知らせ詳細） ───────────────────────── */

.article__head {
  padding: 12px 14px;
  border-radius: 4px;
  color: #fff;
  background: linear-gradient(#6d1a0b, #3c0c05);
  border: 1px solid #1d0602;
  box-shadow: inset 0 1px 0 rgba(255, 200, 150, 0.3);
}

.article__head h1 {
  margin: 4px 0 0;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.03em;
}

.article__head time {
  font-size: 12px;
  color: #ffd9a6;
}

.article__body {
  font-size: 14px;
  line-height: 1.9;
}

.article__body h2 {
  margin: 22px 0 8px;
  padding: 4px 10px;
  font-size: 15px;
  color: #4a2008;
  border-left: 6px solid #b0520f;
  background: linear-gradient(90deg, rgba(232, 192, 106, 0.45), transparent);
}

.article__body p {
  margin: 0 0 12px;
}

.article__body h3,
.article__body h4,
.article__body h5,
.article__body h6 {
  margin: 18px 0 6px;
  font-size: 14px;
  color: #4a2008;
}

.article__body ul,
.article__body ol {
  margin: 0 0 12px;
  padding-left: 1.6em;
}

.article__body blockquote {
  margin: 0 0 12px;
  padding: 4px 12px;
  color: var(--ink-mute);
  border-left: 4px solid var(--parch-line);
}

.article__body pre {
  overflow-x: auto;
  margin: 0 0 12px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.6;
  background: rgba(255, 253, 246, 0.8);
  border: 1px solid var(--parch-line);
  border-radius: 4px;
}

.article__body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.article__body table {
  /* 幅の広い表は中央のカラムの中で横にスクロールさせる（左右のカラムを押し出さない） */
  display: block;
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 12px;
  border-collapse: collapse;
}

.article__body th,
.article__body td {
  padding: 4px 10px;
  border: 1px solid var(--parch-line);
}

.article__body a {
  overflow-wrap: anywhere;
}

/* 記事に埋め込んだ画像（decisions Q-134） */
.article__img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* 記事の画像以外の URL の画像は読み込まず代替テキストだけを出す（decisions Q-118） */
.article__img-omitted {
  color: var(--ink-mute);
}

.article__unpublished {
  font-size: 12px;
  color: #ffd9a6;
}

/* ───────────────────────── タブ（2019年版のお知らせタブ） ───────────────────────── */

.tabs {
  display: flex;
  gap: 2px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  border-bottom: 3px solid #b8361a;
}

.tabs a {
  display: block;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(#5a4a3a, #2c2218);
  text-shadow: 0 1px 0 #000;
}

.tabs a:hover {
  text-decoration: none;
  filter: brightness(1.2);
}

.tabs a[aria-current="page"] {
  background: linear-gradient(#e8573a, #b8361a);
}

/* ───────────────────────── ステップ（初回登録） ───────────────────────── */

.steps {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  flex: 1;
  position: relative;
  padding: 6px 8px 6px 34px;
  font-size: 12px;
  font-weight: 700;
  color: #6b5a40;
  background: linear-gradient(#efe1bd, #dcc495);
  border: 1px solid #b89c64;
  border-radius: 3px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 8px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #fff;
  background: #9c8357;
}

.steps li[aria-current="step"] {
  color: #fff;
  background: linear-gradient(#e59a3c, #b0520f);
  border-color: #5a2805;
  text-shadow: 0 1px 0 #5a2805;
}

.steps li[aria-current="step"]::before {
  background: #5a2805;
}

.steps li.is-done {
  color: #2f5a1a;
  background: linear-gradient(#e7f3d6, #c8e0a6);
  border-color: #7ea85a;
}

.steps li.is-done::before {
  content: "✓";
  background: #3f7a1f;
}

/* パスキーの大きなアイコン */
.passkey-mark {
  width: 76px;
  height: 76px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  background: radial-gradient(circle at 35% 30%, #fff6c8, #e5b84c 55%, #8a5a12);
  border: 3px solid #4a2805;
  box-shadow:
    0 0 0 4px rgba(255, 220, 120, 0.35),
    0 4px 8px rgba(0, 0, 0, 0.35);
}

.center {
  text-align: center;
}

.nowrap {
  white-space: nowrap;
}

.muted {
  color: var(--ink-mute);
}

.small {
  font-size: 11px;
}

.preview-ribbon {
  position: fixed;
  right: -46px;
  top: 22px;
  z-index: 50;
  transform: rotate(45deg);
  padding: 3px 50px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #2a1603;
  background: linear-gradient(#ffe07a, #e0a41c);
  border: 1px solid #6a4405;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* ───────────────────────── フッター ───────────────────────── */

.footer {
  padding: 14px 12px 22px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.35));
  color: #e9e5cf;
  font-size: 11px;
  text-align: center;
}

.footer__plates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.footer__plates .plate-link {
  justify-content: center;
}

.footer--minimal {
  padding: 18px 12px 26px;
  font-size: 11px;
  line-height: 1.8;
  color: #b9ab95;
  background: none;
}

.footer--minimal p {
  margin: 0;
}

.footer__note {
  margin: 0 auto;
  max-width: 720px;
  color: #d8d4bd;
  text-shadow: 0 1px 1px #000;
}

.footer__copy {
  margin: 8px 0 0;
  color: #b8b49c;
  letter-spacing: 0.08em;
}

/* ───────────────────────── 管理画面（装飾なし） ───────────────────────── */

.admin-body {
  background: #eef0f2;
  color: #1d2327;
}

.admin-bar {
  background: #1f2a33;
  color: #fff;
}

.admin-bar__inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.admin-bar__brand {
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
}

.admin-bar__brand span {
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  border-radius: 3px;
  background: #3e8ed0;
}

.admin-nav {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1;
}

.admin-nav a {
  display: block;
  padding: 6px 10px;
  border-radius: 4px;
  color: #c9d3db;
  font-size: 13px;
}

.admin-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.admin-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(62, 142, 208, 0.35);
}

.admin-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.admin-main h1 {
  margin: 0 0 16px;
  font-size: 20px;
}

.admin-card {
  background: #fff;
  border: 1px solid #d6dce1;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 32, 0.06);
}

.admin-card + .admin-card {
  margin-top: 14px;
}

.admin-card h2 {
  margin: 0 0 12px;
  font-size: 15px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.admin-stat {
  background: #fff;
  border: 1px solid #d6dce1;
  border-radius: 8px;
  padding: 12px 14px;
}

.admin-stat__label {
  font-size: 12px;
  color: #5b6770;
}

.admin-stat__value {
  font-size: 26px;
  font-weight: 800;
}

.admin-stat--alert {
  border-color: #e3a29a;
  background: #fff5f3;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e3e7ea;
  text-align: left;
}

.admin-table th {
  font-size: 12px;
  color: #5b6770;
  background: #f6f8f9;
}

.admin-body .btn {
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: 6px;
  text-shadow: none;
  box-shadow: none;
  border-color: #c7d0d7;
  color: #1d2327;
  background: #fff;
}

.admin-body .btn--primary {
  color: #fff;
  border-color: #2a73b4;
  background: #3e8ed0;
}

.admin-body .btn--danger {
  color: #fff;
  border-color: #b3261e;
  background: #cf3b2f;
}

.admin-body .input {
  font-size: 14px;
  background: #fff;
  border-color: #c7d0d7;
  box-shadow: none;
}

.admin-body .chip {
  font-size: 11px;
}

.admin-body .field label,
.admin-body .field .label {
  color: #1d2327;
  font-size: 12px;
}

.admin-body form.btn-row {
  align-items: flex-end;
}

.admin-body .footer {
  background: none;
}

.admin-body .footer__note {
  color: #6b7780;
  text-shadow: none;
}

.secret-once {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: #fffbe6;
  border: 1px solid #e3c158;
}

.secret-once .mono {
  word-break: break-all;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px dashed #c9a63a;
}

.admin-main > .notice,
.admin-main > .secret-once {
  margin-bottom: 14px;
}

/* 記事の編集（Markdown の本文） */
.input--body {
  min-height: 22em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.6;
  resize: vertical;
}

/* 記事の画像の一覧のサムネイル */
.admin-thumb {
  display: block;
  max-width: 120px;
  max-height: 90px;
  width: auto;
  height: auto;
}

/* 管理画面の記事プレビュー（会員の画面と同じ羊皮紙のパネルに入れる） */
.article-preview {
  min-height: 0;
  color: var(--ink);
}

/* 期限（時間）の数値入力は 3 桁で足りる */
.input--hours {
  width: 6.5em;
}

.admin-table .btn-row {
  flex-wrap: nowrap;
}

/* ───────────────────────── レスポンシブ ───────────────────────── */

@media (max-width: 860px) {
  :root {
    --side-w: 150px;
  }

  .masthead__name {
    font-size: 36px;
  }

  .gnav__list a {
    font-size: 12px;
  }

  /* 左右のカラムで中央が狭くなるので、IPv4・パスキーの枠の操作ボタンは下に回す */
  .slot {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .slot__actions {
    grid-row: auto;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .topbar__links li:not(.keep) {
    display: none;
  }

  .masthead {
    height: auto;
    padding: 16px 14px 18px;
    gap: 12px;
  }

  .masthead__crest {
    width: 64px;
    height: 64px;
  }

  .masthead__name {
    font-size: 26px;
  }

  .masthead__kicker {
    font-size: 10px;
    letter-spacing: 0.25em;
  }

  .gnav {
    margin: 0 8px;
    padding: 4px 30px;
    border-radius: 14px;
  }

  .gnav__list--wide {
    display: none;
  }

  .gnav__drawer {
    display: block;
  }

  .gnav__toggle {
    display: block;
    list-style: none;
    cursor: pointer;
    padding: 6px 4px;
    font-weight: 900;
    font-size: 14px;
    text-align: center;
    color: #23272b;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  }

  .gnav__toggle::-webkit-details-marker {
    display: none;
  }

  .gnav__toggle::after {
    content: " ▼";
    font-size: 10px;
  }

  .gnav__drawer[open] .gnav__toggle::after {
    content: " ▲";
  }

  .gnav__list {
    flex-direction: column;
    padding-bottom: 6px;
  }

  .gnav__list li + li::before {
    left: 10%;
    right: 10%;
    top: 0;
    bottom: auto;
    width: auto;
    height: 2px;
    background: linear-gradient(#4f565c 50%, #f4f6f7 50%);
  }

  /* 狭い画面は HTML の順（中央→左→右）のまま縦に並べる */
  .columns {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "main"
      "left"
      "right";
    padding: 12px 8px 14px;
  }

  .columns--solo {
    grid-template-areas: "main";
  }

  .side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 0;
    background: none;
  }

  .rail {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .rail__title,
  .rail .status-card {
    grid-column: 1 / -1;
  }

  .scroll {
    padding: 16px 12px 20px;
    border-radius: 10px;
  }

  .hero {
    padding: 14px;
    min-height: 0;
  }

  .hero__seal {
    position: static;
    width: 76px;
    height: 76px;
    margin: 0 0 8px;
    font-size: 11px;
  }

  .hero__body {
    margin-left: 0;
  }

  .hero__title {
    font-size: 26px;
  }

  .mini-bnrs,
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .news li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .news time {
    grid-column: 1 / -1;
  }

  .footer__plates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kv {
    grid-template-columns: minmax(0, 1fr);
  }

  .kv dd {
    margin-bottom: 6px;
  }

  .steps {
    flex-direction: column;
  }

  .tabs {
    overflow-x: auto;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    /* biome-ignore lint/complexity/noImportantStyles: 動きを減らす設定は個別のアニメーション指定より優先する */
    animation: none !important;
    /* biome-ignore lint/complexity/noImportantStyles: 同上 */
    transition: none !important;
  }
}
