:root {
    --text-primary: #f0f0f5;
    --text-secondary: #9aa0a6;
    --accent-primary: #6544ff;
    --accent-secondary: #3113a8;
    --fill-primary: #050505;
    --fill-secondary: #101010;
    --fill-soft: #151515;
    --border-primary: #2e2e2e;
    --border-secondary: rgba(255, 255, 255, 0.08);
    --border-violet: rgba(86, 32, 245, 0.35);
    --border-success: rgba(103, 173, 91, 0.55);
    --border-warning: rgba(242, 194, 79, 0.5);
    --border-danger: rgba(255, 107, 107, 0.45);
    --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 14px 34px rgba(0, 0, 0, 0.45);
    --fill-page-bg: #000000;
    --gradient-violet-start: rgba(86, 32, 245, 0.24);
    --gradient-violet-start-transparent: rgba(86, 32, 245, 0);
    --gradient-violet-end: rgba(49, 19, 168, 0.2);
    --gradient-violet-end-transparent: rgba(49, 19, 168, 0);
    --gradient-violet-transparent: rgba(86, 32, 245, 0);
    --surface-header: rgba(0, 0, 0, 0.5);
    --surface-sidebar-end: #0a0a0a;
    --card-gradient-start: #12141c;
    --card-gradient-end: #0f0f0f;
    --surface-alert: rgba(0, 0, 0, 0.6);
    --surface-fill-95: rgba(255, 255, 255, 0.02);
    --surface-fill-86: rgba(255, 255, 255, 0.04);
    --surface-fill-75: rgba(255, 255, 255, 0.06);
    --surface-fill-74: rgba(255, 255, 255, 0.04);
    --success-soft: rgba(103, 173, 91, 0.14);
    --warning-soft: rgba(242, 194, 79, 0.14);
    --danger-soft: rgba(195, 42, 27, 0.15);
    --violet-soft-34: rgba(86, 32, 245, 0.22);
    --violet-soft-18: rgba(86, 32, 245, 0.12);
    --violet-soft-80: rgba(86, 32, 245, 0.55);
    --accent-soft-16: rgba(86, 32, 245, 0.16);
    --accent-soft-14: rgba(86, 32, 245, 0.14);
    --accent-soft-32: rgba(86, 32, 245, 0.32);
    --accent-soft-45: rgba(86, 32, 245, 0.45);
    --text-primary-soft-18: rgba(255, 255, 255, 0.12);
    --transparent: transparent;
    --sidebar-width: clamp(208px, 15vw, 268px);
    --header-height: clamp(58px, 6.2vw, 74px);
    --content-width: min(95vw, 1680px);
    --text-base: clamp(14px, 0.95vw, 16px);
    --text-title: clamp(24px, 2.2vw, 36px);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: var(--text-base);
    color: var(--text-primary);
    background:
        radial-gradient(900px 420px at 100% -10%, var(--gradient-violet-start) 0%, var(--gradient-violet-start-transparent) 70%),
        radial-gradient(900px 420px at -10% 100%, var(--gradient-violet-end) 0%, var(--gradient-violet-end-transparent) 70%),
        var(--fill-page-bg);
    background-attachment: fixed;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
}

a:hover {
    color: #ffffff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 10px;
    line-height: 1.3;
    color: var(--text-primary);
}

p {
    margin: 0 0 12px;
    color: var(--text-secondary);
}

img,
video {
    display: block;
    max-width: 100%;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header,
.app-header {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px clamp(16px, 2.5vw, 30px);
    background: var(--surface-header);
    border-bottom: none;
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.header-inner,
.header-actions,
.top-nav,
.nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.header-inner {
    width: 100%;
    justify-content: space-between;
}

.brand,
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: clamp(36px, 3vw, 44px);
    height: clamp(36px, 3vw, 44px);
    border-radius: 12px;
    background: transparent;
    border: none;
    object-fit: contain;
    padding: 0;
}

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

.brand-title {
    margin: 0;
    font-weight: 700;
    font-size: clamp(16px, 1.3vw, 20px);
    color: #ffffff;
}

.brand-subtitle,
.page-subtitle,
.subheader-text,
.section-copy,
.section-note,
.rank-meta,
.topic-meta,
.topic-snippet,
.result-lead {
    margin: 0;
    font-size: clamp(12px, 0.95vw, 14px);
    color: var(--text-secondary);
}

.sidebar,
.side-menu {
    width: 100%;
    background: transparent;
    border-bottom: 1px solid var(--border-secondary);
    padding: 12px clamp(16px, 2.5vw, 30px);
}

.main,
.page,
.main-content,
.app-content,
.home-content,
.feed-main,
.upload-main,
.content-shell,
.workspace,
.profile-content {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: clamp(16px, 2.4vw, 32px);
}

.profile-container {
    width: 35vw;
    max-width: 700px;
    min-width: 320px;
    padding: clamp(16px, 2.4vw, 32px);
    margin-left: calc(50vw - var(--sidebar-width) - 17.5vw);
}

.page,
.main,
.main-content,
.app-content,
.feed-main,
.upload-main,
.content-shell,
.workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-content {
    max-width: 35vw;
}

.main-content .page {
    max-width: 100%;
    padding: 0;
}

.page-center,
.auth-page {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 2.2vw, 28px);
}

.page-title,
.section-title,
.section-subtitle,
.topic-title,
.profile-name,
.game-title {
    margin: 0 0 10px;
    color: var(--text-primary);
}

.card,
.admin-card,
.surface-card,
.upload-card,
.preview-card,
.thread-card,
.prediction-card,
.insight-card,
.intake-card,
.detail-card,
.feed-card,
.upload-window-card,
.secret-item,
.topic-item,
.comment-item,
.profile-grid,
.profile-header,
.validation {
    background: linear-gradient(145deg, var(--card-gradient-start) 0%, var(--card-gradient-end) 100%);
    border: 1px solid var(--border-violet);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    padding: clamp(12px, 1.4vw, 18px);
    color: var(--text-primary);
}

.auth-card {
    background: #12141c;
    border: none;
    border-radius: 20px;
    padding: clamp(28px, 3vw, 48px);
    width: min(460px, 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.auth-card h2 {
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    margin-bottom: 4px;
    color: #ffffff;
}

.auth-card .page-subtitle {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: left;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-card form br {
    display: none;
}

.auth-card input {
    background: transparent;
    border: 1px solid #4a4a55;
    color: #ffffff !important;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-card input:focus {
    border-color: var(--accent-primary);
    background: transparent;
    box-shadow: 0 0 0 3px rgba(86, 32, 245, 0.15);
}

.auth-card input::placeholder {
    color: var(--text-secondary);
}

.auth-card button[type="submit"],
.auth-card .submit-btn {
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #ffffff;
    border: none;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.auth-card button[type="submit"]:hover,
.auth-card .submit-btn:hover {
    background: #0074ff;
    transform: translateY(-1px);
}

.auth-card .alert {
    margin-top: 1rem;
    background: rgba(195, 42, 27, 0.15);
    border: 1px solid rgba(195, 42, 27, 0.4);
    color: #ff6b6b;
    border-radius: 10px;
    font-size: 1.05rem;
    text-align: center;
}

.auth-card p {
    font-size: 1rem;
    line-height: 1.6;
}

.auth-card p,
.auth-card .link-button {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    color: #ffffff;
    background: transparent;
    border: none;
    padding: 0;
    min-height: auto;
    display: block;
}

.auth-card p.page-subtitle {
    margin-top: 0;
}

.auth-card p a,
.auth-card .link-button a {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-card p a:hover,
.auth-card .link-button a:hover {
    text-decoration: underline;
    color: var(--accent-primary);
}

.card-container,
.style-grid,
.prediction-grid,
.page-grid,
.feed-grid,
.auth-grid,
.dashboard-grid,
.info-grid,
.secrets-list,
.rank-list,
.forum-topic-list,
.mini-topic-list,
.effect-list,
.comment-list,
.profile-avatar-row,
.birth-grid,
.chip-row,
.tag-list,
.card-users {
    display: grid;
    gap: 12px;
}

.card-container,
.feed-grid,
.style-grid,
.prediction-grid,
.page-grid,
.auth-grid,
.dashboard-grid,
.info-grid,
.secrets-list,
.forum-topic-list {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feed-main .feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.upload-main {
    align-items: center;
}

.upload-main .upload-window-card {
    width: min(620px, 100%);
}

.upload-main .upload-form .field-group + .field-group {
    margin-top: 10px;
}

.upload-main .upload-window-card > .actions-row {
    margin-top: 18px;
}

.alert {
    margin: 0 0 14px;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid rgba(195, 42, 27, 0.4);
    background: rgba(195, 42, 27, 0.15);
    color: #ff6b6b;
    font-size: 1.05rem;
    line-height: 1.5;
}

.alert .close {
    float: right;
    font-size: 1.2rem;
    font-weight: 700;
    color: inherit;
    opacity: 0.6;
    background: none;
    border: none;
    padding: 0;
    margin: -2px 0 0 12px;
    cursor: pointer;
    min-height: auto;
    line-height: 1;
}

.alert .close:hover {
    opacity: 1;
    background: none;
    transform: none;
}

.alert.fade {
    opacity: 1;
    transition: opacity 0.15s ease;
}

.alert.fade:not(.in) {
    opacity: 0;
}

.alert-success,
.success {
    border-color: var(--border-success);
    background: var(--success-soft);
    color: #4ade80;
}

.alert-warning {
    border-color: var(--border-warning);
    background: var(--warning-soft);
    color: var(--text-primary);
}

.alert-danger,
.error {
    border-color: var(--border-danger);
    background: rgba(195, 42, 27, 0.15);
}

.validation.validation-summary-valid {
    display: none;
}

.visible,
.active {
    opacity: 1;
    transform: translateY(0);
}

button,
.btn,
.button,
.primary,
.btn-primary,
.button-primary,
.button-secondary,
.secondary-btn,
.button-link,
.header-link-button,
.link-button,
.top-nav-link,
.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid var(--transparent);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

button,
.btn,
.primary,
.btn-primary,
.button,
.button-primary,
.button-link,
.top-nav-link-primary {
    background: var(--accent-primary);
    color: #ffffff;
}

button:hover,
.btn:hover,
.primary:hover,
.btn-primary:hover,
.button:hover,
.button-primary:hover,
.button-link:hover,
.top-nav-link-primary:hover {
    background: #0074ff;
    color: #ffffff;
    transform: translateY(-1px);
}

.ghost,
.secondary-btn,
.button-secondary,
.btn-secondary,
.header-link-button,
.link-inline,
.crumb-link,
.top-nav-link-muted,
.top-nav-link,
.nav-link,
.link-button,
.logout-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.ghost:hover,
.secondary-btn:hover,
.button-secondary:hover,
.btn-secondary:hover,
.header-link-button:hover,
.link-inline:hover,
.crumb-link:hover,
.top-nav-link-muted:hover,
.top-nav-link:hover,
.nav-link:hover,
.link-button:hover,
.logout-button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.nav-link.active,
.top-nav-link.active {
    background: rgba(86, 32, 245, 0.22);
    border-color: rgba(86, 32, 245, 0.65);
    color: #ffffff;
}

label,
.input-label,
.tags-label,
.balance-label,
.secret-label,
.search-label,
.eyebrow {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #d5d7dd;
    letter-spacing: 0.01em;
}

input,
select,
textarea,
.form-control,
.input-field,
.input-area,
.upload-input,
.file-picker {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border-secondary);
    background: rgba(255, 255, 255, 0.02);
    color: #ffffff !important;
    font: inherit;
    padding: 10px 12px;
}

textarea,
.input-area {
    min-height: 92px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.input-field:focus,
.input-area:focus,
.upload-input:focus,
.file-picker:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 0 0 3px rgba(86, 32, 245, 0.15);
}

.form-field,
.form-group,
.field-group,
.form-stack,
.search-wrap,
.search-inline,
.captcha-row,
.action-row,
.actions-row,
.inline-actions,
.secret-action-row,
.form-actions,
.button-row {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.form-actions,
.action-row,
.actions-row,
.inline-actions,
.secret-action-row,
.button-row,
.header-actions {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: start;
    align-items: center;
}

.feed-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.feed-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.feed-topbar .search-wrap {
    flex: 1 1 320px;
    max-width: 420px;
    margin: 0 0 0 auto;
}

.captcha-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.captcha-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 56px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.captcha-image-wrap img {
    background: #ffffff;
    border-radius: 8px;
    cursor: pointer;
}

.file-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.file-trigger {
    display: inline-flex;
    margin: 0;
    flex: 0 0 auto;
    min-height: 40px;
    border-radius: 999px;
    padding: 9px 20px;
}

.visually-hidden-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.file-picker-row .file-name {
    flex: 1 1 220px;
    min-width: 0;
}

.feed-main #tagFilterRow {
    margin-bottom: 18px;
}

.feed-main .feed-card {
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #12141c;
    border-color: rgba(255, 255, 255, 0.08);
}

.feed-main .feed-player-wrap {
    width: 100%;
    min-height: 240px;
    max-height: 420px;
    background: #080808;
    overflow: hidden;
}

.feed-main .feed-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #080808;
}

.feed-main .feed-card-content {
    padding: 18px 20px 20px;
}

.feed-main .card-title {
    font-size: clamp(18px, 1.4vw, 22px);
    font-weight: 700;
    margin-bottom: 12px;
}

.feed-main .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.feed-main .feed-card-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.feed-main .feed-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.action-spinner {
    display: none;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.action-spinner.visible {
    display: inline-flex;
}

.loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

.feed-like-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    color: #c5c6d1;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.feed-like-button:hover:not(:disabled) {
    color: #ffffff;
    border-color: rgba(86, 32, 245, 0.6);
    background: rgba(86, 32, 245, 0.15);
}

.feed-like-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.feed-like-icon {
    color: #ffffff;
    line-height: 1;
}

.feed-like-icon.active {
    color: #ff6b6b;
}

.feed-like-count {
    color: inherit;
}

.app-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.app-modal[hidden] {
    display: none;
}

.app-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(8px);
}

.app-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    padding: 24px;
    border-radius: 22px;
    border: 1px solid var(--border-violet);
    background: linear-gradient(145deg, #161922 0%, #0d0f14 100%);
    box-shadow: var(--shadow-soft);
}

.app-modal-title {
    margin: 0 0 10px;
    font-size: clamp(20px, 1.8vw, 26px);
    color: #ffffff;
}

.app-modal-copy {
    margin: 0 0 20px;
    line-height: 1.6;
}

.app-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.tag,
.user-chip,
.detail-game-pill,
.likes-pill,
.insight-badge,
.chip,
.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--text-primary-soft-18);
    background: var(--surface-fill-74);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
}

.compact-chip-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.compact-chip-row .chip {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 12px;
    font: inherit;
    font-weight: 600;
    white-space: nowrap;
}

.compact-chip-row .chip.active {
    background: rgba(86, 32, 245, 0.22);
    border-color: rgba(86, 32, 245, 0.65);
    color: #ffffff;
}

.compact-chip-row::-webkit-scrollbar {
    height: 4px;
}

.compact-chip-row::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

.user-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.9rem;
    padding: 6px 14px;
}

img.flag {
    border-radius: 0;
    border: none;
    padding: 0;
    min-height: auto;
    background: transparent;
}

/* ── Balance section (account page) ── */

.balance-section {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.balance-section .card-header {
    display: flex;
    align-items: center;
}

.balance-badge {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 0;
    min-height: auto;
    border-radius: 0;
}

.balance-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

.balance-value {
    font-size: clamp(1.75rem, 2.8vw, 2.5rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.info-grid {
    gap: 20px;
}

.info-block {
    background: #12141c;
    border: 1px solid var(--border-secondary);
    border-radius: 16px;
    padding: clamp(18px, 2vw, 24px);
    transition: border-color 0.2s ease;
}

.info-block:hover {
    border-color: rgba(86, 32, 245, 0.35);
}

.info-block h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
}

.info-block p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 8px;
}

.info-block p:last-child {
    margin-bottom: 0;
}

/* ── Inner card (food form) ── */

.inner-card {
    background: #12141c;
    border: 1px solid var(--border-secondary);
    border-radius: 16px;
    padding: clamp(20px, 2.2vw, 28px);
    box-shadow: none;
}

.inner-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px;
}

.food-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.food-form label {
    font-size: 0.9rem;
    color: #d5d7dd;
    font-weight: 500;
    margin: 0;
}

.food-form select {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #4a4a55;
    color: #ffffff;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 1rem;
    appearance: none;
    cursor: pointer;
}

.food-form select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(86, 32, 245, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

.food-form select option {
    background: #12141c;
    color: #ffffff;
}

.food-form .btn.primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    padding: 14px;
    font-size: 1.05rem;
    border-radius: 10px;
}

.food-form .btn.primary:hover:not(:disabled) {
    background: #0074ff;
}

.food-form .btn.primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.balance-section > .link-button {
    display: block;
    text-align: center;
    background: transparent;
    border: none;
    padding: 0;
    min-height: auto;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.balance-section > .link-button:hover {
    color: #ffffff;
    text-decoration: underline;
    background: transparent;
    transform: none;
}

/* ── Support card ── */

.support-card {
    background: #12141c;
    border: none;
    border-radius: 20px;
    padding: clamp(28px, 3vw, 48px);
    width: min(560px, 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.support-card h2 {
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    color: #ffffff;
    margin: 0 0 6px;
}

.support-card .page-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 24px;
}

.support-card form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.support-card textarea {
    background: transparent;
    border: 1px solid #4a4a55;
    color: #ffffff;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 1rem;
    min-height: 120px;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.support-card textarea:focus {
    border-color: var(--accent-primary);
    background: transparent;
    box-shadow: 0 0 0 3px rgba(86, 32, 245, 0.15);
}

.support-card textarea::placeholder {
    color: var(--text-secondary);
}

.support-card button[type="submit"] {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 10px;
}

.support-card button[type="submit"]:hover {
    background: #0074ff;
}

.support-response {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    padding: 16px;
}

.support-response h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
}

.support-response pre {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.55;
    font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
}

/* ── Toast ── */

.toast {
    position: fixed;
    top: calc(var(--header-height) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    z-index: 100;
    min-width: 280px;
    max-width: 460px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast.success {
    background: rgba(103, 173, 91, 0.18);
    border: 1px solid rgba(103, 173, 91, 0.55);
    color: #4ade80;
}

.toast.error {
    background: rgba(195, 42, 27, 0.15);
    border: 1px solid rgba(195, 42, 27, 0.4);
    color: #ff6b6b;
}

.price-output {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 4px 0;
}

/* ── Account / Secrets pages ── */

.account-header {
    margin-bottom: 28px;
}

.account-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px;
}

.account-header .page-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.landing-hero {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
    padding-top: clamp(2rem, 8vh, 5rem);
}

.landing-hero h2 {
    font-size: clamp(1.8rem, 2.8vw, 2.5rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px;
}

.landing-hero .action-row {
    justify-content: center;
    margin-top: 20px;
}

.info-article {
    max-width: 100%;
    margin: 0 0 32px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.info-article h3 {
    font-size: 2.4rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 24px;
}

.info-article p {
    font-size: 1.05rem;
    color: #ffffff;
    line-height: 1.75;
    margin: 0 0 18px;
}

.info-article p:last-child {
    margin-bottom: 0;
}

.info-article .accent-text {
    color: var(--accent-primary);
    font-weight: 600;
}

.secret-link {
    color: var(--accent-primary);
    font-weight: 600;
    word-break: break-all;
}

.secret-link:hover {
    color: #ffffff;
}

.secret-item {
    margin-bottom: 20px;
}

.secret-item .secret-label {
    display: block;
    margin-bottom: 4px;
}

.secret-item .secret-value {
    display: block;
    margin-bottom: 14px;
}

.empty-state {
    text-align: center;
    padding: 40px 0;
}

.empty-state p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

.form-error {
    font-size: 1rem;
    color: #ff6b6b;
    margin-top: 6px;
}

.secret-output-wrap {
    max-width: 560px;
}

/* ── Misc text helpers ── */

.secret-output,
.secret-value,
.feed-state,
.preview-meta,
.card-meta,
.card-subtext,
.topic-meta,
.user-mini-text,
.status-message,
.status-line,
.file-name,
.detail-text {
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.message {
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.chat-panel {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
    flex: 1;
    grid-template-rows: 1fr auto;
}

.chat-messages {
    min-height: 0;
    max-height: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 20px 0;
    box-shadow: none;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.18);
}

.message {
    display: flex;
    margin-bottom: 16px;
}

.message-assistant {
    justify-content: flex-start;
}

.message-user {
    justify-content: flex-end;
}

.bubble {
    max-width: min(82%, 680px);
    padding: 12px 16px;
    border-radius: 16px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    white-space: pre-wrap;
    line-height: 1.55;
    font-size: var(--text-base);
}

.message-user .bubble {
    background: var(--accent-primary);
    color: #ffffff;
    border-radius: 16px 16px 4px 16px;
}

.message-assistant .bubble {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px 16px 16px 4px;
}

.message.thinking .bubble {
    opacity: 0.5;
    animation: pulse-thinking 1.8s ease-in-out infinite;
}

@keyframes pulse-thinking {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

.chat-input-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: end;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.chat-input-bar textarea {
    background: transparent;
    border: none;
    padding: 6px 0;
    min-height: 24px;
    resize: none;
    color: var(--text-primary);
}

.chat-input-bar textarea:focus {
    outline: none;
    box-shadow: none;
    border: none;
    background: transparent;
}

.chat-input-bar button {
    width: auto;
    min-height: 36px;
    padding: 6px 16px;
    border-radius: 10px;
}

.divider {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(86, 32, 245, 0.35) 50%, transparent 100%);
    margin: 10px 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent-soft-45);
    outline-offset: 2px;
}

/* ── Auth page two-column layout ── */

.auth-layout {
    display: grid;
    grid-template-columns: minmax(280px, 520px) minmax(280px, 460px);
    flex: 1;
    min-height: calc(100vh - var(--header-height));
    width: min(1100px, 100%);
    margin: 0 auto;
    padding: 2rem 3rem;
    align-items: start;
    padding-top: clamp(3rem, 12vh, 8rem);
    gap: 4rem;
    justify-content: center;
}

.welcome-section {
    width: 100%;
    max-width: 520px;
}

.welcome-title {
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 1.25rem;
    color: var(--text-primary);
}

.welcome-title .accent-text {
    color: var(--accent-primary);
    text-shadow: 0 0 20px rgba(86, 32, 245, 0.4);
}

.welcome-description {
    font-size: 1.05rem;
    color: #ffffff;
    line-height: 1.65;
    margin: 0 0 2rem;
    max-width: 50ch;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--text-primary);
    padding: 0;
}

.feature-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
}

.form-section {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.pathtraversal-shell > .main {
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0;
    display: grid;
    justify-items: center;
    align-content: start;
}

.pathtraversal-shell > :is(.main, .app-content) {
    margin-left: 0;
}

.pathtraversal-shell:has(> .sidebar) > :is(.main, .app-content) {
    margin-left: var(--sidebar-width);
}

.pathtraversal-shell:has(> .sidebar) > .main {
    padding-right: var(--sidebar-width);
}

.pathtraversal-shell > .sidebar {
    background: transparent;
}

.pathtraversal-shell .auth-layout {
    width: min(960px, 100%);
    margin: 0 auto;
    padding-top: clamp(1rem, 4vh, 2.5rem);
    padding-left: clamp(16px, 2vw, 24px);
    padding-right: clamp(16px, 2vw, 24px);
    grid-template-columns: minmax(280px, 420px) minmax(280px, 420px);
    align-items: start;
    justify-content: center;
}

.pathtraversal-shell .form-section {
    justify-content: center;
}

.pathtraversal-shell .welcome-section {
    max-width: 420px;
}

.pathtraversal-shell .welcome-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.02em;
}

/* ── IMAGICK photo booth layout ── */

body:has(.upload-form),
body:has(.preview-stage) {
    background:
        radial-gradient(720px 360px at 50% 0%, rgba(86, 32, 245, 0.18) 0%, rgba(86, 32, 245, 0) 72%),
        radial-gradient(680px 420px at 100% 100%, rgba(49, 19, 168, 0.18) 0%, rgba(49, 19, 168, 0) 68%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 18%),
        var(--fill-page-bg);
}

body:has(.upload-form) .content-shell,
body:has(.preview-stage) .content-shell {
    position: relative;
    width: min(100%, 1480px);
    margin-inline: auto;
    display: grid;
    gap: 18px;
}

body:has(.upload-form) .content-shell::before,
body:has(.preview-stage) .content-shell::before {
    content: "PHOTO BOOTH";
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border-violet);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

body:has(.upload-form) .page-title,
body:has(.preview-stage) .page-title {
    margin-bottom: 0;
    font-size: clamp(32px, 3vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    max-width: 11ch;
}

body:has(.upload-form) .page-subtitle,
body:has(.preview-stage) .page-subtitle {
    max-width: 64ch;
    font-size: clamp(14px, 1vw, 16px);
    line-height: 1.7;
}

body:has(.upload-form) .workspace,
body:has(.preview-stage) .workspace {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 380px);
    gap: clamp(20px, 2.2vw, 30px);
    align-items: start;
    padding: 8px 0 0;
    max-width: 100%;
}

body:has(.upload-form) .workspace::before,
body:has(.preview-stage) .workspace::before {
    display: none;
}

body:has(.upload-form) .upload-card,
body:has(.preview-stage) .preview-card {
    position: relative;
    display: grid;
    gap: 14px;
    align-content: start;
    padding: clamp(22px, 2vw, 30px);
    border-radius: 28px;
    border-color: rgba(86, 32, 245, 0.42);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 18%),
        linear-gradient(145deg, #161922 0%, #0d0f14 100%);
    overflow: hidden;
}

body:has(.upload-form) .upload-card::before,
body:has(.upload-form) .upload-card::after {
    display: none;
}

body:has(.upload-form) .upload-card > .section-title,
body:has(.upload-form) .upload-card > .section-copy,
body:has(.preview-stage) .preview-meta {
    position: relative;
    z-index: 1;
}

body:has(.upload-form) .upload-card > .section-title,
body:has(.preview-stage) .preview-current {
    margin-top: 26px;
    margin-bottom: 0;
    font-size: clamp(18px, 1.6vw, 24px);
    letter-spacing: -0.02em;
    width: fit-content;
}

body:has(.upload-form) .upload-card > .section-copy {
    width: fit-content;
    max-width: min(100%, 52ch);
    margin: 0;
    font-size: clamp(13px, 0.9vw, 14px);
}

body:has(.preview-stage) .preview-meta {
    max-width: 62ch;
}

body:has(.upload-form) .upload-form {
    display: grid;
    gap: 14px;
    padding: clamp(16px, 1.6vw, 22px);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body:has(.upload-form) .file-picker {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.16);
}

body:has(.upload-form) .file-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

body:has(.upload-form) .file-name .file-name-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body:has(.upload-form) .file-picker label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 100px;
    margin: 0;
    min-height: 34px;
    padding: 6px 0;
    border-radius: 10px;
    background: var(--accent-primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

body:has(.upload-form) .file-picker label:hover {
    background: #0074ff;
    transform: translateY(-1px);
}

body:has(.upload-form) .file-picker input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body:has(.upload-form) .upload-card .button-row {
    grid-auto-columns: max-content;
    justify-content: start;
}

body:has(.upload-form) .upload-card .button {
    width: 100px;
    min-height: 34px;
    padding: 6px 0;
    border-radius: 10px;
    font-size: 13px;
}

body:has(.preview-stage) .preview-card {
    grid-template-rows: minmax(0, 1fr) auto;
}

body:has(.preview-stage) .preview-stage {
    position: relative;
    margin: 28px 0 0;
    min-height: 0;
    border-radius: 28px;
    padding: clamp(20px, 2vw, 28px);
    background:
        radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%),
        #07080b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

body:has(.preview-stage) .preview-stage::before,
body:has(.preview-stage) .preview-stage::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body:has(.preview-stage) .preview-stage::before {
    left: 14px;
}

body:has(.preview-stage) .preview-stage::after {
    right: 14px;
}

body:has(.preview-stage) .preview-image {
    width: 100%;
    height: min(68vh, 760px);
    object-fit: contain;
    border-radius: 20px;
    background: #0b0c10;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

body:has(.preview-stage) .preview-meta {
    display: grid;
    gap: 16px;
    padding: 18px 20px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body:has(.preview-stage) .preview-meta .button-row {
    gap: 12px;
    flex-wrap: wrap;
}

body:has(.preview-stage) .preview-meta .button {
    min-height: 46px;
    border-radius: 14px;
}

body:has(.upload-form) .effects-panel,
body:has(.preview-stage) .effects-panel {
    position: relative;
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 24px 20px 20px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 22%),
        linear-gradient(145deg, #141720 0%, #0c0e12 100%);
    border-color: rgba(255, 255, 255, 0.08);
    max-height: min(70vh, 600px);
    overflow-y: auto;
}

body:has(.upload-form) .effects-panel::before,
body:has(.preview-stage) .effects-panel::before {
    content: "style reel";
    display: inline-flex;
    align-items: center;
    justify-self: start;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

body:has(.upload-form) .effects-panel .section-title,
body:has(.preview-stage) .effects-panel .section-title {
    margin-bottom: 0;
    font-size: clamp(20px, 1.5vw, 26px);
}

body:has(.upload-form) .style-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

body:has(.upload-form) .style-grid li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
}

body:has(.upload-form) .style-grid li::after {
    content: "ready";
    flex-shrink: 0;
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body:has(.preview-stage) .effect-list {
    display: grid;
    gap: 10px;
}

body:has(.preview-stage) .effect-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    text-align: left;
    transform: none;
    white-space: nowrap;
}

body:has(.preview-stage) .effect-button:hover {
    border-color: rgba(86, 32, 245, 0.55);
    background: rgba(86, 32, 245, 0.14);
}

body:has(.preview-stage) .effect-button.active {
    border-color: rgba(86, 32, 245, 0.72);
    background:
        linear-gradient(135deg, rgba(86, 32, 245, 0.24) 0%, rgba(86, 32, 245, 0.08) 100%),
        rgba(255, 255, 255, 0.04);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

body:has(.preview-stage) .effect-name {
    font-size: 15px;
    font-weight: 700;
}

body:has(.preview-stage) .effect-status {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── IMAGICK page overrides ── */

body.imagick-page .content-shell::before {
    display: none;
}

body.imagick-page .content-shell {
    align-content: start;
}

body.imagick-page .page-title {
    font-size: clamp(22px, 2vw, 32px);
    max-width: 100%;
    margin-bottom: 0;
}

body.imagick-page .page-subtitle {
    max-width: 48ch;
    font-size: clamp(13px, 0.9vw, 15px);
    margin-bottom: 0;
}

/* ── Forecast / Zodiac prediction page ── */

.intake-page {
    max-width: 720px;
    margin: 0 auto;
    gap: 28px;
}

.hero-panel {
    text-align: center;
    padding: clamp(28px, 4vw, 48px) 0 0;
}

.hero-panel h2 {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px;
    line-height: 1.2;
}

.hero-description {
    max-width: 52ch;
    margin: 0 auto 20px;
    font-size: clamp(13px, 0.95vw, 15px);
    color: var(--text-secondary);
    line-height: 1.65;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-violet);
    background: var(--accent-soft-14);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin: 0 0 18px;
}

.feature-strip {
    display: flex;
    align-items: center;
    margin-top: 24px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-secondary);
    background: var(--surface-fill-95);
}

.feature-strip span {
    flex: 1;
    padding: 11px 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-right: 1px solid var(--border-secondary);
    transition: color 0.2s ease, background 0.2s ease;
}

.feature-strip span:last-child {
    border-right: none;
}

.feature-strip span:hover {
    color: var(--text-primary);
    background: var(--surface-fill-86);
}

.forecast-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: end;
}

.forecast-form .birth-grid {
    display: contents;
}

.forecast-form .field-group {
    margin-bottom: 0;
}

.forecast-form input,
.forecast-form select {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-secondary);
    border-radius: 0;
    padding: 10px 4px;
    min-height: 38px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.forecast-form input:focus,
.forecast-form select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 2px 0 0 var(--accent-primary);
    outline: none;
    background: transparent;
    border-radius: 0;
}

.forecast-form button[type="submit"] {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.result-page {
    max-width: 860px;
    margin: 0 auto;
}

.result-page .prediction-card {
    text-align: center;
    padding: clamp(24px, 3vw, 40px);
    background: transparent;
    border: none;
    box-shadow: none;
}

.result-page .prediction-card h2 {
    font-size: clamp(1.4rem, 2.2vw, 1.9rem);
    font-weight: 800;
    margin: 0 0 8px;
}

.result-page .result-lead {
    font-size: clamp(16px, 1.2vw, 20px);
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 28px;
    letter-spacing: 0.01em;
}

.result-page .insight-card {
    background: transparent;
    border-color: var(--border-secondary);
    box-shadow: none;
}

.result-page .prediction-grid {
    text-align: left;
    margin-bottom: 24px;
}

/* ── Sidebar-as-left-column layout ── */

.app-shell > .sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    z-index: 6;
    width: var(--sidebar-width);
    border-bottom: none;
    border-right: none;
    padding: clamp(18px, 2.4vw, 28px) clamp(14px, 1.8vw, 22px);
    overflow-y: auto;
    background: transparent;
}

.app-shell > .sidebar .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.app-shell > .sidebar .nav-link {
    justify-content: flex-start;
    min-height: auto;
    padding: 9px 2px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: clamp(14px, 1.05vw, 16px);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
    transform: none;
}

.app-shell > .sidebar .nav-link:hover {
    background: transparent;
    color: var(--text-primary);
    text-decoration-color: var(--accent-soft-32);
}

.app-shell > .sidebar .nav-link.active {
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-decoration-color: var(--text-primary);
}

.app-shell > .sidebar .nav-link.active:hover {
    text-decoration-color: var(--text-primary);
}

.app-shell:has(> .sidebar) > :is(.main, .app-content) {
    width: auto;
    max-width: none;
    min-width: 0;
    margin-left: var(--sidebar-width);
}

/* ── SQLi — Friends-style list ── */

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

.friends-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.friends-card:last-child {
    border-bottom: none;
}

.friends-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.friends-name {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.friends-name:hover {
    text-decoration: underline;
    color: #c9bcff;
}

.friends-meta {
    color: var(--text-secondary);
    font-size: 13px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friends-card .like-form,
.rank-item .like-form {
    margin-top: 0;
    padding-top: 0;
    flex-shrink: 0;
}

/* ── SQLi — Search container ── */

.search-container {
    margin-bottom: 20px;
}

.search-container form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-container input {
    flex: 1;
    max-width: 560px;
}

/* ── SQLi — Player card (Steam-style) ── */

.player-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100%;
    padding: clamp(18px, 1.8vw, 24px);
    border: 1px solid var(--border-secondary);
    border-radius: 18px;
    background: var(--fill-secondary);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.player-card::before {
    display: none;
}

.player-card:hover {
    border-color: var(--border-violet);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.card-link {
    position: relative;
    z-index: 1;
    font-size: clamp(18px, 1.45vw, 22px);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.card-link:hover {
    color: var(--text-primary);
}

.player-card .card-meta {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-secondary);
    margin: 0;
}

.player-card .tag-list {
    list-style: none;
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-card .tag {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--surface-fill-74);
    border: 1px solid var(--border-secondary);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ── SQLi — Game card (Steam-style) ── */

.game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100%;
    padding: clamp(18px, 1.8vw, 24px);
    border: 1px solid var(--border-secondary);
    border-radius: 18px;
    background: var(--fill-secondary);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.game-card::before {
    display: none;
}

.game-card:hover {
    border-color: var(--border-violet);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.game-card-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-secondary);
}

.game-card-head .game-title {
    margin: 0;
    font-size: clamp(18px, 1.45vw, 22px);
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    letter-spacing: -0.02em;
}

.game-card .card-subtext {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-secondary);
    margin: 0;
}

.game-card .likes-pill {
    min-height: 32px;
    padding-inline: 12px;
    border-color: var(--border-violet);
    background: var(--accent-soft-14);
    color: var(--text-primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-users {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.game-card .user-chip {
    min-height: 34px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--surface-fill-74);
    border-color: var(--border-secondary);
    color: var(--text-primary);
}

.like-form {
    margin-top: auto;
    padding-top: 14px;
}

.like-button {
    min-height: 38px;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.like-button:hover {
    background: var(--accent-soft-16);
    border-color: var(--border-violet);
    color: #ffffff;
    transform: translateY(-1px);
}

/* ── SQLi — Rank list (Steam leaderboard) ── */

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

.rank-item {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-item::before {
    display: none;
}

.rank-item:hover {
    border-color: rgba(255, 255, 255, 0.06);
    transform: none;
    box-shadow: none;
}

.rank-position {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: none;
    background: transparent;
    font-size: clamp(18px, 1.5vw, 24px);
    font-weight: 800;
    color: var(--accent-primary);
    text-align: center;
    letter-spacing: -0.02em;
}

.rank-item:nth-child(1) .rank-position {
    color: #ffd700;
}

.rank-item:nth-child(2) .rank-position {
    color: #c0c0c0;
}

.rank-item:nth-child(3) .rank-position {
    color: #cd7f32;
}

.rank-item:nth-child(-n + 3) {
    border-color: var(--border-secondary);
}

.rank-main {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.rank-main h3 {
    margin: 0;
    font-size: clamp(15px, 1.15vw, 18px);
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-main .rank-meta {
    margin: 4px 0 0;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ── SQLi — Detail card ── */

.detail-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.detail-head h3 {
    margin: 0;
    font-size: clamp(20px, 1.8vw, 28px);
    font-weight: 800;
    color: #ffffff;
}

.detail-games {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── PathTraversal — Page header ── */

.page-header {
    margin-bottom: 24px;
}

.page-header .page-title {
    margin-bottom: 4px;
}

.page-header .crumb-link {
    display: inline-flex;
    margin-bottom: 12px;
    font-size: 13px;
}

/* ── PathTraversal — Card head ── */

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-secondary);
}

.card-head .section-title {
    margin: 0;
}

.section-meta {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── PathTraversal — Forum topic items ── */

.forum-topic-list {
    grid-template-columns: 1fr;
    gap: 0;
}

.topic-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 0;
    border: none;
    border-bottom: 1px solid var(--border-secondary);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.topic-item:last-child {
    border-bottom: none;
}

.topic-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.topic-title:hover {
    color: var(--accent-primary);
}

.topic-snippet {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.topic-meta {
    display: flex;
    gap: 16px;
    margin-top: 4px;
}

/* ── PathTraversal — User mini card ── */

.user-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.user-mini-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-mini-avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft-14);
    color: var(--accent-primary);
    font-size: 18px;
    font-weight: 700;
}

.user-mini-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.user-mini-status {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ── PathTraversal — Info list ── */

.info-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-list li {
    position: relative;
    padding-left: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
}

/* ── PathTraversal — Thread & comments ── */

.thread-card {
    margin-bottom: 20px;
}

.thread-content {
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--text-primary);
    margin: 0 0 14px;
    white-space: pre-wrap;
}

.comment-list {
    gap: 0;
    margin-bottom: 20px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border: none;
    border-bottom: 1px solid var(--border-secondary);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar-link {
    flex-shrink: 0;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft-14);
    color: var(--accent-primary);
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.comment-body {
    min-width: 0;
    flex: 1;
}

.comment-author {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.comment-text {
    margin: 0;
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.55;
}

.comment-form {
    display: grid;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border-secondary);
}

/* ── PathTraversal — Profile ── */

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.profile-header .profile-name {
    margin: 0;
}

.profile-avatar-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft-14);
    color: var(--accent-primary);
    font-size: 28px;
    font-weight: 700;
}

/* ── PathTraversal — Narrow card & misc ── */

.card-narrow {
    max-width: 520px;
}

.preview-frame {
    display: flex;
    justify-content: center;
    padding: 8px;
}

.preview-frame img {
    max-height: 70vh;
    border-radius: 12px;
    object-fit: contain;
}

.flag-preview {
    margin: 0;
    padding: 12px;
    border-radius: 10px;
    background: var(--surface-fill-74);
    border: 1px solid var(--border-secondary);
    color: var(--text-primary);
    font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ── PathTraversal — Auth grid overrides ── */

.pathtraversal-shell > :is(.main, .app-content) {
    margin-left: 0;
}

.pathtraversal-shell:has(> .sidebar) > :is(.main, .app-content) {
    margin-left: var(--sidebar-width);
}

.pathtraversal-shell > .sidebar {
    background: transparent;
}

.auth-grid {
    max-width: 860px;
    margin: 0 auto;
    padding-top: clamp(2rem, 6vh, 4rem);
    grid-template-columns: minmax(280px, 1fr) minmax(220px, 300px);
    gap: 24px;
    align-items: start;
}

.auth-grid .card {
    background: var(--fill-secondary);
    border-color: var(--border-secondary);
}

/* ── PathTraversal — Profile page (centered single column) ── */

.profile-page {
    width: min(500px, 100%);
    max-width: 500px;
    min-width: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: clamp(1rem, 4vh, 2rem);
}

.profile-page-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.profile-page-title {
    font-size: var(--text-title);
    font-weight: 800;
    text-align: left;
    color: var(--text-primary);
    margin: 0;
}

.profile-avatar-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.profile-avatar-trigger {
    display: block;
    cursor: pointer;
    list-style: none;
}

.profile-avatar-trigger::-webkit-details-marker {
    display: none;
}

.profile-avatar-link {
    display: block;
}

.profile-avatar-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 2px solid var(--violet-soft-80);
    background: var(--accent-soft-14);
    object-fit: cover;
}

.profile-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-avatar-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    z-index: 5;
    min-width: 190px;
    display: none;
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--border-secondary);
    background: var(--fill-secondary);
    box-shadow: var(--shadow-card);
    transform: translateX(-50%);
}

.profile-avatar-wrap[open] .profile-avatar-menu {
    display: grid;
}

.profile-avatar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.profile-avatar-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    margin-bottom: 12px;
}

.profile-field {
    display: flex;
    flex-direction: column;
}

.profile-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.profile-hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.profile-avatar-hint {
    margin: 4px 0 20px;
    text-align: center;
}

.profile-input {
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-secondary);
    background: transparent;
    color: var(--text-primary) !important;
    font: inherit;
}

.profile-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-soft-14);
}

.profile-submit {
    width: 100%;
    padding: 1rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.profile-submit:hover {
    transform: translateY(-1px);
}

.profile-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.profile-cancel {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem;
    min-height: auto;
}

.profile-cancel:hover {
    color: var(--text-primary);
    background: transparent;
    transform: none;
}

.profile-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
    align-self: flex-start;
}

.profile-page .mini-topic-list {
    width: 100%;
}

.profile-page .divider {
    margin: 16px 0;
}

.user-mini-name {
    text-decoration: none;
}

.user-mini-name:hover {
    color: #ffffff;
    text-decoration: underline;
}

.pathtraversal-column {
    width: min(700px, 100%);
    min-width: 0;
    margin: 0 auto;
}

.pathtraversal-home-column,
.pathtraversal-news-column,
.pathtraversal-preview-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pathtraversal-flat-card {
    background: var(--fill-secondary);
    border-color: var(--border-secondary);
}

.pathtraversal-shell .crumb-link {
    display: inline-flex;
    min-height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transform: none;
}

.pathtraversal-shell .crumb-link:hover {
    background: transparent;
    color: var(--text-primary);
    text-decoration: underline;
}

.pathtraversal-thread-card,
.pathtraversal-discussion-card {
    border: none;
    background: transparent;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

.pathtraversal-thread-card {
    margin-bottom: 12px;
}

.pathtraversal-discussion-card .section-title {
    margin-bottom: 16px;
}

.pathtraversal-preview-card {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* ── PathTraversal — Page grid (forum layout) ── */

.page-grid {
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: 24px;
    align-items: start;
}

.page-grid > .card {
    background: var(--fill-secondary);
    border-color: var(--border-secondary);
}

/* ── PathTraversal — Mini topic list ── */

.mini-topic-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mini-topic-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-secondary);
}

.mini-topic-list li:last-child {
    border-bottom: none;
}

.mini-topic-list a {
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .header,
    .app-header {
        padding-inline: 16px;
    }

    .main,
    .page,
    .main-content,
    .app-content,
    .home-content,
    .feed-main,
    .upload-main,
    .content-shell,
    .workspace,
    .profile-content,
    .profile-container {
        padding: 16px;
    }

    .profile-container {
        width: 100%;
        margin-left: 0;
    }

    .brand-subtitle {
        display: none;
    }

    .form-actions,
    .action-row,
    .actions-row,
    .inline-actions,
    .secret-action-row,
    .button-row,
    .header-actions,
    .header-inner,
    .top-nav,
    .nav {
        grid-auto-flow: row;
        grid-auto-columns: 1fr;
    }

    .app-shell > .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
        padding: 12px 20px;
        border-right: none;
        border-bottom: 1px solid var(--border-secondary);
        overflow: visible;
    }

    .app-shell > .sidebar .nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px 20px;
    }

    .app-shell:has(> .sidebar) > :is(.main, .app-content) {
        margin-left: 0;
    }

    .chat-input-bar {
        grid-template-columns: 1fr auto;
    }

    .feed-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .feed-topbar .search-wrap {
        max-width: none;
        margin-left: 0;
    }

    .feed-main .feed-grid {
        grid-template-columns: 1fr;
    }

    .feed-main .feed-card-actions,
    .app-modal-actions {
        flex-wrap: wrap;
    }

    .auth-layout {
        display: flex;
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 2.5rem;
        align-items: center;
    }

    .welcome-section {
        max-width: 100%;
        text-align: center;
    }

    .welcome-title,
    .welcome-description {
        max-width: 100%;
    }

    .features {
        align-items: center;
    }

    .form-section {
        justify-content: center;
        width: 100%;
    }

    body:has(.upload-form) .content-shell,
    body:has(.preview-stage) .content-shell {
        gap: 14px;
    }

    body:has(.upload-form) .workspace,
    body:has(.preview-stage) .workspace {
        grid-template-columns: 1fr;
    }

    body:has(.upload-form) .upload-card,
    body:has(.preview-stage) .preview-card {
        min-height: auto;
    }

    body:has(.preview-stage) .preview-image {
        height: min(58vh, 560px);
    }

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

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

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

    .profile-page {
        width: 100%;
        padding: 0 16px;
    }

    .pathtraversal-shell > :is(.main, .app-content) {
        margin-left: 0;
    }

    .pathtraversal-shell > .main {
        padding-right: 0;
        justify-items: stretch;
    }

    .pathtraversal-column {
        width: 100%;
        min-width: 0;
    }

    .profile-page {
        margin: 0 auto;
    }

    .profile-page-head {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .card-container,
    .feed-grid,
    .style-grid,
    .prediction-grid,
    .page-grid,
    .auth-grid,
    .dashboard-grid,
    .info-grid,
    .secrets-list,
    .forum-topic-list,
    .effect-list {
        grid-template-columns: 1fr;
    }

    .brand-title,
    .page-title,
    .section-title {
        font-size: 18px;
    }

    .bubble {
        max-width: 100%;
    }

    body:has(.upload-form) .page-title,
    body:has(.preview-stage) .page-title {
        max-width: none;
        font-size: clamp(28px, 9vw, 40px);
    }

    body:has(.upload-form) .upload-card,
    body:has(.preview-stage) .preview-card,
    body:has(.upload-form) .effects-panel,
    body:has(.preview-stage) .effects-panel {
        padding: 18px 16px;
        border-radius: 22px;
    }

    body:has(.upload-form) .upload-form {
        padding: 16px;
    }

    body:has(.preview-stage) .preview-stage {
        padding: 14px;
        border-radius: 20px;
    }

    body:has(.preview-stage) .preview-image {
        height: min(52vh, 420px);
        border-radius: 16px;
    }

    .forecast-form {
        grid-template-columns: 1fr;
    }

    .feature-strip {
        flex-wrap: wrap;
    }

    .feature-strip span {
        flex: 1 1 40%;
    }
}
