:root { --tv-blue:#38BDF8; --tv-black:#111827; --tv-muted:#64748B; --tv-border:#DCE5ED; }
.tv-auth-card,.tv-account,.tv-dashboard { max-width:760px; margin:24px auto; padding:28px; background:#fff; border:1px solid var(--tv-border); border-radius:12px; box-shadow:0 12px 32px rgba(15,23,42,.06); color:var(--tv-black); }
.tv-auth-card { max-width:520px; }
.tv-auth-card h1,.tv-account h1,.tv-dashboard h1 { margin-top:0; }
.tv-form label { display:block; margin:14px 0; font-weight:650; }
.tv-form input[type=text],.tv-form input[type=email],.tv-form input[type=password],.tv-form input[type=url],.tv-form textarea,.tv-form select { width:100%; box-sizing:border-box; margin-top:7px; padding:11px 12px; border:1px solid var(--tv-border); border-radius:8px; background:#fff; }
.tv-form textarea { min-height:120px; }
.tv-form fieldset { border:1px solid var(--tv-border); border-radius:8px; margin:18px 0; padding:16px; }
.tv-form legend { padding:0 8px; font-weight:700; }
.tv-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.tv-checkbox { font-weight:500 !important; }
.tv-checkbox input { width:auto; margin-right:7px; }
.tv-button { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:9px 18px; border:0; border-radius:8px; font-weight:700; cursor:pointer; text-decoration:none; }
.tv-button-primary { background:var(--tv-blue); color:#08111A; }
.tv-alert { margin:12px 0; padding:12px 14px; border-radius:8px; }
.tv-alert-success { background:#ECFDF5; color:#166534; border:1px solid #A7F3D0; }
.tv-alert-error { background:#FEF2F2; color:#991B1B; border:1px solid #FECACA; }
.tv-link { display:inline-block; margin-left:12px; }
.tv-dashboard-header { border-bottom:1px solid var(--tv-border); margin-bottom:18px; padding-bottom:14px; }
.tv-eyebrow { color:var(--tv-muted); text-transform:uppercase; letter-spacing:.08em; font-size:12px; }
.tv-dashboard-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; }
.tv-dashboard-grid a { display:block; min-height:70px; padding:16px; color:var(--tv-black); border:1px solid var(--tv-border); border-radius:8px; text-decoration:none; }
.tv-dashboard-grid a:hover { border-color:var(--tv-blue); }
.tv-dashboard-grid strong,.tv-dashboard-grid span { display:block; }
.tv-dashboard-grid span { margin-top:6px; color:var(--tv-muted); font-size:13px; }
@media (max-width:600px) { .tv-auth-card,.tv-account,.tv-dashboard { margin:12px; padding:18px; } .tv-form-grid { grid-template-columns:1fr; gap:0; } }

.tv-feed,.tv-saved { max-width:760px; margin:24px auto; }
.tv-post-composer { margin-bottom:18px; }
.tv-feed-toolbar { display:flex; gap:8px; margin:14px 0; }
.tv-feed-filter { border:1px solid var(--tv-border); background:#fff; border-radius:999px; padding:8px 14px; cursor:pointer; }
.tv-feed-filter.is-active { background:var(--tv-blue); border-color:var(--tv-blue); }
.tv-post-card { margin:0 0 14px; padding:18px; background:#fff; border:1px solid var(--tv-border); border-radius:10px; }
.tv-post-header { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.tv-post-header strong,.tv-post-header a { display:block; }
.tv-post-header a { color:var(--tv-muted); font-size:13px; text-decoration:none; }
.tv-post-topic { display:inline-block; padding:4px 8px; border-radius:999px; background:#E0F2FE; color:#0369A1; font-size:12px; }
.tv-post-content { margin:14px 0; white-space:normal; overflow-wrap:anywhere; }
.tv-post-link a { color:#0369A1; overflow-wrap:anywhere; }
.tv-post-media { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:8px; margin-top:12px; }
.tv-post-media img { width:100%; max-height:420px; object-fit:cover; border-radius:8px; }
.tv-post-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; border-top:1px solid var(--tv-border); padding-top:12px; }
.tv-post-actions button,.tv-comment-box button { border:1px solid var(--tv-border); background:#fff; border-radius:6px; padding:7px 10px; cursor:pointer; }
.tv-comment-box { margin-top:12px; }
.tv-comment-box form { display:flex; gap:8px; }
.tv-comment-box input { flex:1; min-width:0; border:1px solid var(--tv-border); border-radius:6px; padding:9px; }
.tv-comment { border-bottom:1px solid var(--tv-border); padding:8px 0; }
.tv-comment p { margin:4px 0 0; }
.tv-load-more { display:block; margin:16px auto; }
.tv-profile { max-width:760px; margin:24px auto; background:#fff; border:1px solid var(--tv-border); border-radius:12px; overflow:hidden; }
.tv-profile-cover { height:220px; background-size:cover; background-position:center; }
.tv-profile-cover-empty { background:linear-gradient(135deg,#38BDF8,#0F172A); }
.tv-profile-body { position:relative; padding:68px 24px 24px; }
.tv-profile-avatar { position:absolute; width:112px; height:112px; left:24px; top:-56px; border:5px solid #fff; border-radius:50%; background:#fff; object-fit:cover; }
.tv-profile-avatar-empty { display:flex; align-items:center; justify-content:center; background:#38BDF8; color:#111827; font-size:38px; font-weight:800; }
.tv-profile-heading h1 { margin:0; }
.tv-profile-heading p { margin:4px 0 12px; color:var(--tv-muted); }
.tv-profile-bio { font-size:16px; }
.tv-profile-meta { color:var(--tv-muted); }
.tv-profile-stats { display:flex; gap:28px; margin:18px 0; }
.tv-profile-stats div { display:flex; flex-direction:column; }
.tv-profile-stats dt { font-size:20px; font-weight:800; }
.tv-profile-stats dd { margin:0; color:var(--tv-muted); }
@media (max-width:600px) { .tv-feed,.tv-saved,.tv-profile { margin:12px; } .tv-profile-cover { height:150px; } .tv-profile-avatar { width:88px; height:88px; left:18px; top:-44px; } .tv-profile-body { padding:58px 18px 18px; } .tv-comment-box form { flex-direction:column; } }

.tv-knowledge-page,.tv-knowledge-search,.tv-knowledge-form,.tv-article-editor,.tv-publications,.tv-series-page,.tv-topic-directory { max-width:760px; margin:24px auto; }
.tv-topic-card,.tv-publication-grid article,.tv-series-grid article,.tv-drafts article { background:#fff; border:1px solid var(--tv-border); border-radius:10px; padding:16px; margin:10px 0; }
.tv-topic-card h2,.tv-publication-grid h2,.tv-series-grid h2 { margin-top:0; }
.tv-search-box { display:flex; gap:8px; margin:14px 0; }
.tv-search-box input { flex:1; min-width:0; padding:10px 12px; border:1px solid var(--tv-border); border-radius:8px; }
.tv-search-box button { border:0; border-radius:8px; background:var(--tv-blue); padding:10px 14px; font-weight:700; }
.tv-question-card,.tv-article-card,.tv-search-result { background:#fff; border:1px solid var(--tv-border); border-radius:10px; padding:16px; margin:10px 0; }
.tv-question-card h2,.tv-article-card h2 { margin:0 0 8px; }
.tv-question-meta,.tv-article-meta { color:var(--tv-muted); font-size:13px; }
.tv-form-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.tv-drafts article { display:flex; justify-content:space-between; gap:12px; }
.tv-drafts article span { color:var(--tv-muted); }
.tv-publication-grid,.tv-series-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; margin-top:18px; }
.tv-knowledge-results { margin-top:16px; }
@media (max-width:600px) { .tv-knowledge-page,.tv-knowledge-search,.tv-knowledge-form,.tv-article-editor,.tv-publications,.tv-series-page,.tv-topic-directory { margin:12px; } .tv-form-actions { flex-direction:column; } .tv-search-box { flex-direction:column; } }
.tv-people-directory,.tv-discovery,.tv-communities-page,.tv-create-community { max-width:900px; margin:24px auto; }
.tv-directory-filters { background:#fff; border:1px solid var(--tv-border); border-radius:10px; padding:16px; }
.tv-directory-grid,.tv-discovery-grid,.tv-community-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; margin-top:18px; }
.tv-directory-card,.tv-discovery-card,.tv-community-card { background:#fff; border:1px solid var(--tv-border); border-radius:10px; padding:16px; }
.tv-directory-card a { display:block; color:var(--tv-black); font-size:16px; }
.tv-directory-card span,.tv-directory-card small { color:var(--tv-muted); }
.tv-directory-card p { margin:6px 0; }
.tv-discovery-card strong { color:#0369A1; text-transform:uppercase; font-size:11px; }
.tv-community-cover { width:100%; height:130px; object-fit:cover; border-radius:8px; margin-bottom:10px; }
.tv-profile-report { margin-top:16px; }
@media (max-width:600px) { .tv-people-directory,.tv-discovery,.tv-communities-page,.tv-create-community { margin:12px; } }
.tv-ecosystem { max-width:1100px; margin:24px auto; color:var(--tv-black); }
.tv-ecosystem-header,.tv-ecosystem-panel,.tv-ecosystem-detail { padding:20px; background:#fff; border:1px solid var(--tv-border); border-radius:12px; }
.tv-ecosystem-header { margin-bottom:16px; }
.tv-ecosystem-header h1 { margin:.3em 0; }
.tv-ecosystem-header p:last-child { color:var(--tv-muted); }
.tv-ecosystem-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.tv-ecosystem-tabs button { border:1px solid var(--tv-border); background:#fff; border-radius:999px; padding:9px 14px; cursor:pointer; }
.tv-ecosystem-tabs button.is-active { color:#08111A; background:var(--tv-blue); border-color:var(--tv-blue); }
.tv-ecosystem-panel { margin:12px 0; }
.tv-ecosystem-panel[hidden],.tv-ecosystem-detail[hidden] { display:none; }
.tv-ecosystem-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.tv-ecosystem-mine { color:var(--tv-muted); }
.tv-ecosystem-search { display:flex; align-items:end; gap:10px; margin:14px 0; }
.tv-ecosystem-search label { flex:1; font-weight:650; }
.tv-ecosystem-search input,.tv-ecosystem-form input,.tv-ecosystem-form textarea,.tv-ecosystem-form select,.tv-ecosystem-file-form input,.tv-ecosystem-detail select { box-sizing:border-box; width:100%; margin-top:6px; padding:10px 12px; border:1px solid var(--tv-border); border-radius:8px; }
.tv-ecosystem-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; margin-top:16px; }
.tv-ecosystem-card,.tv-ecosystem-post { padding:16px; background:#fff; border:1px solid var(--tv-border); border-radius:10px; overflow-wrap:anywhere; }
.tv-ecosystem-card h3 { margin-top:0; }
.tv-ecosystem-card small,.tv-ecosystem-meta { color:var(--tv-muted); }
.tv-ecosystem-category { display:inline-block; padding:4px 8px; color:#0369A1; background:#E0F2FE; border-radius:999px; font-size:12px; }
.tv-ecosystem-create { margin:18px 0; padding:14px; border:1px solid var(--tv-border); border-radius:10px; }
.tv-ecosystem-create summary { font-weight:750; cursor:pointer; }
.tv-ecosystem-form { margin:14px 0; padding:14px; background:#F8FAFC; border:1px solid var(--tv-border); border-radius:10px; }
.tv-ecosystem-form label,.tv-ecosystem-file-form label { display:block; margin:12px 0; font-weight:650; }
.tv-ecosystem-form textarea { min-height:90px; }
.tv-ecosystem-actions,.tv-ecosystem-member { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:12px 0; }
.tv-ecosystem-actions button,.tv-ecosystem-member button { border:1px solid var(--tv-border); background:#fff; border-radius:7px; padding:8px 11px; cursor:pointer; }
.tv-ecosystem-detail { margin:16px 0; }
.tv-ecosystem-discussion { margin-top:20px; }
.tv-ecosystem-post { margin:10px 0; }
.tv-ecosystem-post small { color:var(--tv-muted); }
.tv-ecosystem-reply { margin-top:12px; }
.tv-ecosystem-reply label { display:block; }
.tv-ecosystem-reply textarea { box-sizing:border-box; width:100%; margin:6px 0; padding:10px; border:1px solid var(--tv-border); border-radius:8px; }
.tv-ecosystem-file,.tv-ecosystem-more { display:inline-block; margin:10px 8px 0 0; }
.tv-ecosystem-notice { margin:12px 0; padding:12px; border-radius:8px; background:#ECFDF5; color:#166534; }
.tv-ecosystem-notice.is-error { background:#FEF2F2; color:#991B1B; }
.tv-ecosystem-subheading { font-weight:750; }
.tv-button-danger { margin-top:10px; color:#991B1B; background:#FEF2F2; }
@media (max-width:650px) {
    .tv-ecosystem { margin:12px; }
    .tv-ecosystem-header,.tv-ecosystem-panel,.tv-ecosystem-detail { padding:14px; }
    .tv-ecosystem-toolbar,.tv-ecosystem-search { align-items:stretch; flex-direction:column; }
    .tv-ecosystem-cards { grid-template-columns:1fr; }
    .tv-ecosystem-tabs { flex-wrap:nowrap; overflow-x:auto; padding-bottom:6px; }
    .tv-ecosystem-tabs button { flex:0 0 auto; }
}
.tv-marketplace,.tv-events,.tv-game-zone { max-width:1100px; margin:24px auto; color:var(--tv-black); }
.tv-marketplace > header,.tv-events > header,.tv-game-zone > header,.tv-marketplace-create,.tv-event-create,.tv-game-personal { padding:18px; margin-bottom:16px; background:#fff; border:1px solid var(--tv-border); border-radius:12px; }
.tv-marketplace > header h1,.tv-events > header h1,.tv-game-zone > header h1 { margin:.25em 0; }
.tv-marketplace-search,.tv-game-leaderboard-filters { display:flex; flex-wrap:wrap; align-items:end; gap:10px; padding:16px; margin:14px 0; background:#fff; border:1px solid var(--tv-border); border-radius:10px; }
.tv-marketplace-search label,.tv-game-leaderboard-filters label { flex:1 1 150px; font-weight:650; }
.tv-marketplace-search input,.tv-game-leaderboard-filters select,.tv-event-create input,.tv-event-create select { box-sizing:border-box; width:100%; margin-top:5px; padding:10px; border:1px solid var(--tv-border); border-radius:7px; }
.tv-marketplace-create summary,.tv-event-create summary,.tv-game-personal summary { cursor:pointer; font-weight:750; }
.tv-marketplace-grid,.tv-event-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:14px; margin:16px 0; }
.tv-marketplace-card,.tv-event-card { padding:16px; background:#fff; border:1px solid var(--tv-border); border-radius:10px; overflow-wrap:anywhere; }
.tv-marketplace-card h2,.tv-event-card h2 { margin:0 0 8px; font-size:20px; }
.tv-marketplace-card > img,.tv-event-card > img { width:100%; max-height:250px; object-fit:cover; border-radius:8px; }
.tv-marketplace-meta,.tv-event-meta { color:var(--tv-muted); font-size:13px; }
.tv-marketplace-price { font-weight:750; color:#0369A1; }
.tv-marketplace-actions,.tv-event-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.tv-marketplace-actions button,.tv-marketplace-actions select,.tv-event-actions button,.tv-event-calendar-controls button { border:1px solid var(--tv-border); border-radius:7px; padding:8px 10px; background:#fff; cursor:pointer; }
.tv-marketplace-actions button:hover,.tv-event-actions button:hover { border-color:var(--tv-blue); }
.tv-events .tv-event-calendar-controls { display:flex; align-items:center; justify-content:center; gap:12px; padding:12px; background:#fff; border:1px solid var(--tv-border); border-radius:9px; }
.tv-event-calendar-controls label { display:flex; align-items:center; gap:6px; }
.tv-event-calendar-controls select { padding:7px; border:1px solid var(--tv-border); border-radius:6px; }
.tv-game-library { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; }
.tv-game-card { display:flex; min-height:100px; flex-direction:column; justify-content:center; gap:8px; padding:16px; text-align:left; color:var(--tv-black); background:#fff; border:1px solid var(--tv-border); border-radius:10px; cursor:pointer; }
.tv-game-card:hover,.tv-game-card:focus { border-color:var(--tv-blue); box-shadow:0 0 0 3px #38bdf833; }
.tv-game-card strong { font-size:17px; }
.tv-game-card span { color:var(--tv-muted); font-size:13px; }
.tv-game-player { max-width:760px; margin:18px auto; padding:18px; background:#fff; border:1px solid var(--tv-border); border-radius:12px; }
.tv-game-player.is-paused .tv-game-board { pointer-events:none; opacity:.62; }
.tv-game-controls,.tv-game-board { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:14px 0; }
.tv-game-controls button,.tv-game-board button,.tv-game-board input { min-height:42px; padding:8px 12px; border:1px solid var(--tv-border); border-radius:7px; background:#fff; color:var(--tv-black); cursor:pointer; }
.tv-game-board button:hover { border-color:var(--tv-blue); }
.tv-game-board canvas { max-width:100%; height:auto; border:1px solid var(--tv-border); touch-action:none; }
.tv-ttt-grid { display:grid; grid-template-columns:repeat(3,minmax(64px,90px)); gap:5px; }
.tv-ttt-grid button { min-height:76px; font-size:28px; font-weight:800; }
.tv-sudoku-grid { display:grid; grid-template-columns:repeat(9,minmax(24px,42px)); gap:2px; padding:4px; background:#111827; }
.tv-sudoku-grid input { width:100%; min-width:0; height:40px; box-sizing:border-box; padding:2px; text-align:center; border-radius:0; }
.tv-sudoku-grid input:nth-child(3n) { border-right:2px solid #111827; }
.tv-memory-grid { display:grid; grid-template-columns:repeat(4,minmax(55px,80px)); gap:7px; }
.tv-memory-grid button { min-height:64px; font-size:20px; font-weight:750; }
.tv-number-grid { display:grid; grid-template-columns:repeat(3,minmax(65px,92px)); gap:5px; }
.tv-number-grid button { min-height:72px; font-size:22px; font-weight:750; }
.tv-chess-grid { display:grid; grid-template-columns:repeat(8,minmax(32px,58px)); gap:0; border:2px solid #111827; }
.tv-chess-grid button { min-height:42px; border:0; border-radius:0; padding:0; font-weight:800; }
.tv-chess-grid .light { background:#f0d9b5; }
.tv-chess-grid .dark { background:#b58863; }
.tv-chess-grid .selected { outline:3px solid #38bdf8; outline-offset:-3px; }
.tv-2048-grid { display:grid; grid-template-columns:repeat(4,minmax(54px,82px)); gap:6px; padding:8px; border-radius:9px; background:#94a3b8; touch-action:none; }
.tv-2048-grid > div { display:flex; min-height:60px; align-items:center; justify-content:center; border-radius:6px; background:#f8fafc; font-size:20px; font-weight:800; }
.tv-game-personal { margin-top:18px; }
.tv-game-personal small { display:block; margin:4px 0; color:var(--tv-muted); }
@media (max-width:700px) {
  .tv-marketplace,.tv-events,.tv-game-zone { margin:12px; }
  .tv-marketplace-search,.tv-game-leaderboard-filters { align-items:stretch; flex-direction:column; }
  .tv-marketplace-grid,.tv-event-grid { grid-template-columns:1fr; }
  .tv-events .tv-event-calendar-controls { align-items:stretch; flex-wrap:wrap; }
  .tv-game-library { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tv-game-player { padding:12px; }
  .tv-sudoku-grid { grid-template-columns:repeat(9,minmax(23px,1fr)); }
  .tv-sudoku-grid input { height:34px; }
  .tv-chess-grid { grid-template-columns:repeat(8,minmax(30px,1fr)); width:min(100%,464px); }
  .tv-chess-grid button { min-height:34px; font-size:13px; }
}
.tv-messaging { max-width:1200px; margin:24px auto; color:var(--tv-black); }
.tv-messaging [hidden] { display:none !important; }
.tv-messages-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.tv-messages-heading h1 { margin:0; }
.tv-messages-heading p { margin:6px 0 0; color:var(--tv-muted); }
.tv-messaging-layout { display:grid; grid-template-columns:minmax(250px,320px) minmax(0,1fr); min-height:650px; background:#fff; border:1px solid var(--tv-border); border-radius:12px; overflow:hidden; }
.tv-conversation-panel { padding:16px; border-right:1px solid var(--tv-border); overflow:auto; }
.tv-conversation-panel h2 { font-size:17px; }
.tv-conversation-panel label,.tv-group-settings label { display:block; font-size:13px; font-weight:650; margin:10px 0 5px; }
.tv-conversation-panel input,.tv-group-settings input,.tv-message-composer textarea { box-sizing:border-box; width:100%; padding:10px; border:1px solid var(--tv-border); border-radius:7px; }
.tv-message-search { display:flex; flex-direction:column; gap:7px; margin-bottom:12px; }
.tv-message-search button,.tv-conversation-panel button,.tv-chat-panel button { border:1px solid var(--tv-border); background:#fff; color:var(--tv-black); border-radius:7px; padding:7px 10px; cursor:pointer; }
.tv-message-search button:hover,.tv-conversation-panel button:hover,.tv-chat-panel button:hover { border-color:var(--tv-blue); }
.tv-conversation-list { display:flex; flex-direction:column; gap:6px; margin:12px 0; }
.tv-conversation-item { text-align:left; display:flex; flex-direction:column; gap:4px; width:100%; border:1px solid transparent !important; }
.tv-conversation-item.is-active { background:#E0F2FE !important; border-color:var(--tv-blue) !important; }
.tv-conversation-preview,.tv-conversation-item small { color:var(--tv-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tv-unread-count { color:#0369A1; font-weight:700; font-size:13px; }
.tv-message-refresh { font-size:12px; }
.tv-member-results > div { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:6px; padding:8px 0; border-bottom:1px solid var(--tv-border); font-size:13px; }
.tv-selected-members { display:flex; flex-wrap:wrap; gap:5px; margin:8px 0; }
.tv-selected-members button { font-size:12px; }
.tv-chat-panel { min-width:0; display:flex; flex-direction:column; padding:14px; }
.tv-chat-header { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding-bottom:12px; border-bottom:1px solid var(--tv-border); }
.tv-chat-header h2 { margin:0 auto 0 0; font-size:19px; }
.tv-conversation-image { width:42px; height:42px; object-fit:cover; border-radius:50%; }
.tv-chat-actions,.tv-message-actions,.tv-voice-controls { display:flex; flex-wrap:wrap; gap:6px; }
.tv-chat-actions button,.tv-message-actions button,.tv-voice-controls button { font-size:12px; }
.tv-chat-invitation { flex-basis:100%; padding:10px; background:#E0F2FE; border-radius:8px; }
.tv-message-history { display:flex; flex:1; flex-direction:column; gap:9px; min-height:300px; max-height:58vh; overflow:auto; padding:14px 2px; }
.tv-chat-empty { text-align:center; color:var(--tv-muted); }
.tv-message { align-self:flex-start; max-width:82%; padding:10px 12px; border:1px solid var(--tv-border); border-radius:10px; overflow-wrap:anywhere; }
.tv-message.is-mine { align-self:flex-end; background:#E0F2FE; border-color:#BAE6FD; }
.tv-message-meta,.tv-message-receipt,.tv-message-reactions { color:var(--tv-muted); font-size:11px; }
.tv-message-content { white-space:pre-wrap; margin:8px 0; }
.tv-message-actions { border-top:1px solid rgba(100,116,139,.2); padding-top:7px; margin-top:8px; }
.tv-message-media { display:flex; flex-direction:column; gap:6px; margin-top:8px; font-size:12px; color:var(--tv-muted); }
.tv-message-attachment { max-width:min(100%,480px); max-height:360px; border-radius:7px; }
.tv-message-attachment img,.tv-message-attachment video { max-width:100%; max-height:360px; }
.tv-message-attachment audio { width:min(100%,360px); }
.tv-message-error { color:#991B1B; }
.tv-message-composer { border-top:1px solid var(--tv-border); padding-top:12px; }
.tv-message-composer textarea { resize:vertical; min-height:58px; }
.tv-message-file { display:block; margin:8px 0; font-size:13px; }
.tv-message-file input { display:block; max-width:100%; margin-top:5px; }
.tv-replying-to,.tv-group-members { padding:9px; margin:8px 0; background:#F1F5F9; border-radius:7px; font-size:13px; }
.tv-message-notice { min-height:22px; margin:8px 0; color:#166534; }
.tv-message-notice.is-error { color:#991B1B; }
.tv-message-search-results { max-height:200px; overflow:auto; }
.tv-message-search-results button { width:100%; margin:3px 0; text-align:left; overflow-wrap:anywhere; }
.tv-group-settings { border-top:1px solid var(--tv-border); margin-top:9px; padding-top:9px; }
.tv-group-settings label { margin:7px 0; }
.tv-block-list { margin-top:12px; font-size:13px; }
.tv-block-list p { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.tv-voice-controls { align-items:center; margin:8px 0; }
.tv-voice-controls audio { max-width:100%; }
.tv-message-settings { max-width:650px; }
@media (max-width:760px) {
    .tv-messaging { margin:12px; }
    .tv-messages-heading { align-items:flex-start; flex-direction:column; }
    .tv-messaging-layout { grid-template-columns:1fr; }
    .tv-conversation-panel { border-right:0; border-bottom:1px solid var(--tv-border); max-height:480px; }
    .tv-chat-panel { min-height:520px; padding:10px; }
    .tv-message { max-width:94%; }
}
.tv-question-view,.tv-article-view { max-width:760px; margin:24px auto; }
.tv-question-view .tv-question-card,.tv-article-view { background:#fff; }
.tv-article-view { border:1px solid var(--tv-border); border-radius:12px; padding:24px; }
.tv-article-cover { width:100%; max-height:420px; object-fit:cover; border-radius:10px; margin-bottom:18px; }
.tv-article-content { line-height:1.75; overflow-wrap:anywhere; }
.tv-article-content img { max-width:100%; height:auto; }
.tv-learning { max-width:1180px; margin:24px auto; padding:20px; color:#111827; }
.tv-learning-heading,.tv-learning-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.tv-learning-tabs,.tv-learning-actions,.tv-learning-rich-toolbar { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.tv-learning-tab { border:1px solid var(--tv-border); border-radius:8px; padding:9px 13px; background:#fff; cursor:pointer; }
.tv-learning-tab.is-active { color:#06111b; border-color:#38BDF8; background:#38BDF8; }
.tv-learning-panel { padding:18px 0; }
.tv-learning-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:14px; margin:14px 0; }
.tv-learning-card,.tv-learning-form,.tv-learning-quiz-play,.tv-learning-deck-study { border:1px solid var(--tv-border); border-radius:12px; background:#fff; padding:16px; margin:14px 0; }
.tv-learning-card { overflow-wrap:anywhere; }
.tv-learning-card h3 { margin-top:0; }
.tv-learning-search,.tv-learning-form { display:grid; gap:12px; }
.tv-learning-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; }
.tv-learning input,.tv-learning select,.tv-learning textarea,.tv-learning-rich-editor { box-sizing:border-box; width:100%; max-width:100%; padding:10px; border:1px solid #cbd5e1; border-radius:7px; background:#fff; color:#111827; }
.tv-learning label { display:grid; gap:6px; }
.tv-learning .tv-inline { display:flex; align-items:center; gap:8px; }
.tv-learning .tv-inline input { width:auto; }
.tv-learning-rich-editor { min-height:150px; overflow:auto; }
.tv-learning-rich-toolbar .tv-button { padding:6px 10px; }
.tv-learning-rich,.tv-learning-rich img { max-width:100%; overflow-wrap:anywhere; }
.tv-learning-rich img { height:auto; }
.tv-learning-cover { display:block; max-width:100%; max-height:340px; object-fit:cover; border-radius:10px; margin:12px 0; }
.tv-learning-lesson-list { margin:20px 0; }
.tv-learning-lesson-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:8px 0; border-bottom:1px solid var(--tv-border); }
.tv-learning-text-button { text-align:left; font-weight:600; }
.tv-learning-file { display:block; margin:8px 0; overflow-wrap:anywhere; }
.tv-learning-attachment-preview { display:block; max-width:100%; max-height:420px; object-fit:contain; margin:12px 0; border-radius:8px; }
.tv-learning-flashcard { display:grid; place-items:center; min-height:190px; padding:20px; border-radius:12px; background:#eff9ff; border:1px solid #38BDF8; text-align:center; font-size:1.2rem; }
.tv-learning-answer-option { display:flex!important; grid-template-columns:auto 1fr!important; align-items:start; gap:8px!important; margin:8px 0; }
.tv-learning-answer-option input { width:auto; }
.tv-learning-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.tv-learning-stat { border-radius:10px; padding:14px; background:#eff9ff; }
.tv-learning-notice:empty { display:none; }
.tv-learning-notice { margin:12px 0; padding:10px; border-radius:8px; }
.tv-learning-muted { color:#64748b; }
.tv-learning-verified { color:#166534; }
@media (max-width:760px) {
    .tv-learning { margin:10px; padding:12px; }
    .tv-learning-heading,.tv-learning-toolbar { align-items:flex-start; flex-direction:column; }
    .tv-learning-tabs { flex-wrap:nowrap; overflow-x:auto; padding-bottom:6px; }
    .tv-learning-tab { flex:0 0 auto; }
    .tv-learning-grid { grid-template-columns:1fr; }
    .tv-learning-form-grid { grid-template-columns:1fr; }
    .tv-learning-lesson-row { align-items:flex-start; }
}
