/* AniMeory — compact Material 3 Expressive interpretation. */
:root {
  color-scheme: dark;
  --bg-main: var(--md-sys-color-background);
  --bg-card: #26262e;
  --bg-card-hover: #2f2f39;
  --bg-input: #24242c;
  --accent-purple: var(--md-sys-color-primary);
  --accent-purple-hover: #c8baf5;
  --text-on-accent: var(--md-sys-color-on-primary);
  --text-main: var(--md-sys-color-on-surface);
  --text-secondary: var(--md-sys-color-on-surface-variant);
  --text-muted: var(--md-sys-color-on-surface-variant);
  --border-subtle: rgba(255,255,255,.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --content-max: 1440px;
  --md-surface: var(--md-sys-color-surface-container-low);
  --md-surface-container: var(--md-sys-color-surface-container);
  --md-surface-high: var(--md-sys-color-surface-container-high);
  --md-primary: var(--md-sys-color-primary);
  --md-on-primary: var(--md-sys-color-on-primary);
  --md-primary-container: var(--md-sys-color-primary-container);
  --md-outline: #ffffff18;
  --md-shape-small: 12px;
  --md-shape-medium: 16px;
  --md-shape-large: 24px;
  --md-shape-extra-large: 28px;
  /* Official Material role names; custom AStrea values preserve approved colours. */
  --md-sys-color-background: #141414;
  --md-sys-color-surface: #141414;
  --md-sys-color-surface-container-low: #1b1b1f;
  --md-sys-color-surface-container: #24242c;
  --md-sys-color-surface-container-high: #26262e;
  --md-sys-color-on-surface: #f3f4f6;
  --text-primary: var(--md-sys-color-on-surface);
  --md-sys-color-inverse-surface: #e6e0ee;
  --md-sys-color-inverse-on-surface: #25212a;
  --md-sys-color-on-surface-variant: #a3a3b0;
  --md-sys-color-primary: #B8A7F0;
  --md-sys-color-on-primary: #1E1E24;
  --md-sys-color-primary-container: #302b40;
  --md-sys-color-on-primary-container: #ddd1fa;
  --md-sys-color-outline: #79747e;
  --md-sys-color-outline-variant: #49454f;
  --md-sys-color-error: #e63946;
  --md-sys-color-secondary: #cbc2db;
  --md-sys-color-on-secondary: #322c3d;
  --md-sys-color-tertiary: #8bd0c7;
  --md-sys-color-on-tertiary: #003731;
  --md-ref-typeface-brand: 'Roboto','Segoe UI',sans-serif;
  --md-ref-typeface-plain: 'Roboto','Segoe UI',sans-serif;
  /* Compact product overrides; not the stock mobile typescale. */
  --md-sys-typescale-title-medium-size: 18px;
  --md-sys-typescale-title-medium-weight: 700;
  --md-sys-typescale-headline-medium-size: 26px;
  --md-sys-typescale-headline-medium-weight: 700;
  --md-sys-typescale-body-medium-size: 14px;
  --md-sys-typescale-label-large-size: 13px;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-spatial-fast-duration: 260ms;
  --md-spatial-default-duration: 360ms;
  --md-effects-fast-duration: 180ms;
  --md-effects-default-duration: 260ms;
  --md-spatial-fast: cubic-bezier(.2,.8,.2,1);
  --md-spatial-default: cubic-bezier(.2,.8,.2,1);
  --md-effects-fast: cubic-bezier(.2,0,0,1);
  --md-effects-default: cubic-bezier(.2,0,0,1);
  --md-motion: var(--md-spatial-fast);
}
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-padding-top: 100px; scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) { html { overflow-y:scroll; } }
body.astrea-body { background: var(--bg-main); color: var(--text-main); font-family: var(--md-ref-typeface-plain); line-height: 1.5; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button,input,textarea { font: inherit; }
button,a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
:where(button[data-navigate]) { appearance:none; background:none; border:0; padding:0; color:inherit; text-align:left; }
button:disabled { opacity: .35; cursor: default; }
:focus-visible { outline: 2px solid var(--accent-purple); outline-offset: 4px; }
h1,h2,h3 { text-wrap: balance; }
.ui-icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.skip-link { position:fixed; z-index:300; left:20px; top:12px; padding:10px 16px; background:var(--accent-purple); color:var(--text-on-accent); border-radius:8px; transform:translateY(-150%); }
.skip-link:focus { transform:translateY(0); }
.astrea-header { position:fixed; top:0; left:0; right:0; z-index:100; padding:10px 0; background:var(--bg-main); border:0; }
.header-container { width:calc(100% - 32px); max-width:calc(var(--content-max) - 56px); min-height:64px; margin:auto; padding:8px 16px; display:flex; align-items:center; gap:16px; border-radius:28px; background:var(--md-surface); }
.header-left { display:flex; align-items:center; gap:22px; flex-shrink:0; }
.logo { font-size:20px; font-weight:800; letter-spacing:-1px; text-decoration:none; padding:0 4px; }
.logo-accent { color:var(--accent-purple); }
.nav-links { display:flex; align-items:center; gap:4px; }
.nav-item { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:40px; padding:8px 12px; border-radius:20px; color:var(--text-secondary); font-size:12px; font-weight:600; text-decoration:none; white-space:nowrap; transition:background-color var(--md-effects-fast-duration) var(--md-effects-fast),color var(--md-effects-fast-duration) var(--md-effects-fast),border-radius var(--md-spatial-fast-duration) var(--md-spatial-fast); }@media (hover: hover) and (pointer: fine){
.nav-item:hover { color:var(--text-main); background:#ffffff05; }}
.nav-item.active { color:var(--md-on-primary); background:var(--md-primary); }
.header-center { flex:1; min-width:120px; max-width:300px; margin-left:auto; }
.search-wrapper { display:flex; align-items:center; position:relative; }
.search-wrapper > .ui-icon { position:absolute; left:12px; width:16px; height:16px; color:var(--text-secondary); pointer-events:none; }
.search-input { width:100%; height:40px; padding:0 16px 0 38px; font-size:12px; color:var(--text-main); background-color:var(--bg-input); border:1px solid transparent; border-radius:22px; min-width:0; transition:border-color var(--md-effects-fast-duration) var(--md-effects-fast),background-color var(--md-effects-fast-duration) var(--md-effects-fast); }
.search-input::placeholder { color:var(--text-muted); }

.header-right { display:flex; align-items:center; gap:12px; flex-shrink:0; }
.btn-publish { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:40px; padding:0 16px; font-size:12px; font-weight:600; color:var(--text-on-accent); background:var(--accent-purple); border:0; border-radius:20px; transition:border-radius var(--md-spatial-fast-duration) var(--md-spatial-fast),background-color var(--md-effects-fast-duration) var(--md-effects-fast); }
.btn-publish .ui-icon { width:16px; height:16px; }@media (hover: hover) and (pointer: fine){
.btn-publish:hover { background:var(--accent-purple-hover); }}
.btn-icon { position:relative; display:grid; place-items:center; width:40px; height:40px; color:var(--accent-purple); border:0; background:var(--md-primary-container); border-radius:50%; transition:border-radius var(--md-spatial-fast-duration) var(--md-spatial-fast),background-color var(--md-effects-fast-duration) var(--md-effects-fast); }@media (hover: hover) and (pointer: fine){
.btn-icon:hover { background:#B8A7F030; color:var(--accent-purple); }}
.notification-badge { position:absolute; top:7px; right:7px; width:5px; height:5px; border-radius:50%; background:var(--accent-purple); box-shadow:0 0 0 2px var(--md-surface); }
.avatar-img { width:32px; height:32px; border-radius:50%; object-fit:cover; background:var(--bg-card); }
.main-content { width:100%; max-width:var(--content-max); margin:auto; padding:24px 28px 64px; }
.main-content > section + section { margin-top:36px; }
.section-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.section-title { font-size:var(--md-sys-typescale-title-medium-size); line-height:1.3; font-weight:var(--md-sys-typescale-title-medium-weight); letter-spacing:-.3px; }
.section-description { margin-top:4px; color:var(--text-secondary); font-size:12px; }
.slider-controls-top,.section-actions { display:flex; align-items:center; gap:20px; }
.view-all-link { display:inline-flex; align-items:center; min-height:36px; padding:6px 12px; border-radius:18px; font-size:12px; font-weight:500; color:var(--accent-purple); text-decoration:none; white-space:nowrap; transition:background-color var(--md-effects-fast-duration) var(--md-effects-fast); }@media (hover: hover) and (pointer: fine){
.view-all-link:hover { color:var(--accent-purple); background:var(--md-primary-container); }}
.shelf-controls { display:flex; gap:3px; }
.shelf-controls button { display:grid; place-items:center; width:36px; height:36px; border:0; border-radius:10px; background:var(--md-surface-high); color:var(--accent-purple); transition:border-radius var(--md-spatial-fast-duration) var(--md-spatial-fast),background-color var(--md-effects-fast-duration) var(--md-effects-fast); }@media (hover: hover) and (pointer: fine){
.shelf-controls button:hover:not(:disabled) { background:var(--md-primary-container); color:var(--accent-purple); }}
.shelf-controls .ui-icon { width:16px; height:16px; }
.slider-viewport { position:relative; min-width:0; }
.shelf-track { display:flex; width:100%; gap:12px; overflow-x:auto; scrollbar-width:none; padding:3px 2px 6px; scroll-snap-type:x proximity; overscroll-behavior-x:contain; }
.slider-track { gap:14px; }
.shelf-track::-webkit-scrollbar { display:none; }
.shelf-track:focus-visible { outline-offset:3px; border-radius:10px; }
.shelf-track.is-dragging { cursor:grabbing; user-select:none; scroll-snap-type:none; }
.news-card,.art-card,.manga-card { position:relative; flex-shrink:0; border:1px solid #ffffff08; overflow:hidden; background:var(--bg-card); scroll-snap-align:start; transition:border-color var(--md-effects-fast-duration) var(--md-effects-fast); }@media (hover: hover) and (pointer: fine){
.news-card:hover,.art-card:hover,.manga-card:hover { border-color:#B8A7F055; }}
.news-card { flex-basis:calc((100% - 56px)/4.8); min-width:240px; height:220px; border-radius:24px; }
.news-cover,.art-cover,.art-collage { position:absolute; inset:0; }
.media-frame { background:var(--bg-card); overflow:hidden; }
.media-frame img { display:block; width:100%; height:100%; object-fit:cover; }
.media-frame.media-unavailable { background:repeating-linear-gradient(135deg,transparent 0 20px,#B8A7F005 20px 21px); }
.media-fallback { position:absolute; inset:0; display:grid; place-items:center; padding:12px; color:var(--text-secondary); font-size:11px; text-align:center; }
.news-badge { position:absolute; top:12px; left:12px; z-index:3; font-size:10px; font-weight:500; background:#141414c9; color:var(--text-main); border:0; border-radius:12px; padding:4px 9px; }
.news-info { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:flex-end; padding:16px; background:linear-gradient(180deg,transparent 20%,#14141422 40%,#141414de 76%,#141414 100%); }
.news-title { font-size:13px; font-weight:550; line-height:1.4; margin-bottom:10px; min-height:36px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.news-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:11px; color:var(--text-muted); font-variant-numeric:tabular-nums; }
.art-card { flex-basis:calc((100% - 72px)/7); min-width:155px; height:175px; border-radius:20px; }
.art-collage { display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; gap:2px; }
.collage-item { position:relative; min-width:0; min-height:0; }
.art-tag-badge { position:absolute; z-index:3; top:8px; left:8px; padding:3px 7px; border-radius:10px; background:#e63946; color:white; font-size:10px; font-weight:650; }
.art-tag-badge.badge-neutral { background:#141414bb; border:1px solid #ffffff15; }
.art-meta-bar { position:absolute; z-index:2; bottom:0; left:0; right:0; display:flex; align-items:center; justify-content:space-between; gap:4px; padding:28px 9px 9px; background:linear-gradient(transparent,#141414e0); font-size:10.5px; color:var(--text-main); font-variant-numeric:tabular-nums; }
.art-rating,.art-stat-item { display:inline-flex; align-items:center; gap:4px; }
.art-rating { color:#fbbf24; }
.art-rating .ui-icon { width:11px; height:11px; fill:currentColor; stroke:none; }
.art-stat-item .ui-icon { width:12px; height:12px; }
.art-stat-group { display:flex; gap:7px; }
.manga-card { flex-basis:calc((100% - 96px)/9); min-width:115px; height:175px; border-radius:16px; }
.manga-cover { width:100%; height:100%; position:relative; }
.site-toast { position:fixed; z-index:250; inset:auto; bottom:max(24px,env(safe-area-inset-bottom)); left:50%; margin:0; transform:translateX(-50%); width:max-content; max-width:calc(100% - 32px); padding:14px 20px; border:1px solid #B8A7F030; background:var(--md-surface-high); color:var(--text-main); border-radius:20px; box-shadow:0 8px 24px #0005; font-size:13px; overflow-wrap:anywhere; pointer-events:none; }
.site-toast[hidden]{display:none}.site-toast::backdrop{background:transparent;pointer-events:none}
.signin-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.signin-actions a{text-decoration:none;display:inline-flex;align-items:center;justify-content:center;min-height:48px}
.signin-panel{max-width:560px;margin:64px auto;padding:32px;border-radius:28px;background:var(--md-surface-high)}.signin-panel h2,.signin-panel h1{font-size:24px;margin:0 0 24px}
.signin-dialog{width:min(480px,calc(100% - 32px));padding:24px;border:0;border-radius:28px;background:var(--md-surface-high);color:var(--text-main)}.signin-dialog::backdrop{background:#0009}.profile-disclosure[hidden]{display:none}
body[data-signed-out] .header-right>.btn-publish{display:none}
@media(max-width:450px){.header-signin a:last-child{display:none}}
@media(max-width:650px){.header-signin{gap:6px}.header-signin a{min-height:44px;padding:10px;font-size:12px}.header-right .header-signin~.profile-disclosure{display:none}.signin-panel{margin:24px 0;padding:24px}.signin-panel h2,.signin-panel h1{font-size:22px}}
.profile-disclosure { position: relative; }
.user-profile { display:flex; align-items:center; gap:6px; min-height:44px; padding:4px 6px; background:transparent; border:0; color:var(--text-secondary); border-radius:22px; transition:background-color var(--md-effects-fast-duration) var(--md-effects-fast),border-radius var(--md-spatial-fast-duration) var(--md-spatial-fast); }
.user-profile svg { transition: transform var(--md-spatial-fast-duration) var(--md-spatial-fast); }
.user-profile[aria-expanded="true"] svg { transform: rotate(180deg); }
.profile-dropdown { position:absolute; top:calc(100% + 12px); right:0; width:264px; padding:8px; border:1px solid var(--border-subtle); border-radius:24px; background:var(--md-surface-high); box-shadow:0 12px 40px #0006; transform-origin:top right; animation:menu-spatial var(--md-spatial-default-duration) var(--md-spatial-default) both, menu-effects var(--md-effects-default-duration) var(--md-effects-default) both; }
.dropdown-identity { display:flex; gap:12px; align-items:center; padding:12px 12px 16px; margin-bottom:6px; border-bottom:1px solid var(--border-subtle); }
.dropdown-identity > div { flex:1; min-width:0; }
.dropdown-identity strong { display:inline; font-size:14px; overflow-wrap:anywhere; }
.dropdown-identity > div > span:not(.account-badge) { display:block; font-size:12px; color:var(--text-secondary); margin-top:6px; overflow-wrap:anywhere; }
.mini-avatar { flex-shrink:0; width:40px; height:40px; display:grid; place-items:center; border-radius:14px; background:var(--accent-purple); color:var(--text-on-accent); font-weight:600; }
/* One row component for navigation and account actions. */
.profile-dropdown > :is(a,button){display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-height:48px;padding:10px 14px;border:0;border-radius:var(--md-shape-medium);background:transparent;color:var(--text-main);font:inherit;font-size:13px;font-weight:500;text-align:left;text-decoration:none;cursor:pointer;transition:background-color var(--md-effects-fast-duration) var(--md-effects-fast)}
.profile-dropdown > :is(a,button):focus-visible{background:color-mix(in srgb,var(--md-primary) 10%,transparent)}
@media(hover:hover) and (pointer:fine){.profile-dropdown > :is(a,button):hover{background:color-mix(in srgb,var(--md-primary) 8%,transparent)}}
.profile-dropdown > :is(a,button):active{background:color-mix(in srgb,var(--md-primary) 10%,transparent)}

.profile-breadcrumb { display: flex; gap: 12px; margin: 0 0 20px; font-size: 12px; color: var(--text-secondary); }
.profile-breadcrumb :is(a,button[data-navigate]) { color: inherit; text-decoration: none; }@media (hover: hover) and (pointer: fine){
.profile-breadcrumb :is(a,button[data-navigate]):hover { color: var(--accent-purple); }}
.profile-shell { border:0; border-radius:28px; overflow:hidden; background:var(--md-surface); }
.profile-cover { height:156px; padding:24px 28px; display:flex; justify-content:space-between; align-items:flex-start; background:linear-gradient(115deg,#292432,#24212d 65%,#393044); position:relative; overflow:hidden; }
.profile-cover::after { content:""; position:absolute; right:8%; top:18px; width:170px; height:170px; border:0; border-radius:45% 35% 48% 32%; background:#B8A7F018; transform:rotate(-24deg); box-shadow:36px 18px 0 #B8A7F00b; }
.cover-caption { font-size:18px; font-weight:650; line-height:1.35; letter-spacing:-.25px; color:#d1c5ee; max-width:240px; }
.prototype-label { font-size:10px; color:#d1c5ee; padding:5px 10px; border:1px solid #B8A7F025; border-radius:16px; z-index:1; background:#14141420; }
.profile-overview { display:flex; gap:20px; align-items:center; padding:0 28px 20px; position:relative; }
.profile-avatar { flex-shrink:0; margin-top:-28px; width:96px; height:96px; display:grid; place-items:center; font-size:36px; font-weight:650; border-radius:30px; background:var(--accent-purple); color:var(--text-on-accent); border:5px solid var(--md-surface); }
.profile-identity { padding-top: 20px; min-width: 0; }
.profile-handle { font-size: 12px; color: var(--text-secondary); }
.profile-identity h1 { font-size:var(--md-sys-typescale-headline-medium-size); line-height:1.3; font-weight:750; letter-spacing:-.6px; margin:4px 0 8px; overflow-wrap:anywhere; }
.profile-identity > p:last-child { font-size: 14px; color: #b1adb9; max-width: 560px; overflow-wrap: anywhere; }
.secondary-button, .primary-button { text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; padding:10px 18px; border-radius:22px; font-size:var(--md-sys-typescale-label-large-size); font-weight:600; cursor:pointer; transition:border-radius var(--md-spatial-fast-duration) var(--md-spatial-fast),background-color var(--md-effects-fast-duration) var(--md-effects-fast); }
.secondary-button { background:var(--md-primary-container); border:0; color:var(--md-sys-color-on-primary-container); }@media (hover: hover) and (pointer: fine){
.secondary-button:hover { background:#B8A7F030; }}
.primary-button { background:var(--accent-purple); color:var(--text-on-accent); border:0; }@media (hover: hover) and (pointer: fine){
.primary-button:hover { background: var(--accent-purple-hover); }}
.profile-edit { margin-left: auto; flex-shrink: 0; }
.profile-stats { display:flex; gap:6px; padding:0 28px 24px 144px; }
.profile-stats div { display:flex; align-items:center; gap:7px; padding:10px 16px; background:var(--md-surface-container); border:0; border-radius:6px; }
.profile-stats strong { font-size:18px; font-weight:700; color:var(--accent-purple); }
.profile-stats span { font-size: 12px; color: var(--text-secondary); }
.profile-body { display:grid; grid-template-columns:280px minmax(0,1fr); gap:24px; margin-top:24px; }
.profile-sidebar { display:grid; gap:4px; align-content:start; }
.profile-panel { background:var(--md-surface); border:0; border-radius:10px; padding:20px; }
.profile-panel h2 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.profile-panel p { font-size: 13px; line-height: 1.65; color: var(--text-secondary); }
.profile-panel dl { margin: 20px 0; font-size: 12px; }
.profile-panel dl div { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.profile-panel dt { color: var(--text-secondary); }
.profile-panel dd { text-align: right; }
.profile-note { display: block; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.eyebrow { display: block; color: var(--accent-purple); font-size: 9px; letter-spacing: 1.4px; margin-bottom: 12px; }
.coming-soon { display:inline-block; margin-top:16px; font-size:11px; color:var(--accent-purple); border-radius:16px; padding:6px 10px; background:var(--md-primary-container); }
.profile-collection { min-width: 0; }
.profile-tabs { display:flex; gap:3px; border:0; padding:0; width:max-content; max-width:100%; }
.profile-tabs button { position:relative; display:flex; align-items:center; justify-content:center; gap:7px; min-height:44px; padding:10px 16px; font-size:13px; font-weight:600; color:var(--text-secondary); background:var(--md-surface-container); border:0; border-radius:6px; cursor:pointer; white-space:nowrap; transition:border-radius var(--md-spatial-fast-duration) var(--md-spatial-fast),background-color var(--md-effects-fast-duration) var(--md-effects-fast),color var(--md-effects-fast-duration) var(--md-effects-fast); }
.profile-tabs button span { font-size:10px; padding:1px 5px; background:#14141412; border-radius:8px; }
.profile-tabs button[aria-selected="true"] { color:var(--text-on-accent); background:var(--accent-purple); border-radius:24px; }
.profile-tabs button[aria-selected="true"]::after { content:none; }
.collection-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 24px 0; }
.collection-heading h2 { font-size: 18px; font-weight: 600; }
.collection-heading p { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.collection-count { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.profile-empty { min-height:260px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:12px; padding:32px 24px; border:0; border-radius:24px; background:var(--md-surface); }
.profile-empty svg, .empty-heart { color: var(--accent-purple); opacity: .7; }
.empty-heart { display:grid; place-items:center; font-size:0; line-height:1; }
.profile-empty h3 { font-size:16px; font-weight:650; }
.profile-empty p { max-width: 350px; font-size: 13px; color: var(--text-secondary); line-height: 1.65; }
.about-content { padding:24px; border-radius:24px; background:var(--md-surface); font-size:14px; overflow-wrap:anywhere; white-space:pre-wrap; }
.about-content .profile-note { margin-top: 20px; white-space: normal; }
.profile-dialog { width:min(460px,calc(100% - 32px)); margin:auto; padding:24px; border:0; border-radius:28px; background:var(--md-surface-high); color:var(--text-main); overscroll-behavior:contain; }
.profile-dialog::backdrop { background: #0009; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.dialog-heading h2 { font-size:20px; font-weight:650; }
.dialog-close { display:grid; place-items:center; flex-shrink:0; width:48px; height:48px; background:var(--md-primary-container); border:0; border-radius:50%; color:var(--accent-purple); cursor:pointer; }
.profile-dialog label { display: block; font-size: 13px; margin: 16px 0 8px; }
.profile-dialog input, .profile-dialog textarea { width:100%; padding:14px 16px; background-color:var(--bg-input); border:1px solid var(--md-sys-color-outline); border-radius:16px; color:var(--text-main); font-size:14px; }
.profile-dialog textarea { resize: vertical; }
.profile-dialog .profile-note { margin-top: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.telegram-link-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:16px; }
.telegram-link-status { overflow-wrap:anywhere; unicode-bidi:plaintext; }
.telegram-link-actions:empty, .settings-group>.field-help:empty { display:none; }
.telegram-link-actions>a, .telegram-link-actions>button { max-width:100%; }
.settings-group>.telegram-link-actions+a { margin-top:12px; }

/* Profile follows the same quiet shelf rhythm. */









.profile-stats div:last-child { border:0; padding:10px 16px; border-radius:6px 18px 18px 6px; }

.profile-panel:first-child { padding-top:20px; border-radius:24px 24px 10px 10px; }
.profile-panel .eyebrow { font-size:12px; letter-spacing:0; }


.profile-empty .empty-heart .ui-icon { width:40px; height:40px; }




.nav-item .ui-icon { width:16px; height:16px; }@media (hover: hover) and (pointer: fine){

.nav-item:hover:not(.active) { color:var(--text-main); background:#B8A7F012; }}@media (hover: hover) and (pointer: fine){

.search-input:hover { background:var(--bg-card); }} .user-profile[aria-expanded="true"] { background:var(--md-primary-container); }@media (hover: hover) and (pointer: fine){

.user-profile:hover{ background:var(--md-primary-container); }}

.shelf-controls button:first-child { border-radius:20px 10px 10px 20px; }

.shelf-controls button:last-child { border-radius:10px 20px 20px 10px; }

.profile-dropdown :is(a,button) .ui-icon { width:18px; height:18px; flex-shrink:0; color:var(--md-sys-color-primary); }

.secondary-button .ui-icon, .primary-button .ui-icon { width:17px; height:17px; }

.profile-stats div:first-child { border-radius:18px 6px 6px 18px; }

.profile-panel:last-child { border-radius:10px 10px 24px 24px; }

.profile-tabs button .ui-icon { width:17px; height:17px; }

.profile-tabs button:first-child { border-radius:24px 6px 6px 24px; }

.profile-tabs button:last-child { border-radius:6px 24px 24px 6px; }

.profile-empty > svg, .profile-empty > .empty-heart { box-sizing:content-box; padding:18px; border-radius:28px; background:var(--md-primary-container); color:var(--accent-purple); opacity:1; }

@keyframes menu-spatial { from { transform:translateY(-8px) scale(.97); } to { transform:translateY(0) scale(1); } }
@keyframes menu-effects { from { opacity:0; } to { opacity:1; } }
@keyframes dialog-spatial { from { transform:translateY(8px) scale(.98); } to { transform:translateY(0) scale(1); } }
.profile-dialog[open] { animation:dialog-spatial var(--md-spatial-default-duration) var(--md-spatial-default) both, menu-effects var(--md-effects-default-duration) var(--md-effects-default) both; }
.profile-tabs button[aria-selected="true"]:first-child, .profile-tabs button[aria-selected="true"]:last-child { border-radius:24px; }
@media (max-width:1200px) {
 .header-container { gap:12px; }
 .header-left { gap:14px; }
 .nav-item { padding-inline:9px; }
 .nav-item .ui-icon { display:none; }
 .btn-publish { display:none; }
 .art-card { flex-basis:160px; }
 .manga-card { flex-basis:120px; }
}
@media (max-width:1024px) { .news-card { flex-basis:calc((100% - 14px)/2.5); } }
@media (max-width:900px) {
 .header-container { display:flex; flex-wrap:wrap; gap:8px 12px; padding:10px 12px; }
 .header-left { display:contents; }
 .logo { order:0; }
 .header-center { order:1; max-width:none; }
 .header-right { order:2; }
 .nav-links { order:3; width:100%; overflow-x:auto; scrollbar-width:none; gap:4px; }
 .nav-item { min-height:40px; padding-inline:12px; }
 .profile-body { grid-template-columns:220px minmax(0,1fr); gap:20px; }
 .profile-stats { padding-left:28px; }
}
@media (max-width:768px) { .art-card { flex-basis:140px; height:160px; } .manga-card { flex-basis:105px; height:155px; } }
@media (max-width:640px) {
 html { scroll-padding-top:140px; }
 .astrea-header { padding:8px 0; }
 .header-container { width:calc(100% - 24px); padding:8px 10px; gap:6px 10px; border-radius:24px; }
 .header-center { min-width:60px; }
 .header-right { gap:0; }
 .btn-icon { display:none; }
 .logo { font-size:19px; }
 .nav-item { padding:8px 10px; font-size:12px; min-height:36px; }
 .search-input { height:38px; }
 .main-content { padding:20px 16px 40px; }
 .main-content > section + section { margin-top:32px; }
 .section-header { align-items:center; gap:8px; }
 .section-title { font-size:18px; }
 .section-description { font-size:11px; max-width:190px; }
 .section-actions,.slider-controls-top { gap:8px; }
 .section-actions .view-all-link,.slider-controls-top .view-all-link { display:none; }
 .shelf-controls { gap:3px; }
 .shelf-controls button { width:34px; height:36px; }
 .news-card { flex-basis:80%; }
 .profile-cover { height:132px; padding:20px; }
 .cover-caption { max-width:145px; font-size:16px; }
 .profile-cover::after { width:125px; height:125px; right:-24px; top:24px; }
 .prototype-label { font-size:9px; padding:4px 8px; }
 .profile-overview { flex-wrap:wrap; padding:0 20px 20px; gap:12px; align-items:flex-start; }
 .profile-avatar { width:76px; height:76px; border-radius:24px; font-size:28px; }
 .profile-identity { flex:1; padding-top:12px; }
 .profile-identity h1 { font-size:22px; }
 .profile-identity > p:last-child { font-size:13px; }
 .profile-edit { margin:0; width:100%; }
 .profile-stats { padding:0 20px 20px; display:grid; grid-template-columns:1fr 1fr; gap:4px; }
 .profile-stats div { border-radius:8px; padding:10px 12px; }
 .profile-stats div:first-child { border-radius:16px 8px 8px 8px; }
 .profile-stats div:last-child { border-radius:8px 8px 16px 8px; padding:10px 12px; }
 .profile-body { display:flex; flex-direction:column; }
 .profile-collection { order:0; }
 .profile-sidebar { order:1; }
 .profile-tabs { width:100%; gap:3px; }
 .profile-tabs button { flex:1; font-size:12px; gap:5px; padding:10px 9px; }
 .profile-tabs button .ui-icon { display:none; }
 .collection-count { display:none; }
 .profile-empty { min-height:240px; }
 .profile-panel { padding:20px; }
 .profile-dialog input,.profile-dialog textarea { font-size:16px; }
}
@media (pointer:coarse) {
 .shelf-controls button,.btn-icon,.user-profile,.dialog-close { min-width:48px; min-height:48px; }
 .nav-item,.view-all-link,.profile-dropdown :is(a,button[data-navigate]),.profile-tabs button,.primary-button,.secondary-button { min-height:48px; }
 .search-input,.profile-dialog input { min-height:48px; }
 .section-heading { min-width:0; }
}

/* Unit-mass sampled spring response, using documented Material damping/stiffness. */
@supports (animation-timing-function: linear(0, 1)) {
 :root {
  --md-spatial-fast: linear(0.000000, 0.025571, 0.088524, 0.172606, 0.266319, 0.361780, 0.453820, 0.539264, 0.616378, 0.684439, 0.743412, 0.793709, 0.836007, 0.871127, 0.899938, 0.923305, 0.942043, 0.956901, 0.968546, 0.977562, 0.984450, 0.989638, 0.993481, 0.996272, 0.998251, 0.999612, 1.000509, 1.001063, 1.001371, 1.001504, 1.001518, 1.001455, 1.001345, 1.001210, 1.001065, 1.000920, 1.000783, 1.000658, 1.000545, 1.000446, 1.000000);
  --md-spatial-default: linear(0.000000, 0.024586, 0.085370, 0.166944, 0.258317, 0.351880, 0.442575, 0.527238, 0.604088, 0.672320, 0.731806, 0.782866, 0.826093, 0.862233, 0.892098, 0.916505, 0.936236, 0.952016, 0.964497, 0.974257, 0.981797, 0.987543, 0.991859, 0.995043, 0.997345, 0.998967, 1.000070, 1.000786, 1.001216, 1.001440, 1.001521, 1.001503, 1.001422, 1.001305, 1.001168, 1.001026, 1.000886, 1.000754, 1.000633, 1.000526, 1.000000);
  --md-effects-fast: linear(0.000000, 0.032048, 0.107253, 0.202825, 0.304482, 0.403669, 0.495615, 0.578009, 0.650083, 0.712002, 0.764455, 0.808396, 0.844871, 0.874918, 0.899511, 0.919529, 0.935745, 0.948827, 0.959342, 0.967765, 0.974493, 0.979853, 0.984113, 0.987492, 0.990166, 0.992278, 0.993944, 0.995256, 0.996288, 0.997098, 0.997734, 0.998232, 0.998621, 0.998926, 0.999164, 0.999350, 0.999494, 0.999607, 0.999695, 0.999763, 1.000000);
  --md-effects-default: linear(0.000000, 0.028475, 0.096329, 0.184037, 0.278952, 0.373177, 0.462052, 0.543087, 0.615215, 0.678266, 0.732615, 0.778943, 0.818072, 0.850872, 0.878189, 0.900815, 0.919465, 0.934774, 0.947295, 0.957502, 0.965797, 0.972522, 0.977960, 0.982349, 0.985883, 0.988724, 0.991004, 0.992832, 0.994294, 0.995462, 0.996394, 0.997138, 0.997730, 0.998201, 0.998575, 0.998872, 0.999108, 0.999295, 0.999443, 0.999560, 1.000000);
 }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; transition:none !important; animation:none !important; } }

/* Working catalogue and personal collection — the existing feed stays intact. */
.btn-publish { text-decoration:none; }
.avatar-initial { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:var(--md-primary-container); color:var(--accent-purple); font-size:14px; font-weight:700; }
.site-footer { max-width:1440px; margin:0 auto; padding:16px 28px 28px; border-top:1px solid var(--border-subtle); color:var(--text-secondary); font-size:11px; display:flex; justify-content:space-between; gap:16px; }
.page-heading { display:flex; justify-content:space-between; align-items:center; gap:24px; margin-bottom:24px; }
.page-heading h1 { font-size:28px; font-weight:700; letter-spacing:-.5px; }
.page-heading p { font-size:14px; color:var(--text-secondary); margin-top:8px; max-width:650px; }
.page-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.page-actions a,.page-heading>a,.app-empty a { text-decoration:none; }
.filter-panel { display:grid; grid-template-columns:minmax(180px,2fr) repeat(3,minmax(120px,1fr)) auto auto; align-items:end; gap:12px; padding:20px; background:var(--md-surface); border-radius:24px; margin-bottom:16px; }
.filter-panel label { display:flex; flex-direction:column; gap:8px; color:var(--text-secondary); font-size:12px; min-width:0; }
.filter-panel input,.filter-panel select,.collection-toolbar input,.collection-toolbar select { width:100%; height:42px; padding:0 12px; background-color:var(--bg-input); color:var(--text-main); border:1px solid var(--md-outline); border-radius:12px; font:inherit; font-size:13px; min-width:0; }
.text-button { min-height:40px; padding:8px 12px; border:0; background:none; color:var(--accent-purple); font-size:13px; border-radius:20px; }@media (hover: hover) and (pointer: fine){
.text-button:hover { background:var(--md-primary-container); }}
.results-status { font-size:12px; color:var(--text-secondary); margin:16px 0; min-height:18px; }
.anime-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:24px 16px; }
.anime-card { min-width:0; position:relative; display:flex; flex-direction:column; }
.anime-card-link { display:block; width:100%; text-decoration:none; border-radius:18px; }
.anime-poster { position:relative; height:220px; overflow:hidden; border-radius:20px; background:var(--bg-card); transition:border-radius var(--md-spatial-fast-duration) var(--md-spatial-fast); }
.anime-poster img,.detail-poster img { width:100%; height:100%; display:block; object-fit:cover; }@media (hover: hover) and (pointer: fine){
.anime-card-link:hover .anime-card-title { color:var(--accent-purple); }}
.anime-card-title { font-size:14px; font-weight:600; line-height:1.35; margin-top:10px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.anime-card-meta { font-size:11px; line-height:16px; min-height:16px; color:var(--text-secondary); margin-top:6px; }
.anime-source-score { position:absolute; top:8px; left:8px; background:#141414d9; color:var(--text-main); padding:4px 7px; border-radius:12px; font-size:11px; }
.anime-list-badge { position:absolute; bottom:8px; left:8px; max-width:calc(100% - 16px); padding:4px 8px; text-align:left; color:var(--md-sys-color-on-primary-container); background:var(--md-primary-container); border-radius:8px; font-size:10px; font-weight:600; }
.poster-placeholder { display:grid; place-items:center; width:100%; height:100%; min-height:100px; padding:12px; color:var(--text-secondary); text-align:center; font-size:12px; }
.anime-card-actions { display:flex; gap:4px; margin-top:auto; padding-top:12px; }
.card-add { flex:1; min-width:0; min-height:36px; background:var(--md-primary-container); color:var(--md-sys-color-on-primary-container); border:0; border-radius:18px 6px 6px 18px; font-size:12px; font-weight:600; transition:background-color var(--md-effects-fast-duration) var(--md-effects-fast),border-radius var(--md-spatial-fast-duration) var(--md-spatial-fast); }
.card-favorite { width:36px; height:36px; flex-shrink:0; display:grid; place-items:center; background:var(--md-surface-high); color:var(--accent-purple); border:0; border-radius:6px 18px 18px 6px; font-size:22px; transition:background-color var(--md-effects-fast-duration) var(--md-effects-fast),border-radius var(--md-spatial-fast-duration) var(--md-spatial-fast); }
.card-favorite[aria-pressed="true"] { color:var(--text-on-accent); background:var(--accent-purple); }@media (hover: hover) and (pointer: fine){
.card-add:hover,.card-favorite:hover:not([aria-pressed="true"]) { background:color-mix(in srgb,var(--md-primary-container),var(--accent-purple) 10%); }}
.card-context { margin-top:6px; font-size:11px; line-height:16px; color:var(--text-secondary); }
.card-progress { font-size:11px; margin-top:6px; color:var(--accent-purple); }
.anime-shelf { gap:16px; }
.anime-shelf .anime-card { flex:0 0 156px; width:156px; scroll-snap-align:start; }
.anime-shelf .anime-poster { height:195px; }
.anime-shelf .anime-card-title { font-size:13px; }
.loading-message { padding:24px; font-size:14px; color:var(--text-secondary); }
.app-empty { grid-column:1/-1; width:100%; padding:40px 24px; border-radius:24px; background:var(--md-surface); text-align:center; }
.app-empty h2 { font-size:18px; margin-bottom:12px; }
.app-empty p { max-width:560px; margin:0 auto 20px; color:var(--text-secondary); font-size:14px; }
.app-empty a { display:inline-flex; }
.pagination { display:flex; align-items:center; justify-content:center; gap:20px; margin:32px 0; font-size:13px; }
.source-note { font-size:12px; color:var(--text-secondary); line-height:1.6; margin-top:20px; }
.source-note a,a.source-note { color:var(--accent-purple); }
.anime-detail-layout { display:grid; grid-template-columns:220px minmax(0,1fr); gap:32px; align-items:start; }
.detail-poster { width:220px; height:330px; overflow:hidden; border-radius:24px; background:var(--bg-card); }
.release-schedule { margin:16px 0; padding:12px 16px; border-radius:16px; background:var(--md-surface-container); display:flex; align-items:center; flex-wrap:wrap; gap:4px 12px; font-size:13px; width:fit-content; max-width:100%; }
.release-schedule strong { color:var(--accent-purple); }
.release-schedule p { margin:0; }
.release-schedule [data-countdown] { flex-basis:100%; font-size:12px; color:var(--text-secondary); }
.detail-info { min-width:0; }
.detail-kind { font-size:12px; color:var(--accent-purple); margin-bottom:10px; }
.detail-title { font-size:28px; line-height:1.2; max-width:750px; }
.detail-original { font-size:14px; color:var(--text-secondary); margin-top:10px; }
.detail-facts { display:flex; align-items:center; gap:8px 16px; flex-wrap:wrap; margin-top:16px; }
.detail-facts span { font-size:13px; color:var(--text-secondary); }
.detail-studio { margin-top:16px; color:var(--text-secondary); font-size:12px; }
.genre-tags { display:flex; flex-wrap:wrap; gap:6px; margin:16px 0; }
.genre-tag { min-height:32px; padding:5px 12px; color:var(--text-secondary); background-color:var(--bg-input); border-radius:8px; font-size:12px; text-decoration:none; }@media (hover: hover) and (pointer: fine){
.genre-tag:hover { color:var(--accent-purple); }}
.detail-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; }
.detail-description { margin-top:32px; padding:24px; border-radius:24px; background:var(--md-surface); }
.detail-description h2 { font-size:18px; margin-bottom:12px; }
.detail-description>p:first-of-type { font-size:15px; line-height:1.8; max-width:900px; white-space:pre-line; }
.detail-progress { margin-top:20px; padding:20px; border-radius:20px; background:var(--md-surface); max-width:550px; font-size:13px; }
.detail-progress strong { color:var(--accent-purple); }
.detail-progress>p { margin-top:8px; }
.detail-progress progress { width:100%; height:8px; appearance:none; border:0; display:block; margin:14px 0; border-radius:8px; overflow:hidden; background:var(--bg-card); }
progress::-webkit-progress-bar { background:var(--bg-card); }
progress::-webkit-progress-value { background:var(--accent-purple); border-radius:8px; }
progress::-moz-progress-bar { background:var(--accent-purple); }
.personal-note { color:var(--text-secondary); white-space:pre-wrap; overflow-wrap:anywhere; }
#related-section { margin-top:32px; }
.collection-toolbar { display:flex; gap:12px; max-width:700px; margin-bottom:16px; }
.collection-toolbar input { flex:1; }
.collection-toolbar select { width:220px; }
.filter-chips { display:flex; flex-wrap:wrap; gap:6px; margin:16px 0 24px; }
.filter-chip { min-height:38px; padding:8px 13px; border:1px solid var(--md-outline); border-radius:20px; background:transparent; color:var(--text-secondary); font-size:12px; }
.filter-chip.active { color:var(--text-on-accent); background:var(--accent-purple); border-color:transparent; }
.recommendation-intro,.local-storage-note { padding:20px; background:var(--md-surface); border-radius:20px; font-size:14px; color:var(--text-secondary); }
.recommendation-intro { max-width:1000px; }
.recommendation-tag { font-size:11px; line-height:1.4; color:var(--accent-purple); margin-top:6px; }
.local-storage-note { margin-top:32px; }
.local-storage-note strong { color:var(--text-main); font-size:13px; }
.local-storage-note p { font-size:12px; margin-top:8px; }
.profile-anime-grid { grid-template-columns:repeat(auto-fill,minmax(135px,1fr)); }
.profile-anime-grid .anime-poster { height:190px; }
.profile-data-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:16px; }
.profile-data-actions button { font-size:11px; padding:8px 12px; }
.profile-dialog,.entry-dialog,.import-dialog { max-height:calc(100dvh - 32px); overflow-y:auto; }
.entry-dialog,.import-dialog { width:min(520px,calc(100% - 32px)); margin:auto; padding:24px; border:0; border-radius:28px; color:var(--text-main); background:var(--md-surface-high); }
.entry-dialog::backdrop,.import-dialog::backdrop { background:#0009; backdrop-filter:blur(4px); }
.entry-dialog label { display:block; font-size:13px; margin:16px 0 8px; }
.entry-dialog input:not([type="checkbox"]),.entry-dialog select,.entry-dialog textarea { width:100%; min-height:48px;padding:12px 14px; background-color:var(--bg-input); color:var(--text-main); border:1px solid var(--md-sys-color-outline); border-radius:16px; font:inherit; font-size:14px; }
.entry-dialog textarea { resize:vertical; }
.form-columns { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.entry-dialog .check-label { display:flex; align-items:center; gap:10px; min-height:40px; }
.check-label input { width:18px; height:18px; accent-color:var(--accent-purple); }
.entry-anime-name { color:var(--accent-purple); font-size:14px; }
.field-help { color:var(--text-secondary); font-size:12px; margin-top:8px; }
.form-error { color:#ffb4ab; font-size:13px; margin-top:12px; }
.delete-button { min-height:40px; margin-right:auto; padding:8px 0; background:none; border:0; color:#ffb4ab; font-size:12px; text-align:left; }
.entry-dialog .dialog-actions { flex-wrap:wrap; }
.import-dialog h2 { font-size:20px; margin-bottom:16px; }
.import-dialog>p { font-size:14px; line-height:1.6; }
.import-dialog .import-tools{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0 12px}
.import-tools button[aria-pressed="true"]{background:var(--accent-color,#B8A7F0);color:#201b2d}
.import-dialog .import-rows{list-style:none;padding:0;margin:0 0 16px;max-height:38dvh;overflow:auto;overscroll-behavior:contain}
.import-row{padding:12px 0;border-bottom:1px solid var(--md-outline-variant,#46424e)}
.import-choice{display:flex;gap:12px;align-items:flex-start;cursor:pointer;min-height:44px}
.import-choice input{width:20px;height:20px;flex:none;margin-top:3px;accent-color:#B8A7F0}
.import-row-copy{display:flex;flex-direction:column;min-width:0;gap:4px;overflow-wrap:anywhere}
.import-row-copy strong{font-size:14px;font-weight:600;line-height:1.5}
.import-row-copy .field-help{margin:0;line-height:1.5}
.import-dialog>.secondary-button{margin:4px 8px 4px 0}
.import-dialog .dialog-actions{flex-wrap:wrap}
@media (max-width:1100px) { .filter-panel { grid-template-columns:repeat(3,minmax(0,1fr)); } .filter-search { grid-column:1/-1; } .page-heading { align-items:flex-start; } }
@media (max-width:640px) {
 .page-heading { flex-direction:column; gap:16px; }
 .page-heading h1 { font-size:24px; }
 .page-heading p { font-size:13px; }
 .filter-panel { grid-template-columns:1fr 1fr; padding:16px; gap:12px; }
 .filter-panel>label:first-child { grid-column:1/-1; }
 .anime-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 12px; }
 .anime-poster { height:210px; }
 .anime-card-title { font-size:13px; }
 .anime-shelf .anime-card { flex-basis:140px; width:140px; }
 .anime-shelf .anime-poster { height:190px; }
 .anime-detail-layout { display:flex; flex-direction:column; gap:24px; }
 .detail-poster { width:160px; height:240px; }
 .detail-title { font-size:24px; }
 .detail-description { padding:20px; }
 .detail-description>p:first-of-type { font-size:14px; }
 .collection-toolbar { flex-direction:column; }
 .collection-toolbar select { width:100%; }
 .profile-anime-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .profile-anime-grid .anime-poster { height:190px; }
 .site-footer { padding:16px; flex-direction:column; gap:6px; }
 .entry-dialog,.import-dialog { padding:20px; }
 .entry-dialog input:not([type="checkbox"]),.entry-dialog select,.entry-dialog textarea,.filter-panel input,.filter-panel select,.collection-toolbar input,.collection-toolbar select { font-size:16px; }
}
@media (pointer:coarse) { .card-add,.card-favorite,.filter-chip,.text-button { min-height:48px; } .card-favorite { min-width:48px; } }

.export-dialog { width:min(680px,calc(100% - 32px)); max-height:calc(100dvh - 32px); overflow:auto; margin:auto; padding:24px; border:0; border-radius:28px; background:var(--md-surface-high); color:var(--text-main); }
.export-dialog::backdrop { background:#0009; backdrop-filter:blur(4px); }
.export-dialog h2 { font-size:20px; }
.export-dialog label { display:block; font-size:13px; margin:16px 0 8px; }
.export-dialog textarea { width:100%; padding:16px; border:1px solid var(--md-outline); border-radius:16px; background:var(--bg-main); color:var(--text-main); font:12px/1.6 monospace; resize:vertical; }
.export-dialog .dialog-actions { flex-wrap:wrap; }

/* Stable page geometry; Material Expressive shapes and motion remain shared. */
.logo { white-space:nowrap; }
.profile-collection { min-height:0; }
.anime-grid { align-items:start; }
.anime-card { display:flex; flex-direction:column; }
.anime-grid .anime-card { height:100%; }
.anime-card-actions { margin-top:auto; padding-top:10px; }
.loading-card { pointer-events:none; }
.loading-card .anime-poster { background:var(--md-surface-container); }
.loading-line { background:var(--md-surface-high); border-radius:12px; }
.loading-title { height:38px; margin-top:10px; width:85%; }
.loading-meta { height:22px; margin-top:6px; width:85%; }
.loading-action { height:36px; margin-top:10px; border-radius:20px; }
@media(pointer:coarse){.loading-action{height:48px}}
#home-anime { min-height:310px; }
#recommendation-reason { min-height:3em; }
.filter-chip { transition:background-color var(--md-effects-fast-duration) var(--md-effects-fast),color var(--md-effects-fast-duration) var(--md-effects-fast),border-radius var(--md-spatial-fast-duration) var(--md-spatial-fast); }@media (hover: hover) and (pointer: fine){
.filter-chip:hover:not(.active) { background:var(--md-primary-container); }}
.entry-dialog[open],.import-dialog[open],.export-dialog[open] { animation:dialog-spatial var(--md-spatial-default-duration) var(--md-spatial-default) both,menu-effects var(--md-effects-default-duration) var(--md-effects-default) both; }
@media (prefers-reduced-motion:reduce) { .entry-dialog[open],.import-dialog[open],.export-dialog[open] { animation:none; } }

/* Kodik trial: the surrounding controls follow the existing Material roles. */
.watch-section { margin-top:32px; }
.watch-content { padding:20px; background:var(--md-surface); border-radius:28px; }
.watch-placeholder { min-height:220px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:20px; text-align:center; }
.watch-placeholder p { max-width:480px; font-size:14px; color:var(--text-secondary); }
.watch-stage { width:100%; aspect-ratio:16/9; background:#000; border-radius:20px; overflow:hidden; }
.watch-stage iframe { display:block; width:100%; height:100%; border:0; }
@media(max-width:640px) { .watch-content { padding:12px; border-radius:24px; } .watch-stage { border-radius:12px; } }

/* Native customizable selects retain browser keyboard and form semantics. */

@supports (appearance:base-select) {
 select,select::picker(select) { appearance:base-select; }
 select { align-items:center; }
 select::picker(select) { min-width:anchor-size(width); max-height:min(320px,60vh); padding:6px; border:1px solid var(--md-outline); border-radius:20px; background:var(--md-surface-high); color:var(--text-main); box-shadow:0 12px 32px #0006; overflow-y:auto; scrollbar-width:thin; }
 select option { padding:10px 12px; min-height:40px; border-radius:12px; font:inherit; font-size:13px; cursor:pointer; }select option:focus { background:var(--md-primary-container); outline:none; }@media (hover: hover) and (pointer: fine){
 select option:hover{ background:var(--md-primary-container); outline:none; }}
 select option:checked { background:var(--md-primary-container); color:var(--accent-purple); }
 select::picker-icon { color:var(--text-secondary); margin-left:auto; }
}
.news-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:20px; }
.news-grid .news-card { width:100%; min-width:0; height:220px; }
.live-news-card { display:block; text-decoration:none; }
.live-news-card .news-cover { position:absolute; inset:0; background:var(--md-surface-container); }
.live-news-card .news-cover img { width:100%; height:100%; object-fit:cover; }
.live-news-card .news-title { -webkit-line-clamp:3; min-height:0; }@media (hover: hover) and (pointer: fine){
.live-news-card:hover { border-color:var(--accent-purple); }}
#home-upcoming,#home-airing { min-height:310px; }
@media(max-width:640px) { .news-grid { grid-template-columns:1fr; } }

/* One outlined-field focus state: replace the border, never add a detached ring. */
.profile-dialog select { width:100%; min-height:48px; padding:14px 16px; border:1px solid var(--md-sys-color-outline); border-radius:16px; background-color:var(--bg-input); color:var(--text-main); font:inherit; font-size:14px; }
body.astrea-body :is(input:not([type="checkbox"]),textarea,select):focus,body.astrea-body select:open {
 outline:none; border-color:var(--accent-purple); box-shadow:inset 0 0 0 1px var(--accent-purple);
}
@media(max-width:640px) { .profile-dialog select { font-size:16px; } }
@media(forced-colors:active) { body.astrea-body :is(input:not([type="checkbox"]),textarea,select):focus { outline:2px solid Highlight; outline-offset:0; } }

/* Selected menu item: consistent SVG check, independent of the browser glyph. */
@supports (appearance:base-select) {
 select option::checkmark { content:""; width:18px; height:18px; flex:0 0 18px; }
 select option:checked::checkmark {
  background-color:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4 10-10' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px 18px no-repeat;
 }
}

/* Ordered franchise cards preserve the existing compact poster dimensions. */
.watch-order-step{display:flex;align-items:center;gap:10px;min-height:32px;margin-bottom:12px;color:var(--primary,#B8A7F0);font-size:12px;font-weight:600}
.watch-order-number{display:grid;place-items:center;min-width:32px;height:32px;padding:0 8px;border-radius:12px;background:#2f293e;color:#B8A7F0;font-size:14px}
.watch-order-card.is-current .watch-order-number{background:#B8A7F0;color:#141414}

.collection-controls{margin-top:auto;padding-top:14px}
.collection-metrics{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:18px;font-size:11px;line-height:18px;font-variant-numeric:tabular-nums;color:var(--text-secondary)}
.collection-rating{color:var(--accent-purple);white-space:nowrap}
.collection-progress{display:flex;gap:12px;align-items:center;margin-top:4px;min-height:36px}
.collection-progress progress{flex:1;min-width:24px;width:40px;height:4px;appearance:none;border:0;border-radius:8px;overflow:hidden;background:var(--md-surface-high);color:var(--accent-purple)}
.collection-progress progress::-webkit-progress-bar{background:var(--md-surface-high);border-radius:8px}
.collection-progress progress::-webkit-progress-value{background:var(--accent-purple);border-radius:8px}
.collection-progress progress::-moz-progress-bar{background:var(--accent-purple);border-radius:8px}
.collection-next,.collection-done{width:36px;height:36px;min-width:36px;min-height:36px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border:0;border-radius:12px;background:var(--md-primary-container);color:var(--accent-purple);font:inherit;font-size:12px;font-weight:600;font-variant-numeric:tabular-nums}
.collection-next{cursor:pointer;transition:background-color var(--md-effects-fast-duration) var(--md-effects-fast),border-radius var(--md-spatial-fast-duration) var(--md-spatial-fast)}@media (hover: hover) and (pointer: fine){
.collection-next:hover{background:color-mix(in srgb,var(--md-primary-container),var(--accent-purple) 12%)}}
.collection-done{background:transparent;color:var(--text-secondary)}
.collection-card .anime-card-actions{margin-top:0;padding-top:10px}
.collection-card .anime-card-meta{min-height:0}
.filter-chip{display:inline-flex;align-items:center;gap:8px}
.filter-count{display:inline-grid;place-items:center;min-width:20px;min-height:20px;padding:0 4px;border-radius:7px;background:var(--md-surface-high);font-size:10px;font-variant-numeric:tabular-nums;line-height:1}
.filter-chip.active .filter-count{background:#1414141f;color:inherit}
#collection-filters{margin-top:16px;gap:8px}
#collection-results{row-gap:28px}
#collection-more{display:block;margin:28px auto}
@media(pointer:coarse){.collection-next,.collection-done{width:48px;height:48px;min-width:48px;min-height:48px}.collection-progress{min-height:48px}}

.detail-progress{max-width:550px;padding:16px 18px;margin-top:20px;border-radius:20px}
.detail-progress-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.detail-status{border:0;border-radius:10px;padding:8px 10px;margin:-4px 0 -4px -10px;background:transparent;color:#B8A7F0;font:inherit;cursor:pointer;min-height:40px}@media (hover: hover) and (pointer: fine){
.detail-status:hover{background:#2f293e}}
.detail-personal-rating{color:var(--text-secondary);font-size:13px;white-space:nowrap}
.detail-progress-row{display:flex;align-items:center;gap:12px;margin-top:8px;min-height:32px}
.detail-progress-count{white-space:nowrap;color:var(--text-secondary);font-size:13px}
.detail-progress-row progress{flex:1;width:40px;min-width:24px;margin:0;height:5px}
.detail-note{margin-top:12px;border-top:1px solid #36343b;padding-top:12px;font-size:13px}
.detail-note summary{cursor:pointer;color:var(--text-secondary);padding:4px 0}
.detail-note p{margin:8px 0 0}

.age-rating{position:relative;display:inline-flex;align-items:center;min-height:22px;padding:1px 7px;border-radius:7px;background:#2f293e;color:#B8A7F0;font-size:11px;font-weight:600;line-height:1.5;cursor:help;vertical-align:middle}
.age-rating-tooltip{display:none;position:absolute;z-index:20;top:calc(100% + 8px);left:0;width:max-content;max-width:min(230px,70vw);padding:10px 12px;border-radius:12px;background:var(--md-sys-color-inverse-surface);color:var(--md-sys-color-inverse-on-surface);box-shadow:0 4px 16px #0004;font-size:12px;font-weight:400;line-height:1.5;white-space:normal;pointer-events:none;visibility:hidden;opacity:0;transition:opacity .12s}.age-rating:focus-visible .age-rating-tooltip{display:block;visibility:visible;opacity:1}@media (hover: hover) and (pointer: fine){
.age-rating:hover .age-rating-tooltip{display:block;visibility:visible;opacity:1}}
@media(min-width:1101px){.filter-panel{grid-template-columns:minmax(160px,2fr) repeat(5,minmax(100px,1fr)) auto auto}}

.age-rating.align-right .age-rating-tooltip{left:auto;right:0}
@media(prefers-reduced-motion:reduce){.age-rating-tooltip{transition:none}}

.age-rating.tooltip-dismissed .age-rating-tooltip{display:none;visibility:hidden;opacity:0}
.collection-toolbar input,.collection-toolbar select{min-height:44px}
:is(.entry-dialog,.profile-dialog,.export-dialog,.import-dialog){overscroll-behavior:contain}

.watch-count{display:inline;white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:640px){
 body[data-page="collection"] .page-actions{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px}
 body[data-page="collection"] .page-actions .primary-button{grid-column:1/-1;grid-row:1}
 #collection-filters{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding:4px 0 8px;margin-bottom:16px;scrollbar-width:thin;overscroll-behavior-x:contain}
 #collection-filters .filter-chip{flex:0 0 auto;white-space:nowrap}
}

/* Synopsis belongs with the title; personal viewing controls follow it. */
.detail-synopsis{margin-top:20px;max-width:68ch}
.detail-synopsis h2{font-size:16px;line-height:1.4;margin-bottom:8px;font-weight:600}
.detail-synopsis>p:first-of-type{font-size:15px;line-height:1.75;white-space:pre-line;overflow-wrap:anywhere}
.detail-synopsis .detail-studio{margin-top:10px}
.detail-note{padding-top:8px}
.detail-note summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:6px 10px;margin:0 -6px;list-style:none;border-radius:12px;color:var(--text-main);transition:background-color var(--md-effects-fast-duration) var(--md-effects-fast)}
.detail-note summary::-webkit-details-marker{display:none}
.detail-note summary::marker{content:''}@media (hover: hover) and (pointer: fine){
.detail-note summary:hover{background:var(--md-primary-container)}}
.note-chevron{flex:0 0 20px;color:var(--accent-purple);transition:transform var(--md-spatial-fast-duration) var(--md-spatial-fast)}
.detail-note[open] .note-chevron{transform:rotate(180deg)}
.detail-note .personal-note{padding:4px 4px 0;margin-top:4px;line-height:1.65}
@media(max-width:640px){.detail-synopsis>p:first-of-type{font-size:14px}.detail-synopsis{margin-top:16px}}

.detail-note summary:focus-visible{outline-offset:0}


/* Accounts share AniMeory's compact Material 3 Expressive vocabulary. */
.email-dialog,.auth-dialog,.password-dialog,.crop-dialog{width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:24px;border:0;border-radius:28px;background:var(--md-surface-container);color:var(--text-main);overflow:auto;overscroll-behavior:contain}
.email-dialog::backdrop,.auth-dialog::backdrop,.password-dialog::backdrop,.crop-dialog::backdrop{background:#0009;backdrop-filter:blur(4px)}
.email-dialog form,.auth-dialog form,.password-dialog form{display:flex;flex-direction:column;gap:10px}
.email-dialog label,.auth-dialog label,.password-dialog label{font-size:13px;margin-top:8px}
.email-dialog input,.auth-dialog input,.password-dialog input,.friend-search input,.friend-actions select{min-width:0;min-height:48px;width:100%;padding:12px 14px;border:1px solid var(--md-sys-color-outline);border-radius:16px;background-color:var(--bg-input);color:var(--text-main);font:inherit;font-size:14px}
.auth-tabs{display:flex;gap:4px;margin:6px 0 10px}
.auth-tabs button{flex:1}
.auth-tabs [aria-pressed="true"]{background:var(--accent-purple);color:var(--text-on-accent)}
.auth-captcha{min-height:65px;width:100%;overflow:hidden;margin:8px 0}
.auth-dialog .form-error:empty{display:none}
.account-entry{flex-shrink:0}

.avatar-initial img,.mini-avatar img,.profile-avatar img,.friend-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}
.profile-avatar{border-radius:50%;overflow:hidden}
.profile-cover.has-banner{background-size:cover;background-position:center}
.profile-cover.has-banner::after,.profile-cover.has-banner .cover-caption{display:none}
.profile-image-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 16px}
.crop-dialog{width:min(640px,calc(100vw - 32px))}
.crop-preview{width:100%;max-height:50dvh;object-fit:contain;height:auto;display:block;margin:16px auto;border-radius:20px;touch-action:none;cursor:grab}
.crop-sliders{display:grid;gap:14px;margin:18px 0}
.crop-sliders label{display:grid;gap:8px;font-size:13px;color:var(--text-secondary)}
.crop-sliders input{width:100%;accent-color:var(--accent-purple);min-height:32px}
.crop-sliders input[type="range"]{appearance:none;-webkit-appearance:none;height:44px;min-height:44px;background:transparent;border:0;border-radius:12px;cursor:pointer}
.crop-sliders input[type="range"]::-webkit-slider-runnable-track{height:12px;border-radius:6px;background:var(--md-primary-container)}
.crop-sliders input[type="range"]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:6px;height:32px;margin-top:-10px;border:0;border-radius:3px;background:var(--accent-purple)}
.crop-sliders input[type="range"]::-moz-range-track{height:12px;border-radius:6px;background:var(--md-primary-container)}
.crop-sliders input[type="range"]::-moz-range-thumb{width:6px;height:32px;border:0;border-radius:3px;background:var(--accent-purple)}
.crop-sliders input[type="range"]:focus-visible{outline:2px solid var(--accent-purple);outline-offset:2px}
.friends-panel{padding:20px;background:var(--md-surface);border-radius:24px;min-width:0}
.friend-search{display:grid;gap:8px;grid-template-columns:minmax(0,1fr) auto;margin:12px 0}
.friend-search input{font-size:13px;padding:10px 12px;min-height:44px}
.friend-list,.friend-results{display:grid;gap:12px}
.friend-row{padding:12px 0;border-top:1px solid var(--border-subtle);min-width:0}
.friend-identity{display:flex;align-items:center;gap:10px;min-width:0}
.friend-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;flex-shrink:0;background:var(--md-primary-container);color:var(--accent-purple);overflow:hidden}
.friend-name{border:0;background:none;color:var(--text-main);text-align:left;font:inherit;font-size:13px;overflow-wrap:anywhere;cursor:pointer;min-height:36px}@media (hover: hover) and (pointer: fine){
.friend-name:hover{color:var(--accent-purple)}}
.friend-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px}
.friend-actions select{font-size:12px;padding:8px 10px;min-height:40px}
.friend-search-result{display:grid;gap:8px;font-size:13px;padding:10px 0;overflow-wrap:anywhere}
.guest-import-prompt{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;margin-bottom:24px;border-radius:20px;background:var(--md-primary-container);font-size:13px}
@media(max-width:640px){.account-entry{display:none}.email-dialog,.auth-dialog,.password-dialog,.crop-dialog{padding:20px}.email-dialog input,.auth-dialog input,.password-dialog input,.friend-search input,.friend-actions select{font-size:16px}.guest-import-prompt{align-items:flex-start;flex-direction:column}.friend-search{grid-template-columns:1fr}.profile-image-actions button{flex:1}}

.auth-result:empty{display:none}
.auth-result{font-size:14px;line-height:1.5;color:var(--text-main)}
.email-panel p{overflow-wrap:anywhere}

.comments-section{margin:48px 0 24px;max-width:960px}.comments-heading{display:flex;align-items:center;gap:16px;margin-bottom:20px}.comment-form{display:grid;gap:14px;margin:0 0 24px;padding:20px;background:var(--md-surface);border-radius:24px}.comment-composer-identity{display:flex;align-items:center;gap:12px;font-weight:600;font-size:14px}.comment-avatar{width:36px;height:36px;display:grid;place-items:center;border-radius:14px;background:var(--md-primary-container);color:var(--md-sys-color-on-primary-container);flex:none}.comment-form textarea{width:100%;min-height:112px;max-height:360px;border:1px solid var(--md-sys-color-outline-variant);background:var(--md-surface-container);color:var(--text-main);border-radius:16px;padding:14px 16px;font:inherit;line-height:1.6;resize:vertical}.comment-form textarea:focus-visible{outline-offset:2px}.comment-form-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.comment-form-actions .check-label{margin:0;margin-right:auto}.comment-count{font-size:12px;color:var(--text-muted);font-variant-numeric:tabular-nums}.comment-status:empty{display:none}.comment-status{font-size:13px;color:var(--text-muted);margin:12px 0}.comment-signin{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;border-radius:24px;background:var(--md-surface);margin-bottom:20px}.comment-signin a{text-decoration:none;white-space:nowrap}.comments-list{display:grid;gap:0;margin-bottom:16px}.comment-row{padding:24px 4px;border-bottom:1px solid var(--border-subtle)}.comment-meta{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:4px 12px;color:var(--text-muted);font-size:12px}.comment-avatar-link{align-self:start;border-radius:14px;text-decoration:none}.comment-name-row{position:relative;display:flex;align-items:center;flex-wrap:nowrap;gap:8px;min-width:0}.comment-author{display:block;flex:0 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;color:var(--md-sys-color-primary);font-size:14px;font-weight:600;line-height:1.5}.comment-meta time{white-space:nowrap}.comment-composer-identity>span:last-child{min-width:0;overflow-wrap:anywhere}.comment-content{margin:12px 0 0 48px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}.comment-remove{margin:8px 0 -8px 36px;color:var(--text-muted)}.comment-spoiler{margin:12px 0 0 48px;border-radius:16px;background:var(--md-surface-container);padding:0 14px}.comment-spoiler summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;color:var(--md-sys-color-on-primary-container);font-size:13px;cursor:pointer;list-style:none}.comment-spoiler .comment-content{margin:0;padding:0 0 16px}.comments-empty{padding:24px 0;color:var(--text-muted);font-size:14px}

/* Touch does not emulate hover. Keyboard focus stays visible. */
*{-webkit-tap-highlight-color:transparent}
:is(button,a,summary):focus:not(:focus-visible){outline:none}
summary{list-style:none}summary::-webkit-details-marker{display:none}summary::marker{content:''}
summary>.ui-icon{flex:none;transition:transform 180ms var(--md-motion)}details[open]>summary>.ui-icon{transform:rotate(180deg)}
select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a3b0' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-size:18px;background-repeat:no-repeat;background-position:right 12px center;padding-right:38px!important}
@supports (appearance:base-select){select{appearance:base-select;background-image:none;padding-right:12px!important}}
.check-label input[type=checkbox],.admin-genre input[type=checkbox]{appearance:none;width:20px;height:20px;min-width:20px;min-height:20px;border:2px solid var(--md-sys-color-outline);border-radius:5px;background:transparent;margin:0;display:inline-block;vertical-align:middle;cursor:pointer}
.check-label input[type=checkbox]:checked,.admin-genre input[type=checkbox]:checked{border-color:var(--accent-purple);background-color:var(--accent-purple);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e1e24' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4 10-10'/%3E%3C/svg%3E");background-size:100%}
.check-label{display:flex;gap:10px;align-items:center;min-height:44px;cursor:pointer}.check-label input:focus-visible{outline-offset:4px}
.confirm-dialog,.friend-search-dialog{width:min(520px,calc(100% - 32px));max-height:calc(100dvh - 48px);overflow:auto;border:0;border-radius:28px;background:var(--md-surface-high);color:var(--text-main);padding:24px;margin:auto}.confirm-dialog::backdrop,.friend-search-dialog::backdrop{background:#0009}.confirm-dialog h2{font-size:22px}.confirm-dialog p{margin:16px 0 24px;color:var(--text-muted)}
.friends-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:24px 0}.friends-heading .primary-button{display:flex;align-items:center;gap:8px}.friend-list{gap:24px}.friend-group h3{font-size:13px;font-weight:500;color:var(--text-muted);margin-bottom:8px}.friend-row{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:16px 0;border-top:0;border-bottom:1px solid var(--border-subtle)}.friend-identity{color:var(--text-main);text-decoration:none;gap:12px;min-height:48px}.friend-avatar{width:44px;height:44px;border-radius:16px;overflow:hidden}.friend-avatar img{width:100%;height:100%;object-fit:cover}.friend-copy{display:grid;min-width:0;gap:2px;overflow-wrap:anywhere}.friend-copy strong{font-size:14px;font-weight:600}.friend-copy>span{font-size:12px;color:var(--text-muted)}.friend-actions{margin:0;gap:8px;flex-wrap:nowrap}.friend-actions select{width:auto;flex:1 1 160px;max-width:200px;min-height:44px;background-color:var(--md-surface-container);border:1px solid var(--md-sys-color-outline-variant);border-radius:12px;color:var(--text-main)}.friends-empty{padding:24px;border-radius:24px;background:var(--md-surface);color:var(--text-secondary);font-size:14px;line-height:1.65}.friend-search{grid-template-columns:minmax(0,1fr) auto;gap:12px;margin-top:20px}.friend-search label{grid-column:1/-1;font-size:13px;color:var(--text-muted)}.friend-search input{min-width:0;border:1px solid var(--md-sys-color-outline);border-radius:14px;background:var(--md-surface-container);color:var(--text-main);padding:12px 14px;font-size:16px}.friend-search-result{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0;border-bottom:1px solid var(--border-subtle)}.friend-state{font-size:12px;color:var(--text-muted)}
.shelf-track{padding:8px;margin-inline:-8px;width:calc(100% + 16px);scroll-padding-inline:8px}.shelf-track .anime-card-link:focus-visible{outline-offset:3px}.profile-cover{height:160px}.profile-cover.has-banner{height:220px}.profile-overview{gap:20px}.profile-body{gap:24px}.profile-sidebar{gap:16px}.profile-tabs{width:100%;overflow-x:auto;scrollbar-width:none}.profile-tabs button{flex:1}.profile-collection{min-width:0}.account-logout .ui-icon{margin:0}

@media(max-width:650px){.comments-section{margin-top:32px}.comment-form{padding:16px;border-radius:24px}.comment-form-actions{gap:8px}.comment-form-actions .primary-button{padding:10px 18px}.comment-count{margin-left:auto}.comment-meta{grid-template-columns:36px minmax(0,1fr)}.comment-avatar-link{grid-row:1 / 3}.comment-meta time{grid-column:2;font-size:11px;text-align:left}.comment-content{margin-left:0}.comment-spoiler{margin-left:0}.comment-remove{margin-left:-12px}.comment-signin{padding:16px;align-items:flex-start}.comment-signin p{font-size:13px}.friends-heading{align-items:center;gap:10px}.friends-heading .primary-button{font-size:12px;padding:10px 14px}.friends-heading .ui-icon{width:18px}.friend-row{gap:10px}.friend-actions{width:100%;padding-left:56px}.friend-actions select{flex:1;min-width:0;max-width:none}.friend-search-result{align-items:flex-start}.friend-search-result .secondary-button{padding:10px 14px;font-size:12px}.profile-cover{height:112px}.profile-cover.has-banner{height:160px}.profile-overview{gap:12px}.profile-tabs button{font-size:11px;padding:10px 8px;min-height:48px}.profile-tabs button span{display:none}}
@media(max-width:650px){.comment-form-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}.comment-form-actions .check-label{margin-right:0;font-size:13px}.comment-form-actions .primary-button{grid-column:1/-1;justify-self:end;min-width:120px}}
.comment-avatar{overflow:hidden}.comment-avatar img{display:block;width:100%;height:100%;object-fit:cover}

/* Profile navigation keeps the connected group defined in DESIGN_SYSTEM.md. */
.profile-tabs{gap:4px;border:0;margin-bottom:24px;padding:4px;margin-inline:-4px;width:calc(100% + 8px);max-width:calc(100% + 8px);scroll-padding-inline:4px}
.profile-tabs button{flex:1 0 auto;min-height:48px;padding:12px 16px;font-size:13px}
.profile-tabs button span{background:var(--md-surface-high);color:var(--text-secondary);font-size:11px}
.profile-tabs button[aria-selected="true"] span{background:color-mix(in srgb,var(--text-on-accent) 10%,transparent);color:var(--text-on-accent)}
.profile-tabs button:focus-visible{outline-offset:1px}
@media(hover:hover) and (pointer:fine){
 .profile-tabs button:hover:not([aria-selected="true"]){background:var(--md-surface-high);color:var(--text-main)}
 .profile-tabs button[aria-selected="true"]:hover{background:var(--accent-purple-hover)}
 .profile-tabs button:active{border-radius:16px}
 .profile-tabs button[aria-selected="true"]:active{border-radius:16px}
}
.profile-overview{align-items:flex-start}.profile-identity{flex:1;padding-top:12px}.profile-edit{margin-top:16px;min-height:48px}.profile-name-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px;margin-top:4px}.profile-name-row h1{margin:0;min-width:0}.profile-name-row>.account-badge{align-self:center}.profile-identity #profile-bio{margin-top:12px}.profile-panel{display:flex;flex-direction:column;align-items:flex-start;gap:16px;border-radius:24px}.profile-panel:first-child,.profile-panel:last-child{border-radius:24px}.profile-panel h2{margin:0}.profile-panel dl{margin:0;width:100%}.profile-panel dl div:first-child{margin-top:0}.profile-panel .panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%}.panel-heading h2{font-size:14px;line-height:1.4}.import-panel .dialog-close{width:40px;height:40px;min-width:40px;min-height:40px;background:transparent}.import-panel .dialog-close .ui-icon{width:18px;height:18px}.import-panel .secondary-button{align-self:flex-start}@media(hover:hover) and (pointer:fine){.import-panel .dialog-close:hover{background:var(--md-primary-container)}}@media(pointer:coarse){.import-panel .dialog-close{width:48px;height:48px;min-width:48px;min-height:48px}}.about-content{padding:24px;max-width:68ch;line-height:1.7}.about-content #about-bio{white-space:pre-wrap}.profile-collection [role=tabpanel]>h2{font-size:22px;margin:24px 0}.profile-collection #panel-about{min-height:160px}.profile-collection #panel-about .collection-heading{margin-top:0}.public-profile-body{display:block}
.account-badge{flex:0 0 auto;width:max-content;max-width:100%;position:relative;display:inline-flex;align-items:center;vertical-align:middle;min-height:24px;padding:2px 9px;border-radius:8px;background:var(--md-primary-container);color:var(--md-sys-color-on-primary-container);font-size:11px;font-weight:600;line-height:20px;white-space:nowrap}
.account-badge-tip{display:none;position:fixed;z-index:1000;inset:auto;margin:0;border:0;max-width:min(280px,calc(100vw - 24px));width:max-content;padding:10px 12px;border-radius:12px;background:var(--md-sys-color-inverse-surface);color:var(--md-sys-color-inverse-on-surface);white-space:normal;font-size:12px;line-height:1.5;box-shadow:0 4px 20px #0004}
.account-badge-tip.is-open{display:block}

.profile-stat-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0 32px}.profile-stat-metrics>div{padding:20px;background:var(--md-surface);border-radius:24px}.profile-stat-metrics dt{font-size:13px;color:var(--text-secondary)}.profile-stat-metrics dd{font-size:32px;font-weight:650;margin-top:8px;font-variant-numeric:tabular-nums}
.profile-genre-stats{background:var(--md-surface);border-radius:28px;padding:24px}.profile-genre-stats h3,.profile-rewatched h3{font-size:18px;margin-bottom:20px}.profile-genre-plot{display:grid;grid-template-columns:180px minmax(0,1fr);align-items:center;gap:32px}.profile-genre-ring{width:180px;height:180px;border-radius:50%;display:grid;place-items:center}.profile-genre-center{width:140px;height:140px;background:var(--md-surface);border-radius:50%;display:grid;align-content:center;text-align:center}.profile-genre-center strong{font-size:32px}.profile-genre-center span{font-size:13px;color:var(--text-secondary)}.profile-genre-list>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;font-size:14px}.profile-genre-list dt{display:flex;align-items:center;gap:10px}.profile-genre-list dt:before{content:"";width:10px;height:10px;flex-shrink:0;border-radius:50%;background:var(--genre-color)}.profile-genre-list dd{white-space:nowrap;font-variant-numeric:tabular-nums}.profile-genre-stats>.field-help{margin-top:20px;max-width:65ch}.profile-rewatched{margin-top:28px}.profile-rewatched>div{display:flex;justify-content:space-between;gap:16px;padding:16px 0;border-bottom:1px solid var(--md-sys-color-outline-variant,#49454f)}.profile-rewatched a{color:var(--text-primary)}.profile-rewatched span{white-space:nowrap;color:var(--text-secondary)}.friends-statistics{margin-top:32px}.account-settings-dialog{width:min(520px,calc(100% - 32px));margin:auto;max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;padding:24px;border:0;border-radius:28px;background:var(--md-surface);color:var(--text-primary)}.account-settings-dialog::backdrop{background:#0009}.settings-group{padding:20px 0;border-bottom:1px solid var(--md-sys-color-outline-variant,#49454f)}.settings-group:last-child{border:0}.settings-group h3{font-size:16px;margin-bottom:12px}.settings-group p{margin-bottom:12px;overflow-wrap:anywhere}.settings-group .secondary-button{min-height:48px}.friend-copy .account-badge{align-self:flex-start;margin-top:6px}
@media(max-width:650px){.profile-tabs button{min-height:48px;padding:12px 16px;font-size:13px}.profile-tabs button span{display:inline}.profile-overview{flex-wrap:wrap}.profile-edit{margin:0 0 0 108px}.profile-stat-metrics{gap:12px}.profile-stat-metrics>div{padding:16px;border-radius:20px}.profile-stat-metrics dd{font-size:28px}.profile-genre-stats{padding:20px}.profile-genre-plot{grid-template-columns:1fr;justify-items:center;gap:20px}.profile-genre-list{width:100%}.profile-sidebar{order:2}.profile-collection{order:1}.profile-identity h1{font-size:24px}}

.site-footer{align-items:center;gap:24px;flex-wrap:wrap}.footer-brand{font-size:18px;font-weight:700;color:var(--text-primary)}.site-footer nav{display:flex;gap:8px 24px;flex-wrap:wrap}.site-footer nav a{display:inline-flex;align-items:center;min-height:44px;color:var(--text-secondary);font-size:13px}.document-header{max-width:1100px;margin:24px auto;display:flex;align-items:center;justify-content:space-between;padding:0 24px}.site-document{max-width:760px;margin:64px auto 96px;padding:0 24px;line-height:1.75}.site-document h1{font-size:32px;line-height:1.2;margin-bottom:32px}.site-document h2{font-size:20px;margin:32px 0 12px}.site-document p{margin:12px 0;color:var(--text-secondary)}.site-document a{color:var(--accent-purple)}@media(max-width:650px){.site-footer{align-items:flex-start;flex-direction:column;gap:12px}.site-footer nav{gap:0 20px}.site-document{margin:40px auto 64px}.site-document h1{font-size:28px}}

@media(max-width:650px){.profile-edit{width:100%;max-width:100%;margin:12px 0 0;justify-content:center}.profile-overview{padding-inline:20px}}

.site-footer a{text-decoration:none}.site-footer a:focus-visible{outline:2px solid var(--accent-purple);outline-offset:4px}

.dropdown-identity .account-badge{margin-left:6px;min-height:22px;padding:1px 7px;line-height:20px;vertical-align:baseline}.profile-dropdown .account-badge-tip{font-size:12px;font-weight:400;line-height:1.5}.profile-dropdown{max-width:calc(100vw - 32px)}

.legal-definitions dt{font-weight:600;margin-top:20px}.legal-definitions dd{margin:8px 0 20px;color:var(--text-secondary)}.site-document mark{background:var(--md-primary-container);color:var(--md-sys-color-on-primary-container);padding:2px 4px;border-radius:4px}.legal-draft-note{padding:16px;border-inline-start:3px solid var(--accent-purple);background:var(--md-surface);border-radius:0 16px 16px 0}



/* Dialog positioning and link-button reset apply to every dialog family. */
dialog{margin:auto;max-height:calc(100dvh - 32px);overscroll-behavior:contain}.text-button{text-decoration:none}.account-settings-dialog .dialog-heading{align-items:flex-start}

.synopsis-text.is-collapsed{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}.synopsis-toggle{display:inline-flex;align-items:center;gap:8px;min-height:48px;margin:4px 0 0;padding:8px 12px;border:0;border-radius:24px;background:transparent;color:var(--md-sys-color-primary);font:inherit;font-size:13px;font-weight:600}.synopsis-toggle .ui-icon{width:18px;height:18px}.synopsis-toggle[aria-expanded="true"] .ui-icon{transform:rotate(180deg)}@media(hover:hover) and (pointer:fine){.synopsis-toggle:hover{background:var(--md-primary-container)}}

@media(pointer:coarse){.card-add{min-height:48px}.card-favorite{width:48px;height:48px}.shelf-controls button{min-width:48px;min-height:48px}.text-button{min-height:48px}}

@media(pointer:coarse){.check-label,.admin-genre{min-height:48px}}

/* A dismissed import must not leave an empty profile column. */
.profile-sidebar:not(:has(>.profile-panel:not([hidden]))){display:none}
.profile-body:not(:has(.profile-sidebar>.profile-panel:not([hidden]))){grid-template-columns:minmax(0,1fr)}

/* Shared, visit-local disclosures: rounded tonal surface and the project's SVG chevron. */
.content-disclosure{border-radius:24px;background:var(--md-surface);min-width:0}
.content-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px;padding:16px 20px;border-radius:24px;color:var(--md-sys-color-on-primary-container);font-size:14px;font-weight:600;cursor:pointer;transition:background-color var(--md-effects-fast-duration) var(--md-effects-fast)}
.content-disclosure>summary .section-title{margin:0;color:var(--text-main)}
.content-disclosure>summary>.ui-icon{color:var(--md-sys-color-primary)}
.content-disclosure>summary:focus-visible{outline-offset:4px}
.content-disclosure>.disclosure-body{padding:16px 20px 20px}
.comment-disclosure{margin-bottom:20px}
.comment-disclosure>.comment-form{margin:0;padding-top:16px}
.comment-disclosure>.comment-signin{margin:0;padding-top:16px}
.comment-name-row>.account-badge{position:static}

@media(hover:hover) and (pointer:fine){.content-disclosure>summary:hover{background:color-mix(in srgb,var(--md-sys-color-primary) 8%,transparent)}.comment-author:hover{text-decoration:underline;text-underline-offset:3px}}
@media(max-width:650px){.content-disclosure>summary{padding:16px}.content-disclosure>.disclosure-body{padding:16px}}

/* Shared scroll surfaces: retain native scrolling and keyboard behaviour. */
:root { --scroll-track: #19181d; --scroll-thumb: #625a76; --scroll-thumb-hover: #a495cf; }
* { scrollbar-color: var(--scroll-thumb) var(--scroll-track); scrollbar-width: auto; }
@supports selector(::-webkit-scrollbar) { * { scrollbar-color:auto; } }
::-webkit-scrollbar { width:12px; height:12px; }
::-webkit-scrollbar-button { display:none; width:0; height:0; }
::-webkit-scrollbar-track { background:var(--scroll-track); border-radius:12px; }
::-webkit-scrollbar-thumb { background:var(--scroll-thumb); border:3px solid var(--scroll-track); border-radius:12px; min-height:40px; }
::-webkit-scrollbar-thumb:hover { background:var(--scroll-thumb-hover); }
::-webkit-scrollbar-corner { background:var(--scroll-track); }
.shelf-track,.nav-links { scrollbar-width:none; }
.shelf-track::-webkit-scrollbar,.nav-links::-webkit-scrollbar { display:none; }
@media(forced-colors:active) { * { scrollbar-color:auto; } ::-webkit-scrollbar-track,::-webkit-scrollbar-corner { background:Canvas; } ::-webkit-scrollbar-thumb { background:ButtonText; border-color:Canvas; } }

/* Render only available facts; the card's flex footer aligns actions per row. */
.anime-card-meta { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; min-height:0; }
.anime-card-meta .card-format { margin:0; line-height:16px; }
.anime-card-meta>span:not(.card-format) { white-space:nowrap; }
.card-personal-rating { position:absolute; top:8px; right:8px; padding:3px 7px; border-radius:8px; background:var(--md-primary-container); color:var(--md-sys-color-on-primary-container); font-size:11px; font-weight:600; }
.card-personal-rating:focus-visible .age-rating-tooltip { display:block; visibility:visible; opacity:1; }
@media(hover:hover) and (pointer:fine){.card-personal-rating:hover .age-rating-tooltip { display:block; visibility:visible; opacity:1; }}
.card-personal-rating.tooltip-dismissed .age-rating-tooltip { display:none; visibility:hidden; opacity:0; }
.section-title-link { color:inherit; text-decoration:none; border-radius:8px; }
@media(hover:hover) and (pointer:fine){.section-title-link:hover { color:var(--accent-purple); }}
.age-rating-tooltip { position:fixed; left:var(--tip-x,12px); right:auto; top:var(--tip-y,12px); max-width:min(230px,calc(100vw - 24px)); z-index:100; }
.age-rating.align-right .age-rating-tooltip { left:var(--tip-x,12px); right:auto; }

.select-field { position:relative; min-width:0; width:100%; }
.select-native { position:absolute!important; width:1px!important; height:1px!important; overflow:hidden!important; clip-path:inset(50%); opacity:0; pointer-events:none; }
.select-trigger { width:100%; min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border:1px solid var(--md-outline); border-radius:16px; background:var(--bg-input); color:var(--text-main); font:inherit; font-size:14px; text-align:left; }
.select-trigger>span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.select-trigger:after { content:''; flex:0 0 18px; width:18px; height:18px; background:var(--text-secondary); mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='1.75'/%3E%3C/svg%3E") center/contain no-repeat; }
.select-trigger[aria-expanded=true] { border-color:var(--accent-purple); box-shadow:inset 0 0 0 1px var(--accent-purple); }
.select-options { position:absolute; z-index:120; top:calc(100% + 6px); left:0; width:100%; max-height:min(288px,45vh); overflow:auto; overscroll-behavior:contain; padding:6px; border:1px solid var(--md-outline); border-radius:20px; background:var(--md-surface-high); box-shadow:0 12px 32px #0006; color:var(--text-main); }
.select-options>[role=option] { display:flex; align-items:center; min-height:48px; padding:10px 12px; border-radius:12px; font-size:14px; cursor:pointer; }
.select-options>[aria-disabled=true] { opacity:.38; cursor:default; }
.select-options>[aria-selected=true],.select-options>.is-highlighted { color:var(--accent-purple); background:var(--md-primary-container); }
@media(hover:hover) and (pointer:fine){.select-options>[role=option]:not([aria-disabled=true]):hover { background:var(--md-primary-container); }}
@media(max-width:640px){.select-trigger { font-size:16px; }}

@supports(appearance:base-select){select::picker-icon{content:'';width:18px;height:18px;background-color:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='1.75'/%3E%3C/svg%3E") center/contain no-repeat}select:open::picker-icon{rotate:180deg}}
@media(pointer:coarse){select option{min-height:48px}}

select { white-space:nowrap; text-overflow:ellipsis; }
.filter-panel input,.filter-panel select,.filter-panel .select-trigger { min-height:48px; height:48px; }
.filter-panel>button { min-height:48px; }
.collection-toolbar>.select-field { width:220px; flex-shrink:0; }
@media(max-width:640px){.collection-toolbar>.select-field{width:100%}}

.settings-data-actions{display:flex;flex-wrap:wrap;gap:12px}
/* AniMeory identity and readable discussions. */
.brand-mark{width:36px;height:36px;border-radius:11px;object-fit:contain;flex:none;margin-right:10px;vertical-align:middle}
/* Loading surfaces stay neutral; the brand is only a terminal missing-cover fallback. */
:is(.media-frame,.anime-poster,.detail-poster,.news-cover).poster-unavailable{background:url('/assets/brand-avatar.png') center/contain no-repeat #101013}
:is(.media-frame,.anime-poster,.detail-poster,.news-cover).poster-unavailable .poster-placeholder{background:transparent;font-size:0}
.watch-placeholder{background-image:none}
.reply-composer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;background:var(--md-primary-container);border-radius:16px;color:var(--md-sys-color-on-primary-container);font-size:14px}
.reply-composer[hidden]{display:none}
.comment-thread{min-width:0}
.comment-thread>.comment-row{padding:20px 0 4px;border:0}
.comments-list>.comment-thread{padding-bottom:12px;border-bottom:1px solid var(--border-subtle)}
.comment-actions{display:flex;gap:8px;margin:8px 0 0 36px;align-items:center}
.comment-actions .text-button{margin:0;min-height:44px;padding:8px 12px;border-radius:22px}
.comment-actions .comment-reply-button{background:var(--md-primary-container);color:var(--md-sys-color-on-primary-container)}
.comment-thread-toggle{min-height:44px;margin:0 0 0 36px}
.comment-children{margin-left:48px;padding-left:16px;border-left:1px solid var(--md-sys-color-outline-variant)}
.comment-children .comment-children{margin-left:0;padding-left:0;border:0}
.comment-children[hidden],.comment-thread-toggle[hidden]{display:none}
.comment-context{display:block;margin:10px 0 0 48px;font-size:12px;color:var(--md-primary);text-decoration:none;overflow-wrap:anywhere}
.comment-deleted{font-size:14px;color:var(--text-muted);margin:12px 0}
.comment-thread>.comment-disclosure{margin:12px 0 12px 48px}
.comment-row:focus-visible{outline:2px solid var(--md-primary);outline-offset:4px;border-radius:16px}
.profile-loading{min-height:440px;border-radius:28px;overflow:hidden;background:var(--md-surface);margin-top:0}
.profile-loading-cover{height:220px;background:var(--md-surface-container)}
.profile-loading-lines{padding:32px;display:grid;gap:14px}.profile-loading-lines span{height:18px;width:180px;border-radius:9px;background:var(--md-surface-container)}.profile-loading-lines span+span{width:260px;max-width:100%;height:12px}
.profile-loading p,.profile-loading>h1,.profile-loading>button{margin:20px 32px;color:var(--text-muted)}
[data-profile-loading]>.profile-shell,[data-profile-loading]>.profile-body{display:none}
.avatar-initial:empty{background:var(--md-surface-container)}
@media(max-width:650px){.comment-children{margin-left:12px;padding-left:12px}.comment-actions,.comment-thread-toggle,.comment-context{margin-left:0}.comment-thread>.comment-disclosure{margin-left:0}.profile-loading-cover{height:160px}.profile-loading{min-height:340px}}
@media(pointer:coarse){.comment-actions .text-button,.comment-thread-toggle{min-height:48px}}
.news-article,.astrea-body[data-page=news-article] .comments-section{max-width:800px;margin-inline:auto}
.news-article header{margin:28px 0 32px}
.news-article h1{font-size:clamp(28px,4vw,44px);line-height:1.16;letter-spacing:-.7px;text-wrap:balance;overflow-wrap:anywhere}
.news-byline{display:flex;align-items:center;gap:10px;color:var(--text-secondary);font-size:14px;margin-bottom:22px;flex-wrap:wrap}
.news-byline img{border-radius:10px}.news-byline time{margin-left:auto}
.news-article-body{font-size:18px;line-height:1.75;overflow-wrap:anywhere}.news-article-body p{margin:0 0 24px}
.news-source{font-size:13px;color:var(--text-secondary);margin:32px 0 48px}.news-source a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.news-source-material,.news-editor-preview p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
.news-editor-preview{padding:24px;border:1px solid var(--text-secondary);border-radius:20px}.news-editor-preview[hidden]{display:none}
.news-article + .comments-section{margin-top:40px}
.comments-section>.section-title{margin:0 0 20px}
.comments-section,.comment-thread,.comment-children,.comment-form{min-width:0}
.comment-status:empty{display:none}
.comment-status:not(:empty){margin:16px 0}
.comment-context,.reply-composer>span{overflow-wrap:anywhere;min-width:0}
.reply-composer .text-button{flex-shrink:0}
.watch-stat-overview{display:grid;grid-template-columns:minmax(220px,.85fr) minmax(0,1.4fr);gap:28px;margin:24px 0}
.watch-stat-time{display:flex;flex-direction:column;justify-content:center;padding:28px;border-radius:28px;background:var(--md-primary-container);color:var(--md-sys-color-on-primary-container)}
.watch-stat-label{font-size:14px}.watch-stat-hours{font-size:clamp(36px,4vw,52px);line-height:1.2;letter-spacing:-1px;font-weight:650;margin:12px 0;font-variant-numeric:tabular-nums}
.watch-stat-time .field-help{color:inherit;opacity:.8;font-size:12px}
.watch-stat-totals{display:grid;align-content:center;gap:0;margin:0}
.watch-stat-totals>div{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding:16px 0;border-bottom:1px solid var(--border-subtle)}
.watch-stat-totals>div:last-child{border:0}.watch-stat-totals dt{font-size:14px;color:var(--text-secondary)}.watch-stat-totals dd{margin:0;font-size:26px;font-weight:600;font-variant-numeric:tabular-nums}
.watch-stat-favorite{display:flex;align-items:center;gap:20px;padding:20px 24px;background:var(--md-surface);border-radius:24px;margin:0 0 28px;min-width:0}
.watch-stat-favorite>div{min-width:0}.watch-stat-favorite h3{font-size:13px;font-weight:500;color:var(--text-secondary);margin:0 0 8px}
.watch-stat-poster{width:72px;height:108px;object-fit:cover;border-radius:14px;flex-shrink:0}.watch-stat-poster[hidden]{display:none}
.watch-stat-title{display:block;font-size:19px;font-weight:600;line-height:1.4;color:var(--text-primary);text-decoration:none;overflow-wrap:anywhere}
@media(hover:hover) and (pointer:fine){.watch-stat-title:hover{color:var(--accent-purple)}}
.watch-stat-caption{font-size:13px;color:var(--text-secondary);margin:10px 0 0;line-height:1.5}
.watch-stat-genres{padding:24px;background:var(--md-surface);border-radius:28px}.watch-stat-genre-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:8px}.watch-stat-genre-heading h3{font-size:18px;margin:0}
.watch-stat-genre-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:32px}.watch-stat-genre-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:16px 0}.watch-stat-genre-row[hidden]{display:none}
.watch-stat-genre-name{font-size:14px;overflow-wrap:anywhere}.watch-stat-genre-value{font-size:12px;color:var(--text-secondary);text-align:right;align-self:center;font-variant-numeric:tabular-nums}
.watch-stat-track{grid-column:1/-1;background:var(--md-surface-container);height:4px;border-radius:3px;overflow:hidden}.watch-stat-track>span{display:block;background:var(--accent-purple);height:100%;border-radius:inherit}
.watch-stat-more{margin:4px 0 8px;min-height:44px}.watch-stat-genres>.field-help{margin:12px 0 0;font-size:12px}
@media(max-width:650px){.watch-stat-overview{grid-template-columns:1fr;gap:8px;margin:20px 0}.watch-stat-time{padding:24px;border-radius:24px}.watch-stat-totals>div{padding:12px 4px}.watch-stat-favorite{padding:16px;gap:16px}.watch-stat-title{font-size:16px}.watch-stat-genres{padding:20px}.watch-stat-genre-list{grid-template-columns:1fr}.watch-stat-genre-value{max-width:145px}.watch-stat-caption{font-size:12px}.comments-section>.section-title{margin-bottom:16px}}

.news-more{display:block;margin:32px auto}.news-more[hidden]{display:none}

.news-article-cover{margin:0 0 28px;background:var(--md-surface);border-radius:24px;overflow:hidden}.news-article-cover img{display:block;width:100%;height:auto;max-height:560px;object-fit:contain}.news-article-cover.is-placeholder{height:180px;display:grid;place-items:center}.news-article-cover.is-placeholder img{width:132px;height:132px;border-radius:24px}

/* News cards navigate like the existing anime cards, without a hover URL. */
button.live-news-card { padding:0; text-align:left; color:inherit; font:inherit; cursor:pointer; }
button.live-news-card:focus-visible { outline:2px solid var(--accent-purple); outline-offset:3px; }
.plans-tools { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:0 0 24px; }
.plans-tools[hidden] { display:none; }
.plans-tools .field-help { flex-basis:100%; margin:0; }
.plans-tools select { max-width:100%; min-width:200px; }

.import-match-search { display:flex; gap:8px; margin-top:12px; }
.import-match-search input { min-width:0; flex:1; }
.import-match-results { display:grid; gap:8px; margin-top:8px; }
.import-match-option { display:grid; gap:4px; padding:12px 16px; text-align:left; color:var(--text-main); background:var(--md-surface-high); border:1px solid transparent; border-radius:16px; cursor:pointer; }
.import-match-option:hover,.import-match-option:focus-visible { border-color:var(--accent-purple); }
.import-row > .secondary-button { margin-top:8px; }

.plans-tools label { font-size:14px; color:var(--text-secondary); }
.plans-tools select { min-height:48px; padding:12px 16px; border:1px solid var(--md-outline); border-radius:16px; background-color:var(--bg-input); color:var(--text-main); font:inherit; }
.plans-tools .select-field { width:min(320px,100%); }
.import-match-search input { min-height:48px; padding:10px 12px; border:1px solid var(--md-sys-color-outline); border-radius:14px; background:var(--bg-input); color:var(--text-main); font:inherit; font-size:16px; }
.import-dialog[open] { display:flex; flex-direction:column; }
.import-dialog > * { flex-shrink:0; }
.import-dialog .import-rows { flex:1 1 auto; min-height:72px; }
.import-dialog .dialog-actions { margin-top:12px; }

body.astrea-body:has(>.astrea-header){padding-top:var(--header-height,84px)}
a.btn-publish,a.anime-card-link,a.news-card,a.genre-tag{text-decoration:none}
#collection-results{overflow-anchor:none;align-content:start}

.player-preference-form{display:grid;gap:12px}.player-preference-form select{width:100%;min-width:0;min-height:48px;padding:14px 16px;border:1px solid var(--md-sys-color-outline);border-radius:16px;background-color:var(--bg-input);color:var(--text-main);font:inherit;font-size:14px}.player-preference-form .secondary-button{justify-self:start}

@media(max-width:640px){.player-preference-form select{font-size:16px}}
