/* ==========================================================================
   灃禾人才招募 — 前台樣式
   設計語彙：沃土與收成。米白紙感底、墨綠主色、暖金點綴，
   Noto Serif TC 作為標題襯線、Noto Sans TC 作為內文。
   ========================================================================== */

:root {
    /* 色彩 */
    --c-bg:        #faf8f3;
    --c-bg-deep:   #f3efe5;
    --c-surface:   #fffefb;
    --c-line:      #e7e0d0;
    --c-line-soft: #efe9db;

    --c-green-950: #0f2a21;
    --c-green-900: #16382c;
    --c-green-700: #1f4d3d;
    --c-green-600: #2c6350;
    --c-green-100: #e1ebe5;
    --c-green-050: #edf3ef;

    --c-gold:      #c8a24b;
    --c-gold-deep: #a8842f;
    --c-gold-soft: #f3ead2;

    --c-ink:       #2a302c;
    --c-muted:     #837b6b;

    /* 字體 */
    --font-body:    'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif;
    --font-display: 'Noto Serif TC', 'Noto Sans TC', 'PingFang TC', serif;

    /* 造型 */
    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(31, 53, 43, 0.05), 0 2px 8px rgba(31, 53, 43, 0.04);
    --shadow-md: 0 2px 6px rgba(31, 53, 43, 0.06), 0 12px 28px rgba(31, 53, 43, 0.08);
    --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   重置與基底
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: 0.015em;
    color: var(--c-ink);
    background-color: var(--c-bg);
    /* 細緻紙感網點 */
    background-image: radial-gradient(rgba(31, 77, 61, 0.04) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 { margin: 0; line-height: 1.35; }
p, ul, dl { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--c-green-700); text-decoration: none; }
svg { display: inline-block; vertical-align: middle; }

::selection { background: var(--c-gold-soft); color: var(--c-green-900); }

:focus-visible {
    outline: 2px solid var(--c-gold);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: min(1080px, 100% - 3rem);
    margin-inline: auto;
}

/* --------------------------------------------------------------------------
   導覽列
   -------------------------------------------------------------------------- */

.site-header {
    background: var(--c-bg);
    border-top: 3px solid var(--c-gold);
    border-bottom: 1px solid var(--c-line);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(6px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 0.85rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.brand-seal {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 1px solid rgba(215, 175, 88, 0.64);
    border-radius: 11px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.13), transparent 36%),
        linear-gradient(155deg, #184f40 0%, #0f352b 58%, #08251f 100%);
    color: #fff5d5;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.42rem;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 -10px 18px rgba(0, 0, 0, 0.16),
        0 8px 20px rgba(15, 53, 43, 0.18);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.brand-seal::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(255, 236, 180, 0.26);
    border-radius: 8px;
    pointer-events: none;
}

.brand-seal::after {
    content: "";
    position: absolute;
    right: 8px;
    bottom: 8px;
    left: 8px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(226, 182, 93, 0.85), transparent);
    pointer-events: none;
}

.brand:hover .brand-seal {
    transform: translateY(-1px);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 -10px 18px rgba(0, 0, 0, 0.16),
        0 12px 24px rgba(15, 53, 43, 0.22);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.18em;
    color: var(--c-green-900);
}

.brand-sub {
    font-size: 0.72rem;
    letter-spacing: 0.32em;
    color: var(--c-muted);
}

.nav-admin {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--c-muted);
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-admin:hover {
    color: var(--c-green-700);
    border-color: var(--c-green-700);
    background: var(--c-green-050);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(160deg, var(--c-green-900) 0%, var(--c-green-700) 62%, var(--c-green-600) 100%);
    color: #f4f1e7;
    padding: 4.5rem 0 6.5rem;
}

/* 巨型「禾」字水印 */
.hero::before {
    content: "禾";
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-52%);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(14rem, 30vw, 24rem);
    line-height: 1;
    color: rgba(246, 239, 221, 0.055);
    pointer-events: none;
    user-select: none;
}

/* 底部田畝斜紋 */
.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 110px;
    background: repeating-linear-gradient(
        100deg,
        transparent 0 30px,
        rgba(200, 162, 75, 0.10) 30px 31px
    );
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    mask-image: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 620px; }

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    letter-spacing: 0.4em;
    color: var(--c-gold);
    animation: rise 0.7s var(--ease) 0.05s backwards;
}

.eyebrow-line {
    display: inline-block;
    width: 2.4rem;
    height: 1px;
    background: var(--c-gold);
}

.hero-title {
    margin-top: 1.1rem;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.1rem, 5.2vw, 3.3rem);
    letter-spacing: 0.1em;
    color: #faf6ea;
    animation: rise 0.7s var(--ease) 0.15s backwards;
}

.hero-sub {
    margin-top: 1.15rem;
    max-width: 33em;
    font-size: 1.02rem;
    line-height: 2;
    color: rgba(244, 241, 231, 0.82);
    animation: rise 0.7s var(--ease) 0.25s backwards;
}

/* --------------------------------------------------------------------------
   搜尋 / 篩選列（疊壓在 hero 下緣）
   -------------------------------------------------------------------------- */

.search-section { position: relative; z-index: 2; }

.search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 1.25rem;
    margin-top: -3.1rem;
    padding: 1.4rem 1.6rem;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    animation: rise 0.7s var(--ease) 0.35s backwards;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 150px; }
.field-grow { flex: 1 1 240px; }

.field label {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: var(--c-muted);
}

.field input,
.field select {
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--c-ink);
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    padding: 0.62rem 0.85rem;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field input::placeholder { color: #b3ac9c; }

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--c-green-600);
    box-shadow: 0 0 0 3px rgba(31, 77, 61, 0.12);
}

.field select { cursor: pointer; min-width: 160px; }

.search-btn { align-self: flex-end; }

/* --------------------------------------------------------------------------
   按鈕
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    padding: 0.66rem 1.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease),
                border-color 0.2s var(--ease), transform 0.2s var(--ease),
                box-shadow 0.2s var(--ease);
}

.btn svg { width: 17px; height: 17px; }

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--c-green-700);
    color: #f6f2e6;
}

.btn-primary:hover {
    background: var(--c-green-900);
    box-shadow: 0 6px 16px rgba(22, 56, 44, 0.25);
}

.btn-gold {
    background: var(--c-gold);
    color: var(--c-green-950);
    font-weight: 700;
}

.btn-gold:hover {
    background: var(--c-gold-deep);
    color: #fffdf5;
    box-shadow: 0 6px 16px rgba(168, 132, 47, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--c-green-700);
    border-color: var(--c-green-700);
}

.btn-outline:hover { background: var(--c-green-050); }

.btn-block { display: flex; width: 100%; padding-block: 0.85rem; font-size: 1.02rem; }

/* --------------------------------------------------------------------------
   徽章與標籤
   -------------------------------------------------------------------------- */

.chip {
    display: inline-block;
    padding: 0.16rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.chip-type {
    background: var(--c-green-100);
    color: var(--c-green-700);
    border: 1px solid rgba(31, 77, 61, 0.14);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.badge-open {
    background: var(--c-green-700);
    color: #f3efdf;
}

.badge-closed {
    background: #8b8474;
    color: #faf8f3;
}

/* --------------------------------------------------------------------------
   職缺清單
   -------------------------------------------------------------------------- */

.jobs-section { padding: 3.2rem 0 4.5rem; }

.jobs-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 1.6rem;
}

.section-title {
    position: relative;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: 0.14em;
    color: var(--c-green-900);
    padding-left: 1rem;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.32em;
    bottom: 0.28em;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(var(--c-gold), var(--c-gold-deep));
}

.jobs-head-meta {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
}

.jobs-count { font-size: 0.9rem; color: var(--c-muted); }

.jobs-count strong {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--c-green-700);
    margin-inline: 0.15em;
}

.clear-filter {
    font-size: 0.85rem;
    color: var(--c-gold-deep);
    border-bottom: 1px dashed currentColor;
    transition: color 0.2s var(--ease);
}

.clear-filter:hover { color: var(--c-green-700); }

.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.3rem;
}

.job-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0.55rem;
    padding: 1.5rem 1.6rem 1.2rem;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    color: var(--c-ink);
    overflow: hidden;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
                border-color 0.25s var(--ease);
    animation: rise 0.6s var(--ease) backwards;
}

.job-card:nth-child(1) { animation-delay: 0.05s; }
.job-card:nth-child(2) { animation-delay: 0.1s; }
.job-card:nth-child(3) { animation-delay: 0.15s; }
.job-card:nth-child(4) { animation-delay: 0.2s; }
.job-card:nth-child(5) { animation-delay: 0.25s; }
.job-card:nth-child(6) { animation-delay: 0.3s; }
.job-card:nth-child(n+7) { animation-delay: 0.35s; }

/* 卡片頂端金色細線（hover 時展開） */
.job-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--c-gold), var(--c-gold-deep));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
}

.job-card:hover {
    transform: translateY(-4px);
    border-color: rgba(200, 162, 75, 0.55);
    box-shadow: var(--shadow-md);
}

.job-card:hover::before { transform: scaleX(1); }

/* 卡片頂部職缺圖片（滿版出血，圓角由卡片 overflow 處理） */
.job-card-media {
    margin: -1.5rem -1.6rem 0.4rem;
    height: 160px;
    overflow: hidden;
    background: var(--c-bg-deep);
    border-bottom: 1px solid var(--c-line-soft);
}

.job-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s var(--ease);
}

.job-card:hover .job-card-media img { transform: scale(1.04); }

/* 無圖片時的占位設計：淡綠底＋置中「禾」字印章，
   讓所有卡片從相同高度開始、文字位置完全對齊 */
.job-card-media-empty {
    display: grid;
    place-items: center;
    background:
        radial-gradient(rgba(31, 77, 61, 0.045) 1px, transparent 1px),
        linear-gradient(150deg, var(--c-green-050) 0%, var(--c-green-100) 100%);
    background-size: 20px 20px, 100% 100%;
}

.media-empty-mark {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 1.5px solid rgba(31, 77, 61, 0.16);
    box-shadow: inset 0 0 0 4px rgba(250, 248, 243, 0.5);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1;
    color: rgba(31, 77, 61, 0.2);
    user-select: none;
}

.job-dept {
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    color: var(--c-gold-deep);
}

.job-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.job-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.18rem;
    letter-spacing: 0.06em;
    color: var(--c-green-900);
    transition: color 0.2s var(--ease);
}

.job-card:hover .job-title { color: var(--c-green-600); }

.job-desc {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--c-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 底部群組（meta＋發布列）：margin-top auto 錨定卡片底部，
   不論描述長短、有無截止日，三項 meta 永遠緊貼在「發布於」正上方 */
.job-card-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: auto;
}

/* 縣市／薪資／需求人數：各自獨立一列，所有卡片一致對齊 */
.job-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.86rem;
    color: var(--c-ink);
}

.job-meta li { display: inline-flex; align-items: center; gap: 0.4rem; }

.job-meta svg {
    width: 16px;
    height: 16px;
    color: var(--c-green-600);
    flex-shrink: 0;
}

.job-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--c-line-soft);
    font-size: 0.78rem;
    color: var(--c-muted);
}

.job-deadline { color: var(--c-gold-deep); }

.job-more {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
    font-weight: 500;
    color: var(--c-green-700);
    transition: gap 0.2s var(--ease);
}

.job-more svg { width: 14px; height: 14px; }

.job-card:hover .job-more { gap: 0.55rem; }

/* 空狀態 */

.empty-state {
    text-align: center;
    padding: 4.5rem 1.5rem;
    background: var(--c-surface);
    border: 1px dashed var(--c-line);
    border-radius: var(--radius-lg);
}

.empty-mark {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 1.2rem;
    border-radius: 50%;
    background: var(--c-green-050);
    border: 1px solid var(--c-green-100);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--c-green-600);
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    color: var(--c-green-900);
}

.empty-state p {
    margin: 0.6rem 0 1.6rem;
    font-size: 0.92rem;
    color: var(--c-muted);
}

/* --------------------------------------------------------------------------
   職缺詳情
   -------------------------------------------------------------------------- */

.detail-hero {
    background: var(--c-bg-deep);
    border-bottom: 1px solid var(--c-line);
    padding: 2.2rem 0 2.6rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    color: var(--c-muted);
    margin-bottom: 1.6rem;
    transition: color 0.2s var(--ease), gap 0.2s var(--ease);
}

.back-link svg { width: 16px; height: 16px; }

.back-link:hover { color: var(--c-green-700); gap: 0.65rem; }

.detail-badges {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
    animation: rise 0.6s var(--ease) 0.05s backwards;
}

.detail-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    letter-spacing: 0.08em;
    color: var(--c-green-900);
    animation: rise 0.6s var(--ease) 0.12s backwards;
}

.detail-dept {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--c-gold-deep);
    animation: rise 0.6s var(--ease) 0.18s backwards;
}

.detail-body { padding: 2.6rem 0 4.5rem; }

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 2.4rem;
    align-items: start;
}

.detail-main {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

/* 職缺詳情圖片 */
.detail-media {
    margin: 0;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    animation: rise 0.6s var(--ease) 0.1s backwards;
}

.detail-media img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.content-block {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.8rem 2rem;
    animation: rise 0.6s var(--ease) 0.15s backwards;
}

.block-title {
    position: relative;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.16em;
    color: var(--c-green-900);
    padding-left: 0.95rem;
    margin-bottom: 1rem;
}

.block-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3em;
    bottom: 0.25em;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(var(--c-gold), var(--c-gold-deep));
}

/* 契約要求：以 pre-line 呈現使用者輸入的換行 */
.pre-line {
    white-space: pre-line;
    font-size: 0.95rem;
    line-height: 2;
    color: #3d443f;
}

.detail-aside { position: sticky; top: 86px; }

.aside-card {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-top: 3px solid var(--c-gold);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 1.6rem 1.7rem 1.7rem;
    animation: rise 0.6s var(--ease) 0.22s backwards;
}

.aside-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.2em;
    color: var(--c-green-900);
    margin-bottom: 1rem;
}

.info-list { display: flex; flex-direction: column; }

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--c-line-soft);
}

.info-row:last-child { border-bottom: none; }

.info-row dt {
    flex-shrink: 0;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    color: var(--c-muted);
}

.info-row dd {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--c-ink);
    text-align: right;
}

.apply-area {
    margin-top: 1.4rem;
    padding-top: 1.4rem;
    border-top: 1px dashed var(--c-line);
}

.apply-hint,
.apply-closed {
    font-size: 0.88rem;
    line-height: 1.9;
    text-align: center;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
}

.apply-hint {
    background: var(--c-gold-soft);
    color: var(--c-gold-deep);
    border: 1px solid rgba(200, 162, 75, 0.35);
}

.apply-closed {
    background: var(--c-bg-deep);
    color: var(--c-muted);
    border: 1px solid var(--c-line);
}

/* 未登入者：應徵按鈕下方的登入提示小字 */
.apply-login-hint {
    margin-top: 0.65rem;
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--c-muted);
}

/* --------------------------------------------------------------------------
   錯誤頁
   -------------------------------------------------------------------------- */

.error-page {
    display: grid;
    place-items: center;
    padding: 6rem 0 7rem;
}

.error-inner { text-align: center; max-width: 460px; }

.error-code {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3.6rem, 10vw, 5.5rem);
    line-height: 1;
    color: var(--c-green-100);
    text-shadow: 0 1px 0 rgba(31, 77, 61, 0.12);
    animation: rise 0.6s var(--ease) 0.05s backwards;
}

.error-title {
    margin-top: 1.1rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.12em;
    color: var(--c-green-900);
    animation: rise 0.6s var(--ease) 0.12s backwards;
}

.error-text {
    margin: 0.8rem 0 2rem;
    font-size: 0.95rem;
    color: var(--c-muted);
    animation: rise 0.6s var(--ease) 0.18s backwards;
}

/* --------------------------------------------------------------------------
   頁尾
   -------------------------------------------------------------------------- */

.site-footer {
    flex-shrink: 0;
    background: var(--c-green-950);
    color: rgba(244, 241, 231, 0.72);
    border-top: 3px solid var(--c-gold);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1.5rem;
    padding-block: 1.6rem;
}

.footer-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.24em;
    color: #ece5d2;
}

.footer-brand span {
    margin-left: 0.7rem;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: rgba(244, 241, 231, 0.55);
}

.footer-copy { font-size: 0.8rem; letter-spacing: 0.08em; }

/* --------------------------------------------------------------------------
   動畫
   -------------------------------------------------------------------------- */

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   響應式
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
    .detail-grid { grid-template-columns: 1fr; gap: 1.4rem; }
    .detail-aside { position: static; order: -1; }
}

@media (max-width: 720px) {
    .container { width: min(1080px, 100% - 2.2rem); }

    .hero { padding: 3.2rem 0 5.4rem; }
    .hero::before { font-size: 13rem; right: -3rem; opacity: 0.8; }

    /* 主標題（10 個全形字）手機上保持單行：字級隨螢幕寬縮放、字距略收 */
    .hero-title {
        white-space: nowrap;
        font-size: clamp(1.4rem, 7.4vw, 2.05rem);
        letter-spacing: 0.07em;
    }

    .search-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 1.2rem 1.2rem 1.3rem;
        margin-top: -2.6rem;
    }
    /* 直向排列時 flex-basis 240px 會變成高度，把關鍵字欄位撐出大空白 */
    .field-grow { flex: 0 0 auto; }
    .field select { min-width: 0; }
    .search-btn { align-self: stretch; width: 100%; }

    .jobs-section { padding-top: 2.4rem; }
    .job-grid { grid-template-columns: 1fr; }

    .content-block { padding: 1.4rem 1.3rem; }
    .aside-card { padding: 1.4rem 1.3rem 1.5rem; }

    .footer-inner { justify-content: center; text-align: center; }
}

@media (max-width: 420px) {
    .brand-sub { display: none; }
    .job-card { padding: 1.3rem 1.2rem 1.1rem; }
    .job-card-media { margin: -1.3rem -1.2rem 0.4rem; }
}

/* --------------------------------------------------------------------------
   線上應徵表單
   -------------------------------------------------------------------------- */

.apply-section { padding: 2.4rem 0 4.5rem; }

.apply-form {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    max-width: 860px;
    margin-inline: auto;
}

.apply-card {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.8rem 2rem;
    animation: rise 0.6s var(--ease) 0.1s backwards;
}

.card-hint {
    margin: -0.4rem 0 1rem;
    font-size: 0.84rem;
    color: var(--c-muted);
}

.req-mark { color: var(--c-gold-deep); font-weight: 700; }

/* 兩欄 grid（手機單欄） */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 1.5rem;
}

.form-grid .span-2 { grid-column: 1 / -1; }

.form-grid-gap-top { margin-top: 1.1rem; }

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }

.form-field > label,
.form-field .field-label {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--c-green-900);
    font-weight: 500;
}

/* 文字／日期／月份輸入框 */
.apply-form input[type="text"],
.apply-form input[type="email"],
.apply-form input[type="tel"],
.apply-form input[type="date"],
.apply-form input[type="month"],
.apply-form textarea {
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--c-ink);
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    padding: 0.62rem 0.85rem;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.apply-form input::placeholder { color: #b3ac9c; }

.apply-form input[type="text"]:focus,
.apply-form input[type="email"]:focus,
.apply-form input[type="tel"]:focus,
.apply-form input[type="date"]:focus,
.apply-form input[type="month"]:focus,
.apply-form textarea:focus {
    outline: none;
    border-color: var(--c-green-600);
    box-shadow: 0 0 0 3px rgba(31, 77, 61, 0.12);
}

.apply-form input[type="file"] {
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--c-muted);
    background: #fff;
    border: 1px dashed var(--c-line);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.85rem;
    cursor: pointer;
}

.apply-form input[type="file"]::file-selector-button {
    margin-right: 0.9rem;
    padding: 0.4rem 1rem;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--c-green-700);
    background: var(--c-green-050);
    border: 1px solid var(--c-green-100);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s var(--ease);
}

.apply-form input[type="file"]::file-selector-button:hover { background: var(--c-green-100); }

/* radio / checkbox pill 樣式 */
.pill-group { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.pill { position: relative; cursor: pointer; }

.pill input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.pill span {
    display: inline-block;
    padding: 0.42rem 1.1rem;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    background: #fff;
    color: var(--c-ink);
    user-select: none;
    transition: background 0.2s var(--ease), color 0.2s var(--ease),
                border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.pill:hover span { border-color: var(--c-green-600); }

.pill input:checked + span {
    background: var(--c-green-700);
    border-color: var(--c-green-700);
    color: #f6f2e6;
    box-shadow: 0 2px 8px rgba(31, 77, 61, 0.22);
}

.pill input:focus-visible + span {
    outline: 2px solid var(--c-gold);
    outline-offset: 2px;
}

/* 學歷 / 工作經歷：逐列分組卡片 */
.entry-rows {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.entry-card {
    background: var(--c-bg);
    border: 1px solid var(--c-line-soft);
    border-radius: var(--radius-sm);
    padding: 1rem 1.15rem 1.15rem;
}

.entry-card-label {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.12rem 0.75rem;
    background: var(--c-green-050);
    border: 1px solid var(--c-green-100);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--c-green-700);
}

.entry-row {
    display: grid;
    gap: 0.9rem 1.1rem;
}

/* 桌機／平板：學歷 3 欄、經歷 2 欄 */
.entry-row-edu { grid-template-columns: 1.4fr 1fr 0.9fr; }
.entry-row-exp { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stack-field { display: flex; flex-direction: column; gap: 0.35rem; }

.stack-label {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: var(--c-muted);
}

/* 錯誤呈現 */
.input-error { border-color: #b3473c !important; }

.field-error {
    font-size: 0.82rem;
    line-height: 1.6;
    color: #b3473c;
}

.field-hint {
    font-size: 0.8rem;
    color: var(--c-muted);
}

.error-summary {
    background: #fdf1ef;
    border: 1px solid #e5b8b1;
    border-left: 4px solid #b3473c;
    border-radius: var(--radius-sm);
    padding: 1rem 1.3rem;
}

.error-summary-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #8e3a31;
}

.error-summary-note {
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: #a05248;
}

/* 必填欄位說明（表單頂部小字） */
.form-required-note {
    font-size: 0.85rem;
    color: var(--c-muted);
}

/* 伺服器端驗證失敗的錯誤彙總框 */
.form-error-summary {
    background: #fdf1ef;
    border: 1px solid #e5b8b1;
    border-left: 4px solid #b3473c;
    border-radius: var(--radius-sm);
    padding: 1rem 1.3rem;
}

.form-error-summary-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #8e3a31;
}

.form-error-summary ul {
    margin: 0.5rem 0 0;
    padding-left: 1.4rem;
}

.form-error-summary li {
    font-size: 0.88rem;
    line-height: 1.8;
    color: #b3473c;
}

.form-error-summary-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #a05248;
}

/* flash message */
.flash-notice {
    max-width: 860px;
    margin: 0 auto 1.4rem;
    padding: 0.85rem 1.2rem;
    background: var(--c-gold-soft);
    border: 1px solid rgba(200, 162, 75, 0.45);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    color: var(--c-gold-deep);
}

/* 個資同意 */
.consent-card-error { border-color: #e5b8b1; }

.consent-text {
    font-size: 0.88rem;
    line-height: 1.9;
    color: var(--c-muted);
    background: var(--c-bg-deep);
    border: 1px solid var(--c-line-soft);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.1rem;
}

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 0.95rem;
    font-size: 0.93rem;
    cursor: pointer;
}

.consent-check input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 0.22em;
    accent-color: var(--c-green-700);
    cursor: pointer;
}

/* 送出區 */
.apply-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 480px;
    width: 100%;
    margin-inline: auto;
    padding-top: 0.4rem;
}

/* 蜜罐欄位：移出視野（不可用 display:none，避免被機器人偵測略過） */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   應徵成功頁
   -------------------------------------------------------------------------- */

.success-section {
    display: grid;
    place-items: center;
    padding: 4.5rem 0 6rem;
}

.success-card {
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
    text-align: center;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-top: 3px solid var(--c-gold);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 3rem 2.5rem;
    animation: rise 0.6s var(--ease) 0.08s backwards;
}

.success-mark {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 1.3rem;
    border-radius: 50%;
    background: var(--c-green-050);
    border: 1px solid var(--c-green-100);
    color: var(--c-green-700);
}

.success-mark svg { width: 38px; height: 38px; }

.success-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: 0.12em;
    color: var(--c-green-900);
}

.success-text {
    margin-top: 0.8rem;
    font-size: 0.96rem;
    line-height: 1.9;
    color: var(--c-muted);
}

.success-job {
    display: inline-block;
    margin-top: 1.1rem;
    padding: 0.45rem 1.2rem;
    background: var(--c-gold-soft);
    border: 1px solid rgba(200, 162, 75, 0.35);
    border-radius: 999px;
    font-size: 0.9rem;
    color: var(--c-gold-deep);
}

.success-job span { font-weight: 700; }

.success-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.8rem;
}

/* 應徵流程響應式（平板以下） */
@media (max-width: 720px) {
    .apply-card { padding: 1.4rem 1.3rem; }
    .form-grid { grid-template-columns: 1fr; }
    .success-card { padding: 2.2rem 1.5rem; }
    .success-actions { flex-direction: column; }
    .success-actions .btn { width: 100%; }
}

/* 應徵流程響應式（手機 ≤640px） */
@media (max-width: 640px) {
    /* 學歷／經歷卡片內欄位改單欄，卡片內距微縮 */
    .entry-row-edu,
    .entry-row-exp { grid-template-columns: 1fr; }
    .entry-card { padding: 0.9rem 1rem 1rem; }
    .entry-rows { gap: 0.8rem; }

    /* checkbox / radio pill：觸控目標至少 44px 高、間距加大 */
    .pill-group { gap: 0.65rem; }
    .pill span {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0.5rem 1.25rem;
    }

    /* 同意區：微調間距，加大勾選列的點按範圍 */
    .consent-check { margin-top: 1.1rem; padding-block: 0.25rem; }
}

/* --------------------------------------------------------------------------
   導覽列登入區（登入／我的履歷／管理後台／登出）
   -------------------------------------------------------------------------- */

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

/* 與 .nav-admin 同視覺語彙的一般導覽連結 */
.nav-link {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--c-muted);
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-link:hover {
    color: var(--c-green-700);
    border-color: var(--c-green-700);
    background: var(--c-green-050);
}

/* 導覽列項目一律不換行（空間不足時由下方媒體查詢縮小字級） */
.nav-link,
.nav-admin,
.nav-logout { white-space: nowrap; }

/* 登出小表單按鈕 */
.nav-logout-form { display: inline-flex; margin: 0; }

.nav-logout {
    font-family: inherit;
    cursor: pointer;
    display: inline-block;
    padding: 0.4rem 1.05rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--c-muted);
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-logout:hover {
    color: #8e3a31;
    border-color: #e5b8b1;
    background: #fdf1ef;
}

/* 手機收納：縮小字級與內距、收緊間距，文字不換行 */
@media (max-width: 560px) {
    .nav-inner { gap: 0.6rem; }
    .nav-links { gap: 0.3rem; }
    .nav-link,
    .nav-admin,
    .nav-logout {
        padding: 0.3rem 0.66rem;
        font-size: 0.76rem;
        letter-spacing: 0.03em;
    }
}

/* --------------------------------------------------------------------------
   我的履歷：列表（卡片網格）
   -------------------------------------------------------------------------- */

.my-apps-section { padding: 2.6rem 0 4.5rem; }

/* 與前台職缺卡同款網格：依容器寬度自動排 2–3 欄，手機縮為單欄 */
.my-app-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.3rem;
}

.my-app-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0.55rem;
    padding: 1.5rem 1.6rem 1.2rem;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    animation: rise 0.6s var(--ease) backwards;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
                border-color 0.25s var(--ease);
}

.my-app-card:nth-child(1) { animation-delay: 0.05s; }
.my-app-card:nth-child(2) { animation-delay: 0.1s; }
.my-app-card:nth-child(3) { animation-delay: 0.15s; }
.my-app-card:nth-child(n+4) { animation-delay: 0.2s; }

/* 卡片頂端金色細線（hover 時展開），與職缺卡一致的互動語彙 */
.my-app-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--c-gold), var(--c-gold-deep));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
}

.my-app-card:hover {
    transform: translateY(-4px);
    border-color: rgba(200, 162, 75, 0.55);
    box-shadow: var(--shadow-md);
}

.my-app-card:hover::before { transform: scaleX(1); }

/* 標籤列：左為「應徵職缺」小標、右為狀態徽章，徽章不被長標籤擠壓 */
.my-app-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.my-app-head .badge { flex-shrink: 0; }

.my-app-label {
    font-size: 0.76rem;
    letter-spacing: 0.22em;
    color: var(--c-gold-deep);
}

.my-app-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.06em;
    /* 長職稱在手機單欄也要能折行，不可橫向撐破卡片 */
    overflow-wrap: anywhere;
}

.my-app-title a { color: var(--c-green-900); transition: color 0.2s var(--ease); }
.my-app-title a:hover { color: var(--c-green-600); }

.my-app-times {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.my-app-time {
    font-size: 0.84rem;
    color: var(--c-muted);
    font-variant-numeric: tabular-nums;
}

/* 動作列：margin-top auto 錨定卡片底部，按鈕等寬填滿、視覺對齊 */
.my-app-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid var(--c-line-soft);
}

.my-app-actions .btn { flex: 1 1 auto; }

/* 小尺寸按鈕（列表「檢視內容」用） */
.btn-sm {
    padding: 0.45rem 1.15rem;
    font-size: 0.85rem;
}

/* 履歷狀態徽章（前台配色） */
.badge-app-new {
    background: var(--c-gold-soft);
    color: var(--c-gold-deep);
    border: 1px solid rgba(200, 162, 75, 0.4);
}

.badge-app-reviewed {
    background: var(--c-green-050);
    color: var(--c-green-700);
    border: 1px solid var(--c-green-100);
}

.badge-app-contacted {
    background: var(--c-green-700);
    color: #f3efdf;
}

.badge-app-archived {
    background: var(--c-bg-deep);
    color: var(--c-muted);
    border: 1px solid var(--c-line);
}

/* 「我的」分頁切換列（應徵紀錄／履歷夾共用），按鈕沿用 btn 樣式 */
.my-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.4rem;
}

/* 履歷夾工具列：主要動作靠右 */
.my-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.3rem;
}

/* 卡片動作列中的 POST 小表單（設為預設／刪除）：
   display:contents 讓按鈕直接參與 flex 排版，與連結按鈕等寬對齊 */
.my-app-actions form { display: contents; }

/* 空狀態多顆動作按鈕並排，手機自動換行置中 */
.empty-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* --------------------------------------------------------------------------
   我的履歷：詳情（唯讀）
   -------------------------------------------------------------------------- */

.resume-section { padding: 2.6rem 0 4.5rem; }

.resume-blocks {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    max-width: 860px;
    margin-inline: auto;
}

/* 摘要區：大頭照＋姓名＋狀態＋應徵職缺 */
.resume-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.4rem;
}

.resume-photo-frame {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--c-bg-deep);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
}

.resume-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resume-photo-empty {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: var(--c-muted);
}

.resume-head-info { min-width: 0; }

.resume-head-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
}

.resume-head-name h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.08em;
    color: var(--c-green-900);
}

.resume-head-job {
    margin-top: 0.4rem;
    font-size: 0.92rem;
    color: var(--c-ink);
}

.resume-head-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 1.2rem;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--c-muted);
}

/* 資訊網格（兩欄，手機單欄） */
.resume-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1.6rem;
}

.resume-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.resume-info-wide { grid-column: 1 / -1; }

.resume-info-label {
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    color: var(--c-muted);
}

.resume-info-value {
    font-size: 0.95rem;
    color: var(--c-ink);
    overflow-wrap: anywhere;
}

.resume-info-multiline { white-space: pre-line; }

/* 學歷／經歷表格 */
.table-scroll { overflow-x: auto; }

.resume-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.resume-table th {
    padding: 0.5rem 0.8rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: var(--c-muted);
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
    white-space: nowrap;
}

.resume-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--c-line-soft);
    color: var(--c-ink);
}

.resume-table tr:last-child td { border-bottom: none; }

.resume-empty-note {
    font-size: 0.9rem;
    color: var(--c-muted);
}

.resume-actions {
    display: flex;
    justify-content: center;
    padding-top: 0.4rem;
}

/* 我的履歷響應式 */
@media (max-width: 720px) {
    .my-app-card { padding: 1.2rem 1.2rem 1.1rem; }
    .resume-info-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   字級階層與手機版精緻化覆寫
   原則：僅覆寫、不刪除上方既有規則；不更動既有 CSS 變數名稱。
   階層（rem）：小字 0.8 / 輔助 0.875 / 內文 1 / 小標 1.05 /
               卡片標題 1.2 / 區塊標題 1.4 / 頁面標題 1.7–2；
               資料值（表格、資訊列）統一 0.95 子階。
   ========================================================================== */

:root {
    --fs-2xs:  0.8rem;   /* 小字：標籤、表頭、頁尾 */
    --fs-xs:   0.875rem; /* 輔助：meta、說明、導覽 */
    --fs-data: 0.95rem;  /* 資料值 */
    --fs-base: 1rem;     /* 內文 */
    --fs-md:   1.05rem;  /* 小標 */
    --fs-card: 1.2rem;   /* 卡片標題 */
    --fs-xl:   1.4rem;   /* 區塊標題 */
    --lh-body:    1.8;
    --lh-heading: 1.3;
}

/* ---------- 基底 ---------- */

html { -webkit-text-size-adjust: 100%; }

body { line-height: var(--lh-body); }

h1, h2, h3, h4 { line-height: var(--lh-heading); }

/* ---------- 標題階層：字級統一、中文字距收斂至 0.04–0.08em ---------- */

.hero-title { letter-spacing: 0.08em; }

.detail-title { font-size: clamp(1.7rem, 4vw, 2rem); letter-spacing: 0.06em; }

.section-title { font-size: var(--fs-xl); letter-spacing: 0.08em; }

.error-title { font-size: var(--fs-xl); letter-spacing: 0.08em; }

.success-title { font-size: var(--fs-xl); letter-spacing: 0.08em; }

.block-title { font-size: var(--fs-card); letter-spacing: 0.08em; }

.job-title { font-size: var(--fs-card); letter-spacing: 0.05em; }

.my-app-title { font-size: var(--fs-card); letter-spacing: 0.05em; }

.empty-state h3 { font-size: var(--fs-card); letter-spacing: 0.08em; }

.resume-head-name h2 { font-size: 1.25rem; letter-spacing: 0.06em; }

.aside-title { font-size: var(--fs-md); letter-spacing: 0.08em; }

.footer-brand { letter-spacing: 0.18em; }

/* ---------- 內文層：1rem、行高 1.75–1.85 ---------- */

.hero-sub { font-size: var(--fs-base); line-height: 1.85; }

.pre-line { font-size: var(--fs-base); line-height: 1.85; }

.success-text,
.error-text { font-size: var(--fs-base); line-height: 1.85; }

/* ---------- 輔助層：0.875rem ---------- */

.job-desc,
.jobs-count,
.clear-filter,
.back-link,
.my-app-time,
.card-hint,
.empty-state p,
.apply-hint,
.apply-closed,
.consent-text,
.form-required-note,
.field-error,
.resume-empty-note,
.nav-link,
.nav-admin,
.nav-logout { font-size: var(--fs-xs); }

.job-desc { line-height: 1.75; }

.consent-text { line-height: 1.85; }

/* ---------- 小字層：0.8rem ---------- */

.field label,
.stack-label,
.chip,
.job-dept,
.job-foot,
.info-row dt,
.resume-info-label,
.my-app-label,
.resume-table th,
.field-hint,
.resume-photo-empty,
.footer-copy { font-size: var(--fs-2xs); }

/* ---------- 資料值層：0.95rem、等寬數字 ---------- */

.info-row dd,
.resume-info-value,
.resume-table,
.flash-notice { font-size: var(--fs-data); }

.info-row dd { font-variant-numeric: tabular-nums; }

/* ---------- 表單控制項：統一 1rem（桌機亦更易讀）---------- */

.field input,
.field select,
.apply-form input[type="text"],
.apply-form input[type="email"],
.apply-form input[type="tel"],
.apply-form input[type="date"],
.apply-form input[type="month"],
.apply-form textarea { font-size: var(--fs-base); }

/* ---------- 職缺卡 meta 列：間距與 icon 對齊修齊 ---------- */

.job-meta { gap: 0.45rem 1.15rem; font-size: var(--fs-xs); }

.job-meta li { gap: 0.45rem; line-height: 1.6; }

.job-meta svg { width: 15px; height: 15px; margin-top: -1px; }

/* 薪資列（第 2 項）以暖金強調 */
.job-meta li:nth-child(2) span {
    color: var(--c-gold-deep);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.job-foot { letter-spacing: 0.02em; }

/* ---------- 窄螢幕導覽收納（承接上方字級覆寫，重申既有縮小規則）---------- */

@media (max-width: 560px) {
    .nav-link,
    .nav-admin,
    .nav-logout {
        font-size: 0.8rem;
        padding: 0.32rem 0.7rem;
        letter-spacing: 0.03em;
    }
}

/* ---------- 手機 ≤640px：節奏、留白、可觸性 ---------- */

@media (max-width: 640px) {
    /* 表單控制項 ≥16px，避免 iOS 聚焦自動縮放 */
    .field input,
    .field select,
    .apply-form input[type="text"],
    .apply-form input[type="email"],
    .apply-form input[type="tel"],
    .apply-form input[type="date"],
    .apply-form input[type="month"],
    .apply-form textarea,
    .apply-form input[type="file"] { font-size: 16px; }

    /* 按鈕高度一致 ≥44px */
    .btn { min-height: 44px; }
    .btn-sm { min-height: 44px; padding-block: 0.5rem; }

    /* pill 選項文字微放大，配合 44px 觸控高度 */
    .pill span { font-size: 0.95rem; }

    /* 頁首與 hero 留白收斂 */
    .nav-inner { padding-block: 0.7rem; }
    .brand-seal { width: 38px; height: 38px; font-size: 1.15rem; }
    .hero { padding: 2.7rem 0 4.7rem; }
    .hero-eyebrow { font-size: 0.8rem; letter-spacing: 0.3em; gap: 0.6rem; }
    .eyebrow-line { width: 1.9rem; }
    .hero-title { margin-top: 0.95rem; letter-spacing: 0.05em; }
    .hero-sub { margin-top: 1rem; font-size: 0.95rem; }

    .search-bar { margin-top: -2.4rem; padding: 1.1rem 1.15rem 1.25rem; gap: 0.85rem; }

    /* 區塊垂直節奏統一（約 2–2.4rem） */
    .jobs-section { padding: 2.2rem 0 2.6rem; }
    .detail-hero { padding: 1.7rem 0 2rem; }
    .detail-body { padding: 2rem 0 2.6rem; }
    .apply-section { padding: 2rem 0 2.6rem; }
    .my-apps-section,
    .resume-section { padding: 2rem 0 2.6rem; }
    .success-section { padding: 2.4rem 0 3rem; }
    .jobs-head { margin-bottom: 1.2rem; }
    .back-link { margin-bottom: 1.2rem; }
    .detail-grid { gap: 1.1rem; }
    .detail-main { gap: 1.1rem; }
    .apply-form { gap: 1.1rem; }
    .resume-blocks { gap: 1.1rem; }
    .my-app-list { gap: 1rem; }
    .job-grid { gap: 1rem; }

    /* 卡片內距統一 1.1–1.25rem；圖片區手機降為 150px */
    .job-card { padding: 1.2rem 1.2rem 1.1rem; }
    .job-card-media { margin: -1.2rem -1.2rem 0.5rem; height: 150px; }
    .content-block,
    .apply-card { padding: 1.25rem 1.2rem 1.3rem; }
    .aside-card { padding: 1.25rem 1.2rem 1.35rem; }
    .my-app-card { padding: 1.2rem 1.2rem 1.1rem; }
    .success-card { padding: 2rem 1.4rem; }

    /* 手機標題降一階，避免擁擠 */
    .section-title { font-size: 1.3rem; }
    .success-title { font-size: 1.35rem; }

    /* footer 緊湊置中 */
    .footer-inner {
        flex-direction: column;
        gap: 0.15rem;
        padding-block: 1.25rem;
        text-align: center;
    }

    .footer-copy { font-size: 0.75rem; }
}

/* ==========================================================================
   Public Home Redesign
   ========================================================================== */

.public-home {
    --home-forest: #0f352b;
    --home-forest-2: #185240;
    --home-ink: #18302b;
    --home-blue: #486a78;
    --home-copper: #a86d2f;
    --home-cream: #fbf8ef;
    --home-line: rgba(27, 65, 55, 0.13);
    background:
        linear-gradient(90deg, rgba(27, 65, 55, 0.03) 1px, transparent 1px),
        linear-gradient(0deg, rgba(27, 65, 55, 0.025) 1px, transparent 1px),
        var(--home-cream);
    background-size: 28px 28px, 28px 28px, auto;
    color: var(--home-ink);
}

.public-home .site-header {
    border-top: 0;
    background: rgba(251, 248, 239, 0.92);
    border-bottom: 1px solid rgba(32, 73, 61, 0.1);
    backdrop-filter: blur(16px);
}

.public-home .nav-inner {
    padding-block: 0.85rem;
}

.public-home .brand-seal {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.15), transparent 34%),
        linear-gradient(155deg, #1c5b48 0%, var(--home-forest) 58%, #08251f 100%);
    border-color: rgba(226, 182, 93, 0.68);
    font-size: 1.42rem;
}

.public-home .brand-name,
.public-home .brand-sub {
    letter-spacing: 0.04em;
}

.public-home .nav-link,
.public-home .nav-admin,
.public-home .nav-logout {
    border-radius: 999px;
}

.public-home .home-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 5.6rem 0 7.4rem;
    background:
        linear-gradient(118deg, rgba(11, 42, 35, 0.98) 0%, rgba(23, 78, 61, 0.94) 52%, rgba(17, 47, 60, 0.96) 100%),
        repeating-linear-gradient(101deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 22px);
    color: var(--c-white);
}

.public-home .home-hero::before {
    content: "灃禾";
    position: absolute;
    right: -0.7rem;
    top: 50%;
    bottom: auto;
    z-index: -1;
    color: rgba(255, 245, 213, 0.035);
    font-family: var(--font-display);
    font-size: clamp(9rem, 16vw, 15rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    transform: translateY(-46%);
    white-space: nowrap;
    -webkit-text-stroke: 1px rgba(226, 182, 93, 0.14);
    text-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}

.public-home .home-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    z-index: -1;
    height: 84px;
    background:
        repeating-linear-gradient(98deg, rgba(234, 220, 184, 0.14) 0 1px, transparent 1px 24px),
        linear-gradient(180deg, transparent, rgba(6, 26, 22, 0.2));
}

.public-home .home-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 3.2rem;
}

.public-home .hero-copy {
    max-width: 720px;
    min-width: 0;
}

.public-home .hero-eyebrow {
    color: #d9ad59;
    letter-spacing: 0.08em;
}

.public-home .eyebrow-line {
    background: #d9ad59;
}

.public-home .hero-title {
    max-width: 780px;
    margin-top: 1.1rem;
    font-size: 3.35rem;
    line-height: 1.18;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.public-home .hero-title span {
    display: block;
}

.public-home .hero-sub {
    max-width: 650px;
    margin-top: 1.35rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.public-home .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.public-home .btn {
    border-radius: 8px;
}

.public-home .hero-primary {
    background: #e2b65d;
    color: #17372e;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.public-home .hero-primary:hover {
    background: #efc66e;
}

.public-home .btn-quiet {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
}

.public-home .btn-quiet:hover {
    background: rgba(255, 255, 255, 0.14);
}

.public-home .home-snapshot {
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    padding: 1.2rem;
    background: rgba(7, 30, 26, 0.42);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px);
}

.public-home .snapshot-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.public-home .snapshot-head span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.public-home .snapshot-head strong {
    color: #f3d07f;
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 0.9;
    font-variant-numeric: tabular-nums;
}

.public-home .snapshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.public-home .snapshot-item,
.public-home .snapshot-feature {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.public-home .snapshot-item {
    padding: 0.9rem;
}

.public-home .snapshot-item span,
.public-home .snapshot-feature span {
    display: block;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
}

.public-home .snapshot-item strong {
    display: block;
    margin-top: 0.25rem;
    color: #fff7dc;
    font-size: 1.05rem;
}

.public-home .snapshot-feature {
    margin-top: 0.75rem;
    padding: 1rem;
}

.public-home .snapshot-feature strong {
    display: block;
    margin-top: 0.28rem;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.public-home .snapshot-feature small {
    display: block;
    margin-top: 0.35rem;
    color: #f3d07f;
    font-size: 0.82rem;
}

.public-home .snapshot-flow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
}

.public-home .snapshot-flow li {
    min-height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(226, 182, 93, 0.14);
    color: #ffedbd;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
}

.public-home .home-search-section {
    position: relative;
    z-index: 3;
    background: transparent;
}

.public-home .search-bar {
    display: grid;
    grid-template-columns: 1.2fr 2fr minmax(150px, 0.75fr) minmax(150px, 0.75fr) auto;
    align-items: end;
    gap: 0.85rem;
    margin-top: -3.85rem;
    padding: 1rem;
    border: 1px solid rgba(38, 71, 62, 0.13);
    border-radius: 8px;
    background: rgba(255, 254, 249, 0.96);
    box-shadow: 0 22px 48px rgba(34, 48, 43, 0.15);
    backdrop-filter: blur(12px);
}

.public-home .search-intro {
    min-height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    padding: 0 1rem 0 0.15rem;
    border-right: 1px solid rgba(38, 71, 62, 0.12);
}

.public-home .search-intro span {
    color: var(--home-copper);
    font-size: 0.78rem;
    font-weight: 800;
}

.public-home .search-intro strong {
    color: var(--home-ink);
    font-size: 1rem;
    line-height: 1.45;
}

.public-home .field label {
    color: rgba(24, 48, 43, 0.72);
    letter-spacing: 0.04em;
}

.public-home .field input,
.public-home .field select {
    min-height: 48px;
    border-radius: 8px;
    border-color: rgba(34, 72, 61, 0.16);
    background: #fffdfa;
}

.public-home .field input:focus,
.public-home .field select:focus {
    border-color: rgba(72, 106, 120, 0.6);
    box-shadow: 0 0 0 3px rgba(72, 106, 120, 0.12);
}

.public-home .search-btn {
    min-height: 48px;
    padding-inline: 1.15rem;
    background: var(--home-forest);
}

.public-home .search-btn:hover {
    background: var(--home-forest-2);
}

.public-home .home-jobs-section {
    padding: 4.2rem 0 4.7rem;
}

.public-home .jobs-head {
    align-items: end;
    margin-bottom: 1.4rem;
}

.public-home .section-kicker {
    margin: 0 0 0.35rem;
    color: var(--home-copper);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-home .section-title {
    color: var(--home-ink);
    letter-spacing: 0;
}

.public-home .jobs-count {
    color: rgba(24, 48, 43, 0.62);
}

.public-home .jobs-count strong {
    color: var(--home-forest);
    font-size: 1.25rem;
}

.public-home .clear-filter {
    color: var(--home-blue);
}

.public-home .job-grid {
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 1.1rem;
}

.public-home .job-card {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(38, 71, 62, 0.12);
    background: rgba(255, 254, 249, 0.92);
    box-shadow: 0 16px 34px rgba(35, 47, 42, 0.08);
}

.public-home .job-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #d2a34f, var(--home-blue));
    opacity: 0.9;
}

.public-home .job-card:hover {
    transform: translateY(-4px);
    border-color: rgba(72, 106, 120, 0.26);
    box-shadow: 0 22px 45px rgba(35, 47, 42, 0.12);
}

.public-home .job-card-media {
    height: 150px;
    margin: 0 0 1rem;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(72, 106, 120, 0.12), rgba(210, 163, 79, 0.16)),
        #edf3ef;
}

.public-home .job-card-media-empty {
    border: 1px solid rgba(35, 82, 69, 0.1);
}

.public-home .media-empty-mark {
    width: 62px;
    height: 62px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    color: rgba(15, 53, 43, 0.24);
    font-size: 2rem;
}

.public-home .job-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.public-home .job-dept {
    margin: 0;
    color: var(--home-copper);
    letter-spacing: 0.04em;
}

.public-home .chip-type {
    border-color: rgba(72, 106, 120, 0.2);
    background: rgba(72, 106, 120, 0.1);
    color: var(--home-blue);
}

.public-home .job-title {
    color: var(--home-ink);
    letter-spacing: 0;
}

.public-home .job-desc {
    min-height: 3.2rem;
    color: rgba(24, 48, 43, 0.68);
}

.public-home .job-meta {
    color: rgba(24, 48, 43, 0.72);
}

.public-home .job-meta svg {
    color: var(--home-blue);
}

.public-home .job-meta li:nth-child(2) span {
    color: var(--home-copper);
}

.public-home .job-foot {
    border-top-color: rgba(38, 71, 62, 0.11);
}

.public-home .job-more {
    color: var(--home-forest);
}

.public-home .empty-state {
    border-radius: 8px;
    border-color: rgba(38, 71, 62, 0.12);
    background: rgba(255, 254, 249, 0.9);
}

.public-home .site-footer {
    border-top: 3px solid #d2a34f;
    background: #0d2e25;
}

@media (max-width: 980px) {
    .public-home .home-hero {
        padding: 4.4rem 0 6.6rem;
    }

    .public-home .home-hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .public-home .hero-title {
        font-size: 2.85rem;
    }

    .public-home .home-snapshot {
        max-width: 620px;
    }

    .public-home .search-bar {
        grid-template-columns: 1fr 1fr;
    }

    .public-home .search-intro,
    .public-home .field-grow,
    .public-home .search-btn {
        grid-column: 1 / -1;
    }

    .public-home .search-intro {
        min-height: auto;
        padding: 0 0 0.85rem;
        border-right: 0;
        border-bottom: 1px solid rgba(38, 71, 62, 0.12);
    }
}

@media (max-width: 640px) {
    .public-home .home-hero {
        padding: 3.25rem 0 5.5rem;
    }

    .public-home .home-hero::before {
        right: -2.2rem;
        top: 8.8rem;
        bottom: auto;
        font-size: 5.8rem;
        transform: none;
        -webkit-text-stroke-color: rgba(226, 182, 93, 0.1);
    }

    .public-home .hero-title {
        font-size: 1.85rem;
        line-height: 1.25;
        word-break: break-all;
    }

    .public-home .hero-sub {
        font-size: 0.95rem;
    }

    .public-home .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .public-home .hero-actions .btn {
        width: 100%;
        white-space: normal;
        text-align: center;
    }

    .public-home .snapshot-grid,
    .public-home .snapshot-flow,
    .public-home .search-bar {
        grid-template-columns: 1fr;
    }

    .public-home .snapshot-head strong {
        font-size: 2.5rem;
    }

    .public-home .search-bar {
        margin-top: -3rem;
        padding: 0.9rem;
    }

    .public-home .home-jobs-section {
        padding-top: 3rem;
    }

    .public-home .jobs-head {
        align-items: flex-start;
    }

    .public-home .job-grid {
        grid-template-columns: 1fr;
    }

    .public-home .job-card {
        padding: 0.9rem;
    }

    .public-home .job-card-media {
        height: 132px;
    }
}
