:root {
  --bg: #050D1F; --bg2: #0A1426; --bg3: #0D1A26; --bg4: #141F2E; --bg5: #1A2633;
  --surface: rgba(13,26,38,0.55); --surface2: rgba(20,31,46,0.6); --glass: rgba(13,26,38,0.85);
  --accent: #00B3FF; --accent-b: #00D9FF; --accent-n: #00E6FF;
  --c-green: #00CC55; --c-rose: #FF5C8A; --c-gold: #FFD700; --c-purple: #C44FE6;
  --c-orange: #FF9F1C; --c-red: #FF334D; --c-magenta: #C44FE6;
  --text: #F5FAFF; --text2: #C2D4E8; --text3: #92AECC; --text4: #6A87A8; --text5: #4D6680;
  --border: rgba(0,179,255,0.22); --border2: rgba(0,230,255,0.4);
  --body: "Inter Tight", system-ui, sans-serif; --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22,1,0.36,1); --ease-bounce: cubic-bezier(0.34,1.56,0.64,1);
  --nav-h: 56px; --radius: 10px; --radius-sm: 6px; --radius-lg: 16px; --radius-xl: 24px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3); --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --sidebar-w: 220px; --right-panel-w: 240px;
  --font-scale: 1;
}
/* Light Theme */
:root.light {
  --bg: #F5F9FF; --bg2: #EDF2F8; --bg3: #E4EBF4; --bg4: #D8E2EF; --bg5: #C8D6E6;
  --surface: rgba(228,235,244,0.6); --surface2: rgba(216,226,239,0.7); --glass: rgba(228,235,244,0.9);
  --accent: #0077CC; --accent-b: #0099EE; --accent-n: #0088DD;
  --text: #0A1628; --text2: #1A2A44; --text3: #4A6688; --text4: #7A96B8; --text5: #A0B8D0;
  --border: rgba(0,119,204,0.2); --border2: rgba(0,153,238,0.35);
  --shadow: 0 4px 20px rgba(0,0,0,0.08); --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
}
html { font-size: calc(100% * var(--font-scale)); }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
#app-shell { height: 100%; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-n); }
button { font-family: var(--body); cursor: pointer; border: none; background: none; color: var(--text); }
input, textarea, select { font-family: var(--body); color: var(--text); background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 14px; outline: none; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0,179,255,0.15); }
::placeholder { color: var(--text4); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text5); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Preloader */
#preloader { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: var(--bg); transition: opacity .5s ease, visibility .5s ease; }
#preloader.pl-hide { opacity: 0; visibility: hidden; pointer-events: none; }
.pl-inner { text-align: center; }
.pl-shield { color: var(--accent); animation: pl-pulse 1.2s ease-in-out infinite; }
.pl-bar { width: 120px; height: 2px; margin: 16px auto 0; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.pl-bar i { display: block; height: 100%; width: 30%; background: var(--accent-n); border-radius: 2px; animation: pl-load 1.5s ease infinite; }
@keyframes pl-pulse { 0%,100% { opacity: .6; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes pl-load { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }

/* Navigation (mobile only; desktop uses sidebar) */
.nav-bar { flex-shrink: 0; background: var(--glass); border-bottom: 1px solid var(--border); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 100; }
.nb-inner { display: flex; align-items: center; gap: 16px; height: var(--nav-h); padding: 0 16px; max-width: 1200px; margin: 0 auto; }
.nb-brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 800; font-size: 17px; letter-spacing: -.02em; flex-shrink: 0; }
.nb-brand svg { color: var(--accent-n); }
.nb-search { flex: 1; max-width: 420px; position: relative; display: none; }
.nb-search.visible { display: flex; }
.nb-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text4); pointer-events: none; }
.nb-search input { width: 100%; padding-left: 32px; background: var(--bg3); border-color: rgba(255,255,255,.06); }
.nb-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nb-notif { position: relative; color: var(--text3); padding: 4px; }
.nb-notif:hover { color: var(--text); }
.nb-badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; background: var(--c-red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.nb-avatar { color: var(--text3); padding: 4px; }
.nb-avatar:hover { color: var(--text); }

/* Main Content */
.main-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px; width: 100%; margin: 0 auto; animation: pageIn .2s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Tab Bar (mobile) */
.tab-bar { display: flex; flex-shrink: 0; background: var(--glass); border-top: 1px solid var(--border); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.tab-btn { flex: 1; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 8px; font-size: 10px; font-weight: 600; color: var(--text4); transition: color .2s; }
.tab-btn .tb-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tab-btn svg { width: 20px; height: 20px; }
.tab-btn.active { color: var(--accent-n); }
.tab-btn:hover { color: var(--text3); }
.tab-badge { position: absolute; top: 2px; right: 50%; transform: translateX(18px); background: var(--c-red); color: #fff; font-size: 9px; font-weight: 700; min-width: 16px; height: 14px; border-radius: 7px; display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1; }
.tab-btn { position: relative; }

/* Page Container */
.page { animation: page-in .3s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-h h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.page-h .tag { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 10px; font-weight: 700; }

/* Grid Layouts */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.grid-compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.row-list { display: flex; flex-direction: column; gap: 6px; }

/* Anime Card */
.anime-card { border-radius: var(--radius); overflow: hidden; background: var(--bg3); border: 1px solid var(--border); transition: transform .2s var(--ease), box-shadow .2s var(--ease); cursor: pointer; }
.anime-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.anime-card .ac-poster { position: relative; aspect-ratio: 3/4; background: var(--bg4); overflow: hidden; }
.anime-card .ac-poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.anime-card:hover .ac-poster img { transform: scale(1.05); }
.anime-card .ac-score { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px); padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; color: var(--c-gold); display: flex; align-items: center; gap: 2px; }
.anime-card .ac-body { padding: 8px 10px 10px; }
.anime-card .ac-title { font-weight: 600; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.anime-card .ac-meta { font-size: 11px; color: var(--text4); margin-top: 2px; }
.anime-card .ac-actions { display: flex; gap: 4px; margin-top: 6px; }
.anime-card .ac-btn { flex: 1; padding: 4px; border-radius: 4px; font-size: 10px; font-weight: 600; text-align: center; transition: background .2s; }
.anime-card .ac-btn-like { background: rgba(0,204,85,0.15); color: var(--c-green); }
.anime-card .ac-btn-like:hover { background: rgba(0,204,85,0.3); }
.anime-card .ac-btn-like.liked { background: var(--c-green); color: #fff; }
.anime-card .ac-btn-watch { background: rgba(0,179,255,0.15); color: var(--accent); }
.anime-card .ac-btn-watch:hover { background: rgba(0,179,255,0.3); }
.anime-card .ac-btn-watch.added { background: var(--accent); color: #fff; }

/* Section Headers */
.sec-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { font-size: 17px; font-weight: 700; }
.sec-h .sec-more { margin-left: auto; font-size: 12px; color: var(--text4); font-weight: 600; }
.sec-h .sec-more:hover { color: var(--accent); }

/* Loading / Error / Empty States */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--text4); }
.spinner { width: 24px; height: 24px; border: 2px solid var(--bg4); border-top-color: var(--accent); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-state { text-align: center; padding: 40px 20px; color: var(--text4); }
.error-state svg { width: 48px; height: 48px; color: var(--c-red); margin-bottom: 12px; }
.error-state h3 { font-size: 17px; margin-bottom: 8px; color: var(--text); }
.error-state p { font-size: 13px; }
.error-state .btn-retry { margin-top: 12px; padding: 8px 20px; background: var(--accent); color: var(--bg); border-radius: var(--radius-sm); font-weight: 700; font-size: 13px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text4); }
.empty-state svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: .4; }
.empty-state h3 { font-size: 16px; margin-bottom: 4px; color: var(--text3); }
.empty-state p { font-size: 13px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; transition: all .2s var(--ease); }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-b); transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text3); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 11px; }

/* Skeleton Loading */
.skel { background: linear-gradient(90deg, var(--bg4) 25%, var(--bg3) 50%, var(--bg4) 75%); background-size: 200% 100%; animation: skel-shine 1.5s ease infinite; border-radius: 4px; }
@keyframes skel-shine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Modal */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade-in .2s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg); max-width: 480px; width: 100%; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modal-in .25s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: scale(.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-h h2 { font-size: 17px; font-weight: 700; }
.modal-close { color: var(--text4); padding: 4px; font-size: 20px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--border); }

/* Toast */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
@media (max-width: 599px) {
  .toast-container { bottom: 64px; right: 12px; left: 12px; max-width: calc(100vw - 24px); }
}
.toast { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; font-size: 13px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px) scale(.95); pointer-events: auto; max-width: 320px; display: flex; align-items: center; gap: 8px; transition: opacity .2s ease, transform .25s var(--ease); }
.toast-success { border-color: var(--c-green); }
.toast-error { border-color: var(--c-red); }
.toast-info { border-color: var(--accent); }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--bg3); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 6px 14px; border-radius: 4px; font-size: 12px; font-weight: 600; color: var(--text4); white-space: nowrap; transition: all .2s; }
.tab:hover { color: var(--text3); }
.tab.active { background: var(--accent); color: var(--bg); }

/* Search Page */
.search-page .search-input-wrap { position: relative; margin-bottom: 16px; }
.search-page .search-input-wrap input { width: 100%; padding: 12px 40px 12px 16px; font-size: 15px; border-radius: var(--radius); }
.search-page .search-input-wrap .search-clear { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text4); padding: 4px; }
.search-page .search-input-wrap .search-clear:hover { color: var(--text); }
.search-results-info { font-size: 12px; color: var(--text4); margin-bottom: 12px; }

/* Detail Page */
.detail-page .dp-hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; background: var(--bg3); }
.detail-page .dp-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(40px) brightness(.3); transform: scale(1.1); }
.detail-page .dp-content { position: relative; display: flex; gap: 20px; padding: 20px; }
.detail-page .dp-poster { width: 180px; flex-shrink: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.detail-page .dp-poster img { width: 100%; display: block; }
.detail-page .dp-info { flex: 1; min-width: 0; }
.detail-page .dp-info h1 { font-size: 24px; font-weight: 800; line-height: 1.2; margin-bottom: 8px; }
.detail-page .dp-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.detail-page .dp-meta span { font-size: 12px; color: var(--text3); }
.detail-page .dp-score { font-size: 28px; font-weight: 900; color: var(--c-gold); }
.detail-page .dp-synopsis { font-size: 14px; color: var(--text3); line-height: 1.7; margin-bottom: 16px; }
.detail-page .dp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-page .dp-section { margin-top: 20px; }
.detail-page .dp-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.dp-relations { display: flex; flex-wrap: wrap; gap: 8px; }
.rel-item { display: flex; align-items: center; gap: 10px; background: var(--surface2); border-radius: 10px; padding: 8px; cursor: pointer; flex: 1 1 240px; max-width: 100%; transition: background .2s; }
.rel-item:hover { background: var(--surface3); }
.rel-img { width: 40px; height: 56px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.rel-img img { width: 100%; height: 100%; object-fit: cover; }
.rel-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rel-info strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-info span { font-size: 11px; color: var(--primary); }
.anime-card[draggable="true"] { cursor: grab; }
.anime-card[draggable="true"]:active { cursor: grabbing; }
.week-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; padding: 8px 0; }
.week-col { background: var(--surface2); border-radius: 10px; padding: 8px; }
.week-col-h { font-size: 12px; font-weight: 700; text-align: center; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--border); color: var(--text4); }
.week-col .grid-cards { gap: 6px; grid-template-columns: 1fr !important; }
.week-col .anime-card { flex-direction: row; padding: 4px; }
.week-col .ac-poster { width: 32px; height: 44px; }
.week-col .ac-score { display: none; }
.week-col .ac-meta { display: none; }
.detail-page .dp-genres { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-page .dp-genre { padding: 4px 12px; background: var(--bg4); border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--text3); }
.detail-page .dp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.detail-page .dp-stat { background: var(--bg4); border-radius: var(--radius-sm); padding: 10px; text-align: center; }
.detail-page .dp-stat strong { display: block; font-size: 16px; }
.detail-page .dp-stat span { font-size: 10px; color: var(--text4); text-transform: uppercase; letter-spacing: .05em; }
.detail-page .dp-streaming { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-page .dp-stream-item { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; color: var(--text2); text-decoration: none; transition: all .2s; }
.detail-page .dp-stream-item:hover { border-color: var(--accent); color: var(--accent); background: var(--bg4); }
.detail-page .dp-trailer { margin: 8px 0; }
.detail-page .dp-trailer a:hover { background: var(--bg4) !important; }

/* Watchlist */
.wl-controls { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.wl-status { padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid var(--border); color: var(--text4); cursor: pointer; transition: all .2s; }
.wl-status:hover { border-color: var(--accent); color: var(--text); }
.wl-status.active { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* Community Feed */
.feed-post { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.fp-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fp-av { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0; }
.fp-meta strong { font-size: 13px; display: block; }
.fp-meta span { font-size: 11px; color: var(--text4); }
.fp-body { font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
.fp-card { background: var(--bg4); border-radius: var(--radius-sm); padding: 10px; display: flex; gap: 10px; margin-bottom: 10px; cursor: pointer; }
.fp-card-cover { width: 40px; height: 56px; border-radius: 4px; flex-shrink: 0; overflow: hidden; }
.fp-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.fp-card-body strong { font-size: 12px; display: block; }
.fp-card-body span { font-size: 10px; color: var(--text4); }
.fp-actions { display: flex; gap: 16px; }
.fp-act { font-size: 12px; color: var(--text4); display: flex; align-items: center; gap: 4px; cursor: pointer; }
.fp-act:hover { color: var(--text3); }
.fp-act.liked { color: var(--c-rose); }
.fp-img { margin-bottom: 10px; }
.fp-img img { width: 100%; max-height: 250px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; transition: opacity .2s; }
.fp-img img:hover { opacity: 0.9; }
.fp-comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.fp-comment:last-child { border-bottom: none; }
.post-detail { padding: 16px 0; max-width: 640px; margin: 0 auto; }
.post-detail .fp-body { font-size: 15px; }

/* Quick View Modal */
.quick-view-modal { max-width: 360px; padding: 0; overflow: hidden; }
.quick-view-modal .modal-body { padding: 16px; }

/* Confetti */
.confetti-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 99999; overflow: hidden; }
.confetti-piece { position: absolute; width: 8px; height: 8px; border-radius: 50%; animation: confetti-fall 1.2s ease-out forwards; }
@keyframes confetti-fall { 0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; } 100% { transform: translateY(80px) rotate(360deg) scale(0.3); opacity: 0; } }
.confetti-piece:nth-child(odd) { animation-duration: 1s; animation-delay: 0.05s; }
.confetti-piece:nth-child(even) { animation-duration: 1.4s; animation-delay: 0.15s; }

/* Chat */
.chat-list { display: flex; flex-direction: column; gap: 2px; }
.chat-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-sm); cursor: pointer; transition: background .2s; }
.chat-item:hover { background: var(--bg4); }
.chat-item .ci-av { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: #fff; }
.chat-item .ci-info { flex: 1; min-width: 0; }
.chat-item .ci-info strong { font-size: 13px; display: block; }
.chat-item .ci-info span { font-size: 12px; color: var(--text4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.chat-item .ci-time { font-size: 10px; color: var(--text5); }
.chat-messages { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: var(--radius); font-size: 13px; line-height: 1.5; }
.msg-in { background: var(--bg4); align-self: flex-start; border-bottom-left-radius: 4px; overflow-wrap: break-word; word-break: break-word; }
.msg-out { background: var(--accent); color: var(--bg); align-self: flex-end; border-bottom-right-radius: 4px; overflow-wrap: break-word; word-break: break-word; }
.msg .msg-time { font-size: 9px; opacity: .6; margin-top: 4px; display: block; }
.chat-input-bar { display: flex; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); }
.chat-input-bar input { flex: 1; padding: 10px 14px; border-radius: var(--radius-xl); }
.chat-input-bar button { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Chat List Item (neues Design) */
.chat-list-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: background .15s; }
.chat-list-item:hover { background: var(--bg4); }
.chat-list-item .cli-av { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; color: #fff; }
.chat-list-item .cli-body { flex: 1; min-width: 0; }
.chat-list-item .cli-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-list-item .cli-top strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list-item .cli-time { font-size: 10px; color: var(--text5); flex-shrink: 0; }
.chat-list-item .cli-preview { font-size: 12px; color: var(--text4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.chat-list-item .cli-right { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.chat-list-item .cli-badge { background: var(--accent); color: var(--bg); font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.chat-list-item .cli-bot { font-size: 9px; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.contact-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: background .15s; background: var(--bg3); margin-bottom: 4px; }
.contact-item:hover { background: var(--bg4); }
.contact-item .ci-av { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; }
.contact-card { background: var(--bg3); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.ci-online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-green); flex-shrink: 0; }
.chat-msgs { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px; }
.chat-msgs .msg-time { font-size: 9px; opacity: 0.5; margin-top: 3px; display: block; }
.msg-read { font-size: 9px; margin-left: 4px; color: var(--c-cyan, var(--accent)); }

/* Matching / Swipe */
.swipe-container { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 20px; }
.swipe-card { width: 100%; max-width: 320px; aspect-ratio: 3/4; border-radius: var(--radius-lg); overflow: hidden; position: relative; background: var(--bg3); cursor: grab; user-select: none; touch-action: none; }
.swipe-card:active { cursor: grabbing; }
.swipe-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.swipe-card .sc-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(0,0,0,.85)); }
.swipe-card .sc-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 16px 16px; }
.swipe-card .sc-info h3 { font-size: 18px; font-weight: 800; }
.swipe-card .sc-info span { font-size: 12px; color: var(--text3); }
.swipe-card .sc-score { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.7); padding: 4px 10px; border-radius: 6px; font-size: 14px; font-weight: 700; color: var(--c-gold); }
.swipe-actions { display: flex; gap: 20px; }
.swipe-btn { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.swipe-btn:hover { transform: scale(1.1); }
.swipe-btn:active { transform: scale(0.93); }
.swipe-btn-nope { background: var(--c-red); color: #fff; }
.swipe-btn-like { background: var(--c-green); color: #fff; }
.swipe-btn-super { background: var(--accent); color: #fff; }
.swipe-btn-star { background: var(--c-gold); color: var(--bg); }

/* Profile */
.profile-h { text-align: center; padding: 20px 0; }
.profile-h .ph-av { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px; background: var(--bg4); display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--accent); }
.profile-h .ph-name { font-size: 20px; font-weight: 800; }
.profile-h .ph-status { font-size: 13px; color: var(--text4); margin-top: 4px; }
.profile-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.profile-stat { text-align: center; padding: 12px; background: var(--bg3); border-radius: var(--radius-sm); }
.profile-stat strong { display: block; font-size: 20px; color: var(--accent-n); }
.profile-stat span { font-size: 10px; color: var(--text4); text-transform: uppercase; letter-spacing: .05em; }
.profile-section { margin-bottom: 20px; }
.profile-section h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; }

/* Achievements */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.ach-item { text-align: center; padding: 12px 8px; background: var(--bg3); border-radius: var(--radius-sm); border: 1px solid var(--border); transition: all .2s; }
.ach-item.locked { opacity: .4; filter: grayscale(1); }
.ach-item .ach-icon { font-size: 28px; margin-bottom: 6px; display: block; }
.ach-item .ach-name { font-size: 11px; font-weight: 600; }
.ach-item .ach-desc { font-size: 9px; color: var(--text5); }

/* Quiz */
.quiz-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; max-width: 480px; margin: 0 auto; }
.quiz-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.quiz-card .q-progress { height: 4px; background: var(--bg4); border-radius: 2px; margin-bottom: 16px; overflow: hidden; }
.quiz-card .q-progress i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s ease; }
.quiz-card .q-question { font-size: 15px; margin-bottom: 16px; }
.quiz-card .q-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-card .q-opt { padding: 12px 16px; background: var(--bg4); border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; transition: all .2s; border: 1px solid transparent; }
.quiz-card .q-opt:hover { border-color: var(--accent); }
.quiz-card .q-opt.correct { border-color: var(--c-green); background: rgba(0,204,85,.15); }
.quiz-card .q-opt.wrong { border-color: var(--c-red); background: rgba(255,51,77,.15); }
.quiz-card .q-result { text-align: center; padding: 20px 0; }
.quiz-card .q-result .qr-score { font-size: 48px; font-weight: 900; color: var(--accent-n); }
.quiz-card .q-result .qr-label { font-size: 14px; color: var(--text4); }

/* Season Browser */
.season-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.season-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .2s var(--ease); }
.season-card:hover { transform: translateY(-2px); }
.season-card .sc-poster { aspect-ratio: 3/4; overflow: hidden; background: var(--bg4); }
.season-card .sc-poster img { width: 100%; height: 100%; object-fit: cover; }
.season-card .sc-body { padding: 8px; }
.season-card .sc-body strong { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.season-card .sc-body span { font-size: 10px; color: var(--text4); }

/* Rankings */
.rank-list { display: flex; flex-direction: column; gap: 4px; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg3); border-radius: var(--radius-sm); cursor: pointer; transition: background .2s; }
.rank-item:hover { background: var(--bg4); }
.rank-item .ri-num { font-size: 16px; font-weight: 900; color: var(--text4); min-width: 28px; text-align: center; }
.rank-item .ri-num.top-1 { color: var(--c-gold); }
.rank-item .ri-num.top-2 { color: var(--text3); }
.rank-item .ri-num.top-3 { color: var(--c-orange); }
.rank-item .ri-cover { width: 32px; height: 44px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.rank-item .ri-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-item .ri-info { flex: 1; min-width: 0; }
.rank-item .ri-info strong { font-size: 13px; display: block; }
.rank-item .ri-info span { font-size: 11px; color: var(--text4); }
.rank-item .ri-score { font-size: 13px; font-weight: 700; color: var(--c-gold); }

/* Stories */
.stories-row { display: flex; gap: 12px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; }
.stories-row::-webkit-scrollbar { display: none; }
.story-ring { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; flex-shrink: 0; }
.story-ring .sr-avatar { width: 60px; height: 60px; border-radius: 50%; padding: 3px; background: conic-gradient(var(--c-rose), var(--c-purple), var(--accent), var(--c-rose)); }
.story-ring .sr-avatar-inner { width: 100%; height: 100%; border-radius: 50%; background: var(--bg3); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.story-ring .sr-avatar-inner img { width: 100%; height: 100%; object-fit: cover; }
.story-ring .sr-name { font-size: 10px; color: var(--text4); }
.story-viewer { position: fixed; inset: 0; z-index: 300; background: #000; display: flex; flex-direction: column; }
.story-viewer .sv-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; padding: 12px; }
.story-viewer .sv-progress { display: flex; gap: 4px; }
.story-viewer .sv-progress i { flex: 1; height: 3px; background: rgba(255,255,255,.3); border-radius: 2px; overflow: hidden; }
.story-viewer .sv-progress i span { display: block; height: 100%; background: #fff; width: 0%; transition: width 3s linear; }
.story-viewer .sv-progress i.done span { width: 100%; }
.story-viewer .sv-progress i.active span { width: 100%; }
.story-viewer sv { flex: 1; display: flex; align-items: center; justify-content: center; }
.story-viewer sv img { max-width: 100%; max-height: 100%; object-fit: contain; }
.story-viewer .sv-close { position: absolute; top: 12px; right: 12px; z-index: 3; color: #fff; font-size: 28px; padding: 8px; }

/* Home Dashboard */
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.dash-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.dash-card .dc-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.dash-card .dc-h h3 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); }
.dash-card .dc-h svg { color: var(--accent); }
.dash-welcome h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.dash-welcome p { font-size: 13px; color: var(--text4); }
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.qa-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px; background: var(--bg4); border-radius: var(--radius-sm); transition: all .2s; font-size: 11px; font-weight: 600; color: var(--text3); }
.qa-btn:hover { background: var(--bg5); color: var(--text); transform: translateY(-1px); }
.qa-btn svg { width: 24px; height: 24px; color: var(--accent-n); }

/* ─── Layout-Container (Desktop: Sidebar + Main + Right-Panel) ─── */
#app-shell.layout-desktop {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--right-panel-w);
  grid-template-rows: 1fr;
  height: 100vh;
}
#app-shell.layout-desktop .sidebar { grid-column: 1; grid-row: 1; }
#app-shell.layout-desktop .main-content { grid-column: 2; grid-row: 1; padding: 24px 32px 32px; max-width: 1100px; margin: 0 auto; width: 100%; overflow-y: auto; }
#app-shell.layout-desktop .right-panel { grid-column: 3; grid-row: 1; }
#app-shell.layout-desktop .nav-bar,
#app-shell.layout-desktop .tab-bar { display: none; }
#app-shell.layout-desktop .loading-bar { display: none; }
#app-shell.layout-desktop .net-status { position: fixed; left: 220px; right: 240px; top: 0; }
#app-shell.layout-desktop .dash-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
#app-shell.layout-desktop .grid-cards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
#app-shell.layout-desktop .detail-page .dp-content { flex-direction: row; }
#app-shell.layout-desktop .detail-page .dp-poster { width: 250px; }

/* ─── Sidebar ─── */
.sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 10px 12px;
  overflow-y: auto;
  height: 100vh;
  position: sticky;
  top: 0;
}
.sb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 20px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
}
.sb-logo svg { width: 24px; height: 24px; color: var(--accent-n); flex-shrink: 0; }
.sb-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sb-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text5); padding: 16px 12px 6px; }
.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  transition: background .12s var(--ease), color .12s var(--ease);
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
}
.sb-item:hover { background: var(--bg4); color: var(--text2); }
.sb-item.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-n); }
.sb-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sb-item .sb-badge {
  margin-left: auto;
  background: var(--c-red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 18px;
  height: 14px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.sb-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-top: auto;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s var(--ease);
  border-radius: var(--radius-sm);
}
.sb-profile:hover { background: var(--bg4); }
.sb-profile .sbp-av {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  background: var(--bg4); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text4);
}
.sb-profile .sbp-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.sb-profile .sbp-info { flex: 1; min-width: 0; }
.sb-profile .sbp-name { font-size: 13px; font-weight: 700; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-profile .sbp-coins { font-size: 11px; color: var(--text4); }

/* ─── Right Panel ─── */
.right-panel {
  background: var(--bg2);
  border-left: 1px solid var(--border);
  padding: 20px 14px;
  overflow-y: auto;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rp-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.rp-card h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text5);
  margin-bottom: 10px;
}
.rp-wallet-row { display: flex; align-items: center; gap: 10px; }
.rp-wallet-row .rp-icon { font-size: 24px; }
.rp-wallet-row strong { font-size: 22px; font-weight: 800; color: var(--c-gold); }
.rp-wallet-row span { font-size: 11px; color: var(--text4); }
.rp-stat { display: flex; justify-content: space-between; padding: 6px 0; font-size: 12px; border-bottom: 1px solid var(--border); }
.rp-stat:last-child { border-bottom: none; }
.rp-stat span:first-child { color: var(--text4); }
.rp-stat span:last-child { font-weight: 700; color: var(--text2); }
.rp-genre-tag { display: inline-block; padding: 3px 8px; border-radius: 10px; background: var(--bg4); font-size: 10px; font-weight: 600; color: var(--text3); margin: 2px; }
.rp-notif-item { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; cursor: pointer; }
.rp-notif-item:last-child { border-bottom: none; }
.rp-notif-item .rpn-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex-shrink: 0; }
.rp-notif-item .rpn-text { color: var(--text3); line-height: 1.4; }
.rp-notif-item:hover .rpn-text { color: var(--text2); }
.rp-notif-item .rpn-time { font-size: 10px; color: var(--text5); margin-top: 2px; }
.rp-empty { font-size: 12px; color: var(--text5); text-align: center; padding: 16px 0; }

/* ─── Responsive: Alle Bildschirmgrößen ─── */

/* Mobil (0-599px) – Basis-Layout */
@media (max-width: 599px) {
  #app-shell.layout-desktop { grid-template-columns: 1fr; }
  #app-shell.layout-desktop .nav-bar { display: flex; flex-direction: column; }
  #app-shell.layout-desktop .tab-bar { display: flex; }
  #app-shell.layout-desktop .sidebar { display: none; }
  #app-shell.layout-desktop .right-panel { display: none; }
  #app-shell.layout-desktop .main-content { display: block; }
  .nav-bar { display: none; }
  .tab-bar { display: flex; padding-bottom: env(safe-area-inset-bottom, 0); }
  .main-content { padding: 12px; padding-bottom: 72px; max-width: 100%; }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
  .detail-page .dp-content { flex-direction: column; }
  .detail-page .dp-poster { width: 120px; }
  .tab-btn { padding: 4px 0 6px; font-size: 9px; }
  .tab-btn svg { width: 18px; height: 18px; }
  .tab-btn .tb-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
  .tab-badge { top: 0; transform: translateX(14px); font-size: 8px; min-width: 14px; height: 12px; }
  .dash-grid { grid-template-columns: 1fr; }
  .fp-img img { max-height: 260px; }
  .fp-body { font-size: 13px; }
  .dp-review { padding: 8px; }
  .dpr-body { font-size: 11.5px; }
  .dp-chars-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .dp-char { font-size: 11px; }
  .daily-bonus { flex-direction: column; align-items: stretch; }
  .ach-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .ach-item { padding: 8px; }
  .dna-hero { padding: 16px 12px; flex-direction: column; gap: 12px; text-align: center; }
  .dna-hero h2 { font-size: 18px; }
  .dna-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .dna-genre-row { flex-wrap: wrap; }
  .dgr-name { min-width: auto; flex: 1; }
  .rank-item { padding: 8px; font-size: 12px; }
  .rank-xp-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .stat-card { padding: 10px; }
  .stat-card strong { font-size: 20px; }
}

/* Phablets (400-599px) – größere Mobilgeräte */
@media (min-width: 400px) and (max-width: 599px) {
  .main-content { padding: 12px 16px; }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
  .swipe-card { max-width: 300px; }
}

/* Kleine Smartphones (< 400px) – kompakte Layouts */
@media (max-width: 399px) {
  html { font-size: 14px; }
  .main-content { padding: 8px; padding-bottom: 68px; }
  .grid-cards { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .dash-card { padding: 10px; }
  .dash-card .dc-h h3 { font-size: 11px; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .qa-btn { padding: 10px 8px; font-size: 10px; }
  .qa-btn svg { width: 18px; height: 18px; }
  .anime-card .ac-title { font-size: 10px; }
  .tab-btn { font-size: 8px; }
  .tab-btn svg { width: 16px; height: 16px; }
  .swipe-card { max-width: 280px; }
  .swipe-btn { width: 44px; height: 44px; font-size: 18px; }
  .auth-card { padding: 24px 16px; }
  .page-h h1 { font-size: 18px; }
  .tabs .tab { font-size: 11px; padding: 6px 10px; }
  .dialog-content { max-width: 95vw; padding: 16px; }
  .season-year-select { font-size: 12px; }
  .dating-card { min-height: auto; max-height: 85vh; }
  .dt-photo { max-height: 240px; }
  .dt-body h2 { font-size: 18px; }
  .dt-avph { font-size: 56px; }
  .modal-h { font-size: 14px; padding: 10px 12px; }
  .modal-body { padding: 10px; font-size: 13px; }
  .modal-foot { padding: 8px; }
}

/* Tablets Portrait (600-899px) */
@media (min-width: 600px) and (max-width: 899px) {
  #app-shell.layout-desktop { grid-template-columns: 1fr; }
  #app-shell.layout-desktop .nav-bar { display: flex; flex-direction: column; }
  #app-shell.layout-desktop .tab-bar { display: flex; }
  #app-shell.layout-desktop .sidebar { display: none; }
  #app-shell.layout-desktop .right-panel { display: none; }
  #app-shell.layout-desktop .main-content { display: block; }
  .nav-bar { display: none; }
  .tab-bar { display: flex; padding-bottom: env(safe-area-inset-bottom, 0); }
  .main-content { padding: 16px 20px; padding-bottom: 72px; max-width: 100%; }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-page .dp-content { flex-direction: column; }
  .detail-page .dp-poster { width: 140px; }
  .swipe-card { max-width: 360px; }
  .match-layout { display: grid; grid-template-columns: minmax(0, 380px) 240px; align-items: start; justify-content: center; gap: 20px; }
  .match-side { display: flex; flex-direction: column; gap: 12px; }
  .auth-card { max-width: 420px; }
}

/* Tablet Landscape / Small Desktop (900-1199px) */
@media (min-width: 900px) and (max-width: 1199px) {
  #app-shell.layout-desktop { grid-template-columns: var(--sidebar-w) 1fr; }
  #app-shell.layout-desktop .dash-grid { grid-template-columns: repeat(2, 1fr); }
  #app-shell.layout-desktop .grid-cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .right-panel { display: none; }
  .main-content { padding: 20px 24px; }
}

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
  #app-shell.layout-desktop .dash-grid { grid-template-columns: repeat(2, 1fr); }
  #app-shell.layout-desktop .grid-cards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* Extra Large (1600px+) */
@media (min-width: 1600px) {
  #app-shell.layout-desktop .main-content { max-width: 1200px; padding: 28px 40px; }
  #app-shell.layout-desktop .dash-grid { grid-template-columns: repeat(3, 1fr); }
  #app-shell.layout-desktop .grid-cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .right-panel { --right-panel-w: 280px; }
}

/* ─── Story Rings (Home) ─── */
.story-rings { display: flex; gap: 10px; padding: 8px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.story-ring { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; flex-shrink: 0; width: 72px; }
.story-ring span { font-size: 10px; color: var(--text4); text-align: center; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.sr-ring { width: 56px; height: 56px; border-radius: 50%; padding: 2px; background: linear-gradient(135deg, var(--accent), var(--c-purple)); display: flex; align-items: center; justify-content: center; }
.sr-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); }

/* ─── Story Viewer Overlay ─── */
.story-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; background: #000; display: flex; flex-direction: column; transition: opacity .3s ease, transform .3s ease; }
.story-progress { display: flex; gap: 3px; padding: 10px 8px 4px; position: relative; z-index: 2; }
.sp-seg { flex: 1; height: 2px; background: rgba(255,255,255,0.25); border-radius: 2px; overflow: hidden; }
.sp-seg.sp-done { background: rgba(255,255,255,0.7); }
.sp-seg.sp-active { background: rgba(255,255,255,0.25); }
.sp-fill { height: 100%; background: #fff; border-radius: 2px; transform-origin: left; }
.story-close { position: absolute; top: 8px; right: 12px; z-index: 3; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; cursor: pointer; border-radius: 50%; background: rgba(0,0,0,0.4); }
.story-content { flex: 1; position: relative; display: flex; flex-direction: column; justify-content: flex-end; }
.story-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(4px); transform: scale(1.05); }
.story-overlay-grad { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.6) 100%); }
.story-info { position: relative; z-index: 2; padding: 24px 20px 40px; }
.story-info h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.story-meta { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 12px; }
.story-info p { font-size: 13px; color: rgba(255,255,255,0.85); line-height: 1.6; margin-bottom: 16px; }
.story-tap-left, .story-tap-right { position: absolute; top: 0; bottom: 0; width: 35%; z-index: 2; cursor: pointer; }
.story-tap-left { left: 0; }
.story-tap-right { right: 0; }
.story-bottom { height: 8px; background: #000; }

/* ─── Chapter Progress ─── */
.ch-progress { display: flex; align-items: center; gap: 8px; }

/* ─── Network Status ─── */
.loading-bar { position: fixed; top: 0; left: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--c-purple)); z-index: 9999; width: 0; border-radius: 0 2px 2px 0; box-shadow: 0 0 8px rgba(0,179,255,0.4); }
.net-status { position: sticky; top: 0; z-index: 100; text-align: center; font-size: 12px; font-weight: 600; padding: 4px 12px; transition: transform .3s ease; }
.net-status.offline { background: var(--c-red); color: #fff; }
.net-status.online { background: var(--c-green); color: #fff; animation: ns-up .3s ease forwards; }
@keyframes ns-up { 0% { transform: translateY(0); } 100% { transform: translateY(-100%); } }

/* ─── Search History ─── */
.sh-item:hover { background: var(--bg3); border-radius: var(--radius-sm); }
.sh-item:hover .sh-del { opacity: 1; }
.sh-del { opacity: 0; background: none; border: none; cursor: pointer; }

/* ─── Stats Dashboard ─── */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.stat-card { background: var(--bg3); border-radius: var(--radius); padding: 14px; text-align: center; border: 1px solid var(--border); }
.stat-card strong { display: block; font-size: 26px; font-weight: 800; line-height: 1.2; }
.stat-card span { font-size: 11px; color: var(--text4); text-transform: uppercase; letter-spacing: .5px; }
.sc-accent strong { color: var(--accent); }
.sc-rose strong { color: var(--c-rose); }
.sc-gold strong { color: var(--c-gold); }
.sc-green strong { color: var(--c-green); }
.stat-section { background: var(--bg3); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; border: 1px solid var(--border); }
.stat-section h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text2); }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 4px 0; }
.bc-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bc-bar { width: 100%; max-width: 40px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 4px; position: relative; transition: height .4s var(--ease); }
.bc-b2 { background: var(--c-rose); }
.bc-b3 { background: var(--c-purple); }
.bc-bar { transition: height .6s cubic-bezier(0.22,1,0.36,1); }
.bc-anim { height: 0%; }
.bc-val { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; color: var(--text3); }
.bc-label { font-size: 9px; color: var(--text4); white-space: nowrap; }
.ach-progress { display: flex; align-items: center; gap: 16px; justify-content: center; }
.ach-ring, .quiz-stat-ring { width: 80px; height: 80px; }
.ach-ring-bg { fill: none; stroke: var(--bg4); stroke-width: 3; }
.ach-ring-fill { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; transform-origin: center; transform: rotate(-90deg); }
.ach-ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ach-ring-text strong { font-size: 16px; font-weight: 800; color: var(--accent); line-height: 1.2; }
.ach-ring-text span { font-size: 9px; color: var(--text4); }
.quiz-stat-ring { position: relative; display: inline-flex; }
.quiz-stat-ring .ach-ring-fill { stroke: var(--c-gold); }
.quiz-stat-ring .ach-ring-text strong { color: var(--c-gold); }

/* ─── "Mehr"-Drawer (alle Bereiche zugänglich) ─── */
.more-drawer-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(2,6,15,0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s var(--ease); display: flex; align-items: flex-end; }
.more-drawer-overlay.open { opacity: 1; }
.more-drawer { width: 100%; max-height: 82vh; overflow-y: auto; background: var(--glass); border-top: 1px solid var(--border2); border-radius: var(--radius-xl) var(--radius-xl) 0 0; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transform: translateY(100%); transition: transform .28s var(--ease); padding-bottom: env(safe-area-inset-bottom, 16px); }
.more-drawer-overlay.open .more-drawer { transform: translateY(0); }
.md-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 10px; position: sticky; top: 0; background: var(--glass); }
.md-head h3 { font-size: 17px; font-weight: 800; }
.md-close { width: 32px; height: 32px; border-radius: 50%; background: var(--bg4); color: var(--text2); font-size: 15px; display: flex; align-items: center; justify-content: center; }
.md-body { padding: 4px 16px 20px; }
.md-group { margin-bottom: 18px; }
.md-group h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text4); margin: 0 0 8px 4px; font-weight: 700; }
.md-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.md-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: var(--radius); background: var(--bg3); border: 1px solid var(--border); transition: transform .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease); font-size: 12px; color: var(--text2); font-weight: 600; }
.md-item:hover, .md-item:focus-visible { transform: translateY(-2px); border-color: var(--border2); background: var(--bg4); color: var(--text1); }
.md-item:active { transform: scale(.96); }
.md-ic { font-size: 22px; line-height: 1; }



@media (min-width: 720px) { .more-drawer { max-width: 560px; margin: 0 auto; border-radius: var(--radius-xl); } .more-drawer-overlay { align-items: center; padding: 24px; } .more-drawer-overlay.open .more-drawer { transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .more-drawer, .more-drawer-overlay { transition: opacity .15s ease; } .more-drawer { transition: none; } }

/* ─── Watch-Status-Chips & Badges ─── */
.watch-status-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-chip { padding: 6px 12px; border-radius: var(--radius-sm); background: var(--bg3); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text3); transition: all .15s var(--ease); white-space: nowrap; }
.ws-chip:hover { background: var(--bg4); color: var(--text1); transform: translateY(-1px); }
.ws-chip.active { font-weight: 700; background: var(--bg4); }
.ws-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); position: absolute; top: 6px; left: 6px; z-index: 2; }
.wl-status-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.wl-status-filter .wsf-btn { padding: 5px 11px; border-radius: 14px; background: var(--bg3); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text3); transition: all .15s var(--ease); }
.wl-status-filter .wsf-btn.active { background: var(--accent, #00B3FF); color: var(--bg); border-color: transparent; }

/* ─── Rang-System (ehrliches Leaderboard) ─── */
.rank-hero { display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: var(--radius-lg); margin-bottom: 14px; }
.rank-hero-icon { font-size: 52px; line-height: 1; }
.rank-hero h2 { font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.rank-progress { height: 8px; background: var(--bg4); border-radius: 4px; overflow: hidden; margin-top: 8px; max-width: 280px; }
.rank-progress-bar { height: 100%; border-radius: 4px; transition: width .5s var(--ease); }
.rank-xp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rank-xp-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 8px; text-align: center; }
.rank-xp-card strong { display: block; font-size: 20px; font-weight: 800; color: var(--text1); }
.rank-xp-card span { font-size: 11px; color: var(--text4); }
.rank-item.rank-current { background: var(--bg4); }
@media (max-width: 520px) { .rank-xp-grid { grid-template-columns: repeat(2, 1fr); } .rank-hero-icon { font-size: 40px; } }

/* ─── Finale Design-Politur: Mikro-Interaktionen & Transitions ─── */
/* Sanftes Einblenden beim Routenwechsel */
#main-content > .page { animation: pageIn .28s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
/* Karten-Tap-Feedback (mobil) */
.anime-card:active { transform: scale(.97); }
.anime-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ac-btn:active, .btn:active, .wsf-btn:active, .ws-chip:active, .md-item:active { transform: scale(.93); }
/* Buttons: weichere Übergänge */
.btn { transition: transform .12s var(--ease), background .15s var(--ease), border-color .15s var(--ease), opacity .15s var(--ease); }
.btn:active { transform: translateY(1px) scale(.98); }
/* Tab-Bar aktiver Tab: sanfter Akzent */
.tab-btn { transition: color .18s var(--ease); }
.tab-btn.active { color: var(--accent, #00B3FF); }
.tab-btn.active svg { filter: drop-shadow(0 0 6px rgba(0,179,255,.4)); }
/* Story-Ringe: Hover-Glow */
.story-ring .sr-ring { transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.story-ring:hover .sr-ring { transform: scale(1.06); box-shadow: 0 0 0 2px var(--accent, #00B3FF); }
/* Empty-States: etwas Charakter */
.empty-state { animation: pageIn .35s var(--ease); }
.empty-state h3::before { content: ''; }
/* Skeleton-Shimmer geschmeidiger */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
/* Fokus-Sichtbarkeit (a11y) */
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent, #00B3FF); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  #main-content > .page, .empty-state { animation: none; }
  .anime-card, .ac-btn, .btn, .story-ring .sr-ring { transition: none; }
  #preloader { transition: opacity .2s ease; }
  #preloader .pl-ring, #preloader .pl-ring-bg { animation: none !important; }
  .spinner { animation: none !important; }
  .skel-item { animation: none !important; }
  .toast { transition: opacity .2s ease; animation: none !important; }
  .bc-bar { transition: none !important; }
  .fp-img img { transition: none !important; }
  .story-type { transition: none !important; }
  .ws-chip { transition: none !important; }
  .season-card { transition: none !important; }
  .rank-item { transition: none !important; }
  .qa-btn { transition: none !important; }
  .rel-item { transition: none !important; }
  .tab-btn { transition: none !important; }
  .dna-hero, .dna-stats, .dna-genre-row { transition: none !important; }
}

/* ─── Stats: Watch-Status-Verteilung ─── */
.status-dist { display: flex; flex-direction: column; gap: 8px; }
.sd-row { display: flex; align-items: center; gap: 10px; }
.sd-label { font-size: 12px; color: var(--text2); min-width: 96px; font-weight: 600; }
.sd-bar-track { flex: 1; height: 8px; background: var(--bg4); border-radius: 4px; overflow: hidden; }
.sd-bar { height: 100%; border-radius: 4px; transition: width .5s var(--ease); min-width: 4px; }
.sd-n { font-size: 12px; color: var(--text3); font-weight: 700; min-width: 24px; text-align: right; }

/* ─── Erstnutzer-Onboarding ─── */
.onb-overlay { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(2,6,15,0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s var(--ease); }
.onb-overlay.open { opacity: 1; }
.onb-card { width: 100%; max-width: 420px; background: var(--glass); border: 1px solid var(--border2); border-radius: var(--radius-lg); padding: 32px 24px; text-align: center; transform: translateY(16px) scale(.98); transition: transform .3s var(--ease); }
.onb-overlay.open .onb-card { transform: translateY(0) scale(1); }
.onb-logo { margin-bottom: 12px; }
.onb-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.onb-sub { font-size: 14px; color: var(--text3); margin-bottom: 22px; line-height: 1.5; }
.onb-input { width: 100%; font-size: 16px; padding: 12px 14px; margin-bottom: 20px; text-align: center; }
.onb-card .btn-primary { width: 100%; margin-bottom: 8px; padding: 12px; font-size: 15px; }
.onb-actions { display: flex; gap: 8px; }
.onb-actions .btn { flex: 1; padding: 11px; }
.onb-genres { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px; }
.onb-genre { padding: 8px 14px; border-radius: 20px; background: var(--bg3); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text2); transition: all .15s var(--ease); }
.onb-genre:hover { transform: translateY(-1px); border-color: var(--border2); }
.onb-genre.sel { background: var(--accent, #00B3FF); color: var(--bg); border-color: transparent; transform: scale(1.02); }
@media (prefers-reduced-motion: reduce) { .onb-overlay, .onb-card { transition: opacity .15s ease; } .onb-card { transform: none; } }

/* ─── Detail: Charaktere + Synchronsprecher ─── */
.dp-chars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.dp-char { display: flex; flex-direction: column; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .15s var(--ease), border-color .15s var(--ease); }
.dp-char:hover { transform: translateY(-2px); border-color: var(--border2); }
.dpc-img { aspect-ratio: 3/4; overflow: hidden; background: var(--bg4); }
.dpc-img img { width: 100%; height: 100%; object-fit: cover; }
.dpc-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--text5); }
.dpc-info { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.dpc-info strong { font-size: 12px; font-weight: 700; line-height: 1.2; }
.dpc-role { font-size: 10px; color: var(--c-blue, #00B3FF); font-weight: 600; }
.dpc-va { font-size: 10px; color: var(--text4); margin-top: 2px; }

/* ─── Detail: Reviews ─── */
.dp-reviews { display: flex; flex-direction: column; gap: 10px; }
.dp-review { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.dpr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.dpr-av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--bg4); }
.dpr-head strong { font-size: 13px; flex: 1; }
.dpr-score { font-size: 12px; color: var(--c-gold, #FFB000); font-weight: 700; }
.dpr-tags { display: flex; gap: 5px; margin-bottom: 6px; flex-wrap: wrap; }
.dpr-tag { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--bg5); color: var(--text3); }
.dpr-body { font-size: 12.5px; line-height: 1.55; color: var(--text2); }

/* ─── Quiz-Bild (3 Fragetypen) ─── */
.qz-img { width: 110px; height: 156px; margin: 0 auto 12px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg4); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.qz-img img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Anime-Assistent (Bot) ─── */
.bot-av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--accent, #00B3FF), #6F2A99); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.bot-rec { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; padding: 8px 12px; background: var(--bg4); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text1); transition: all .15s var(--ease); }
.bot-rec:hover { border-color: var(--border2); background: var(--bg5); transform: translateX(2px); }
.bot-rec span { font-size: 11px; color: var(--c-gold, #FFB000); font-weight: 700; white-space: nowrap; }
.bot-quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; flex-shrink: 0; scrollbar-width: none; }
.bot-quick::-webkit-scrollbar { display: none; }
.bot-chip { white-space: nowrap; padding: 7px 13px; border-radius: 16px; background: var(--bg3); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text2); transition: all .15s var(--ease); }
.bot-chip:hover { background: var(--bg4); border-color: var(--border2); color: var(--text1); }
.bot-typing { display: inline-flex; gap: 4px; padding: 12px 14px !important; }
.bot-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text4); animation: bot-blink 1.2s infinite; }
.bot-typing span:nth-child(2) { animation-delay: .2s; }
.bot-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes bot-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bot-typing span { animation: none; } }

/* ─── Detail: News ─── */
.dp-news { display: flex; flex-direction: column; gap: 8px; }
.dp-news-item { display: block; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 12px; transition: border-color .15s var(--ease), transform .15s var(--ease); }
.dp-news-item:hover { border-color: var(--border2); transform: translateX(2px); }
.dpn-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.dpn-head strong { font-size: 13px; line-height: 1.3; }
.dpn-date { font-size: 10px; color: var(--text4); white-space: nowrap; }
.dpn-excerpt { font-size: 12px; color: var(--text3); line-height: 1.5; margin: 4px 0; }
.dpn-meta { font-size: 10px; color: var(--text5); }

/* ─── Mobile Overflow-Schutz (kein horizontales Scrollen) ─── */
html, body { overflow-x: hidden; max-width: 100vw; }
.dash-grid { min-width: 0; }
.dash-card { min-width: 0; max-width: 100%; overflow: hidden; }
.dash-welcome h2, .dash-welcome p { overflow-wrap: break-word; word-break: break-word; }
.page, .page-h { min-width: 0; max-width: 100%; }
.page-h h1 { overflow-wrap: break-word; min-width: 0; }
/* Grid-Karten dürfen nie breiter als der Container werden */
.grid-cards { min-width: 0; }
.stats-grid, .profile-stat-grid { min-width: 0; }

/* ─── Saison-Jahr-Navigation ─── */
.season-year-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.season-year-nav .btn { font-size: 20px; padding: 2px 12px; line-height: 1; }
.season-year-nav .btn:disabled { opacity: .35; cursor: not-allowed; }
.season-year-select { flex: 0 0 auto; min-width: 100px; text-align: center; font-size: 14px; font-weight: 700; padding: 8px 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text1); cursor: pointer; }
.season-year-select:hover { border-color: var(--border2); }

/* ─── Anime-DNA / Geschmacksanalyse ─── */
.dna-hero { text-align: center; padding: 24px 16px; background: linear-gradient(135deg, rgba(0,179,255,0.08), rgba(111,42,153,0.12)); border: 1px solid var(--border2); border-radius: var(--radius-lg); margin-bottom: 16px; }
.dna-emoji { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.dna-hero h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; background: linear-gradient(90deg, var(--accent, #00B3FF), #C44FE6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.dna-hero p { font-size: 13px; color: var(--text3); line-height: 1.5; max-width: 420px; margin: 0 auto; }
.dna-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 10px; margin-bottom: 8px; }
.dna-stat { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 8px; text-align: center; }
.dna-stat strong { display: block; font-size: 20px; font-weight: 800; color: var(--accent, #00B3FF); }
.dna-stat span { font-size: 11px; color: var(--text4); }
.dna-genres { display: flex; flex-direction: column; gap: 9px; }
.dna-genre-row { display: flex; align-items: center; gap: 10px; }
.dgr-name { font-size: 12px; font-weight: 600; color: var(--text2); min-width: 84px; }
.dgr-track { flex: 1; height: 10px; background: var(--bg4); border-radius: 5px; overflow: hidden; }
.dgr-bar { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--accent, #00B3FF), #C44FE6); transition: width .6s var(--ease); }
.dgr-pct { font-size: 11px; color: var(--text3); font-weight: 700; min-width: 32px; text-align: right; }
.dna-insights { display: flex; flex-direction: column; gap: 6px; }
.dna-insight { font-size: 13px; color: var(--text3); line-height: 1.5; }

/* ─── PWA Install-Banner ─── */
.install-banner { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 12px); z-index: 250; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--glass); border: 1px solid var(--border2); border-radius: var(--radius-lg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 8px 32px rgba(0,0,0,0.4); transform: translateY(140%); opacity: 0; transition: transform .35s var(--ease), opacity .35s var(--ease); }
.install-banner.show { transform: translateY(0); opacity: 1; }
.ib-icon { flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--bg4); border-radius: var(--radius); }
.ib-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ib-text strong { font-size: 14px; font-weight: 700; }
.ib-text span { font-size: 11px; color: var(--text4); }
.ib-install { flex-shrink: 0; padding: 8px 16px; background: var(--accent, #00B3FF); color: var(--bg, #050D1F); border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; transition: transform .15s var(--ease); }
.ib-install:hover { transform: scale(1.04); }
.ib-close { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; color: var(--text4); font-size: 13px; }
.ib-close:hover { background: var(--bg4); color: var(--text1); }
@media (min-width: 720px) { .install-banner { left: auto; right: 24px; max-width: 380px; bottom: 24px; } }
@media (prefers-reduced-motion: reduce) { .install-banner { transition: opacity .2s ease; transform: none; } }

/* ─── Daily-Bonus (Wallet) ─── */
.daily-bonus { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; transition: border-color .2s var(--ease); }
.daily-bonus.claimable { border-color: var(--c-gold, #FFB000); background: linear-gradient(135deg, var(--bg3), rgba(255,176,0,0.06)); }
.db-left { display: flex; align-items: center; gap: 12px; }
.db-flame { font-size: 28px; }
.db-left strong { display: block; font-size: 14px; font-weight: 700; }
.db-left span { font-size: 11px; color: var(--text4); }
.db-claim { animation: db-pulse 2s infinite; }
@keyframes db-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(0,179,255,0.4); } 50% { box-shadow: 0 0 0 6px rgba(0,179,255,0); } }
.db-done { text-align: right; }
.db-done { font-size: 13px; font-weight: 700; color: var(--c-green, #3FB950); }
.db-done span { display: block; font-size: 10px; color: var(--text4); font-weight: 400; }
@media (prefers-reduced-motion: reduce) { .db-claim { animation: none; } }

/* ─── Cloud-Sync-Indikator ─── */
#sync-dot { display: inline-flex; align-items: center; color: var(--text4); transition: color .3s var(--ease); }
#sync-dot[data-state="ok"] { color: var(--c-green, #3FB950); }
#sync-dot[data-state="syncing"] { color: var(--accent, #00B3FF); animation: sync-pulse 1.2s infinite; }
#sync-dot[data-state="off"] { color: var(--text5); opacity: .5; }
#sync-dot[data-state="local"] { color: var(--text4); }
@keyframes sync-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { #sync-dot { animation: none !important; } }

/* ─── Cloud-Sync (Settings) ─── */
.sync-box { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.sync-hint { font-size: 12px; color: var(--text4); line-height: 1.5; margin-bottom: 12px; }
.sync-code-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.sync-code-row code { flex: 1; min-width: 0; font-family: var(--mono, monospace); font-size: 12px; background: var(--bg4); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; color: var(--accent, #00B3FF); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-transfer { display: flex; gap: 8px; }
.sync-transfer input { flex: 1; min-width: 0; font-size: 13px; }
.sync-warn { font-size: 11px; color: var(--text5); margin-top: 8px; line-height: 1.4; }

/* ─── Achievement-Fortschritt + Badge ─── */
.ach-item { position: relative; }
.ach-badge { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--c-green, #3FB950); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.ach-prog { width: 100%; height: 5px; background: var(--bg4); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.ach-prog-bar { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent, #00B3FF), #C44FE6); transition: width .5s var(--ease); }
.ach-prog-txt { font-size: 10px; color: var(--text4); font-weight: 700; margin-top: 3px; display: block; }

/* ─── Profil: Lieblings-Anime Poster-Reihe ─── */
.fav-posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; }
.fav-poster { cursor: pointer; transition: transform .15s var(--ease); }
.fav-poster:hover { transform: translateY(-3px); }
.fav-poster img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg4); }
.fav-ph { width: 100%; aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--text5); background: var(--bg4); border-radius: var(--radius-sm); }
.fav-poster span { display: block; font-size: 10px; color: var(--text3); margin-top: 4px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Auth-Gate (Login/Registrierung) ─────────────────────────────────────── */
.auth-gate { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(120% 120% at 50% 0%, #0a1730 0%, var(--bg, #050D1F) 70%); overflow-y: auto; }
.auth-card { width: 100%; max-width: 400px; background: var(--bg3, #0c1526); border: 1px solid var(--border, #1c2942); border-radius: var(--radius-lg, 18px); padding: 32px 28px; box-shadow: var(--shadow-lg, 0 24px 60px rgba(0,0,0,.5)); animation: page-in .3s ease; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--accent-n, #00E6FF); font-weight: 800; font-size: 20px; letter-spacing: -.02em; margin-bottom: 20px; }
.auth-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; text-align: center; margin: 0 0 4px; color: var(--text, #F5FAFF); }
.auth-sub { font-size: 13px; color: var(--text4, #92AECC); text-align: center; margin: 0 0 24px; line-height: 1.5; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field span { font-size: 12px; font-weight: 600; color: var(--text3, #B8CCE0); }
.auth-field input { width: 100%; padding: 12px 14px; background: var(--bg4, #0a1322); border: 1px solid var(--border, #1c2942); border-radius: var(--radius, 12px); color: var(--text, #F5FAFF); font-size: 15px; transition: border-color .2s, box-shadow .2s; }
.auth-field input:focus { outline: none; border-color: var(--accent, #00B3FF); box-shadow: 0 0 0 3px rgba(0,179,255,.15); }
.auth-error { font-size: 13px; color: #F85149; background: rgba(248,81,73,.1); border: 1px solid rgba(248,81,73,.3); border-radius: 10px; padding: 10px 12px; line-height: 1.4; }
.auth-submit { margin-top: 4px; width: 100%; padding: 13px; background: var(--accent, #00B3FF); color: #03070f; font-weight: 800; font-size: 15px; border: none; border-radius: var(--radius, 12px); cursor: pointer; transition: filter .2s, opacity .2s; }
.auth-submit:hover:not(:disabled) { filter: brightness(1.08); }
.auth-submit:disabled { cursor: default; }
.auth-link-btn { background: none; border: none; color: var(--accent, #00B3FF); font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px; }
.auth-link-btn:hover { text-decoration: underline; }
#auth-forgot { display: block; margin: 14px auto 0; }
.auth-switch { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border, #1c2942); font-size: 13px; color: var(--text4, #92AECC); }
.auth-link-strong { font-weight: 800; }
.auth-checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--text4, #92AECC); line-height: 1.4; cursor: pointer; }
.auth-checkbox input { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent, #00B3FF); cursor: pointer; }
/* hidden-Attribut muss display:flex der .auth-field schlagen (sonst Name-Feld im Login sichtbar). */
.auth-field[hidden] { display: none !important; }
/* hidden-Attribut muss display:flex der .auth-gate schlagen (sonst Gate trotz Login sichtbar). */
.auth-gate[hidden] { display: none !important; }

/* ─── Listen-Hub (zentrale Listen-Übersicht) ─── */
.lists-hub { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.list-tile { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; background: var(--bg3, #0c1526); border: 1px solid var(--border, #1c2942); border-radius: var(--radius, 14px); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; text-align: left; }
.list-tile:hover { border-color: var(--accent, #00B3FF); background: var(--bg4, #0a1322); transform: translateY(-1px); }
.lt-icon { font-size: 28px; flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--bg4, #0a1322); border-radius: 12px; }
.lt-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.lt-title { font-weight: 700; font-size: 16px; color: var(--text, #F5FAFF); }
.lt-desc { font-size: 12px; color: var(--text4, #92AECC); }
.lt-count { font-size: 18px; font-weight: 800; color: var(--accent-n, #00E6FF); font-family: var(--mono, monospace); flex-shrink: 0; }
@media (min-width: 768px) { .lists-hub { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.back-link { display: block; width: 100%; margin-bottom: 2px; cursor: pointer; }
.back-link:hover { color: var(--accent, #00B3FF); }

/* ─── Match-Layout (weniger Leerraum, Desktop-Begleitpanel) ─── */
.match-layout { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.match-side { display: none; }
.match-side-card { background: var(--bg3, #0c1526); border: 1px solid var(--border, #1c2942); border-radius: var(--radius, 14px); padding: 14px; font-size: 13px; color: var(--text3, #B8CCE0); }
.match-side-card h3 { font-size: 13px; margin: 0 0 6px; color: var(--text, #F5FAFF); }
.match-side-card p { line-height: 1.5; margin: 0; }
.match-recent { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.match-recent img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; cursor: pointer; background: var(--bg4); transition: transform .15s; }
.match-recent img:hover { transform: scale(1.05); }
@media (min-width: 900px) {
  .match-layout { display: grid; grid-template-columns: minmax(0, 380px) 300px; align-items: start; justify-content: center; gap: 28px; }
  .match-side { display: flex; flex-direction: column; gap: 14px; }
  .swipe-card { max-width: 380px; }
}

/* ─── Dating-Profil-Karte ─── */
.dating-card { height: auto; min-height: 480px; max-height: 70vh; overflow-y: auto; background: var(--bg3, #0c1526); display: block; }
.dt-profile { display: flex; flex-direction: column; }
.dt-photo { width: 100%; aspect-ratio: 1/1; max-height: 320px; background: linear-gradient(135deg, var(--accent, #00B3FF), var(--c-purple, #8b5cf6)); display: flex; align-items: center; justify-content: center; }
.dt-photo img { width: 100%; height: 100%; object-fit: cover; }
.dt-avph { font-size: 88px; font-weight: 800; color: rgba(255,255,255,.9); }
.dt-body { padding: 16px; }
.dt-body h2 { font-size: 22px; margin: 0 0 2px; }
.dt-meta { font-size: 13px; color: var(--text4, #92AECC); margin: 0 0 8px; }
.dt-bio { font-size: 14px; line-height: 1.5; color: var(--text2, #D8E6F5); margin: 0 0 12px; }
.dt-sec { margin-top: 10px; }
.dt-sec strong { font-size: 12px; color: var(--text4, #92AECC); display: block; margin-bottom: 5px; }
.dt-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.dt-chip { font-size: 11px; padding: 3px 9px; background: var(--bg4, #0a1322); border: 1px solid var(--border, #1c2942); border-radius: 999px; color: var(--text3, #B8CCE0); }
.dt-chip.green { border-color: rgba(63,185,80,.4); color: #5fd97a; }
.dt-chip.red { border-color: rgba(248,81,73,.4); color: #f85149; }
.dating-prefs { margin-bottom: 8px; width: 100%; max-width: 320px; }
.dating-prefs-row { display: flex; gap: 10px; flex-wrap: wrap; }
.dating-prefs-row label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text4); flex: 1; min-width: 120px; }
.dt-photo { position: relative; }
.dt-photo-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 2; }
.dt-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); transition: background .2s; }
.dt-dot.active { background: #fff; width: 10px; border-radius: 4px; }
.dt-photo-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(0,0,0,.5); color: #fff; border: none; width: 28px; height: 28px; border-radius: 50%; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.dt-photo:hover .dt-photo-nav { opacity: 1; }
.dt-photo-prev { left: 6px; }
.dt-photo-next { right: 6px; }
.dt-photo-nav:hover { background: rgba(0,0,0,.7); }

/* ─── Feed-Composer + Posts ─── */
.fd-composer { background: var(--bg3, #0c1526); border: 1px solid var(--border, #1c2942); border-radius: var(--radius, 14px); padding: 12px; margin-bottom: 14px; }
.fd-composer textarea { width: 100%; background: var(--bg4, #0a1322); border: 1px solid var(--border, #1c2942); border-radius: 10px; color: var(--text, #F5FAFF); padding: 10px; font-size: 14px; resize: vertical; font-family: inherit; }
.fd-composer textarea:focus { outline: none; border-color: var(--accent, #00B3FF); }
.fd-preview { position: relative; margin-top: 10px; }
.fd-preview img { width: 100%; max-height: 280px; object-fit: cover; border-radius: 10px; }
.fd-rmimg { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; border: none; cursor: pointer; font-size: 14px; }
.fd-composer-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.fp-av-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent, #00B3FF), var(--c-purple, #8b5cf6)); border-radius: 50%; }
.fp-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.fp-img img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-sm, 10px); cursor: pointer; background: var(--bg4); }
.fp-comment { font-size: 13px; padding: 5px 0; color: var(--text2, #D8E6F5); }
.fp-comment strong { color: var(--accent, #00B3FF); }
.fp-comments { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border, #1c2942); }
.fp-comment-input { display: flex; gap: 6px; margin-top: 8px; }
.fp-comment-input input { flex: 1; background: var(--bg4, #0a1322); border: 1px solid var(--border, #1c2942); border-radius: 8px; color: var(--text, #F5FAFF); padding: 7px 10px; font-size: 13px; }
.fp-act.fp-like.liked { color: #f5365c; }
@media (min-width: 768px) { #feed-list, #fd-composer { max-width: 600px; margin-left: auto; margin-right: auto; } .page-h { max-width: 600px; margin-left: auto; margin-right: auto; } }

/* ─── Feed mit linker Sektions-Sidebar (wie KMP CommunityScreen) ─── */
.feed-page { display: block; }
.feed-sidebar { display: none; }
.feed-sb-group { margin-bottom: 14px; }
.feed-sb-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text4, #92AECC); margin: 0 0 6px 4px; font-weight: 700; }
.feed-sb-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px; background: none; border: none; color: var(--text3, #B8CCE0); font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.feed-sb-item:hover { background: var(--bg4, #0a1322); color: var(--text, #F5FAFF); }
.feed-sb-item.active { background: color-mix(in srgb, var(--accent, #00B3FF) 16%, transparent); color: var(--accent-n, #00E6FF); }
.feed-sb-ic { font-size: 17px; width: 22px; text-align: center; }
/* Desktop: Sidebar links fix, Feed-Inhalt daneben */
@media (min-width: 900px) {
  .feed-page { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; }
  .feed-sidebar { display: block; position: sticky; top: 16px; }
  /* die alte zentrierte max-width-Regel innerhalb des Feeds neutralisieren */
  .feed-main #feed-list, .feed-main #fd-composer, .feed-main .page-h { max-width: 600px; margin-left: 0; margin-right: auto; }
}
/* Mobile: Sektionen als horizontale Chip-Leiste statt Spalte */
@media (max-width: 899px) {
  .feed-sidebar { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; -webkit-overflow-scrolling: touch; }
  .feed-sidebar #fd-new { display: none; }
  .feed-sb-group { display: flex; gap: 6px; margin: 0; }
  .feed-sb-label { display: none; }
  .feed-sb-item { width: auto; white-space: nowrap; padding: 7px 12px; border: 1px solid var(--border, #1c2942); border-radius: 999px; font-size: 13px; }
  .feed-sb-item span:not(.feed-sb-ic) { display: inline; }
}

/* ─── Story-Ring "+ Deine Story" + gesehen-Status ─── */
.story-ring.story-add .sr-ring { background: var(--bg4, #0a1322); position: relative; border: 2px dashed var(--border2, #2a3a55); padding: 0; }
.sr-add img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.sr-add > span:first-child:not(.sr-plus) { display: flex; align-items: center; justify-content: center; height: 100%; font-weight: 800; color: var(--text3); }
.sr-plus { position: absolute; bottom: -2px; right: -2px; width: 20px; height: 20px; background: var(--accent, #00B3FF); color: #03070f; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; border: 2px solid var(--bg, #050D1F); }
.sr-ring.sr-seen { background: var(--border2, #2a3a55) !important; }
.sr-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* ─── User-Story-Viewer (Fullscreen) ─── */
.ustory-overlay { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
.ustory { position: relative; width: 100%; max-width: 420px; height: 100%; max-height: 92vh; background: #000; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.ust-segs { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 5; display: flex; gap: 4px; }
.ust-seg { flex: 1; height: 3px; background: rgba(255,255,255,.3); border-radius: 2px; overflow: hidden; }
.ust-seg i { display: block; height: 100%; width: 0; background: #fff; }
.ust-seg i.done { width: 100%; }
.ust-seg i.active { animation: ustFill 4s linear forwards; }
@keyframes ustFill { from { width: 0 } to { width: 100% } }
.ust-head { position: absolute; top: 18px; left: 10px; right: 10px; z-index: 5; display: flex; align-items: center; gap: 8px; color: #fff; }
.ust-av img, .ust-avph { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.ust-avph { background: linear-gradient(135deg, var(--accent), var(--c-purple)); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.ust-head strong { font-size: 14px; }
.ust-time { font-size: 12px; color: rgba(255,255,255,.7); }
.ust-close { margin-left: auto; background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }
.ust-text { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 26px; font-weight: 700; line-height: 1.4; padding: 40px 28px; }
.ust-img { flex: 1; background-size: contain; background-position: center; background-repeat: no-repeat; }
.ust-caption { position: absolute; bottom: 20px; left: 16px; right: 16px; color: #fff; font-size: 15px; text-shadow: 0 1px 4px rgba(0,0,0,.8); text-align: center; }
.ust-nav { position: absolute; inset: 0; display: flex; z-index: 4; }
.ust-prev { width: 33%; } .ust-next { flex: 1; }

/* ─── Story-Composer ─── */
.scomp-overlay { position: fixed; inset: 0; z-index: 100001; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; padding: 16px; }
.scomp { width: 100%; max-width: 400px; background: var(--bg3, #0c1526); border: 1px solid var(--border, #1c2942); border-radius: 16px; overflow: hidden; }
.scomp-head { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.scomp-head h3 { margin: 0; font-size: 16px; }
.scomp-close { margin-left: auto; background: none; border: none; color: var(--text3); font-size: 18px; cursor: pointer; }
.scomp-tabs { display: flex; gap: 8px; padding: 12px 16px 0; }
.scomp-tabs button { flex: 1; padding: 8px; background: var(--bg4); border: 1px solid var(--border); border-radius: 10px; color: var(--text3); font-weight: 600; cursor: pointer; }
.scomp-tabs button.active { border-color: var(--accent); color: var(--accent-n); }
.scomp-text-prev { margin: 12px 16px; aspect-ratio: 9/14; max-height: 300px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.scomp-text-prev textarea { width: 90%; height: 80%; background: none; border: none; color: #fff; text-align: center; font-size: 22px; font-weight: 700; resize: none; outline: none; }
.scomp-text-prev textarea::placeholder { color: rgba(255,255,255,.6); }
.scomp-colors { display: flex; gap: 8px; padding: 0 16px; flex-wrap: wrap; }
.scomp-color { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.scomp-color.active { border-color: #fff; }
.scomp-img-prev { margin: 12px 16px; aspect-ratio: 9/14; max-height: 300px; border-radius: 12px; background: var(--bg4); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }
.scomp-img-prev.has-img .scomp-pick { background: rgba(0,0,0,.5); }
.scomp-pick { padding: 10px 16px; background: var(--accent); color: #03070f; border-radius: 10px; font-weight: 700; cursor: pointer; }
.scomp-caption { width: calc(100% - 32px); margin: 0 16px; background: var(--bg4); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; color: var(--text); font-size: 13px; }
.scomp-actions { display: flex; gap: 8px; padding: 16px; }
.scomp-privacy { flex: 1; background: var(--bg4); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 8px; font-size: 13px; }

/* ─── Post-Composer (KMP-Vollumfang) ─── */
.composer-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; }
.ct-tab { white-space: nowrap; padding: 6px 12px; background: var(--bg4, #0a1322); border: 1px solid var(--border, #1c2942); border-radius: 999px; color: var(--text3); font-size: 13px; font-weight: 600; cursor: pointer; }
.ct-tab.active { border-color: var(--accent); color: var(--accent-n); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.composer-quicktags { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.ct-qtag { font-size: 11px; padding: 3px 9px; background: var(--bg4); border: 1px solid var(--border); border-radius: 999px; color: var(--text4); cursor: pointer; }
.ct-qtag:hover { color: var(--accent); border-color: var(--accent); }
.composer-moods { display: flex; gap: 6px; margin: 8px 0; }
.ct-mood { font-size: 18px; width: 38px; height: 38px; background: var(--bg4); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.ct-mood.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.ct-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text3); margin: 6px 0; cursor: pointer; }
.composer-bottom { display: flex; gap: 8px; margin: 10px 0; }
.ct-select { flex: 1; background: var(--bg4); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 7px; font-size: 13px; }
.composer-anime { margin: 8px 0; }
.ct-anime-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 10px; background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid var(--accent); border-radius: 999px; color: var(--accent-n); }
.ct-anime-chip b { cursor: pointer; }
.poll-opt { display: block; width: 100%; margin: 4px 0; background: var(--bg4); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 7px 10px; font-size: 13px; }
#fd-spoiler-reason, #fd-link { width: 100%; margin: 4px 0; background: var(--bg4); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 7px 10px; font-size: 13px; }

/* ─── Story-Composer: Typ-Auswahl + Mood ─── */
.story-type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 16px; }
.story-type { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; background: var(--bg4, #0a1322); border: 1px solid var(--border, #1c2942); border-radius: 12px; color: var(--text2); font-size: 11px; font-weight: 600; cursor: pointer; transition: border-color .15s, transform .15s; }
.story-type:hover { border-color: var(--accent); transform: translateY(-2px); }
.story-type .st-ic { font-size: 24px; }
.scomp-back { background: none; border: none; color: var(--text3); font-size: 22px; cursor: pointer; margin-right: 4px; }
.scomp-moods { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 0; }
.sc-mood { font-size: 20px; width: 40px; height: 40px; background: var(--bg4); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.sc-mood.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
@media (max-width: 480px) { .story-type-grid { grid-template-columns: repeat(3, 1fr); } }

/* ─── Profil-Hero (KMP Hunter-Profile-Card) ─── */
.prof-hero { background: var(--bg3, #0c1526); border: 1px solid var(--border, #1c2942); border-radius: var(--radius-lg, 18px); overflow: hidden; margin-bottom: 16px; }
.prof-banner { height: 140px; background-size: cover; background-position: center; }
.prof-hero-body { padding: 0 18px 18px; margin-top: -44px; text-align: center; }
.prof-avatar { position: relative; width: 92px; height: 92px; border-radius: 50%; border: 3px solid; margin: 0 auto 8px; background: var(--bg4); overflow: visible; }
.prof-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.prof-av-ph { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--c-purple)); }
.prof-lvl { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 800; color: #03070f; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.prof-rank { font-size: 12px; font-weight: 700; letter-spacing: .05em; margin-bottom: 2px; }
.prof-name { font-size: 22px; font-weight: 800; margin: 0; }
.prof-handle { font-size: 13px; color: var(--text4); }
.prof-status { font-size: 14px; color: var(--text3); margin-top: 4px; }
.prof-follow { display: flex; justify-content: center; gap: 18px; margin: 12px 0; font-size: 13px; color: var(--text4); }
.prof-follow strong { color: var(--text); }
.prof-bio { font-size: 14px; color: var(--text2); line-height: 1.5; margin: 8px 0; }
.prof-meta { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.prof-meta-chip { font-size: 12px; padding: 4px 10px; background: var(--bg4); border: 1px solid var(--border); border-radius: 999px; color: var(--text3); }
.prof-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.prof-link { font-size: 12px; color: var(--accent); padding: 4px 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 999px; }

/* ─── Dating: Sub-Tabs + Matches/Likes/Editor ─── */
.dating-subtabs { margin-top: 4px; }
.match-list { display: flex; flex-direction: column; gap: 8px; max-width: 600px; margin: 0 auto; }
.match-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; cursor: pointer; text-align: left; }
.match-row:hover { border-color: var(--accent); }
.ml-av { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.ml-av img { width: 100%; height: 100%; object-fit: cover; }
.ml-avph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--c-purple)); }
.ml-body { flex: 1; display: flex; flex-direction: column; }
.ml-body span { font-size: 12px; color: var(--text4); }
.ml-go { font-size: 20px; }
.likes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-width: 700px; margin: 0 auto; }
.like-card { position: relative; background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 12px; text-align: center; }
.lg-av { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; margin: 0 auto 8px; }
.lg-av img { width: 100%; height: 100%; object-fit: cover; }
.lg-avph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--c-purple)); }
.lg-name { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.lg-super { position: absolute; top: 6px; right: 6px; font-size: 10px; background: var(--c-gold, #FFD700); color: #03070f; padding: 2px 6px; border-radius: 999px; font-weight: 700; }
/* Dating-Editor */
.dating-editor { max-width: 600px; margin: 0 auto; }
.dz-steps { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; }
.dz-step { white-space: nowrap; font-size: 12px; color: var(--text4); padding: 4px 8px; border-radius: 999px; }
.dz-step.active { color: var(--accent-n); background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 700; }
.dz-step.done { color: var(--c-green, #3FB950); }
.dz-form { background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.dz-l { display: block; font-size: 12px; font-weight: 600; color: var(--text4); margin: 12px 0 6px; }
.dz-l:first-child { margin-top: 0; }
.dz-i { width: 100%; background: var(--bg4); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 9px 11px; font-size: 14px; font-family: inherit; }
.dz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dz-chip { font-size: 12px; padding: 6px 11px; background: var(--bg4); border: 1px solid var(--border); border-radius: 999px; color: var(--text3); cursor: pointer; }
.dz-chip.active { border-color: var(--accent); color: var(--accent-n); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.dz-prompt { margin-bottom: 10px; }
.dz-pq { font-size: 13px; color: var(--text2); margin-bottom: 4px; }
.dz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.dz-photo { width: 120px; height: 120px; border-radius: 14px; overflow: hidden; background: var(--bg4); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.dz-photo img { width: 100%; height: 100%; object-fit: cover; }
.dz-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dz-g-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.dz-g-item img { width: 100%; height: 100%; object-fit: cover; }
.dz-g-item button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: none; cursor: pointer; }
.dz-g-add { aspect-ratio: 1; border: 2px dashed var(--border2, #2a3a55); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--text4); cursor: pointer; }

/* ─── Profil: Top-Listen mit Postern + Posts-Grid ─── */
.prof-top-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; -webkit-overflow-scrolling: touch; }
.prof-top-item { flex-shrink: 0; width: 90px; cursor: pointer; }
.prof-top-item img { width: 90px; height: 126px; object-fit: cover; border-radius: 10px; background: var(--bg4); }
.prof-top-item span { display: block; font-size: 11px; color: var(--text3); margin-top: 4px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof-top-item:hover img { outline: 2px solid var(--accent); }
.prof-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.prof-post-cell { position: relative; aspect-ratio: 1; background: var(--bg4); border-radius: 6px; overflow: hidden; cursor: pointer; }
.prof-post-cell img { width: 100%; height: 100%; object-fit: cover; }
.ppc-text { padding: 8px; font-size: 11px; color: var(--text3); line-height: 1.3; overflow: hidden; }
.ppc-stats { position: absolute; bottom: 0; left: 0; right: 0; padding: 4px 6px; font-size: 10px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); }

/* ─── Social: Post-Aktionsmenü + Privacy-Badges ─── */
.ppc-priv { position: absolute; top: 4px; left: 4px; font-size: 12px; background: rgba(0,0,0,.55); border-radius: 6px; padding: 1px 4px; }
.ppc-menu { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 6px; font-size: 16px; line-height: 1; cursor: pointer; }
.ppc-menu:hover { background: rgba(0,0,0,.8); }
.fp-menu { margin-left: auto; background: none; border: none; color: var(--text4); font-size: 20px; cursor: pointer; padding: 0 6px; line-height: 1; }
.fp-menu:hover { color: var(--text); }
.post-menu-overlay { position: fixed; inset: 0; z-index: 100002; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 600px) { .post-menu-overlay { align-items: center; } }
.post-menu { width: 100%; max-width: 380px; background: var(--bg3, #0c1526); border: 1px solid var(--border); border-radius: 16px 16px 0 0; padding: 8px; }
@media (min-width: 600px) { .post-menu { border-radius: 16px; } }
.pm-title { font-size: 13px; font-weight: 700; color: var(--text4); padding: 10px 12px 6px; }
.pm-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text5, #5a7290); padding: 10px 12px 4px; }
.pm-item { display: block; width: 100%; text-align: left; padding: 12px; background: none; border: none; color: var(--text); font-size: 15px; border-radius: 10px; cursor: pointer; }
.pm-item:hover { background: var(--bg4); }
.pm-priv.active { color: var(--accent-n); }
.pm-danger { color: var(--c-red, #F5365C); }
.pm-cancel { text-align: center; color: var(--text4); margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0; }
.fp-more-popup .pm-item:hover { background: var(--bg4); }
.fp-more-popup .pm-item:active { transform: scale(.97); }

/* ─── Rewarded-Ad-Gate (Dating, alle 5 Swipes) ─── */
.ad-gate-overlay { position: fixed; inset: 0; z-index: 100003; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn .25s; }
.ad-gate { width: 100%; max-width: 380px; background: var(--bg3, #0c1526); border: 1px solid var(--border, #1c2942); border-radius: 16px; overflow: hidden; }
.ad-gate-label { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--text5, #5a7290); padding: 8px 12px; border-bottom: 1px solid var(--border); }
.ad-gate-slot { aspect-ratio: 16/10; background: linear-gradient(135deg, #0a1322, #14233d); display: flex; align-items: center; justify-content: center; }
.ad-gate-ph { text-align: center; color: var(--text3); }
.ad-gate-ph-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--accent, #00B3FF); color: #03070f; font-size: 24px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.ad-gate-ph p { font-size: 13px; margin: 0 0 6px; }
.ad-gate-sponsor { font-size: 12px; color: var(--accent-n, #00E6FF); }
.ad-gate-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px; }
.ad-gate-foot span { font-size: 13px; color: var(--text4); }
.ad-gate-foot .btn[disabled] { opacity: .4; cursor: not-allowed; }
.ad-gate-premium { width: 100%; padding: 11px; background: none; border: none; border-top: 1px solid var(--border); color: var(--c-gold, #FFD700); font-size: 13px; font-weight: 600; cursor: pointer; }
.ad-gate-premium:hover { background: var(--bg4); }

/* ─── Follow-Button (Feed) + Freunde-Seite ─── */
.fp-follow { margin-left: auto; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--accent, #00B3FF); color: #03070f; border: none; cursor: pointer; white-space: nowrap; }
.fp-follow.following { background: var(--bg4); color: var(--text3); border: 1px solid var(--border); }
.fp-follow:hover { opacity: .9; }
.friends-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-width: 700px; margin: 0 auto; }
.friend-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 14px; text-align: center; }
.friend-card .fc-av { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; margin: 0 auto 8px; background: var(--bg4); }
.friend-card .fc-av img { width: 100%; height: 100%; object-fit: cover; }
.friend-card .fc-avph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--c-purple)); }
.friend-card .fc-name { font-size: 14px; font-weight: 600; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Chat-Features: Reactions, Replies, Aktionsmenü ─── */
.msg-wrap { display: flex; flex-direction: column; margin-bottom: 2px; }
.msg-wrap.mw-out { align-items: flex-end; }
.msg-wrap.mw-in { align-items: flex-start; }
.msg-deleted { opacity: .55; font-style: italic; }
.msg-reply-quote { font-size: 12px; opacity: .8; border-left: 2px solid currentColor; padding: 2px 6px; margin-bottom: 4px; border-radius: 4px; background: rgba(255,255,255,.06); }
.msg-reply-quote strong { display: block; font-size: 11px; }
.msg-reacts { display: flex; gap: 4px; margin: 2px 4px 0; flex-wrap: wrap; }
.msg-react { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--bg4, #0a1322); border: 1px solid var(--border); cursor: pointer; }
.msg-react.mine { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.msg-react-bar { display: flex; justify-content: space-around; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.msg-react-pick { font-size: 26px; background: none; border: none; cursor: pointer; transition: transform .12s; }
.msg-react-pick:hover { transform: scale(1.3); }
.uc-reply-banner { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg4, #0a1322); border-top: 1px solid var(--border); font-size: 12px; }
.uc-reply-banner > div { flex: 1; min-width: 0; overflow: hidden; }
.urb-name { color: var(--accent); font-weight: 600; }
.urb-text { color: var(--text4); }
.uc-reply-banner #urb-cancel { background: none; border: none; color: var(--text4); font-size: 16px; cursor: pointer; }
.msg { cursor: pointer; }

/* ─── Brand-Logos: echtes Anirova-Icon statt Schild-SVG ─── */
.sb-logo-img { width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0; object-fit: cover; }
.nb-brand img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
.auth-brand img { object-fit: cover; }
img.pl-shield { animation: pl-pulse 1.2s ease-in-out infinite; }
