/*
 * Freelancers portal (freelancers.<domain>) — standalone microsite, not the Core
 * shell. Astra values mirrored as LOCAL tokens (light in :root, dark under
 * html.dark); every rule below consumes the tokens, so one rule covers both
 * themes. Background material = the brand's own orbit + star motif (see
 * .frl-texture), never a flat colour.
 */

:root {
    --brand: #4F7CFF;
    --brand-2: #8b5cf6;
    --brand-soft: rgba(79, 124, 255, .12);
    --brand-strong: #3a63e6;
    --cta: linear-gradient(135deg, #4F7CFF, #8b5cf6);
    --bg: #eef1f6;
    --surface: #ffffff;
    --surface-2: #f6f7fb;
    --surface-3: #eceff5;
    --border: #e2e6ee;
    --border-strong: #cdd3df;
    --text: #141824;
    --text-soft: #4a5263;
    --text-muted: #747d8f;
    --success: #16a34a;
    --success-soft: rgba(34, 197, 94, .14);
    --error: #dc2626;
    --error-soft: rgba(239, 68, 68, .12);
    --warning: #b45309;
    --warning-soft: rgba(245, 158, 11, .16);
    --info: #0891b2;
    --info-soft: rgba(6, 182, 212, .13);
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .14);
    --shadow-lg: 0 24px 60px -24px rgba(31, 41, 80, .35);
    --radius: 16px;
    --radius-sm: 10px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --texture-ink: #4F7CFF;
    --texture-ink-2: #8b5cf6;
    --texture-opacity: .16;
    color-scheme: light;
}

html.dark {
    --brand: #6b91ff;
    --brand-soft: rgba(107, 145, 255, .16);
    --brand-strong: #8aa8ff;
    --bg: #0b0d12;
    --surface: #151a23;
    --surface-2: #1a1f2b;
    --surface-3: #222836;
    --border: #262d3b;
    --border-strong: #343c4d;
    --text: #f3f5f9;
    --text-soft: #c2c8d2;
    --text-muted: #8a92a1;
    --success: #4ade80;
    --success-soft: rgba(34, 197, 94, .16);
    --error: #f87171;
    --error-soft: rgba(239, 68, 68, .16);
    --warning: #fbbf24;
    --warning-soft: rgba(245, 158, 11, .16);
    --info: #22d3ee;
    --info-soft: rgba(6, 182, 212, .16);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 70px -28px rgba(0, 0, 0, .75);
    --texture-ink: #6b91ff;
    --texture-ink-2: #a78bfa;
    --texture-opacity: .2;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }

/* ── Background material: orbit rings + four-point stars (brand mark) ── */
.frl-texture {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 520px at 100% -10%, var(--brand-soft), transparent 60%),
        radial-gradient(700px 460px at -10% 110%, rgba(139, 92, 246, .12), transparent 60%);
}

.frl-texture::before,
.frl-texture::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--texture-ink);
    opacity: var(--texture-opacity);
    -webkit-mask-repeat: repeat;
    mask-repeat: repeat;
}

/* Orbits: ellipses tilted like the logo's tail, with a satellite dot. */
.frl-texture::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.4'%3E%3Cellipse cx='110' cy='110' rx='78' ry='30' transform='rotate(-24 110 110)'/%3E%3Cellipse cx='110' cy='110' rx='46' ry='17' transform='rotate(-24 110 110)'/%3E%3C/g%3E%3Ccircle cx='178' cy='80' r='3.2'/%3E%3Ccircle cx='60' cy='136' r='2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.4'%3E%3Cellipse cx='110' cy='110' rx='78' ry='30' transform='rotate(-24 110 110)'/%3E%3Cellipse cx='110' cy='110' rx='46' ry='17' transform='rotate(-24 110 110)'/%3E%3C/g%3E%3Ccircle cx='178' cy='80' r='3.2'/%3E%3Ccircle cx='60' cy='136' r='2'/%3E%3C/svg%3E");
    -webkit-mask-size: 220px 220px;
    mask-size: 220px 220px;
}

/* Stars: offset grid of four-point sparkles, violet ink. */
.frl-texture::after {
    background-color: var(--texture-ink-2);
    opacity: calc(var(--texture-opacity) * 1.4);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cpath d='M30 18 L33 27 L42 30 L33 33 L30 42 L27 33 L18 30 L27 27 Z'/%3E%3Cpath d='M150 160 L152 166 L158 168 L152 170 L150 176 L148 170 L142 168 L148 166 Z'/%3E%3Ccircle cx='196' cy='20' r='1.6'/%3E%3Ccircle cx='96' cy='200' r='1.4'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cpath d='M30 18 L33 27 L42 30 L33 33 L30 42 L27 33 L18 30 L27 27 Z'/%3E%3Cpath d='M150 160 L152 166 L158 168 L152 170 L150 176 L148 170 L142 168 L148 166 Z'/%3E%3Ccircle cx='196' cy='20' r='1.6'/%3E%3Ccircle cx='96' cy='200' r='1.4'/%3E%3C/svg%3E");
    -webkit-mask-size: 220px 220px;
    mask-size: 220px 220px;
    -webkit-mask-position: 110px 40px;
    mask-position: 110px 40px;
}

.frl-topbar, .frl-main, .frl-bottom-nav { position: relative; z-index: 1; }

/* ── Top bar ──────────────────────────────────────────────────────────── */
.frl-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--border);
}

.frl-topbar-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.frl-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.frl-logo { height: 30px; width: auto; display: block; }
html.dark .frl-logo { filter: brightness(1.6) saturate(.9); }

.frl-brand-tag, .frl-auth-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    background: var(--cta);
}

.frl-nav { display: flex; gap: 4px; flex: 1 1 auto; }
.frl-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text-soft);
    font-weight: 600;
    font-size: 14px;
    transition: background .18s var(--ease), color .18s var(--ease);
}
.frl-nav a:hover { color: var(--text); background: var(--surface-2); }
.frl-nav a.is-active { color: var(--brand); background: var(--brand-soft); }

.frl-user { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.frl-user form { margin: 0; }
.frl-user-name { font-weight: 600; font-size: 14px; color: var(--text-soft); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.frl-icon-btn {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
    transition: color .18s var(--ease), border-color .18s var(--ease);
}
.frl-icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.frl-when-dark { display: none; }
html.dark .frl-when-dark { display: inline; }
html.dark .frl-when-light { display: none; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ── Layout ───────────────────────────────────────────────────────────── */
.frl-main { max-width: 1120px; margin: 0 auto; padding: 28px 20px 96px; }

.frl-hero {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 28px 30px;
    color: #fff;
    background: var(--cta);
    box-shadow: var(--shadow-lg);
}
.frl-hero::after {
    /* The same orbit drawn big, as the hero's own material. */
    content: '';
    position: absolute;
    right: -60px;
    top: -70px;
    width: 360px;
    height: 360px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.35' stroke-width='1.2'%3E%3Cellipse cx='100' cy='100' rx='92' ry='36' transform='rotate(-24 100 100)'/%3E%3Cellipse cx='100' cy='100' rx='62' ry='24' transform='rotate(-24 100 100)'/%3E%3Cellipse cx='100' cy='100' rx='34' ry='13' transform='rotate(-24 100 100)'/%3E%3C/g%3E%3Cpath fill='%23ffffff' fill-opacity='.85' d='M100 86 L104 96 L114 100 L104 104 L100 114 L96 104 L86 100 L96 96 Z'/%3E%3Ccircle cx='176' cy='66' r='4' fill='%23ffffff' fill-opacity='.8'/%3E%3C/svg%3E") center/contain no-repeat;
    pointer-events: none;
}
.frl-hero h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.01em; position: relative; z-index: 1; }
.frl-hero p { margin: 0; opacity: .9; max-width: 60ch; position: relative; z-index: 1; }
.frl-hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.frl-hero-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(6px);
}
.frl-hero-stat strong { font-size: 20px; font-weight: 800; }
.frl-hero-stat span { font-size: 13px; opacity: .9; }

.frl-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 32px 0 14px; }
.frl-section-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.frl-section-head a { font-weight: 600; font-size: 14px; }

.frl-back { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--text-soft); margin-bottom: 14px; }
.frl-back:hover { color: var(--brand); }

/* ── Cards ────────────────────────────────────────────────────────────── */
.frl-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.frl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }

.frl-position {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    color: var(--text);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.frl-position:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow-lg); color: var(--text); }
.frl-position-top { display: flex; gap: 12px; align-items: flex-start; }
.frl-position-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--brand);
    background: var(--brand-soft);
}
.frl-position h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; }
.frl-salary { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--success); font-size: 14px; }
.frl-salary.is-empty { color: var(--text-muted); font-weight: 500; }
.frl-position-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border); font-size: 13px; color: var(--text-muted); }
.frl-position-foot .frl-go { color: var(--brand); font-weight: 700; }

.frl-empty {
    text-align: center;
    padding: 44px 24px;
    color: var(--text-soft);
}
.frl-empty i { font-size: 34px; color: var(--brand); opacity: .75; margin-bottom: 12px; }
.frl-empty h3 { margin: 0 0 6px; color: var(--text); font-size: 17px; }
.frl-empty p { margin: 0 auto; max-width: 46ch; }

/* ── Status pills ─────────────────────────────────────────────────────── */
.frl-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    background: var(--surface-3);
    color: var(--text-soft);
}
.frl-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.frl-pill.tone-success { background: var(--success-soft); color: var(--success); }
.frl-pill.tone-error { background: var(--error-soft); color: var(--error); }
.frl-pill.tone-info { background: var(--info-soft); color: var(--info); }

/* ── Candidates list + timeline ───────────────────────────────────────── */
.frl-list { display: flex; flex-direction: column; gap: 12px; }
.frl-person { padding: 0; overflow: hidden; }
.frl-person summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
}
.frl-person summary::-webkit-details-marker { display: none; }
.frl-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    background: var(--cta);
}
.frl-person-name { display: block; font-weight: 700; }
.frl-person-meta { display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.frl-person-status { text-align: right; }
.frl-person-when { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.frl-chevron { color: var(--text-muted); margin-left: 8px; transition: transform .2s var(--ease); }
.frl-person[open] .frl-chevron { transform: rotate(180deg); }

.frl-timeline { list-style: none; margin: 0; padding: 6px 18px 18px 74px; position: relative; }
.frl-timeline::before { content: ''; position: absolute; left: 39px; top: 22px; bottom: 30px; width: 2px; background: var(--border); }
.frl-timeline:has(> li:only-child)::before { display: none; }
.frl-timeline li { position: relative; padding: 8px 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.frl-timeline li::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 13px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--border-strong);
}
.frl-timeline li.tone-success::before { border-color: var(--success); }
.frl-timeline li.tone-error::before { border-color: var(--error); }
.frl-timeline li.tone-info::before { border-color: var(--info); }
.frl-timeline li:last-child::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.frl-tl-label { font-weight: 600; }
.frl-tl-when { font-size: 13px; color: var(--text-muted); }
.frl-tl-position { font-size: 12px; color: var(--text-soft); background: var(--surface-2); border-radius: 6px; padding: 1px 8px; }

/* ── Position detail ──────────────────────────────────────────────────── */
.frl-detail { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.frl-detail-main { padding: 26px; }
.frl-detail-main h1 { margin: 0 0 10px; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.frl-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; }
.frl-jd p { margin: 0 0 .7em; }
.frl-jd { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text-soft); overflow-wrap: anywhere; }
.frl-jd h1, .frl-jd h2, .frl-jd h3, .frl-jd h4 { color: var(--text); font-size: 16px; margin: 18px 0 8px; }
.frl-jd ul, .frl-jd ol { padding-left: 22px; }
.frl-jd table { border-collapse: collapse; width: 100%; }
.frl-jd td, .frl-jd th { border: 1px solid var(--border); padding: 6px 8px; }
.frl-closed-note { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warning-soft); color: var(--warning); font-weight: 600; }

.frl-form-card { padding: 24px; position: sticky; top: 84px; }
.frl-form-card h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.frl-form-card > p { margin: 0 0 18px; color: var(--text-muted); font-size: 14px; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.frl-field { margin-bottom: 14px; }
.frl-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--text-soft); }
.frl-field .frl-optional { color: var(--text-muted); font-weight: 500; }
.frl-input {
    width: 100%;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.frl-input::placeholder { color: var(--text-muted); }
.frl-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
textarea.frl-input { resize: vertical; min-height: 84px; }
.frl-field-error { color: var(--error); font-size: 13px; margin-top: 6px; font-weight: 500; }
.frl-input.is-invalid { border-color: var(--error); }

.frl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.frl-btn:active { transform: translateY(1px); }
.frl-btn-primary { color: #fff; background: var(--cta); box-shadow: 0 10px 24px -12px rgba(79, 124, 255, .8); }
.frl-btn-primary:hover { color: #fff; box-shadow: 0 14px 30px -12px rgba(79, 124, 255, .95); }
.frl-btn-primary[disabled] { opacity: .65; cursor: progress; }
.frl-btn-ghost { color: var(--text); background: var(--surface); border-color: var(--border-strong); }
.frl-btn-ghost:hover { color: var(--brand); border-color: var(--brand); }
.frl-btn-block { width: 100%; }
.frl-btn-link { background: none; border: 0; color: var(--text-muted); font-weight: 600; padding: 8px; }

/* ── CV drop zone (staged file card, never a bare file input) ─────────── */
.frl-drop {
    position: relative;
    border: 2px dashed var(--border-strong);
    border-radius: 14px;
    padding: 22px 16px;
    text-align: center;
    background: var(--surface-2);
    color: var(--text-soft);
    cursor: pointer;
    transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.frl-drop:hover, .frl-drop.is-over { border-color: var(--brand); background: var(--brand-soft); }
.frl-drop.is-over { transform: scale(1.01); }
.frl-drop i { font-size: 26px; color: var(--brand); margin-bottom: 8px; display: block; }
.frl-drop strong { color: var(--text); }
.frl-drop small { display: block; color: var(--text-muted); margin-top: 4px; }
.frl-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.frl-drop.is-invalid { border-color: var(--error); }

.frl-file {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    animation: frl-rise .22s var(--ease);
}
.frl-file.is-shown { display: flex; }
.frl-file-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--error); background: var(--error-soft); flex: 0 0 auto; }
.frl-file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frl-file-size { font-size: 12px; color: var(--text-muted); }
.frl-file-body { flex: 1 1 auto; min-width: 0; }

/* ── Auth ─────────────────────────────────────────────────────────────── */
.frl-auth .frl-main { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.frl-auth-card { width: 100%; max-width: 420px; padding: 34px 30px; border-radius: 24px; }
.frl-auth-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 22px; }
.frl-auth-logo img { height: 40px; }
html.dark .frl-auth-logo img { filter: brightness(1.6) saturate(.9); }
.frl-auth-card h1 { margin: 0 0 6px; font-size: 22px; font-weight: 800; text-align: center; }
.frl-auth-card .frl-lead { margin: 0 0 22px; text-align: center; color: var(--text-muted); font-size: 14px; }
.frl-qr { display: grid; place-items: center; margin: 4px auto 14px; padding: 12px; border-radius: 16px; background: #fff; width: fit-content; }
.frl-qr img { width: 180px; height: 180px; display: block; }
.frl-secret { text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; letter-spacing: .08em; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: var(--text-soft); word-break: break-all; margin-bottom: 18px; }
.frl-steps { margin: 0 0 16px; padding-left: 18px; color: var(--text-soft); font-size: 14px; }
.frl-code-input { text-align: center; letter-spacing: .5em; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.frl-status-note { padding: 10px 12px; border-radius: 10px; background: var(--success-soft); color: var(--success); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.frl-auth-foot { text-align: center; margin-top: 10px; }

/* ── Mobile ───────────────────────────────────────────────────────────── */
.frl-bottom-nav { display: none; }

@media (max-width: 860px) {
    .frl-detail { grid-template-columns: 1fr; }
    .frl-form-card { position: static; }
}

@media (max-width: 640px) {
    body { font-size: 15px; }
    .frl-topbar-inner { padding: 10px 16px; gap: 12px; }
    .frl-nav, .frl-user-name { display: none; }
    .frl-main { padding: 18px 16px 104px; }
    .frl-hero { padding: 22px 20px; border-radius: 18px; }
    .frl-hero h1 { font-size: 21px; }
    .frl-hero::after { width: 220px; height: 220px; right: -90px; top: -60px; opacity: .55; }
    .frl-detail-main, .frl-form-card { padding: 20px; }
    .frl-input { font-size: 16px; }
    .frl-person summary { grid-template-columns: auto 1fr; }
    .frl-person-status { grid-column: 1 / -1; text-align: left; display: flex; align-items: center; justify-content: space-between; }
    .frl-person-when { margin: 0; }
    .frl-timeline { padding-left: 64px; }
    .frl-timeline::before { left: 29px; }
    .frl-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
        gap: 8px;
        background: color-mix(in srgb, var(--surface) 90%, transparent);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid var(--border);
    }
    .frl-bottom-nav a {
        flex: 1 1 0;
        min-height: 48px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 600;
        color: var(--text-muted);
    }
    .frl-bottom-nav a.is-active { color: var(--brand); background: var(--brand-soft); }
}

@keyframes frl-rise { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
