:root {
    --ak-font-playful: "Comic Sans MS", "Comic Sans", "Trebuchet MS", Arial, sans-serif;
    --ak-ink: #121315;
    --ak-ink-soft: #343840;
    --ak-paper: rgba(255, 255, 255, 0.94);
    --ak-paper-strong: rgba(255, 255, 255, 0.98);
    --ak-line: rgba(12, 18, 28, 0.14);
    --ak-blue: #1f6feb;
    --ak-blue-dark: #124a9c;
    --ak-teal: #1b8f8f;
    --ak-gold: #d59a2d;
    --ak-coral: #d65a31;
    --ak-green: #1e9b63;
    --ak-violet: #5e5ce6;
    --ak-sky: #76d7ff;
    --ak-rose: #f06a8a;
    --ak-lime: #9fd356;
    --ak-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
    --ak-raised: 0 4px 0 rgba(0, 0, 0, 0.24), 0 12px 24px rgba(0, 0, 0, 0.18);
}

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

@keyframes akLivePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(30, 155, 99, 0.45);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 8px rgba(30, 155, 99, 0);
    }
}

body {
    accent-color: var(--ak-blue);
    background-color: #101318;
    background-image:
        radial-gradient(circle at 12% 10%, rgba(118, 215, 255, 0.18), transparent 28%),
        radial-gradient(circle at 88% 14%, rgba(240, 106, 138, 0.14), transparent 26%),
        linear-gradient(135deg, rgba(31, 111, 235, 0.08), rgba(27, 143, 143, 0.07));
    font-family: var(--ak-font-playful) !important;
    padding-bottom: 78px;
}

button,
input,
select,
textarea,
table {
    font-family: var(--ak-font-playful) !important;
}

body.admin-page {
    background-color: #151913;
}

body:has(.game-shell) {
    padding-bottom: 0;
}

.daisy-field {
    background-image:
        radial-gradient(circle at 14px 14px, #f5c84c 0 3px, transparent 4px),
        radial-gradient(ellipse at 14px 7px, rgba(255,255,255,.9) 0 5px, transparent 6px),
        radial-gradient(ellipse at 14px 21px, rgba(255,255,255,.9) 0 5px, transparent 6px),
        radial-gradient(ellipse at 7px 14px, rgba(255,255,255,.9) 0 5px, transparent 6px),
        radial-gradient(ellipse at 21px 14px, rgba(255,255,255,.9) 0 5px, transparent 6px),
        radial-gradient(circle at 66px 46px, #f5c84c 0 3px, transparent 4px),
        radial-gradient(ellipse at 66px 39px, rgba(255,255,255,.78) 0 5px, transparent 6px),
        radial-gradient(ellipse at 66px 53px, rgba(255,255,255,.78) 0 5px, transparent 6px),
        radial-gradient(ellipse at 59px 46px, rgba(255,255,255,.78) 0 5px, transparent 6px),
        radial-gradient(ellipse at 73px 46px, rgba(255,255,255,.78) 0 5px, transparent 6px);
    background-size: 92px 76px;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,.42));
    inset: 0;
    opacity: 0.62;
    pointer-events: none;
    position: fixed;
    z-index: 0;
}

.admin-shell {
    position: relative;
    z-index: 1;
}

body.admin-page .container.admin-shell {
    max-width: 1120px !important;
    padding: 28px 0 46px !important;
    width: min(1120px, calc(100% - 128px));
}

body.admin-page::after {
    background:
        radial-gradient(circle at 10% 8%, rgba(31,111,235,.2), transparent 34%),
        radial-gradient(circle at 86% 18%, rgba(27,143,143,.16), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,.14), rgba(0,0,0,.48));
}

body.admin-page .daisy-field {
    filter: none;
    opacity: 0.46;
}

body.admin-page .panel,
body.admin-page .card,
body.admin-page .feed-card,
body.admin-page .search-box,
body.admin-page .notification,
body.admin-page .flash,
body.admin-page .note,
body.admin-page .status,
body.admin-page .metric-card {
    animation: none;
    backdrop-filter: none;
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
}

body.admin-page .panel {
    contain: layout paint;
    content-visibility: auto;
    contain-intrinsic-size: 260px;
}

body.admin-page .admin-hero {
    content-visibility: visible;
}

body.admin-page table {
    box-shadow: none;
}

body.admin-page .panel::before,
body.admin-page .card::before,
body.admin-page .feed-card::before,
body.admin-page .search-box::before,
body.admin-page .notification::before,
body.admin-page .flash::before,
body.admin-page .note::before,
body.admin-page .status::before {
    opacity: 0.7;
}

body.admin-page .live-dot,
body.admin-page .presence-dot {
    animation: none;
    box-shadow: 0 0 0 4px rgba(30, 155, 99, 0.14);
}

h1, h2 {
    letter-spacing: 0;
}

h1,
h2,
h3,
.section-title {
    font-family: var(--ak-font-playful) !important;
}

h1 {
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.32), 0 10px 22px rgba(0, 0, 0, 0.28);
}

h2, h3 {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.panel,
.card,
.feed-card,
.search-box,
.notification,
.flash,
.note,
.status,
table {
    border: 1px solid var(--ak-line);
    box-shadow: var(--ak-shadow);
}

.panel,
.card,
.feed-card,
.search-box,
.notification,
.flash,
.note,
.status {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.92)),
        var(--ak-paper);
    backdrop-filter: blur(6px);
    animation: akRiseIn 360ms ease both;
    position: relative;
}

.panel::before,
.card::before,
.feed-card::before,
.search-box::before,
.notification::before,
.flash::before,
.note::before,
.status::before {
    background: linear-gradient(90deg, var(--ak-blue), var(--ak-teal), var(--ak-gold), var(--ak-coral));
    border-radius: inherit;
    content: "";
    height: 4px;
    inset: 0 0 auto;
    opacity: 0.85;
    position: absolute;
    pointer-events: none;
}

a.button,
.button,
.btn,
.button-link,
button,
input[type="submit"] {
    border: 0;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #edf3fb 56%, #d9e4f2 100%);
    color: var(--ak-ink);
    box-shadow: var(--ak-raised);
    font-weight: 800;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    transform: translateY(0);
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease, background 120ms ease;
}

a.button::after,
.button::after,
.btn::after,
.button-link::after,
button::after,
input[type="submit"]::after {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
    content: "";
    height: 100%;
    left: -120%;
    position: absolute;
    top: 0;
    transform: skewX(-18deg);
    transition: left 420ms ease;
    width: 80%;
}

a.button:hover,
.button:hover,
.btn:hover,
.button-link:hover,
button:hover,
input[type="submit"]:hover {
    filter: brightness(1.03) saturate(1.05);
    transform: translateY(-1px);
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.26), 0 16px 28px rgba(0, 0, 0, 0.22);
}

a.button:hover::after,
.button:hover::after,
.btn:hover::after,
.button-link:hover::after,
button:hover::after,
input[type="submit"]:hover::after {
    left: 140%;
}

a.button:active,
.button:active,
.btn:active,
.button-link:active,
button:active,
input[type="submit"]:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.28), 0 8px 14px rgba(0, 0, 0, 0.18);
}

button[type="submit"],
input[type="submit"],
.btn,
.button.primary {
    background: linear-gradient(180deg, #2f86ff 0%, var(--ak-blue) 58%, var(--ak-blue-dark) 100%);
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

input,
select,
textarea {
    background: var(--ak-paper-strong);
    border: 1px solid rgba(12, 18, 28, 0.28);
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

input[type="search"] {
    background-image: linear-gradient(180deg, #ffffff, #f0f7ff);
    border-color: rgba(31, 111, 235, 0.38);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--ak-blue);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(31, 111, 235, 0.18);
    outline: none;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

th {
    background: linear-gradient(180deg, #ffffff 0%, #dceaff 100%);
    color: var(--ak-ink);
    text-shadow: 0 1px 0 rgba(255,255,255,.8);
}

tr:hover td {
    background: rgba(31, 111, 235, 0.05);
}

.top-links,
.actions,
.tabs,
.feed-tabs {
    gap: 12px;
}

.search-prompt {
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), 0 10px 20px rgba(0, 0, 0, 0.28);
}

.notification,
.flash {
    border-left: 6px solid var(--ak-teal);
}

.danger,
button.danger,
.button.danger {
    background: linear-gradient(180deg, #ff6b6b 0%, #d93f3f 64%, #9f2323 100%);
    color: #fff;
}

.admin-shell .panel {
    border-radius: 16px;
}

.collapsible-panel > h2 {
    align-items: center;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    margin-top: 0;
    outline: none;
    padding: 6px 8px;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.collapsible-panel > h2:hover,
.collapsible-panel > h2:focus {
    background: rgba(31, 111, 235, 0.09);
    color: var(--ak-blue-dark);
    transform: translateX(2px);
}

.panel-collapse-indicator {
    align-items: center;
    background: linear-gradient(180deg, #ffffff, #dceaff);
    border: 1px solid rgba(31, 111, 235, 0.24);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0,0,0,.14);
    color: var(--ak-blue-dark);
    display: inline-flex;
    font-family: var(--ak-font-playful);
    font-size: 22px;
    height: 30px;
    justify-content: center;
    line-height: 1;
    margin-left: 12px;
    width: 30px;
}

.collapsible-panel.is-collapsed > .panel-body {
    display: none !important;
}

.panel-body[hidden] {
    display: none !important;
}

.admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 22px;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.admin-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(31, 111, 235, 0.12), transparent 44%),
        linear-gradient(300deg, rgba(213, 154, 45, 0.16), transparent 42%);
    pointer-events: none;
}

.admin-hero > * {
    position: relative;
}

.admin-eyebrow,
.metric-label {
    color: var(--ak-blue-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.admin-hero h2 {
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.05;
    margin: 0 0 10px;
}

.live-card {
    align-items: center;
    background: rgba(18, 19, 21, 0.92);
    border-radius: 14px;
    color: #fff;
    display: grid;
    gap: 6px;
    justify-items: start;
    padding: 22px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 16px 30px rgba(0,0,0,.22);
}

.live-card strong {
    font-size: 54px;
    line-height: 1;
}

.live-dot,
.presence-dot {
    background: var(--ak-green);
    border-radius: 999px;
    display: inline-block;
    height: 12px;
    width: 12px;
    animation: akLivePulse 1.7s ease-in-out infinite;
}

.admin-metrics {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 16px 0;
}

.mg-site-footer {
    align-items: center;
    background:
        linear-gradient(180deg, rgba(15, 23, 35, 0.88), rgba(7, 10, 16, 0.94));
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    bottom: 0;
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.78);
    display: flex;
    flex-wrap: wrap;
    font-size: 15px;
    gap: 12px 18px;
    justify-content: center;
    left: 0;
    padding: 14px 18px;
    position: fixed;
    right: 0;
    text-align: center;
    z-index: 200;
}

.mg-site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: center;
}

.mg-site-footer a {
    color: #b9ddff;
    font-weight: 900;
    text-decoration: none;
}

.mg-site-footer a:hover,
.mg-site-footer a:focus {
    color: #ffffff;
    text-decoration: underline;
}

.legal-page {
    color: #f6f8fb;
    min-height: 100vh;
}

.legal-page::before {
    background-image: url("/static/splash_car.png");
    background-position: center;
    background-size: cover;
    content: "";
    inset: 0;
    opacity: 0.22;
    position: fixed;
    z-index: -2;
}

.legal-page::after {
    background:
        radial-gradient(circle at 15% 10%, rgba(31, 111, 235, 0.26), transparent 34%),
        radial-gradient(circle at 86% 16%, rgba(213, 154, 45, 0.16), transparent 30%),
        rgba(0, 0, 0, 0.58);
    content: "";
    inset: 0;
    position: fixed;
    z-index: -1;
}

.legal-shell {
    margin: 0 auto;
    max-width: 980px;
    padding: 34px 18px 100px;
}

.legal-panel {
    color: var(--ak-ink);
    padding: clamp(22px, 4vw, 42px);
}

.legal-copy {
    font-family: Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
}

.legal-copy h1,
.legal-copy h2,
.legal-panel > h1,
.legal-panel > h2 {
    font-family: var(--ak-font-playful) !important;
}

.legal-copy h1 {
    font-size: clamp(36px, 7vw, 58px);
    line-height: 1.05;
    margin-top: 0;
}

.legal-copy h2,
.legal-panel > h2 {
    margin-top: 28px;
}

.legal-copy ul {
    padding-left: 24px;
}

.legal-copy a,
.legal-panel a {
    color: #064fae;
    font-weight: 900;
}

.terms-wall-header {
    border-bottom: 1px solid var(--ak-line);
    margin-bottom: 18px;
    padding-bottom: 16px;
}

.terms-wall-header h1 {
    margin: 0 0 8px;
}

.terms-scrollbox {
    border: 1px solid rgba(12, 18, 28, 0.18);
    border-radius: 14px;
    max-height: 54vh;
    overflow: auto;
    padding: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.terms-scrollbox .legal-copy {
    font-size: 15px;
}

.terms-accept-form {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.terms-checkbox {
    align-items: flex-start;
    display: flex;
    font-size: 18px;
    font-weight: 900;
    gap: 12px;
}

.terms-checkbox input {
    margin-top: 6px;
    width: auto;
}

.terms-accept-form button[disabled] {
    cursor: not-allowed;
    filter: grayscale(0.8);
    opacity: 0.52;
    transform: none;
}

.back-link {
    color: #b9ddff;
    font-weight: 900;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

@media (max-width: 720px) {
    body {
        padding-bottom: 112px;
    }

    .mg-site-footer {
        font-size: 14px;
        padding: 12px;
    }

    .legal-shell {
        padding-inline: 12px;
    }
}

.metric-card {
    background:
        linear-gradient(150deg, rgba(255,255,255,.98), rgba(236,246,255,.94)),
        var(--ak-paper);
    border: 1px solid var(--ak-line);
    border-radius: 16px;
    box-shadow: var(--ak-shadow);
    color: var(--ak-ink);
    overflow: hidden;
    padding: 14px;
    position: relative;
    animation: akRiseIn 420ms ease both;
}

.metric-card::before {
    content: "";
    display: block;
    height: 7px;
    inset: 0 0 auto;
    position: absolute;
}

.metric-blue::before { background: var(--ak-blue); }
.metric-teal::before { background: var(--ak-teal); }
.metric-gold::before { background: var(--ak-gold); }
.metric-coral::before { background: var(--ak-coral); }

.metric-card strong {
    display: block;
    font-size: 38px;
    line-height: 1;
    margin: 8px 0 10px;
}

.metric-values {
    color: var(--ak-ink-soft);
    display: grid;
    gap: 4px;
    font-size: 14px;
}

.admin-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
}

.admin-wide-grid {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(300px, 0.85fr) minmax(340px, 1.15fr);
}

body.admin-page .panel {
    margin: 14px 0;
    padding: 16px 18px;
}

.activity-list {
    display: grid;
    gap: 10px;
}

.activity-row {
    align-items: center;
    background:
        linear-gradient(120deg, rgba(255,255,255,.96), rgba(239,248,255,.88));
    border: 1px solid rgba(12, 18, 28, 0.1);
    border-radius: 12px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px;
}

.activity-row:hover {
    border-color: rgba(31, 111, 235, 0.28);
    box-shadow: 0 10px 24px rgba(31, 111, 235, 0.12);
    transform: translateY(-1px);
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

body.admin-page .activity-row:hover {
    box-shadow: none;
    transform: none;
}

body.admin-page .activity-row {
    transition: border-color 120ms ease, background 120ms ease;
}

.admin-search-row {
    background: linear-gradient(120deg, rgba(31,111,235,.08), rgba(27,143,143,.08));
    border: 1px solid rgba(31, 111, 235, 0.14);
    border-radius: 14px;
    padding: 12px;
}

.hidden-by-search {
    display: none !important;
}

.activity-row > div:first-child {
    grid-column: span 2;
}

.presence-dot + div {
    grid-column: auto;
}

.admin-alerts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 14px;
}

.alert-pill,
.status-chip {
    background: linear-gradient(180deg, #fff7e6 0%, #ffe2a6 100%);
    border: 1px solid rgba(213, 154, 45, 0.45);
    border-radius: 999px;
    color: #5f3900;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    padding: 7px 10px;
}

.status-chip {
    background: linear-gradient(180deg, #ecfdf5 0%, #c9f4df 100%);
    border-color: rgba(30, 155, 99, 0.35);
    color: #0b5f38;
}

.pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 4px;
}

.pagination .muted {
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(12,18,28,.12);
    border-radius: 999px;
    color: var(--ak-ink-soft);
    font-weight: 800;
    padding: 8px 12px;
}

@media (max-width: 1120px) {
    body.admin-page .container.admin-shell {
        width: calc(100% - 40px);
    }
}

@media (max-width: 900px) {
    .admin-hero,
    .admin-grid,
    .admin-wide-grid,
    .admin-metrics {
        grid-template-columns: 1fr !important;
    }

    .activity-row {
        grid-template-columns: auto minmax(0, 1fr);
    }
}

/* Profile polish pass: keep uploaded images contained and make profile pages readable. */
body.profile-page {
    background:
        linear-gradient(120deg, rgba(15, 23, 42, .74), rgba(20, 28, 44, .58)),
        var(--ak-bg-image);
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    color: #0f172a;
    min-height: 100vh;
}

body.profile-page .profile-shell {
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 1120px;
    padding: 28px clamp(16px, 3vw, 28px) 64px;
    width: min(100%, 1120px);
}

body.profile-page .profile-back {
    background: rgba(12, 18, 28, .72);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    color: #dbeafe;
    display: inline-block;
    margin: 0 0 18px;
    padding: 10px 14px;
}

body.profile-page .profile-back a {
    color: #bfdbfe;
}

body.profile-page .pro-hero {
    border-top: 6px solid transparent;
    border-image: linear-gradient(90deg, #2f8cff, #22a6a1, #ffb84d, #ef6f4c) 1;
    display: grid;
    grid-template-rows: auto 1fr;
    margin: 0 0 20px;
}

body.profile-page .pro-banner {
    background:
        linear-gradient(135deg, rgba(47,140,255,.9), rgba(34,166,161,.72), rgba(255,184,77,.76));
    box-sizing: border-box;
    display: block !important;
    height: clamp(150px, 22vw, 230px) !important;
    max-height: 230px !important;
    min-height: 150px !important;
    object-fit: cover !important;
    object-position: center !important;
    overflow: hidden;
    width: 100% !important;
}

body.profile-page .pro-banner-placeholder {
    min-height: 150px;
}

body.profile-page .pro-identity {
    align-items: center;
    display: grid;
    gap: 22px;
    grid-template-columns: auto minmax(0, 1fr);
    margin-top: -58px;
    padding: 0 clamp(18px, 3vw, 34px) 30px;
}

body.profile-page .pro-avatar,
body.profile-page img.pro-avatar,
body.profile-page span.pro-avatar {
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    display: inline-flex !important;
    flex: 0 0 auto;
    height: 126px !important;
    max-height: 126px !important;
    max-width: 126px !important;
    min-height: 126px !important;
    min-width: 126px !important;
    object-fit: contain !important;
    object-position: center !important;
    padding: 6px;
    width: 126px !important;
}

body.profile-page .pro-avatar:not(img) {
    align-items: center;
    justify-content: center;
}

body.profile-page .org-avatar {
    border-radius: 22px;
}

body.profile-page .pro-identity h1 {
    font-size: clamp(36px, 6vw, 62px);
    overflow-wrap: anywhere;
}

body.profile-page .pro-headline {
    color: #334155;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.35;
    max-width: 760px;
}

body.profile-page .profile-stats,
body.profile-page .profile-grid {
    gap: 16px;
}

body.profile-page .profile-card,
body.profile-page .profile-stats {
    border-top: 5px solid transparent;
    border-image: linear-gradient(90deg, #2f8cff, #22a6a1, #ffb84d, #ef6f4c) 1;
}

body.profile-page .profile-card {
    padding: clamp(18px, 3vw, 28px);
}

.feed-avatar-link,
.feed-name-link,
.feed-org-link,
.profile-inline-link {
    color: inherit;
    text-decoration: none;
}

.feed-avatar-link {
    display: inline-flex;
    flex: 0 0 auto;
}

.feed-name-link:hover,
.feed-org-link:hover,
.profile-inline-link:hover {
    color: #0e5ed0;
    text-decoration: underline;
}

.feed-org-link {
    color: #475569;
    font-weight: 900;
}

@media (max-width: 720px) {
    body.profile-page .profile-shell {
        padding-inline: 12px;
    }

    body.profile-page .pro-banner {
        height: 140px !important;
        min-height: 140px !important;
    }

    body.profile-page .pro-identity {
        grid-template-columns: 1fr;
        margin-top: -48px;
    }

    body.profile-page .pro-avatar,
    body.profile-page img.pro-avatar,
    body.profile-page span.pro-avatar {
        height: 104px !important;
        max-height: 104px !important;
        max-width: 104px !important;
        min-height: 104px !important;
        min-width: 104px !important;
        width: 104px !important;
    }
}

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

/* Logged-in Morgan's Guide search dashboard */
body.guide-dashboard {
    color: #f7fbff;
    min-height: 100vh;
    overflow-x: hidden;
}

body.guide-dashboard::before {
    background-image: url("/static/splash_car.png");
    background-position: center;
    background-size: cover;
    content: "";
    inset: 0;
    opacity: 0.56;
    position: fixed;
    z-index: -2;
}

body.guide-dashboard::after {
    background:
        radial-gradient(circle at 10% 8%, rgba(31, 111, 235, 0.22), transparent 34%),
        radial-gradient(circle at 88% 10%, rgba(213, 154, 45, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(4, 10, 17, 0.42), rgba(4, 10, 17, 0.54) 42%, rgba(4, 10, 17, 0.66));
    content: "";
    inset: 0;
    position: fixed;
    z-index: -1;
}

.guide-shell {
    margin: 0 auto;
    max-width: 1220px;
    padding: 22px 18px 96px;
    width: min(1220px, calc(100% - 28px));
}

.guide-nav {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.guide-brand {
    align-items: center;
    color: #fff;
    display: inline-flex;
    gap: 12px;
    text-decoration: none;
}

.guide-brand-mark {
    align-items: center;
    background: linear-gradient(145deg, #2f86ff, #1b8f8f);
    border: 2px solid rgba(255,255,255,.72);
    border-radius: 16px;
    box-shadow: 0 9px 22px rgba(0,0,0,.28);
    display: inline-flex;
    font-size: 18px;
    font-weight: 900;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.guide-brand strong {
    display: block;
    font-size: 24px;
    line-height: 1;
    text-shadow: 0 3px 12px rgba(0,0,0,.42);
}

.guide-brand small {
    color: rgba(255,255,255,.78);
    display: block;
    font-size: 13px;
    font-weight: 800;
    margin-top: 4px;
}

.guide-nav-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: flex-end;
}

.guide-nav-links a {
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    padding: 9px 12px;
    text-decoration: none;
    text-shadow: 0 1px 4px rgba(0,0,0,.35);
}

.guide-nav-links a:hover,
.guide-nav-links a:focus {
    background: rgba(255,255,255,.28);
}

.dashboard-hero {
    align-items: stretch;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
    margin-bottom: 18px;
}

.dashboard-hero-copy,
.dashboard-search-card,
.dashboard-panel,
.latest-preview-section,
.community-section,
.results-section {
    background:
        linear-gradient(145deg, rgba(255,255,255,.98), rgba(242,248,255,.93)),
        var(--ak-paper);
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(0,0,0,.28);
    color: var(--ak-ink);
    overflow: hidden;
    padding: clamp(20px, 3vw, 30px);
    position: relative;
}

.dashboard-hero-copy {
    background:
        linear-gradient(135deg, rgba(18, 19, 21, .84), rgba(12, 30, 47, .68)),
        rgba(18, 19, 21, .62);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 320px;
}

.dashboard-hero-copy::before,
.dashboard-search-card::before,
.dashboard-panel::before,
.latest-preview-section::before,
.community-section::before,
.results-section::before {
    background: linear-gradient(90deg, var(--ak-blue), var(--ak-teal), var(--ak-gold), var(--ak-coral));
    content: "";
    height: 5px;
    inset: 0 0 auto;
    position: absolute;
}

.dashboard-hero-copy h1 {
    font-family: "Brush Script MT", "Snell Roundhand", "Apple Chancery", "Lucida Handwriting", var(--ak-font-playful) !important;
    font-size: clamp(54px, 8vw, 96px);
    line-height: .88;
    margin: 8px 0 16px;
    text-shadow: 4px 4px 12px rgba(0,0,0,.5);
}

.dashboard-hero-copy p {
    color: rgba(255,255,255,.88);
    font-size: 20px;
    line-height: 1.45;
    margin: 0;
    max-width: 760px;
}

.dashboard-eyebrow {
    color: #b9ddff;
    font-size: 13px !important;
    font-weight: 900;
    letter-spacing: .08em;
    margin: 0 0 8px !important;
    text-transform: uppercase;
}

.dashboard-search-card {
    align-content: center;
    display: grid;
    min-height: 320px;
}

.dashboard-search-heading {
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
}

.dashboard-search-heading span {
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 900;
    line-height: 1;
}

.dashboard-search-heading small {
    color: var(--ak-ink-soft);
    font-size: 16px;
    font-weight: 800;
}

.dashboard-search-grid {
    align-items: end;
    display: grid;
    gap: 13px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.dashboard-search-grid label {
    color: var(--ak-ink);
    display: block;
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 6px;
}

.dashboard-search-grid input {
    font-size: 17px;
    min-height: 48px;
    padding: 12px 13px;
    width: 100%;
}

.dashboard-search-actions {
    display: flex;
    gap: 10px;
}

.secondary-action {
    background: linear-gradient(180deg, #ffffff 0%, #edf3fb 56%, #d9e4f2 100%) !important;
    color: var(--ak-ink) !important;
    text-shadow: none !important;
}

.dashboard-alerts {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}

.dashboard-stats {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 18px 0;
}

.dashboard-stat {
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(0,0,0,.2);
    color: var(--ak-ink);
    padding: 18px;
}

.dashboard-stat:nth-child(1) { border-top: 5px solid var(--ak-blue); }
.dashboard-stat:nth-child(2) { border-top: 5px solid var(--ak-teal); }
.dashboard-stat:nth-child(3) { border-top: 5px solid var(--ak-gold); }
.dashboard-stat:nth-child(4) { border-top: 5px solid var(--ak-coral); }

.dashboard-stat strong {
    display: block;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1;
}

.dashboard-stat span {
    color: var(--ak-ink-soft);
    display: block;
    font-weight: 900;
    margin-top: 7px;
}

.quick-actions,
.field-preview-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: 18px 0 22px;
}

.quick-action-card,
.field-preview-card {
    border: 1px solid rgba(255,255,255,.48);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,.24);
    color: #fff;
    display: grid;
    min-height: 118px;
    overflow: hidden;
    padding: 18px;
    position: relative;
    text-decoration: none;
}

.quick-action-card::after {
    background: rgba(255,255,255,.18);
    border-radius: 999px;
    content: "";
    height: 70px;
    position: absolute;
    right: -24px;
    top: -24px;
    width: 70px;
}

.quick-action-card span,
.field-preview-card strong {
    font-size: 20px;
    font-weight: 900;
    line-height: 1.05;
}

.quick-action-card small,
.field-preview-card small,
.field-preview-card > span:last-child {
    align-self: end;
    color: rgba(255,255,255,.86);
    font-weight: 800;
}

.action-blue { background: linear-gradient(145deg, #2f86ff, #124a9c); }
.action-teal { background: linear-gradient(145deg, #25b8af, #116b6d); }
.action-gold { background: linear-gradient(145deg, #f7bf4b, #9a5b0a); }
.action-coral { background: linear-gradient(145deg, #f0764a, #9c3019); }
.action-violet { background: linear-gradient(145deg, #7d7aff, #4034a4); }
.action-green { background: linear-gradient(145deg, #35bf7a, #116f47); }

.quick-action-card:hover,
.quick-action-card:focus,
.field-preview-card:hover,
.field-preview-card:focus {
    filter: saturate(1.08) brightness(1.03);
    transform: translateY(-2px);
}

.empty-search-state {
    margin: 16px 0 24px;
}

.empty-search-state h2,
.results-section h2,
.latest-preview-section h2,
.community-section h2 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1;
    margin: 0;
}

.empty-search-state p,
.dashboard-empty {
    color: var(--ak-ink-soft);
    font-size: 18px;
    font-weight: 800;
}

.results-section,
.latest-preview-section,
.community-section {
    margin: 24px 0;
}

.section-heading-row {
    align-items: end;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.result-count {
    background: linear-gradient(180deg, #ecfdf5, #c9f4df);
    border: 1px solid rgba(30,155,99,.28);
    border-radius: 999px;
    color: #0b5f38;
    font-weight: 900;
    padding: 8px 12px;
}

.result-grid,
.community-feed-list {
    display: grid;
    gap: 16px;
}

.result-card {
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(12,18,28,.12);
    border-radius: 18px;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 220px;
    overflow: hidden;
    padding: 18px;
}

.result-card-body {
    min-width: 0;
}

.result-kicker {
    align-items: center;
    color: var(--ak-ink-soft);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 900;
    gap: 8px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.result-card h3 {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1;
    margin: 8px 0 10px;
}

.result-title-link {
    color: var(--ak-ink);
    text-decoration: none;
}

.result-title-link:hover,
.result-title-link:focus {
    color: var(--ak-blue-dark);
    text-decoration: underline;
}

.status-badge,
.result-badges span {
    border-radius: 999px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    padding: 5px 9px;
}

.status-badge.verified,
.status-badge.admin_verified,
.status-badge.community_verified,
.verification.admin_verified,
.verification.community_verified {
    background: #e9f7e9;
    color: #145214;
}

.status-badge.unverified,
.status-badge.unverified_usefulness,
.verification.unverified_usefulness {
    background: #fff5d9;
    color: #5d4200;
}

.result-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.result-badges span {
    background: #e8f2ff;
    color: #134a8f;
}

.price-line {
    color: #0b5f38;
    font-size: 28px;
    font-weight: 900;
    margin: 8px 0 12px;
}

.result-facts {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 12px 0;
}

.result-facts div {
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(12,18,28,.08);
    border-radius: 12px;
    padding: 10px;
}

.result-facts dt {
    color: var(--ak-ink-soft);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.result-facts dd {
    font-weight: 900;
    margin: 3px 0 0;
    overflow-wrap: anywhere;
}

.reference-block {
    background: #fff9ea;
    border: 1px solid rgba(213,154,45,.28);
    border-radius: 14px;
    margin: 12px 0;
    padding: 12px;
}

.reference-block ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.result-actions,
.status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.result-actions a {
    color: var(--ak-blue-dark);
    font-weight: 900;
}

.result-photo {
    align-items: center;
    align-self: stretch;
    background: linear-gradient(180deg, #fff, #edf4fb);
    border: 1px solid rgba(12,18,28,.12);
    border-radius: 16px;
    color: var(--ak-ink-soft);
    display: flex;
    justify-content: center;
    min-height: 170px;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
}

.result-photo img {
    display: block;
    height: 100%;
    max-height: 240px;
    object-fit: cover;
    width: 100%;
}

.inventory-match-box {
    background: #f7fbff;
    border: 1px solid #c9ddf5;
    border-radius: 14px;
    margin: 14px 0;
    overflow-x: auto;
    padding: 12px 14px;
}

.inventory-match-box h4 {
    font-size: 20px;
    margin: 0 0 8px;
}

.supplier-box {
    background: #fff9ec;
    border-color: rgba(213,154,45,.32);
}

.inventory-note {
    color: var(--ak-ink-soft);
    font-size: 13px;
    font-weight: 800;
    margin: 0 0 10px;
}

.inventory-table {
    box-shadow: none;
    font-size: 14px;
    min-width: 520px;
    width: 100%;
}

.inventory-table th,
.inventory-table td {
    border-bottom: 1px solid rgba(12,18,28,.1);
    padding: 7px 8px;
    text-align: left;
}

.pill {
    background: #e9f7e9;
    border-radius: 999px;
    color: #145214;
    display: inline-block;
    font-weight: 900;
    padding: 3px 8px;
}

.field-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 0;
}

.field-preview-card {
    background: linear-gradient(145deg, #172235, #0f918d);
    min-height: 150px;
}

.feed-card {
    color: var(--ak-ink);
}

.feed-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.feed-author {
    align-items: center;
    display: flex;
    gap: 10px;
}

.avatar-sm {
    align-items: center;
    background: #dceaff;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,.22);
    color: var(--ak-ink);
    display: inline-flex;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    object-fit: cover;
    width: 42px;
}

.feed-title {
    font-size: clamp(24px, 4vw, 34px);
    margin: 12px 0 6px;
}

.feed-vehicle {
    color: var(--ak-ink);
    font-weight: 900;
    margin: 6px 0 12px;
}

.feed-gallery {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    margin-top: 12px;
}

.feed-gallery img {
    border: 1px solid rgba(12,18,28,.12);
    border-radius: 10px;
    display: block;
    height: 120px;
    object-fit: cover;
    width: 100%;
}

.feed-votes form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.vote-active {
    outline: 3px solid #91d7a6;
}

.builder-link a {
    color: #b9ddff;
    font-weight: 900;
}

@media (max-width: 1080px) {
    .dashboard-hero,
    .dashboard-search-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-stats,
    .field-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .guide-shell {
        width: min(100% - 18px, 1220px);
        padding-top: 12px;
    }

    .guide-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .guide-nav-links {
        justify-content: flex-start;
    }

    .dashboard-hero-copy,
    .dashboard-search-card,
    .dashboard-panel,
    .latest-preview-section,
    .community-section,
    .results-section {
        border-radius: 18px;
        padding: 18px;
    }

    .dashboard-hero-copy {
        min-height: 250px;
    }

    .dashboard-hero-copy h1 {
        font-size: 58px;
    }

    .dashboard-stats,
    .quick-actions,
    .field-preview-grid,
    .result-facts {
        grid-template-columns: 1fr;
    }

    .result-card {
        grid-template-columns: 1fr;
    }

    .result-photo {
        min-height: 220px;
    }

    .section-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-search-actions {
        flex-direction: column;
    }
}

/* Profile and organization images should show the whole uploaded image. */
.avatar-preview,
.avatar-lg,
.avatar-sm,
.org-logo,
.org-logo-sm,
.org-logo-lg,
.logo {
    object-fit: contain !important;
    object-position: center center !important;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(238,246,255,.9)) !important;
}

.avatar-preview,
.avatar-lg,
.avatar-sm {
    padding: 2px;
}

.org-logo,
.org-logo-sm,
.org-logo-lg,
.logo {
    padding: 6px;
}

/* Rich professional profiles */
.profile-page {
    background: #0c121d;
    color: #111827;
    min-height: 100vh;
}

.profile-page::before {
    background-image:
        linear-gradient(120deg, rgba(9,18,32,.62), rgba(12,25,35,.28)),
        url("/static/splash_car.png");
    background-position: center;
    background-size: cover;
    content: "";
    inset: 0;
    position: fixed;
    z-index: -2;
}

.profile-page::after {
    background:
        radial-gradient(circle at 15% 15%, rgba(92,219,213,.18), transparent 28%),
        radial-gradient(circle at 84% 8%, rgba(255,194,87,.16), transparent 30%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: fixed;
    z-index: -1;
}

.profile-shell {
    margin: 0 auto;
    max-width: 1180px;
    padding: 28px 18px 96px;
}

.profile-back,
.profile-back a {
    color: #b9ddff;
    font-weight: 900;
}

.profile-flash {
    background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(232,249,255,.96));
    border-left: 7px solid #22a6a1;
    border-radius: 16px;
    box-shadow: 0 16px 42px rgba(0,0,0,.24);
    color: #0f172a;
    font-size: 22px;
    font-weight: 900;
    margin: 14px 0;
    padding: 16px 20px;
}

.pro-hero,
.profile-card,
.profile-stats {
    background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(241,248,255,.95));
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(0,0,0,.24);
    overflow: hidden;
}

.pro-hero {
    margin: 18px 0;
    position: relative;
}

.pro-banner {
    background:
        linear-gradient(135deg, rgba(21,98,181,.92), rgba(34,166,161,.78), rgba(255,184,77,.84));
    display: block;
    height: 260px;
    object-fit: cover;
    width: 100%;
}

.pro-banner-placeholder {
    border-bottom: 1px solid rgba(255,255,255,.42);
}

.pro-identity {
    align-items: flex-end;
    display: flex;
    gap: 24px;
    margin-top: -88px;
    padding: 0 32px 32px;
    position: relative;
}

.pro-avatar {
    align-items: center;
    background: linear-gradient(135deg, #fff, #eef7ff);
    border: 6px solid #fff;
    border-radius: 50%;
    box-shadow: 0 14px 34px rgba(0,0,0,.28);
    color: #0f172a;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 58px;
    font-weight: 1000;
    height: 156px;
    justify-content: center;
    object-fit: contain;
    padding: 4px;
    width: 156px;
}

.org-avatar {
    border-radius: 26px;
}

.profile-kicker {
    color: #1562b5;
    font-size: 14px;
    font-weight: 1000;
    letter-spacing: .06em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.pro-identity h1 {
    color: #0f172a;
    font-size: clamp(40px, 7vw, 76px);
    line-height: .95;
    margin: 0;
    text-shadow: 0 4px 0 rgba(0,0,0,.16);
}

.pro-headline {
    color: #475569;
    font-size: 20px;
    font-weight: 800;
    margin: 10px 0;
}

.badge-row,
.chip-cloud,
.profile-links,
.feed-votes form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-badge,
.chip-cloud span,
.todo-chip {
    background: #eef6ff;
    border: 1px solid rgba(21,98,181,.22);
    border-radius: 999px;
    color: #12395f;
    display: inline-block;
    font-weight: 1000;
    padding: 8px 12px;
}

.profile-badge.green {
    background: #e8f9ee;
    color: #116329;
}

.profile-badge.blue {
    background: #e9f2ff;
    color: #174ea6;
}

.profile-badge.gold {
    background: #fff4d8;
    color: #7a4b00;
}

.profile-stats {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: 18px 0;
    padding: 18px;
}

.profile-stats div {
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(12,18,28,.1);
    border-radius: 16px;
    padding: 14px;
}

.profile-stats strong {
    display: block;
    font-size: 26px;
    line-height: 1.05;
}

.profile-stats span {
    color: #536071;
    display: block;
    font-size: 13px;
    font-weight: 900;
    margin-top: 4px;
}

.profile-grid,
.profile-edit-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-edit-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-card {
    margin: 18px 0;
    padding: 24px;
}

.profile-card.wide,
.profile-edit-grid .wide {
    grid-column: 1 / -1;
}

.profile-card h2 {
    color: #0f172a;
    font-size: clamp(30px, 4vw, 44px);
    margin: 0 0 14px;
    text-shadow: 0 3px 0 rgba(0,0,0,.12);
}

.profile-card h3 {
    color: #334155;
    margin-bottom: 8px;
}

.profile-card p,
.profile-card li {
    font-size: 18px;
}

.profile-card blockquote {
    border-left: 6px solid #22a6a1;
    color: #334155;
    font-size: 20px;
    font-weight: 900;
    margin: 18px 0 0;
    padding-left: 16px;
}

.form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .full {
    grid-column: 1 / -1;
}

.profile-edit-grid label,
.form-grid label {
    color: #0f172a;
    display: block;
    font-weight: 1000;
}

.profile-edit-grid input,
.profile-edit-grid select,
.profile-edit-grid textarea,
.form-grid input,
.form-grid select,
.form-grid textarea {
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(12,18,28,.18);
    border-radius: 12px;
    box-sizing: border-box;
    display: block;
    font: inherit;
    margin-top: 6px;
    padding: 11px 12px;
    width: 100%;
}

.profile-edit-grid textarea,
.form-grid textarea {
    min-height: 110px;
    resize: vertical;
}

.chip-picker {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 10px 0;
}

.chip-picker label,
.check-row {
    align-items: center;
    background: rgba(21,98,181,.08);
    border-radius: 12px;
    display: flex;
    gap: 8px;
    padding: 9px 10px;
}

.chip-picker input,
.check-row input {
    margin: 0;
    width: auto;
}

.profile-gallery {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.profile-gallery figure {
    margin: 0;
}

.profile-gallery img,
.cert-card img {
    background: #fff;
    border: 1px solid rgba(12,18,28,.12);
    border-radius: 16px;
    display: block;
    height: 160px;
    object-fit: contain;
    padding: 6px;
    width: 100%;
}

.profile-gallery figcaption {
    color: #475569;
    font-weight: 800;
    margin-top: 6px;
}

.cert-card,
.member-mini,
.timeline-item {
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(12,18,28,.1);
    border-radius: 16px;
    margin: 10px 0;
    padding: 12px;
}

.cert-card {
    align-items: center;
    display: flex;
    gap: 12px;
}

.cert-card img {
    flex: 0 0 auto;
    height: 80px;
    width: 100px;
}

.mini-list {
    display: grid;
    gap: 10px;
}

.member-mini {
    align-items: center;
    color: #0f172a !important;
    display: flex;
    gap: 10px;
    text-decoration: none;
}

.member-mini small {
    color: #64748b;
    display: block;
    font-weight: 900;
}

.profile-links a,
.button-link {
    background: linear-gradient(180deg, #2f8cff, #0e5ed0);
    border-radius: 12px;
    box-shadow: 0 6px 0 rgba(4,43,99,.55), 0 14px 28px rgba(13,94,208,.24);
    color: #fff !important;
    display: inline-block;
    font-weight: 1000;
    padding: 10px 13px;
    text-decoration: none;
}

.timeline-item span {
    color: #64748b;
    display: block;
    font-weight: 900;
    margin: 4px 0;
}

@media (max-width: 900px) {
    .pro-identity {
        align-items: flex-start;
        flex-direction: column;
        margin-top: -70px;
        padding: 0 18px 24px;
    }

    .pro-avatar {
        height: 132px;
        width: 132px;
    }

    .profile-stats,
    .profile-grid,
    .profile-edit-grid,
    .profile-edit-grid.compact,
    .form-grid,
    .chip-picker {
        grid-template-columns: 1fr;
    }
}
