@charset "UTF-8";

:root {
    --color-bg: #ffffff;
    --color-bg-light: #f5f7fa;
    --color-text: #1a1a2e;
    --color-text-light: #64748b;
    /* ブランドカラー（ロゴ画像から取得。調整はここだけ） */
    --brand-navy: #003f76;
    --brand-yellow: #f9be00;
    --brand-yellow-rgb: 249, 190, 0;
    --brand-yellow-hover: #e0a900;
    --brand-on-yellow: var(--brand-navy);

    --color-primary: var(--brand-navy);
    --color-accent: var(--brand-yellow);
    --color-accent-hover: var(--brand-yellow-hover);
    --color-accent-text: var(--brand-navy);
    --font-en: 'Inter', sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;
    --easing: cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-en), var(--font-jp);
    line-height: 1.8;
    letter-spacing: 0.04em;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 92%;
    max-width: 1280px;
    margin: 0 auto;
}

.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    min-width: 320px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: background 0.3s var(--easing);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a, .logo {
    color: var(--color-primary);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-decoration: none;
}

#mainNav ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

#mainNav a {
    text-decoration: none;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    position: relative;
}

#mainNav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.4s var(--easing);
}

#mainNav a:hover::after {
    width: 100%;
}

#mainNav a.lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 22px;
    padding: 0 8px;
    font-size: 11px;
    letter-spacing: 0.05em;
    border: 1px solid rgba(15, 23, 42, 0.25);
    border-radius: 11px;
    color: var(--color-text-light);
}

#mainNav a.lang-link::after { display: none; }
#mainNav a.lang-link:hover { border-color: var(--color-accent-text); color: var(--color-accent-text); }

body.debug-mode #mainNav a.lang-link { border-color: rgba(255, 255, 255, 0.25); color: rgba(255, 255, 255, 0.6); }

.rich-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    animation: zoomOut 20s infinite alternate linear;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    color: #fff;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 400;
    opacity: 0.9;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    letter-spacing: 0.2em;
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,0.3);
    margin-top: 12px;
    position: relative;
    overflow: hidden;
}

.scroll-indicator .line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    animation: scrollLine 2s infinite cubic-bezier(0.65, 0.05, 0.36, 1);
}

.section {
    padding: 160px 0;
}

.bg-light {
    background-color: var(--color-bg-light);
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 60px;
    color: var(--color-primary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.lead-text {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    line-height: 1.6;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.rich-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.rich-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.6s var(--easing), box-shadow 0.6s var(--easing);
}

.rich-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-img {
    height: 240px;
    background-size: cover;
    background-position: center;
    transition: transform 1s var(--easing);
}

.rich-card:hover .card-img {
    transform: scale(1.05);
}

.card-content {
    padding: 40px 32px;
}

.card-content h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--color-primary);
}

.card-content p {
    color: var(--color-text-light);
    font-size: 14px;
}

.page-header {
    position: relative;
    height: 40vh;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding-bottom: 60px;
}

.page-title {
    position: relative;
    z-index: 10;
    color: #fff;
    font-size: 48px;
    letter-spacing: 0.1em;
}

.news-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
}

.news-list li {
    border-bottom: 1px solid #eaeaea;
    padding: 32px 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

.news-list .date {
    font-family: var(--font-en);
    color: var(--color-text-light);
    font-weight: 700;
}

.news-list .category {
    font-size: 11px;
    background: var(--color-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.1em;
}

.news-list .news-title {
    font-size: 16px;
    font-weight: 700;
}

.news-list .news-title a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 1px;
    transition: background 0.3s var(--easing);
}

.news-list .news-title a:hover { background: rgba(var(--brand-yellow-rgb), 0.25); }
body.debug-mode .news-list .news-title a { color: var(--color-debug-text); }

.back-link,
.text-link {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 1px;
}

.back-link:hover,
.text-link:hover { background: rgba(var(--brand-yellow-rgb), 0.25); }
body.debug-mode .back-link,
body.debug-mode .text-link { color: var(--color-debug-text); }

/* プライバシーポリシー・利用規約: 本文を小さめにする（見出し・日付は、それぞれの指定のまま） */
.glass-panel.legal { font-size: 14px; }

.document-list {
    list-style: none;
    margin-top: 40px;
}

.document-list li {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--color-bg-light);
    border-radius: 4px;
    transition: background 0.3s;
}

.document-list li:hover {
    background: #eef2f6;
}

.document-list a {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 700;
    display: block;
}

.document-list .deleted {
    background: transparent;
    border: 1px dashed #ccc;
}

.document-list .deleted-text {
    color: #999;
}

.document-list .doc-disabled {
    display: block;
    font-weight: 700;
    color: #9aa3b2;
    cursor: not-allowed;
}

.document-list .doc-disabled::after {
    content: '（準備中）';
    font-weight: 400;
    font-size: 12px;
    margin-left: 8px;
    color: #b6bdc7;
}

.rich-footer {
    background: var(--color-primary);
    color: #fff;
    padding: 120px 0 40px;
}

.cta-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 100px;
}

.cta-title {
    font-size: 32px;
    margin-bottom: 24px;
    letter-spacing: 0.1em;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0 40px;
    border-radius: 28px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
    transition: all 0.3s var(--easing);
}

.btn-primary {
    background: var(--color-accent);
    color: var(--brand-on-yellow);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 通常時のわずかな立体感 */
}

.btn-primary:hover {
    /* 色を塗り替えず、明るさだけ上げる（くすんだ色にならない）。浮き上がる動きと影で、押せることを伝える */
    filter: brightness(1.08);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15); /* 影を広げて、手前に浮き上がって見せる */
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: #fff;
    color: var(--color-primary);
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 32px;
    font-size: 12px;
    color: rgba(255,255,255,0.65);
}

.footer-legal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-legal-links {
    display: flex;
    gap: 20px;
}

.footer-legal-links a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
}

.footer-legal-links a:hover { color: rgba(255,255,255,0.8); }

.footer-grid {
    display: grid;
    grid-template-columns: max-content max-content max-content;
    justify-content: space-between;
    gap: 40px;
    align-items: start;
    margin-bottom: 56px;
}

.footer-logo {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
}

.footer-tagline {
    margin: 0 0 20px;
    max-width: 320px;
    font-size: 13px;
    line-height: 1.9;
    color: rgba(255,255,255,0.75);
}

.footer-links-title {
    /* 見出し：リンクより小さく・薄く・字間を広げて、見出しと分かるようにする。下に細い線を引き、リンクと分ける */
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.14);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.5);
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px; /* リンク同士は詰めて、見出しとの間は広くとる（ひとまとまりに見せる） */
}

.footer-links a {
    font-size: 14px;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

.disclaimer { margin: 0; }

.copyright { margin: 0; }

.copyright a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
}

.copyright a:hover { color: rgba(255,255,255,0.8); }

@keyframes zoomOut {
    0% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* =========================================================
   ARG 拡張スタイル
   ========================================================= */

:root {
    --color-debug-bg: #0a0a0f;
    --color-debug-panel: #14141c;
    --color-debug-text: #e2e8f0;
    --color-cipher-glow: #00ff88;
}

.site-main { display: block; }

/* ---------- グラスモーフィズム・パネル / フォーム ---------- */
.form-row { margin-bottom: 24px; }

.form-row label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
}

.form-control:focus {
    outline: 2px solid var(--color-accent);
    border-color: transparent;
}

.mono {
    font-family: var(--font-en), monospace;
    letter-spacing: 0.12em;
}

.btn-submit {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    cursor: pointer;
    height: 56px;
    padding: 0 40px;
    border-radius: 28px;
    background: var(--color-accent);
    color: var(--brand-on-yellow);
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
    transition: background 0.3s var(--easing), transform 0.3s var(--easing);
}

.btn-submit { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.btn-submit:hover { filter: brightness(1.08); box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15); transform: translateY(-2px); }
.btn-submit:disabled { background: #cbd5e1; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-submit:disabled:hover { filter: none; box-shadow: none; }

.notice-box {
    border: 1px solid rgba(var(--brand-yellow-rgb), 0.28);
    background: rgba(var(--brand-yellow-rgb), 0.06);
    padding: 16px 20px;
    border-radius: 4px;
    margin: 24px 0;
    font-size: 13px;
    line-height: 1.7;
}

.error-box {
    border: 1px solid rgba(220, 38, 38, 0.3);
    background: rgba(220, 38, 38, 0.08);
    padding: 16px 20px;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 14px;
}

.breadcrumb {
    padding: 10px 0;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
    font-size: 11px;
    color: var(--color-text-light);
}

.breadcrumb a {
    color: var(--color-text-light);
    text-decoration: none;
}

.breadcrumb a:hover { color: var(--color-primary); }

.breadcrumb .crumb-sep { margin: 0 8px; }

.breadcrumb .crumb-current { color: var(--color-text); font-weight: 700; }

body.debug-mode .breadcrumb { border-top-color: rgba(255, 255, 255, 0.1); }
body.debug-mode .breadcrumb a { color: rgba(226, 232, 240, 0.6); }
body.debug-mode .breadcrumb .crumb-current { color: var(--color-debug-text); }

.doc-data { list-style: none; }
.doc-data li { padding: 6px 0; border-bottom: 1px dashed rgba(15, 23, 42, 0.12); font-size: 14px; }
.doc-note { margin-top: 32px; color: var(--color-text-light); font-size: 13px; }

/* ---------- 適性検査 ---------- */
.quiz-item {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.quiz-item .q { font-weight: 700; margin-bottom: 12px; line-height: 1.6; }

.quiz-item label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
}

.quiz-item input[type="radio"] { margin-top: 5px; flex-shrink: 0; }

/* ---------- 画像キャリブレーション ---------- */
.upload-zone {
    border: 2px dashed rgba(15, 23, 42, 0.2);
    border-radius: 14px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    color: var(--color-text-light);
    font-size: 14px;
    transition: border-color 0.3s, background 0.3s;
}

.upload-zone.dragover { border-color: var(--color-accent); background: rgba(var(--brand-yellow-rgb), 0.05); }

.preview-wrap { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; }
.preview-wrap[hidden] { display: none; } /* display:flex が hidden を打ち消すため、アップロード前は非表示を明示する */
.preview-wrap figure { margin: 0; font-size: 11px; color: var(--color-text-light); text-align: center; }
.preview-wrap img,
.preview-wrap canvas {
    display: block;
    max-width: 220px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    margin-bottom: 6px;
}

/* ---------- 管理コンソール：処理対象カード ---------- */
.target-card {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-radius: 14px;
    padding: 24px;
    background: rgba(220, 38, 38, 0.04);
    margin: 24px 0;
}

.target-card img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    filter: grayscale(1) contrast(1.1);
}

.target-meta .tag {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.target-meta .name { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.target-meta .mono { font-size: 12px; color: var(--color-text-light); }

/* ---------- X シェア ---------- */
.share-block { text-align: center; }

.btn-x {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 28px;
    background: #000;
    color: #fff;
    border-radius: 26px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: opacity 0.3s;
}

.btn-x:hover { opacity: 0.82; }

/* =========================================================
   ダークモード
   ========================================================= */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 22px;
    padding: 0;
    background: none;
    border: 1px solid rgba(15, 23, 42, 0.25);
    border-radius: 11px;
    color: var(--color-text-light);
    cursor: pointer;
    position: relative;
    top: 3px; /* EN/JP の丸ボタンと縦位置をそろえる */
    transition: border-color 0.3s, color 0.3s;
}

.theme-toggle:hover { border-color: var(--color-accent-text); color: var(--color-accent-text); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle[aria-pressed="true"] .icon-moon { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }
body.debug-mode .theme-toggle { border-color: rgba(255, 255, 255, 0.25); color: rgba(255, 255, 255, 0.6); }
body.debug-mode .theme-toggle:hover { border-color: var(--color-accent); color: var(--color-accent); }

.hidden-cipher {
    display: inline-block;
    color: transparent;
    user-select: none;
    font-family: var(--font-en), monospace;
    letter-spacing: 0.3em;
    transition: color 0.4s, text-shadow 0.4s;
}

body.debug-mode {
    --color-accent-text: var(--brand-yellow);
    background-color: var(--color-debug-bg);
    color: var(--color-debug-text);
}

body.debug-mode .glass-header {
    background: rgba(10, 10, 15, 0.7);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.debug-mode .logo,
body.debug-mode .logo a,
body.debug-mode #mainNav a { color: var(--color-debug-text); }

/* ダーク時のフッターは、背景に沈む暗い紺にする */
body.debug-mode .rich-footer {
    background: #0a1a2b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.debug-mode .section.bg-light,
body.debug-mode .bg-light { background-color: #101018; }

body.debug-mode .section-title,
body.debug-mode .card-content h3,
body.debug-mode .card-content p,
body.debug-mode .lead-text { color: var(--color-debug-text); }

body.debug-mode .rich-card {
    background: rgba(30, 30, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--color-debug-text);
}

body.debug-mode .glass-panel { color: var(--color-debug-text); }

body.debug-mode .document-list li { background: var(--color-debug-panel); }

body.debug-mode .form-control,
body.debug-mode select.form-control {
    background: #20202c;
    color: var(--color-debug-text);
    border-color: rgba(255, 255, 255, 0.28);
}

body.debug-mode .form-row label,
body.debug-mode .filter-bar .pg-clear { color: var(--color-debug-text); }
body.debug-mode .result-count { color: rgba(226, 232, 240, 0.75); }

/* ネイティブ <option> の視認性（ライト / ダーク） */
select.form-control option { color: #1a1a2e; background: #ffffff; }
select.form-control option:disabled { color: #9aa3b2; }
body.debug-mode select.form-control option { color: #e2e8f0; background: #20202c; }
body.debug-mode select.form-control option:disabled { color: #6b7280; }

body.debug-mode .hidden-cipher {
    color: var(--color-cipher-glow);
    text-shadow: 0 0 4px var(--color-cipher-glow),
                 0 0 12px var(--color-cipher-glow),
                 0 0 24px rgba(0, 255, 136, 0.6);
    user-select: text;
}

/* =========================================================
   クリア後グリッチ表現
   ========================================================= */
.glitch-layer { display: none; }

body.glitch {
    animation: glitchShake 2.4s infinite steps(2);
    overflow-x: hidden; /* 1px 揺らしで横スクロールバーが出ないように */
}

body.glitch .glitch-layer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    mix-blend-mode: screen;
    background: repeating-linear-gradient(0deg, rgba(249, 115, 22, 0.07) 0 2px, transparent 2px 4px);
    animation: scanlines 8s linear infinite;
}

body.glitch .glass-header,
body.glitch .site-main { animation: glitchClip 3s infinite steps(3); }

body.glitch .hero-title { position: relative; }

body.glitch .hero-title::before,
body.glitch .hero-title::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    mix-blend-mode: screen;
}

body.glitch .hero-title::before {
    color: #f97316;
    clip-path: inset(0 0 55% 0);
    animation: glitchShift 0.4s infinite steps(2);
}

body.glitch .hero-title::after {
    color: #38bdf8;
    clip-path: inset(50% 0 0 0);
    animation: glitchShift 0.55s infinite reverse steps(2);
}

@keyframes glitchShake {
    0%, 100% { transform: none; }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(1px, -1px); }
    60% { transform: translate(-1px, 0); }
    80% { transform: translate(1px, 1px); }
}

@keyframes glitchClip {
    0%, 100% { clip-path: inset(0 0 0 0); }
    33% { clip-path: inset(8% 0 3% 0); }
    66% { clip-path: inset(2% 0 12% 0); }
}

@keyframes glitchShift {
    0% { transform: translate(-3px, 0); }
    100% { transform: translate(3px, 2px); }
}

@keyframes scanlines {
    from { background-position: 0 0; }
    to { background-position: 0 100px; }
}

/* ---------- 社員データ 一覧 / 詳細 ---------- */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin: 24px 0;
}

.filter-bar .form-row { margin-bottom: 0; }
.filter-bar input { min-width: 240px; }
.filter-bar .pg-clear { align-self: center; font-size: 13px; color: var(--color-text-light); }

.result-count { font-size: 13px; color: var(--color-text-light); margin-bottom: 12px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 12px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.data-table th {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-light);
    background: rgba(15, 23, 42, 0.04);
    white-space: nowrap;
}

.data-table td { white-space: nowrap; }

.data-table td.note {
    white-space: normal;
    color: var(--color-text-light);
    min-width: 260px;
}

.data-table tbody tr:hover td { background: rgba(var(--brand-yellow-rgb), 0.05); }

.data-table .id-link {
    font-family: var(--font-en), monospace;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--color-accent-text);
    text-decoration: none;
}

.data-table .id-link:hover { text-decoration: underline; }
.data-table .rating { font-family: var(--font-en), monospace; font-weight: 700; }
.data-table .row-special td { background: rgba(220, 38, 38, 0.06); }

.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 24px;
    font-size: 13px;
}

.pagination a,
.pagination > span {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 14px;
    border-radius: 19px;
    text-decoration: none;
    border: 1px solid rgba(15, 23, 42, 0.15);
    color: var(--color-primary);
}

.pagination > span.current { background: var(--color-accent); color: var(--brand-on-yellow); border-color: transparent; }
.pagination > span.disabled { opacity: 0.35; }

.pagination form {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    border: 0;
    padding: 0;
}

.pagination input {
    width: 88px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 10px;
    font: inherit;
}

.pagination form .btn-submit { height: 38px; padding: 0 16px; }

.detail-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 24px;
    margin: 20px 0;
}

.detail-grid dt {
    font-weight: 700;
    font-size: 13px;
    color: var(--color-text-light);
    letter-spacing: 0.06em;
}

.detail-grid dd { margin: 0; font-size: 15px; }

body.debug-mode .data-table { background: rgba(30, 30, 42, 0.6); color: var(--color-debug-text); }
body.debug-mode .data-table th { background: rgba(255, 255, 255, 0.04); color: var(--color-debug-text); }

body.debug-mode .pagination a,
body.debug-mode .pagination > span,
body.debug-mode .pagination input {
    color: var(--color-debug-text);
    border-color: rgba(255, 255, 255, 0.15);
}

@media (max-width: 640px) {
    .detail-grid { grid-template-columns: 1fr; gap: 4px 0; }
    .detail-grid dd { margin-bottom: 14px; }
}

/* =========================================================
   コンテンツ幅・中央寄せ（サブページ本文）
   ========================================================= */
.content-section {
    max-width: 960px;          /* 本文カラムの基準幅 */
    margin-left: auto;
    margin-right: auto;
}

.content-section.is-wide {
    max-width: 1200px;         /* 表など横幅が必要なページ */
}

.content-section > .glass-panel {
    margin-left: auto;
    margin-right: auto;
}

/* =========================================================
   採用ページ（ランディング）
   ========================================================= */
.careers-hero { text-align: center; }

.careers-kicker {
    color: var(--color-accent-text);
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 13px;
}

.careers-headline {
    font-size: clamp(2.75rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1;
    margin: 14px 0 22px;
    color: var(--color-primary);
}

.careers-headline .big-zero { color: var(--color-accent); font-size: 1.25em; }
.careers-headline .excl { color: var(--color-accent); margin-left: 0.05em; }

.careers-lead { font-size: 18px; margin-bottom: 44px; }

.careers-window { margin: 0 0 48px; }

.careers-window img {
    width: 100%;
    height: auto;
    border-radius: 18px;
    border: 8px solid #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.careers-window figcaption {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: 10px;
}

.careers-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
    text-align: left;
}

.cpoint {
    background: rgba(var(--brand-yellow-rgb), 0.06);
    border: 1px solid rgba(var(--brand-yellow-rgb), 0.15);
    border-radius: 14px;
    padding: 24px;
}

.cpoint h3 { font-size: 16px; margin-bottom: 8px; color: var(--color-accent-text); }
.cpoint p { font-size: 14px; color: var(--color-text-light); }

.careers-voices { margin: 56px 0 48px; text-align: left; }

.careers-voices-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.voice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.voice-card {
    background: rgba(15, 23, 42, 0.03);
    border-radius: 14px;
    padding: 20px;
}

.voice-card p { font-size: 14px; line-height: 1.8; }
.voice-card .voice-meta {
    margin-top: 10px;
    font-size: 12px;
    color: var(--color-text-light);
    font-family: var(--font-en), monospace;
}

body.debug-mode .careers-voices-title { color: var(--color-debug-text); }
body.debug-mode .voice-card { background: rgba(255, 255, 255, 0.05); }
body.debug-mode .voice-card p:not(.voice-meta) { color: var(--color-debug-text); }

.careers-cta { margin-top: 8px; }
.careers-note { font-size: 12px; color: var(--color-text-light); margin-top: 14px; }

.btn-lg { height: 64px; padding: 0 56px; font-size: 16px; border-radius: 32px; }

.btn-disabled {
    background: #cbd5e1 !important;
    color: #64748b !important;
    cursor: not-allowed;
    pointer-events: none;
}

body.debug-mode .btn-disabled { background: #3a3a48 !important; color: rgba(255, 255, 255, 0.4) !important; }

body.debug-mode .careers-headline { color: var(--color-debug-text); }
body.debug-mode .careers-window img { border-color: #20202c; }
body.debug-mode .cpoint { background: rgba(var(--brand-yellow-rgb), 0.10); }

/* =========================================================
   適性検査ウィザード（一問＝一画面）
   ========================================================= */
.wizard { max-width: 620px; }
/* 進行バーのある画面は、バーが上辺の線の役を兼ねるのでパネル上辺の線を出さない */
.glass-panel.wizard:has(> .wizard-progress) { border-top: 0; padding-top: 8px; }

.wizard-progress {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.wizard-progress span {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(15, 23, 42, 0.12);
    transition: background 0.3s var(--easing);
}

.wizard-progress span.on { background: var(--color-accent); }

.wizard-count {
    font-family: var(--font-en), monospace;
    font-size: 12px;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.wizard-q {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 24px;
}

.wizard-q.q5-noise { position: relative; }

.wizard-q.q5-noise::before,
.wizard-q.q5-noise::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    opacity: 0;
    mix-blend-mode: screen;
    pointer-events: none;
}

.wizard-q.q5-noise::before {
    color: #f97316;
    animation: q5NoiseBefore 3.4s infinite steps(1);
}

.wizard-q.q5-noise::after {
    color: #38bdf8;
    animation: q5NoiseAfter 3.4s infinite steps(1);
}

@keyframes q5NoiseBefore {
    0%, 89%, 100% { opacity: 0; }
    90% { opacity: 0.8; clip-path: inset(0 0 60% 0); transform: translate(-2px, 0); }
    92% { opacity: 0; }
    93% { opacity: 0.8; clip-path: inset(40% 0 20% 0); transform: translate(2px, 1px); }
    95% { opacity: 0; }
}

@keyframes q5NoiseAfter {
    0%, 91%, 100% { opacity: 0; }
    92% { opacity: 0.8; clip-path: inset(55% 0 0 0); transform: translate(2px, -1px); }
    94% { opacity: 0; }
    96% { opacity: 0.7; clip-path: inset(10% 0 50% 0); transform: translate(-2px, 0); }
    98% { opacity: 0; }
}

/* ---------- 採用試験：ウィザードのダークモード ---------- */
/* サイトのダークモード（body.debug-mode）をそのまま使う。
   試験ウィザードのカード（どのステップでも）全体に反映する。 */
body.debug-mode .wizard {
    background: var(--color-debug-bg);
    color: var(--color-debug-text);
}

body.debug-mode .wizard .wizard-q,
body.debug-mode .wizard .wizard-count,
body.debug-mode .wizard p,
body.debug-mode .wizard label { color: var(--color-debug-text); }

body.debug-mode .wizard .form-control {
    background: #20202c;
    color: var(--color-debug-text);
    border-color: rgba(255, 255, 255, 0.28);
}

body.debug-mode .wizard .reset-link { color: rgba(226, 232, 240, 0.6); }
body.debug-mode .wizard .error-box { background: rgba(220, 38, 38, 0.15); }
body.debug-mode .wizard .wizard-progress span { background: rgba(255, 255, 255, 0.15); }
body.debug-mode .wizard .upload-zone { border-color: rgba(255, 255, 255, 0.25); color: var(--color-debug-text); }
body.debug-mode .wizard .notice-box { background: rgba(var(--brand-yellow-rgb), 0.1); color: var(--color-debug-text); }

/* ---------- 採用試験：Q6 ピースパズル ---------- */
.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0; /* ピースの間に、白いすき間は作らない（境目は、下のうっすらした線で示す） */
    max-width: 420px;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.4s var(--easing);
}

.puzzle-piece {
    aspect-ratio: 1;
    position: relative;
    padding: 0;
    border: 0;
    cursor: pointer;
    background-image: var(--puzzle-img);
    background-size: 400% 200%;
    background-repeat: no-repeat;
    box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.28); /* 境目を、うっすら1pxで見せる */
}

.puzzle-piece.selected { outline: 3px solid var(--color-accent); outline-offset: -3px; z-index: 1; }

/* ダークモード中：画像を一切見せず、全断片が完全に同一の幾何学模様ノイズになる */
body.debug-mode .puzzle-piece {
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.09) 0,
        rgba(255, 255, 255, 0.09) 4px,
        transparent 4px,
        transparent 10px
    );
    background-color: #0a0a0f;
}

.puzzle-piece .piece-mark {
    position: absolute;
    bottom: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-family: var(--font-en), monospace;
    font-size: 11px;
    font-weight: 700;
    border-radius: 3px;
}

/* ダークモード中は焼き込み数字も含め一切非表示 */
body.debug-mode .piece-mark { display: none; }

/* 完全に揃った状態：枠線を落として継ぎ目を目立たなくする（テキストでの正誤表示はしない） */
.puzzle-grid.is-complete { box-shadow: 0 0 0 2px var(--color-accent); }
.puzzle-grid.is-complete .puzzle-piece { cursor: default; }

/* リセットリンク（グリッチ画面） */
.reset-link {
    font-family: var(--font-en), monospace;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--color-text-light);
    text-decoration: none;
}
.reset-link:hover { color: var(--color-accent-text); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    transition: transform 0.3s var(--easing), opacity 0.3s var(--easing);
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

body.debug-mode .nav-toggle span { background: var(--color-debug-text); }

@media (max-width: 768px) {
    .header-inner {
        position: relative;
        height: 64px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0;
        gap: 0;
    }
    .nav-toggle { display: flex; margin-left: auto; }
    #mainNav ul {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin: 0;
        padding: 12px 0 20px;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    }
    #mainNav.nav-open ul { display: flex; }
    #mainNav ul li { text-align: center; }
    #mainNav ul a { display: block; padding: 12px 0; }
    #mainNav ul a.lang-link { display: inline-flex; margin: 4px auto 0; }
    #mainNav ul .theme-toggle { margin: 4px auto 0; top: 0; }
    body.debug-mode #mainNav ul { background: rgba(10, 10, 15, 0.97); }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .cta-buttons {
        flex-direction: column;
    }
    .btn-primary, .btn-secondary {
        width: 100%;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        row-gap: 40px;
    }
    .footer-bottom { text-align: center; }
    .footer-legal-row {
        flex-direction: column;
        gap: 16px;
    }
    .news-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* =========================================================
   フッター「ブリスくん」マスコット（常時表示、クリックで管理者モードへ）
   ========================================================= */
.bris-mascot {
    display: inline-block;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background-image: url('/img/bris-kun.png');
    background-repeat: no-repeat;
    background-position: 0 0;
    /* スプライトは26コマ（0-17=通常表情、18-25=悲しい表情の最後8コマ）。
       常時ループでは悲しい表情を混ぜないよう0-17のみ再生する。 */
    animation: brisIdle 3.6s steps(18) infinite;
    opacity: 0.85;
    transition: opacity 0.3s, animation-duration 0.3s;
}

/* ブリスくんは押せるボタン。セリフは横に吹き出しで出す */
.bris-mascot-wrap { position: relative; display: inline-block; }
button.bris-mascot { padding: 0; border: 0; background-color: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.mascot-bubble {
    position: absolute;
    left: 42px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background: #fff;
    color: var(--brand-navy);
    font-size: 12px;
    line-height: 1.5;
    width: max-content;
    max-width: min(240px, 60vw);
    border-radius: 2px;
}
.mascot-bubble[hidden] { display: none; }

.bris-mascot:hover,
.bris-mascot:focus-visible {
    opacity: 1;
    animation-duration: 1.4s;
}

@keyframes brisIdle {
    from { background-position: 0 0; }
    to { background-position: -576px 0; }
}

/* =========================================================
   管理者モード：候補者一覧 / 最終関門
   ========================================================= */
.target-card.compact {
    padding: 16px 20px;
    justify-content: space-between;
}

.target-card.self-card { border-color: rgba(var(--brand-yellow-rgb), 0.4); background: rgba(var(--brand-yellow-rgb), 0.05); }

.candidate-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.candidate-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.03);
}

.candidate-name { flex: 1; font-size: 14px; }
.candidate-status { font-size: 11px; color: var(--color-text-light); }

.btn-reject {
    height: 30px;
    padding: 0 14px;
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-radius: 15px;
    background: transparent;
    color: #dc2626;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-reject:hover { background: #dc2626; color: #fff; }

.pin-form { margin: 20px 0 0; max-width: 320px; }

body.debug-mode .candidate-row { background: rgba(255, 255, 255, 0.05); }
body.debug-mode .candidate-name,
body.debug-mode .candidate-status { color: var(--color-debug-text); }

/* ---------- 最終関門：暗転演出 ---------- */
.admin-blackout {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    opacity: 1;
    transition: opacity 1.1s var(--easing);
    pointer-events: none;
}

.admin-blackout.is-fading { opacity: 0; }

.admin-alert {
    color: #dc2626;
    font-size: 13px;
    letter-spacing: 0.06em;
}

/* ---------- 一瞬だけ表示されるトースト通知（偽合格の差し戻し文言） ---------- */
.admin-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translate(-50%, 12px);
    max-width: calc(100% - 32px);
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.4s var(--easing), transform 0.4s var(--easing);
    z-index: 10000;
    pointer-events: none;
}

.admin-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
/* =========================================================
   管理者モード：タブ / 社員名簿 / 監査ログ
   ========================================================= */
.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-tab {
    padding: 8px 18px;
    border: 1px solid rgba(100, 116, 139, 0.4);
    background: transparent;
    color: var(--color-text-light);
    font-size: 13px;
    letter-spacing: 0.08em;
    cursor: pointer;
}
.admin-tab.is-active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.admin-panel[hidden], #adminRoot[hidden] { display: none; }
.self-record { margin-bottom: 20px; padding: 14px 18px; border: 1px solid rgba(var(--brand-yellow-rgb), 0.4); background: rgba(var(--brand-yellow-rgb), 0.05); }
.self-record:empty { display: none; }
.self-record h3 { font-size: 13px; letter-spacing: 0.12em; margin-bottom: 8px; color: var(--color-text-light); }
.audit-table td:first-child { white-space: nowrap; }
.audit-table td:last-child { white-space: normal; overflow-wrap: anywhere; } /* 操作の文章は折り返す（スマホで、画面が横にはみ出さないように） */

/* =========================================================
   採用試験受験者の方へ
   ========================================================= */
.applicant-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 24px; }
.applicant-head { align-items: stretch; }
.applicant-face { flex: none; width: 150px; height: 200px; background: var(--color-bg-light); } /* 証明写真の比率（横3：縦4） */
.applicant-face img { display: block; width: 150px; height: 200px; object-fit: cover; }
.glass-panel .applicant-head .detail-grid { flex: 1 1 280px; margin: 0; align-content: start; } /* 表の最初の罫線を、写真の上端にそろえる */
.applicant-sub { margin: 24px 0 8px; font-size: 13px; letter-spacing: 0.12em; color: var(--color-text-light); }
.applicant-history { list-style: none; padding: 0; margin: 0; }
.applicant-history li { padding: 8px 0; border-bottom: 1px solid rgba(100, 116, 139, 0.2); font-size: 14px; }
.applicant-policy { font-size: 14px; line-height: 1.9; }
.applicant-note { margin-top: 24px; font-size: 13px; color: var(--color-text-light); }

/* =========================================================
   WANTED（合格後）/ 通報ダイアログ
   光過敏への配慮：明暗の切り替えは使わない。ズレ・色ずれ・走査線で表現する。
   ========================================================= */
.wanted-bar[hidden] { display: none; }
.wanted-bar {
    background: #111;
    color: #fff;
    border-top: 2px solid var(--color-accent);
    padding: 10px 0;
}
.wanted-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.wanted-text { flex: 1 1 280px; min-width: 0; }
.wanted-title {
    position: relative;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.1;
    text-shadow: 2px 0 rgba(255, 60, 60, 0.7), -2px 0 rgba(56, 189, 248, 0.7);
    animation: wantedDrift 1.6s steps(2) infinite;
}
.wanted-code { margin-left: 0.4em; color: var(--color-accent); }
.wanted-status { margin-left: 0.8em; font-size: 14px; letter-spacing: 0.2em; border: 1px solid currentColor; padding: 2px 8px; vertical-align: middle; }
.wanted-name { font-size: 20px; margin-top: 4px; overflow-wrap: anywhere; }
.wanted-sub { margin-top: 4px; font-size: 13px; color: #cbd5e1; }
.wanted-report {
    padding: 10px 28px;
    border: 2px solid var(--color-accent);
    background: var(--color-accent);
    color: var(--brand-on-yellow);
    font-weight: 700;
    letter-spacing: 0.2em;
    cursor: pointer;
}
.wanted-report:hover { filter: brightness(1.08); }
body.wanted-on .glitch-layer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 3px);
}
body.wanted-intense .wanted-title { animation: wantedDriftHard 0.5s steps(2) infinite; }
body.wanted-intense .wanted-bar { animation: glitchClip 3s infinite steps(3); }

@keyframes wantedDrift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(2px, 0); }
}
@keyframes wantedDriftHard {
    0% { transform: translate(-4px, 0); text-shadow: 5px 0 rgba(255, 60, 60, 0.8), -5px 0 rgba(56, 189, 248, 0.8); }
    100% { transform: translate(4px, 1px); text-shadow: -5px 0 rgba(255, 60, 60, 0.8), 5px 0 rgba(56, 189, 248, 0.8); }
}
@media (prefers-reduced-motion: reduce) {
    .wanted-title, body.wanted-intense .wanted-title, body.wanted-intense .wanted-bar { animation: none; }
}

.report-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.report-box { width: 100%; max-width: 420px; background: #fff; color: var(--color-text); padding: 24px; }
.report-title { font-size: 20px; margin-bottom: 16px; }
.report-box label { display: block; margin: 12px 0 4px; font-size: 13px; }
.report-msg { min-height: 1.5em; margin: 12px 0; font-size: 14px; color: #dc2626; }
.report-done { font-size: 15px; margin-bottom: 16px; }
.report-cancel { margin-left: 12px; border: 0; background: none; color: var(--color-text-light); cursor: pointer; }

@media (max-width: 640px) {
    .wanted-title { font-size: 26px; }
}

/* 採用試験：DEBRISVERSE（Steam）ウィジェット */
.steam-widget { margin: 20px 0; max-width: 646px; }
.steam-widget iframe { display: block; width: 100%; height: 190px; border: 0; }

/* ---- ロゴ画像（ヘッダー: logo.png / ダーク時 logo-white.png、フッター: logo-v-white.png） ---- */
.logo { line-height: 0; }
.logo-img { display: block; height: 40px; width: auto; }
.logo-img-dark { display: none; }
body.debug-mode .logo-img-light { display: none; }
body.debug-mode .logo-img-dark { display: block; }
.footer-logo-img { display: block; height: 96px; width: auto; }

/* =========================================================
   パネル（エディトリアル調）— 角丸・影なし、細線と余白で組む
   サイト全体のパネル(.glass-panel)に適用する
   ========================================================= */
.glass-panel {
    --hairline: rgba(15, 23, 42, 0.14);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    border-top: 2px solid var(--color-primary);
    padding: 40px 0 56px;
}
.glass-panel .eyebrow {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--color-text-light);
}
.glass-panel .panel-title {
    margin: 0 0 28px;
    font-size: 32px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-primary);
}
.glass-panel .target-card {
    margin: 0;
    padding: 22px 0;
    border: 0;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    border-radius: 0;
    background: transparent;
}
.glass-panel .target-card.self-card {
    padding-left: 18px;
    border-left: 3px solid var(--color-accent);
    background: transparent;
}
.glass-panel .candidate-list { gap: 0; }
.glass-panel .candidate-row {
    padding: 14px 0;
    border-bottom: 1px solid var(--hairline);
    border-radius: 0;
    background: transparent;
}
.glass-panel .btn-reject,
.glass-panel .btn-submit { border-radius: 2px; }
.glass-panel .detail-grid { gap: 0 24px; margin: 24px 0; }
.glass-panel .detail-grid dt,
.glass-panel .detail-grid dd {
    margin: 0;
    padding: 14px 0;
    border-top: 1px solid var(--hairline);
}
.glass-panel .detail-grid dt { letter-spacing: 0.1em; }

body.debug-mode .glass-panel {
    --hairline: rgba(255, 255, 255, 0.16);
    background: transparent;
    border-top-color: var(--color-accent);
}
body.debug-mode .glass-panel .panel-title { color: var(--color-debug-text); }
body.debug-mode .glass-panel .candidate-row { background: transparent; }

/* マイページ下の管理者コード欄：区切り線と見出しで、担当者用の入口と分かるようにする */
.applicant-admin { margin-top: 32px; padding-top: 16px; border-top: 1px solid rgba(100, 116, 139, 0.25); }
.applicant-admin-head { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.12em; color: var(--color-text-light); }
.applicant-admin label { display: inline; margin-right: 6px; font-size: 12px; color: var(--color-text-light); }
.applicant-admin input {
    width: 140px;
    height: 24px;
    padding: 0 6px;
    border: 0;
    border-bottom: 1px solid var(--color-text-light);
    background: transparent;
    font-size: 12px;
    color: var(--color-text);
}
.applicant-admin button { border: 0; background: transparent; font-size: 14px; color: var(--color-text-light); cursor: pointer; }
.applicant-admin-error { margin: 4px 0 0; font-size: 11px; color: var(--color-text-light); }

/* 候補者一覧（採用判定）：メタ情報と採用/不採用の切り替え */
.candidate-row { flex-wrap: wrap; }
.candidate-row.is-fixed { opacity: 0.55; }
.candidate-meta { flex: 1 1 260px; font-size: 11px; color: var(--color-text-light); }
.judge-choice { display: inline-flex; gap: 6px; }
.judge-choice label { cursor: pointer; }
.judge-choice input { position: absolute; opacity: 0; pointer-events: none; }
.judge-choice span {
    display: inline-block;
    box-sizing: border-box;
    min-width: 72px; /* ✓ が付いても、ボタンの幅が変わらないように、幅を固定する */
    text-align: center;
    white-space: nowrap;
    padding: 4px 8px;
    border: 1px solid var(--hairline, rgba(15, 23, 42, 0.14));
    border-radius: 2px;
    font-size: 12px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.judge-choice input:checked + span { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
/* 採用と不採用は、重大な決定なので、選んだ状態をはっきり見せる（色だけでなく ✓ も付ける）。不採用は赤 */
.judge-choice input:checked + span::before { content: "\2713\00a0"; }
.judge-choice input[value="reject"]:checked + span, body.debug-mode .judge-choice input[value="reject"]:checked + span { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.judge-choice input:not(:disabled) + span:hover { border-color: var(--color-primary); }
.judge-choice input:focus-visible + span { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.judge-choice input:disabled + span { cursor: default; }
body.debug-mode .judge-choice input:checked + span { background: var(--color-accent); border-color: var(--color-accent); color: var(--brand-navy); }

/* 印刷したときだけ出る文（隠し文） */
.print-only { display: none; }
@media print {
    .print-only { display: block; margin-top: 24px; padding-top: 12px; border-top: 1px dashed #000; font-size: 12px; }
}

/* 合格後のトップ：初任務の投稿と、残骸回収作業部のPR */
.ad-pr { position: relative; max-width: 640px; margin: 48px auto 0; padding: 16px 16px 18px; text-align: left; border: 1px solid var(--hairline, rgba(15, 23, 42, 0.14)); }
.ad-pr-tag { position: absolute; top: 8px; right: 10px; padding: 1px 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--color-text-light); border: 1px solid var(--hairline, rgba(15, 23, 42, 0.14)); }
.ad-pr-from { margin: 0 0 4px; font-size: 12px; color: var(--color-text-light); }
.ad-pr-title { margin: 0 0 6px; font-size: 17px; line-height: 1.4; }
.ad-pr-lead { margin: 0 0 12px; font-size: 13px; }
.ad-pr-widget iframe { display: block; width: 100%; height: 190px; border: 0; background: #111; }

/* X以外にポストしたい人向けのコピーボタン */
.btn-copy {
    margin-left: 8px;
    height: 52px;
    padding: 0 20px;
    border: 1px solid var(--hairline, rgba(15, 23, 42, 0.3));
    border-radius: 26px;
    background: transparent;
    color: var(--color-text);
    font-size: 14px;
    cursor: pointer;
}
.btn-copy:hover { border-color: var(--color-primary); color: var(--color-primary); }
.copy-msg { min-height: 1.5em; margin: 8px 0 0; font-size: 13px; color: var(--color-text-light); }
.copy-msg[hidden] { display: none; }
body.debug-mode .btn-copy { color: var(--color-debug-text); border-color: rgba(255, 255, 255, 0.3); }

/* =========================================================
   トップページ：キャッチコピーを WANTED に置き換える（大きく危険な見た目）
   ========================================================= */
.hero-wanted { height: auto; min-height: 100vh; padding: 110px 0 90px; }
.hero-wanted .hero-bg { filter: grayscale(1) contrast(1.25) brightness(0.55); animation: none; }
.hero-wanted .hero-overlay {
    background: radial-gradient(circle at 25% 40%, rgba(220, 38, 38, 0.55) 0%, rgba(20, 0, 0, 0.94) 70%);
    animation: wantedFlicker 3.2s steps(1) infinite;
}
.hero-wanted .scroll-indicator { color: #fca5a5; }

.wanted-hero { position: relative; }
.wanted-hero .wanted-main { display: block; max-width: none; padding: 0; }
.wanted-hero .wanted-title {
    display: block;
    font-size: clamp(3.5rem, 12vw, 9.5rem);
    line-height: 0.95;
    letter-spacing: 0.04em;
    text-shadow: 4px 0 rgba(255, 60, 60, 0.8), -4px 0 rgba(56, 189, 248, 0.6);
}
.wanted-hero .wanted-code {
    display: block;
    margin: 0.08em 0 0;
    color: #ff3b30;
    text-shadow: 0 0 24px rgba(255, 59, 48, 0.8), 4px 0 rgba(255, 255, 255, 0.15);
}
.wanted-hero .wanted-status {
    display: inline-block;
    margin: 20px 0 0;
    padding: 4px 16px;
    font-size: clamp(1rem, 2.4vw, 1.6rem);
    letter-spacing: 0.3em;
    color: #ff3b30;
    border: 3px solid #ff3b30;
    transform: rotate(-4deg);
    text-shadow: none;
}
.wanted-hero .wanted-sub { margin-top: 20px; font-size: clamp(1rem, 1.8vw, 1.4rem); letter-spacing: 0.08em; color: #fecaca; }
.wanted-hero .wanted-name { font-size: clamp(1.6rem, 4vw, 3rem); margin-top: 8px; }
.wanted-hero .wanted-report { margin-top: 28px; padding: 16px 48px; font-size: 1.1rem; background: #ff3b30; border-color: #ff3b30; color: #fff; }
.wanted-hero .wanted-report:hover { background: #dc2626; border-color: #dc2626; }

@keyframes wantedFlicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    94% { opacity: 0.82; }
    96% { opacity: 1; }
    97% { opacity: 0.88; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-wanted .hero-overlay { animation: none; }
}

/* 初任務：指令書のような特別な見た目（ライト・ダークどちらでも暗いパネル） */
.first-mission {
    position: relative;
    max-width: 680px;
    margin: 56px auto 0;
    padding: 28px 28px 30px;
    text-align: left;
    color: #e2e8f0;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
        linear-gradient(160deg, #0b1220 0%, #05080f 100%);
    border: 1px solid rgba(var(--brand-yellow-rgb), 0.45);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 40px rgba(var(--brand-yellow-rgb), 0.12);
}
.first-mission::before,
.first-mission::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-accent);
}
.first-mission::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.first-mission::after { right: -6px; bottom: -6px; border-left: 0; border-top: 0; }
.fm-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-en), monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: var(--color-accent);
}
.fm-no { margin-left: auto; color: rgba(226, 232, 240, 0.5); letter-spacing: 0.18em; }
.fm-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff3b30;
    box-shadow: 0 0 10px #ff3b30;
    animation: fmBlink 1.4s steps(2) infinite;
}
.fm-title { margin: 18px 0 6px; font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: 0.08em; color: #fff; }
.fm-lead { margin: 0 0 20px; font-size: 14px; color: rgba(226, 232, 240, 0.8); }
.fm-about { margin-bottom: 14px; line-height: 1.9; color: rgba(226, 232, 240, 0.65); }
.fm-card {
    position: relative;
    padding: 20px 20px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 3px solid var(--color-accent);
}
.fm-card-tag {
    position: absolute;
    top: -9px;
    right: 14px;
    padding: 0 8px;
    font-family: var(--font-en), monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #0b1220;
    background: var(--color-accent);
}
.fm-post { margin: 0; font-size: 14px; line-height: 1.9; word-break: break-all; color: #f1f5f9; }
.fm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 22px 0 0; }
.fm-post-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 30px;
    background: var(--color-accent);
    color: var(--brand-navy);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    animation: fmPulse 2.2s ease-in-out infinite;
    transition: background 0.2s;
}
.fm-post-btn:hover { filter: brightness(1.08); animation: none; }
.fm-copy {
    height: 52px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #e2e8f0;
    font-size: 14px;
    cursor: pointer;
}
.fm-copy:hover { border-color: var(--color-accent); color: var(--color-accent); }
@keyframes fmBlink { 50% { opacity: 0.25; } }
@keyframes fmPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--brand-yellow-rgb), 0.5); }
    50% { box-shadow: 0 0 0 10px rgba(var(--brand-yellow-rgb), 0); }
}
@media (prefers-reduced-motion: reduce) {
    .fm-dot, .fm-post-btn { animation: none; }
}

/* コア画像の検出（採用試験のアップロード画面） */
.core-panel {
    margin: 20px 0 24px;
    padding: 16px 18px;
    border: 1px solid rgba(var(--brand-yellow-rgb), 0.6);
    border-left: 4px solid var(--color-accent);
    background: rgba(var(--brand-yellow-rgb), 0.06);
}
.core-panel[hidden] { display: none; }
.core-panel.is-detected { animation: coreIn 0.9s steps(6) 1; }
.core-title { margin: 0 0 8px; font-weight: 700; letter-spacing: 0.04em; }
.core-deny { margin: 12px 0 0; font-size: 1.2rem; font-weight: 700; letter-spacing: 0.1em; color: #dc2626; }
@keyframes coreIn {
    0% { opacity: 0; transform: translateX(-6px); }
    40% { opacity: 1; transform: translateX(4px); }
    70% { opacity: 0.6; transform: translateX(-2px); }
    100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .core-panel.is-detected { animation: none; } }

/* 管理画面：段の切り替えに「間」を置く */
.admin-wait { margin: 16px 0 0; font-size: 13px; letter-spacing: 0.06em; color: var(--color-text-light); }
.stagger-item { animation: staggerIn 0.7s both; animation-delay: calc(var(--base, 0s) + var(--i, 0) * 0.9s); }
.candidate-list.reveal .candidate-row { animation: staggerIn 0.6s both; animation-delay: calc(var(--i, 0) * 0.55s); }
@keyframes staggerIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .stagger-item, .candidate-list.reveal .candidate-row { animation: none; }
}

/* 候補者の行：名前・受験情報・状態・採用/不採用の欄を、行が違っても同じ位置にそろえる */
.candidate-row {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(0, 2fr) 96px 160px;
    column-gap: 16px;
    align-items: center;
}
.candidate-row .candidate-meta { flex: none; }
.candidate-row .candidate-status { text-align: right; }
.candidate-row .judge-choice { justify-content: flex-end; min-height: 1px; }
@media (max-width: 760px) {
    .candidate-row { grid-template-columns: 1fr auto; row-gap: 6px; }
    .candidate-row .candidate-meta { grid-column: 1 / -1; order: 3; }
    .candidate-row .judge-choice { grid-column: 1 / -1; order: 4; justify-content: flex-start; }
}

/* 管理画面：不採用通知の送付（部署と管理番号の論理パズル） */
.dispatch-lead { margin: 0 0 16px; font-size: 14px; color: var(--color-text-light); }
.dispatch-notice { margin: 0 0 12px; font-size: 13px; }
.dispatch-list { border-top: 1px solid var(--hairline, rgba(15, 23, 42, 0.14)); }
.dispatch-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(0, 220px);
    gap: 16px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline, rgba(15, 23, 42, 0.14));
}
.dispatch-dept { font-size: 15px; }
.dispatch-row .form-control { height: 40px; }

/* 管理画面：不採用通知の送付ダイアログ（進行バー＋結果）。.glass-panel と同じ、罫線主体の見た目にそろえる */
.dispatch-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.55);
}
.dispatch-dialog {
    --hairline: rgba(15, 23, 42, 0.14);
    width: 100%;
    max-width: 440px;
    padding: 32px 32px 28px;
    background: #fff;
    color: var(--color-text);
    border-top: 2px solid var(--color-primary);
    outline: none;
}
.dispatch-dialog .eyebrow {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--color-text-light);
}
.dispatch-dialog-title { margin: 0 0 24px; font-size: 22px; font-weight: 500; letter-spacing: 0.02em; color: var(--color-primary); }
.dispatch-progress {
    position: relative;
    height: 12px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
}
.dispatch-progress-bar { height: 100%; width: 0; background: var(--color-primary); }
/* 目盛り（10分割） */
.dispatch-progress::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), #fff calc(10% - 1px), #fff 10%);
    pointer-events: none;
}
.dispatch-progress-pct { margin: 10px 0 0; font-size: 13px; letter-spacing: 0.06em; text-align: right; color: var(--color-text-light); }
.dispatch-dialog-result { border-top: 1px solid var(--hairline); }
.dispatch-result-line { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--hairline); font-size: 15px; line-height: 1.7; }
.dispatch-result-line.is-bad { color: #b91c1c; }
.dispatch-dialog-result .btn-submit { margin-top: 24px; height: 48px; border-radius: 2px; }
.applicant-admin-return { font-size: 12px; letter-spacing: 0.06em; color: var(--color-text-light); text-decoration: none; }

/* 管理画面：不純物の番号の入力画面（全面ノイズ＋中央の問い） */
.noise-gate { position: fixed; inset: 0; z-index: 2500; display: none; align-items: center; justify-content: center; padding: 16px; background: #000; }
.noise-gate.is-open { display: flex; }
html.noise-open { overflow: hidden; }
.noise-canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.noise-box {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 36px 32px 28px;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    border-top: 2px solid var(--color-accent);
    animation: noiseBoxIn 0.6s 1.2s both;
}
.noise-gate.is-retry .noise-box { animation: none; }
@keyframes noiseBoxIn { from { opacity: 0; } to { opacity: 1; } }
.noise-q { margin: 0 0 20px; font-size: 22px; font-weight: 500; letter-spacing: 0.04em; }
.noise-form label { display: block; margin-bottom: 10px; font-size: 14px; color: rgba(255, 255, 255, 0.8); }
.noise-form .error-box, .noise-box > .error-box { margin: 0 0 16px; }
.noise-actions { display: flex; align-items: center; gap: 20px; margin-top: 20px; }
.noise-actions .btn-submit { height: 48px; border-radius: 2px; }
.noise-back { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: rgba(255, 255, 255, 0.6); text-decoration: underline; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .noise-box { animation: none; } }

/* 「システム表示を通常に戻す」後：WANTED の表示以外の画面効果（走査線・乱れ）を止める */
body.calm.wanted-on .glitch-layer { display: none; }
body.calm.wanted-intense .wanted-bar, body.calm.wanted-intense .wanted-title { animation: none; }

/* 判定の送信者欄：マイページの管理者コード欄と同じ、下線だけの入力 */
.judge-sender { display: flex; justify-content: flex-end; align-items: baseline; flex-wrap: wrap; gap: 4px 20px; margin-top: 28px; } /* 役職・管理番号・入力欄を、1行で右寄せ */
.judge-sender-role { margin: 0; font-size: 15px; font-weight: 500; }
.judge-sender-field { white-space: nowrap; }
/* 役職・管理番号・判定ボタンは、PCでは1行にそろえて右寄せ（狭い画面では折り返す） */
#judgeForm { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; column-gap: 28px; }
#judgeForm > .candidate-list { flex: 0 0 100%; }
#judgeForm > .btn-submit { margin-top: 28px; }
.judge-sender label { display: inline; margin-right: 8px; font-size: 13px; color: var(--color-text-light); }
.judge-sender input {
    width: 120px;
    height: 28px;
    padding: 0 6px;
    border: 0;
    border-bottom: 1px solid var(--color-text-light);
    border-radius: 0;
    background: transparent;
    font-size: 14px;
    color: var(--color-text);
    letter-spacing: 0.06em;
}
.judge-sender input:focus { outline: 0; border-bottom-color: var(--color-primary); }

/* 合格後：社員証（識別画像をあてはめて作る） */
.idcard-block { margin: 28px 0 8px; }
.idcard-block canvas { display: block; margin: 0 auto; width: 100%; max-width: 520px; height: auto; border: 1px solid rgba(15, 23, 42, 0.2); }

/* フォームの送信ボタン：直前の部品（アップロード欄・プレビュー・結果の枠・パズル）にくっつかないよう、間をあける */
:is(.upload-zone, .preview-wrap, .core-panel, .puzzle-grid, .detail-grid, .candidate-list, .dispatch-list, .table-wrap) ~ .btn-submit { margin-top: 24px; }

/* 試験：戻るボタン・不純物ではない旨のチェック */
.wizard-back { margin-top: 24px; }
.wizard-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; } /* 戻るは左、次へは右 */
.wizard-actions > :only-child { margin-left: auto; } /* ボタンが1つ（次へだけ）のときも、右に置く */
/* 「試験を受け直す」は、最初に戻す操作なので、ボタンから離して右下に置く（誤クリック防止） */
.wizard-reset { margin-top: 64px; padding-top: 16px; border-top: 1px solid var(--hairline, rgba(15, 23, 42, 0.14)); text-align: right; }
.wizard-actions .btn-submit { margin-top: 0; }
.wizard-back-form { margin: 0; }
.btn-submit.btn-back { background: #64748b; color: #fff; }
.btn-submit.btn-back:hover { background: #475569; filter: none; box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15); }
.pledge-row .pledge { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; letter-spacing: 0.02em; cursor: pointer; }
.pledge-row .pledge input { width: 18px; height: 18px; margin: 0; flex: none; }
.wizard-actions.is-choice { justify-content: flex-start; } /* はい／いいえは、左から並べる */

/* ページ上部へ戻るボタン：アイコンだけ。縁の円がスクロールの進み具合を示す */
.to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent; /* 中は透明（フッターの上でも浮かない） */
    color: var(--color-primary);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s, color 0.3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-2px); }
.to-top.on-dark { color: #fff; }
.to-top.on-dark .to-top-track { stroke: rgba(255, 255, 255, 0.3); }
.to-top svg { display: block; }
.to-top-track { stroke: rgba(15, 23, 42, 0.14); }
.to-top-bar { stroke: var(--color-accent); transition: stroke-dashoffset 0.1s linear; }
.to-top-arrow { stroke: currentColor; }
body.debug-mode .to-top { color: var(--color-debug-text, #e2e8f0); }
body.debug-mode .to-top-track { stroke: rgba(255, 255, 255, 0.18); }
@media (prefers-reduced-motion: reduce) { .to-top, .to-top-bar { transition: none; } }
@media (max-width: 760px) { .to-top { right: 16px; bottom: 16px; } }
/* フッターの右端の文字（利用規約など）に、戻るボタンが重ならないよう、右に余白をとる */
.footer-legal-row { padding-right: 72px; }
@media (max-width: 760px) { .footer-legal-row { padding-right: 0; padding-bottom: 56px; } }

/* 管理画面：ログアウトは、右上の文字リンク */
.admin-tabs { align-items: center; }
.admin-logout-form { margin: 0 0 0 auto; }
.admin-logout { border: 0; background: none; padding: 8px 4px; font: inherit; font-size: 13px; letter-spacing: 0.06em; color: var(--color-text-light); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.admin-logout:hover { color: var(--color-primary); }

/* 並んだ2つの選択肢の、重みに差をつける（先へ進む側を黄色、もう一方は枠だけの控えめなボタンにする） */
.btn-submit.btn-quiet { background: transparent; color: var(--color-primary); border: 1px solid rgba(15, 23, 42, 0.3); box-shadow: none; }
.btn-submit.btn-quiet:hover { background: transparent; filter: none; border-color: var(--color-primary); box-shadow: none; }
body.debug-mode .btn-submit.btn-quiet { color: var(--color-debug-text, #e2e8f0); border-color: rgba(255, 255, 255, 0.35); }
body.debug-mode .btn-submit.btn-quiet:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* マイページ：選考結果（不採用）のお知らせ */
.applicant-result { margin: 8px 0 24px; padding: 20px 0; border-top: 1px solid var(--hairline, rgba(15, 23, 42, 0.14)); border-bottom: 1px solid var(--hairline, rgba(15, 23, 42, 0.14)); }
.applicant-result p { margin: 0 0 8px; font-size: 14px; line-height: 1.9; }
.applicant-result .applicant-result-title { font-size: 15px; font-weight: 700; letter-spacing: 0.04em; }

/* 送付：同じ宛先を選んだ部署の行を、薄い赤にする */
.dispatch-row.is-duplicate { background: rgba(220, 38, 38, 0.1); }

/* =========================================================
   スマホ（640px以下）：PCと同じ余白にせず、詰める。カードは1列
   ========================================================= */
@media (max-width: 640px) {
    .section { padding: 56px 0; }
    .section-title { font-size: 28px; margin-bottom: 32px; }
    .lead-text { font-size: 19px; margin-bottom: 20px; }
    .about-grid { gap: 28px; }
    .rich-grid { grid-template-columns: 1fr; gap: 20px; }

    .page-header { height: auto; min-height: 180px; padding-bottom: 28px; }
    .page-title { font-size: 32px; letter-spacing: 0.06em; }

    .rich-footer { padding: 56px 0 32px; }
    .cta-section { margin-bottom: 48px; }
    .cta-title { font-size: 24px; margin-bottom: 16px; }
    .footer-grid { row-gap: 32px; margin-bottom: 32px; }

    /* 採用ページ */
    .careers-kicker { font-size: 12px; letter-spacing: 0.04em; }
    .careers-lead { font-size: 16px; margin-bottom: 28px; }
    .careers-window { margin-bottom: 28px; }
    .careers-window img { border-width: 4px; border-radius: 12px; box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14); }
    .careers-points { grid-template-columns: 1fr; gap: 12px; margin-bottom: 28px; }
    .cpoint { padding: 16px; }
    .careers-voices { margin: 32px 0 28px; }
    .voice-grid { grid-template-columns: 1fr; gap: 12px; }
    .voice-card { padding: 16px; }

    /* 項目名（dt）と内容（dd）：項目名は小さく薄く、すぐ下の内容と、ひとまとまりに見せる。罫線は、項目と項目の間だけ */
    .glass-panel .detail-grid { gap: 0; }
    .glass-panel .detail-grid dt { padding: 14px 0 2px; font-size: 12px; letter-spacing: 0.08em; }
    .glass-panel .detail-grid dd { margin: 0; padding: 0 0 14px; border-top: 0; font-size: 16px; }

    /* 監査ログ：時刻と操作を、縦に並べる（時刻で1行、操作で1行）。表の見出し行は出さない */
    .audit-table, .audit-table tbody, .audit-table tr, .audit-table td { display: block; }
    .audit-table thead { display: none; }
    .audit-table tr { padding: 12px 14px; border-bottom: 1px solid rgba(15, 23, 42, 0.08); }
    .audit-table td { padding: 0; border: 0; width: auto; }
    .audit-table td:first-child { margin-bottom: 4px; font-size: 12px; letter-spacing: 0.04em; color: var(--color-text-light); }
    .audit-table td:last-child { font-size: 15px; line-height: 1.7; }

    /* 管理画面のタブ：狭い画面（320px前後）でも、横にはみ出さないよう、余白を詰める */
    .admin-tab { padding: 8px 12px; }
}

/* 縦読みのメッセージ：行が折り返しても、各行の頭の文字が、左端にそろって見えるよう、折り返した行を1文字ぶん字下げする */
.voice-acrostic .acro-line { display: block; padding-left: 1em; text-indent: -1em; }

/* 確認のダイアログ（キャンセルと実行の2つのボタン） */
.confirm-message { margin: 0; font-size: 15px; line-height: 1.8; }
.confirm-actions { display: flex; gap: 12px; margin-top: 24px; }
.confirm-actions .btn-submit { height: 48px; padding: 0 24px; border-radius: 2px; }
@media (max-width: 640px) { .confirm-actions .btn-submit { flex: 1; padding: 0 12px; } }

/* マイページ：識別画像を出さなかったとき、枠の中央に「未提出」と出す */
.applicant-face.is-empty { display: flex; align-items: center; justify-content: center; font-size: 13px; letter-spacing: 0.1em; color: var(--color-text-light); }
