:root {
    --page: #f5f5f5;
    --surface: #ffffff;
    --surface-soft: #f5f5f5;
    --ink: #111318;
    --muted: #898a90;
    --line: #ebebeb;
    --accent: #111318;
    --accent-strong: #000000;
    --accent-soft: #e5e6e8;
    --success: #303238;
    --success-soft: #e8e9eb;
    --rose: #c66c87;
    --rose-dark: #9a4962;
    --rose-soft: #f7e7ed;
    --lavender-soft: #eeeaf7;
    --amber-soft: #f1f1f3;
    --danger: #c83f5b;
    --danger-soft: #fff0f3;
    --shadow-sm: inset 0 0 0 1px #ebebeb, 0 1px 2px rgba(17, 17, 17, 0.025);
    --shadow-md: inset 0 0 0 1px #ebebeb, 0 2px 8px rgba(17, 17, 17, 0.04);
    --shadow-accent: 0 6px 18px rgba(17, 17, 17, 0.14);
    --radius: 16px;
    --radius-small: 12px;
}

html { scroll-behavior: smooth; }
body {
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--ink);
    background: #f5f5f5;
    background-attachment: fixed;
}
button, a { -webkit-tap-highlight-color: transparent; }
a, button { transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }

.app-shell, .workspace-page { min-height: 100vh; min-height: 100dvh; background: #fff; }
.page-container, .workspace-container { width: min(calc(100% - 36px), 1080px); margin-inline: auto; }
.app-header, .workspace-header {
    position: sticky;
    z-index: 30;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
}
.header-content, .workspace-header-content { display: flex; min-height: 72px; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 1.13rem; font-weight: 750; text-decoration: none; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: #fff; background: #262626; box-shadow: 0 4px 12px rgba(17, 17, 17, 0.12); font-size: 0.9rem; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.icon-button, .profile-button { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.88); border-radius: 50%; color: var(--ink); background: rgba(255, 255, 255, 0.9); box-shadow: var(--shadow-sm); text-decoration: none; }
.icon-button { cursor: pointer; }
.icon-button:hover, .profile-button:hover { color: var(--accent-strong); box-shadow: 0 10px 28px rgba(35, 42, 52, 0.1); transform: translateY(-1px); }
.profile-button { color: var(--accent); font-size: 0.84rem; font-weight: 750; }
.page-content { padding-top: 30px; padding-bottom: 132px; }
.eyebrow { margin: 0 0 5px; color: var(--rose-dark); font-size: 0.72rem; font-weight: 750; text-transform: uppercase; }

.search-field { display: grid; min-height: 52px; grid-template-columns: 22px minmax(0, 1fr) 32px; align-items: center; gap: 10px; padding: 0 13px 0 16px; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: var(--radius); background: rgba(255, 255, 255, 0.92); box-shadow: var(--shadow-sm); }
.home-search { margin-bottom: 32px; }
.search-field > i { color: var(--muted); font-size: 1rem; }
.search-field:focus-within { border-color: rgba(17, 19, 24, 0.35); box-shadow: 0 0 0 4px rgba(17, 19, 24, 0.08), var(--shadow-sm); }
.search-field input { width: 100%; min-width: 0; padding: 14px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 0.9rem; }
.search-field input::placeholder { color: #aaabb0; }
.search-clear { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 50%; color: #a5a6ab; background: transparent; cursor: pointer; }
.search-clear:hover { color: var(--ink); background: var(--page); }

.dashboard-grid, .primary-column { display: grid; gap: 28px; }
.content-section, .membership-section { min-width: 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 1.16rem; font-weight: 730; line-height: 1.25; }
.text-action { padding: 6px 0; border: 0; color: var(--accent); background: transparent; font-size: 0.78rem; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; }
.text-action:hover { color: var(--ink); }
.cast-strip { display: grid; grid-auto-columns: 112px; grid-auto-flow: column; gap: 10px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; scroll-snap-type: x proximity; }
.cast-strip::-webkit-scrollbar { display: none; }
.cast-preview { display: grid; min-height: 160px; align-content: center; justify-items: center; gap: 9px; padding: 16px 10px; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: var(--radius); color: var(--ink); background: rgba(255, 255, 255, 0.94); box-shadow: var(--shadow-sm); scroll-snap-align: start; cursor: pointer; }
.cast-preview:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cast-preview strong { width: 100%; overflow: hidden; font-size: 0.84rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.cast-preview small { color: var(--muted); font-size: 0.68rem; }
.avatar { position: relative; display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; overflow: visible; border: 3px solid #fff; border-radius: 50%; color: #36383e; background: linear-gradient(145deg, #f1f1f3, #d6d7da); box-shadow: 0 7px 18px rgba(35, 42, 52, 0.1); font-size: 0.76rem; font-weight: 750; }
.avatar-large { width: 62px; height: 62px; flex-basis: 62px; font-size: 0.88rem; }
.tone-rose { color: #8d4c61; background: linear-gradient(145deg, #fbeef2, var(--rose-soft)); }
.tone-violet { color: #655b86; background: linear-gradient(145deg, #f5f2fb, var(--lavender-soft)); }
.tone-amber { color: #4b4c50; background: linear-gradient(145deg, #f8f8f9, var(--amber-soft)); }
.tone-mint { color: #45474d; background: linear-gradient(145deg, #f2f2f3, #d9dade); }
.online-dot { position: absolute; right: 0; bottom: 1px; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: var(--rose); }

.event-card { display: grid; min-height: 260px; grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-md); }
.event-card img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.event-content { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 30px; }
.event-label, .status-label, .role-badge, .tier-rank-label { display: inline-flex; width: fit-content; align-items: center; padding: 5px 9px; border-radius: 999px; color: var(--rose-dark); background: var(--rose-soft); font-size: var(--type-caption); font-weight: 750; }
.event-content h3 { margin: 14px 0 8px; font-size: 1.45rem; font-weight: 750; line-height: 1.2; }
.event-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 0.74rem; }
.event-description { margin: 16px 0 20px; color: var(--muted); font-size: 0.86rem; line-height: 1.6; }
.event-action { display: inline-flex; width: fit-content; align-items: center; gap: 8px; padding: 0; border: 0; color: var(--accent); background: transparent; font-size: 0.8rem; font-weight: 700; cursor: pointer; }

.following-section { align-self: start; padding: 20px; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: var(--radius); background: rgba(255, 255, 255, 0.92); box-shadow: var(--shadow-sm); }
.count-label { display: inline-grid; min-width: 28px; min-height: 28px; place-items: center; padding: 5px 9px; border-radius: 999px; color: var(--rose-dark); background: var(--rose-soft); font-size: 0.68rem; font-weight: 750; white-space: nowrap; }
.following-list { display: grid; gap: 10px; }
.cast-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cast-row:last-child { border-bottom: 0; }
.cast-row-main { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.cast-details { display: grid; min-width: 0; gap: 3px; }
.cast-details strong { overflow: hidden; font-size: 0.84rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.cast-details small { overflow: hidden; color: var(--muted); font-size: var(--type-caption); text-overflow: ellipsis; white-space: nowrap; }
.follow-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border: 1px solid transparent; border-radius: 999px; color: #fff; background: var(--rose-dark); box-shadow: 0 6px 16px rgba(154, 73, 98, 0.18); font-size: 0.72rem; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; }
.follow-button:hover { color: #fff; background: #7f394f; }
.follow-button.is-following { border-color: var(--line); color: var(--ink); background: var(--surface-soft); box-shadow: none; }
.search-empty { margin: 16px 0 0; padding: 18px; border-radius: var(--radius-small); color: var(--muted); background: rgba(255, 255, 255, 0.78); font-size: 0.82rem; text-align: center; }

.bottom-nav { position: fixed; z-index: 40; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); left: 0; padding-inline: 18px; pointer-events: none; }
.bottom-nav-content { display: flex; width: min(100%, 540px); min-height: 64px; margin-inline: auto; align-items: center; justify-content: space-around; padding: 5px; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 999px; background: rgba(255, 255, 255, 0.58); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5); backdrop-filter: blur(28px) saturate(145%); -webkit-backdrop-filter: blur(28px) saturate(145%); pointer-events: auto; }
.nav-item { display: grid; min-width: 58px; min-height: 50px; place-items: center; align-content: center; gap: 3px; padding: 5px 9px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: var(--type-label); font-weight: 600; text-decoration: none; cursor: pointer; }
.nav-item i { font-size: 1.08rem; }
.nav-item:hover { color: var(--ink); background: rgba(255, 255, 255, 0.44); }
.nav-item.active { color: #000; background: rgba(255, 255, 255, 0.78); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), inset 0 0.5px 0 rgba(255, 255, 255, 0.7); font-weight: 700; }
.app-toast { position: fixed; z-index: 60; right: 20px; bottom: 105px; max-width: min(340px, calc(100% - 40px)); padding: 12px 16px; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: var(--radius-small); color: #fff; background: rgba(17, 19, 24, 0.9); box-shadow: var(--shadow-md); font-size: 0.78rem; opacity: 0; transform: translateY(12px); transition: opacity 180ms ease, transform 180ms ease; pointer-events: none; }
.app-toast.visible { opacity: 1; transform: translateY(0); }

.directory-content { padding-block: 38px 132px; }
.directory-heading { max-width: 620px; margin-bottom: 28px; }
.directory-heading h1 { margin: 4px 0 8px; font-size: 2rem; font-weight: 760; line-height: 1.15; }
.directory-heading > p:last-child { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cast-directory-item { display: grid; min-width: 0; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 18px; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: var(--radius); background: rgba(255, 255, 255, 0.94); box-shadow: var(--shadow-sm); transition: box-shadow 160ms ease, transform 160ms ease; }
.cast-directory-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.cast-directory-avatar { overflow: hidden; }
.cast-directory-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.cast-directory-copy { min-width: 0; }
.cast-directory-copy h2 { margin: 0 0 5px; font-size: 0.98rem; font-weight: 730; }
.cast-directory-copy p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 0.75rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cast-directory-item form { margin: 0; }
.directory-empty, .workspace-empty { display: grid; min-height: 210px; place-items: center; align-content: center; gap: 9px; padding: 30px; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: var(--radius); color: var(--muted); background: rgba(255, 255, 255, 0.8); box-shadow: var(--shadow-sm); text-align: center; }
.directory-empty > i, .workspace-empty i { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: var(--rose-dark); background: var(--rose-soft); font-size: 1.18rem; }
.directory-empty h2 { margin: 4px 0 0; color: var(--ink); font-size: 1rem; }
.directory-empty p, .workspace-empty p { margin: 0; font-size: 0.8rem; }
.directory-empty .primary-button { margin-top: 8px; }
.pagination-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; color: var(--muted); font-size: 0.78rem; }
.pagination-nav .secondary-button { width: 42px; min-height: 42px; padding: 0; }
.pagination-nav .is-disabled { opacity: 0.38; pointer-events: none; }

.auth-page { display: grid; min-width: 0; min-height: 100vh; min-height: 100dvh; place-items: center; padding: 20px; background: #efeff1; }
.auth-layout { position: relative; display: grid; width: min(390px, 100%); height: min(844px, calc(100vh - 40px)); height: min(844px, calc(100dvh - 40px)); min-height: 700px; margin-inline: auto; align-content: start; overflow-x: hidden; overflow-y: auto; padding: max(22px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); border: 1px solid #e7e7e7; border-radius: 28px; background: #fff; box-shadow: 0 18px 54px rgba(17, 17, 17, 0.11); scrollbar-width: none; -ms-overflow-style: none; isolation: isolate; }
.auth-layout::-webkit-scrollbar { display: none; }
.auth-layout-login, .auth-layout-signup { grid-template-rows: auto minmax(0, 1fr); background: #f5f5f5; }
.auth-atmosphere { position: absolute; z-index: -1; top: -150px; right: -90px; width: 330px; height: 330px; border-radius: 50%; background: radial-gradient(circle, rgba(247, 231, 237, 0.86) 0%, rgba(238, 234, 247, 0.48) 42%, rgba(255, 255, 255, 0) 72%); pointer-events: none; }
.auth-topbar { display: flex; min-height: 42px; align-items: center; justify-content: space-between; }
.auth-topbar-centered { justify-content: center; padding-top: 26px; }
.auth-wordmark { color: var(--ink); font-size: 1.22rem; font-weight: var(--wordmark-font-weight); line-height: 1; text-decoration: none; }
.auth-topbar-centered .auth-wordmark { color: var(--ink); font-size: 1.22rem; font-weight: var(--wordmark-font-weight); }
.auth-topbar-with-action { position: relative; }
.auth-topbar-with-action .auth-wordmark { position: absolute; left: 50%; z-index: 1; transform: translateX(-50%); }
.auth-topbar-with-action .auth-home-link { position: absolute; right: 0; }
.auth-home-link { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 50%; color: var(--ink); background: rgba(255, 255, 255, 0.84); box-shadow: 0 7px 22px rgba(17, 19, 24, 0.1); text-decoration: none; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.auth-home-link:hover { background: #fff; transform: translateY(-1px); }
.auth-hero { display: grid; justify-items: center; padding: 38px 12px 25px; text-align: center; }
.auth-hero-minimal { justify-items: start; padding: 42px 2px 18px; text-align: left; }
.auth-hero-minimal h1 { font-size: clamp(1.72rem, 7vw, 2rem); letter-spacing: -0.035em; }
.auth-hero-icon { display: grid; width: 50px; height: 50px; margin-bottom: 18px; place-items: center; border-radius: 16px; font-size: 1.15rem; transform: rotate(-3deg); }
.auth-hero-icon > i { transform: rotate(3deg); }
.auth-hero-icon.rose { color: var(--rose-dark); background: var(--rose-soft); }
.auth-hero-icon.lavender { color: #655b86; background: var(--lavender-soft); }
.auth-hero .eyebrow { margin-bottom: 5px; color: #777980; font-size: var(--type-caption); letter-spacing: 0.09em; }
.auth-hero h1 { margin: 0; font-size: clamp(2rem, 9vw, 2.5rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.06; }
.auth-hero > p:last-child { max-width: 290px; margin: 11px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.auth-panel { padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 12px 36px rgba(17, 19, 24, 0.06); }
.auth-login-panel { width: calc(100% + 16px); margin-left: -8px; align-self: center; padding: 30px 26px 24px; border-radius: 24px; background: #fff; box-shadow: 0 12px 30px rgba(17, 19, 24, 0.12); }
.auth-signup-panel { align-self: start; margin-top: 42px; margin-bottom: 24px; }
.auth-login-heading { margin-bottom: 24px; }
.auth-login-heading h1 { margin: 0; font-size: clamp(1.58rem, 7vw, 1.9rem); font-weight: 400; letter-spacing: -0.015em; line-height: 1.12; }
.auth-login-heading p { margin: 7px 0 0; color: var(--muted); font-size: var(--type-body-small); line-height: var(--line-body); }
.auth-social-mock { margin-bottom: 18px; }
.auth-google-button { display: grid; width: 100%; min-height: 52px; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: #f1f1f2; font-size: 0.77rem; font-weight: 650; text-align: center; cursor: pointer; }
.auth-google-button:hover { border-color: rgba(17, 19, 24, 0.18); background: #e9e9eb; }
.auth-google-button:focus-visible { outline: 3px solid rgba(17, 19, 24, 0.18); outline-offset: 2px; }
.google-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #42454b; background: #fff; font-family: inherit; font-size: 0.95rem; font-weight: 800; }
.auth-google-button small { padding: 4px 7px; border-radius: 999px; color: #777980; background: rgba(255, 255, 255, 0.75); font-size: 0.5rem; font-weight: 600; }
.auth-mock-status { margin: 8px 8px 0; color: var(--muted); font-size: 0.6rem; line-height: 1.4; text-align: center; }
.auth-divider { display: flex; align-items: center; gap: 9px; margin-top: 14px; color: #777980; font-size: var(--type-caption); text-transform: uppercase; letter-spacing: 0.035em; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.auth-form { display: grid; gap: 15px; }
.form-field { display: grid; gap: 6px; color: #4c4f56; font-size: var(--type-label); font-weight: 650; }
.field-label { padding-left: 2px; }
.auth-input { display: grid; min-height: 50px; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 9px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; color: #929399; background: #f7f7f8; transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.auth-input:has(.input-invalid-mark) { grid-template-columns: 20px minmax(0, 1fr) 18px; }
.auth-input > i { font-size: 0.86rem; text-align: center; }
.auth-input .input-invalid-mark { display: none; color: var(--danger); }
.auth-input:focus-within { border-color: rgba(17, 19, 24, 0.32); color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(17, 19, 24, 0.06); }
.form-field.has-format-error .auth-input { border-color: rgba(200, 63, 91, 0.55); color: var(--danger); background: var(--danger-soft); }
.form-field.has-format-error .input-invalid-mark { display: inline-block; }
.auth-input:has(input.is-invalid) { border-color: rgba(200, 63, 91, 0.55); color: var(--danger); background: var(--danger-soft); }
.auth-input input { width: 100%; min-width: 0; min-height: 48px; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 0.82rem; font-weight: 500; }
.auth-input input::placeholder { color: #adaeb3; }
.form-field input, .form-field textarea { width: 100%; min-height: 50px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-small); outline: 0; color: var(--ink); background: var(--surface-soft); font-size: 0.86rem; font-weight: 500; resize: vertical; }
.form-field .auth-input input { min-height: 48px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.form-field textarea { min-height: 108px; }
.form-field input:focus, .form-field textarea:focus { border-color: rgba(17, 19, 24, 0.42); background: #fff; box-shadow: 0 0 0 4px rgba(17, 19, 24, 0.08); }
.form-field .auth-input input:focus { border: 0; background: transparent; box-shadow: none; }
.auth-input input:-webkit-autofill,
.auth-input input:-webkit-autofill:hover,
.auth-input input:-webkit-autofill:focus,
.auth-input input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: 0 0 0 1000px #f7f7f8 inset;
  transition: background-color 9999s ease-out 0s;
}
.auth-input:focus-within input:-webkit-autofill,
.auth-input:focus-within input:-webkit-autofill:hover,
.auth-input:focus-within input:-webkit-autofill:focus,
.auth-input:focus-within input:-webkit-autofill:active { box-shadow: 0 0 0 1000px #fff inset; }
.form-field input.is-invalid { border-color: rgba(200, 63, 91, 0.6); background: var(--danger-soft); }
.form-field .auth-input input.is-invalid { border: 0; background: transparent; }
.field-hint, .field-error { font-size: 0.69rem; font-weight: 500; }
.field-hint { color: var(--muted); }
.field-error { color: var(--danger); }
.auth-email-error { display: none; align-items: center; gap: 5px; }
.form-field.has-format-error .auth-email-error { display: flex; }
.live-field-hint { transition: color 160ms ease; }
.live-field-hint.is-invalid { color: var(--danger); }
.live-field-hint.is-valid { color: #4d6254; }
.password-strength { display: grid; gap: 5px; color: var(--muted); font-size: var(--type-caption); font-weight: 500; }
.password-strength-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.password-strength-heading strong { color: #777980; font-size: var(--type-caption); font-weight: 700; }
.password-strength-meter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.password-strength-meter span { height: 3px; border-radius: 999px; background: #e7e7e9; transition: background-color 160ms ease; }
.password-strength.weak .password-strength-heading strong { color: var(--danger); }
.password-strength.weak .password-strength-meter span:first-child { background: var(--rose); }
.password-strength.fair .password-strength-heading strong { color: #5f6065; }
.password-strength.fair .password-strength-meter span:nth-child(-n + 2) { background: #8d8f94; }
.password-strength.strong .password-strength-heading strong { color: #4d6254; }
.password-strength.strong .password-strength-meter span { background: #738c7a; }
.primary-button, .secondary-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.primary-button { border: 1px solid var(--accent); color: #fff; background: linear-gradient(145deg, #3a3c42, var(--accent)); box-shadow: var(--shadow-accent); }
.primary-button:hover { border-color: var(--accent-strong); color: #fff; background: linear-gradient(145deg, #24262b, var(--accent-strong)); transform: translateY(-1px); }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); }
.secondary-button:hover { color: var(--accent-strong); border-color: rgba(17, 19, 24, 0.18); background: var(--accent-soft); }
.auth-submit { width: 100%; min-height: 50px; justify-content: space-between; margin-top: 3px; padding-inline: 20px; }
.auth-submit i { font-size: 0.9rem; }
.auth-switch { margin: 19px 0 0; color: var(--muted); font-size: 0.72rem; text-align: center; }
.auth-switch a { color: var(--accent); font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-footnote { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; color: #777980; font-size: var(--type-caption); line-height: 1.4; }
.auth-footnote i { color: #777980; }
.auth-login-panel .auth-switch { margin-top: 22px; }
.auth-login-panel .auth-footnote { margin-top: 15px; }
.form-alert { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 8px; margin-bottom: 16px; padding: 11px 12px; border: 1px solid rgba(200, 63, 91, 0.16); border-radius: 13px; color: var(--danger); background: var(--danger-soft); font-size: 0.7rem; line-height: 1.45; }
.form-alert.success { border-color: rgba(17, 19, 24, 0.1); color: var(--success); background: var(--success-soft); }
.form-alert.neutral { border-color: rgba(17, 19, 24, 0.1); color: var(--accent); background: var(--accent-soft); }
.account-avatar { display: grid; width: 70px; height: 70px; margin: 0 auto 18px; place-items: center; border-radius: 50%; color: var(--accent); background: linear-gradient(145deg, #f0f0f2, #d1d2d6); box-shadow: 0 10px 28px rgba(35, 42, 52, 0.1); font-size: 1.45rem; }
.account-heading { text-align: center; }
.account-actions { display: grid; gap: 11px; }
.account-actions form, .account-actions button { width: 100%; }

.workspace-content { padding-block: 38px 70px; }
.workspace-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.workspace-title h1 { margin: 4px 0 0; font-size: 2rem; font-weight: 760; line-height: 1.16; }
.role-badge { color: var(--rose-dark); background: var(--rose-soft); }
.role-badge.owner { color: #fff; background: var(--accent); }
.workspace-grid, .tier-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.workspace-section, .membership-section { padding: 22px; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: var(--radius); background: rgba(255, 255, 255, 0.92); box-shadow: var(--shadow-sm); }
.workspace-facts { margin: 0; }
.workspace-facts > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.workspace-facts > div:last-child { border-bottom: 0; }
.workspace-facts dt { color: var(--muted); font-size: 0.74rem; font-weight: 550; }
.workspace-facts dd { min-width: 0; margin: 0; color: var(--ink); font-size: 0.78rem; font-weight: 650; text-align: right; }
.workspace-action { width: 100%; margin-top: 18px; }
.compact-button { min-height: 38px; padding: 8px 13px; }
.form-split { display: grid; grid-template-columns: 0.65fr 1.35fr; gap: 12px; }
.tier-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-soft); }
.tier-rank { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: var(--rose-dark); background: var(--rose-soft); font-size: 0.82rem; font-weight: 750; }
.tier-copy { min-width: 0; }
.tier-name-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tier-copy h3, .membership-tier h3 { margin: 0; font-size: 0.91rem; font-weight: 730; }
.tier-copy > p, .membership-tier > p { margin: 6px 0; color: var(--muted); font-size: 0.73rem; line-height: 1.5; }
.tier-copy > strong, .tier-footer > strong { color: var(--ink); font-size: 0.74rem; font-weight: 700; }
.status-label.inactive { color: var(--muted); background: #e9eaed; }
.membership-section + .membership-section { margin-top: 20px; }
.membership-tier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.membership-tier { display: flex; min-width: 0; min-height: 190px; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, #fff 55%, #f0f0f2 100%); }
.tier-cast-name { margin: 0 0 4px; color: var(--rose-dark); font-size: var(--type-caption); font-weight: 700; }
.tier-rank-label { flex: 0 0 auto; color: var(--rose-dark); background: var(--rose-soft); }
.tier-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.compact-empty { min-height: 170px; box-shadow: none; }

@media (min-width: 840px) {
    .dashboard-grid { grid-template-columns: minmax(0, 1.7fr) minmax(310px, 0.8fr); align-items: start; }
    .cast-strip { grid-auto-columns: 122px; }
}
@media (max-width: 820px) {
    .directory-grid, .membership-tier-grid { grid-template-columns: 1fr; }
    .membership-tier { min-height: 170px; }
}
@media (max-width: 720px) {
    .page-container, .workspace-container { width: min(calc(100% - 28px), 680px); }
    .header-content, .workspace-header-content { min-height: 66px; }
    .page-content, .directory-content { padding-top: 24px; }
    .event-card { min-height: 0; grid-template-columns: 1fr; }
    .event-card img { height: 200px; min-height: 0; }
    .event-content { padding: 23px; }
    .workspace-grid, .tier-layout { grid-template-columns: 1fr; }
    .workspace-title h1, .directory-heading h1 { font-size: 1.75rem; }
}
@media (max-width: 520px) {
    .cast-directory-item { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 15px; }
    .cast-directory-avatar { width: 54px; height: 54px; flex-basis: 54px; }
    .cast-directory-item form, .cast-directory-item > .follow-button { grid-column: 1 / -1; }
    .cast-directory-item .follow-button { width: 100%; }
    .auth-panel { padding: 19px; }
    .tier-row { grid-template-columns: auto minmax(0, 1fr); }
    .tier-row > form { grid-column: 1 / -1; }
    .tier-row > form .secondary-button, .tier-row > form .icon-button { width: 100%; border-radius: var(--radius-small); }
}
@media (max-width: 470px) {
    .auth-page { padding: 0; }
    .auth-layout { width: 100%; height: 100vh; height: 100dvh; min-height: min(640px, 100dvh); border: 0; border-radius: 0; box-shadow: none; }
}
@media (max-width: 420px) {
    .page-container, .workspace-container { width: calc(100% - 24px); }
    .brand { font-size: 1.02rem; }
    .brand-mark { width: 35px; height: 35px; }
    .directory-heading h1, .workspace-title h1 { font-size: 1.58rem; }
    .bottom-nav { bottom: max(10px, env(safe-area-inset-bottom)); padding-inline: 10px; }
    .bottom-nav-content { min-height: 62px; padding-inline: 5px; }
    .nav-item { min-width: 48px; padding-inline: 6px; font-size: var(--type-caption); }
    .cast-row { grid-template-columns: 1fr; }
    .cast-row .follow-button { width: 100%; }
    .form-split { grid-template-columns: 1fr; }
    .workspace-section, .membership-section { padding: 18px; }
}
@media (max-width: 350px) {
    .auth-layout { padding-inline: 14px; }
    .auth-hero { padding-top: 28px; }
    .auth-panel { padding: 16px; border-radius: 20px; }
    .auth-login-panel { width: calc(100% + 8px); margin-left: -4px; padding: 24px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
