@charset "UTF-8";
/* ==========================================================================
   CAI - Civil AI  共通スタイル
   土木業者向け AIソフト公開サイト
   ========================================================================== */

/* --- デザイントークン ---------------------------------------------------- */
:root {
  /* ブランドカラー */
  --navy: #0F2C4C;
  --blue: #1B6CA8;
  --blue-light: #3FA0DC;
  --sky: #BFE0F5;
  --orange: #FF7A1A;          /* 飾り・線・印に使う明るい方 */
  --orange-ink: #CC4A00;      /* 白文字を載せる方。明るい橙に白は薄すぎて読めない（4.62:1） */
  --orange-light: #FFA45C;
  --yellow: #FFC533;
  --yellow-light: #FFE28A;
  --green: #2E9E6B;           /* 飾り用 */
  --green-ink: #1F7A50;       /* 白文字を載せる方 */
  --green-light: #A8DCC2;
  --sand: #F2EDE4;
  --beige: #D9CDB8;

  /* ニュートラル */
  --ink: #1C2733;
  --ink-2: #4A5A6A;
  --ink-3: #63727F;           /* 補助の文字。#7C8C9C は白地で3.45:1しか無く読めなかった */
  --line: #DDE5EC;
  --line-2: #EDF2F6;
  --bg: #F6F8FA;
  --white: #FFFFFF;

  /* レイアウト */
  --wrap: 1360px;
  --wrap-narrow: 1080px;
  --header-h: 64px;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* 影 */
  --sh-1: 0 1px 2px rgba(15, 44, 76, .06), 0 1px 3px rgba(15, 44, 76, .08);
  --sh-2: 0 2px 8px rgba(15, 44, 76, .08), 0 8px 24px rgba(15, 44, 76, .08);
  --sh-3: 0 8px 20px rgba(15, 44, 76, .12), 0 20px 48px rgba(15, 44, 76, .12);

  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* --- リセット ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo,
               "Noto Sans JP", "Yu Gothic UI", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;   /* 画面の基本。これを下回らせない（読みやすさの決めごと） */
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0; font-weight: 700; letter-spacing: .01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap-narrow { width: 100%; max-width: var(--wrap-narrow); margin-inline: auto; padding-inline: 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- ボタン -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border: 1px solid transparent; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease),
              background-color .15s var(--ease), border-color .15s var(--ease);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }

.btn-primary { background: var(--orange-ink); color: #fff; box-shadow: 0 2px 0 #9E3A00; }
.btn-primary:hover { background: #B34100; color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #17406B; color: #fff; }
.btn-ghost { background: var(--white); color: var(--navy); border-color: var(--line); box-shadow: var(--sh-1); }
.btn-ghost:hover { border-color: var(--blue-light); color: var(--blue); }
.btn-line { background: transparent; color: var(--navy); border-color: rgba(15, 44, 76, .25); }
.btn-line:hover { background: rgba(15, 44, 76, .05); color: var(--navy); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
/* スマホの指で押せる高さを確保する。7pxだと高さ30px程度しかなかった */
.btn-sm { padding: 10px 14px; font-size: 13px; }
/* 中身は「いま効いている値」。以前は下の方にもう1つ .btn-block があり、
   display だけ前・並びと余白だけ後、という足し算になっていた */
.btn-block { display: flex; width: 100%; justify-content: center; margin-top: 22px; }
.btn[disabled], .btn.is-locked { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* --- バッジ / チップ ----------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700; letter-spacing: .02em; line-height: 1.5;
}
.badge-free { background: var(--green-light); color: #1B6647; }
.badge-paid { background: var(--yellow-light); color: #8A5B00; }
.badge-new  { background: var(--orange-ink); color: #fff; }
.badge-cat  { background: var(--sky); color: #0E4B75; }
.badge-web  { background: #E6E9FB; color: #3A3F86; }
.badge-exe  { background: var(--line); color: var(--ink-2); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--white); color: var(--ink-2);
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all .15s var(--ease);
}
.chip:hover { border-color: var(--blue-light); color: var(--blue); text-decoration: none; }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* --- ハザードストライプ -------------------------------------------------- */
.hazard {
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--yellow) 0 14px,
    var(--orange) 14px 28px
  );
}

/* ==========================================================================
   ヘッダー
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo img { height: 38px; width: auto; }
.logo-fallback {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: .04em;
}
.logo-fallback small { font-size: 13px; font-weight: 700; color: var(--ink-3); letter-spacing: .08em; }

/* 検索 */
.search {
  position: relative; flex: 1 1 auto; min-width: 0; max-width: 520px;
}
/* ★ セレクタを `.search input[type="search"]` にしてある（2026-10-02）。
   `.search input` のままだと、下の方にある
     input[type=text], …, input[type=search], … { padding: 11px 13px; }
   と**詳細度が同じ**で、**後に書いてあるあちらが勝つ**。
   そのせいで左の余白が 13px になり、**虫眼鏡の上に文字が乗っていた**。
   丸みと文字の大きさも同じ理由で上書きされていた。
   あちらを直すと会員登録などの入力欄が全部変わるので、こちらの詳細度を上げている。 */
.search input[type="search"] {
  width: 100%; height: 42px; padding: 0 44px 0 44px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--bg); font-size: 16px; color: var(--ink);
  transition: all .15s var(--ease);
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus {
  outline: none; background: var(--white);
  border-color: var(--blue-light);
  box-shadow: 0 0 0 4px rgba(63, 160, 220, .18);
}
.search .search-icon {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--ink-3); pointer-events: none;
}

.header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-shrink: 0; }
.header-nav a.nav-link {
  padding: 8px 12px; border-radius: var(--r-sm); white-space: nowrap;
  font-size: 14px; font-weight: 700; color: var(--ink-2);
}
.header-nav a.nav-link:hover { background: var(--line-2); color: var(--navy); text-decoration: none; }
.header-nav a.nav-link.is-current { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: 8px; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--blue); color: #fff;
  font-size: 13px; font-weight: 800; letter-spacing: 0;
}
.avatar-sm { width: 26px; height: 26px; font-size: 13px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.avatar-o { background: var(--orange-ink); }
.avatar-g { background: var(--green); }
.avatar-n { background: var(--navy); }

/* モバイルメニュー開閉 */
.menu-toggle { display: none; }

/* ==========================================================================
   ヒーロー
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 420px at 78% -10%, rgba(191, 224, 245, .75), transparent 62%),
    linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("../img/bg-pattern.svg") repeat;
  background-size: 400px 400px;
  opacity: .5; pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 40px; align-items: center;
  padding: 56px 20px 60px;
}
.hero-copy { max-width: 560px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; margin-bottom: 18px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-pill); box-shadow: var(--sh-1);
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.hero-eyebrow .dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--orange); color: #fff;
  display: grid; place-items: center; font-size: 13px;
}
.hero h1 {
  font-size: clamp(28px, 3.4vw, 44px); line-height: 1.28;
  letter-spacing: .01em; color: var(--navy); margin-bottom: 18px;
}
.hero h1 .mark {
  background: linear-gradient(transparent 62%, var(--yellow-light) 62%);
  padding-inline: 2px;
}
.hero-lead { font-size: 16px; color: var(--ink-2); margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; }
.hero-stats div { line-height: 1.3; }
.hero-stats b {
  display: block; font-size: 24px; font-weight: 800; color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.hero-stats span { font-size: 13px; color: var(--ink-3); font-weight: 700; }
.hero-art { justify-self: center; width: 100%; }
.hero-art img { width: 100%; filter: drop-shadow(0 18px 32px rgba(15, 44, 76, .13)); }

/* ==========================================================================
   セクション共通
   ========================================================================== */
.section { padding: 48px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.section-head h2 {
  font-size: 21px; color: var(--navy);
  display: flex; align-items: center; gap: 10px;
}
.section-head h2::before {
  content: ""; width: 5px; height: 21px; border-radius: 3px;
  background: linear-gradient(180deg, var(--orange), var(--yellow));
}
.section-head p { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); }
.section-head .more { font-size: 13.5px; font-weight: 700; white-space: nowrap; }

/* ==========================================================================
   カテゴリタイル
   ========================================================================== */
.cat-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.cat-tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 12px 16px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
  text-align: center; color: var(--ink);
  transition: all .18s var(--ease);
}
.cat-tile:hover {
  text-decoration: none; transform: translateY(-3px);
  box-shadow: var(--sh-2); border-color: var(--blue-light);
}
.cat-tile .ico {
  width: 56px; height: 56px; border-radius: var(--r);
  display: grid; place-items: center; background: var(--bg);
}
.cat-tile .ico img { width: 40px; height: 40px; }
.cat-tile b { font-size: 13.5px; color: var(--navy); }
.cat-tile span { font-size: 13px; color: var(--ink-3); font-weight: 700; }

/* ==========================================================================
   フィルタバー
   ========================================================================== */
.filterbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 22px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-1);
}
.filterbar .label {
  font-size: 13px; font-weight: 800; color: var(--ink-3);
  letter-spacing: .04em; margin-right: 2px;
}
.filterbar .sep { width: 1px; height: 24px; background: var(--line); margin-inline: 6px; }
.filterbar select {
  height: 34px; padding: 0 32px 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--white) url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5 10 4.5' fill='none' stroke='%237C8C9C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  appearance: none; cursor: pointer;
}
.filterbar .count { margin-left: auto; font-size: 13px; color: var(--ink-3); font-weight: 700; }
.filterbar .count b { color: var(--navy); font-size: 15px; }

/* ==========================================================================
   ソフトカード グリッド
   ========================================================================== */
.card-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
}
.card {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-1); color: var(--ink);
  transition: all .2s var(--ease);
}
.card:hover {
  text-decoration: none; transform: translateY(-4px);
  box-shadow: var(--sh-3); border-color: var(--blue-light);
}
.card-thumb {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(135deg, var(--sky), var(--line-2));
}
.card-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s var(--ease);
}
.card:hover .card-thumb img { transform: scale(1.05); }
.card-thumb .thumb-badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.card-thumb .thumb-type {
  position: absolute; top: 10px; right: 10px;
}
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.card-title {
  font-size: 17px; font-weight: 800; color: var(--navy); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-desc {
  font-size: 14.5px; color: var(--ink-2); line-height: 1.75; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-author { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); font-weight: 700; }
.card-meta {
  display: flex; align-items: center; gap: 14px;
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-2);
  font-size: 13px; color: var(--ink-3); font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-meta svg { width: 14px; height: 14px; }

/* ==========================================================================
   ゲスト用ロック表示
   ========================================================================== */
.lock {
  position: relative;
  border: 1px dashed var(--beige); border-radius: var(--r);
  background: linear-gradient(180deg, #FFFDF8, var(--sand));
  padding: 22px 20px; text-align: center;
}
.lock .lock-ico {
  width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--yellow-light); color: #8A5B00;
}
.lock b { display: block; font-size: 14.5px; color: var(--navy); margin-bottom: 4px; }
.lock p { font-size: 13px; color: var(--ink-2); margin-bottom: 14px; }

/* 会員登録の誘導バナー */
.join-banner {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  padding: 28px 32px; border-radius: var(--r-lg);
  background: linear-gradient(110deg, var(--navy) 0%, var(--blue) 68%, #2480C4 100%);
  color: #fff; box-shadow: var(--sh-2);
}
.join-banner::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255, 197, 51, .16);
}
.join-banner h3 { position: relative; font-size: 20px; margin-bottom: 6px; }
.join-banner p { position: relative; margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, .85); }
.join-banner .join-cta { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }

/* ==========================================================================
   ソフト詳細ページ
   ========================================================================== */
.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 14px 0; font-size: 13px; color: var(--ink-3); font-weight: 700;
}
.breadcrumb a { color: var(--ink-2); }
.breadcrumb .sep { color: var(--line); }

.tool-head { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.tool-head .tool-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tool-head .tool-sub { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }

/* 2カラム：本体 + チャット */

.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-2);
}
.panel-head h2, .panel-head h3 { font-size: 15px; color: var(--navy); }
.panel-body { padding: 18px; }

.shot {
  background: linear-gradient(135deg, var(--sky), var(--line-2));
  aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 8px; }
.tabs button {
  padding: 13px 16px; border: 0; background: none; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--ink-3);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  transition: all .15s var(--ease);
}
.tabs button:hover { color: var(--blue); }
.tabs button.is-active { color: var(--navy); border-bottom-color: var(--orange); }

.prose h3 { font-size: 16px; color: var(--navy); margin: 26px 0 10px; }
.prose h3:first-child { margin-top: 0; }
.prose ul { list-style: none; margin: 0 0 1em; }
.prose ul li { position: relative; padding-left: 22px; margin-bottom: 7px; }
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--orange);
}
.prose ol { counter-reset: n; margin: 0 0 1em; }
.prose ol li { position: relative; padding-left: 32px; margin-bottom: 9px; counter-increment: n; }
.prose ol li::before {
  content: counter(n); position: absolute; left: 0; top: .15em;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 800; display: grid; place-items: center;
}

.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table th, .spec-table td {
  padding: 11px 14px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top;
}
.spec-table th { width: 34%; color: var(--ink-2); font-weight: 700; background: #FAFCFD; white-space: nowrap; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

/* サイドバー（起動パネル + チャット） */
.tool-side { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.launch-panel .panel-body { display: flex; flex-direction: column; gap: 12px; }
.launch-meta { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.launch-meta div { display: flex; justify-content: space-between; gap: 12px; }
.launch-meta dt, .launch-meta .k { color: var(--ink-3); font-weight: 700; }
.launch-meta dd, .launch-meta .v { margin: 0; color: var(--ink); font-weight: 700; }

/* ==========================================================================
   チャット
   ========================================================================== */
.chat { display: flex; flex-direction: column; max-height: min(620px, calc(100vh - var(--header-h) - 260px)); }
.chat-head h3 { font-size: 14.5px; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.chat-head .online {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; color: var(--green);
}
.chat-head .online::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 158, 107, .18);
}
.chat-body {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--bg);
}
.chat-day {
  align-self: center; padding: 3px 12px; border-radius: var(--r-pill);
  background: rgba(15, 44, 76, .07); color: var(--ink-2);
  font-size: 13px; font-weight: 700;
}
.msg { display: flex; gap: 9px; }
.msg-body { min-width: 0; }
.msg-name {
  display: flex; align-items: baseline; gap: 7px; margin-bottom: 3px;
  font-size: 13px; font-weight: 800; color: var(--navy);
}
.msg-name time { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.msg-name .tag {
  padding: 1px 6px; border-radius: var(--r-pill); font-size: 13px;
  background: var(--sky); color: #0E4B75;
}
.msg-text {
  padding: 9px 13px; border-radius: 4px 12px 12px 12px;
  background: var(--white); border: 1px solid var(--line);
  font-size: 13px; line-height: 1.7; color: var(--ink); margin: 0;
  overflow-wrap: anywhere;
}
.msg.is-dev .msg-text { background: #FFF8EC; border-color: #F3DFBB; }
.msg.is-me { flex-direction: row-reverse; }
.msg.is-me .msg-name { flex-direction: row-reverse; }
.msg.is-me .msg-text { border-radius: 12px 4px 12px 12px; background: #EAF4FC; border-color: #C6E1F4; }

.chat-foot { padding: 12px 14px; border-top: 1px solid var(--line-2); background: var(--white); }
.chat-form textarea:focus {
  outline: none; background: var(--white); border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(63, 160, 220, .16);
}
.chat-send {
  width: 42px; height: 42px; flex-shrink: 0; border: 0; border-radius: 50%;
  background: var(--orange); color: #fff; cursor: pointer;
  display: grid; place-items: center;
  transition: all .15s var(--ease);
}
.chat-send:hover { background: #FF8A33; transform: translateY(-1px); }
.chat-send svg { width: 18px; height: 18px; }

/* ==========================================================================
   フォーム（ログイン / 会員登録）
   ========================================================================== */
.auth-wrap { display: grid; place-items: center; padding: 44px 20px 64px; }
.auth-card {
  width: 100%; max-width: 460px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-2); overflow: hidden;
}
.auth-card .hazard { height: 5px; }
.auth-inner { padding: 32px; }
.auth-inner h1 { font-size: 22px; color: var(--navy); text-align: center; margin-bottom: 6px; }
.auth-inner .auth-lead { font-size: 13px; color: var(--ink-3); text-align: center; margin-bottom: 26px; }

.field { margin-bottom: 18px; }
.field label {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  font-size: 15px; font-weight: 800; color: var(--ink);
}
.field .req { padding: 2px 8px; border-radius: var(--r-pill); background: var(--orange-ink); color: #fff; font-size: 13px; }
.field .opt { padding: 1px 7px; border-radius: var(--r-pill); background: var(--line); color: var(--ink-2); font-size: 13px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field select, .field textarea {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg); font-family: inherit; font-size: 14.5px; color: var(--ink);
  transition: all .15s var(--ease);
}
.field textarea { height: auto; min-height: 100px; padding: 12px 14px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: var(--white); border-color: var(--blue-light);
  box-shadow: 0 0 0 4px rgba(63, 160, 220, .16);
}
.field .help { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); line-height: 1.6; }
/* パスワード自動生成 */
.pw-gen { display: flex; gap: 8px; align-items: center; }
.pw-gen input {
  flex: 1; min-width: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 15px; letter-spacing: .04em; background: #FFFDF6; border-color: var(--beige);
}
.pw-btn {
  width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--white); color: var(--ink-2); cursor: pointer;
  transition: all .15s var(--ease);
}
.pw-btn:hover { border-color: var(--blue-light); color: var(--blue); }
.pw-btn svg { width: 17px; height: 17px; }
.pw-strength { display: flex; align-items: center; gap: 4px; margin-top: 9px; }
.pw-strength i { width: 34px; height: 5px; border-radius: 3px; background: var(--green); }
.pw-strength b { margin-left: 6px; font-size: 13px; color: var(--green); }

/* ==========================================================================
   メールアドレスの確認
   ========================================================================== */
.verify-bar { background: #FFF8EC; border-bottom: 1px solid #F0DFBE; }
.verify-bar-in {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 20px; font-size: 13px; color: #6B5220; line-height: 1.7;
}
.verify-bar-in > span[aria-hidden] {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--yellow); color: #7A5200;
  display: grid; place-items: center; font-size: 13px;
}
.verify-bar-in > div { flex: 1; min-width: 200px; }
.verify-bar-in b { color: var(--navy); }
.verify-bar-in form { flex-shrink: 0; }

.verify-mark {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 30px; font-weight: 800;
  background: var(--sky); color: var(--blue);
}
.verify-mark.is-ok { background: var(--green-light); color: #1B6647; }
.verify-mark.is-ng { background: var(--yellow-light); color: #8A5B00; }

/* ==========================================================================
   チャットへの意思表示（確認しました・いいね など）
   ========================================================================== */
.rx { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.rx-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--white); color: var(--ink-2);
  font-size: 13px; line-height: 1.6; cursor: pointer;
  transition: all .12s var(--ease);
}
.rx-btn:hover { border-color: var(--blue-light); background: #F4FAFE; transform: translateY(-1px); }
.rx-btn:active { transform: translateY(0); }
.rx-btn[disabled] { opacity: .5; cursor: wait; }
.rx-btn .rx-n { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* 自分が押したもの */
.rx-btn.is-on {
  background: #EAF4FC; border-color: var(--blue-light); color: var(--blue);
}
/* まだ誰も押していないものは控えめに（押せることは分かるように） */
.rx-btn.is-zero { opacity: .45; }
.rx-btn.is-zero:hover { opacity: 1; }
.rx-btn.is-zero .rx-n { display: none; }

/* 押せない人には、付いている印だけを静かに見せる */
.rx-btn.is-static { cursor: default; background: var(--bg); }
.rx-btn.is-static:hover { transform: none; border-color: var(--line); background: var(--bg); }

/* 社内限りの目印 */
.tab-inhouse {
  display: inline-block; margin-left: 5px; padding: 1px 6px;
  border-radius: var(--r-pill); background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 800; letter-spacing: .04em; vertical-align: 1px;
}
.inhouse-note {
  display: block; margin: 0 0 18px; padding: 13px 16px;
  border: 1px solid #C9BEEA; border-left: 4px solid #6C5CB8;
  border-radius: var(--r); background: #FAF8FF;
  font-size: 13px; line-height: 1.85; color: var(--ink-2);
}
.inhouse-note b { color: var(--navy); }

/* 2枚並びのセット紹介 */
/* 後ろに .pack-grid の3列指定があるので、詳細度を上げて確実に勝たせる */
.pack-grid.pack-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; margin-inline: auto; }
@media (max-width: 640px) { .pack-grid.pack-grid-2 { grid-template-columns: 1fr; } }

/* 連携コードの表示 */
.linkcode-box {
  padding: 20px; border-radius: var(--r); text-align: center;
  background: linear-gradient(180deg, #FFFDF6, var(--sand));
  border: 1px solid var(--beige);
}
.linkcode-label { font-size: 13px; font-weight: 800; color: var(--ink-3); letter-spacing: .08em; }
.linkcode {
  display: block; margin: 8px 0 12px;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: clamp(28px, 6vw, 40px); font-weight: 800;
  letter-spacing: .22em; color: var(--navy);
}
.linkcode-box .hint { margin: 0; }

/* 会員認証との連携 */
.badge-api { background: #E8E3F7; color: #4A3A86; }
.api-box {
  padding: 16px 18px; border-radius: var(--r);
  border: 1px dashed var(--beige); background: #FFFDF8;
}
.api-box.is-on { border-style: solid; border-color: #C9BEEA; background: #FAF8FF; }
.api-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.api-head b { font-size: 14px; color: var(--navy); }
.api-box code {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace; font-size: 13px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 2px 7px; overflow-wrap: anywhere;
}
.api-box .spec-table { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); }

/* ソフトのアドレス（URL名）の入力。前半の変えられない所を見せてから入力欄を並べる */
.slug-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slug-fixed {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 13px; color: var(--ink-2); white-space: nowrap;
}
.slug-row input {
  flex: 1 1 220px; min-width: 0;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
}
.slug-warn {
  margin: 8px 0 0; padding: 10px 12px; font-size: 14px; line-height: 1.7;
  border: 1px solid #E8C9A8; border-left: 4px solid var(--orange-ink);
  border-radius: var(--r-sm); background: #FFF8F0; color: var(--navy);
}
.slug-warn code {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace; font-size: 13px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 2px 6px; overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  /* 画面が狭いと「https://…?s=」と入力欄が押し合うので、上下に分ける */
  .slug-row { display: block; }
  .slug-fixed { display: block; margin-bottom: 4px; white-space: normal; overflow-wrap: anywhere; }
  .slug-row input { width: 100%; }
}

/* ==========================================================================
   紹介ページのブロック — 編集画面
   ========================================================================== */
.blk-list { display: flex; flex-direction: column; gap: 12px; }
.blk-item {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--white); overflow: hidden;
  transition: border-color .15s var(--ease);
}
.blk-item:focus-within { border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(63,160,220,.14); }
.blk-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px 8px 12px; background: #FAFCFD; border-bottom: 1px solid var(--line-2);
}
.blk-badge { font-size: 13px; font-weight: 800; color: var(--navy); letter-spacing: .02em; }
.blk-btns { display: flex; gap: 4px; }
.blk-b {
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--white); color: var(--ink-2); cursor: pointer;
  font-size: 13px; line-height: 1; transition: all .15s var(--ease);
}
.blk-b:hover { border-color: var(--blue-light); color: var(--blue); }
.blk-b.is-del:hover { border-color: #E0736A; color: #C0392B; }
.blk-fields { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.blk-fields input, .blk-fields textarea, .blk-fields select { width: 100%; }
.blk-fields .hint { margin: 0; }

.blk-add {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 14px;
  border: 1px dashed var(--beige); border-radius: var(--r); background: #FFFDF8;
}
.blk-add-label { font-size: 13px; font-weight: 800; color: var(--navy); margin-right: 2px; }

/* 画像の置き場 */
.img-pool { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.img-cell { position: relative; width: 130px; aspect-ratio: 4/3; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); }
.img-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-del {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px;
  border: 0; border-radius: 50%; cursor: pointer; line-height: 1;
  background: rgba(15,44,76,.72); color: #fff; font-size: 14px;
}
.img-del:hover { background: #C0392B; }

/* ==========================================================================
   紹介ページのブロック — 表示側
   ========================================================================== */
.blk-view .blk-h {
  font-size: 17px; color: var(--navy); margin: 30px 0 12px;
  padding-left: 12px; border-left: 4px solid var(--orange); line-height: 1.5;
}
.blk-view > :first-child { margin-top: 0; }
.blk-view .blk-p { margin: 0 0 16px; line-height: 1.95; }

.blk-view .blk-ul { list-style: none; margin: 0 0 18px; }
.blk-view .blk-ul li { position: relative; padding-left: 22px; margin-bottom: 8px; line-height: 1.85; }
.blk-view .blk-ul li::before {
  content: ""; position: absolute; left: 4px; top: .68em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--orange);
}
.blk-view .blk-ol { counter-reset: bn; list-style: none; margin: 0 0 18px; }
.blk-view .blk-ol li {
  position: relative; padding-left: 36px; margin-bottom: 11px;
  counter-increment: bn; line-height: 1.85;
}
.blk-view .blk-ol li::before {
  content: counter(bn); position: absolute; left: 0; top: .1em;
  width: 25px; height: 25px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 800; display: grid; place-items: center;
}

.blk-view .blk-notice {
  display: flex; gap: 11px; align-items: flex-start;
  margin: 0 0 18px; padding: 14px 16px;
  background: #FFFDF8; border: 1px solid var(--beige);
  border-left: 4px solid var(--yellow); border-radius: var(--r);
  font-size: 13.5px; line-height: 1.9; color: var(--ink-2);
}
.blk-view .blk-notice > span {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  background: var(--yellow); color: #7A5200;
  font-size: 13px; font-weight: 800; display: grid; place-items: center;
}

.blk-view .blk-fig { margin: 0 0 20px; }
.blk-view .blk-fig img {
  width: 100%; border-radius: var(--r); border: 1px solid var(--line); display: block;
}
.blk-view .blk-fig figcaption {
  margin-top: 7px; font-size: 13px; color: var(--ink-3); text-align: center; line-height: 1.7;
}
.blk-view .blk-video {
  position: relative; aspect-ratio: 16/9; border-radius: var(--r);
  overflow: hidden; background: var(--navy);
}
.blk-view .blk-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.blk-view .blk-table-wrap { overflow-x: auto; margin: 0 0 18px; }
.blk-view .blk-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.blk-view .blk-table th, .blk-view .blk-table td {
  padding: 10px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top;
}
.blk-view .blk-table th { background: #FAFCFD; color: var(--ink-2); font-weight: 700; white-space: nowrap; }

/* 注意書きの帯 */
.notice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 15px; border-radius: var(--r);
  background: #FFFDF8; border: 1px solid var(--beige);
  font-size: 13px; line-height: 1.75; color: var(--ink-2);
}
.notice svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 3px; color: var(--orange); }
.notice b { color: var(--navy); }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--orange); }
.auth-alt { margin: 22px 0 0; padding-top: 20px; border-top: 1px solid var(--line-2); text-align: center; font-size: 13px; color: var(--ink-2); }

/* ==========================================================================
   フッター
   ========================================================================== */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .78); margin-top: 0; }
.footer-inner {
  display: grid; gap: 32px; padding: 46px 20px 36px;
  grid-template-columns: 1.6fr repeat(3, 1fr);
}
.footer-brand .logo-fallback { color: #fff; }
.footer-brand .logo-fallback small { color: rgba(255, 255, 255, .55); }
.footer-brand p { margin: 14px 0 0; font-size: 13px; line-height: 1.9; color: rgba(255, 255, 255, .62); }
.footer-col h4 {
  font-size: 13px; letter-spacing: .08em; color: var(--yellow);
  margin-bottom: 12px; text-transform: uppercase;
}
.footer-col li { margin-bottom: 2px; }
/* リンクそのものに高さを持たせる。文字だけだと指の的が20pxしかなかった */
.footer-col li a { display: inline-block; padding: 10px 0; }
.footer-col a { font-size: 13px; color: rgba(255, 255, 255, .78); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 16px 20px; font-size: 13px; color: rgba(255, 255, 255, .5);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */
@media (max-width: 1180px) {
  .tool-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-copy { max-width: none; }
  .hero-art { max-width: 620px; }
  .tool-layout { grid-template-columns: minmax(0, 1fr); }
  .tool-side { position: static; }
  .chat { max-height: 560px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
/* ナビ文字が潰れる前にハンバーガーへ切り替える */
@media (max-width: 1080px) {
  .header-nav .nav-link { display: none; }
  .menu-toggle {
    display: grid; place-items: center; width: 40px; height: 40px;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--white); cursor: pointer;
  }
  /* ハンバーガーを押したときに開くところ。
     これが無いと、ボタンは出ているのに押しても何も起きない */
  .header-nav.is-open {
    position: relative;
  }
  .header-nav.is-open .nav-link {
    display: block;
    position: absolute; right: 0; z-index: 120;
    width: max-content; min-width: 160px;
    padding: 12px 18px;
    background: var(--white);
    border: 1px solid var(--line); border-top: 0;
    box-shadow: var(--sh-2);
  }
  .header-nav.is-open .nav-link:nth-of-type(1) {
    top: calc(var(--header-h) - 12px); border-top: 1px solid var(--line);
    border-radius: var(--r) var(--r) 0 0;
  }
  .header-nav.is-open .nav-link:nth-of-type(2) { top: calc(var(--header-h) + 33px); }
  .header-nav.is-open .nav-link:nth-of-type(3) { top: calc(var(--header-h) + 78px); }
  .header-nav.is-open .nav-link:nth-of-type(4) {
    top: calc(var(--header-h) + 123px); border-radius: 0 0 var(--r) var(--r);
  }
}
@media (max-width: 760px) {
  /* 以前はここで検索欄を丸ごと消していた。
     スマホで来た人は、キーワードで探す手段が無くなり、
     カテゴリを順に開くしかなかった。
     場所が無いなら消すのではなく、2段目に回して残す。 */
  .search {
    order: 4;
    flex: 1 1 100%;
    max-width: none;
    margin-top: 2px;
  }
  .search input[type="search"] { height: 44px; font-size: 16px; }   /* 16px未満だとiPhoneが勝手に拡大する */
  .header-actions { margin-left: 8px; }
  .header-actions .btn { padding: 8px 14px; font-size: 13px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
  .join-banner { grid-template-columns: 1fr; text-align: center; padding: 24px 20px; }
  .join-banner .join-cta { justify-content: center; }
  .section { padding: 34px 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
/* ---- 狭い画面のヘッダ（スマホ） ----
   375px の画面では、ロゴ・＋ソフト登録・管理・マイページ・ログアウトが
   1行に収まらず、右側の3つが**画面の外**へ出ていた。
   ログアウトもマイページも押せず、未ログインの人には
   いちばん大事な「会員登録（無料）」が文字切れで出ていた。

   文字を小さくして詰め込むのではなく（読めなくなるため）、
   2段に折り返して逃がす。 */
@media (max-width: 640px) {
  /* ＜組み立て＞
     header-actions は header-nav の**中**にある。
     そのため header-nav の側を折り返さないと、ボタンは何をしても外へ出る。
       1段目 … ロゴ ＋（右端に）ハンバーガー
       2段目 … ＋ソフト登録／管理／マイページ／ログアウト
     ハンバーガーだけは位置を決め打ちして、1段目の右へ逃がす。 */
  .header-inner {
    position: relative;
    flex-wrap: wrap;
    height: auto;
    min-height: var(--header-h);
    gap: 8px 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .logo { flex: 0 1 auto; min-width: 0; }
  .logo img { height: 32px; }
  .logo-fallback { font-size: 19px; }
  .logo-fallback small { display: none; }   /* CONSTRUCTION AI の副題は畳む */
  .header-nav {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }
  .menu-toggle { position: absolute; top: 10px; right: 20px; }
  .header-actions {
    width: 100%;
    margin-left: 0;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  /* 名前は畳んで丸だけにする。押す場所（マイページ）は変わらない */
  .header-actions .user-name { display: none; }
  /* 文字は小さくしない（13px を下回らせない）。
     詰めるのは左右の余白だけ。これで運営（ボタンが一番多い人）でも2段に収まる */
  .header-actions .btn { padding: 10px 12px; font-size: 14px; min-height: 40px; }
  .header-actions { gap: 5px; }
}

/* 横スクロールは、どのページでも出さない。
   ここは最後の歯止めで、はみ出す部品があれば上で直すこと */
html, body { overflow-x: hidden; }

@media (max-width: 420px) {
  .hero-stats { gap: 18px; }
  .auth-inner { padding: 24px 20px; }
}

/* 印刷 */
@media print {
  .site-header, .site-footer, .chat, .hero-art, .join-banner { display: none !important; }
  body { background: #fff; }
}

/* ==========================================================================
   PHP版で追加した部品（3点セット・詳細画面・フォーム・管理画面）
   色は既存の :root トークンをそのまま使う
   ========================================================================== */

.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }

.empty-box {
  background: #fff; border: 1px dashed var(--line); border-radius: 14px;
  padding: 40px 20px; text-align: center; color: var(--ink-2); font-size: 14.5px;
}
.empty-box a { color: var(--blue); font-weight: 700; }

/* ---- 3点セットの紹介（トップ） ---- */
.pack-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.pack-tile {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px;
  display: flex; flex-direction: column; gap: 8px;
}
.pack-tile b { font-size: 16px; color: var(--navy); }
.pack-ico { font-size: 26px; }
.pack-desc { font-size: 15px; color: var(--ink-2); line-height: 1.8; }

/* 「使い方」の3枚。以前は index.php に直接 12.5px と書いてあり、
   一番読んでほしい説明が画面でいちばん小さい文字になっていた */
.step-title { font-size: 16px; }
.step-desc { font-size: 15px; color: var(--ink-2); font-weight: 400; line-height: 1.8; }
.pack-recipe { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,122,26,.08); }
.pack-note {
  margin-top: 16px; background: var(--sand); border-left: 4px solid var(--orange);
  padding: 14px 18px; border-radius: 0 10px 10px 0; font-size: 14px; line-height: 1.85; color: var(--ink);
}
.recipe-flag {
  align-self: flex-start; background: #FFF1E4; color: #A34A00; border: 1px solid #FFD3AE;
  border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700;
}

/* ---- ソフト詳細 ---- */
.crumbs { font-size: 13px; color: var(--ink-2); margin-bottom: 16px; }
.crumbs a { color: var(--blue); }
/* padding-bottom は、以前この上の方にあった同名の規則から効いていたもの。
   そちらを消したので、ここへ持ってきてある */
.tool-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 26px; align-items: start; padding-bottom: 56px; }
.tool-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.tool-head h1 { font-size: 27px; line-height: 1.45; color: var(--navy); margin: 10px 0 8px; }
.tool-summary { font-size: 15px; color: var(--ink-2); line-height: 1.85; }
.tool-by { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.tool-by b { display: block; font-size: 14.5px; color: var(--navy); }
.tool-by span { font-size: 13px; color: var(--ink-2); }
.tool-nums { margin-left: auto; display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); }
.tool-shot { margin: 20px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.tool-shot img { width: 100%; display: block; }

.launch-box {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
}
.launch-box.is-locked { background: var(--sand); border-color: var(--beige); }
.launch-note { font-size: 13px; color: var(--ink-2); }
.lock-msg { display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 240px; }
.lock-ico { font-size: 20px; }
.lock-msg b { display: block; font-size: 14.5px; color: var(--navy); margin-bottom: 3px; }
.lock-msg span { font-size: 13px; color: var(--ink-2); }
.fav-btn.is-on { border-color: var(--orange); color: var(--orange); }

/* ---- タブ（説明／作り方／データ／ファイル） ---- */
.pack-tabs { margin-top: 24px; }
.tab-btns { display: flex; gap: 4px; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.tab-btn {
  background: none; border: none; border-bottom: 3px solid transparent; margin-bottom: -2px;
  padding: 12px 16px; font-size: 14.5px; font-weight: 700; color: var(--ink-2);
  cursor: pointer; font-family: inherit; display: flex; align-items: center; gap: 6px;
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.is-active { color: var(--navy); border-bottom-color: var(--orange); }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.tab-num { background: var(--sky); color: var(--navy); border-radius: 999px; padding: 1px 7px; font-size: 13px; }
.tab-panel { display: none; padding: 22px 2px; }
.tab-panel.is-active { display: block; }
/* ソフトの紹介文。いちばん長く読ませる所なので 16px を下回らせない */
.prose { font-size: 16px; line-height: 1.95; color: var(--ink); }

/* ---- 作り方 ---- */
.recipe-intro { background: #FFF6EE; border: 1px solid #FFD3AE; border-radius: 12px; padding: 14px 18px; margin-bottom: 14px; }
.recipe-intro b { display: block; color: #A34A00; font-size: 14.5px; margin-bottom: 4px; }
.recipe-intro span { font-size: 13px; color: var(--ink-2); }
.recipe-note { background: var(--sand); border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; font-size: 13.5px; line-height: 1.85; }
.recipe-box { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.recipe-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--navy); color: #fff; padding: 10px 14px; font-size: 13px; font-weight: 700;
}
.recipe-box pre {
  margin: 0; padding: 18px; font-size: 13px; line-height: 1.8; white-space: pre-wrap; word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Courier New", monospace; max-height: 460px; overflow: auto;
  background: #FBFCFD; color: var(--ink);
}
.recipe-box pre.blurred { filter: blur(3px); user-select: none; max-height: 120px; }
.files-h, .pack-h { font-size: 14.5px; color: var(--navy); margin: 22px 0 10px; }

/* ---- ファイル一覧 ---- */
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.file-list li {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.file-ico {
  flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--sky); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
}
.file-body { flex: 1; min-width: 0; }
.file-body b { display: block; font-size: 14px; color: var(--navy); word-break: break-all; }
.file-note { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.file-meta { display: block; font-size: 13px; color: var(--ink-2); margin-top: 3px; }

/* ---- チャット ---- */
.tool-chat {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  display: flex; flex-direction: column; overflow: hidden; position: sticky; top: 16px; max-height: calc(100vh - 32px);
}
/* gap は、以前この上の方にあった同名の規則から効いていたもの */
.chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--sand);
}
.chat-head b { color: var(--navy); font-size: 14.5px; }
.chat-head span { font-size: 13px; color: var(--ink-2); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; min-height: 240px; }
.chat-empty { color: var(--ink-2); font-size: 13px; line-height: 1.9; text-align: center; padding: 20px 0; }
.cmsg { display: flex; gap: 10px; }
.cmsg .cw { flex: 1; min-width: 0; }
.cmsg .cn { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cmsg .cn b { font-size: 13.5px; color: var(--navy); }
.cmsg .cn span { font-size: 13px; color: var(--ink-2); }
/* 書き込みの本文。補助ではなく読ませる文章なので 16px */
.cmsg .cb { font-size: 16px; line-height: 1.85; color: var(--ink); margin-top: 3px; word-break: break-word; }
.cmsg .cb.revoked { text-decoration: line-through 3px #C0392B; color: var(--ink-2); }
.cact, .cdel {
  background: none; border: none; font-family: inherit; font-size: 13px; color: var(--ink-2);
  cursor: pointer; padding: 1px 6px; border-radius: 999px;
}
.cact:hover { background: var(--sky); color: var(--navy); }
.cdel:hover { background: #FDEDEA; color: #C0392B; }
.cre {
  background: var(--sand); border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0;
  padding: 4px 9px; margin: 4px 0; font-size: 13px; color: var(--ink-2); cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cre b { color: var(--navy); }
.cmsg.flash { animation: cflash 1.6s ease-out; border-radius: 8px; }
@keyframes cflash { 0%,55% { background: #FFF3C4; } 100% { background: transparent; } }
/* ★ 上の方（550行あたり）に古い .chat-form が display:flex で残っており、
   横並びのまま入力欄が縦に潰れて、幅の半分も無い状態になっていた。
   ここで打ち消す。古い方は使っていないので、いずれ消してよい */
.chat-form {
  display: block;
  border-top: 1px solid var(--line); padding: 12px 14px;
}
.chat-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
  font-family: inherit; font-size: 16px;   /* 16px未満だとiPhoneが勝手に拡大する */
  line-height: 1.8; resize: vertical; min-height: 84px; box-sizing: border-box;
  /* max-height は、以前この上の方にあった同名の規則から効いていたもの。
     いまの見た目を変えないためにそのまま残している。
     ただし resize: vertical と噛み合っておらず、利用者は120pxより
     大きく広げられない。広げられるようにしたければ、この1行を消す */
  max-height: 120px;
}
.chat-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 13px; flex-wrap: wrap; }
/* 送信は、指で押せる大きさにする */
.chat-actions .btn { min-height: 44px; padding: 11px 20px; font-size: 15px; }
#replyBar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--sky); border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; font-size: 13px; color: var(--navy);
}
#replyBar button { background: none; border: none; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.chat-locked {
  border-top: 1px solid var(--line); padding: 18px 16px; text-align: center;
  background: var(--sand); font-size: 13px; color: var(--ink-2); line-height: 1.9;
}

/* ---- フォーム（登録・ログイン・管理） ---- */
.form-wrap { max-width: 560px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.form-body { padding: 30px 32px 34px; }
.form-body h1 { font-size: 23px; color: var(--navy); margin-bottom: 8px; }
.form-lead { font-size: 15px; color: var(--ink-2); line-height: 1.9; margin-bottom: 20px; }
.form-error { background: #FDEDEA; border: 1px solid #F3C3BA; color: #A93226; border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.form-ok { background: #EAF7F0; border: 1px solid #B6E0C9; color: #1B6647; border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
label { display: block; font-size: 13.5px; font-weight: 700; color: var(--navy); margin: 16px 0 6px; }
.req { background: var(--orange); color: #fff; border-radius: 4px; font-size: 13px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
input[type=text], input[type=email], input[type=password], input[type=search], input:not([type]), select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
  font-family: inherit; font-size: 16px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,108,168,.12); }
input:disabled { background: var(--bg); color: var(--ink-2); }
textarea.mono { font-family: "SFMono-Regular", Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.75; }
.hint { display: block; font-size: 13px; color: var(--ink-2); margin-top: 5px; line-height: 1.7; }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 16px; cursor: pointer; padding: 6px 8px; }
.form-alt { text-align: center; font-size: 13.5px; color: var(--ink-2); margin-top: 18px; }
.form-alt a { color: var(--blue); font-weight: 700; }

/* 影と overflow は、以前この上の方にあった同名の規則から効いていたもの */
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 24px 26px; box-shadow: var(--sh-1); overflow: hidden;
}
.panel h3 { font-size: 16.5px; color: var(--navy); margin-bottom: 4px; }
.panel .btn { margin-top: 18px; }
.mypage-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.sep-line { border: none; border-top: 1px solid var(--line); margin: 26px 0 6px; }
.shot-prev { margin-top: 10px; }
.shot-prev img { max-width: 260px; border: 1px solid var(--line); border-radius: 10px; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th { background: var(--navy); color: #fff; font-weight: 600; text-align: left; padding: 10px 12px; white-space: nowrap; font-size: 13px; }
.admin-table td { border-bottom: 1px solid var(--line); padding: 10px 12px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table a { color: var(--blue); font-weight: 700; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; }
.pager .page {
  min-width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 14px;
}
.pager .page.is-current { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 700; }
.cat-tile.is-active { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,122,26,.1); }

/* ---- 管理画面 ---- */
.admin-tabs { margin-bottom: 28px; }
.admin-tabs .tab-btn { text-decoration: none; }
.admin-table tr.muted td { opacity: .55; }
.admin-table .expired { color: var(--red, #C0392B); font-weight: 700; }
.admin-table .sha {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 13px; background: var(--sky); color: var(--navy);
  padding: 2px 6px; border-radius: 6px;
}

/* 状態の札。色で「今どこか」がひと目で分かるようにする */
.st {
  display: inline-block; border-radius: 999px; padding: 2px 10px;
  font-size: 13px; font-weight: 700; white-space: nowrap;
  border: 1px solid transparent;
}
.st-public       { background: #E8F6EC; color: #1E7A3C; border-color: #C6E7D0; }
.st-draft        { background: #F0F1F3; color: #5B6472; border-color: #DDE0E5; }
.st-review       { background: #FFF3DF; color: #9A6410; border-color: #F1DCB6; }
.st-rejected     { background: #FDECEA; color: #B03A2E; border-color: #F3CFCA; }
.st-role-admin     { background: #EAE6FA; color: #4B3A9E; border-color: #D5CEF2; }
.st-role-developer { background: #FFEDE1; color: #B4530F; border-color: #F6D6BE; }
.st-role-partner   { background: #E4F1FB; color: #1D5E92; border-color: #C7E1F5; }
.st-role-member    { background: #F0F1F3; color: #5B6472; border-color: #DDE0E5; }

.tag-partner {
  display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 999px;
  background: #E4F1FB; color: #1D5E92; font-size: 13px; font-weight: 700;
}

/* 立場の変更・審査の入力欄は、表の中で折り返さずに並べる */
.role-form { display: flex; gap: 6px; align-items: center; }
.role-form select, .role-form input[type="date"] {
  font-family: inherit; font-size: 13px; padding: 5px 7px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.review-form textarea {
  width: 100%; font-family: inherit; font-size: 14px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; resize: vertical;
}
/* 件数のタイル。押せないので、指の形も影も出さない */
.admin-stats { grid-template-columns: repeat(var(--n, 4), minmax(0,1fr)); margin-bottom: 26px; }
.admin-stats .cat-tile { cursor: default; padding: 18px 10px; }
.admin-stats .cat-tile:hover { transform: none; box-shadow: none; border-color: var(--line); }
.admin-stats .cat-tile b { font-size: 26px; }

/* ---- スマホ ---- */
@media (max-width: 900px) {
  .tool-layout { grid-template-columns: 1fr; }
  .tool-chat { position: static; max-height: none; }
  .pack-grid, .mypage-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-body { padding: 24px 20px 28px; }
  /* 管理画面の集計タイルは、狭い画面では2列に落とす */
  .admin-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .role-form { flex-wrap: wrap; }
}

/* ---- 二段階認証 ---- */
.totp-secret {
  background: var(--navy); border-radius: 12px; padding: 18px 16px;
  text-align: center; margin: 14px 0 4px;
}
.totp-secret code {
  font-family: ui-monospace, Consolas, monospace; font-size: 20px;
  letter-spacing: .16em; color: #fff; word-break: break-all; background: none;
}
.backup-codes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px; margin: 14px 0 6px;
}
.backup-codes code {
  display: block; text-align: center; padding: 9px 6px;
  background: var(--sand); border: 1px solid var(--beige); border-radius: 8px;
  font-family: ui-monospace, Consolas, monospace; font-size: 15px;
  letter-spacing: .06em; color: var(--navy);
}

/* ---- 規約などの文書ページ ---- */
.doc { font-size: 15px; line-height: 2; color: var(--ink); }
.doc h1 { font-size: 27px; color: var(--navy); margin: 6px 0 4px; }
.doc .doc-date { color: var(--ink-3); font-size: 13px; margin: 0 0 26px; }
.doc h2 {
  font-size: 17px; color: var(--navy); margin: 34px 0 10px;
  padding-left: 12px; border-left: 4px solid var(--orange);
}
.doc p { margin: 0 0 14px; }
.doc ul { list-style: none; margin: 0 0 16px; padding: 0; }
.doc ul li { position: relative; padding-left: 18px; margin-bottom: 6px; }
.doc ul li::before {
  content: ''; position: absolute; left: 3px; top: 14px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--blue-light);
}
.doc-note { color: var(--ink-2); font-size: 13.5px; background: var(--line-2);
  border-radius: 10px; padding: 12px 14px; }
.doc-warn {
  background: #FFF8EC; border: 1px solid #F0DFBE; border-radius: 12px;
  padding: 16px 18px; margin: 0 0 16px;
}
.doc-warn p:last-child { margin-bottom: 0; }
.doc-table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14.5px; }
.doc-table th {
  text-align: left; vertical-align: top; width: 32%; padding: 12px 14px;
  background: var(--line-2); color: var(--navy); font-weight: 700;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.doc-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.doc-todo { color: #B03A2E; font-weight: 700; }
.doc-foot { color: var(--ink-2); font-size: 13.5px; }
@media (max-width: 700px) {
  .doc-table th, .doc-table td { display: block; width: auto; white-space: normal; }
  .doc-table th { border-bottom: none; }
}
.chip-test {
  display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 999px;
  background: #FFF3DF; color: #9A6410; border: 1px solid #F1DCB6;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}

/* ---- 会員の立場を変えるところ ---- */
.role-form .js-apply:disabled {
  opacity: .4;
  cursor: default;
  background: var(--line-2);
  color: var(--ink-3);
  border-color: var(--line);
}
/* 選び直すと、押してほしいボタンが目立つ */
.role-form.is-changed .js-apply {
  box-shadow: 0 0 0 3px rgba(255, 122, 26, .25);
}
.role-form.is-changed select,
.role-form.is-changed input[type="date"] {
  border-color: var(--orange);
  background: #FFF8EC;
}
/* 変えたばかりの行を、少しのあいだ光らせる */
@keyframes rowDone { from { background: #FFF3DF; } to { background: transparent; } }
.admin-table tr.row-done td { animation: rowDone 2.6s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .admin-table tr.row-done td { animation: none; background: #FFF3DF; }
}

/* 会員一覧の中で直接なおせる欄 */
.admin-table input.cell {
  width: 100%; min-width: 92px; max-width: 190px;
  font-family: inherit; font-size: 13px; padding: 5px 8px;
  border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: var(--ink);
}
.admin-table input.cell:focus {
  border-color: var(--blue-light); outline: 2px solid var(--sky); outline-offset: 1px;
}
/* 直したところを、決定を押す前から分かるようにする */
.admin-table tr:has(.role-form.is-changed) input.cell,
.admin-table tr:has(.role-form.is-changed) select {
  border-color: var(--orange); background: #FFF8EC;
}

/* ---- 署名の無い実行ファイルの案内 ----
   落とす前に「警告が出ます・こう進めます」と伝えるところ。
   怖がらせるためではないので、赤ではなく黄色系にする */
.unsigned-box {
  background: #FFF8EC; border: 1px solid #F1DCB6; border-left: 5px solid var(--orange);
  border-radius: 12px; padding: 18px 20px; margin: 0 0 18px;
}
.unsigned-head { display: flex; gap: 10px; align-items: baseline; font-size: 16px; margin-bottom: 10px; }
.unsigned-head span { color: var(--orange); font-size: 18px; }
.unsigned-box p { margin: 0 0 12px; font-size: 15px; line-height: 1.85; }
.unsigned-box p:last-child { margin-bottom: 0; }
.unsigned-steps { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; margin-bottom: 12px; }
/* 実際に出る画面の見た目をまねて、どれのことか一目で分かるようにする */
.unsigned-shot {
  background: #2C6BAF; color: #fff; border-radius: 8px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.unsigned-shot b { font-size: 15px; }
.unsigned-shot span { font-size: 13px; color: rgba(255,255,255,.85); line-height: 1.7; }
.unsigned-steps ol { margin: 0; padding-left: 22px; font-size: 15px; line-height: 2; }
.unsigned-note { font-size: 14px; color: var(--ink-2); }
.unsigned-note code { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.chip-unsigned {
  display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px;
  background: #FFF3DF; color: #9A6410; border: 1px solid #F1DCB6;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.file-hash { display: block; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.file-hash code { font-size: 13px; word-break: break-all; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 640px) {
  .unsigned-steps { grid-template-columns: 1fr; }
}

/* ---- キーボードで操作している人のための枠 ----
   マウスで押したときは出さず、Tabキーで移ってきたときだけ出す。
   これが無いと、キーボードだけで使う人は現在地を見失う */
:focus-visible {
  outline: 3px solid var(--orange-ink);
  outline-offset: 2px;
  border-radius: 4px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--blue-light);
  outline-offset: 1px;
}


/* 会員登録の「同意したものとみなします」。
   小さく置くと読まれないまま同意になるので、本文と同じ大きさにする */
.agree-note {
  font-size: 15px; line-height: 1.85; color: var(--ink-2);
  margin: 0 0 16px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
.agree-note a { font-weight: 700; }

/* ===== 売上の画面 =====================================================
   お金の数字は、他より大きくする。
   admin-table は 13.5px だが、金額をその大きさで並べると読み違える。
   桁の頭がそろっていないと見比べられないので、数字は右揃え＋等幅。   */
.sum-cards {
  display: grid; gap: 12px; margin: 18px 0 22px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.sum-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
}
.sum-card > span { font-size: 13px; color: var(--ink-3); }
.sum-card > b {
  font-size: 26px; line-height: 1.2; color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.sum-card .sum-sub { font-size: 13px; color: var(--ink-3); }
.sum-card.is-pool { background: #F3F7FC; border-color: #C9DCEF; }
.sum-card.is-each { background: #FFF6EC; border-color: #F0D3AE; }
.sum-card.is-each > b { color: var(--orange-ink); }

.sales-table td.num, .sales-table th:nth-child(n+3) { text-align: right; }
.sales-table td.num {
  font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sales-table input {
  width: 100%; min-width: 92px; padding: 8px 10px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
.sales-table input.money { text-align: right; font-variant-numeric: tabular-nums; }
.sales-table input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.sales-table tr.sales-total td { background: #F7F9FB; border-top: 2px solid var(--navy); }
.sales-table .muted { font-size: 13px; }
.sub-head { margin: 26px 0 10px; font-size: 18px; }

@media (max-width: 720px) {
  .sum-card > b { font-size: 22px; }
  .sales-table input { min-width: 78px; }
}
.tag-manual {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px;
  background: #FFF0DB; color: var(--orange-ink); font-size: 13px; white-space: nowrap;
}
.sum-card.is-total { background: var(--navy); border-color: var(--navy); }
.sum-card.is-total > span, .sum-card.is-total > b { color: #fff; }

/* ===== 試し用（テスト）のアドレス ===================================== */
.preview-box {
  margin-top: 10px; padding: 14px 16px; border: 1px solid #C9DCEF;
  border-radius: 10px; background: #F3F7FC;
}
.preview-head { font-weight: 700; color: var(--navy); font-size: 16px; }
.preview-url { margin: 8px 0; word-break: break-all; }
.preview-url a { font-size: 16px; color: var(--blue); font-weight: 700; }
.preview-note { margin: 6px 0 0; padding-left: 1.2em; }
.preview-note li { font-size: 14.5px; color: var(--ink-2); margin: 5px 0; line-height: 1.8; }

/* ===== 作る前に読んでもらうもの ======================================= */
.rules-box {
  margin: 16px 0 6px; padding: 14px 16px;
  border: 1px solid #F0D3AE; border-radius: 10px; background: #FFF6EC;
}
.rules-head { font-weight: 700; font-size: 16px; color: var(--orange-ink); }
.rules-lead { margin: 8px 0 0; font-size: 15px; line-height: 1.8; color: var(--ink); }
.rules-btns { margin: 12px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.rules-note { margin: 10px 0 0; font-size: 14px; line-height: 1.7; color: var(--ink-2); }

/* ===== 入札情報ビューアで見る県 =======================================
   47個ならぶので、指で押せる大きさ（44px前後）を保ったまま詰める。   */
.pref-grid {
  border: 0; margin: 0; padding: 0;
  display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
}
.pref-pick {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 16px; line-height: 1.3;
}
.pref-pick input { width: 20px; height: 20px; flex: none; cursor: pointer; }
.pref-pick:hover { border-color: var(--blue); }
.pref-pick:has(input:checked) { border-color: var(--blue); background: #F3F7FC; font-weight: 700; }
.pref-pick:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 1px; }
/* 上限に達したもの。押せないと分かるだけで、隠さない */
.pref-pick.is-off { opacity: .45; cursor: not-allowed; }
.pref-pick.is-off input { cursor: not-allowed; }

.pref-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }
.pref-note.is-full { color: var(--orange-ink); font-weight: 700; }

.bid-all, .bid-now, .bid-none { margin: 0; font-size: 16px; line-height: 1.8; }
.bid-none { color: var(--orange-ink); }
