/* ============================================================
   Personal Notes — Tool Shared CSS
   全ツール共通スタイル。ツール固有の style.css より後に読み込む。
   ロジック・機能UIには干渉しない。ナビ・サイトフレームのみ統一。
============================================================ */

/* ── 固定ナビゲーションバー ── */
#pn-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 38px;
  background: rgba(24, 24, 24, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 6px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 12px;
  box-sizing: border-box;
}

#pn-nav a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  white-space: nowrap;
}

#pn-nav a:hover {
  color: #fff;
  text-decoration: underline;
}

#pn-nav .sep {
  color: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

#pn-nav .current {
  color: rgba(255, 255, 255, 0.4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#pn-nav .pn-right {
  margin-left: auto;
  flex-shrink: 0;
}

/* ── body に固定ナビ分の余白 ── */
body {
  padding-top: 38px !important;
}

/* ── 移行用要素を非表示 ── */
/* migration-page-header は #pn-nav に置き換え済みのため非表示 */
.migration-page-header {
  display: none !important;
}

/* migration-page-footer は #pn-nav フッターに置き換え済みのため非表示 */
.migration-page-footer {
  display: none !important;
}

/* 移行中の注記バナーは本番では不要なため非表示 */
.migration-inline-note {
  display: none !important;
}


/* ============================================================
   共通ツール CSS (common.css)
   全ツール index.html から抽出・移動。重複排除。
============================================================ */
/* source: common.css */
/* assets/css/common.css */
:root {
    --bg: #ffffff;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: rgba(17, 24, 39, .12);

    --accent: #2563eb;
    /* リンク/主ボタン（好みで変更OK） */
    --accentText: #ffffff;

    --radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, .06);

    --space-1: 8px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 32px;

    --max: 1040px;
    --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* {
    box-sizing: border-box;
}

.srOnly {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.7);
    outline-offset: 2px;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: var(--space-4) var(--space-3);
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hd {
    padding: var(--space-3) var(--space-3) 0;
}

.bd {
    padding: var(--space-3);
}

.sectionTitle {
    margin: 0;
    font-size: 18px;
}

.mini {
    font-size: 12.5px;
    color: var(--muted);
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

label {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin: 0 0 6px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 12px 12px;
    font-size: 14px;
    background: #fafafa;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #888;
    background: #fff;
    box-shadow: none;
}

.btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 650;
    cursor: pointer;
}

.btn:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

.btn.primary {
    background: var(--accent);
    color: var(--accentText);
    border-color: transparent;
}

.siteLang {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    margin: 0 0 var(--space-2);
}

.siteLang .sep {
    color: var(--muted);
}

.siteHeader {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.siteHeaderInner {
    max-width: var(--max);
    margin: 0 auto;
    padding: var(--space-2) var(--space-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.siteName {
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 36px;
}

.siteHeader a {
    color: var(--text);
}

.siteHeader a:hover,
.siteHeader a:focus-visible {
    text-decoration: underline;
}

.siteNav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.siteNav a {
    color: var(--text);
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 8px;
    white-space: nowrap;
}

.siteNav a[aria-current="page"] {
    background: rgba(37, 99, 235, 0.08);
    color: var(--text);
    font-weight: 600;
}

.siteNav a:hover,
.siteNav a:focus-visible {
    text-decoration: underline;
}

.navToggle {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}

footer,
.site-footer {
    margin-top: var(--space-5);
    padding-bottom: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid rgba(17, 24, 39, 0.22);
    color: var(--muted);
    font-size: 14px;
}

.siteFooter {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(6px);
}

.siteFooter a {
    color: var(--text);
    font-size: 14px;
}

.siteFooter a:hover,
.siteFooter a:focus-visible {
    text-decoration: underline;
}

@media (max-width: 720px) {
    .navToggle {
        display: inline-flex;
    }

    .siteNav {
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        padding-top: var(--space-2);
    }

    .siteHeader[data-nav-open="true"] .siteNav {
        display: flex;
    }
}


/* ============================================================
   入力要素スタイル統一 — char-counter 準拠
   各ツールの style.css より後に読み込まれるため !important で統一
============================================================ */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="search"],
select,
textarea {
    background: #fafafa !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
    box-shadow: none !important;
    transition: border-color 0.15s, background 0.15s !important;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    border-color: #888 !important;
    background: #fff !important;
    box-shadow: none !important;
    outline: none !important;
}


/* ============================================================
   Primary ボタン統一（計算・変換・ダウンロードボタン）
============================================================ */
.btn.primary,
button.primary,
.primary-btn,
[class*="btn"][class*="primary"]:not(.filter-btn) {
    background: #222 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 0.6rem 1.25rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
    box-shadow: none !important;
}

.btn.primary:hover,
button.primary:hover,
.primary-btn:hover {
    background: #444 !important;
}


/* ============================================================
   コピーボタン統一 — char-counter 準拠
============================================================ */
#copyBtn,
.secondary-btn,
button[id="copyBtn"] {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 0.45rem 0.9rem !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
    background: #f5f5f5 !important;
    color: #444 !important;
    cursor: pointer !important;
    transition: background 0.15s, border-color 0.15s !important;
    box-shadow: none !important;
}

#copyBtn:hover,
.secondary-btn:hover {
    background: #ebebeb !important;
    border-color: #bbb !important;
    color: #222 !important;
}

/* コピー完了トースト */
.toast {
    font-size: 0.78rem !important;
    color: #555 !important;
    margin-left: 0.5rem !important;
}

