:root {
    --bg: #fff6fb;
    --bg-2: #fce7f3;
    --panel: rgba(255, 255, 255, 0.72);
    --panel-strong: rgba(255, 255, 255, 0.9);
    --border: rgba(219, 39, 119, 0.14);
    --text: #571734;
    --text-soft: #7d3e5b;
    --primary: #db2777;
    --primary-2: #f472b6;
    --primary-3: #ec4899;
    --gold: #c98f2e;
    --shadow: 0 24px 80px rgba(146, 32, 83, 0.18);
    --shadow-soft: 0 12px 40px rgba(146, 32, 83, 0.12);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.romance-page {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 20%, rgba(244, 114, 182, 0.24), transparent 26%),
        radial-gradient(circle at 85% 12%, rgba(219, 39, 119, 0.16), transparent 24%),
        radial-gradient(circle at 78% 82%, rgba(201, 143, 46, 0.12), transparent 22%),
        linear-gradient(180deg, #fff8fc 0%, #fff1f7 52%, #fff7fb 100%);
    overflow-x: hidden;
}

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.35;
    mix-blend-mode: soft-light;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    z-index: 0;
}

.bg-orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(24px);
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
}

.orb-a {
    width: 340px;
    height: 340px;
    left: -80px;
    top: 80px;
    background: rgba(244, 114, 182, 0.32);
}

.orb-b {
    width: 420px;
    height: 420px;
    right: -130px;
    top: 420px;
    background: rgba(201, 143, 46, 0.18);
}

.floating-flowers {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.floating-flowers span {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(219, 39, 119, 0.18);
    box-shadow: 0 0 0 12px rgba(244, 114, 182, 0.05);
    animation: drift 14s ease-in-out infinite;
}

.floating-flowers span:nth-child(1) { left: 10%; top: 20%; }
.floating-flowers span:nth-child(2) { left: 20%; top: 70%; animation-delay: 2s; }
.floating-flowers span:nth-child(3) { left: 74%; top: 16%; animation-delay: 4s; }
.floating-flowers span:nth-child(4) { left: 84%; top: 66%; animation-delay: 6s; }
.floating-flowers span:nth-child(5) { left: 48%; top: 84%; animation-delay: 8s; }

@keyframes drift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(18px, -24px, 0) scale(1.18); }
}

.glass-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px) saturate(140%);
}

.romance-login-page .login-layout {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: center;
    padding: 32px;
    max-width: 1280px;
    margin: 0 auto;
}

.romance-login-page .login-layout-compact {
    grid-template-columns: minmax(0, 560px);
    justify-content: center;
    max-width: 640px;
}

.login-intro,
.login-card {
    border-radius: var(--radius-xl);
    padding: 32px;
}

.eyebrow,
.hero-tag,
.modal-eyebrow,
.story-kicker,
.login-badge {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}

h1,
h2,
h3 {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.login-intro h1 {
    font-size: clamp(2.6rem, 5vw, 4.8rem);
    line-height: 1.02;
    max-width: 12ch;
}

.lead {
    color: var(--text-soft);
    line-height: 1.8;
    font-size: 1.02rem;
}

.feature-grid {
    display: grid;
    gap: 16px;
    margin-top: 30px;
}

.feature-grid article {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 16px;
    align-items: start;
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(219, 39, 119, 0.12);
}

.feature-grid i {
    font-size: 20px;
    color: var(--primary);
    margin-top: 2px;
}

.feature-grid h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.feature-grid p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.login-card {
    display: grid;
    gap: 20px;
}

.login-badge {
    display: inline-flex;
    width: fit-content;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
}

.login-card h2 {
    font-size: clamp(2rem, 3.2vw, 3rem);
}

.subtle-copy {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.inline-alert {
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(219, 39, 119, 0.09);
    border: 1px solid rgba(219, 39, 119, 0.18);
    color: var(--text);
}

.auth-form,
.composer-form {
    display: grid;
    gap: 14px;
}

.auth-form label,
.composer-form label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-soft);
}

.input-shell {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    min-height: 60px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(219, 39, 119, 0.16);
}

.input-shell i {
    color: var(--primary);
}

.input-shell input,
.composer-form textarea {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.input-shell input::placeholder,
.composer-form textarea::placeholder {
    color: rgba(87, 23, 52, 0.42);
}

.primary-btn,
.secondary-btn,
.nav-chip,
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.primary-btn {
    min-height: 54px;
    padding: 0 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 18px 30px rgba(219, 39, 119, 0.24);
}

.secondary-btn,
.nav-chip,
.icon-btn {
    min-height: 46px;
    padding: 0 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--text);
    border: 1px solid rgba(219, 39, 119, 0.14);
}

.nav-chip {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}

.nav-chip-ghost {
    background: rgba(255, 255, 255, 0.56);
}

.primary-btn:hover,
.secondary-btn:hover,
.nav-chip:hover,
.icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(146, 32, 83, 0.12);
}

.allowed-list {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(219, 39, 119, 0.12);
}

.allowed-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-soft);
}

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(219, 39, 119, 0.08);
    color: var(--text);
    font-size: 0.92rem;
}

.text-link {
    width: fit-content;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.romance-board-page .topbar,
.hero-grid,
.feed-placeholder,
.message-card,
.modal-panel,
.drawer-panel {
    border-radius: var(--radius-xl);
}

.simple-nav {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 100;
    width: auto;
    margin: 0;
    padding: 8px 10px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(219, 39, 119, 0.14);
    box-shadow: 0 10px 30px rgba(146, 32, 83, 0.12);
    backdrop-filter: blur(18px) saturate(140%);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.simple-nav::-webkit-scrollbar {
    display: none;
}

.simple-nav-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: min-content;
}

.nav-links {
    display: inline-flex;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.nav-home-btn,
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    min-height: 36px;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
    font-size: 0.88rem;
}

.nav-home-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(219, 39, 119, 0.2);
}

.nav-link {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    border: 1px solid rgba(219, 39, 119, 0.14);
    font-weight: 600;
}

.nav-link.active {
    background: rgba(219, 39, 119, 0.1);
    color: var(--primary);
    border-color: rgba(219, 39, 119, 0.2);
}

.nav-home-btn:hover,
.nav-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(146, 32, 83, 0.12);
}

.topbar {
    position: relative;
    z-index: 20;
    margin: 82px auto 0;
    width: min(1280px, calc(100% - 32px));
    padding: 14px 16px;
    display: grid;
    gap: 12px;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, #f9a8d4 100%);
    box-shadow: 0 16px 30px rgba(219, 39, 119, 0.24);
}

.brand-copy {
    min-width: 0;
}

.brand-copy .eyebrow {
    margin-bottom: 0;
    font-size: 14px;
    white-space: nowrap;
}

.top-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.top-actions-main {
    justify-content: flex-start;
}

.top-actions-sub {
    justify-content: flex-start;
    margin-top: -4px;
}

.top-actions::-webkit-scrollbar {
    display: none;
}

.board-shell {
    position: relative;
    z-index: 1;
    width: min(1280px, calc(100% - 32px));
    margin: 24px auto 40px;
    display: grid;
    gap: 22px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

.hero-copy,
.feed-placeholder {
    padding: 28px;
}

.top-actions::-webkit-scrollbar,
.like-users-inline::-webkit-scrollbar {
    display: none;
}

.summary-stage {
    position: fixed;
    top: 88px;
    left: 10px;
    z-index: 76;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-height: 0;
    padding: 0;
    pointer-events: none;
    background: transparent;
    box-shadow: none;
}

.summary-toggle,
.summary-card {
    position: relative;
    z-index: 1;
}

.summary-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 40px;
    min-height: 40px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 16px 30px rgba(219, 39, 119, 0.2);
    cursor: pointer;
    flex-shrink: 0;
    pointer-events: auto;
}

.summary-stack {
    position: relative;
    top: 0;
    left: 0;
    width: 220px;
    display: grid;
    gap: 12px;
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
    transform-origin: left top;
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
    z-index: 1;
}

.summary-stage.is-open .summary-stack {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.summary-card {
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(219, 39, 119, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-shadow: 0 12px 24px rgba(146, 32, 83, 0.08);
}

.summary-label {
    color: var(--text-soft);
    font-size: 0.88rem;
    white-space: nowrap;
}

.summary-card strong {
    font-size: 1.02rem;
    color: var(--primary);
    line-height: 1;
    font-family: "Inter", system-ui, sans-serif;
    white-space: nowrap;
}

.compose-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 78;
    width: 62px;
    height: 62px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 22px 42px rgba(219, 39, 119, 0.28);
    cursor: pointer;
}

.compose-fab i {
    font-size: 1.45rem;
}

.board-banner {
    width: min(1280px, calc(100% - 24px));
    margin: 80px auto 0;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 24px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.board-banner::-webkit-scrollbar {
    display: none;
}

.board-banner-copy {
    min-width: 0;
    flex: 0 0 auto;
}

.board-banner-title {
    margin: 0;
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.board-banner-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    font-size: 0.84rem;
    scrollbar-width: none;
}

.board-banner-actions::-webkit-scrollbar {
    display: none;
}

.board-action-icon,
.board-logout {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.board-action-icon {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 10px 22px rgba(219, 39, 119, 0.2);
}

.board-action-icon .badge {
    position: absolute;
    right: -4px;
    top: -4px;
}

.board-logout {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(219, 39, 119, 0.14);
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
    font-size: 0.82rem;
}

.board-logout-name {
    color: var(--primary);
}

.feed-shell {
    display: grid;
    gap: 16px;
}

.feed-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 0 4px;
    color: var(--text-soft);
    font-weight: 600;
}

.feed-loading .loading-dots {
    display: inline-flex;
    gap: 6px;
}

.feed-loading .loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--primary);
    opacity: 0.45;
    animation: pulseDots 1.2s ease-in-out infinite;
}

.feed-loading .loading-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.feed-loading .loading-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

.load-sentinel {
    height: 1px;
    width: 100%;
}

.feed-placeholder {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 12px;
}

.placeholder-icon {
    width: 74px;
    height: 74px;
    border-radius: 26px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 18px 40px rgba(219, 39, 119, 0.2);
    font-size: 1.6rem;
}

.message-list {
    display: grid;
    gap: 16px;
}

.message-card {
    position: relative;
    padding: 22px;
    background: var(--panel-strong);
    border: 1px solid rgba(219, 39, 119, 0.12);
    box-shadow: var(--shadow-soft);
}

.message-head {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    align-items: flex-start;
}

.message-user {
    display: flex;
    gap: 14px;
    align-items: center;
}

.message-meta-line,
.reply-user-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.message-meta-line {
    width: 100%;
    justify-content: space-between;
}

.message-number {
    position: absolute;
    top: 18px;
    right: 18px;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), #f9a8d4);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 16px 28px rgba(219, 39, 119, 0.18);
}

.message-meta strong {
    display: block;
    font-size: 1.02rem;
    margin-bottom: 4px;
}

.message-meta small,
.timestamp,
.reply-meta small {
    color: var(--text-soft);
}

.message-body {
    margin-top: 16px;
    line-height: 1.9;
    white-space: pre-wrap;
    word-break: break-word;
}

.content-stream {
    margin-top: 14px;
    display: grid;
    gap: 12px;
    width: min(72vw, 820px);
    max-width: 72%;
    margin-right: auto;
    justify-self: start;
}

.content-stream.count-1 {
    grid-template-columns: minmax(0, 1fr);
}

.content-stream.count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-stream.count-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-stream.count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-stream.count-5plus {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-stream.compact {
    gap: 8px;
}

.reply-card .content-stream {
    margin-top: 10px;
    gap: 10px;
    width: min(72vw, 760px);
    max-width: 72%;
    justify-content: start;
}

.reply-card .content-stream.count-1 {
    grid-template-columns: minmax(0, 1fr);
}

.reply-card .content-stream.count-2,
.reply-card .content-stream.count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reply-card .content-stream.count-3,
.reply-card .content-stream.count-5plus {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(219, 39, 119, 0.12);
    min-height: 80px;
    aspect-ratio: 1 / 1;
}

.content-item-button {
    padding: 0;
    border: 0;
    cursor: pointer;
}

.content-item.is-compact {
    min-height: 50px;
    border-radius: 0;
}

.content-thumb {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.content-item-video .content-thumb {
    aspect-ratio: 1 / 1;
}

.content-play-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(87, 23, 52, 0.78);
    box-shadow: 0 12px 24px rgba(87, 23, 52, 0.2);
    transition: transform 180ms ease, opacity 180ms ease;
}

.content-item-video.is-playing .content-play-badge {
    opacity: 0;
    transform: scale(0.85);
}

.content-item-audio {
    padding: 12px 14px;
    display: grid;
    gap: 10px;
    align-content: start;
}

.content-item-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.86rem;
    font-weight: 700;
}

.content-item-audio audio {
    width: 100%;
}

.reply-card .content-item {
    min-height: 42px;
    border-radius: 0;
}

.reply-card .content-item-audio {
    padding: 8px 10px;
}

.reply-card .content-item.is-compact {
    min-height: 42px;
}

.content-item-audio-thumb {
    display: grid;
    place-items: center;
    min-height: 80px;
}

.content-audio-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 24px rgba(219, 39, 119, 0.2);
}

.content-item-audio-thumb.is-compact {
    min-height: 56px;
}

.reply-card .content-item-audio-thumb {
    min-height: 42px;
}

.reply-card .content-audio-mark {
    width: 20px;
    height: 20px;
    border-radius: 8px;
}

.reply-card .content-play-badge {
    width: 18px;
    height: 18px;
    right: 5px;
    bottom: 5px;
    font-size: 0.56rem;
}

.media-label {
    padding: 12px;
    display: grid;
    gap: 6px;
    color: var(--text-soft);
}

.media-label strong {
    color: var(--text);
}

.preview-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom)) 12px;
    background: rgba(18, 10, 14, 0.42);
    backdrop-filter: blur(18px);
    z-index: 140;
    overscroll-behavior: contain;
    touch-action: none;
}

.preview-overlay.show {
    display: flex;
}

.preview-panel {
    width: min(1240px, 100%);
    padding: 4px 10px 10px;
    max-height: 100dvh;
    display: grid;
    gap: 0;
}

.preview-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 1fr);
    gap: 18px;
    align-items: start;
}

.preview-side-blank {
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.1)),
        radial-gradient(circle at 20% 20%, rgba(244, 114, 182, 0.1), transparent 40%);
    border: 1px dashed rgba(219, 39, 119, 0.08);
    min-height: min(calc(92vh - 108px), 720px);
}

.preview-header {
    position: absolute;
    top: max(4px, env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    z-index: 4;
    padding: 0;
    pointer-events: none;
}

.preview-counter {
    color: rgba(255, 244, 249, 0.9);
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.84rem;
    line-height: 1;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(18, 10, 14, 0.26);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 24px rgba(18, 10, 14, 0.14);
    pointer-events: auto;
}

.preview-stage {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    touch-action: none;
}

.preview-stage-inner {
    position: relative;
    width: 100%;
    height: min(calc(100dvh - 82px), 820px);
    min-height: min(420px, calc(100dvh - 82px));
    overflow: hidden;
    border-radius: 24px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.preview-media-wrap {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.98);
    transition: opacity 220ms ease, transform 220ms ease;
    will-change: opacity, transform;
    display: grid;
    place-items: center;
}

.preview-stage-inner.is-ready .preview-media-wrap {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.preview-media-wrap.enter-from-right {
    transform: translate3d(42px, 0, 0) scale(0.98);
    opacity: 0;
}

.preview-media-wrap.enter-from-left {
    transform: translate3d(-42px, 0, 0) scale(0.98);
    opacity: 0;
}

.preview-media-wrap.exit-to-left {
    transform: translate3d(-42px, 0, 0) scale(0.98);
    opacity: 0;
}

.preview-media-wrap.exit-to-right {
    transform: translate3d(42px, 0, 0) scale(0.98);
    opacity: 0;
}

.preview-media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.preview-media-image,
.preview-media-video {
    width: 100%;
    height: 100%;
}

.preview-media-image {
    opacity: 0;
    transition: opacity 180ms ease;
}

.preview-media-image.is-loaded,
.preview-media-image:not(.is-loading) {
    opacity: 1;
}

.preview-media-wrap[data-preview-kind="video"] {
    padding: 0;
}

.preview-video-shell {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    max-width: 100%;
    max-height: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(16, 10, 14, 0.96);
    box-shadow: 0 24px 60px rgba(18, 10, 14, 0.28);
    pointer-events: auto;
}

.preview-video-shell .preview-media-video {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: rgba(16, 10, 14, 0.96);
    pointer-events: auto;
}

.preview-video-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 160ms ease;
}

.preview-video-shell.is-loading .preview-video-loading {
    opacity: 1;
}

.preview-video-loading-ring {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid rgba(255, 244, 249, 0.28);
    border-top-color: rgba(255, 244, 249, 0.94);
    box-shadow: 0 10px 22px rgba(18, 10, 14, 0.18);
    animation: previewSpin 0.85s linear infinite;
}

.preview-video-overlay {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: grid;
    gap: 6px;
    padding: 10px 12px 9px;
    border-radius: 18px;
    background: rgba(18, 10, 14, 0.52);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 30px rgba(18, 10, 14, 0.2);
    pointer-events: auto;
}

.preview-video-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    pointer-events: auto;
}

.preview-video-toggle {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    pointer-events: auto;
    font-size: 0.82rem;
}

.preview-video-timegroup {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 0;
}

.preview-video-current,
.preview-video-duration {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 244, 249, 0.92);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.preview-video-progress {
    width: 100%;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
    pointer-events: auto;
}

.preview-video-center-toggle {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.96rem;
    background: rgba(18, 10, 14, 0.5);
    box-shadow: 0 14px 34px rgba(18, 10, 14, 0.28);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.preview-video-shell.is-playing .preview-video-center-toggle {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    pointer-events: none;
}

.preview-video-shell.is-loading .preview-video-center-toggle {
    opacity: 0.22;
}

.preview-video-center-toggle:hover {
    background: rgba(18, 10, 14, 0.76);
}

.preview-media-audio {
    width: min(56%, 520px);
    display: grid;
    gap: 16px;
    justify-items: center;
    align-content: center;
    pointer-events: auto;
}

.preview-media-audio audio {
    width: 100%;
    pointer-events: auto;
}

.preview-media-video {
    pointer-events: auto;
}

.preview-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 0;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.84);
    color: var(--text);
    box-shadow: 0 16px 32px rgba(146, 32, 83, 0.18);
    cursor: pointer;
    z-index: 2;
}

.preview-nav.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.preview-prev {
    left: 6px;
}

.preview-next {
    right: 6px;
}

.message-actions,
.reply-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.reply-footer {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.reply-footer-left,
.reply-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reply-footer .action-btn {
    white-space: nowrap;
}

.reply-footer .action-btn.icon-only {
    width: 40px;
    min-width: 40px;
    padding: 0;
}

.reply-footer .action-btn span {
    display: none;
}

.action-btn {
    padding: 0 12px;
    min-height: 34px;
    border-radius: 10px;
    background: rgba(243, 244, 246, 0.95);
    border: 1px solid rgba(228, 231, 237, 0.92);
    color: #485772;
    cursor: pointer;
}

.action-btn.icon-only {
    width: 40px;
    padding: 0;
}

.action-btn.ghost {
    background: rgba(243, 244, 246, 0.95);
}

.action-btn.danger {
    color: #b4235e;
}

.wechat-action {
    gap: 6px;
    color: #61708d;
}

.wechat-action.liked {
    color: var(--primary);
    border-color: rgba(244, 114, 182, 0.28);
    background: rgba(252, 231, 243, 0.92);
}

.reply-thread {
    margin-top: 10px;
    display: grid;
    gap: 10px;
    padding-left: 0;
    border-left: 0;
}

.reply-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(219, 39, 119, 0.12);
}

.reply-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.reply-body {
    margin-top: 10px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.message-social-box {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(243, 244, 246, 0.92);
    border: 1px solid rgba(228, 231, 237, 0.95);
}

.message-social-like {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #576987;
    font-size: 0.94rem;
    line-height: 1.6;
}

.message-social-like i {
    color: #6a7ea7;
    flex: 0 0 auto;
}

.message-social-reply {
    padding-top: 8px;
    border-top: 1px solid rgba(215, 220, 230, 0.9);
    color: #30415f;
    line-height: 1.75;
    font-size: 0.94rem;
    display: grid;
    gap: 8px;
}

.message-social-reply:first-child {
    padding-top: 0;
    border-top: 0;
}

.message-social-reply-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}

.message-social-name {
    color: #5672a3;
    font-weight: 700;
}

.message-social-target {
    color: #5672a3;
    font-weight: 700;
}

.message-social-target::after {
    content: "：";
}

.message-social-verb {
    color: #61708d;
}

.message-social-content {
    color: var(--text);
    line-height: 1.75;
}

.reply-nested {
    margin-top: 12px;
    padding-left: 16px;
    border-left: 1px dashed rgba(219, 39, 119, 0.2);
    display: grid;
    gap: 10px;
}

.count-copy {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.composer-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.file-btn {
    width: fit-content;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 88px));
    gap: 10px;
    align-content: start;
}

.preview-item {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(219, 39, 119, 0.12);
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-item-audio {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(219, 39, 119, 0.12), rgba(244, 114, 182, 0.18));
}

.preview-audio-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 24px rgba(219, 39, 119, 0.2);
}

.preview-audio-mark-large {
    width: 60px;
    height: 60px;
    border-radius: 18px;
}

.preview-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(87, 23, 52, 0.78);
    cursor: pointer;
    z-index: 1;
}

.modal,
.drawer {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(87, 23, 52, 0.26);
    backdrop-filter: blur(12px);
    z-index: 120;
    padding: 18px;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 120ms ease, visibility 120ms ease;
}

.modal.show,
.drawer.show {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.modal-panel {
    width: min(720px, 100%);
    padding: 24px;
    max-height: min(88vh, 900px);
    overflow: auto;
    overscroll-behavior: contain;
}

.confirm-modal-panel {
    width: min(420px, 100%);
}

#saveConfirmModal {
    z-index: 160;
}

.confirm-copy {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.65;
}

.inline-link {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
    word-break: break-all;
}

.drawer {
    justify-content: center;
}

.drawer-panel {
    width: min(560px, 100%);
    max-height: min(80vh, 760px);
    padding: 24px;
    border-radius: 30px;
    overflow: auto;
    overscroll-behavior: contain;
    transform: translate3d(0, 14px, 0) scale(0.985);
    opacity: 0.92;
    transition: transform 140ms ease, opacity 140ms ease;
}

.drawer.show .drawer-panel,
.modal.show .modal-panel {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
}

.modal-header,
.drawer-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
    flex-wrap: nowrap;
}

.modal-header h3,
.drawer-header h3 {
    font-size: 1.6rem;
}

.composer-form textarea {
    min-height: 170px;
    resize: none;
    border-radius: 22px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(219, 39, 119, 0.14);
    overscroll-behavior: contain;
}

.modal-actions,
.drawer-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: nowrap;
    margin-top: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-actions::-webkit-scrollbar,
.drawer-actions::-webkit-scrollbar {
    display: none;
}

.modal-actions .secondary-btn,
.modal-actions .primary-btn,
.drawer-actions .secondary-btn {
    white-space: nowrap;
    flex: 0 0 auto;
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-item {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(219, 39, 119, 0.12);
    display: grid;
    gap: 8px;
    cursor: pointer;
}

.notification-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.notification-top strong {
    font-size: 0.98rem;
    line-height: 1.5;
}

.notification-item p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
    font-size: 0.94rem;
}

.notification-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: var(--text-soft);
    font-size: 0.82rem;
}

.notification-arrow {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(219, 39, 119, 0.08);
    color: var(--primary);
}

.notification-item.unread {
    background: rgba(219, 39, 119, 0.08);
}

#closePreviewBtn {
    min-height: 40px;
    width: 40px;
    padding: 0;
    border-radius: 999px;
    background: rgba(18, 10, 14, 0.26);
    color: rgba(255, 244, 249, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 24px rgba(18, 10, 14, 0.14);
    pointer-events: auto;
}

#closePreviewBtn:hover {
    background: rgba(18, 10, 14, 0.36);
    box-shadow: 0 14px 28px rgba(18, 10, 14, 0.18);
}

.notification-item-skeleton {
    cursor: default;
    pointer-events: none;
}

.notification-item-skeleton strong,
.notification-item-skeleton .timestamp,
.notification-item-skeleton p,
.notification-item-skeleton .notification-hint,
.notification-item-skeleton .notification-arrow {
    display: block;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(244, 114, 182, 0.08), rgba(255, 255, 255, 0.6), rgba(244, 114, 182, 0.08));
    background-size: 220% 100%;
    animation: notificationPulse 1.1s linear infinite;
    color: transparent;
}

.notification-item-skeleton strong {
    width: 52%;
    min-height: 16px;
}

.notification-item-skeleton .timestamp {
    width: 74px;
    min-height: 12px;
}

.notification-item-skeleton p {
    width: 88%;
    min-height: 14px;
}

.notification-item-skeleton .notification-hint {
    width: 38%;
    min-height: 12px;
}

.notification-item-skeleton .notification-arrow {
    width: 30px;
    height: 30px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%) translateY(24px);
    opacity: 0;
    pointer-events: none;
    z-index: 80;
    padding: 14px 18px;
    border-radius: 999px;
    background: rgba(87, 23, 52, 0.94);
    color: #fff;
    box-shadow: 0 18px 50px rgba(87, 23, 52, 0.22);
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.badge {
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    padding: 0 6px;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
}

.hidden {
    display: none !important;
}

@keyframes pulseDots {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.45;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@keyframes previewSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes notificationPulse {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

@media (max-width: 1080px) {
    .romance-login-page .login-layout,
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        gap: 16px;
    }

    .top-actions {
        justify-content: flex-start;
    }

    .board-banner-actions {
        justify-content: space-between;
    }

    .preview-body {
        grid-template-columns: 1fr;
    }

    .preview-side-blank {
        display: none;
    }
}

@media (max-width: 720px) {
    .romance-login-page .login-layout,
    .board-shell {
        width: min(100%, calc(100% - 20px));
        padding: 10px 0 24px;
    }

    .romance-login-page .login-layout {
        padding: 14px;
    }

    .login-intro,
    .login-card,
    .hero-copy,
    .feed-placeholder,
    .message-card,
    .modal-panel,
    .drawer-panel {
        padding: 20px;
        border-radius: 22px;
    }

    .summary-stage {
        top: 80px;
        left: 8px;
    }

    .message-head,
    .reply-head,
    .composer-row {
        flex-direction: column;
    }

    .message-user {
        align-items: flex-start;
    }

    .topbar {
        padding: 16px 18px;
    }

    .simple-nav {
        top: 8px;
        left: 8px;
        right: 8px;
        padding: 7px 10px;
        border-radius: 18px;
    }

    .top-actions {
        gap: 6px;
    }

    .summary-toggle {
        min-height: 38px;
        width: 38px;
    }

    .summary-stack {
        width: 192px;
    }

    .content-stream.count-2,
    .content-stream.count-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-stream.count-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .content-stream.count-5plus {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .content-stream.count-1 {
        grid-template-columns: minmax(0, 1fr);
    }

    .message-card {
        padding: 18px;
    }

    .reply-thread {
        padding-left: 0;
    }

    .preview-panel {
        padding: 8px;
    }

    .preview-stage-inner {
        min-height: min(320px, calc(100dvh - 76px));
        height: min(calc(100dvh - 76px), 640px);
    }

    .preview-nav {
        width: 44px;
        height: 44px;
    }

    .brand-mark {
        width: 46px;
        height: 46px;
    }

    .board-banner-actions {
        justify-content: flex-end;
        flex-wrap: nowrap;
        width: auto;
        min-width: max-content;
    }

    .board-logout {
        width: auto;
        justify-content: space-between;
    }

    .compose-fab {
        width: 56px;
        height: 56px;
        right: 14px;
        bottom: 14px;
    }

    .summary-stack {
        width: 184px;
    }

    .content-stream,
    .reply-card .content-stream {
        width: min(72vw, 420px);
        max-width: 72%;
    }

    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(76px, 76px));
    }

    .preview-item {
        width: 76px;
        height: 76px;
    }

    .preview-audio-mark {
        width: 38px;
        height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
