/* ============================================
   va-radio.com — common style
   薄いグレー×黒 / 手帖風 / 装飾最小限
   ============================================ */

:root {
  --bg: #f4f4f4;
  --surface: #fafafa;
  --ink: #1a1a1a;
  --ink-soft: #444;
  --ink-faint: #6b6b6b;
  --line: #c8c8c8;
  --line-soft: #dadada;
  --hl: #1a1a1a;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Yugothic", "Meiryo", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- layout ---- */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 88px 24px 120px;
}

@media (max-width: 600px) {
  .wrap { padding: 72px 18px 80px; }
}

/* ---- site header ---- */
.site-head {
  margin-bottom: 56px;
}

.site-mark {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin: 0 0 6px;
}

.site-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.site-sub {
  color: var(--ink-soft);
  margin: 0;
  max-width: 46ch;
}

/* ---- section label ---- */
.label {
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin: 0 0 20px;
}

/* ---- tool index: card grid ---- */
.tool-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 560px) {
  .tool-cards { grid-template-columns: 1fr; }
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 18px 18px 16px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.tool-card:hover,
.tool-card:focus-visible {
  border-color: var(--ink);
  background: #fff;
}

.tool-card-icon {
  color: var(--ink);
  margin-bottom: 12px;
  display: inline-flex;
}
.tool-card-icon .tool-icon {
  width: 36px;
  height: 36px;
}

.tool-card-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.tool-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tool-tag {
  display: inline-block;
  font-size: 11.5px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  padding: 0 6px;
}

.tool-desc {
  display: block;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.65;
  margin-top: 2px;
}

/* 共通: アイコンSVGの基本サイズ（関連カード等） */
.tool-icon {
  display: block;
}

/* ---- page header (per tool) ---- */
.back {
  font-size: 14px;
  color: var(--ink-faint);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 28px;
}
.back:hover { color: var(--ink); }

.page-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}

.page-lead {
  color: var(--ink-soft);
  margin: 0 0 36px;
  max-width: 52ch;
}

/* ---- form controls ---- */
textarea, input[type="text"], input[type="number"], select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color .12s;
}

textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.8;
}

textarea:focus, input:focus, select:focus {
  border-color: var(--ink);
}

button, .btn {
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 10px 20px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0.02em;
}

button:hover, .btn:hover { opacity: .85; }
button.ghost, .btn.ghost {
  background: transparent;
  color: var(--ink);
}

/* ---- result areas ---- */
.out {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  padding: 18px 20px;
  margin-top: 20px;
  min-height: 40px;
}

.muted { color: var(--ink-faint); }
.row { margin-bottom: 22px; }
.row:last-child { margin-bottom: 0; }
.field-label {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

/* highlight marks used inside tool outputs */
mark {
  background: #1a1a1a;
  color: #fafafa;
  padding: 0 3px;
  border-radius: 1px;
}
mark.warn {
  background: #e6e6e6;
  color: #1a1a1a;
  border-bottom: 2px solid #1a1a1a;
  padding: 0;
  background: transparent;
}

/* ---- meter / bars ---- */
.meter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.meter-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  gap: 16px;
}
.meter-list .k {
  color: var(--ink-faint);
  font-size: 14px;
  flex-shrink: 0;
}
.meter-list .v {
  color: var(--ink);
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

.bar {
  height: 6px;
  background: var(--line-soft);
  border-radius: 1px;
  overflow: hidden;
  width: 120px;
}
.bar > span {
  display: block;
  height: 100%;
  background: var(--ink);
  transition: width .3s;
}

/* ---- footer ---- */
.foot {
  margin-top: 80px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-faint);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.foot a { color: var(--ink-faint); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* utility */
.hidden { display: none; }
.small { font-size: 13px; color: var(--ink-faint); }
.note { color: var(--ink-soft); font-size: 14px; margin-top: 10px; }

/* ============================================
   固定ヘッダー / ナビ / トグル
   ============================================ */
.vr-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(244, 244, 244, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line-soft);
  z-index: 100;
  transition: background .2s, border-color .2s;
}
.vr-header.scrolled {
  background: rgba(244, 244, 244, 0.98);
  border-bottom-color: var(--line);
}
.vr-header-inner {
  max-width: 1080px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.vr-brand {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.vr-brand:hover { opacity: .7; }
.vr-brand-logo {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* PC nav（トグル導入により非表示・ドロワーに統一） */
.vr-nav {
  display: none;
}
.vr-nav a {
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.vr-nav a:hover { color: var(--ink); }
.vr-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 500;
}

/* ハンバーガー（全画面共通） */
.vr-burger {
  display: inline-block;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.vr-burger span,
.vr-burger span::before,
.vr-burger span::after {
  content: "";
  display: block;
  position: absolute;
  left: 50%;
  width: 16px; height: 1.5px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: transform .2s, opacity .2s;
}
.vr-burger span { top: 50%; margin-top: -0.75px; }
.vr-burger span::before { top: -6px; }
.vr-burger span::after { top: 6px; }
.vr-burger.open span { background: transparent; }
.vr-burger.open span::before { transform: translateX(-50%) translateY(6px) rotate(45deg); }
.vr-burger.open span::after { transform: translateX(-50%) translateY(-6px) rotate(-45deg); }

/* ドロワー（全画面共通） */
.vr-drawer {
  position: fixed;
  top: 56px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 8px 20px 16px;
  transform: translateY(-110%);
  transition: transform .22s ease;
  z-index: 99;
  box-shadow: 0 8px 16px rgba(0,0,0,0.04);
  max-width: 1080px;
  margin: 0 auto;
}
.vr-drawer.open { transform: translateY(0); }
.vr-drawer a {
  display: block;
  padding: 12px 4px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid var(--line-soft);
}
.vr-drawer a:last-child { border-bottom: none; }
.vr-drawer a.active { color: var(--ink); font-weight: 600; }
.vr-drawer a .tag {
  font-size: 12.5px; color: var(--ink-faint); margin-left: 8px; font-weight: 400;
}

/* ============================================
   フッター強化
   ============================================ */
.vr-foot {
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.vr-foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
@media (max-width: 560px) {
  .vr-foot-grid { grid-template-columns: 1fr; gap: 20px; }
}
.vr-foot h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.vr-foot-logo {
  display: inline-block;
  width: 24px;
  height: 24px;
  vertical-align: middle;
}
.vr-foot .vr-foot-lead {
  color: var(--ink-soft);
  font-size: 13px;
  margin: 0;
  max-width: 38ch;
}
.vr-foot ul {
  list-style: none;
  margin: 0; padding: 0;
}
.vr-foot ul li { margin-bottom: 6px; }
.vr-foot ul a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13.5px;
}
.vr-foot ul a:hover { color: var(--ink); }
.vr-foot-meta {
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-faint);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================
   記事下 関連記事（他の道具）
   ============================================ */
.vr-related {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}
.vr-related-title {
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin: 0 0 16px;
}
.vr-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 560px) {
  .vr-related-grid { grid-template-columns: 1fr; }
}
.vr-related a {
  display: block;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.vr-related a:hover {
  border-color: var(--line);
  background: #fff;
}
.vr-related .r-icon {
  display: inline-flex;
  color: var(--ink);
  margin-bottom: 8px;
}
.vr-related .r-icon .tool-icon {
  width: 22px;
  height: 22px;
}
.vr-related .r-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}
.vr-related .r-desc {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ============================================
   トップへ戻るボタン
   ============================================ */
.vr-totop {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 40px; height: 40px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 90;
}
.vr-totop.show {
  opacity: .9;
  visibility: visible;
  transform: translateY(0);
}
.vr-totop:hover { opacity: 1; }
.vr-totop svg { width: 16px; height: 16px; }
@media (max-width: 600px) {
  .vr-totop { right: 14px; bottom: 14px; }
}
