/* ================================================================
   SKP — asset/style.css
   レトロモダン × 幾何学模様 × 近未来デザイン
================================================================ */

/* ── リセット & ベース ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    background: #F7F5F1;
    color: #1a1a1a;
    font-family: 'Noto Sans JP', sans-serif;
    font-feature-settings: "palt" 1;
    line-height: 1.75;
    min-height: 100vh;
    /* 幾何学グリッドパターン（ページ背景） */
    background-image:
        linear-gradient(rgba(234,28,22,0.032) 1px, transparent 1px),
        linear-gradient(90deg, rgba(234,28,22,0.032) 1px, transparent 1px);
    background-size: 36px 36px;
}

/* 上部バー + サイドバー分の余白 */
body { padding-top: 44px; }
@media (min-width: 1024px) {
    body { padding-top: 44px; padding-left: 256px; }
}

/* ── スクロールバー ──────────────────────────────────────────── */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: #F7F5F1; }
::-webkit-scrollbar-thumb        { background: #C8B8A0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: #EA1C16; }

.skp-scrollbar::-webkit-scrollbar       { width: 3px; }
.skp-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ── フォント ─────────────────────────────────────────────────── */
.font-display { font-family: 'Chakra Petch', sans-serif; }
.font-num     { font-family: 'Exo 2', sans-serif; }

/* ════════════════════════════════════════════════════════════════
   ローディング画面
════════════════════════════════════════════════════════════════ */
.loader-screen {
    position: fixed;
    inset: 0;
    background: #0E0E0E;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    /* ローディング中の幾何学背景 */
    background-image:
        linear-gradient(rgba(234,28,22,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(234,28,22,0.06) 1px, transparent 1px);
    background-size: 48px 48px;
}
.loader-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 3層幾何学スピナー */
.loader-geo {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.geo-outer {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(234,28,22,0.25);
    transform: rotate(45deg);
    border-radius: 4px;
    animation: geoRotate 2.4s linear infinite;
}
.geo-inner {
    position: absolute;
    inset: 14px;
    border: 1.5px solid #EA1C16;
    transform: rotate(45deg);
    border-radius: 2px;
    animation: geoRotate 1.6s linear infinite reverse;
}
.geo-dot {
    width: 8px;
    height: 8px;
    background: #EA1C16;
    transform: rotate(45deg);
    animation: geoPulse 1.2s ease-in-out infinite;
}
@keyframes geoRotate {
    to { transform: rotate(calc(45deg + 360deg)); }
}
@keyframes geoPulse {
    0%, 100% { transform: rotate(45deg) scale(1); opacity: 1; }
    50%       { transform: rotate(45deg) scale(0.5); opacity: 0.4; }
}

.loader-brand {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 2.25rem;
    letter-spacing: 0.3em;
    color: #fff;
    line-height: 1;
}
.loader-sub {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.35em;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
}
.loader-bar-wrap {
    width: 180px;
    height: 2px;
    background: rgba(255,255,255,0.08);
    border-radius: 1px;
    overflow: hidden;
}
.loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #EA1C16, #EDA04F);
    border-radius: 1px;
    transition: width 0.1s linear;
}

/* ════════════════════════════════════════════════════════════════
   上部ヘッダーバー
════════════════════════════════════════════════════════════════ */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: #181818;
    border-bottom: 1px solid rgba(234,28,22,0.35);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    z-index: 200;
    /* Art Deco 右端のデコレーション */
    background-image: linear-gradient(90deg, #181818 0%, #1e1e1e 100%);
}

/* ティッカー */
.ticker-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    height: 100%;
}
.ticker-label {
    display: none; /* モバイルでは非表示 */
    align-items: center;
    flex-shrink: 0;
    padding-right: 12px;
    border-right: 1px solid rgba(255,255,255,0.1);
}
@media (min-width: 640px) {
    .ticker-label { display: flex; }
}
.ticker-outer {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.ticker-inner {
    white-space: nowrap;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    font-family: 'Noto Sans JP', sans-serif;
    animation: tickerScroll 40s linear infinite;
    display: inline-block;
    padding-right: 50%;  /* ループ間の隙間確保は JS で対応 */
}
@keyframes tickerScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.ticker-outer:hover .ticker-inner { animation-play-state: paused; }

/* トップバーボタン */
.topbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    background: transparent;
}
.topbar-btn:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

/* ハンバーガー */
.hbg-bar {
    display: block;
    height: 2px;
    background: rgba(255,255,255,0.75);
    border-radius: 2px;
    transition: all 0.28s ease;
    width: 22px;
    transform-origin: center;
}
/* 3本線の間隔はボタン側のgapで制御 */
body.menu-open .hbg-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .hbg-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.menu-open .hbg-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ════════════════════════════════════════════════════════════════
   サイドバー
════════════════════════════════════════════════════════════════ */
.sidebar {
    position: fixed;
    top: 44px;  /* ヘッダーバー分下げる */
    left: 0;
    bottom: 0;
    width: 256px;
    background: #181818;
    border-right: 1px solid #2C2C2C;
    display: flex;
    flex-direction: column;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
@media (min-width: 1024px) {
    .sidebar { transform: translateX(0); }
}
.sidebar.is-open { transform: translateX(0); }

/* 幾何学背景デコレーション（サイドバー内） */
.sidebar-geo-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(234,28,22,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(234,28,22,0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.4;
}
/* 右端のグラデーションマスク */
.sidebar-geo-deco::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 70%, #181818 100%);
}

/* ロゴエリア */
.sidebar-logo-area {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 0 20px;
    border-bottom: 1px solid #2C2C2C;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.sidebar-logo-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

/* ダイヤモンド形ロゴアイコン */
.logo-diamond {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #EA1C16, #EDA04F);
    transform: rotate(45deg);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.logo-diamond span { transform: rotate(-45deg); display: block; }
.sidebar-logo-link:hover .logo-diamond { transform: rotate(0deg); border-radius: 8px; }

.sidebar-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #2C2C2C;
    background: transparent;
    transition: all 0.2s ease;
}
.sidebar-close-btn:hover { background: rgba(255,255,255,0.05); border-color: rgba(234,28,22,0.3); }

/* ナビ */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 10px;
    position: relative;
    z-index: 1;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: rgba(255,255,255,0.45);
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    border: 1px solid transparent;
}
.sidebar-nav-item:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
}
.sidebar-nav-item.is-active {
    color: #fff;
    background: rgba(234,28,22,0.12);
    border-color: rgba(234,28,22,0.25);
}

/* アクティブ左ライン */
.nav-active-line {
    position: absolute;
    left: -1px;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: linear-gradient(to bottom, #EA1C16, #EDA04F);
    border-radius: 0 2px 2px 0;
}

/* アイコンラップ */
.nav-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    transition: all 0.2s ease;
    color: rgba(255,255,255,0.4);
}
.nav-icon-wrap.is-active {
    background: rgba(234,28,22,0.2);
    border-color: rgba(234,28,22,0.4);
    color: #EA1C16;
}
.sidebar-nav-item:hover .nav-icon-wrap {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.7);
}

.nav-label { flex: 1; }
.nav-dot {
    width: 5px;
    height: 5px;
    background: #EA1C16;
    transform: rotate(45deg);
    border-radius: 1px;
    flex-shrink: 0;
}

/* ユーザーエリア */
.sidebar-user-area {
    padding: 12px 10px 16px;
    flex-shrink: 0;
    border-top: 1px solid #2C2C2C;
    position: relative;
    z-index: 1;
}
.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EA1C16, #EDA04F);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

/* モバイルオーバーレイ */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 140;
    display: none;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.is-visible {
    display: block;
    opacity: 1;
}

/* ════════════════════════════════════════════════════════════════
   メインコンテンツ共通
════════════════════════════════════════════════════════════════ */
.skp-main {
    min-height: 100vh;
    padding: 28px 20px 60px;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}
@media (min-width: 640px) { .skp-main { padding: 32px 32px 60px; } }

/* ── ページフェードイン ──────────────────────────────────────── */
.skp-main { animation: pageIn 0.4s ease; }
@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════════
   カード
════════════════════════════════════════════════════════════════ */
.skp-card {
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 16px;
    box-shadow: 0 1px 12px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* Art Deco コーナーデコレーション */
.skp-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 64px; height: 64px;
    background: linear-gradient(225deg, rgba(234,28,22,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.skp-card-hover:hover {
    box-shadow: 0 8px 32px rgba(234,28,22,0.1);
    transform: translateY(-2px);
}

/* ════════════════════════════════════════════════════════════════
   セクション見出し
════════════════════════════════════════════════════════════════ */
.section-heading {
    display: flex;
    align-items: flex-end;
    gap: 14px;
}
.section-heading-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
    position: relative;
}
/* ダイヤモンド装飾 */
.section-heading-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border: 1px solid rgba(234,28,22,0.3);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

.section-title-en {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    color: #181818;
    line-height: 1;
}
.section-title-ja {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #EA1C16;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.section-title-ja::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}

/* ════════════════════════════════════════════════════════════════
   バッジ
════════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.6;
    white-space: nowrap;
    font-family: 'Noto Sans JP', sans-serif;
}
.badge-red    { background: #EA1C16; color: #fff; }
.badge-amber  { background: #EDA04F; color: #fff; }
.badge-sage   { background: #B8BB85; color: #4a4a2a; }
.badge-green  { background: #489070; color: #fff; }
.badge-dark   { background: #396356; color: #fff; }
.badge-gray   { background: #6B7280; color: #fff; }

/* ════════════════════════════════════════════════════════════════
   ニュースアイテム
════════════════════════════════════════════════════════════════ */
.news-item {
    display: flex;
    flex-direction: column;
    padding: 14px 10px;
    border-radius: 10px;
    transition: background 0.2s ease;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(0,0,0,0.045);
    position: relative;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: rgba(234,28,22,0.03); }
/* ホバー時の左アクセントライン */
.news-item::before {
    content: '';
    position: absolute;
    left: 0; top: 10%; bottom: 10%;
    width: 2px;
    background: linear-gradient(to bottom, #EA1C16, #EDA04F);
    border-radius: 1px;
    opacity: 0;
    transform: scaleY(0.5);
    transition: opacity 0.2s, transform 0.2s;
}
.news-item:hover::before { opacity: 1; transform: scaleY(1); }

@media (min-width: 768px) {
    .news-item { flex-direction: row; align-items: center; }
}

/* ════════════════════════════════════════════════════════════════
   クイックアクセスカード
════════════════════════════════════════════════════════════════ */
.quick-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 18px;
    padding: 28px 16px 22px;
    text-align: center;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
}
/* 幾何学コーナーアクセント */
.quick-card::before {
    content: '';
    position: absolute;
    bottom: -12px; right: -12px;
    width: 60px; height: 60px;
    border: 1.5px solid rgba(234,28,22,0.1);
    transform: rotate(45deg);
    border-radius: 6px;
    transition: all 0.3s ease;
}
.quick-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
    border-color: rgba(234,28,22,0.2);
}
.quick-card:hover::before {
    bottom: -6px; right: -6px;
    border-color: rgba(234,28,22,0.25);
    transform: rotate(45deg) scale(1.1);
}

.quick-card .q-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
    color: #fff;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}
.quick-card:hover .q-icon { transform: scale(1.12) rotate(-5deg); }

.quick-card .q-label {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    position: relative;
    z-index: 1;
    transition: color 0.2s;
}

/* ════════════════════════════════════════════════════════════════
   関連リンク
════════════════════════════════════════════════════════════════ */
.links-section {
    background: linear-gradient(135deg, #181818 0%, #1a1a1a 40%, #1e1616 100%);
    border-radius: 18px;
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(234,28,22,0.2);
}
/* 幾何学背景 */
.links-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(234,28,22,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(234,28,22,0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}
/* 右上コーナー光 */
.links-section::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(237,160,79,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.related-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.22s ease;
    position: relative;
    z-index: 1;
}
.related-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-color: rgba(234,28,22,0.3);
    transform: translateX(4px);
}
.link-icon {
    width: 38px; height: 38px;
    border-radius: 9px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    transition: all 0.22s ease;
}
.related-link:hover .link-icon {
    background: #EA1C16;
    border-color: #EA1C16;
    color: #fff;
}

/* ════════════════════════════════════════════════════════════════
   ウェルカムバナー
════════════════════════════════════════════════════════════════ */
.welcome-bar {
    background: linear-gradient(135deg, #FFFFFF 0%, #FEF9F9 100%);
    border: 1px solid rgba(234,28,22,0.12);
    border-left: 3px solid #EA1C16;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.welcome-bar::before {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 100px; height: 100px;
    border: 1px solid rgba(234,28,22,0.08);
    transform: rotate(45deg);
    border-radius: 8px;
    pointer-events: none;
}

/* ════════════════════════════════════════════════════════════════
   フォーム要素（共通）
════════════════════════════════════════════════════════════════ */
.skp-input {
    width: 100%;
    padding: 11px 14px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Noto Sans JP', sans-serif;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.skp-input:focus {
    border-color: #EA1C16;
    box-shadow: 0 0 0 3px rgba(234,28,22,0.1);
}

/* ── ボタン ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Noto Sans JP', sans-serif;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
}
.btn-primary {
    background: linear-gradient(135deg, #EA1C16, #C0150F);
    color: #fff;
    box-shadow: 0 3px 12px rgba(234,28,22,0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #f52520, #EA1C16);
    box-shadow: 0 6px 20px rgba(234,28,22,0.4);
    transform: translateY(-1px);
}
.btn-secondary {
    background: transparent;
    color: #EA1C16;
    border: 1.5px solid #EA1C16;
}
.btn-secondary:hover { background: rgba(234,28,22,0.06); }

.btn-outline {
    background: transparent;
    color: #374151;
    border: 1.5px solid #e2e8f0;
}
.btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* ════════════════════════════════════════════════════════════════
   ページトップ
════════════════════════════════════════════════════════════════ */
#backToTop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 42px; height: 42px;
    background: #181818;
    border: 1px solid rgba(234,28,22,0.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
    cursor: pointer;
    text-decoration: none;
    transform: rotate(45deg);  /* ダイヤモンド形 */
    border-radius: 6px;
}
#backToTop i { transform: rotate(-45deg); }
#backToTop.is-visible { opacity: 1; pointer-events: auto; }
#backToTop:hover { background: #EA1C16; border-color: #EA1C16; }

/* ════════════════════════════════════════════════════════════════
   フッター
════════════════════════════════════════════════════════════════ */
.skp-footer {
    margin-top: 48px;
    padding: 20px 0;
    border-top: 1px solid rgba(0,0,0,0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.skp-footer-text {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 11px;
    color: rgba(0,0,0,0.3);
    letter-spacing: 0.06em;
}

/* ── ユーティリティ ─────────────────────────────────────────── */
.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ================================================================
   ログイン画面
================================================================ */
body.login-page {
    padding: 0;
    background: #F7F5F1;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.login-wrap {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ── 左：ブランドパネル ──────────────────────────────────────── */
.login-brand-panel {
    display: none;
    position: relative;
    width: 44%;
    background: #181818;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid rgba(234,28,22,0.2);
}
@media (min-width: 768px) {
    .login-brand-panel { display: flex; }
}

/* 幾何学グリッド背景 */
.lbp-geo {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(234,28,22,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(234,28,22,0.07) 1px, transparent 1px);
    background-size: 36px 36px;
    pointer-events: none;
}
/* 右側グラデーションマスク */
.lbp-geo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 60%, #181818 100%);
}

.lbp-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 48px 32px;
    position: relative;
    z-index: 1;
}

/* ロゴは画像に置き換えたためCSS不要 */

/* 浮遊ダイヤモンドデコ */
.lbp-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.lbp-deco-diamond {
    position: absolute;
    border: 1px solid rgba(234,28,22,0.15);
    transform: rotate(45deg);
    border-radius: 4px;
    animation: floatDiamond 6s ease-in-out infinite;
}
.lbp-deco-1 { width: 80px; height: 80px; bottom: 25%; right: 10%; animation-delay: 0s; }
.lbp-deco-2 { width: 40px; height: 40px; bottom: 40%; right: 22%; animation-delay: 2s;
               border-color: rgba(237,160,79,0.2); }
.lbp-deco-3 { width: 120px; height: 120px; bottom: 12%; right: -20px; animation-delay: 4s;
               border-color: rgba(234,28,22,0.08); }
@keyframes floatDiamond {
    0%,100% { transform: rotate(45deg) translateY(0); }
    50%      { transform: rotate(45deg) translateY(-12px); }
}

.lbp-footer {
    padding: 16px 48px;
    position: relative;
    z-index: 1;
}

/* ── 右：フォームパネル ──────────────────────────────────────── */
.login-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    position: relative;
}

.login-lang {
    position: absolute;
    top: 20px;
    right: 24px;
}

.login-form-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}
@media (min-width: 768px) {
    .login-form-inner { padding: 64px 48px; }
}


/* モバイル用ログインロゴ */
.login-mobile-logo {
    text-align: center;
    padding-bottom: 4px;
}

/* タイトル上の幾何学ライン */
.login-title-deco {
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #EA1C16, #EDA04F);
    border-radius: 2px;
}

/* エラーメッセージ */
.login-error {
    background: rgba(234,28,22,0.05);
    border: 1px solid rgba(234,28,22,0.25);
    border-left: 3px solid #EA1C16;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: #C0150F;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

/* フォームフィールド */
.login-field { margin-bottom: 18px; }
.login-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #4B5563;
    margin-bottom: 7px;
    letter-spacing: 0.04em;
}

.skp-input.is-error {
    border-color: rgba(234,28,22,0.5);
    background: rgba(234,28,22,0.02);
}

/* パスワード表示トグル */
.pw-wrap { position: relative; }
.pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    font-size: 13px;
    padding: 4px;
    transition: color 0.2s;
}
.pw-toggle:hover { color: #EA1C16; }
.pw-wrap .skp-input { padding-right: 40px; }

.login-form-footer {
    padding: 16px 40px 20px;
    text-align: center;
}

/* ── ログインボタン スピナー ──────────────────────────────── */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* ── ログインエラー（DB種別） ─────────────────────────────── */
.login-error.db-error {
    border-left-color: #EDA04F;
    background: rgba(237,160,79,0.05);
    color: #92400E;
}
.login-error.db-error .fa-server { color: #EDA04F; }

/* ── カテゴリフィルタボタン ─────────────────────────────── */
.filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(0,0,0,0.1);
    color: #6B7280;
    background: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.filter-btn:hover { border-color: #EA1C16; color: #EA1C16; }
.filter-btn.is-active {
    background: #EA1C16;
    border-color: #EA1C16;
    color: #fff;
}

/* ── お知らせ詳細本文 ──────────────────────────────────── */
.prose-skp {
    font-size: 0.9375rem;
    line-height: 1.9;
    color: #374151;
}
.prose-skp br { margin-bottom: 0.5em; }

/* ── お知らせバッジ：4文字分の均一幅 ──────────────────── */
.news-item .badge {
    min-width: 5em;   /* 4文字 + 余白 */
    text-align: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── 内規本文スタイル ──────────────────────────────────── */
.regulation-body { color: #374151; line-height: 1.9; font-size: 0.9375rem; }
.regulation-body h2 {
    font-size: 1.05rem; font-weight: 700; color: #1B3A2D;
    border-left: 3px solid #489070; padding-left: 10px;
    margin: 1.75rem 0 0.75rem;
}
.regulation-body h3 {
    font-size: 0.9375rem; font-weight: 700; color: #374151;
    margin: 1.25rem 0 0.5rem;
}
.regulation-body h4 {
    font-size: 0.875rem; font-weight: 700; color: #4B5563;
    margin: 1rem 0 0.4rem;
}
.regulation-body p { margin: 0.5rem 0; }
.regulation-body ol, .regulation-body ul {
    padding-left: 1.5rem; margin: 0.5rem 0;
}
.regulation-body ol { list-style: decimal; }
.regulation-body ul { list-style: disc; }
.regulation-body li { margin: 0.25rem 0; }
.regulation-body a { color: #489070; text-decoration: underline; }

/* ── 内規ファイルボタン ────────────────────────────────── */
.reg-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Noto Sans JP', sans-serif;
}
.reg-file-pdf   { background:#fee2e2; color:#991b1b; border:1px solid #fecaca; }
.reg-file-pdf:hover { background:#991b1b; color:#fff; }
.reg-file-word  { background:#dbeafe; color:#1e40af; border:1px solid #bfdbfe; }
.reg-file-word:hover { background:#1e40af; color:#fff; }
.reg-file-excel { background:#d1fae5; color:#065f46; border:1px solid #a7f3d0; }
.reg-file-excel:hover { background:#065f46; color:#fff; }
.reg-file-other { background:#f3f4f6; color:#374151; border:1px solid #e5e7eb; }
.reg-file-other:hover { background:#374151; color:#fff; }

/* 言語切替ボタン */
.reg-lang-btn {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Chakra Petch', sans-serif;
    letter-spacing: 0.1em;
    border: 1px solid rgba(27,58,45,0.25);
    color: #396356;
    text-decoration: none;
    transition: all 0.2s ease;
}
.reg-lang-btn:hover   { background: #396356; color: #fff; border-color: #396356; }
.reg-lang-btn.is-active { background: #1B3A2D; color: #fff; border-color: #1B3A2D; }

/* 内規本文（regulation.php） */
.regulation-body h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #1B3A2D;
    border-left: 3px solid #396356;
    padding-left: 10px;
    margin: 2rem 0 0.75rem;
}
.regulation-body h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #374151;
    margin: 1.5rem 0 0.5rem;
}
.regulation-body .reg-chapter {
    font-size: 1rem; font-weight: 700;
    color: #1B3A2D;
    background: #f0fdf4;
    border-left: 4px solid #396356;
    padding: 8px 12px;
    margin: 2rem 0 1rem;
    border-radius: 0 6px 6px 0;
}
.regulation-body .reg-article { margin: 0.75rem 0; }
.regulation-body .reg-article-title {
    font-size: 0.9rem; font-weight: 700; color: #374151; margin-bottom: 4px;
}
.regulation-body .reg-article-body { font-size: 0.9rem; color: #4B5563; line-height: 1.85; }
.regulation-body .reg-list { padding-left: 1.5rem; margin: 0.5rem 0; }
.regulation-body .reg-list li { margin: 0.3rem 0; font-size: 0.9rem; color: #4B5563; }
.regulation-body p { margin: 0.5rem 0; font-size: 0.9rem; color: #4B5563; line-height: 1.85; }

/* ================================================================
   内規集 タブ・テーブル・本文スタイル
================================================================ */

/* ── タブナビ ───────────────────────────────────────────── */
.reg-tab-nav {
    display: flex;
    gap: 2px;
    margin-bottom: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 6px 6px 0;
    width: fit-content;
}
.reg-tab {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border-radius: 8px 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -1px;
    position: relative;
}
.reg-tab:hover { color: #1B3A2D; background: #f8fafc; }
.reg-tab.is-active {
    background: #1B3A2D;
    color: #fff;
    border-color: #1B3A2D;
}
.reg-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 1px 7px;
    background: rgba(255,255,255,0.2);
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Exo 2', sans-serif;
}
.reg-tab.is-active .reg-tab-count { background: rgba(255,255,255,0.25); }
.reg-tab:not(.is-active) .reg-tab-count { background: rgba(0,0,0,0.08); color: #475569; }

/* ── コンテンツエリア ────────────────────────────────────── */
.reg-content-area {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0 12px 12px 12px;
    overflow: hidden;
    box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}

/* ── テーブル ────────────────────────────────────────────── */
.reg-table-head { background: #1B3A2D; }
.reg-th {
    padding: 12px 16px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    text-align: left;
}
.reg-table-row { transition: background 0.15s ease; }
.reg-table-row:hover { background: #f0fdf4; }
.reg-td { padding: 14px 16px; vertical-align: middle; }

/* ── 効力バッジ ──────────────────────────────────────────── */
.reg-validity-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.reg-validity-valid   { background: #16a34a; }
.reg-validity-pending { background: #2563eb; }
.reg-validity-danger  { background: #dc2626; }
.reg-validity-default { background: #6b7280; }

/* ── 内規情報カード（詳細ページ） ───────────────────────── */
.reg-info-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}
.reg-info-header {
    background: #1B3A2D;
    padding: 10px 20px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}
.reg-info-th {
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-align: left;
    vertical-align: top;
    width: 9rem;
    white-space: nowrap;
    border-bottom: 1px solid #f1f5f9;
}
.reg-info-td {
    padding: 10px 20px;
    font-size: 13.5px;
    color: #374151;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.65;
}

/* ── 本文カード ──────────────────────────────────────────── */
.reg-body-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}
.reg-body-header {
    background: #1B3A2D;
    padding: 10px 24px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.reg-body-content {
    padding: 2rem 2.5rem;
    overflow-x: auto;
}
@media (max-width: 640px) {
    .reg-body-content { padding: 1.25rem 1rem; }
}

/* ── 内規本文（参考HTMLに準拠） ─────────────────────────── */
#contents {
    max-width: none;
    margin: 0 auto;
    font-family: 'Noto Sans JP', sans-serif;
}
#contents h1.reg-doc-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5em;
    font-family: 'Noto Sans JP', sans-serif;
}
#contents p { font-size: 15px; line-height: 1.65; text-align: justify; color: #1a1a1a; }
#contents p.part      { font-weight: 700; padding-left: 3em; }
#contents p.chapter   { font-weight: 700; padding-left: 4em; margin-top: 1.2em; }
#contents p.section   { font-weight: 700; padding-left: 6em; margin-top: 0.8em; }
#contents p.subsection{ font-weight: 700; padding-left: 9em; }
#contents p.previous  { margin: 0 0 0.6em 0; }
#contents p.article {
    padding: 0;
    margin: 0.15em 0;
    text-indent: -1em;
    margin-left: 1em;
}
#contents p.subparagraph {
    text-indent: -1em;
    margin-left: 2em;
}
#contents p.items {
    text-indent: -1em;
    margin-left: 3em;
}
#contents b { font-weight: 700; }
#contents table {
    width: 50%;
    margin: 0.3em 0 0.8em 2em;
    border-collapse: collapse;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 14px;
}
#contents th {
    padding: 5px 8px;
    text-align: center;
    border: 1px solid #ddd;
    background: #f1f5f9;
    font-weight: 600;
}
#contents td {
    padding: 5px 8px;
    border: 1px solid #ddd;
    line-height: 1.6;
}
/* PDF別紙リンク */
.reg-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1B3A2D;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid currentColor;
    transition: color 0.2s;
}
.reg-pdf-link::before {
    content: '\f1c1';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: #dc2626;
}
.reg-pdf-link:hover { color: #dc2626; }

@media (max-width: 640px) {
    #contents p.part      { padding-left: 2em; padding-bottom: 1em; }
    #contents p.chapter   { padding-left: 3em; padding-bottom: 1em; }
    #contents p.section   { padding-left: 4em; padding-bottom: 1em; }
    #contents p.subsection{ padding-left: 5em; padding-bottom: 1em; }
    #contents table       { width: 95%; margin-left: 0.25em; }
}

/* デスクトップ/モバイル切替 */
.reg-desktop-only { display: block; }
.reg-mobile-only  { display: none; }
@media (max-width: 767px) {
    .reg-desktop-only { display: none; }
    .reg-mobile-only  { display: block; }
}

/* ── 並び替えボタン ─────────────────────────────────────── */
.reg-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Noto Sans JP', sans-serif;
}
.reg-sort-btn:hover { border-color: #1B3A2D; color: #1B3A2D; }
.reg-sort-btn.is-active {
    background: #1B3A2D;
    color: #fff;
    border-color: #1B3A2D;
}

/* ── 行クリック対応テーブル行 ────────────────────────────── */
.reg-row-link {
    cursor: pointer;
}
.reg-row-link:hover td:first-child {
    border-left: 3px solid #1B3A2D;
}
.reg-row-link:hover .font-medium {
    color: #EA1C16 !important;
}

/* ── テーブルヘッダー修正（見やすく） ───────────────────── */
.reg-table-head th.reg-th {
    background: #1B3A2D;
}
.reg-table-row:nth-child(even) {
    background: #f8faf8;
}
.reg-table-row:nth-child(even):hover {
    background: #f0fdf4;
}

/* ── reg-td の左ボーダーアニメーション ─────────────────── */
.reg-td {
    transition: border-left 0.15s ease;
    border-left: 3px solid transparent;
}
.reg-row-link td.reg-td:first-child {
    border-left: 3px solid transparent;
    transition: border-left-color 0.15s ease;
}
.reg-row-link:hover td.reg-td:first-child {
    border-left-color: #1B3A2D;
}

/* ── 内規テーブル nowrap セル ──────────────────────────── */
.reg-td-nowrap {
    padding: 12px 16px;
    vertical-align: middle;
    white-space: nowrap;
}

/* ── 内規情報テーブル（白背景・境界線） ─────────────────── */
.reg-info-row { border-bottom: 1px solid #e2e8f0; }
.reg-info-row:last-child { border-bottom: none; }
.reg-info-th {
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-align: left;
    vertical-align: top;
    width: 9rem;
    white-space: nowrap;
    background: #fff;
    border-right: 1px solid #e2e8f0;
}
.reg-info-td {
    padding: 10px 20px;
    font-size: 13.5px;
    color: #374151;
    background: #fff;
    line-height: 1.65;
}

/* ── タブ改行防止 ──────────────────────────────────────── */
.reg-tab-nav { flex-wrap: nowrap; overflow-x: auto; }
.reg-tab { flex-shrink: 0; }

/* ── 本文幅制限解除 ────────────────────────────────────── */
#contents { max-width: none !important; }
.reg-body-content { padding: 2rem; }
@media (max-width: 640px) { .reg-body-content { padding: 1rem; } }

/* ================================================================
   別紙様式ボタン（HTMLファイル内で使用）
   用法: <a href="/regpdf.php?f=xxx.pdf" class="skp-attach-btn skp-attach-pdf">
           別紙第1号様式
         </a>
================================================================ */
.skp-attach-area {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 2px solid #1B3A2D;
}
.skp-attach-title {
    font-size: 13px;
    font-weight: 700;
    color: #1B3A2D;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.skp-attach-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 14px;
    background: #1B3A2D;
    border-radius: 2px;
}
.skp-attach-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.skp-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.3;
}
.skp-attach-btn .attach-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.skp-attach-btn .attach-label {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.skp-attach-btn .attach-type {
    font-size: 9px;
    font-family: 'Chakra Petch', sans-serif;
    letter-spacing: 0.1em;
    opacity: 0.7;
    text-transform: uppercase;
}
/* PDF */
.skp-attach-pdf {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}
.skp-attach-pdf .attach-icon { color: #dc2626; }
.skp-attach-pdf:hover { background: #dc2626; color: #fff; border-color: #dc2626; }
.skp-attach-pdf:hover .attach-icon { color: #fff; }
/* Word */
.skp-attach-word {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}
.skp-attach-word .attach-icon { color: #2563eb; }
.skp-attach-word:hover { background: #2563eb; color: #fff; border-color: #2563eb; }
.skp-attach-word:hover .attach-icon { color: #fff; }
/* Excel */
.skp-attach-excel {
    background: #f0fdf4;
    color: #065f46;
    border-color: #a7f3d0;
}
.skp-attach-excel .attach-icon { color: #059669; }
.skp-attach-excel:hover { background: #059669; color: #fff; border-color: #059669; }
.skp-attach-excel:hover .attach-icon { color: #fff; }

/* ================================================================
   内規集 モダンリストデザイン v2
================================================================ */

/* ── リストヘッダー（グリッド定義） ─────────────────────── */
/* グリッドテーブル定義（50% + 残り5列均等） */
.reg-list-grid {
    display: grid;
    grid-template-columns: 50% repeat(5, 1fr);
    align-items: center;
    min-width: 680px;
    width: 100%;
}
.reg-list-header-row {
    background: #f1f5f9;
    border-bottom: 2px solid #1B3A2D;
}
.reg-th-cell {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;       /* slate-500：白背景でも確実に見える */
    background: #f1f5f9;  /* インラインでなくCSSで確実に適用 */
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 2px solid #1B3A2D; /* 深緑の下線でアクセント */
}
.reg-data-row {
    display: grid;
    grid-template-columns: 50% repeat(5, 1fr);
    align-items: center;
    min-width: 680px;
    width: 100%;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
    cursor: pointer;
    pointer-events: auto;  /* クリック確実に受け取る */
    position: relative;
    z-index: 1;
}
.reg-data-row:last-child { border-bottom: none; }
.reg-data-row:hover { background: #f0fdf9; }
.reg-td-cell { padding: 12px 16px; }

/* ── リストラッパー ──────────────────────────────────────── */
.reg-list-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;       /* 内部要素が角丸に収まる */
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
/* デスクトップテーブル部分のみ横スクロール */
.reg-list-desktop-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.reg-list-desktop-scroll .reg-list-header,
.reg-list-desktop-scroll .reg-list-item {
    min-width: 680px;
}

/* ── リストアイテム ──────────────────────────────────────── */
.reg-list-item {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: background 0.15s ease;
    cursor: pointer;
}
.reg-list-item:last-child { border-bottom: none; }
.reg-list-item:hover { background: #f8fffe; }

/* 右端のアクセントライン */
.reg-list-accent {
    width: 3px;
    background: transparent;
    flex-shrink: 0;
    transition: background 0.15s ease;
    border-radius: 0 3px 3px 0;
}
.reg-list-item:hover .reg-list-accent { background: #1B3A2D; }

/* ── 効力バッジ（vBadge関数用） ─────────────────────────── */
.rvb {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    letter-spacing: 0.04em;
}
.rvb-valid   { background: #16a34a; }
.rvb-pending { background: #2563eb; }
.rvb-danger  { background: #dc2626; }

/* ── タブ（ピル型） ─────────────────────────────────────── */
.reg-tab-nav {
    display: flex;
    gap: 2px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
}

/* ヘッダー行の背景 */
.reg-list-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 14px 14px 0 0;
}

/* ── 内規集管理者ボタン（Tailwindカスタムカラー非依存） ─── */
.reg-admin-btn {
    background: #EA1C16;
    color: #fff !important;
}
.reg-admin-btn:hover { background: #C0150F; }


/* ── 注記ボックス（英語版仮訳注記） ────────────────────── */
.reg-note-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    margin: 0 0 1.5em;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
.reg-note-box .fa-circle-info {
    color: #d97706;
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}
.reg-note-box p {
    font-size: 13px;
    color: #92400e;
    line-height: 1.65;
    margin: 0;
    text-align: left;
    text-indent: 0;
}
.reg-note-box strong {
    font-weight: 700;
    color: #78350f;
}
/* ================================================================
   印刷スタイル（regulation.php）
================================================================ */
@media print {
    body > *                 { display: none !important; }
    .skp-main                { display: block !important; }
    #sidebar, #topBar,
    .skp-footer,
    #backToTop               { display: none !important; }
    #print-area,
    #print-area-body         { display: block !important; }
    body { padding: 0 !important; }
    .skp-main { padding: 0 !important; margin: 0 !important; }
    #print-area { margin-bottom: 1.5rem; }
    .reg-body-content { padding: 0 !important; }
    .reg-info-header,
    .reg-body-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .no-print { display: none !important; }
}

/* ================================================================
   PWA インストールバナー
================================================================ */
#skp-install-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    transform: translateY(calc(100% + 32px));
    opacity: 0;
    width: auto;
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);
    z-index: 8000;
    display: flex;
    align-items: center;
    gap: 14px;
    box-sizing: border-box;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
                opacity 0.35s ease;
}

@media (max-width: 480px) {
    #skp-install-banner {
        bottom: 12px;
        left: 12px;
        right: 12px;
        padding: 14px 14px;
        border-radius: 14px;
        flex-wrap: wrap;
    }
}

@media print {
    #skp-install-banner { display: none !important; }
}