/* ============================================================
   Engawa Design System — JobQC.com
   Japanese-inspired: wabi-sabi, ma, kanso, shibui
   ============================================================ */

/* --- Self-hosted Fonts --- */
@font-face {
    font-family: 'Libre Baskerville';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/libre-baskerville-v14-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Libre Baskerville';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/libre-baskerville-v14-latin-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/source-sans-3-v15-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/source-sans-3-v15-latin-600.woff2') format('woff2');
}

/* --- Design Tokens --- */
:root {
    /* Palette */
    --hinoki-50:  #FAF8F5;
    --hinoki-100: #F5EDE0;
    --hinoki-200: #E8DCC8;
    --kuri-700:   #5A4530;
    --kuri-800:   #4A3728;
    --sugi-500:   #8B7355;
    --ruri-200:   #B0BFDD;
    --ruri-500:   #003399;
    --ruri-700:   #002266;
    --take-500:   #4A5B52;
    --take-100:   #E8F0EB;
    --asagi-500:  #4A7080;
    --shiro:      #FDFBF7;

    /* Typography */
    --font-display: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --font-body:    'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing (Ma) */
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  20px;
    --space-6:  24px;
    --space-8:  32px;
    --space-10: 40px;
    --space-12: 48px;

    /* Layout */
    --container-max:     1320px;
    --container-padding: var(--space-6);

    /* Shadows (warm, organic — never pure black) */
    --shadow-card: 0 1px 3px rgba(74, 55, 40, 0.06), 0 4px 12px rgba(74, 55, 40, 0.04);
    --shadow-hover: 0 0 60px rgba(253, 251, 247, 0.8), 0 20px 40px rgba(74, 55, 40, 0.12);

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    /* Borders */
    --border-light: 1px solid var(--hinoki-200);

    /* Motion */
    --ease-gentle: cubic-bezier(0.25, 0.1, 0.25, 1);
    --duration-normal: 250ms;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
input, button { font: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* --- Base --- */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    /* Semantic aliases — resolved here so [data-season] token overrides cascade correctly */
    --bg-page:    var(--hinoki-50);
    --bg-card:    var(--shiro);
    --text-primary:   var(--kuri-800);
    --text-secondary: var(--sugi-500);
    --color-action:       var(--ruri-500);
    --color-action-hover: var(--ruri-700);
    --color-link:   var(--asagi-500);
    --color-badge:  var(--take-500);
    --bg-badge:     var(--take-100);

    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* --- Header --- */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--hinoki-200);
    padding: var(--space-4) 0;
}

.header-top {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.site-logo {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.site-logo .logo-o {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.3em;
    display: inline-block;
    margin: 0 -0.23em;
}

.site-logo .logo-accent {
    color: var(--color-action);
}

/* Header nav — desktop only */
.header-nav {
    display: none;
    align-items: center;
    gap: var(--space-5);
    margin-left: auto;
}

.header-nav-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color var(--duration-normal) var(--ease-gentle);
    white-space: nowrap;
}

.header-nav-link:hover {
    color: var(--color-action);
}

.header-nav-link--cta {
    color: var(--shiro);
    background: var(--color-action);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    transition: background var(--duration-normal) var(--ease-gentle);
}

.header-nav-link--cta:hover {
    color: var(--shiro);
    background: var(--color-action-hover);
}

/* Hamburger button — mobile only */
.hamburger-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: var(--space-2);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background var(--duration-normal) var(--ease-gentle);
}

.hamburger-btn:hover {
    background: var(--hinoki-100);
}

/* Seasonal scene — decorative animation between logo and nav */
.seasonal-scene {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 180px;
    height: 44px;
    overflow: hidden;
    opacity: 0.25;
    color: var(--sugi-500);
    pointer-events: none;
}

.seasonal-scene svg {
    width: 100%;
    height: 100%;
}

/* --- Search Form --- */
.search-form {
    max-width: var(--container-max);
    margin: var(--space-4) auto 0;
    padding: 0 var(--container-padding);
}

.search-row-keyword {
    display: flex;
}

.search-input {
    height: 44px;
    padding: 0 var(--space-4);
    border: 1px solid var(--hinoki-200);
    border-radius: var(--radius-sm);
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color var(--duration-normal) var(--ease-gentle);
    width: 100%;
}

.search-input:focus {
    border-color: var(--color-link);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-input--keyword {
    flex: 1;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: none;
}

.search-submit {
    padding: 0 var(--space-4);
    height: 44px;
    border: 1px solid var(--color-action);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--color-action);
    color: var(--shiro);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background var(--duration-normal) var(--ease-gentle);
}

.search-submit:hover {
    background: var(--color-action-hover);
}

/* Filter row */
.search-row-filters {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
    align-items: center;
}

.filter-city {
    flex: 1;
    min-width: 0;
}

.filter-region {
    flex: 1;
    min-width: 0;
}

.search-select {
    height: 44px;
    width: 100%;
    padding: 0 var(--space-4);
    border: 1px solid var(--hinoki-200);
    border-radius: var(--radius-sm);
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-body);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238B7355' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    transition: border-color var(--duration-normal) var(--ease-gentle);
}

.search-select:focus {
    border-color: var(--color-link);
}

/* Remote toggle switch */
.filter-remote {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    white-space: nowrap;
    padding: 0 var(--space-2);
    height: 44px;
    flex-shrink: 0;
}

.remote-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.remote-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    background: var(--hinoki-200);
    border-radius: 10px;
    flex-shrink: 0;
    transition: background var(--duration-normal) var(--ease-gentle);
}

.remote-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--shiro);
    border-radius: 50%;
    transition: transform var(--duration-normal) var(--ease-gentle);
    box-shadow: 0 1px 3px rgba(74, 55, 40, 0.15);
}

.remote-checkbox:checked + .remote-toggle {
    background: var(--color-action);
}

.remote-checkbox:checked + .remote-toggle::after {
    transform: translateX(16px);
}

.remote-checkbox:focus-visible + .remote-toggle {
    outline: 2px solid var(--color-link);
    outline-offset: 2px;
}

.remote-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.remote-hint {
    display: none;
    font-weight: 400;
    font-size: 12px;
}

/* Category select — mobile only (hidden on desktop via media query) */
.filter-category-mobile {
    flex: 1;
    min-width: 0;
}

/* --- Hamburger Drawer --- */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(74, 55, 40, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--ease-gentle),
                visibility var(--duration-normal);
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: var(--bg-card);
    z-index: 901;
    transform: translateX(100%);
    transition: transform var(--duration-normal) var(--ease-gentle);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(74, 55, 40, 0.1);
}

.drawer-open .drawer-overlay {
    opacity: 1;
    visibility: visible;
}

.drawer-open .drawer {
    transform: translateX(0);
}

body.drawer-open {
    overflow: hidden;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--hinoki-200);
}

.drawer-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.drawer-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-2);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: color var(--duration-normal) var(--ease-gentle),
                background var(--duration-normal) var(--ease-gentle);
}

.drawer-close:hover {
    color: var(--text-primary);
    background: var(--hinoki-100);
}

.drawer-nav {
    padding: var(--space-4) 0;
    flex: 1;
    overflow-y: auto;
}

.drawer-link {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 var(--space-6);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    transition: background var(--duration-normal) var(--ease-gentle);
}

.drawer-link:hover {
    background: var(--hinoki-50);
}

.drawer-link--secondary {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
}

.drawer-divider {
    height: 1px;
    background: var(--hinoki-200);
    margin: var(--space-3) var(--space-6);
}

/* --- Filter Sheet Button (mobile only) --- */
.filter-sheet-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    height: 44px;
    padding: 0 var(--space-4);
    border: 1px solid var(--hinoki-200);
    border-radius: var(--radius-sm);
    background: var(--bg-page);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color var(--duration-normal) var(--ease-gentle),
                color var(--duration-normal) var(--ease-gentle);
}

.filter-sheet-btn:hover {
    border-color: var(--color-action);
    color: var(--color-action);
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--color-action);
    color: var(--shiro);
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
}

/* --- Filter Bottom Sheet --- */
.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(74, 55, 40, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--ease-gentle),
                visibility var(--duration-normal);
}

.filter-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    background: var(--bg-card);
    z-index: 901;
    transform: translateY(100%);
    transition: transform var(--duration-normal) var(--ease-gentle);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(74, 55, 40, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sheet-open .sheet-overlay {
    opacity: 1;
    visibility: visible;
}

.sheet-open .filter-sheet {
    transform: translateY(0);
}

body.sheet-open {
    overflow: hidden;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--hinoki-200);
    flex-shrink: 0;
}

.sheet-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.sheet-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-2);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: color var(--duration-normal) var(--ease-gentle),
                background var(--duration-normal) var(--ease-gentle);
}

.sheet-close:hover {
    color: var(--text-primary);
    background: var(--hinoki-100);
}

.sheet-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sheet-section {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--hinoki-200);
}

.sheet-section:last-of-type {
    border-bottom: none;
}

.sheet-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-3);
}

.sheet-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.sheet-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-body);
    color: var(--text-secondary);
    background: var(--bg-page);
    border: 1px solid var(--hinoki-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: color var(--duration-normal) var(--ease-gentle),
                background var(--duration-normal) var(--ease-gentle),
                border-color var(--duration-normal) var(--ease-gentle);
}

.sheet-pill:hover {
    color: var(--text-primary);
    border-color: var(--sugi-500);
}

.sheet-pill--active {
    color: var(--color-action);
    background: var(--shiro);
    border-color: var(--color-action);
}

.sheet-pill--active:hover {
    background: var(--hinoki-50);
    border-color: var(--color-action-hover);
    color: var(--color-action-hover);
}

.sheet-pill-count {
    font-size: 11px;
    opacity: 0.7;
}

/* Salary slider */
.sheet-slider {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.sheet-slider input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--hinoki-200);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.sheet-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-action);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(74, 55, 40, 0.2);
}

.sheet-slider input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-action);
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(74, 55, 40, 0.2);
}

.sheet-slider input[type="range"]:focus-visible::-webkit-slider-thumb {
    outline: 2px solid var(--color-link);
    outline-offset: 2px;
}

.sheet-slider-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.sheet-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    min-height: 44px;
}

.sheet-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sheet-toggle-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.sheet-toggle input:focus-visible + .remote-toggle {
    outline: 2px solid var(--color-link);
    outline-offset: 2px;
}

.sheet-toggle input:checked + .remote-toggle {
    background: var(--color-action);
}

.sheet-toggle input:checked + .remote-toggle::after {
    transform: translateX(16px);
}

.sheet-footer {
    padding: var(--space-4) var(--space-6);
    flex-shrink: 0;
}

.sheet-apply {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-6);
    background: var(--color-action);
    color: var(--shiro);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    text-align: center;
    transition: background var(--duration-normal) var(--ease-gentle);
}

.sheet-apply:hover {
    background: var(--color-action-hover);
}

/* --- Login Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(74, 55, 40, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--ease-gentle),
                visibility var(--duration-normal);
}

.login-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: 420px;
    max-width: calc(100vw - 32px);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 40px rgba(74, 55, 40, 0.18);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--ease-gentle),
                visibility var(--duration-normal),
                transform var(--duration-normal) var(--ease-gentle);
}

body.modal-open .modal-overlay {
    opacity: 1;
    visibility: visible;
}

body.modal-open .login-modal {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

body.modal-open {
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--hinoki-200);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-2);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: color var(--duration-normal) var(--ease-gentle),
                background var(--duration-normal) var(--ease-gentle);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--hinoki-100);
}

.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--hinoki-200);
}

.modal-tab {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--duration-normal) var(--ease-gentle),
                border-color var(--duration-normal) var(--ease-gentle);
}

.modal-tab:hover {
    color: var(--text-primary);
}

.modal-tab--active {
    color: var(--color-action);
    border-bottom-color: var(--color-action);
}

.modal-body {
    padding: var(--space-6);
}

.modal-tab-content {
    display: none;
    flex-direction: column;
    gap: var(--space-3);
}

.modal-tab-content--active {
    display: flex;
}

.modal-input {
    height: 44px;
    padding: 0 var(--space-4);
    border: 1px solid var(--hinoki-200);
    border-radius: var(--radius-sm);
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color var(--duration-normal) var(--ease-gentle);
    width: 100%;
}

.modal-input:focus {
    border-color: var(--color-link);
}

.modal-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.modal-submit {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-6);
    background: var(--color-action);
    color: var(--shiro);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    text-align: center;
    margin-top: var(--space-2);
    transition: background var(--duration-normal) var(--ease-gentle);
}

.modal-submit:hover {
    background: var(--color-action-hover);
}

.modal-link {
    font-size: 13px;
    color: var(--color-link);
    text-align: center;
    transition: color var(--duration-normal) var(--ease-gentle);
}

.modal-link:hover {
    color: var(--color-action);
}

.modal-signup {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--hinoki-200);
}

/* --- Utility: Screen Reader Only --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Category Pills (desktop only) --- */
.category-pills {
    display: none;
    flex-wrap: nowrap;
    gap: var(--space-2);
    margin-top: var(--space-2);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--hinoki-200);
    overflow: visible;
    align-items: center;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    white-space: nowrap;
    transition: color var(--duration-normal) var(--ease-gentle),
                background var(--duration-normal) var(--ease-gentle);
}

.category-pill:hover {
    color: var(--text-primary);
    background: var(--hinoki-100);
}

.category-pill--active {
    color: var(--color-action);
    background: var(--shiro);
    border-color: var(--color-action);
}

.category-pill--active:hover {
    background: var(--hinoki-50);
    color: var(--color-action-hover);
}

.category-pill-count {
    font-size: 11px;
    opacity: 0.7;
}

.category-pill--active .category-pill-count {
    opacity: 0.8;
}

/* Category "Plus" dropdown */
.category-more {
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
}

.category-more__toggle {
    cursor: pointer;
}

.category-more__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--hinoki-200);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(74, 55, 40, 0.15);
    z-index: 100;
    padding: var(--space-2) 0;
}

.category-more.is-open .category-more__dropdown {
    display: block;
}

.category-more__item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: 14px;
    color: var(--text-secondary);
    transition: background var(--duration-normal) var(--ease-gentle),
                color var(--duration-normal) var(--ease-gentle);
}

.category-more__item:hover {
    background: var(--hinoki-50);
    color: var(--text-primary);
}

.category-more__item--active {
    color: var(--color-action);
    font-weight: 600;
}

.category-more__count {
    font-size: 11px;
    opacity: 0.7;
}

/* --- Main Content --- */
main {
    flex: 1;
    padding: var(--space-10) 0;
}

/* --- Stats Line --- */
.stats-line {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
}

.stats-line strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* --- Job Grid --- */
.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-12);
    margin-bottom: var(--space-10);
}

/* --- Job Card --- */
.job-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: transform var(--duration-normal) var(--ease-gentle),
                box-shadow var(--duration-normal) var(--ease-gentle);
}

/* Wabi-sabi: subtle rotation — organic, not mechanical */
.job-card:nth-child(7n+1) { transform: rotate(-0.5deg); }
.job-card:nth-child(7n+2) { transform: rotate(0.35deg); }
.job-card:nth-child(7n+3) { transform: rotate(-0.25deg); }
.job-card:nth-child(7n+4) { transform: rotate(0.45deg); }
.job-card:nth-child(7n+5) { transform: rotate(-0.3deg); }
.job-card:nth-child(7n+6) { transform: rotate(0.2deg); }
.job-card:nth-child(7n+7) { transform: rotate(-0.4deg); }

/* Shibui: lantern glow on hover */
.job-card:hover {
    transform: rotate(0deg) translateY(-6px);
    box-shadow: var(--shadow-hover);
}

/* Shibui: watermark reveals on hover */
.job-card:hover .job-card-category-icon {
    opacity: 0.08;
}

.job-card-body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: 28px 32px;
    color: inherit;
}

.job-card-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
}

/* Stretched link — entire card is clickable */
.job-card-title a {
    color: inherit;
}

.job-card-title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.job-card-company {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: calc(-1 * var(--space-2));
}

.job-card-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: 0.55;
    border-radius: 2px;
    flex-shrink: 0;
    filter: grayscale(20%);
    transition: opacity var(--duration-normal) var(--ease-gentle), filter var(--duration-normal) var(--ease-gentle);
}

.job-card:hover .job-card-logo {
    opacity: 0.85;
    filter: grayscale(0%);
}

.job-card-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Work mode markers */
.work-mode--remote { color: #70A888; }
.work-mode--hybrid { color: #8878A8; }

.job-card-category-icon {
    position: absolute;
    bottom: var(--space-5);
    right: var(--space-6);
    width: 88px;
    height: 88px;
    opacity: 0.04;
    color: var(--kuri-700);
    pointer-events: none;
    transition: opacity var(--duration-normal) var(--ease-gentle);
}

.job-card-category-icon svg {
    width: 100%;
    height: 100%;
}

.job-card-salary {
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--color-action);
}

.job-card-salary--estimated {
    position: relative;
    z-index: 2;
    color: var(--text-secondary);
    cursor: help;
}

.salary-hint-text {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    white-space: nowrap;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    pointer-events: none;
}

.job-card-salary--estimated:hover .salary-hint-text,
.job-card-salary--estimated:focus .salary-hint-text {
    display: block;
}

.job-card-date {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
    text-align: right;
    margin-top: auto;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-12);
    margin-bottom: var(--space-6);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
}

.pagination a {
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--hinoki-200);
    transition: color var(--duration-normal) var(--ease-gentle),
                border-color var(--duration-normal) var(--ease-gentle);
}

.pagination a:hover {
    color: var(--color-action);
    border-color: var(--color-action);
}

.pagination .current {
    background: var(--color-action);
    color: var(--shiro);
    border: 1px solid var(--color-action);
}

.pagination .ellipsis {
    border: none;
    background: none;
    color: var(--text-secondary);
    min-width: auto;
}

/* --- Nearby Alert --- */
.nearby-alert {
    margin: 0 0 var(--space-4);
    padding: var(--space-3) var(--space-5);
    background: var(--hinoki-100);
    border-left: 3px solid var(--ruri-500);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.nearby-alert p {
    margin: 0;
}

/* --- No Results --- */
.no-results {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    color: var(--text-secondary);
    font-size: 17px;
}

/* --- Skip Link (accessibility) --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    background: var(--color-action);
    color: var(--shiro);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    z-index: 100;
}

.skip-link:focus {
    top: var(--space-2);
}

/* --- Footer --- */
.site-footer {
    background: var(--kuri-800);
    color: var(--hinoki-100);
    margin-top: auto;
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-12) var(--container-padding) var(--space-6);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-8);
}

.footer-brand-name {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--shiro);
}

.footer-brand-name .logo-o {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.3em;
    display: inline-block;
    margin: 0 -0.23em;
}

.footer-brand-name .logo-accent {
    color: var(--ruri-200);
}

.footer-tagline {
    font-size: 14px;
    color: var(--hinoki-200);
    margin-top: var(--space-2);
    line-height: 1.5;
}

.footer-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hinoki-200);
    margin-bottom: var(--space-3);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.footer-link {
    font-size: 14px;
    color: var(--hinoki-100);
    transition: color var(--duration-normal) var(--ease-gentle);
}

.footer-link:hover {
    color: var(--shiro);
}

.footer-regions {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--space-8);
    padding-top: var(--space-6);
}

.footer-region-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
    margin-top: var(--space-3);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--space-8);
    padding-top: var(--space-5);
    font-size: 13px;
    color: var(--hinoki-200);
}

/* --- Prose Links (restore affordance for unclassed links in content) --- */
main a:not([class]) {
    color: var(--color-link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

main a:not([class]):hover {
    color: var(--color-action);
}

/* --- Focus Visible --- */
:focus-visible {
    outline: 2px solid var(--color-link);
    outline-offset: 2px;
}

/* --- Seasonal Animations --- */
@keyframes snowfall {
    0%   { transform: translateY(-10px) translateX(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(60px) translateX(8px); opacity: 0; }
}

@keyframes petalfall {
    0%   { transform: translateY(-10px) translateX(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    50%  { transform: translateY(25px) translateX(12px) rotate(180deg); }
    90%  { opacity: 1; }
    100% { transform: translateY(60px) translateX(-4px) rotate(360deg); opacity: 0; }
}

@keyframes firefly {
    0%, 100% { opacity: 0; }
    30%      { opacity: 1; }
    50%      { opacity: 0.4; }
    70%      { opacity: 1; }
}

@keyframes leaffall {
    0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    50%  { transform: translateY(20px) translateX(8px) rotate(15deg); }
    100% { transform: translateY(44px) translateX(-3px) rotate(-10deg); opacity: 0; }
}

.snowflake { animation: snowfall 6s linear infinite; }
.petal     { animation: petalfall 7s ease-in-out infinite; }
.firefly   { animation: firefly 4s ease-in-out infinite; }
.leaf      { animation: leaffall 8s ease-in-out infinite; }

/* --- Legal Pages --- */
.legal-page {
    max-width: 720px;
}

.legal-page h1 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--space-4);
    margin-bottom: var(--space-2);
}

.legal-updated {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--space-10);
}

.legal-page h2 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

.legal-page h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--space-5);
    margin-bottom: var(--space-2);
}

.legal-page p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.legal-page ul {
    margin-bottom: var(--space-3);
    padding-left: var(--space-6);
}

.legal-page li {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    list-style: disc;
}

.legal-page code {
    font-size: 13px;
    background: var(--hinoki-100);
    padding: 1px 5px;
    border-radius: 3px;
}

/* --- Toast --- */
.toast {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% + var(--space-6)));
    background: var(--kuri-800);
    color: var(--hinoki-100);
    font-size: 14px;
    font-weight: 500;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(74, 55, 40, 0.2);
    white-space: nowrap;
    z-index: 2000;
    opacity: 0;
    transition: transform var(--duration-normal) var(--ease-gentle),
                opacity var(--duration-normal) var(--ease-gentle);
    pointer-events: none;
}

.toast--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* --- Publier une offre (employer landing) --- */
.publier-hero {
    text-align: center;
    padding: var(--space-12) 0 var(--space-10);
}

.publier-heading {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.publier-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    margin-top: var(--space-3);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.publier-hero .publier-cta-btn {
    margin-top: var(--space-6);
}

.publier-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-12);
}

.publier-feature {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: var(--space-8) var(--space-6);
    text-align: center;
}

.publier-feature-icon {
    color: var(--color-action);
    margin-bottom: var(--space-4);
}

.publier-feature-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.publier-feature-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Section headings (pricing, AI) */
.publier-section-heading {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.publier-section-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: var(--space-2);
    margin-bottom: var(--space-8);
}

/* Pricing section */
.publier-pricing-section {
    margin-bottom: var(--space-12);
}

.publier-pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    align-items: start;
}

.publier-plan {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--hinoki-200);
    border-radius: var(--radius-md);
    padding: var(--space-8) var(--space-6);
    display: flex;
    flex-direction: column;
}

.publier-plan--featured {
    border-color: var(--color-action);
    border-width: 2px;
    box-shadow: var(--shadow-card);
}

.publier-plan-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-action);
    color: var(--shiro);
    font-size: 12px;
    font-weight: 600;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.publier-plan-header {
    text-align: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--hinoki-200);
}

.publier-plan-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.publier-plan-price {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.publier-plan-currency {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
}

.publier-plan-features {
    flex: 1;
    margin-bottom: var(--space-6);
}

.publier-check {
    position: relative;
    padding-left: var(--space-6);
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: var(--space-2);
}

.publier-check::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23003399' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.publier-plan-cta {
    display: block;
    text-align: center;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-action);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-action);
    transition: background var(--duration-normal) var(--ease-gentle),
                color var(--duration-normal) var(--ease-gentle);
}

.publier-plan-cta:hover {
    background: var(--color-action);
    color: var(--shiro);
}

.publier-plan-cta--featured {
    background: var(--color-action);
    color: var(--shiro);
}

.publier-plan-cta--featured:hover {
    background: var(--color-action-hover);
}

/* AI section */
.publier-ai {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
    align-items: start;
    margin-bottom: var(--space-12);
    padding: var(--space-10) var(--space-8);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.publier-ai .publier-section-heading {
    text-align: left;
}

.publier-ai-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: var(--space-3);
}

.publier-ai-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.publier-ai-item-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.publier-ai-item-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Bottom CTA */
.publier-cta {
    text-align: center;
    padding: var(--space-8) 0 var(--space-12);
}

.publier-cta-btn {
    display: inline-block;
    padding: var(--space-3) var(--space-8);
    background: var(--color-action);
    color: var(--shiro);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    transition: background var(--duration-normal) var(--ease-gentle);
}

.publier-cta-btn:hover {
    background: var(--color-action-hover);
    color: var(--shiro);
}

.publier-cta-login {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: var(--space-4);
}

.publier-cta-login a {
    color: var(--color-link);
    transition: color var(--duration-normal) var(--ease-gentle);
}

.publier-cta-login a:hover {
    color: var(--color-action);
}

/* Publier — responsive */
@media (max-width: 768px) {
    .publier-pricing {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .publier-ai {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .publier-ai .publier-section-heading {
        text-align: center;
    }

    .publier-ai-desc {
        text-align: center;
    }
}

@media (max-width: 640px) {
    .publier-features {
        grid-template-columns: 1fr;
    }

    .publier-heading {
        font-size: 24px;
    }

    .publier-ai {
        padding: var(--space-6) var(--space-5);
    }
}

/* --- Job Detail Page --- */

/* Breadcrumbs */
.breadcrumbs {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    padding: var(--space-6) 0 var(--space-1);
}

.breadcrumbs__link {
    color: var(--color-link);
    transition: color var(--duration-normal) var(--ease-gentle);
}

.breadcrumbs__link:hover {
    color: var(--color-action);
}

.breadcrumbs__sep {
    margin: 0 var(--space-2);
    color: var(--hinoki-200);
    user-select: none;
}

.breadcrumbs__current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Layout — two-column grid */
.job-detail__layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-10);
    align-items: start;
}

/* Job header */
.job-header {
    padding-bottom: var(--space-6);
    border-bottom: var(--border-light);
    margin-bottom: var(--space-8);
}

.job-header__top {
    display: flex;
    align-items: flex-start;
    gap: var(--space-5);
    margin-bottom: var(--space-5);
}

.job-header__logo {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
}

.job-header__logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--hinoki-50);
}

.job-header__logo-placeholder {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--shiro);
}

.job-header__info {
    min-width: 0;
}

.job-header__company {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
    letter-spacing: 0.01em;
}

.job-header__title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

/* Meta line — location, salary, date */
.job-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: center;
    margin-bottom: var(--space-4);
}

.job-header__meta-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.job-header__meta-icon {
    flex-shrink: 0;
    color: var(--sugi-500);
    opacity: 0.7;
}

.job-header__meta-item--estimated {
    position: relative;
    cursor: help;
}

/* Tags — job type, work mode, category */
.job-header__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.job-tag {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-badge);
    background: var(--bg-badge);
    border-radius: var(--radius-sm);
}

.job-tag--remote  { color: #4A7A58; background: #E8F0EB; }
.job-tag--hybrid  { color: #6B5A8A; background: #F0EBF5; }
.job-tag--category { color: var(--text-secondary); background: var(--hinoki-100); }

/* Prose content — sanitized HTML descriptions */
.job-content {
    line-height: 1.75;
    font-size: 15px;
    color: var(--text-primary);
}

.job-content h1,
.job-content h2 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
    line-height: 1.35;
}

.job-content h1 { font-size: 22px; }
.job-content h2 { font-size: 19px; }

.job-content h3 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-top: var(--space-6);
    margin-bottom: var(--space-2);
}

.job-content h4,
.job-content h5,
.job-content h6 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-top: var(--space-5);
    margin-bottom: var(--space-2);
}

.job-content p {
    margin-bottom: var(--space-4);
}

.job-content p:last-child {
    margin-bottom: 0;
}

.job-content ul,
.job-content ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

.job-content li {
    margin-bottom: var(--space-1);
    line-height: 1.7;
    list-style: disc;
}

.job-content ol li {
    list-style: decimal;
}

.job-content li::marker {
    color: var(--sugi-500);
}

.job-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-5);
    font-size: 14px;
}

.job-content th,
.job-content td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: var(--border-light);
}

.job-content th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--hinoki-50);
}

.job-content tr:last-child td {
    border-bottom: none;
}

.job-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.job-content code {
    font-size: 13px;
    background: var(--hinoki-100);
    padding: 1px 5px;
    border-radius: 3px;
}

.job-content__empty {
    color: var(--text-secondary);
    font-style: italic;
    padding: var(--space-8) 0;
}

/* Apply button */
.btn--apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-4) var(--space-6);
    background: var(--color-action);
    color: var(--shiro);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background var(--duration-normal) var(--ease-gentle),
                transform var(--duration-normal) var(--ease-gentle),
                box-shadow var(--duration-normal) var(--ease-gentle);
}

.btn--apply:hover {
    background: var(--color-action-hover);
    color: var(--shiro);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.2);
}

.btn--apply:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn__icon {
    flex-shrink: 0;
    opacity: 0.8;
}

.btn--lg {
    padding: var(--space-5) var(--space-6);
    font-size: 17px;
}

/* Bottom CTA — visible on all viewports */
.job-apply-bottom {
    padding-top: var(--space-8);
    margin-top: var(--space-8);
    margin-bottom: var(--space-10);
    border-top: var(--border-light);
}

/* Sidebar — apply card (sticky) */
.apply-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: var(--space-6);
    text-align: center;
    position: sticky;
    top: var(--space-6);
}

.apply-card__title {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.apply-card__note {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: var(--space-3);
    line-height: 1.4;
}

/* Sidebar — company card */
.company-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: var(--space-5);
    margin-top: var(--space-5);
}

.company-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.company-card__logo {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.company-card__logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 3px;
}

.company-card__logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--shiro);
}

.company-card__info {
    min-width: 0;
}

.company-card__name {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.company-card__location {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

/* Sidebar — related jobs */
.related-jobs {
    margin-top: var(--space-5);
}

.related-jobs__title {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-3);
}

.related-jobs__list {
    display: flex;
    flex-direction: column;
}

.related-job {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    transition: background var(--duration-normal) var(--ease-gentle);
}

.related-job:hover {
    background: var(--hinoki-50);
}

.related-job + .related-job {
    border-top: var(--border-light);
}

.related-job__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}

.related-job__company {
    font-size: 12px;
    color: var(--text-secondary);
}

.related-job__location {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Job detail — responsive */
@media (max-width: 768px) {
    .job-detail__layout {
        grid-template-columns: 1fr 280px;
        gap: var(--space-6);
    }

    .apply-card {
        position: static;
    }
}

@media (max-width: 640px) {
    .job-detail__layout {
        grid-template-columns: 1fr;
    }

    .job-detail__sidebar {
        margin-top: var(--space-8);
    }

    /* Reorder: move bottom CTA before description on mobile */
    .job-detail__main {
        display: flex;
        flex-direction: column;
    }
    .job-header { order: 1; }
    .job-apply-bottom { order: 2; }
    .job-content { order: 3; }

    .job-apply-bottom {
        border-top: none;
        padding-top: 0;
        margin-top: 0;
        margin-bottom: var(--space-6);
    }

    .job-header__title {
        font-size: 22px;
    }

    .job-header__logo,
    .job-header__logo-img,
    .job-header__logo-placeholder {
        width: 48px;
        height: 48px;
    }

    .job-header__logo-placeholder {
        font-size: 20px;
    }

    .job-header__meta {
        gap: var(--space-3);
    }

    .company-card {
        padding: var(--space-4);
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .job-card { transform: none !important; }
    .job-card:hover { transform: none !important; }
}

/* --- Seasonal Palettes --- */
/* Autumn = :root defaults, no override needed */
[data-season="winter"] {
    --hinoki-50:  #F5F7FA;
    --hinoki-100: #E8EDF5;
    --hinoki-200: #D0D8E8;
    --kuri-700:   #4A4F5A;
    --kuri-800:   #3A3F4D;
    --sugi-500:   #7A8090;
    --shiro:      #F9FAFB;
    --asagi-500:  #4A6880;
    --shadow-card:  0 1px 3px rgba(58, 63, 77, 0.06), 0 4px 12px rgba(58, 63, 77, 0.04);
    --shadow-hover: 0 0 60px rgba(249, 250, 251, 0.8), 0 20px 40px rgba(58, 63, 77, 0.12);
}

[data-season="spring"] {
    --hinoki-50:  #FAF6F5;
    --hinoki-100: #F5E6E0;
    --hinoki-200: #E8D0C8;
    --kuri-700:   #5A4038;
    --kuri-800:   #4A3530;
    --sugi-500:   #8B6B60;
    --shiro:      #FDFAF8;
    --asagi-500:  #7A5A60;
    --shadow-card:  0 1px 3px rgba(74, 53, 48, 0.06), 0 4px 12px rgba(74, 53, 48, 0.04);
    --shadow-hover: 0 0 60px rgba(253, 250, 248, 0.8), 0 20px 40px rgba(74, 53, 48, 0.12);
}

[data-season="summer"] {
    --hinoki-50:  #F5FAF6;
    --hinoki-100: #E5F0E8;
    --hinoki-200: #CCE0D0;
    --kuri-700:   #4A5540;
    --kuri-800:   #3A4535;
    --sugi-500:   #6B8A5E;
    --shiro:      #FAFDF8;
    --asagi-500:  #4A7A58;
    --shadow-card:  0 1px 3px rgba(58, 69, 53, 0.06), 0 4px 12px rgba(58, 69, 53, 0.04);
    --shadow-hover: 0 0 60px rgba(250, 253, 248, 0.8), 0 20px 40px rgba(58, 69, 53, 0.12);
}

/* --- Responsive --- */

/* Desktop: nav visible, hamburger hidden, search inline */
@media (min-width: 769px) {
    .hamburger-btn {
        display: none;
    }

    .header-nav {
        display: flex;
    }

    .search-form {
        display: flex;
        gap: var(--space-3);
        align-items: center;
        margin-top: var(--space-4);
    }

    .search-row-keyword {
        flex: 2;
    }

    .search-row-filters {
        flex: 3;
        margin-top: 0;
    }

    .category-pills {
        display: flex;
    }

    .filter-category-mobile {
        display: none;
    }

    /* Region moved to expandable panel; reorder: city > remote > Autres filtres */
    .filter-region {
        display: none;
    }

    .filter-remote {
        order: 1;
    }

    .filter-sheet-btn {
        display: flex;
        order: 2;
        background: transparent;
        border: 1px solid var(--hinoki-200);
        color: var(--text-secondary);
    }

    .filter-sheet-btn:hover {
        border-color: var(--color-action);
        color: var(--color-action);
    }

    /* Expandable filter panel — sheet restyled as inline row */
    .sheet-overlay {
        display: none !important;
    }

    body.sheet-open {
        overflow: auto;
    }

    .filter-sheet {
        position: static;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
        transform: none;
        display: none;
        border-bottom: 1px solid var(--hinoki-200);
        background: var(--bg-card);
    }

    .sheet-open .filter-sheet {
        display: block;
    }

    .sheet-header {
        display: none;
    }

    .sheet-body {
        display: grid;
        grid-template-columns: 2fr 3fr;
        gap: var(--space-5);
        max-width: var(--container-max);
        margin: 0 auto;
        padding: var(--space-4) var(--container-padding);
    }

    .sheet-section {
        border-bottom: none;
        padding: 0;
    }

    /* Region: full width on its own row */
    .sheet-section:last-child {
        grid-column: 1 / -1;
    }

    .sheet-footer {
        max-width: var(--container-max);
        margin: 0 auto;
        padding: 0 var(--container-padding) var(--space-4);
    }

    .sheet-apply {
        width: auto;
        display: inline-flex;
        padding: var(--space-2) var(--space-6);
    }
}

/* Tablet and below */
@media (max-width: 768px) {
    /* Swap logo and seasonal scene — animation left, logo right */
    .seasonal-scene {
        order: -1;
    }

    .filter-region {
        display: none;
    }

    .search-row-filters {
        flex-wrap: wrap;
    }

    /* Row 2: city + category, each ~50% */
    .filter-city {
        flex: 1 1 calc(50% - 4px);
    }

    .filter-category-mobile {
        flex: 1 1 calc(50% - 4px);
    }

    /* Row 3: remote toggle + sheet-btn, same 50/50 as row 2 */
    .filter-remote {
        flex: 1 1 calc(50% - 4px);
    }

    .filter-sheet-btn {
        display: flex;
        flex: 1 1 calc(50% - 4px);
    }

    /* Category pills hidden on mobile — add breathing room to first content */
    .job-grid,
    .nearby-alert,
    .no-results {
        margin-top: var(--space-2);
    }

    .job-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: var(--space-6);
    }

    main {
        padding: var(--space-6) 0;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Phone */
@media (max-width: 640px) {
    :root {
        --container-padding: var(--space-4);
    }

    .job-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    /* Disable rotation on small screens — keeps cards stable for touch */
    .job-card { transform: none; }
    .job-card:hover { transform: translateY(-4px); }

    .job-card-body {
        padding: var(--space-5) var(--space-5);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .login-modal {
        width: calc(100vw - 32px);
    }
}


/* ==========================================================================
   pSEO Pages — Location & Category+Location
   ========================================================================== */

.pseo-header {
    margin-bottom: var(--space-6);
}

.pseo-header__title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
    line-height: 1.2;
}

.pseo-header__subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

.pseo-results {
    font-size: 14px;
    color: var(--text-secondary);
    padding-bottom: var(--space-4);
    border-bottom: var(--border-light);
    margin: 0 0 var(--space-6) 0;
}

.pseo-empty {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    max-width: 480px;
    margin: 0 auto;
}

.pseo-empty__rule {
    width: 64px;
    height: 0;
    border: none;
    border-top: 1px solid var(--hinoki-200);
    margin: 0 auto var(--space-8);
}

.pseo-empty__message {
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0 0 var(--space-3) 0;
}

.pseo-empty__note {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 var(--space-8) 0;
}

.pseo-empty__actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.btn--outline {
    display: inline-block;
    padding: var(--space-3) var(--space-6);
    border: 1px solid var(--color-action);
    border-radius: var(--radius-md);
    color: var(--color-action);
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}

.btn--outline:hover {
    background-color: var(--color-action);
    color: #fff;
}

.btn--solid {
    display: inline-block;
    padding: var(--space-3) var(--space-6);
    background-color: var(--color-action);
    border: 1px solid var(--color-action);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s;
}

.btn--solid:hover {
    background-color: var(--color-action-hover);
    border-color: var(--color-action-hover);
}

.pseo-seo-section {
    border-top: var(--border-light);
    margin-top: var(--space-10);
    padding-top: var(--space-8);
    padding-bottom: var(--space-12);
    max-width: 720px;
}

.pseo-seo-section__title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-4) 0;
}

.pseo-seo-section__text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 640px) {
    .pseo-header__title {
        font-size: 22px;
    }

    .pseo-empty__actions {
        flex-direction: column;
        align-items: center;
    }

    .btn--outline,
    .btn--solid {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}
