/* =========================================================
   外構Hub — style.css
   白を基調に、緑と黒をアクセントにしたツールディレクトリ
   ========================================================= */
:root {
  --bg:         #ffffff;
  --tint:       #f5f8f5;
  --line:       #e4e8e4;
  --line-2:     #cdd3ce;
  --ink:        #0c0f0d;
  --ink-2:      #39403b;
  --ink-3:      #68716a;
  --green:      #16a34a;
  --green-dark: #0d7a36;
  --green-tint: #e8f6ec;
  --green-neon: #4ade80;

  --side-w: 256px;
  --radius: 14px;
  --font: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --font-en: "Inter", var(--font);
  --pop: 4px 4px 0 var(--green);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }
h1, h2, .hero-lead, .sec-lead, .page-lead, .col-title { word-break: auto-phrase; text-wrap: pretty; }

.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(1180px, 100% - 64px); margin-inline: auto; }
.pc { display: inline; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--font-en); font-weight: 800; font-size: 20px; letter-spacing: -.01em; line-height: 1; white-space: nowrap; }
.brand--invert { color: #fff; }
.brand--invert .brand-mark { outline: 1px solid #2c332e; border-radius: 8px; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30;
  width: var(--side-w);
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px 14px 16px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.sidebar .brand { padding: 2px 8px 6px; }

.side-search {
  display: flex; align-items: center; gap: 8px;
  width: 100%; height: 40px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--ink-3); font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
}
.side-search span { flex: 1; }
.side-search:hover { border-color: var(--ink); color: var(--ink); box-shadow: 2px 2px 0 var(--green); }
kbd {
  font-family: var(--font-en); font-size: 11px; font-weight: 600; line-height: 1;
  padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 6px;
  color: var(--ink-3); background: var(--tint); white-space: nowrap;
}

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 10px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  transition: background .12s, color .12s;
}
.side-link span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-link em { font-style: normal; font-family: var(--font-en); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.side-link:hover { background: var(--tint); color: var(--ink); }
.side-link.is-active { background: var(--ink); color: #fff; }
.side-link.is-active .ico { color: var(--green-neon); }
.side-link.is-active em { color: #b9c2bb; }
.side-label {
  margin: 14px 0 6px; padding: 0 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--ink-3);
}
.side-note { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.6; color: var(--ink-3); }

.topbar { display: none; }
.scrim { position: fixed; inset: 0; z-index: 25; background: rgba(12, 15, 13, .45); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; color: var(--ink);
}
.icon-btn:hover { background: var(--tint); }

.content { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
#app { flex: 1; outline: none; }

/* ---------- Buttons / badges / tags ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 11px;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 14.5px;
  transition: background .15s, box-shadow .15s, transform .15s;
}
.btn:hover { background: var(--green-dark); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; line-height: 1; white-space: nowrap;
  border: 1px solid transparent;
}
.badge--free     { background: var(--green); color: #fff; }
.badge--freemium { background: var(--green-tint); color: var(--green-dark); border-color: #bfe6cb; }
.badge--paid     { background: #f0f2f0; color: var(--ink-2); border-color: var(--line); }
.badge--ask      { background: #fff; color: var(--ink-3); border: 1px dashed var(--line-2); }
.badge--cat      { background: #fff; color: var(--ink-2); border-color: var(--line-2); }
.badge--cat .ico { width: 13px; height: 13px; }
.badge--cat:hover { border-color: var(--ink); color: var(--ink); }

.tag {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 999px; background: #fff;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  transition: border-color .12s, color .12s, background .12s;
}
.tag:hover { border-color: var(--green-dark); color: var(--green-dark); background: var(--green-tint); }

/* ---------- Tool icon ---------- */
.t-icon {
  position: relative; flex: none;
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 11px;
  background: #fff; border: 1px solid var(--line);
  overflow: hidden;
}
.t-icon::before {
  content: attr(data-letter);
  font-family: var(--font-en); font-weight: 800; font-size: 18px; color: var(--green-dark);
}
.t-icon img { position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; padding: 0; background: #fff; box-shadow: 0 0 0 9px #fff; border-radius: 4px; object-fit: contain; }
.t-icon--sm { width: 30px; height: 30px; border-radius: 8px; }
.t-icon--sm::before { font-size: 13px; }
.t-icon--sm img { width: 18px; height: 18px; box-shadow: 0 0 0 6px #fff; }
.t-icon--lg { width: 60px; height: 60px; border-radius: 14px; }
.t-icon--lg::before { font-size: 24px; }
.t-icon--lg img { width: 34px; height: 34px; box-shadow: 0 0 0 13px #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 75% 90% at 85% 10%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse 75% 90% at 85% 10%, #000 0%, transparent 70%);
}
.hero-inner { position: relative; padding: 72px 0 56px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px 0 10px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em;
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--green-neon); }
.hero-title {
  margin-top: 22px;
  font-size: clamp(30px, 4.3vw, 54px); font-weight: 900; line-height: 1.28; letter-spacing: -.01em;
}
.hl { background: linear-gradient(transparent 64%, var(--green-neon) 64%, var(--green-neon) 92%, transparent 92%); padding: 0 .08em; }
.hero-lead { margin-top: 20px; max-width: 46em; font-size: 16px; color: var(--ink-2); }

.hero-search {
  display: flex; align-items: center; gap: 12px;
  width: min(620px, 100%); height: 60px; margin-top: 32px; padding: 0 16px 0 20px;
  background: #fff; border: 1.5px solid var(--ink); border-radius: 14px;
  box-shadow: var(--pop);
  color: var(--ink-3); font-size: 15px;
  transition: transform .15s, box-shadow .15s;
}
.hero-search span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hero-search .ico { width: 20px; height: 20px; color: var(--ink); }
.hero-search:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--green); }

.hero-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.hero-quick > span { font-size: 12.5px; font-weight: 700; color: var(--ink-3); margin-right: 4px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 44px; }
.hero-stats div { padding: 0 32px; border-left: 1px solid var(--line-2); }
.hero-stats div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dt { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.hero-stats dd { font-family: var(--font-en); font-size: 34px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section--tint { background: var(--tint); border-block: 1px solid var(--line); }
.section--line { border-top: 1px solid var(--line); }
.section--list { padding: 32px 0 80px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.sec-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-en); font-size: 11.5px; font-weight: 700; letter-spacing: .14em; color: var(--green-dark);
}
.sec-label::before { content: ""; width: 18px; height: 2px; background: var(--green); }
.sec-title { margin-top: 4px; font-size: 26px; font-weight: 900; line-height: 1.4; }
.sec-lead { margin-top: 4px; color: var(--ink-3); font-size: 14px; }

/* ---------- Card ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 14px; }
.grid--feature { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

.card {
  position: relative; display: flex;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover, .card:focus-within { border-color: var(--ink); box-shadow: var(--pop); transform: translate(-2px, -2px); }
.card-main { display: flex; flex-direction: column; gap: 12px; width: 100%; padding: 16px; border-radius: var(--radius); }
.card-head { display: flex; align-items: center; gap: 12px; padding-right: 30px; }
.card-title { display: flex; flex-direction: column; min-width: 0; }
.card-name { font-weight: 700; font-size: 15.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tagline { font-size: 12.5px; font-weight: 500; color: var(--green-dark); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-desc {
  font-size: 13px; line-height: 1.7; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.card-cat { font-size: 12px; color: var(--ink-3); white-space: nowrap; }

.card--feature .card-main { padding: 20px; gap: 14px; }
.card--feature .card-desc { -webkit-line-clamp: 3; font-size: 13.5px; }
.card--feature .t-icon { width: 52px; height: 52px; border-radius: 13px; }
.card--feature .t-icon img { width: 30px; height: 30px; box-shadow: 0 0 0 11px #fff; }
.card--feature .card-name { font-size: 17px; }

.fav {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px; color: var(--line-2);
  transition: color .12s, background .12s;
}
.card .fav { position: absolute; top: 12px; right: 10px; }
.fav:hover { color: var(--ink); background: var(--tint); }
.fav[aria-pressed="true"] { color: var(--green); }
.fav[aria-pressed="true"] .ico { fill: var(--green); }
.fav--label {
  display: inline-flex; gap: 8px; width: auto; height: 46px; padding: 0 16px;
  border: 1.5px solid var(--line-2); border-radius: 11px; color: var(--ink); font-weight: 700; font-size: 14px;
}
.fav--label .ico { color: var(--ink-3); }
.fav--label:hover { border-color: var(--ink); background: #fff; }
.fav--label[aria-pressed="true"] { border-color: var(--green); color: var(--green-dark); background: var(--green-tint); }
.fav--label[aria-pressed="true"] .ico { color: var(--green); }

/* ---------- Categories ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.cat {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cat:hover { border-color: var(--ink); box-shadow: var(--pop); transform: translate(-2px, -2px); }
.cat-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--ink); color: #fff; flex: none; transition: background .15s; }
.cat:hover .cat-icon { background: var(--green); }
.cat-name { flex: 1; font-weight: 700; font-size: 14px; white-space: nowrap; }
.cat-count { font-family: var(--font-en); font-size: 13px; font-weight: 600; color: var(--ink-3); }

/* ---------- Collections ---------- */
.cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.col {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 26px 26px 22px; border-radius: 18px;
  background: var(--ink); color: #fff; overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.col::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  border: 1px solid #2a312c; box-shadow: 0 0 0 36px #141916, 0 0 0 37px #2a312c; pointer-events: none;
}
.col:hover { box-shadow: 5px 5px 0 var(--green); transform: translate(-2px, -2px); }
.col-no { position: relative; z-index: 1; font-family: var(--font-en); font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--green-neon); }
.col-title { position: relative; z-index: 1; font-size: 20px; font-weight: 900; line-height: 1.45; }
.col-desc { position: relative; z-index: 1; font-size: 13.5px; color: #b9c2bb; max-width: 34em; }
.col-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; }
.stack { display: flex; }
.stack .t-icon { border-color: var(--ink); margin-left: -5px; box-shadow: 0 0 0 2px var(--ink); }
.stack .t-icon:first-child { margin-left: 0; }
.col-more { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--green-neon); white-space: nowrap; }
.col-more .ico { width: 16px; height: 16px; transition: transform .15s; }
.col:hover .col-more .ico { transform: translateX(3px); }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px; background: #fff;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  transition: border-color .12s, background .12s, color .12s;
}
.chip span { font-family: var(--font-en); font-size: 12px; font-weight: 600; color: var(--ink-3); }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-active span { color: var(--green-neon); }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.sort select { height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; font-size: 13px; font-weight: 500; color: var(--ink); }
.empty { padding: 48px 0; text-align: center; color: var(--ink-3); }

/* ---------- Page head (一覧ページ) ---------- */
.page-head { padding: 36px 0 30px; background: var(--tint); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
.crumbs a:hover { color: var(--green-dark); text-decoration: underline; }
.page-head-row { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.page-head-row > div { flex: 1; min-width: 0; }
.page-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 15px; background: var(--ink); color: var(--green-neon); flex: none; }
.page-icon .ico { width: 26px; height: 26px; }
.page-title { font-size: clamp(24px, 3vw, 32px); font-weight: 900; line-height: 1.35; }
.page-lead { margin-top: 2px; color: var(--ink-2); font-size: 14.5px; }
.page-count { font-size: 12.5px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.page-count b { margin-right: 4px; font-family: var(--font-en); font-size: 34px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }

.blank { display: grid; justify-items: center; gap: 12px; padding: 48px 16px 24px; text-align: center; color: var(--ink-2); font-size: 14px; }
.blank .page-icon { background: var(--green-tint); color: var(--green-dark); }
.blank-title { font-size: 18px; font-weight: 900; color: var(--ink); }
.blank .btn { margin-top: 8px; }

/* ---------- Dialogs ---------- */
dialog { border: 0; padding: 0; color: var(--ink); background: #fff; }
dialog::backdrop { background: rgba(12, 15, 13, .5); backdrop-filter: blur(3px); }

.modal {
  width: min(620px, 100% - 24px); max-height: min(88vh, 860px);
  padding: 30px; border: 1.5px solid var(--ink); border-radius: 20px;
  box-shadow: 8px 8px 0 var(--green);
  overflow-y: auto;
}
.modal-close { position: absolute; top: 14px; right: 14px; }
.modal-head { display: flex; align-items: center; gap: 16px; padding-right: 40px; }
.modal-title { font-size: 24px; font-weight: 900; line-height: 1.35; }
.modal-by { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.modal-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.modal-tagline { margin-top: 18px; font-weight: 700; font-size: 15px; color: var(--green-dark); }
.modal-desc { margin-top: 6px; font-size: 15px; line-height: 1.9; color: var(--ink-2); }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.modal-tags .tag { height: 28px; padding: 0 10px; font-size: 12px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.modal-actions .btn { flex: 1; min-width: 200px; }
.modal-note { margin-top: 12px; font-size: 11.5px; color: var(--ink-3); }
.modal-related { margin-top: 22px; padding-top: 6px; border-top: 1px solid var(--line); }
.modal-related .side-label { padding: 0; }

.row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 8px 10px; border-radius: 10px;
}
.row-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; max-width: 50%; }
.row-tagline { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row:hover, .row.is-active { background: var(--green-tint); }
.modal-related .row { margin-inline: -10px; width: calc(100% + 20px); }

.palette {
  width: min(620px, 100% - 24px); max-height: min(70vh, 620px);
  margin-top: 12vh; border: 1.5px solid var(--ink); border-radius: 16px;
  box-shadow: 8px 8px 0 var(--green);
  overflow: hidden;
}
.palette[open] { display: flex; flex-direction: column; }
.palette-head { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); }
.palette-head .ico { width: 20px; height: 20px; }
.palette-head input { flex: 1; min-width: 0; height: 58px; border: 0; outline: 0; background: none; font-size: 16px; }
.palette-head input::-webkit-search-cancel-button { display: none; }
.kbd-btn { font-family: var(--font-en); font-size: 11px; font-weight: 600; padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--ink-3); background: var(--tint); }
.kbd-btn:hover { border-color: var(--ink); color: var(--ink); }
.palette-body { padding: 4px 8px 10px; overflow-y: auto; }
.palette-body .side-label { margin-top: 10px; }
.palette-empty { padding: 36px 16px; text-align: center; color: var(--ink-3); font-size: 14px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #b9c2bb; }
.footer-inner { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; padding: 48px 0 32px; }
.footer-brand p { margin-top: 12px; font-size: 13px; }
.footer-note { font-size: 12px; line-height: 1.9; }
.footer-copy { padding: 18px 0 26px; border-top: 1px solid #262c28; font-family: var(--font-en); font-size: 12px; letter-spacing: .04em; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    height: 56px; padding: 0 8px;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  .sidebar { transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s; width: min(280px, 86vw); }
  .sidebar.is-open { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(12, 15, 13, .2); }
  .content { margin-left: 0; }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .pc { display: none; }
  .hero-inner { padding: 44px 0 40px; }
  .hero-lead { font-size: 15px; }
  .hero-search { height: 54px; }
  .hero-search kbd { display: none; }
  .hero-stats div { padding: 0 20px; }
  .hero-stats dd { font-size: 28px; }
  .section { padding: 48px 0; }
  .section--list { padding: 24px 0 56px; }
  .sec-title { font-size: 22px; }
  .grid, .grid--feature { grid-template-columns: 1fr; }
  .cats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cat { padding: 10px; gap: 8px; }
  .cat-icon { width: 32px; height: 32px; border-radius: 8px; }
  .cat-name { font-size: 12.5px; white-space: normal; line-height: 1.4; }
  .col { padding: 22px 20px 18px; }
  .col-title { font-size: 18px; }
  .page-head-row { flex-wrap: wrap; gap: 12px; }
  .page-icon { width: 46px; height: 46px; border-radius: 12px; }
  .page-count { width: 100%; }
  .page-count b { font-size: 26px; }
  .modal { padding: 22px 18px; box-shadow: 5px 5px 0 var(--green); }
  .palette { margin-top: 8px; box-shadow: 5px 5px 0 var(--green); }
  .row-tagline { display: none; }
  .row-name { flex: 1; max-width: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; padding-top: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* =========================================================
   公開まわり（頭文字タイル・料金区分・このサイトについて）
   ========================================================= */
.t-icon--letter { background: var(--green-tint); border-color: #cfe9d7; }
.badge--quote { background: #fff; color: var(--ink-2); border-color: var(--line-2); }
.modal-note a, .side-note a { color: var(--green-dark); text-decoration: underline; white-space: nowrap; }
.side-note a { display: block; margin-top: 4px; }
.footer-copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.footer-copy a { font-family: var(--font); letter-spacing: 0; text-decoration: underline; }
.footer-copy a:hover { color: #fff; }

.prose { max-width: 800px; margin-left: max(32px, calc((100% - 1180px) / 2)); font-size: 14.5px; line-height: 1.95; color: var(--ink-2); }
.prose h2 { margin: 40px 0 10px; padding-left: 12px; border-left: 4px solid var(--green); font-size: 18px; font-weight: 900; line-height: 1.5; color: var(--ink); }
.prose h2:first-child { margin-top: 8px; }
.prose ul { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.prose b { color: var(--ink); }
.prose mark { padding: 2px 8px; border-radius: 6px; background: #fff3c4; color: #5b4300; font-size: 13px; }
.prose a { color: var(--green-dark); text-decoration: underline; }
.facts { display: grid; margin: 16px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 16px; }
.facts div + div { border-top: 1px solid var(--line); }
.facts dt { font-weight: 700; color: var(--ink); }
.facts + p { margin-top: 12px; }
@media (max-width: 640px) {
  .prose { margin-left: 16px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* =========================================================
   よく使うツール（保存したツールのショートカット）
   ========================================================= */
.shelf-section { padding: 22px 0; background: var(--tint); border-bottom: 1px solid var(--line); }
.shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.shelf-head h2 { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 900; }
.shelf-head h2 .ico { color: var(--green); fill: var(--green); }
.shelf-head h2 em { padding: 3px 8px; border-radius: 999px; background: var(--ink); color: var(--green-neon); font-family: var(--font-en); font-size: 12px; font-style: normal; font-weight: 700; line-height: 1; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.shelf-tile {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  font-size: 13.5px; font-weight: 700;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.shelf-tile:hover { border-color: var(--ink); box-shadow: 3px 3px 0 var(--green); transform: translate(-1px, -1px); }
.shelf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf-tile > .ico { width: 14px; height: 14px; color: var(--ink-3); }
.shelf-empty { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px dashed var(--line-2); border-radius: 12px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.shelf-empty .ico { color: var(--green-dark); }
.shelf-empty b { color: var(--ink); }

.side-label--row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-label--row a { font-size: 11px; letter-spacing: 0; color: var(--green-dark); }
.side-label--row a:hover { text-decoration: underline; }
.t-icon--xs { width: 22px; height: 22px; border-radius: 6px; }
.t-icon--xs::before { font-size: 11px; }
.t-icon--xs img { width: 14px; height: 14px; box-shadow: 0 0 0 4px #fff; border-radius: 2px; }
.t-icon--xs.t-icon--orig .ico { width: 13px; height: 13px; }
.side-link--tool { gap: 9px; padding-left: 8px; }
.side-link .t-icon { flex: none; }
.side-link--tool > .ico { width: 13px; height: 13px; color: var(--ink-3); }
.side-hint { padding: 0 10px; font-size: 11.5px; line-height: 1.6; color: var(--ink-3); }
.side-more { padding: 4px 10px; font-size: 12px; font-weight: 700; color: var(--green-dark); }
.side-more:hover { text-decoration: underline; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  max-width: calc(100% - 32px); padding: 12px 18px;
  background: var(--ink); color: #fff; border-radius: 12px; box-shadow: 4px 4px 0 var(--green);
  font-size: 13.5px; font-weight: 700; line-height: 1.5;
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   自作ツール（外構Hubオリジナル）
   ========================================================= */
.t-icon--orig { background: var(--ink); border-color: var(--ink); color: var(--green-neon); }
.t-icon--orig::before { content: none; }
.t-icon--orig .ico { width: 22px; height: 22px; }
.t-icon--sm.t-icon--orig .ico { width: 16px; height: 16px; }
.t-icon--lg.t-icon--orig .ico { width: 30px; height: 30px; }
.badge--orig { background: var(--ink); color: var(--green-neon); }
.card-go { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--green-dark); white-space: nowrap; }
.card-go .ico { width: 15px; height: 15px; transition: transform .15s; }
.card:hover .card-go .ico { transform: translateX(3px); }
.more { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--green-dark); white-space: nowrap; }
.more:hover { text-decoration: underline; }
.more .ico { width: 16px; height: 16px; }

.page-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.section--app { padding: 28px 0 56px; }
.tool-related .sec-title { font-size: 20px; }
.tool-related .sec-head { margin-bottom: 18px; }
.related-ext { margin-top: 44px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { float: left; width: 100%; padding: 0; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--green-dark); }
legend + * { clear: both; }
.scroll-x { overflow-x: auto; }

/* ---------- 入力欄 ---------- */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.field { display: grid; gap: 5px; }
.field-label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.field-box {
  display: flex; align-items: center; height: 48px; padding: 0 12px;
  background: #fff; border: 1.5px solid var(--line-2); border-radius: 10px;
  transition: border-color .12s, box-shadow .12s;
}
.field-box:focus-within { border-color: var(--ink); box-shadow: 3px 3px 0 var(--green); }
.field-box input {
  flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: none;
  font-family: var(--font-en); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.field-box em { margin-left: 6px; font-style: normal; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }

.ghost-btn {
  display: inline-flex; align-items: center; gap: 6px; justify-self: start;
  height: 36px; padding: 0 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 9px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap;
  transition: border-color .12s, color .12s;
}
.ghost-btn .ico { width: 16px; height: 16px; }
.ghost-btn:hover { border-color: var(--ink); color: var(--ink); }
.ghost-btn--dark { background: transparent; border-color: #3a423c; color: #d5dbd6; }
.ghost-btn--dark:hover { border-color: var(--green-neon); color: #fff; }
.btn--sm { height: 36px; padding: 0 14px; border-radius: 9px; font-size: 13px; gap: 6px; }
.btn--sm .ico { width: 16px; height: 16px; }

/* ---------- 計算ツール ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr); gap: 16px; align-items: start; }
.calc-in { display: grid; gap: 22px; padding: 22px; }
.calc-out {
  position: sticky; top: 16px;
  display: grid; gap: 16px; padding: 22px;
  background: var(--ink); color: #fff; border-radius: 16px;
}
.calc-out-title { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--green-neon); }
.calc-out dl { display: grid; }
.out { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #262c28; }
.out dt { font-size: 12.5px; line-height: 1.5; color: #b9c2bb; }
.out dd { font-family: var(--font-en); font-size: 19px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.out dd small { margin-left: 3px; font-family: var(--font); font-size: .62em; font-weight: 500; color: #b9c2bb; }
.out.is-big { flex-direction: column; align-items: flex-start; gap: 2px; padding: 0 0 14px; border-top: 0; }
.out.is-big dd { font-size: 46px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: var(--green-neon); }
.out.is-big dd small { font-size: .4em; }
.is-neg { color: #ff8f85; }
.pill { display: inline-block; margin-left: 6px; padding: 3px 8px; border-radius: 999px; font-family: var(--font); font-size: 11px; font-weight: 700; vertical-align: middle; }
.pill.is-ok { background: var(--green); color: #fff; }
.pill.is-warn { background: #fff; color: var(--ink); }
.calc-extra { grid-column: 1 / -1; padding: 20px 22px; }
.calc-note { grid-column: 1 / -1; margin-top: 4px; font-size: 12px; line-height: 1.7; color: var(--ink-3); }
.extra-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; font-size: 13px; font-weight: 700; }
.extra-title span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.extra-title i { width: 12px; height: 12px; margin-left: 8px; border-radius: 3px; }
.k-panel { background: var(--green-tint); border: 1px solid var(--green); }
.k-cut { background: #e4e8e4; border: 1px dashed var(--ink); }
.k-post { background: var(--ink); }

.fence-svg { width: 100%; min-width: 560px; height: auto; }
.f-panel { fill: var(--green-tint); stroke: var(--green); stroke-width: 1.5; }
.f-cut { fill: #e4e8e4; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 6 4; }
.f-post { fill: var(--ink); }
.f-dim { stroke: var(--line-2); stroke-width: 1.5; }
.f-txt { font: 600 22px var(--font-en); fill: var(--ink-3); }

.stackbar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--tint); }
.s0 { background: #0c0f0d; } .s1 { background: #4a524c; } .s2 { background: #8a938c; } .s3 { background: #c5ccc6; } .s4 { background: var(--green); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend b { font-family: var(--font-en); font-weight: 700; color: var(--ink); }

.conv { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.conv .panel { padding: 22px; border: 1px solid var(--line); }

/* ---------- ツール上部のバー（見積書・工程表・埋め込み） ---------- */
.app-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 12px 16px; background: var(--tint); border-bottom: 1px solid var(--line); border-radius: 15px 15px 0 0;
}
.app-bar p { flex: 1; min-width: 220px; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.app-bar > div { display: flex; gap: 8px; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; }
.inline-field input { height: 36px; padding: 0 10px; background: #fff; border: 1px solid var(--line-2); border-radius: 9px; font-size: 13px; }
.embed iframe { display: block; width: 100%; height: 720px; border: 0; border-radius: 0 0 15px 15px; }

/* ---------- 見積書メーカー ---------- */
.doc-sheet { padding: 32px; }
.doc input { width: 100%; min-width: 0; padding: 5px 6px; background: none; border: 1px solid transparent; border-radius: 6px; }
.doc input:hover { border-color: var(--line-2); }
.doc input:focus { outline: 0; border-color: var(--green); background: var(--green-tint); }
.doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 32px; }
.doc-head-main { flex: 1; min-width: 240px; }
.doc-head h3 { margin: 0 0 14px; font-size: 26px; font-weight: 900; letter-spacing: .3em; }
.doc-to input { font-size: 20px; font-weight: 700; border-radius: 0; border-bottom: 1.5px solid var(--ink); }
.doc-line { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.doc-line input { font-size: 14px; color: var(--ink); }
.doc-meta { display: grid; gap: 2px; min-width: 270px; font-size: 12.5px; }
.doc-meta div { display: grid; grid-template-columns: 70px 1fr; align-items: center; }
.doc-meta dt { color: var(--ink-3); }
.doc-meta input { font-size: 13px; }
.doc-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 24px 0 18px; padding: 14px 18px; background: var(--ink); color: #fff; border-radius: 12px; font-size: 13px; font-weight: 700; }
.doc-total strong { font-family: var(--font-en); font-size: 30px; font-weight: 800; letter-spacing: -.01em; color: var(--green-neon); }
.doc-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13.5px; }
.doc-table th { padding: 8px 6px; border-bottom: 1.5px solid var(--ink); font-size: 12px; font-weight: 700; color: var(--ink-3); text-align: left; }
.doc-table td { padding: 4px 2px; border-bottom: 1px solid var(--line); }
.doc-table .c-num { width: 112px; text-align: right; }
.doc-table .c-num input { text-align: right; font-variant-numeric: tabular-nums; }
.doc-table .c-unit { width: 64px; text-align: center; }
.doc-table .c-unit input { text-align: center; }
.doc-table .c-del { width: 36px; }
.doc-table [data-amount] { padding-right: 8px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-del button, .gantt-row button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--line-2); }
.c-del button:hover, .gantt-row button:hover { color: var(--ink); background: var(--tint); }
.doc-sum { display: grid; width: min(340px, 100%); margin: 18px 0 0 auto; font-size: 13.5px; }
.doc-sum div { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.doc-sum b { font-variant-numeric: tabular-nums; }
.doc-sum .pct { width: 58px; text-align: right; border-color: var(--line-2); }
.doc-sum .is-total { border-top: 1.5px solid var(--ink); border-bottom: 0; font-size: 17px; font-weight: 900; }

/* ---------- 工程表メーカー ---------- */
.gantt-list { display: grid; gap: 6px; padding: 16px; border-bottom: 1px solid var(--line); }
.gantt-list [data-list] { display: grid; gap: 6px; }
.gantt-row { display: grid; grid-template-columns: minmax(110px, 1fr) 104px 76px 30px; gap: 8px; align-items: center; }
.gantt-row--head { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.gantt-row input { width: 100%; min-width: 0; height: 38px; padding: 0 10px; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; font-size: 13.5px; }
.gantt-row input:focus { outline: 0; border-color: var(--ink); box-shadow: 2px 2px 0 var(--green); }
.gantt-app .print-area { padding: 16px; }
.gantt-title { display: none; }
.gantt { display: grid; min-width: 720px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 12px; }
.g-head { grid-row: 1; padding: 6px 2px; background: var(--tint); border-left: 1px solid var(--line); text-align: center; line-height: 1.3; }
.g-head b { display: block; font-family: var(--font-en); font-size: 11.5px; font-weight: 600; }
.g-head small { font-size: 10.5px; color: var(--ink-3); }
.g-name { grid-column: 1; padding: 8px 10px; background: #fff; border-top: 1px solid var(--line); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-head.g-name { background: var(--tint); border-top: 0; border-left: 0; text-align: left; color: var(--ink-3); }
.g-cell { min-height: 36px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.g-cell.is-off, .g-head.is-off { background: #eceeec; }
.g-bar { z-index: 1; align-self: center; display: grid; place-items: center; height: 22px; margin: 0 3px; background: var(--green); border-radius: 6px; color: #fff; font-family: var(--font-en); font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; }

.calc > * { min-width: 0; }

@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; }
  .calc-out { position: static; }
}
@media (max-width: 640px) {
  .page-head-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .page-head-row > .fav--label, .page-head-row > .page-count { grid-column: 1 / -1; justify-self: start; }
  .calc-in, .calc-out, .conv .panel { padding: 18px 16px; }
  .out.is-big dd { font-size: 40px; }
  .doc-sheet { padding: 20px 16px; }
  .doc-meta { min-width: 0; width: 100%; }
  .gantt-row { grid-template-columns: minmax(90px, 1fr) 76px 60px 30px; gap: 6px; }
  .page-head-row .fav--label { height: 40px; }
}

/* ---------- 印刷（見積書・工程表） ---------- */
@media print {
  @page { margin: 14mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sidebar, .topbar, .footer, .page-head, .tool-related, .no-print, .calc-note, .scrim, .skip { display: none !important; }
  .content { margin: 0; min-height: 0; }
  .section--app { padding: 0; }
  .wrap { width: 100%; }
  .panel { border: 0; }
  .doc-sheet, .gantt-app .print-area { padding: 0; }
  .doc input { border-color: transparent !important; background: none !important; }
  .doc input::placeholder { color: transparent; }
  .scroll-x { overflow: visible; }
  .doc-table, .gantt { min-width: 0; }
  .gantt-title { display: block; margin-bottom: 12px; font-size: 20px; font-weight: 900; }
}

/* =========================================================
   各ツールのページ（紹介ページ・解説）
   ========================================================= */
.section--guide { padding: 0 0 56px; }
.section--guide .prose h2:first-child { margin-top: 0; }
.app-loading { padding: 40px 0; text-align: center; color: var(--ink-3); font-size: 14px; }
.detail-desc { font-size: 16px; line-height: 2; color: var(--ink); }
.prose .modal-tags { margin-top: 18px; }
.prose .modal-actions .btn { flex: none; min-width: 240px; color: #fff; text-decoration: none; }
.prose .modal-note a { white-space: normal; }
.page-head-row > .t-icon--lg { align-self: flex-start; }
a.card-main { color: inherit; }
.modal-page { margin-top: 6px; font-size: 12px; }
.modal-page a { color: var(--green-dark); text-decoration: underline; }
