/* White/red polish, shared responsive components. */
:root { --text-muted: #71717a; --shadow-soft: 0 3px 18px rgba(24,24,27,.05); }
body { background: #fcfcfd; }
.otp-grid { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.otp-grid .otp-cell { width: 100%; min-width: 0; padding: 8px 0; }
.topbar { backdrop-filter: blur(16px); }
.sidebar { display: block; position: sticky; top: calc(var(--site-header-h,64px) + 18px); width: var(--sidebar-w); height: calc(100dvh - var(--site-header-h,64px) - 36px); margin: 18px 0 0; padding: 12px; background: #fff; border: 1px solid #e1e3e8; border-radius: 10px; box-shadow: 0 3px 12px #18181b04; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d4d4d8 transparent; }
.sidebar nav { gap: 6px; }
.sidebar::-webkit-scrollbar { display: block; width: 6px !important; }
.sidebar::-webkit-scrollbar-thumb { background: #d4d4d8; border-radius: 4px; }
.sidebar a, .sidebar .nav-link { min-height: 46px; padding: 11px 12px; gap: 12px; border: 1px solid transparent; border-radius: 7px; color: #3f3f46; font-weight: 550; }
.sidebar a:hover, .sidebar .nav-link:hover { background: #f5f5f7; border-color: #e4e4e7; }
.sidebar nav > a.active { background: #fff0f0; border-color: #f2b8b8; color: #a00e0e; box-shadow: inset 3px 0 var(--red-bright); }
.sidebar-head { position: sticky; top: -12px; z-index: 1; display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 4px; background: #fff; border-bottom: 1px solid var(--border); }
.sidebar-head .logo { width: auto; min-height: 0; padding: 0; border: 0; background: transparent; }
.sidebar-heading { color: #71717a; font-size: 12px; font-weight: 700; letter-spacing: .5px; }
.sidebar-close { display: none; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 7px; color: var(--text); cursor: pointer; }
.sidebar-close:hover { background: #f4f4f5; border-color: var(--border); }
.sidebar-group { padding: 12px 0; border-bottom: 1px solid var(--border); }
.sidebar-group h2 { font-size: 14px; font-weight: 650; padding: 4px 12px 8px; }
.sidebar-guest { padding: 18px 12px; border-bottom: 1px solid var(--border); }
.sidebar-guest p { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 12px; }
.sidebar .sidebar-guest .btn { display: inline-flex; width: auto; min-height: 40px; border: 1px solid var(--border); }
.sidebar-footer { padding: 18px 12px; font-size: 12px; color: var(--text-secondary); }
.sidebar .nav-label { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
body.sidebar-collapsed .sidebar-head, body.sidebar-collapsed .sidebar-group h2, body.sidebar-collapsed .sidebar-guest, body.sidebar-collapsed .sidebar-footer { display: none; }
.sidebar .nav-logout { margin-top: 12px; padding-top: 12px; border-top-color: var(--border); }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 280; background: #18181b66; }
.sidebar-backdrop[hidden] { display: none; }
.auth-shell .layout { padding-bottom: 32px; }
.auth-shell .content { padding-left: 0; }
.auth-back-link { margin-left: auto; color: var(--text-secondary); font-size: 14px; padding: 10px; }
.email-resend-form { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.email-resend-form button:disabled { background: #f4f4f5; border-color: #e4e4e7; color: #71717a; opacity: 1; cursor: not-allowed; box-shadow: none; }
.feed-head h1 { letter-spacing: -.8px; }
.btn { border-radius: 12px; }
.bottombar { padding-bottom: max(8px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); backdrop-filter: blur(16px); }
.profile-cover { height: clamp(150px, 20vw, 300px); border-radius: 22px 22px 0 0; overflow: hidden; background: #fff1f2; }
.profile-cover > img { width: 100%; height: 100%; object-fit: cover; }
.profile-cover-default { height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 32px; color: #fff; background: radial-gradient(ellipse at 85% 20%, #ff9999 0, transparent 45%), linear-gradient(120deg,#a90d27,#ef1010 65%,#ff6868); }
.profile-cover-default span { font-weight: 900; font-size: clamp(28px,5vw,56px); letter-spacing: -2px; }
.profile-cover-default small { opacity: .9; font-size: 14px; }
.profile-with-cover { border-radius: 0 0 22px 22px; padding: 24px; border-top: 0; }
.profile-with-cover .profile-avatar-large { width: 112px; height: 112px; margin-top: -58px; border: 5px solid white; box-shadow: 0 5px 20px #0001; position: relative; }
.profile-edit { max-width: 760px; margin: 0 auto; }
.profile-edit h1 { font-size: 26px; letter-spacing: -.6px; }
.profile-edit-intro { color: var(--text-secondary); margin: 8px 0 24px; }
.profile-art-preview { height: 180px; border-radius: 18px; position: relative; margin-bottom: 48px; background: linear-gradient(120deg,#b50909,#ff8989); }
.banner-preview { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar-preview { position: absolute; width: 88px; height: 88px; object-fit: cover; border-radius: 50%; border: 4px solid white; left: 24px; bottom: -30px; }
.profile-edit .form { padding: 24px; border: 1px solid var(--border); background: white; border-radius: 18px; }
.profile-edit .form p { margin-bottom: 18px; overflow-wrap: anywhere; }
.profile-edit .form label { font-weight: 600; display: block; margin-bottom: 8px; }
.profile-edit .helptext { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 6px; }
.profile-edit input[type=file] { width: 100%; font-size: 13px; }
.profile-edit input::file-selector-button { border: 0; padding: 10px 14px; border-radius: 8px; margin-right: 10px; background: var(--red-soft); color: var(--red-800); cursor: pointer; }
.errorlist { color: var(--red-800); list-style: none; }
.shorts-caption { font-size: 13px; color: var(--text-secondary); }
.short-frame { box-shadow: 0 12px 40px #18181b20; border-radius: 22px; }
.short-frame iframe { width: 100%; height: 100%; border: 0; }
.short-author .ttl { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.short-sound { position: absolute; top: 16px; right: 16px; z-index: 5; border: 1px solid #ffffff40; border-radius: 30px; background: #0006; backdrop-filter: blur(8px); color: white; padding: 10px 14px; cursor: pointer; font-size: 12px; min-height: 44px; }
.short-video-error { position: absolute; top: 45%; left: 16px; right: 16px; color: white; text-align: center; z-index: 5; }
.short-progress { height: 8px; }
.shorts-drawer-form { padding-bottom: max(14px,env(safe-area-inset-bottom)); }
@media(max-width:768px) {
  .sidebar, body.sidebar-collapsed .sidebar { display: block; position: fixed; top: 0; left: 0; z-index: 290; width: min(304px,88vw); height: 100dvh; margin: 0; padding: 0 12px max(16px,env(safe-area-inset-bottom)); border: 0; border-right: 1px solid #e4e4e7; border-radius: 0; transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .sidebar { transform: translateX(0); visibility: visible; box-shadow: 12px 0 40px #18181b20; }
  .sidebar-head { top: 0; }
  .sidebar-close { display: flex; }
  body.sidebar-collapsed .sidebar-head { display: flex; }
  body.sidebar-collapsed .sidebar-group h2, body.sidebar-collapsed .sidebar-guest, body.sidebar-collapsed .sidebar-footer { display: block; }
  body.sidebar-collapsed .sidebar .nav-label { display: inline; }
  body.sidebar-collapsed .sidebar a, body.sidebar-collapsed .sidebar .nav-link { justify-content: flex-start; padding: 11px 12px; }
  .bottombar a { flex: 1; min-width: 0; padding-left: 4px; padding-right: 4px; }
  .bottombar a span { white-space: nowrap; }
  input, textarea, select { font-size: 16px; }
  .profile-with-cover { padding: 20px; }
  .profile-with-cover .profile-avatar-large { width: 88px; height: 88px; margin-top: -64px; }
  .profile-edit .form { padding: 18px; }
  .shorts-nav { display: none; }
  body:has(.shorts-feed) .searchbar, body:has(.shorts-feed) .feed-head { display: none; }
  body:has(.shorts-feed) .layout { padding: 0 8px 0; }
  body:has(.shorts-feed) .content { padding-top: 8px; }
  .short-slide { height: calc(100dvh - var(--site-header-h,64px) - var(--site-mobile-nav-h,68px) - 16px); min-height: 240px; scroll-margin-top: calc(var(--site-header-h,64px) + 8px); grid-template-columns: minmax(0,1fr) 48px; }
  .short-frame { border-radius: 16px; }
  .short-author { flex-wrap: wrap; }
  .short-author .who { flex-basis: calc(100% - 48px); }
  .short-author .subscribe-btn { margin-left: 42px; height: 30px; }
  .short-act .act-circle { width: 42px; height: 42px; }
  .shorts-drawer { top: auto; height: min(75dvh,620px); width: 100%; border-radius: 22px 22px 0 0; }
}
