:root {
    --tvf-ink: #30252a;
    --tvf-muted: #786b6d;
    --tvf-line: #e7dcd3;
    --tvf-soft: #f6efe7;
    --tvf-brand: #9a4f43;
    --tvf-brand-dark: #74372f;
    --tvf-accent: #d1a05d;
    --tvf-white: #fffdf9;
    --tvf-shadow: 0 16px 38px rgba(80, 48, 39, .09);
}

.tvf-app, .tvf-app * { box-sizing: border-box; }
.tvf-app { color: var(--tvf-ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; max-width: 1040px; margin: 32px auto 72px; padding: 0 20px; }
.tvf-app a { color: var(--tvf-brand); text-decoration: none; }
.tvf-app a:hover { color: var(--tvf-brand-dark); }
.tvf-hero { align-items: flex-end; background: linear-gradient(135deg, #3b2c31 0%, #633b38 58%, #9a4f43 100%); border: 1px solid rgba(255,255,255,.12); border-radius: 30px; box-shadow: 0 24px 54px rgba(62,38,35,.18); color: #fff; display: flex; gap: 42px; justify-content: space-between; overflow: hidden; padding: 50px 52px; position: relative; }
.tvf-hero::after { background: rgba(255,255,255,.08); border-radius: 50%; content: ""; height: 280px; position: absolute; right: -80px; top: -120px; width: 280px; }
.tvf-eyebrow { color: #f0cfa7; display: block; font-size: 12px; font-weight: 800; letter-spacing: .13em; margin-bottom: 10px; text-transform: uppercase; }
.tvf-hero-title { color: #fff; font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; font-size: clamp(32px, 4vw, 52px); font-weight: 750; letter-spacing: -.045em; line-height: 1.06; margin: 0; max-width: 720px; }
.tvf-hero p { color: #f1ded4; font-size: 17px; margin: 16px 0 0; max-width: 670px; }
.tvf-stats { display: flex; gap: 12px; position: relative; z-index: 1; }
.tvf-stats div { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 16px; min-width: 92px; padding: 14px 16px; text-align: center; }
.tvf-stats strong, .tvf-stats span { display: block; }
.tvf-stats strong { color: #fff; font-size: 24px; }
.tvf-stats span { color: #f1ded4; font-size: 12px; margin-top: 3px; }
.tvf-toolbar { align-items: center; display: flex; gap: 16px; justify-content: space-between; margin: 24px 0 18px; }
.tvf-search { align-items: stretch; background: #fff; border: 1px solid var(--tvf-line); border-radius: 999px; display: flex; flex: 1; max-width: 460px; overflow: hidden; padding: 3px; }
.tvf-app .tvf-search input[type="search"] { border: 0; border-radius: 999px; box-shadow: none; font: inherit; margin: 0; min-width: 0; outline: 0; padding: 10px 14px; width: 100%; }
.tvf-search button { background: var(--tvf-ink); border: 0; border-radius: 999px; color: #fff; cursor: pointer; flex: 0 0 auto; font-weight: 700; min-height: 42px; padding: 0 20px; }
.tvf-button { align-items: center; background: var(--tvf-brand); border: 0; border-radius: 999px; color: #fff !important; cursor: pointer; display: inline-flex; font: inherit; font-weight: 750; justify-content: center; padding: 13px 21px; }
.tvf-button:hover { background: var(--tvf-brand-dark); }
.tvf-categories { display: flex; gap: 9px; margin-bottom: 26px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: thin; }
.tvf-categories a { align-items: center; background: var(--tvf-soft); border: 1px solid transparent; border-radius: 999px; color: var(--tvf-muted); display: flex; flex: 0 0 auto; font-size: 14px; font-weight: 700; gap: 8px; padding: 9px 14px; }
.tvf-categories a small { background: #fff; border-radius: 99px; color: var(--tvf-muted); padding: 1px 7px; }
.tvf-categories a.is-active { background: #f2dfd5; border-color: #ddbaaa; color: var(--tvf-brand-dark); }
.tvf-section-title { align-items: center; display: flex; justify-content: space-between; margin: 10px 0 13px; }
.tvf-section-title h2, .tvf-discussion h2, .tvf-form-card h2, .tvf-profile h2 { color: var(--tvf-ink); font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; font-size: 23px; font-weight: 750; letter-spacing: -.025em; margin: 0; }
.tvf-topic-list { display: grid; gap: 12px; }
.tvf-topic-results { display: grid; gap: 12px; transition: opacity .18s ease; }
.tvf-topic-results.is-loading { opacity: .45; pointer-events: none; }
.tvf-topic-card { align-items: center; background: var(--tvf-white); border: 1px solid var(--tvf-line); border-radius: 22px; display: grid; gap: 18px; grid-template-columns: 54px minmax(0,1fr) 72px; padding: 21px 23px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.tvf-topic-card:hover { border-color: #d7b9aa; box-shadow: var(--tvf-shadow); transform: translateY(-2px); }
.tvf-avatar img, .tvf-post aside img { border-radius: 50%; display: block; }
.tvf-topic-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 7px; }
.tvf-chip { background: #f2dfd5; border-radius: 999px; color: var(--tvf-brand-dark); display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .02em; padding: 4px 9px; text-transform: uppercase; }
.tvf-chip--ai { background: #f5e9ff; color: #70429a; }
.tvf-topic-main h3 { font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; font-size: 20px; font-weight: 750; letter-spacing: -.025em; line-height: 1.25; margin: 0; }
.tvf-topic-main h3 a { color: var(--tvf-ink); }
.tvf-topic-main p { color: var(--tvf-muted); font-size: 14px; line-height: 1.55; margin: 7px 0; }
.tvf-byline { color: #8790a2; font-size: 12px; }
.tvf-replies { border-left: 1px solid var(--tvf-line); color: var(--tvf-muted); padding-left: 18px; text-align: center; }
.tvf-replies strong, .tvf-replies span { display: block; }
.tvf-replies strong { color: var(--tvf-ink); font-size: 20px; }
.tvf-replies span { font-size: 11px; }
.tvf-notice { border-radius: 12px; font-weight: 650; margin-bottom: 18px; padding: 13px 16px; }
.tvf-notice--success { background: #e4f5ec; color: #23623d; }
.tvf-notice--info { background: #e7f2fa; color: #255a7d; }
.tvf-notice--error { background: #fdecec; color: #8d3232; }
.tvf-auth, .tvf-form-card { background: var(--tvf-white); border: 1px solid var(--tvf-line); border-radius: 24px; box-shadow: var(--tvf-shadow); margin: 20px 0 28px; padding: 28px; }
.tvf-auth { display: grid; gap: 30px; grid-template-columns: 1fr 1fr; }
.tvf-auth[hidden], .tvf-form-card[hidden] { display: none; }
.tvf-auth > div + div { border-left: 1px solid var(--tvf-line); padding-left: 30px; }
.tvf-auth h2 { font-size: 20px; margin: 0 0 15px; }
.tvf-auth-intro { grid-column: 1 / -1; margin: 0; }
.tvf-app label { color: var(--tvf-ink); display: block; font-size: 13px; font-weight: 700; margin: 13px 0; }
.tvf-app input[type="text"], .tvf-app input[type="email"], .tvf-app input[type="password"], .tvf-app input[type="search"], .tvf-app textarea, .tvf-app select { background: #fff; border: 1px solid #ccd2dc; border-radius: 10px; color: var(--tvf-ink); display: block; font: inherit; margin-top: 6px; padding: 11px 12px; width: 100%; }
.tvf-app textarea { line-height: 1.55; resize: vertical; }
.tvf-auth .tvf-button { margin-right: 12px; }
.tvf-hp { left: -9999px !important; position: absolute !important; }
.tvf-upload-modern { align-items: center; background: linear-gradient(135deg,#fffdf9,#f7eee7); border: 1px dashed #d5aa98; border-radius: 18px; display: flex; gap: 15px; margin: 16px 0; min-height: 92px; padding: 14px; transition: border-color .2s, box-shadow .2s; }
.tvf-upload-modern.is-selected { border-style: solid; border-color: #c98c75; box-shadow: 0 8px 22px rgba(80,48,39,.08); }
.tvf-upload-modern.is-error { border-color: #c96464; }
.tvf-upload-preview { flex: 0 0 auto; height: 70px; width: 70px; }
.tvf-upload-preview[hidden] { display: none; }
.tvf-upload-preview img { border-radius: 14px; display: block; height: 70px; object-fit: cover; width: 70px; }
.tvf-upload-copy { min-width: 0; }
.tvf-upload-title { display: block; font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.tvf-upload-title small { color: var(--tvf-muted); font-size: 11px; font-weight: 500; }
.tvf-upload-button { align-items: center; background: var(--tvf-ink); border-radius: 999px; color: #fff !important; cursor: pointer; display: inline-flex !important; font-size: 12px !important; font-weight: 750 !important; gap: 8px; margin: 0 !important; padding: 10px 15px; transition: background .2s, transform .2s; }
.tvf-upload-button:hover { background: var(--tvf-brand); transform: translateY(-1px); }
.tvf-upload-button svg { fill: currentColor; height: 17px; width: 17px; }
.tvf-upload-modern:focus-within .tvf-upload-button { outline: 3px solid rgba(154,79,67,.2); outline-offset: 2px; }
.tvf-upload-input { height: 1px !important; opacity: 0 !important; overflow: hidden !important; pointer-events: none !important; position: absolute !important; width: 1px !important; }
.tvf-upload-copy > small { color: var(--tvf-muted); display: block; font-size: 11px; line-height: 1.4; margin-top: 7px; overflow-wrap: anywhere; }
.tvf-upload-modern.is-selected .tvf-upload-copy > small { color: #397253; }
.tvf-upload-modern.is-error .tvf-upload-copy > small { color: #a13f3f; }
.tvf-reply-actions { align-items: start; display: grid; gap: 14px; grid-template-columns: minmax(300px,340px) 274px; justify-content: space-between; margin-top: 16px; }
.tvf-reply-actions .tvf-upload-modern { margin: 0; }
.tvf-reply-submit { border-radius: 18px; font-size: 15px; height: 50px; min-height: 50px; width: 100%; }
.tvf-back { display: inline-block; font-weight: 750; margin: 4px 0 20px; }
.tvf-thread-heading { border-bottom: 1px solid var(--tvf-line); margin-bottom: 0; padding: 0 0 22px; }
.tvf-thread-heading h1 { color: var(--tvf-ink); font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; font-size: clamp(30px, 4vw, 46px); font-weight: 750; letter-spacing: -.04em; line-height: 1.1; margin: 10px 0 0; }
.tvf-post { background: var(--tvf-white); border: 1px solid var(--tvf-line); border-radius: 22px; display: grid; gap: 24px; grid-template-columns: 150px minmax(0,1fr); margin: 14px 0; padding: 25px; }
.tvf-post--original { border-color: #ddbaaa; border-top: 4px solid var(--tvf-brand); margin-top: 22px; }
.tvf-post aside { align-items: center; border-right: 1px solid var(--tvf-line); display: flex; flex-direction: column; padding-right: 20px; text-align: center; }
.tvf-post aside strong { font-size: 14px; margin-top: 9px; }
.tvf-author-avatar { display: block; }
.tvf-author-name { color: var(--tvf-ink) !important; }
.tvf-post aside span { color: var(--tvf-muted); font-size: 11px; margin-top: 4px; }
.tvf-post-date { color: #8b94a5; font-size: 12px; margin-bottom: 14px; }
.tvf-content { color: #333e52; font-size: 16px; line-height: 1.72; }
.tvf-content > :first-child { margin-top: 0; }
.tvf-content > :last-child { margin-bottom: 0; }
.tvf-image { background: none; border: 0; cursor: zoom-in; margin-top: 18px; max-width: 680px; padding: 0; }
.tvf-image img { border-radius: 14px; display: block; height: auto; max-height: 520px; object-fit: cover; width: 100%; }
.tvf-ai-note { border-top: 1px solid var(--tvf-line); color: #74548d; font-size: 11px; margin-top: 18px; padding-top: 11px; }
.tvf-discussion { margin-top: 34px; }
.tvf-discussion > h2 { margin-bottom: 14px; }
.tvf-pagination { display: flex; gap: 7px; justify-content: center; margin-top: 26px; }
.tvf-pagination a { align-items: center; border: 1px solid var(--tvf-line); border-radius: 9px; color: var(--tvf-ink); display: flex; height: 38px; justify-content: center; width: 38px; }
.tvf-pagination a.is-active { background: var(--tvf-brand); border-color: var(--tvf-brand); color: #fff; }
.tvf-empty { background: var(--tvf-soft); border-radius: 18px; padding: 36px; text-align: center; }
.tvf-empty h2, .tvf-empty h3 { margin-top: 0; }
.tvf-page-heading { margin: 8px auto 28px; max-width: 760px; text-align: center; }
.tvf-page-heading h1 { font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; font-size: clamp(34px,5vw,52px); font-weight: 750; letter-spacing: -.04em; margin: 8px 0 12px; }
.tvf-page-heading p { color: var(--tvf-muted); font-size: 17px; margin: 0; }
.tvf-access-page { max-width: 920px; }
.tvf-text-link { display: inline-block; font-weight: 700; margin-left: 14px; }
.tvf-profile { background: var(--tvf-white); border: 1px solid var(--tvf-line); border-radius: 28px; box-shadow: var(--tvf-shadow); overflow: hidden; }
.tvf-profile-header { align-items: center; background: linear-gradient(135deg,#3b2c31,#754039); color: #fff; display: grid; gap: 24px; grid-template-columns: auto minmax(0,1fr) auto; padding: 38px 42px; }
.tvf-profile-header > img { border: 4px solid rgba(255,255,255,.85); border-radius: 50%; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.tvf-profile-header h1 { color: #fff; font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; font-size: clamp(32px,5vw,48px); font-weight: 750; letter-spacing: -.04em; line-height: 1; margin: 5px 0 10px; }
.tvf-profile-header p { color: #f1ded4; line-height: 1.55; margin: 0; max-width: 560px; }
.tvf-profile-stats { display: flex; gap: 10px; }
.tvf-profile-stats span { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; font-size: 12px; padding: 12px 15px; text-align: center; }
.tvf-profile-stats strong { display: block; font-size: 22px; }
.tvf-profile-grid { display: grid; gap: 36px; grid-template-columns: minmax(0,1.4fr) minmax(280px,.8fr); padding: 34px 42px 42px; }
.tvf-profile-grid > :only-child { grid-column: 1 / -1; }
.tvf-profile-activity h2, .tvf-profile-edit h2 { margin-bottom: 18px; }
.tvf-profile-topic { align-items: center; border-bottom: 1px solid var(--tvf-line); color: var(--tvf-ink) !important; display: flex; gap: 18px; justify-content: space-between; padding: 14px 0; }
.tvf-profile-topic span { color: var(--tvf-muted); flex: 0 0 auto; font-size: 12px; }
.tvf-profile-edit { background: var(--tvf-soft); border-radius: 18px; padding: 22px; }
.tvf-avatar-field { align-items: center; background: rgba(255,255,255,.7); border: 1px solid var(--tvf-line); border-radius: 18px; display: grid; gap: 18px; grid-template-columns: 82px minmax(0,1fr); margin-bottom: 18px; padding: 16px; transition: border-color .2s, box-shadow .2s; }
.tvf-avatar-field.is-selected { border-color: #c98c75; box-shadow: 0 8px 22px rgba(80,48,39,.08); }
.tvf-avatar-field.is-error { border-color: #c96464; }
.tvf-avatar-preview { height: 82px; position: relative; width: 82px; }
.tvf-avatar-preview img { border: 4px solid #fff; border-radius: 50%; box-shadow: 0 7px 20px rgba(80,48,39,.17); display: block; height: 82px; object-fit: cover; width: 82px; }
.tvf-avatar-preview span { align-items: center; background: var(--tvf-brand); border: 3px solid #fff; border-radius: 50%; bottom: -2px; color: #fff; display: flex; font-size: 11px; height: 25px; justify-content: center; position: absolute; right: -2px; width: 25px; }
.tvf-avatar-label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 9px; }
.tvf-avatar-button { align-items: center; background: var(--tvf-ink); border-radius: 999px; color: #fff !important; cursor: pointer; display: inline-flex !important; font-size: 12px !important; font-weight: 750 !important; gap: 8px; margin: 0 !important; padding: 10px 15px; transition: background .2s, transform .2s; }
.tvf-avatar-button:hover { background: var(--tvf-brand); transform: translateY(-1px); }
.tvf-avatar-control:focus-within .tvf-avatar-button { outline: 3px solid rgba(154,79,67,.2); outline-offset: 2px; }
.tvf-avatar-button svg { fill: currentColor; height: 17px; width: 17px; }
.tvf-avatar-input { height: 1px !important; opacity: 0 !important; overflow: hidden !important; pointer-events: none !important; position: absolute !important; width: 1px !important; }
.tvf-avatar-control small { color: var(--tvf-muted); display: block; font-size: 11px; font-weight: 400; line-height: 1.4; margin-top: 8px; overflow-wrap: anywhere; }
.tvf-avatar-field.is-selected .tvf-avatar-control small { color: #397253; }
.tvf-avatar-field.is-error .tvf-avatar-control small { color: #a13f3f; }
.tvf-lightbox { background: transparent; border: 0; height: 100vh; max-height: none; max-width: none; padding: 44px; width: 100vw; }
.tvf-lightbox::backdrop { background: rgba(10,15,25,.88); }
.tvf-lightbox img { height: 100%; object-fit: contain; width: 100%; }
.tvf-lightbox button { background: #fff; border: 0; border-radius: 50%; cursor: pointer; font-size: 26px; height: 38px; line-height: 1; position: fixed; right: 22px; top: 20px; width: 38px; }
.screen-reader-text { clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; width: 1px; }

@media (max-width: 760px) {
    .tvf-app { margin-top: 18px; padding: 0 12px; }
    .tvf-hero { align-items: flex-start; border-radius: 20px; flex-direction: column; padding: 30px 24px; }
    .tvf-stats { width: 100%; }
    .tvf-stats div { flex: 1; }
    .tvf-toolbar { align-items: stretch; flex-direction: column; }
    .tvf-search { max-width: none; }
    .tvf-topic-card { align-items: start; gap: 12px; grid-template-columns: 44px minmax(0,1fr); padding: 17px 15px; }
    .tvf-avatar img { height: 44px; width: 44px; }
    .tvf-replies { border: 0; grid-column: 2; padding: 0; text-align: left; }
    .tvf-replies strong, .tvf-replies span { display: inline; font-size: 12px; }
    .tvf-auth { grid-template-columns: 1fr; padding: 20px; }
    .tvf-auth > div + div { border-left: 0; border-top: 1px solid var(--tvf-line); padding-left: 0; padding-top: 24px; }
    .tvf-post { gap: 14px; grid-template-columns: 1fr; padding: 18px; }
    .tvf-post aside { align-items: center; border-bottom: 1px solid var(--tvf-line); border-right: 0; flex-direction: row; gap: 10px; padding: 0 0 13px; text-align: left; }
    .tvf-post aside img { height: 42px; width: 42px; }
    .tvf-post aside strong { margin: 0; }
    .tvf-post aside span { margin: 0 0 0 auto; }
    .tvf-lightbox { padding: 60px 12px 12px; }
    .tvf-profile-header { align-items: flex-start; grid-template-columns: auto 1fr; padding: 28px 22px; }
    .tvf-profile-header > img { height: 72px; width: 72px; }
    .tvf-profile-stats { grid-column: 1 / -1; width: 100%; }
    .tvf-profile-stats span { flex: 1; }
    .tvf-profile-grid { grid-template-columns: 1fr; padding: 24px 20px 28px; }
    .tvf-avatar-field { grid-template-columns: 72px minmax(0,1fr); padding: 13px; }
    .tvf-avatar-preview, .tvf-avatar-preview img { height: 72px; width: 72px; }
    .tvf-upload-modern { align-items: flex-start; }
    .tvf-reply-actions { grid-template-columns: 1fr; }
    .tvf-reply-submit { border-radius: 999px; height: 50px; min-height: 50px; }
}
