:root {
    color-scheme: dark;
    --text: #fff3ec;
    --muted: #e4bdb3;
    --panel-text: #2a1118;
    --panel-muted: #72535d;
    --surface: rgba(255, 239, 232, 0.9);
    --surface-strong: #fff7f1;
    --accent: #c63454;
    --accent-dark: #8b1631;
    --accent-glow: rgba(255, 91, 123, 0.42);
    --line: rgba(255, 202, 190, 0.34);
    --focus: #ffd0b8;
    --shadow: 0 30px 90px rgba(9, 0, 5, 0.48);
}

* {
    box-sizing: border-box;
}

html,
body,
#app {
    min-height: 100%;
}

body,
input,
select,
textarea,
button {
    font: inherit;
    font-size: 1rem;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Verdana, sans-serif;
    color: var(--text);
    background:
        linear-gradient(115deg, rgba(10, 0, 7, 0.9) 0%, rgba(38, 5, 20, 0.82) 42%, rgba(87, 9, 31, 0.56) 100%),
        url("../assets/intimdate-sensual-background.png") center / cover no-repeat,
        #16030c;
    background-attachment: fixed;
}

.splash-page {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 96px 20px 32px;
    overflow: hidden;
}

.splash-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 18% 28%, rgba(255, 92, 126, 0.22), transparent 30rem),
        radial-gradient(circle at 84% 78%, rgba(174, 49, 79, 0.22), transparent 28rem),
        linear-gradient(180deg, rgba(8, 0, 6, 0.2), rgba(8, 0, 6, 0.72));
    pointer-events: none;
}

.splash {
    position: relative;
    z-index: 1;
    width: min(100%, 960px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 48px;
    align-items: center;
}

.intro {
    max-width: 590px;
}

.eyebrow {
    margin: 0 0 16px;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #ffc2b1;
}

h1 {
    margin: 0;
    font-size: clamp(3rem, 8vw, 5.5rem);
    line-height: 0.95;
    letter-spacing: 0;
}

.lead {
    margin: 28px 0 0;
    max-width: 52ch;
    color: var(--muted);
    font-size: clamp(1.08rem, 2.5vw, 1.3rem);
    line-height: 1.65;
}

.form-panel {
    width: 100%;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--panel-text);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px) saturate(130%);
}

.form-panel h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
    line-height: 1.25;
}

.form-panel p {
    margin: 0;
    color: var(--panel-muted);
    line-height: 1.55;
}

form {
    margin-top: 24px;
    display: grid;
    gap: 18px;
}

label {
    display: block;
    font-weight: 700;
}

.field-label {
    margin-bottom: 8px;
    font-size: 0.96rem;
}

input[type="email"],
input[type="text"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
.email-input,
select,
textarea {
    width: 100%;
    min-height: 52px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--panel-text);
    background: var(--surface-strong);
    color-scheme: light;
    outline: none;
}

main[tabindex="-1"]:focus {
    outline: none;
}

input[type="email"]:not(:placeholder-shown),
input[type="text"]:not(:placeholder-shown),
input[type="number"],
input[type="tel"]:not(:placeholder-shown),
input[type="url"]:not(:placeholder-shown),
input[type="search"]:not(:placeholder-shown),
.email-input:not(:placeholder-shown),
select,
textarea:not(:placeholder-shown) {
    color: var(--panel-text);
    background: var(--surface-strong);
}

input[type="checkbox"],
input[type="radio"] {
    color-scheme: light;
    background-color: var(--surface-strong);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--panel-text);
    caret-color: var(--panel-text);
    box-shadow: 0 0 0 1000px var(--surface-strong) inset;
    transition: background-color 9999s ease-out;
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
.email-input:focus,
select:focus,
textarea:focus,
input[type="checkbox"]:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(255, 208, 184, 0.5);
    outline-offset: 2px;
    border-color: var(--focus);
}

.beta-option {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.beta-option:has(input:checked) {
    border-color: rgba(198, 52, 84, 0.72);
    background: #ffe8e4;
}

.beta-option input {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    margin: 1px 0 0;
    border: 2px solid #8a5f69;
    border-radius: 5px;
    background-color: var(--surface-strong);
    accent-color: var(--accent);
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.beta-option:hover input {
    border-color: var(--accent-dark);
}

.beta-option input:focus-visible {
    border-color: var(--accent-dark);
    box-shadow: 0 0 0 3px rgba(255, 208, 184, 0.55);
}

.beta-option input:checked {
    border-color: var(--accent);
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='none' stroke='white' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round' d='M3 7.2l2.4 2.4L11 4.1'/%3E%3C/svg%3E") center / 14px 14px no-repeat,
        linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.beta-option span {
    display: block;
    color: var(--panel-muted);
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 1.45;
}

button {
    min-height: 54px;
    border: 0;
    border-radius: 8px;
    padding: 14px 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 16px 34px var(--accent-glow);
    transition: box-shadow 160ms ease, transform 160ms ease;
}

button:hover {
    box-shadow: 0 20px 44px rgba(255, 91, 123, 0.48);
    transform: translateY(-1px);
}

.button-link {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 14px 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 16px 34px var(--accent-glow);
}

.inline-link {
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

button.inline-link {
    min-height: 0;
    border-radius: 0;
    padding: 0;
    color: var(--accent-dark);
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-weight: 800;
}

button.inline-link:hover {
    box-shadow: none;
    transform: none;
}

.register-login-link {
    margin-top: 24px;
}

.note,
.form-status,
.validation-message {
    font-size: 0.9rem;
}

button:disabled {
    cursor: wait;
    opacity: 0.78;
    transform: none;
}

.svg-icon-definitions {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.svg-icon {
    width: 24px;
    height: 24px;
    display: block;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.validation-message,
.form-status.error {
    color: #9b1934;
    font-weight: 700;
}

.form-status.success {
    color: #315f38;
    font-weight: 700;
}

.feed-page {
    place-items: start center;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
}

.feed-page::-webkit-scrollbar {
    display: none;
}

.feed-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 1040px);
    display: grid;
    gap: 28px;
}

.feed-header {
    padding-top: 20px;
}

.feed-header h1 {
    font-size: clamp(2.6rem, 7vw, 5.2rem);
}

.app-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    min-height: 72px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 202, 190, 0.24);
    background: rgba(22, 3, 12, 0.78);
    backdrop-filter: blur(18px) saturate(130%);
    box-shadow: 0 18px 48px rgba(9, 0, 5, 0.22);
}

.app-toolbar-inner {
    width: min(100%, 1040px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.app-toolbar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-icon-button {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 202, 190, 0.42);
    border-radius: 999px;
    background: rgba(255, 247, 241, 0.9);
    box-shadow: 0 14px 36px rgba(9, 0, 5, 0.28);
}

.toolbar-icon-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 42px rgba(9, 0, 5, 0.34);
}

.toolbar-icon {
    color: var(--accent-dark);
    stroke-width: 2.4;
}

.profile-menu {
    position: relative;
}

.profile-button {
    position: relative;
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 202, 190, 0.42);
    border-radius: 999px;
    padding: 0;
    background: rgba(255, 247, 241, 0.9);
    box-shadow: 0 14px 36px rgba(9, 0, 5, 0.28);
    color: var(--panel-text);
    overflow: hidden;
}

.profile-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 42px rgba(9, 0, 5, 0.34);
}

.profile-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-dark);
    stroke-width: 2.2;
}

.profile-button-photo {
    position: absolute;
    inset: -1px;
    width: 48px;
    height: 48px;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 168px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
    box-shadow: 0 18px 50px rgba(9, 0, 5, 0.28);
}

.profile-dropdown-item {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--panel-text);
    background: transparent;
    box-shadow: none;
    text-align: left;
    font-weight: 700;
}

.profile-dropdown-link {
    text-decoration: none;
}

.profile-dropdown-item:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: none;
    transform: none;
}

.feed-grid {
    width: min(100%, 650px);
    justify-self: center;
    display: grid;
    gap: 22px;
    align-items: start;
}

.feed-panel {
    display: grid;
    gap: 18px;
}

.composer-panel {
    position: static;
}

.form-panel.composer-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.post-composer-form {
    margin-top: 0;
    gap: 10px;
}

.post-compose-surface {
    display: grid;
    gap: 2px;
    padding: 0 8px;
    border-radius: 8px;
    background: rgba(255, 247, 241, 0.98);
    box-shadow: 0 14px 34px rgba(9, 0, 5, 0.22);
}

.post-compose-surface.expanded {
    padding-bottom: 8px;
}

.post-input {
    min-height: 48px;
    height: 48px;
    padding: 13px 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
    resize: none;
    overflow: hidden;
}

.post-compose-surface.expanded .post-input {
    min-height: 132px;
    height: auto;
    padding-bottom: 8px;
    resize: vertical;
    overflow: auto;
}

.post-image-preview {
    width: 100%;
    max-height: 360px;
    display: block;
    object-fit: contain;
    background: rgba(255, 247, 241, 0.86);
    box-shadow: 0 14px 34px rgba(9, 0, 5, 0.18);
}

.post-image-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.image-upload {
    position: relative;
    display: inline-flex;
}

.image-upload-input {
    width: 1px;
    height: 1px;
    position: absolute;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.post-image-input {
    width: 1px;
    height: 1px;
    position: absolute;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.post-image-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    padding: 0;
    color: var(--accent-dark);
    background: transparent;
    cursor: pointer;
    box-shadow: none;
}

.post-image-button:hover,
.post-image-button:focus-visible {
    color: var(--accent);
    background: transparent;
    box-shadow: none;
    transform: none;
}

.post-image-icon {
    width: 22px;
    height: 22px;
}

.post-image-remove {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
}

.post-image-name {
    min-width: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.post-composer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.post-submit-button {
    width: 100%;
}

.post-cancel-button {
    min-width: 92px;
    padding-inline: 14px;
}

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

.feed-post {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--panel-text);
    background: rgba(255, 247, 241, 0.9);
    box-shadow: 0 18px 50px rgba(9, 0, 5, 0.28);
    backdrop-filter: blur(14px) saturate(125%);
}

.feed-post-clickable {
    cursor: pointer;
}

.feed-post-clickable:hover,
.feed-post-clickable:focus-visible {
    border-color: rgba(255, 202, 190, 0.62);
    box-shadow: 0 22px 58px rgba(9, 0, 5, 0.34);
    outline: none;
}

.feed-post p {
    margin: 14px 0 0;
    color: var(--panel-text);
    font-size: 1.08rem;
    line-height: 1.58;
    white-space: pre-line;
}

.post-image {
    width: calc(100% + 44px);
    max-width: none;
    height: auto;
    display: block;
    border-radius: 0;
    object-fit: contain;
    background: rgba(255, 239, 232, 0.68);
}

.post-image-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.post-image-feed {
    margin: 14px -22px 0;
}

.post-summary {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--panel-muted);
    font-size: 0.94rem;
    font-weight: 400;
}

.comment-summary {
    justify-content: flex-start;
}

.like-button {
    display: inline-flex;
    align-items: center;
    gap: 4.8px;
    min-height: 36px;
    min-width: 0;
    margin-left: -2px;
    padding: 6px 9px 6px 0;
    border: 0;
    border-radius: 999px;
    color: var(--panel-muted);
    background: transparent;
    box-shadow: none;
    font-size: 0.95rem;
    font-weight: 400;
}

.like-button:hover,
.like-button:focus-visible {
    color: var(--accent-dark);
    background: transparent;
    box-shadow: none;
    transform: none;
}

.like-button.liked {
    color: var(--accent-dark);
    background: transparent;
}

.like-icon {
    width: 1.45em;
    height: 1.45em;
}

.like-button.liked .like-icon {
    fill: currentColor;
}

.post-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.post-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.follow-button {
    min-height: 34px;
    padding: 6px 14px;
    border: 1px solid rgba(139, 22, 49, 0.48);
    border-radius: 999px;
    color: var(--accent-dark);
    background: transparent;
    box-shadow: none;
    font-size: 0.92rem;
    font-weight: 800;
}

.follow-button:hover,
.follow-button:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(139, 22, 49, 0.08);
    box-shadow: none;
    transform: none;
}

.profile-follow-button {
    justify-self: start;
}

.post-meta {
    display: block;
    align-items: center;
    color: var(--panel-muted);
    font-size: 0.92rem;
}

.post-meta strong {
    color: var(--panel-text);
}

.post-author,
.post-author-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--panel-text);
    font-weight: 800;
}

.post-author-copy {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 60px;
}

.post-date {
    color: var(--panel-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.post-author-link {
    text-decoration-color: rgba(139, 22, 49, 0.35);
    text-underline-offset: 3px;
}

.post-author-link:hover {
    color: var(--accent-dark);
}

.post-author-photo {
    width: 60px;
    min-width: 60px;
    height: 60px;
    border: 2px solid rgba(139, 22, 49, 0.18);
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 239, 232, 0.94);
    box-shadow: 0 10px 24px rgba(9, 0, 5, 0.16);
}

.post-author-photo-placeholder {
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    font-size: 1.7rem;
    line-height: 1;
}

.item-context-menu {
    position: relative;
    flex: 0 0 auto;
}

.ellipsis-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    padding: 0;
    color: var(--accent-dark);
    background: transparent;
    cursor: pointer;
    box-shadow: none;
}

.ellipsis-button:hover,
.ellipsis-button:focus-visible {
    color: var(--accent);
    background: transparent;
    box-shadow: none;
    transform: none;
}

.ellipsis-button .svg-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
    stroke: none;
}

.context-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 8;
    min-width: 118px;
    padding: 6px;
    border: 1px solid rgba(139, 22, 49, 0.16);
    border-radius: 8px;
    background: rgba(255, 247, 241, 0.98);
    box-shadow: 0 18px 44px rgba(9, 0, 5, 0.22);
}

.context-menu-item {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--panel-text);
    box-shadow: none;
    text-align: left;
    font-size: 0.95rem;
}

.context-menu-item:hover {
    background: rgba(139, 22, 49, 0.1);
    box-shadow: none;
    transform: none;
}

.context-menu-item.danger {
    color: var(--accent-dark);
}

.post-popover-page {
    position: fixed;
    inset: 0;
    z-index: 40;
    height: 100vh;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 68px 20px 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(8, 0, 6, 0.78), rgba(8, 0, 6, 0.94)),
        rgba(22, 3, 12, 0.96);
}

.post-popover-shell {
    width: min(100%, 650px);
    margin: 0 auto;
    display: grid;
    place-items: start center;
    gap: 22px;
    align-content: start;
    overflow-y: auto;
    padding-bottom: 8px;
    padding-top: 6px;
    scrollbar-width: none;
}

.post-popover-shell::-webkit-scrollbar {
    display: none;
}

.post-popover-toolbar {
    z-index: 42;
}

.post-popover-toolbar-inner {
    justify-content: flex-end;
}

.feed-post-detail {
    width: 100%;
    padding: 15px;
}

.feed-post-detail .post-author,
.feed-post-detail .post-author-link {
    gap: 18px;
    font-size: 1.16rem;
}

.feed-post-detail .post-author-copy {
    gap: 6px;
}

.feed-post-detail .post-date {
    font-size: 1rem;
}

.feed-post-detail p {
    margin-top: 28px;
    font-size: 1.28rem;
    line-height: 1.72;
}

.post-image-detail {
    width: calc(100% + 30px);
    margin: 28px -15px 0;
}

.image-popover-page {
    grid-template-rows: minmax(0, 1fr);
    padding-left: 0;
    padding-right: 0;
}

.image-popover-shell {
    width: 100vw;
    height: 100%;
    place-items: center;
    align-content: center;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 20px;
}

.image-popover-image {
    max-width: 100%;
    max-height: calc(100vh - 112px);
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    background: rgba(255, 239, 232, 0.2);
}

.post-comments {
    width: 100%;
    display: grid;
    align-content: start;
    gap: 16px;
    color: var(--text);
}

.post-comments h2 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.25;
}

.form-panel.comment-composer {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.comment-composer form {
    margin-top: 4px;
    display: grid;
    gap: 8px;
}

.comment-field {
    position: relative;
}

.comment-input {
    min-height: 92px;
    padding: 0px 50px 0px 8px;
    border: 10px solid rgba(255, 247, 241, 0.82);
    background: rgba(255, 247, 241, 0.98);
    box-shadow: 0 14px 34px rgba(9, 0, 5, 0.22);
    resize: vertical;
}

.comment-submit-button {
    position: absolute;
    right: 22px;
    bottom: 22px;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 10px 22px rgba(139, 22, 49, 0.28);
}

.comment-submit-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(139, 22, 49, 0.36);
}

.comment-submit-button:disabled {
    cursor: wait;
    opacity: 0.68;
}

.comment-submit-button .svg-icon {
    width: 18px;
    height: 18px;
    color: #ffffff;
    fill: #ffffff;
    stroke-width: 2.2;
}

.post-comment-dock {
    width: min(100%, 650px);
    margin: 0 auto;
    padding: 6px 0;
    background:
        linear-gradient(180deg, rgba(22, 3, 12, 0), rgba(22, 3, 12, 0.72) 16%),
        transparent;
}

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

.comment-item {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--panel-text);
    background: rgba(255, 247, 241, 0.9);
    box-shadow: 0 14px 36px rgba(9, 0, 5, 0.22);
}

.comment-item p {
    margin: 14px 0 0;
    color: var(--panel-text);
    font-size: 1.06rem;
    line-height: 1.62;
    white-space: pre-line;
}

.comment-author-photo {
    width: 46px;
    min-width: 46px;
    height: 46px;
}

.comment-author-photo.post-author-photo-placeholder {
    font-size: 1.2rem;
}

.comments-empty {
    margin: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--panel-text);
    background: rgba(255, 247, 241, 0.84);
}

.post-popover-close {
    padding: 0;
    cursor: pointer;
}

.post-popover-close .svg-icon {
    width: 24px;
    height: 24px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.profile-page {
    place-items: start center;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
}

.profile-page::-webkit-scrollbar {
    display: none;
}

.profile-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 1040px);
    display: grid;
    gap: 24px;
}

.profile-header {
    padding-top: 20px;
}

.profile-header h1 {
    font-size: clamp(2.6rem, 7vw, 5.2rem);
}

.back-link {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--text);
    font-weight: 800;
    text-decoration-color: rgba(255, 194, 177, 0.45);
    text-underline-offset: 4px;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 28px;
    align-items: start;
}

.profile-posts {
    width: min(100%, 650px);
    justify-self: end;
    display: grid;
    gap: 16px;
}

.profile-content {
    min-width: 0;
    display: grid;
    gap: 16px;
}

.profile-content .profile-posts {
    width: 100%;
    justify-self: stretch;
}

.profile-photo-panel {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 12px;
}

.profile-photo-frame {
    position: relative;
    width: 150px;
    height: 150px;
    overflow: visible;
}

.profile-photo-frame.editable {
    margin-bottom: 0;
}

.profile-photo {
    width: 150px;
    height: 150px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(198, 52, 84, 0.95), rgba(139, 22, 49, 0.95)),
        var(--surface-strong);
    box-shadow: var(--shadow);
    object-fit: cover;
    overflow: hidden;
}

.profile-photo-button {
    width: 150px;
    min-width: 150px;
    height: 150px;
    min-height: 150px;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
}

.profile-photo-button:hover,
.profile-photo-button:focus-visible {
    box-shadow: 0 20px 56px rgba(9, 0, 5, 0.38);
    transform: translateY(-1px);
}

.profile-photo-placeholder {
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 900;
}

.profile-photo-controls {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.profile-photo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.profile-photo-icon-button {
    position: absolute;
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(139, 22, 49, 0.24);
    border-radius: 999px;
    color: var(--accent-dark);
    background: rgba(255, 247, 241, 0.78);
    box-shadow: 0 10px 22px rgba(9, 0, 5, 0.2);
    cursor: pointer;
    pointer-events: auto;
}

.profile-photo-upload-button {
    right: -23px;
    bottom: 31px;
}

.profile-photo-upload {
    position: static;
    pointer-events: auto;
}

.profile-photo-upload .profile-photo-icon-button {
    position: absolute;
}

.profile-photo-focus-button {
    right: -26px;
    top: 43px;
}

.profile-photo-delete-button {
    right: -1px;
    bottom: -4px;
}

.profile-photo-icon-button:hover,
.profile-photo-icon-button:focus-visible {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 91, 123, 0.9), rgba(139, 22, 49, 0.9));
    box-shadow: 0 12px 26px rgba(255, 91, 123, 0.28);
    transform: translateY(-1px);
}

.profile-photo-icon-button:disabled,
.profile-photo-icon-button.disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
}

.profile-camera-icon {
    width: 20px;
    height: 20px;
}

.profile-trash-icon {
    width: 19px;
    height: 19px;
}

.profile-crosshair-icon {
    width: 20px;
    height: 20px;
}

.profile-photo-name {
    margin: 0;
    max-width: 100%;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
}

.profile-photo-status {
    width: 100%;
    margin-top: 0;
}

.profile-panel h1 {
    color: var(--panel-text);
    font-size: 2rem;
}

.profile-details {
    margin: 0;
    display: grid;
    gap: 16px;
}

.profile-details div {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(114, 83, 93, 0.2);
}

.profile-details div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.profile-details dt {
    margin: 0 0 4px;
    color: var(--panel-muted);
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-details dd {
    margin: 0;
    color: var(--panel-text);
    font-size: 1.06rem;
    font-weight: normal;
}

.profile-detail-task dd {
    display: grid;
    gap: 10px;
    white-space: pre-line;
}

.profile-details > div:has(.profile-edit-button) {
    position: relative;
    padding-right: 48px;
}

.profile-empty-value {
    color: var(--panel-muted);
    font-weight: 600;
}

.profile-detail-value {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.profile-details > div:has(.profile-edit-button) .profile-detail-value {
    display: block;
}

.profile-detail-value > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile-edit-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    display: inline-grid;
    place-items: center;
    justify-self: end;
    padding: 0;
    border: 1px solid rgba(139, 22, 49, 0.22);
    border-radius: 999px;
    color: var(--accent-dark);
    background: var(--surface-strong);
    box-shadow: none;
}

.profile-details > div .profile-edit-button {
    position: absolute;
    top: 0;
    right: 0;
}

.profile-edit-button:hover,
.profile-edit-button:focus-visible {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 12px 26px rgba(255, 91, 123, 0.28);
    transform: translateY(-1px);
}

.profile-edit-icon {
    width: 18px;
    height: 18px;
}

.profile-field-editor {
    margin-top: 0;
    display: grid;
    gap: 12px;
}

.profile-field-editor textarea {
    resize: vertical;
}

.profile-field-editor-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-field-editor-actions button {
    min-height: 40px;
    padding: 8px 14px;
}

.profile-birth-date-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.profile-birth-date-grid label {
    display: grid;
    gap: 6px;
    color: var(--panel-muted);
    font-size: 0.9rem;
}

.profile-birth-date-grid span {
    font-weight: 800;
}

.profile-birth-date-grid input[type="number"] {
    min-width: 0;
    padding-inline: 10px;
}

.profile-field-status {
    margin-top: 16px;
}

.profile-actions {
    margin-top: 24px;
    display: grid;
    gap: 14px;
}

.profile-actions input[type="file"] {
    width: 100%;
    min-height: 52px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--panel-text);
    background: var(--surface-strong);
    color-scheme: light;
}

.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    padding: 4px;
    border: 1px solid rgba(139, 22, 49, 0.18);
    border-radius: 8px;
    background: rgba(255, 247, 241, 0.9);
    box-shadow: 0 14px 36px rgba(9, 0, 5, 0.18);
}

.profile-tab {
    flex: 1 1 0;
    min-width: fit-content;
    min-height: 38px;
    padding: 8px 18px;
    border: 0;
    border-radius: 6px;
    color: var(--panel-muted);
    background: transparent;
    box-shadow: none;
    font-size: 0.96rem;
    font-weight: 900;
}

.profile-tab:hover,
.profile-tab:focus-visible {
    color: var(--accent-dark);
    background: rgba(139, 22, 49, 0.08);
    box-shadow: none;
    transform: none;
}

.profile-tab.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.following-section {
    display: grid;
    gap: 16px;
}

.profile-search-page {
    place-items: start center;
}

.profile-search-page .profile-shell {
    width: min(100%, 760px);
    display: block;
}

.profile-search-panel {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.profile-search-panel h1 {
    color: var(--panel-text);
    font-size: 1.35rem;
    line-height: 1.15;
}

.profile-search-form {
    display: block;
    margin-top: 0;
}

.profile-search-field {
    display: block;
}

.profile-search-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.profile-search-input-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.profile-search-submit {
    display: inline-flex;
    flex: 0 0 52px;
    width: 52px;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 202, 190, 0.42);
    border-radius: 999px;
    padding: 0;
    background: rgba(255, 247, 241, 0.9);
}

.profile-search-results {
    color: var(--text);
    margin-top: 12px;
}

.following-section h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1.25;
}

.following-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}

.following-card {
    position: relative;
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--panel-text);
    background: rgba(255, 247, 241, 0.9);
    box-shadow: 0 14px 36px rgba(9, 0, 5, 0.22);
    text-align: center;
}

.following-card-link {
    width: 100%;
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 0;
    color: inherit;
    text-decoration: none;
}

.following-card:hover,
.following-card:focus-visible {
    border-color: rgba(255, 202, 190, 0.62);
    color: var(--accent-dark);
    outline: none;
    box-shadow: 0 18px 44px rgba(9, 0, 5, 0.3);
}

.following-card:has(.following-card-remove:hover),
.following-card:has(.following-card-remove:focus-visible) {
    border-color: var(--line);
    color: var(--panel-text);
}

.following-card-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    object-fit: cover;
    background: rgba(255, 239, 232, 0.94);
    box-shadow: none;
    overflow: hidden;
}

.following-card-photo-placeholder {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
}

.following-card-name {
    max-width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.following-card-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(139, 22, 49, 0.24);
    border-radius: 999px;
    color: var(--accent-dark);
    background: rgba(255, 247, 241, 0.78);
    box-shadow: 0 10px 22px rgba(9, 0, 5, 0.2);
    cursor: pointer;
}

.following-card-remove:hover,
.following-card-remove:focus-visible {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 91, 123, 0.9), rgba(139, 22, 49, 0.9));
    box-shadow: 0 12px 26px rgba(255, 91, 123, 0.28);
    transform: translateY(-1px);
}

.following-card-remove .svg-icon {
    width: 14px;
    height: 14px;
}

.secondary-button {
    color: var(--accent-dark);
    background: var(--surface-strong);
    border: 1px solid rgba(139, 22, 49, 0.22);
    box-shadow: none;
}

.secondary-button:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 16px 34px var(--accent-glow);
}

.app-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    padding: 16px;
    overflow-y: auto;
    background: rgba(9, 0, 5, 0.62);
    backdrop-filter: blur(8px);
}

.app-dialog {
    width: min(100%, 420px);
    margin: auto;
    display: grid;
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--panel-text);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.app-dialog h2 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
}

.app-dialog p {
    margin: 0;
    color: var(--panel-muted);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.app-dialog-actions {
    display: flex;
    justify-content: end;
    gap: 10px;
    flex-wrap: wrap;
}

.app-dialog-actions button {
    min-width: 104px;
}

.app-error-boundary {
    min-height: 100vh;
}

.profile-photo-focus-dialog {
    width: min(100%, 420px);
}

.profile-photo-focus-preview {
    position: relative;
    width: min(100%, 280px);
    aspect-ratio: 1 / 1;
    justify-self: center;
    display: block;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 14px 36px rgba(9, 0, 5, 0.22);
    cursor: default;
    user-select: none;
    touch-action: none;
}

.profile-photo-focus-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    pointer-events: none;
}

.profile-photo-focus-preview.adjusting {
    cursor: grab;
    outline: 3px solid rgba(255, 91, 123, 0.42);
    outline-offset: 4px;
}

.profile-photo-focus-preview.dragging {
    cursor: grabbing;
}

.app-toast-host {
    position: fixed;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 1100;
    width: min(calc(100% - 32px), 440px);
    transform: translateX(-50%);
    pointer-events: none;
}

.app-toast {
    padding: 13px 18px;
    border: 1px solid rgba(255, 208, 184, 0.72);
    border-radius: 8px;
    color: #ffffff;
    background:
        linear-gradient(135deg, #ff5b7b 0%, #c63454 48%, #8b1631 100%);
    box-shadow:
        0 18px 44px rgba(9, 0, 5, 0.36),
        0 0 0 4px rgba(255, 208, 184, 0.16),
        0 0 34px rgba(255, 91, 123, 0.52);
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    text-shadow: 0 1px 1px rgba(9, 0, 5, 0.34);
    animation: toast-slide-up 0.4s ease-out both;
}

.app-toast.hiding {
    animation: toast-fade-out 0.4s ease-in both;
}

@keyframes toast-slide-up {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toast-fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@media (max-width: 760px) {
    body {
        background-attachment: scroll;
    }

    .splash-page {
        place-items: stretch;
        padding: 88px 16px 24px;
    }

    .app-toolbar {
        min-height: 64px;
        padding: 8px 16px;
    }

    .splash {
        min-height: calc(100vh - 48px);
        grid-template-columns: 1fr;
        gap: 34px;
        align-content: center;
    }

    .login-splash {
        align-content: start;
    }

    .intro {
        max-width: none;
    }

    .lead {
        margin-top: 22px;
    }

    .form-panel {
        padding: 22px;
    }

    .profile-page {
        place-items: start center;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 24px;
    }

    .profile-photo-panel {
        justify-self: center;
    }

    .post-meta {
        display: grid;
        justify-items: start;
        gap: 10px;
    }
}

@media (max-width: 420px) {
    .splash-page {
        padding: 84px 12px 18px;
    }

    .splash {
        min-height: calc(100vh - 36px);
    }

    .form-panel {
        padding: 18px;
    }
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fff7f1;
    bottom: 0;
    box-shadow: 0 -1px 18px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
    color: var(--panel-text);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: rgba(255, 243, 236, 0.2);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--accent);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Loading");
}
