:root {
    color-scheme: light;
}

.dark {
    color-scheme: dark;
    --color-primary: #7ed1c5;
    --color-primary-strong: #98ded4;
    --color-primary-soft: #17302c;
    --color-page: #0c0e0d;
    --color-surface: #111413;
    --color-surface-raised: #171a19;
    --color-surface-muted: #1c201e;
    --color-text: #e9ecea;
    --color-text-secondary: #a7ada9;
    --color-text-muted: #747b77;
    --color-border: #282d2a;
    --color-border-strong: #363c38;
    --color-overlay: rgba(0, 0, 0, 0.88);
    --color-danger: #ff817a;
    --shadow-float: 0 18px 54px rgba(0, 0, 0, 0.34);
    --shadow-menu: 0 10px 30px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--color-page);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-page);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: var(--color-primary-soft);
    color: var(--color-text);
}

.app-shell {
    min-height: 100dvh;
}

.page-column {
    min-height: 100dvh;
    background: var(--color-surface);
}

.pull-refresh {
    display: none;
}

@media (max-width: 767px) {
    html.pull-refresh-enabled,
    html.pull-refresh-enabled body {
        overscroll-behavior-y: none;
    }

    .pull-refresh-enabled .pull-refresh {
        display: flex;
        height: 0;
        align-items: center;
        justify-content: center;
        gap: 9px;
        overflow: hidden;
        color: var(--color-text-muted);
        font-size: 12px;
        line-height: 1;
        will-change: height;
    }

    .pull-refresh.is-animated {
        transition: height 220ms ease;
    }

    .pull-refresh-indicator {
        position: relative;
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        transition: transform 180ms ease;
    }

    .pull-refresh-indicator::before,
    .pull-refresh-indicator::after {
        position: absolute;
        content: '';
    }

    .pull-refresh-indicator::before {
        top: 4px;
        left: 8px;
        width: 2px;
        height: 7px;
        border-radius: 999px;
        background: currentColor;
    }

    .pull-refresh-indicator::after {
        top: 8px;
        left: 6px;
        width: 6px;
        height: 6px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
    }

    .pull-refresh.is-ready .pull-refresh-indicator {
        color: var(--color-primary-strong);
        transform: rotate(180deg);
    }

    .pull-refresh.is-refreshing .pull-refresh-indicator {
        border: 1.5px solid currentColor;
        border-right-color: transparent;
        border-radius: 50%;
        color: var(--color-primary-strong);
        animation: pull-refresh-spin 720ms linear infinite;
    }

    .pull-refresh.is-refreshing .pull-refresh-indicator::before,
    .pull-refresh.is-refreshing .pull-refresh-indicator::after {
        display: none;
    }

    .pull-refresh.is-error {
        color: var(--color-danger);
    }

    .pull-refresh.is-error .pull-refresh-indicator::before {
        top: 3px;
        left: 8px;
        height: 7px;
    }

    .pull-refresh.is-error .pull-refresh-indicator::after {
        top: 12px;
        left: 8px;
        width: 2px;
        height: 2px;
        border: 0;
        border-radius: 50%;
        background: currentColor;
        transform: none;
    }
}

@keyframes pull-refresh-spin {
    to { transform: rotate(360deg); }
}

@media (min-width: 768px) {
    body {
        background:
            radial-gradient(ellipse at 8% 6%, color-mix(in srgb, var(--color-primary) 16%, transparent), transparent 38rem),
            radial-gradient(ellipse at 92% 18%, color-mix(in srgb, var(--color-primary) 9%, transparent), transparent 34rem),
            linear-gradient(145deg, color-mix(in srgb, var(--color-primary-soft) 58%, var(--color-page)) 0%, var(--color-page) 48%, color-mix(in srgb, var(--color-primary) 7%, var(--color-page)) 100%);
        background-attachment: fixed;
    }

    .dark body {
        background:
            radial-gradient(ellipse at 8% 4%, color-mix(in srgb, var(--color-primary) 18%, transparent), transparent 40rem),
            radial-gradient(ellipse at 92% 20%, color-mix(in srgb, var(--color-primary-strong) 11%, transparent), transparent 36rem),
            linear-gradient(145deg, color-mix(in srgb, var(--color-primary-soft) 52%, var(--color-surface-muted)) 0%, var(--color-surface-raised) 50%, color-mix(in srgb, var(--color-primary-soft) 38%, var(--color-surface-muted)) 100%);
    }
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--color-primary);
    color: #ffffff;
    font-family: "Songti SC", "STSong", serif;
    font-size: 21px;
    font-weight: 700;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--color-primary) 26%, transparent);
}

.profile-cover {
    position: relative;
    isolation: isolate;
    height: clamp(230px, 58vw, 320px);
    overflow: hidden;
    background: #b9e6e3;
}

.profile-cover-default,
.about-cover-default {
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: hidden;
    background:
        linear-gradient(108deg, #ffd2df 0%, #f6d7e2 31%, #cce5e8 58%, #8ce2dc 100%);
}

.profile-cover-default::before,
.about-cover-default::before {
    position: absolute;
    inset: -14%;
    background:
        radial-gradient(ellipse at 8% 30%, rgba(255, 170, 199, 0.68) 0 16%, transparent 42%),
        radial-gradient(ellipse at 36% 2%, rgba(255, 235, 239, 0.86) 0 13%, transparent 36%),
        radial-gradient(ellipse at 50% 76%, rgba(244, 207, 222, 0.46) 0 15%, transparent 40%),
        radial-gradient(ellipse at 72% 18%, rgba(209, 239, 241, 0.72) 0 18%, transparent 43%),
        radial-gradient(ellipse at 96% 78%, rgba(75, 216, 207, 0.44) 0 18%, transparent 43%);
    content: "";
    filter: blur(24px);
    transform: scale(1.06);
}

.profile-cover-default::after,
.about-cover-default::after {
    position: absolute;
    inset: -8%;
    background:
        radial-gradient(ellipse at 12% 92%, rgba(244, 160, 192, 0.2) 0 15%, transparent 34%),
        radial-gradient(ellipse at 45% 108%, rgba(255, 255, 255, 0.36) 0 18%, transparent 42%),
        radial-gradient(ellipse at 88% 15%, rgba(255, 255, 255, 0.2) 0 12%, transparent 32%),
        radial-gradient(ellipse at 78% 86%, rgba(76, 209, 204, 0.2) 0 18%, transparent 40%);
    content: "";
    filter: blur(15px);
    mix-blend-mode: soft-light;
}

.about-cover {
    isolation: isolate;
    background: #b9e6e3;
}

.about-cover-default {
    z-index: 0;
}

.about-cover-image {
    position: relative;
    z-index: 1;
}

.about-cover-shade {
    z-index: 2;
}

.about-cover-content {
    z-index: 3;
}

.default-cover-preview {
    background:
        radial-gradient(ellipse at 8% 30%, rgba(255, 170, 199, 0.46) 0 16%, transparent 42%),
        radial-gradient(ellipse at 72% 18%, rgba(209, 239, 241, 0.56) 0 18%, transparent 43%),
        linear-gradient(108deg, #ffd2df 0%, #f6d7e2 31%, #cce5e8 58%, #8ce2dc 100%);
}

.profile-cover::after {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(12, 20, 17, 0.04) 34%, rgba(8, 14, 12, 0.62) 100%);
    content: "";
    pointer-events: none;
}

.profile-cover-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--color-surface-muted);
}

.timeline-item {
    padding: 22px 18px;
    border-bottom: 1px solid var(--color-border);
}

.timeline-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--color-surface-muted);
}

.timeline-name,
.comment-name {
    color: var(--color-primary-strong);
    font-weight: 600;
}

.timeline-copy {
    color: var(--color-text);
    font-size: 15.5px;
    line-height: 1.65;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.timeline-meta {
    color: var(--color-text-muted);
    font-size: 12px;
}

.image-grid {
    display: grid;
    width: min(100%, 438px);
    gap: 4px;
}

.image-grid[data-count="1"] {
    grid-template-columns: minmax(0, 268px);
}

.image-grid[data-count="2"],
.image-grid[data-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 340px;
}

.image-grid:not([data-count="1"]):not([data-count="2"]):not([data-count="4"]) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feed-image-button {
    position: relative;
    display: block;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 3px;
    background: var(--color-surface-muted);
    cursor: zoom-in;
}

.feed-image-button img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 220ms ease, opacity 180ms ease;
}

.image-grid[data-count="1"] .feed-image-button img {
    aspect-ratio: 4 / 3;
}

.feed-image-button:hover img {
    opacity: 0.94;
    transform: scale(1.018);
}

.post-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 26px;
    border: 0;
    border-radius: 5px;
    background: var(--color-surface-muted);
    color: var(--color-text-secondary);
    cursor: pointer;
}

.post-action-menu {
    position: absolute;
    right: 40px;
    top: 50%;
    z-index: 10;
    display: flex;
    width: max-content;
    min-width: 138px;
    max-width: calc(100vw - 88px);
    overflow: hidden;
    border-radius: 6px;
    background: #4b4f4d;
    box-shadow: var(--shadow-menu);
    opacity: 0;
    pointer-events: none;
    transform: translate(8px, -50%) scale(0.96);
    transform-origin: right center;
    transition: opacity 150ms ease, transform 150ms ease;
}

.post-action-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, -50%) scale(1);
}

.post-action-menu button {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 69px;
    min-height: 42px;
    gap: 5px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    white-space: nowrap;
}

.post-action-menu button svg {
    flex: 0 0 auto;
}

.post-action-menu button + button {
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.post-action-menu button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.engagement-box {
    position: relative;
    margin-top: 10px;
    border-radius: 4px;
    background: var(--color-surface-muted);
}

.engagement-box::before {
    position: absolute;
    top: -6px;
    left: 12px;
    width: 0;
    height: 0;
    border-right: 7px solid transparent;
    border-bottom: 7px solid var(--color-surface-muted);
    border-left: 7px solid transparent;
    content: "";
}

.likes-row {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 8px 10px;
    color: var(--color-primary-strong);
    font-size: 13px;
    line-height: 1.45;
}

.likes-icon {
    fill: currentColor;
}

.comments-list {
    border-top: 1px solid var(--color-border);
    padding: 6px 10px 8px;
}

.comment-row {
    margin: 2px 0;
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.55;
}

.comment-form {
    display: none;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 9px;
}

.comment-form.is-open {
    display: grid;
}

.comment-action-link {
    align-self: center;
    padding: 2px 0;
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.comment-row[data-reply-row] {
    cursor: pointer;
}

.comment-row[data-reply-row]:hover {
    background: var(--color-primary-soft);
    border-radius: 6px;
}

.comment-action-link:hover {
    color: var(--color-primary-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.comment-action-link.is-primary {
    color: var(--color-primary-strong);
}

.comment-action-link.is-danger {
    color: var(--color-danger);
}

.emoji-input-wrap {
    position: relative;
    min-width: 0;
}

.emoji-input-wrap > input,
.emoji-input-wrap > textarea {
    padding-right: 42px;
}

.emoji-picker-toggle {
    position: absolute;
    right: 7px;
    bottom: 7px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-size: 17px;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-variant-emoji: emoji;
}

.emoji-picker-toggle:hover {
    background: var(--color-primary-soft);
}

.emoji-picker {
    position: fixed;
    z-index: 120;
    display: grid;
    grid-template-columns: repeat(8, 38px);
    gap: 4px;
    width: max-content;
    max-width: calc(100vw - 16px);
    max-height: min(360px, calc(100dvh - 16px));
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-raised);
    box-shadow: var(--shadow-float);
    scrollbar-color: var(--color-border-strong) transparent;
    scrollbar-width: thin;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-variant-emoji: emoji;
}

.emoji-picker-item {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    font-size: 23px;
    font-family: inherit;
    font-variant-emoji: emoji;
}

.emoji-picker-item:hover {
    background: var(--color-primary-soft);
}

@media (max-width: 420px) {
    .emoji-picker {
        grid-template-columns: repeat(6, 38px);
    }
}

input.comment-input,
textarea.compose-textarea,
input.field-input,
textarea.field-input,
select.field-input {
    --tw-ring-color: var(--color-primary);
    width: 100%;
    appearance: none;
    border: 1px solid var(--color-border);
    background: var(--color-surface-muted);
    color: var(--color-text);
    caret-color: var(--color-primary-strong);
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

input.comment-input::placeholder,
textarea.compose-textarea::placeholder,
input.field-input::placeholder,
textarea.field-input::placeholder {
    color: var(--color-text-muted);
    opacity: 1;
}

.comment-input:hover,
.field-input:hover {
    border-color: var(--color-border-strong);
}

.comment-input {
    min-height: 40px;
    padding: 8px 12px;
    border-color: transparent;
    border-radius: 10px;
    background: var(--color-surface-muted);
    font-size: 13px;
}

.comment-input:focus,
.field-input:focus {
    --tw-ring-color: var(--color-primary);
    border-color: var(--color-primary) !important;
    background: var(--color-surface);
    box-shadow: none !important;
    outline: none !important;
}

.comment-input:focus {
    border-color: var(--color-primary) !important;
    box-shadow: none !important;
}

.comment-input:disabled,
.field-input:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.comment-input:-webkit-autofill,
.field-input:-webkit-autofill {
    box-shadow: 0 0 0 1000px var(--color-surface-muted) inset;
    -webkit-text-fill-color: var(--color-text);
}

.comment-input:-webkit-autofill:focus,
.field-input:-webkit-autofill:focus {
    box-shadow: 0 0 0 1000px var(--color-surface) inset, 0 0 0 4px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.primary-button,
.secondary-button,
.comment-submit {
    border: 0;
    cursor: pointer;
    transition: filter 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.primary-button,
.comment-submit {
    background: var(--color-primary);
    color: #ffffff;
}

.primary-button:hover,
.comment-submit:hover {
    filter: brightness(0.96);
}

.primary-button:active,
.secondary-button:active,
.comment-submit:active {
    transform: translateY(1px);
}

.comment-submit {
    min-width: 62px;
    border-radius: 7px;
    font-size: 13px;
}

.locked-post {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 7px;
    background: var(--color-surface-muted);
}

.locked-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary-strong);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 54px 18px 74px;
    background: var(--color-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.panorama-lightbox {
    padding: 0;
}

.panorama-lightbox .lightbox-close {
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(12, 14, 13, 0.62);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
}

.panorama-lightbox .lightbox-close:hover,
.panorama-lightbox .lightbox-close:focus-visible {
    background: rgba(0, 0, 0, 0.78);
    border-color: rgba(255, 255, 255, 0.78);
    transform: scale(1.03);
}

.panorama-lightbox .lightbox-close:active {
    transform: scale(0.97);
}

.panorama-lightbox .lightbox-close svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.panorama-music-button {
    position: absolute;
    z-index: 6;
    bottom: max(18px, env(safe-area-inset-bottom));
    left: max(18px, env(safe-area-inset-left));
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    background: rgba(12, 14, 13, 0.62);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.panorama-music-button.hidden {
    display: none;
}

.panorama-music-button:hover,
.panorama-music-button:focus-visible,
.panorama-music-button.is-playing {
    border-color: rgba(255, 255, 255, 0.78);
    background: rgba(0, 0, 0, 0.78);
}

.panorama-music-button:active {
    transform: scale(0.96);
}

.panorama-music-wave {
    display: flex;
    height: 20px;
    align-items: center;
    gap: 2px;
}

.panorama-music-wave.hidden {
    display: none;
}

.panorama-music-wave i {
    width: 3px;
    height: 16px;
    border-radius: 999px;
    background: currentColor;
    animation: panorama-music-wave 780ms ease-in-out infinite alternate;
    transform-origin: center;
}

.panorama-music-wave i:nth-child(2) { animation-delay: -420ms; }
.panorama-music-wave i:nth-child(3) { animation-delay: -180ms; }
.panorama-music-wave i:nth-child(4) { animation-delay: -560ms; }

@keyframes panorama-music-wave {
    from { transform: scaleY(0.28); }
    to { transform: scaleY(1); }
}

.panorama-viewer-shell {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-image {
    max-width: min(1120px, 94vw);
    max-height: 82vh;
    border-radius: 4px;
    object-fit: contain;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-drag: none;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
    transform: scale(0.985);
    transition: opacity 160ms ease, transform 180ms ease;
}

.lightbox.is-open .lightbox-image {
    transform: scale(1);
}

.lightbox-image.is-loading {
    opacity: 0.45;
}

.lightbox-loading {
    position: fixed;
    z-index: 3;
    top: 50%;
    left: 50%;
    display: none;
    min-width: 116px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(20, 24, 22, 0.72);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    pointer-events: none;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(10px);
}

.lightbox.is-loading .lightbox-loading,
.lightbox.has-load-error .lightbox-loading {
    display: flex;
}

.lightbox-loading-indicator {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: operation-spin 720ms linear infinite;
}

.lightbox.has-load-error .lightbox-loading-indicator {
    display: none;
}

.lightbox-control.lightbox-original {
    bottom: 16px;
    left: 16px;
    width: auto;
    min-width: 0;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(18, 20, 19, 0.58);
    font-size: 11px;
    font-weight: 500;
}

.lightbox-control.lightbox-original.is-loaded {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.62);
    cursor: default;
}

.lightbox-control {
    position: absolute;
    z-index: 2;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.lightbox-close {
    top: 16px;
    right: 16px;
}

.lightbox-prev {
    top: 50%;
    left: 16px;
}

.lightbox-next {
    top: 50%;
    right: 16px;
}

.lightbox-counter {
    position: absolute;
    bottom: 46px;
    left: 50%;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    transform: translateX(-50%);
}

.lightbox-caption {
    position: absolute;
    right: 16px;
    bottom: 24px;
    left: 16px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    text-align: center;
    pointer-events: none;
}

@media (max-width: 639px) {
    .lightbox:not(.panorama-lightbox) {
        padding-right: 12px;
        padding-left: 12px;
    }

    .lightbox:not(.panorama-lightbox) .lightbox-image {
        max-width: 100%;
        touch-action: none;
    }

    .lightbox:not(.panorama-lightbox) .lightbox-prev,
    .lightbox:not(.panorama-lightbox) .lightbox-next {
        display: none;
    }

    .lightbox:not(.panorama-lightbox) .lightbox-counter {
        bottom: calc(27px + env(safe-area-inset-bottom));
        min-width: 64px;
        text-align: center;
    }

    #album-lightbox {
        padding-bottom: calc(126px + env(safe-area-inset-bottom));
    }

    #album-lightbox .lightbox-counter {
        bottom: calc(27px + env(safe-area-inset-bottom));
        min-width: 72px;
        text-align: center;
    }

    #album-lightbox .lightbox-caption {
        right: 24px;
        bottom: calc(66px + env(safe-area-inset-bottom));
        left: 24px;
        line-height: 1.55;
    }

    .lightbox-control.lightbox-original {
        bottom: calc(18px + env(safe-area-inset-bottom));
        left: 14px;
    }
}

.compose-card,
.about-card,
.login-card {
    background: var(--color-surface);
}

.album-card {
    min-width: 0;
    color: var(--color-text);
    text-decoration: none;
}

.album-cover {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 7px;
    background: var(--color-surface-muted);
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease, opacity 180ms ease;
}

.album-card:hover .album-cover img {
    opacity: 0.94;
    transform: scale(1.018);
}

.album-photo-grid {
    column-count: 2;
    column-gap: 4px;
}

.album-sort-trigger {
    position: relative;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    overflow: hidden;
}

.album-sort-trigger:hover,
.album-sort-trigger:focus-within {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    color: var(--color-primary-strong);
}

.album-sort-trigger select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    appearance: none;
    border: 0;
    outline: 0;
    opacity: 0;
    cursor: pointer;
}

.album-photo-button {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--photo-ratio, 1);
    margin: 0 0 4px;
    break-inside: avoid;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: var(--color-surface-muted);
    cursor: zoom-in;
}

.album-photo-item {
    position: relative;
    margin-bottom: 4px;
    break-inside: avoid;
}

.album-photo-item .album-photo-button {
    margin-bottom: 0;
}

.album-photo-button.has-image-error {
    min-height: 112px;
    cursor: default;
}

.album-photo-error {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    padding: 16px;
    background:
        linear-gradient(135deg, transparent 0 48%, color-mix(in srgb, var(--color-border) 55%, transparent) 49% 51%, transparent 52%) center / 28px 28px,
        var(--color-surface-muted);
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.album-photo-delete {
    position: absolute;
    z-index: 3;
    top: 8px;
    right: 8px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: rgba(18, 22, 20, 0.68);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.24);
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.album-photo-delete:hover,
.album-photo-delete:focus-visible {
    border-color: rgba(255, 255, 255, 0.8);
    background: color-mix(in srgb, var(--color-danger) 82%, #111);
}

.album-photo-delete:disabled {
    opacity: 0.55;
    cursor: wait;
}

.album-photo-button img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 220ms ease, opacity 180ms ease;
}

@media (min-width: 640px) {
    .album-photo-grid { column-count: 3; }
}

@media (min-width: 1024px) {
    .album-photo-grid { column-count: 4; }
}

.album-photo-button:hover img {
    opacity: 0.94;
    transform: scale(1.018);
}

.album-access-option {
    display: flex;
    min-height: 42px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 9px;
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: background-color 160ms ease, color 160ms ease;
}

.album-access-option.is-active {
    background: var(--color-surface);
    color: var(--color-primary-strong);
}

.article-category-filter {
    min-height: 34px;
    flex: none;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--color-surface-muted);
    color: var(--color-text-secondary);
    font-size: 13px;
    cursor: pointer;
}

.article-category-filter.is-active {
    background: var(--color-primary-soft);
    color: var(--color-primary-strong);
    font-weight: 600;
}

.article-list-item + .article-list-item {
    border-top: 1px solid var(--color-border);
}

.article-list-item a {
    color: var(--color-text);
    text-decoration: none;
}

.article-share-card {
    display: flex;
    min-height: 74px;
    align-items: center;
    gap: 11px;
    padding: 7px;
    border-radius: 5px;
    background: var(--color-surface-muted);
    color: var(--color-text);
    text-decoration: none;
}

.article-share-card img {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    border-radius: 3px;
    object-fit: cover;
}

.article-share-card-placeholder {
    display: grid;
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    place-items: center;
    border-radius: 3px;
    background: var(--color-primary-soft);
    color: var(--color-primary-strong);
}

.article-prose {
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.9;
}

.article-prose p,
.article-prose blockquote,
.article-prose pre,
.article-prose ul,
.article-prose ol,
.article-prose table,
.article-prose img {
    margin: 1.35em 0;
}

.article-prose h1,
.article-prose h2,
.article-prose h3,
.article-prose h4,
.article-prose h5 {
    margin: 2em 0 0.7em;
    font-weight: 700;
    line-height: 1.45;
}

.article-prose h1 {
    font-size: 1.65em;
}

.article-prose h2 {
    font-size: 1.35em;
}

.article-prose h3 {
    font-size: 1.18em;
}

.article-prose h4,
.article-prose h5 {
    font-size: 1em;
}

.article-prose ul,
.article-prose ol {
    padding-left: 1.6em;
}

.article-prose ul {
    list-style: disc;
}

.article-prose ol {
    list-style: decimal;
}

.article-prose li + li {
    margin-top: 0.35em;
}

.article-prose blockquote {
    padding: 2px 0 2px 16px;
    border-left: 3px solid var(--color-primary);
    color: var(--color-text-secondary);
}

.article-prose a {
    color: var(--color-primary-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-prose pre {
    overflow-x: auto;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface-muted);
    font-size: 0.9em;
    line-height: 1.7;
}

.article-prose code {
    border-radius: 4px;
    background: var(--color-surface-muted);
    padding: 0.12em 0.35em;
    font-size: 0.9em;
}

.article-prose pre code {
    display: block;
    background: transparent;
    padding: 0;
    color: #24292f;
    white-space: pre;
}

.article-prose .hljs-comment,
.article-prose .hljs-quote {
    color: #6e7781;
}

.article-prose .hljs-keyword,
.article-prose .hljs-selector-tag,
.article-prose .hljs-subst {
    color: #cf222e;
}

.article-prose .hljs-string,
.article-prose .hljs-doctag,
.article-prose .hljs-template-tag,
.article-prose .hljs-template-variable {
    color: #0a3069;
}

.article-prose .hljs-title,
.article-prose .hljs-section,
.article-prose .hljs-selector-id {
    color: #8250df;
    font-weight: 600;
}

.article-prose .hljs-literal,
.article-prose .hljs-number,
.article-prose .hljs-type,
.article-prose .hljs-attr,
.article-prose .hljs-attribute,
.article-prose .hljs-variable {
    color: #0550ae;
}

.article-prose .hljs-built_in,
.article-prose .hljs-symbol,
.article-prose .hljs-bullet,
.article-prose .hljs-meta {
    color: #953800;
}

.article-prose .hljs-addition {
    background: #dafbe1;
    color: #116329;
}

.article-prose .hljs-deletion {
    background: #ffebe9;
    color: #82071e;
}

.dark .article-prose pre code {
    color: #c9d1d9;
}

.dark .article-prose .hljs-comment,
.dark .article-prose .hljs-quote {
    color: #8b949e;
}

.dark .article-prose .hljs-keyword,
.dark .article-prose .hljs-selector-tag,
.dark .article-prose .hljs-subst {
    color: #ff7b72;
}

.dark .article-prose .hljs-string,
.dark .article-prose .hljs-doctag,
.dark .article-prose .hljs-template-tag,
.dark .article-prose .hljs-template-variable {
    color: #a5d6ff;
}

.dark .article-prose .hljs-title,
.dark .article-prose .hljs-section,
.dark .article-prose .hljs-selector-id {
    color: #d2a8ff;
}

.dark .article-prose .hljs-literal,
.dark .article-prose .hljs-number,
.dark .article-prose .hljs-type,
.dark .article-prose .hljs-attr,
.dark .article-prose .hljs-attribute,
.dark .article-prose .hljs-variable {
    color: #79c0ff;
}

.dark .article-prose .hljs-built_in,
.dark .article-prose .hljs-symbol,
.dark .article-prose .hljs-bullet,
.dark .article-prose .hljs-meta {
    color: #ffa657;
}

.dark .article-prose .hljs-addition {
    background: #033a16;
    color: #aff5b4;
}

.dark .article-prose .hljs-deletion {
    background: #67060c;
    color: #ffdcd7;
}

.article-prose table {
    width: 100%;
    border-collapse: collapse;
}

.article-prose th,
.article-prose td {
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    text-align: left;
}

.article-prose th {
    background: var(--color-surface-muted);
}

.article-prose img {
    width: 100%;
    border-radius: 7px;
}

.article-title-input {
    width: 100%;
    padding: 4px 0 14px;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    background: transparent;
    color: var(--color-text);
    font-size: clamp(20px, 3vw, 24px);
    font-weight: 600;
    line-height: 1.35;
    box-shadow: none;
    outline: none;
}

.article-title-input:focus,
.article-title-input:focus-visible {
    border: 0 !important;
    border-bottom: 1px solid var(--color-primary) !important;
    box-shadow: none !important;
    outline: none !important;
}

.article-title-input::placeholder {
    color: var(--color-text-muted);
}

.article-cover-picker {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 108px;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-muted);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease;
}

.article-cover-picker:hover,
.article-cover-picker:focus-within {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
}

.article-cover-preview {
    display: grid;
    width: 144px;
    height: 86px;
    flex: 0 0 144px;
    overflow: hidden;
    place-items: center;
    border-radius: 8px;
    background: var(--color-surface);
}

.article-cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-cover-placeholder {
    display: grid;
    gap: 6px;
    place-items: center;
    color: var(--color-text-muted);
    font-size: 11px;
}

.article-cover-placeholder.hidden {
    display: none;
}

.article-editor-shell {
    --w-e-toolbar-color: var(--color-text-secondary);
    --w-e-toolbar-bg-color: var(--color-surface-muted);
    --w-e-toolbar-active-color: var(--color-primary-strong);
    --w-e-toolbar-active-bg-color: var(--color-primary-soft);
    --w-e-toolbar-disabled-color: var(--color-text-muted);
    --w-e-toolbar-border-color: var(--color-border);
    --w-e-textarea-bg-color: var(--color-surface);
    --w-e-textarea-color: var(--color-text);
    --w-e-textarea-border-color: var(--color-border);
    --w-e-textarea-slight-border-color: var(--color-border);
    --w-e-textarea-slight-color: var(--color-text-muted);
    --w-e-textarea-slight-bg-color: var(--color-surface-muted);
    --w-e-textarea-selected-border-color: var(--color-primary);
    --w-e-textarea-handler-bg-color: var(--color-primary);
    --w-e-modal-button-bg-color: var(--color-primary);
    --w-e-modal-button-border-color: var(--color-primary-strong);
    --w-e-modal-button-text-color: #fff;
    --w-e-modal-button-disabled-bg-color: var(--color-surface-muted);
    --w-e-modal-button-disabled-border-color: var(--color-border);
    --w-e-modal-button-disabled-text-color: var(--color-text-muted);
    overflow: visible;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.article-editor-shell:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 14%, transparent);
}

.w-e-full-screen-container {
    z-index: 100 !important;
    background: var(--color-surface) !important;
}

.article-editor-shell.w-e-full-screen-container {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.article-editor-toolbar {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid var(--color-border);
    border-radius: 12px 12px 0 0;
    background: var(--color-surface-muted);
}

.article-editor-toolbar .w-e-toolbar {
    flex-wrap: wrap;
    gap: 2px;
    padding: 5px 7px;
    border-radius: inherit;
    background: transparent;
}

.article-editor-toolbar .w-e-bar-item {
    height: 36px;
    padding: 2px;
}

.article-editor-toolbar .w-e-bar-item button {
    height: 32px;
    padding: 0 7px;
}

.article-editor-toolbar .w-e-bar-item button,
.article-editor-toolbar .w-e-bar-item .title {
    border-radius: 7px;
}

.article-editor-toolbar .w-e-bar-item button:hover,
.article-editor-toolbar .w-e-bar-item .title:hover {
    background: var(--color-surface);
    color: var(--color-primary-strong);
}

.article-editor-toolbar .w-e-drop-panel,
.article-editor-toolbar .w-e-modal {
    border-color: var(--color-border);
    background: var(--color-surface-raised);
    color: var(--color-text);
    box-shadow: var(--shadow-menu);
}

.article-editor {
    min-height: 420px;
    border-radius: 0 0 12px 12px;
    background: var(--color-surface);
    color: var(--color-text);
    outline: none;
}

.article-editor .w-e-text-container,
.article-editor .w-e-scroll {
    min-height: 420px;
    border-radius: inherit;
    background: var(--color-surface);
    color: var(--color-text);
}

.article-editor [data-slate-editor] {
    min-height: 420px !important;
    padding: 0 22px !important;
    color: var(--color-text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.8;
}

.article-editor [data-slate-placeholder] {
    top: 15px !important;
    left: 22px !important;
    color: var(--color-text-muted) !important;
    font-family: inherit;
    font-size: 16px;
    font-style: normal !important;
    line-height: 1.8;
}

.article-editor [data-slate-editor] img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.25rem auto;
    border-radius: 8px;
}

.article-editor [data-slate-editor] pre,
.article-editor [data-slate-editor] code {
    border-color: var(--color-border);
    background: var(--color-surface-muted);
    color: var(--color-text);
}

.article-editor [data-slate-editor] pre > code {
    text-shadow: none !important;
}

.dark .article-editor [data-slate-editor] pre > code {
    color: #c9d1d9 !important;
}

.dark .article-editor [data-slate-editor] pre > code .token.comment,
.dark .article-editor [data-slate-editor] pre > code .token.prolog,
.dark .article-editor [data-slate-editor] pre > code .token.doctype,
.dark .article-editor [data-slate-editor] pre > code .token.cdata {
    color: #8b949e;
}

.dark .article-editor [data-slate-editor] pre > code .token.keyword,
.dark .article-editor [data-slate-editor] pre > code .token.atrule,
.dark .article-editor [data-slate-editor] pre > code .token.tag {
    color: #ff7b72;
}

.dark .article-editor [data-slate-editor] pre > code .token.string,
.dark .article-editor [data-slate-editor] pre > code .token.char,
.dark .article-editor [data-slate-editor] pre > code .token.attr-value {
    color: #a5d6ff;
}

.dark .article-editor [data-slate-editor] pre > code .token.function,
.dark .article-editor [data-slate-editor] pre > code .token.class-name {
    color: #d2a8ff;
}

.dark .article-editor [data-slate-editor] pre > code .token.boolean,
.dark .article-editor [data-slate-editor] pre > code .token.number,
.dark .article-editor [data-slate-editor] pre > code .token.constant,
.dark .article-editor [data-slate-editor] pre > code .token.property {
    color: #79c0ff;
}

.dark .article-editor [data-slate-editor] pre > code .token.builtin,
.dark .article-editor [data-slate-editor] pre > code .token.symbol {
    color: #ffa657;
}

.dark .article-editor [data-slate-editor] pre > code .token.operator,
.dark .article-editor [data-slate-editor] pre > code .token.punctuation {
    color: #c9d1d9;
}

.article-editor [data-slate-editor] blockquote {
    border-left-color: var(--color-primary);
    color: var(--color-text-secondary);
}

@media (max-width: 640px) {
    .article-cover-preview {
        width: 112px;
        height: 72px;
        flex-basis: 112px;
    }

    .article-editor .w-e-hover-bar {
        left: 8px !important;
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .article-editor .w-e-hover-bar::-webkit-scrollbar {
        display: none;
    }

    .article-editor .w-e-hover-bar .w-e-bar-item {
        flex: 0 0 auto;
    }

    .article-editor,
    .article-editor .w-e-text-container,
    .article-editor .w-e-scroll,
    .article-editor [data-slate-editor] {
        min-height: 360px !important;
    }

    .article-editor [data-slate-editor] {
        padding: 0 16px !important;
    }

    .article-editor [data-slate-placeholder] {
        left: 16px !important;
    }
}

.comment-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 7px;
    background: var(--color-primary-soft);
    color: var(--color-primary-strong);
    font-size: 13px;
    font-weight: 600;
}

span.profile-avatar,
span.timeline-avatar,
span.comment-avatar {
    border: 1px solid rgba(255, 255, 255, 0.72);
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 245, 248, 0.9) 0 12%, transparent 42%),
        linear-gradient(135deg, #f7bfd2 0%, #d8ddea 44%, #8ddbd5 100%);
    box-shadow:
        0 7px 18px rgba(78, 159, 148, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    color: #ffffff !important;
    font-family: "Songti SC", "STSong", serif;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(38, 103, 95, 0.38);
}

.search-field {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 5px 6px 5px 12px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
}

.search-field .field-input {
    min-width: 0;
    padding: 7px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.search-field .field-input:focus {
    border-color: transparent;
    box-shadow: none;
}

.search-filter {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--color-text-secondary);
    font-size: 12px;
}

.search-filter:hover,
.search-filter.is-active {
    background: var(--color-primary-soft);
    color: var(--color-primary-strong);
}

.search-result-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color 160ms ease, background-color 160ms ease;
}

.search-result-card:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
}

.search-result-type {
    display: inline-flex;
    min-width: 38px;
    justify-content: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--color-surface-muted);
    color: var(--color-primary-strong);
    font-size: 10px;
}

.friend-link-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text);
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.friend-link-card:hover {
    border-color: var(--color-primary);
    background: var(--color-surface-muted);
}

.moderation-button {
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid var(--color-border-strong);
    border-radius: 7px;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 11px;
    cursor: pointer;
}

.moderation-button.is-primary {
    border-color: color-mix(in srgb, var(--color-primary) 55%, var(--color-border));
    color: var(--color-primary-strong);
}

.moderation-button.is-danger {
    color: var(--color-danger);
}

.interaction-message {
    display: flex;
    min-height: 112px;
    align-items: flex-start;
    gap: 13px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--color-border);
}

.interaction-avatar {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border-radius: 8px;
    background: var(--color-primary-soft);
    color: var(--color-primary-strong);
    font-size: 17px;
    font-weight: 650;
}

.interaction-source {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--color-surface-muted);
}

.interaction-source img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 640px) {
    .interaction-message {
        padding-right: 28px;
        padding-left: 28px;
    }
}

.compose-textarea {
    display: block;
    min-height: 170px;
    padding: 2px 0;
    resize: none;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    font-size: 16px;
    line-height: 1.7;
    box-shadow: none !important;
    outline: none !important;
}

.compose-textarea:focus,
.compose-textarea:focus-visible {
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.upload-tile,
.preview-tile {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 5px;
    background: var(--color-surface-muted);
}

.upload-tile {
    display: grid;
    place-items: center;
    border: 1px dashed var(--color-border-strong);
    color: var(--color-text-muted);
    cursor: pointer;
}

.preview-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(18, 22, 20, 0.72);
    color: #ffffff;
    cursor: pointer;
}

.preview-panorama-toggle {
    position: absolute;
    bottom: 6px;
    left: 6px;
    min-height: 25px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    background: rgba(18, 22, 20, 0.68);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.preview-panorama-toggle[aria-pressed="true"] {
    border-color: var(--color-primary);
    background: var(--color-primary-strong);
}

.preview-panorama-toggle:active {
    transform: scale(0.94);
}

.setting-row {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid var(--color-border);
}

.access-panel {
    display: none;
    margin-top: 12px;
    padding: 14px;
    border-radius: 8px;
    background: var(--color-surface-muted);
}

.access-panel.is-open {
    display: block;
}

.field-input {
    min-height: 48px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.4;
}

.toast {
    position: fixed;
    right: 18px;
    bottom: 84px;
    z-index: 90;
    max-width: min(360px, calc(100vw - 36px));
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface-raised);
    color: var(--color-text);
    box-shadow: var(--shadow-menu);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

html.is-booting {
    overflow: hidden;
}

html.is-booting::before,
html.is-booting::after {
    position: fixed;
    z-index: 10000;
    content: "";
}

html.is-booting::before {
    inset: 0;
    background: var(--color-page, #f7f9f8);
}

html.is-booting::after {
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid var(--color-border, #dfe5e2);
    border-top-color: var(--color-primary-strong, #4d9f93);
    border-radius: 50%;
    animation: boot-loading-spin 720ms linear infinite;
}

@keyframes boot-loading-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    html.is-booting::after {
        animation-duration: 1.4s;
    }
}

#nprogress {
    pointer-events: none;
}

#nprogress .bar {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    border-radius: 0 999px 999px 0;
    background: var(--color-primary-strong);
    box-shadow: 0 0 10px color-mix(in srgb, var(--color-primary) 65%, transparent);
    transition: transform 180ms ease, width 180ms ease, opacity 180ms ease;
}

#nprogress .peg {
    position: absolute;
    right: 0;
    display: block;
    width: 90px;
    height: 100%;
    opacity: 0.85;
    box-shadow: 0 0 10px var(--color-primary), 0 0 5px var(--color-primary);
    transform: rotate(2deg) translateY(-1px);
}

#nprogress .spinner {
    display: none;
}

.operation-overlay {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(18, 22, 20, 0.52);
}

.operation-panel {
    width: min(100%, 380px);
    padding: 22px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface-raised);
    box-shadow: var(--shadow-float);
}

.operation-indicator {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary-strong);
}

.operation-indicator::before {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: '';
    animation: operation-spin 760ms linear infinite;
}

.operation-overlay.is-success .operation-indicator::before {
    width: 8px;
    height: 14px;
    border: 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    border-radius: 0;
    animation: none;
    transform: translateY(-2px) rotate(45deg);
}

.operation-overlay.is-error .operation-indicator {
    background: color-mix(in srgb, var(--color-danger) 12%, transparent);
    color: var(--color-danger);
}

.operation-overlay.is-error .operation-indicator::before {
    width: auto;
    height: auto;
    border: 0;
    content: '!';
    font-size: 20px;
    font-weight: 700;
    animation: none;
}

.operation-progress {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--color-surface-muted);
}

.operation-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--color-primary);
    transition: width 160ms ease;
}

.operation-progress.is-indeterminate .operation-progress-bar {
    width: 38%;
    animation: operation-progress 1.1s ease-in-out infinite;
}

@keyframes operation-spin {
    to { transform: rotate(360deg); }
}

@keyframes operation-progress {
    from { transform: translateX(-120%); }
    to { transform: translateX(320%); }
}

@media (min-width: 768px) {
    .timeline-item {
        padding-right: 26px;
        padding-left: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
