:root {
    --red: #d71920;
    --red-dark: #ae1117;
    --red-soft: #fff0f0;
    --gold: #ffd76a;
    --gold-soft: #fff7db;
    --bg: #f7f1df;
    --surface: #fff;
    --text: #2b1b18;
    --muted: #8a6f66;
    --border: #ead8bf;
    --shadow: 0 8px 24px rgba(125, 39, 19, .12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    min-height: 100vh;
    padding-bottom: 74px;
    background: #f6eedb;
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input {
    font: inherit;
}

img {
    max-width: 100%;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.app-shell {
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 0 10px 18px;
}

.admin-shell {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 0 14px 28px;
}

.site-header,
.admin-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 76px;
    margin: 0 -10px;
    padding: 12px 14px;
    border-radius: 0 0 18px 18px;
    background:
        linear-gradient(135deg, rgba(255, 215, 106, .18), transparent 42%),
        linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    box-shadow: var(--shadow);
}

.admin-header {
    margin: 0 -14px 14px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: 112px 1fr 132px;
    align-items: center;
    gap: 8px;
    min-height: 62px;
    margin: 0 -10px;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.topbar h1 {
    color: #222;
    font-size: 26px;
    font-weight: 500;
    text-align: center;
}

.backup-badge {
    display: grid;
    justify-items: center;
    gap: 1px;
    padding: 5px 8px;
    border-radius: 5px;
    background: #0fc66b;
    color: #fff;
    text-decoration: none;
    line-height: 1.1;
}

.backup-badge strong {
    font-size: 17px;
}

.backup-badge span {
    font-size: 12px;
}

.top-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
}

.top-actions button {
    display: grid;
    justify-items: center;
    gap: 1px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 13px;
    cursor: pointer;
}

.top-actions span {
    font-size: 25px;
    line-height: 1;
}

.eyebrow {
    margin-bottom: 2px;
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
}

.site-header h1 {
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: 0;
}

.icon-btn,
.header-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
}

.header-link {
    padding: 0 12px;
    white-space: nowrap;
}

.notice-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 -10px 12px;
    padding: 8px 14px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #6b5b55;
    font-size: 18px;
    box-shadow: none;
}

.notice-bar span {
    flex: 0 0 auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #ff3030;
    font-size: 20px;
}

.notice-bar p {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.banner-carousel {
    position: relative;
    overflow: hidden;
    margin: 0 -10px;
    border-radius: 0;
    background: #fbe7b1;
    box-shadow: none;
}

.banner-track {
    position: relative;
    min-height: 205px;
}

.banner-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 22px 24px;
    opacity: 0;
    transform: translateX(22px);
    transition: opacity .45s ease, transform .45s ease;
    text-decoration: none;
}

.banner-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-slide:nth-child(1) {
    background:
        radial-gradient(circle at 78% 42%, rgba(255, 255, 255, .82) 0 8%, transparent 9%),
        radial-gradient(circle at 86% 25%, rgba(15, 198, 107, .32) 0 8%, transparent 9%),
        radial-gradient(circle at 82% 76%, rgba(255, 215, 106, .72) 0 13%, transparent 14%),
        linear-gradient(135deg, #fff7d2 0%, #ffd16a 42%, #ff3434 100%);
}

.banner-slide:nth-child(2) {
    background:
        radial-gradient(circle at 78% 40%, rgba(30, 195, 86, .32) 0 12%, transparent 13%),
        radial-gradient(circle at 88% 72%, rgba(45, 142, 255, .32) 0 10%, transparent 11%),
        linear-gradient(135deg, #fff8de 0%, #ffe184 42%, #d71920 100%);
}

.banner-slide:nth-child(3) {
    background:
        radial-gradient(circle at 80% 42%, rgba(255, 215, 106, .58) 0 14%, transparent 15%),
        radial-gradient(circle at 90% 72%, rgba(255, 255, 255, .5) 0 9%, transparent 10%),
        linear-gradient(135deg, #fff8e3 0%, #ffc857 42%, #b50f15 100%);
}

.banner-slide.image-banner {
    background-position: center;
    background-size: cover;
}

.banner-slide.image-banner .banner-media {
    display: block;
}

.banner-slide.active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
}

.banner-slide strong {
    position: relative;
    z-index: 1;
    color: #7a100f;
    font-size: 28px;
    line-height: 1;
    text-shadow: 0 2px 0 rgba(255, 255, 255, .6);
}

.banner-slide span {
    position: relative;
    z-index: 1;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: #0bbf62;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.banner-slide p {
    position: relative;
    z-index: 1;
    max-width: 74%;
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .28);
}

.promo-strip {
    margin: 0 -10px 0;
    padding: 6px 10px;
    background: #ff0000;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

.banner-dots {
    position: absolute;
    right: 12px;
    bottom: 10px;
    display: flex;
    gap: 5px;
}

.banner-dot {
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .58);
    cursor: pointer;
}

.banner-dot.active {
    width: 18px;
    border-radius: 999px;
    background: #fff;
}

.lottery-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.lottery-tab {
    min-height: 78px;
    border: 0;
    border-radius: 12px 12px 0 0;
    background: #fff;
    color: var(--muted);
}

.lottery-tab strong,
.lottery-tab span {
    display: block;
}

.lottery-tab strong {
    margin-bottom: 5px;
    font-size: 22px;
}

.lottery-tab span {
    font-size: 18px;
}

.lottery-tab.active {
    background: #10bd62;
    color: #fff;
}

.lottery-tab.muted {
    background: #f5f5f5;
}

.lottery-panel {
    position: relative;
    margin: 0 14px 14px;
    padding: 22px 12px 12px;
    border: 1px solid #0fc467;
    border-radius: 4px;
    background: #fff;
}

.live-ribbon {
    position: absolute;
    top: -41px;
    left: 50%;
    width: 184px;
    height: 50px;
    padding-top: 13px;
    background: #09bd5e;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    transform: translateX(-50%);
    clip-path: polygon(0 0, 100% 0, 82% 100%, 18% 100%);
}

.lottery-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 15px;
}

.lottery-head p {
    white-space: nowrap;
}

.lottery-head strong {
    color: #05b85c;
    font-size: 22px;
}

.lottery-head .countdown {
    color: #f00;
    text-align: center;
}

.lottery-head .countdown strong {
    color: #f00;
    font-size: 16px;
}

.lottery-head a,
.history-link {
    color: #08b857;
    text-decoration: none;
    white-space: nowrap;
}

.history-link {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
}

.lottery-balls {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    min-height: 92px;
}

.ball-item {
    display: grid;
    justify-items: center;
    gap: 7px;
    min-width: 0;
}

.ball-item.pending .ball-meta {
    width: 100%;
    max-width: 52px;
    overflow: hidden;
    color: #d71920;
    font-size: 12px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lottery-reveal {
    opacity: 0;
    transform: translateY(12px) scale(.86);
    transition: opacity .32s ease, transform .32s ease;
}

.lottery-reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ball {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 6px solid #fb3038;
    border-radius: 50%;
    background: #fff;
    color: #666;
    font-size: 25px;
    font-weight: 800;
    line-height: 1;
}

.pending-ball {
    border-style: dashed;
    color: #aaa;
}

.ball.green {
    border-color: #18c65a;
}

.ball.blue {
    border-color: #30a7ff;
}

.ball-meta {
    color: #4b362d;
    font-size: 15px;
    white-space: nowrap;
}

.ball-plus {
    align-self: center;
    color: #999;
    font-size: 30px;
    font-weight: 700;
}

.lottery-next {
    margin-top: 2px;
    color: #f00;
    font-size: 17px;
    text-align: center;
}

.compact {
    padding: 12px;
    border: 0;
    background: transparent;
}

.type-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.type-tab {
    min-height: 38px;
    border: 1px solid #eacaa0;
    border-radius: 999px;
    background: #fff;
    color: #9a4a21;
    cursor: pointer;
}

.type-tab.active {
    border-color: var(--red);
    background: linear-gradient(135deg, var(--red), #ff513e);
    color: #fff;
    box-shadow: 0 6px 14px rgba(215, 25, 32, .22);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 8px;
    margin-bottom: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.search-box span {
    color: var(--red);
    font-size: 13px;
    white-space: nowrap;
}

.search-box input {
    width: 100%;
    min-width: 0;
    height: 42px;
    border: 0;
    outline: 0;
    color: var(--text);
}

.primary-btn {
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--red), #ff513e);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(215, 25, 32, .22);
}

.primary-btn:disabled,
.ghost-btn:disabled,
.btns button:disabled,
.comment-form button:disabled {
    cursor: wait;
    opacity: .72;
}

.is-loading {
    position: relative;
    pointer-events: none;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.quick-grid a,
.quick-grid button {
    display: grid;
    place-items: center;
    min-height: 44px;
    border: 1px solid #eacaa0;
    border-radius: 10px;
    background: #fff;
    color: #9a4a21;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.quick-grid a:first-child {
    border-color: #ffb1aa;
    background: #fff0ef;
    color: var(--red);
}

.quick-grid a:nth-child(2) {
    border-color: #9ae5bd;
    background: #eefdf4;
    color: #07954b;
}

.quick-grid a:nth-child(3) {
    border-color: #ffd981;
    background: #fff8df;
    color: #9a6100;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.section-title h2 {
    font-size: 17px;
}

.section-title a {
    color: var(--red);
    font-size: 13px;
    text-decoration: none;
}

.status-bar {
    margin: 8px 0 10px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 3px 10px rgba(113, 58, 22, .08);
}

.card img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #f2e3ca;
    cursor: zoom-in;
}

.image-error {
    object-fit: contain !important;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .65), transparent),
        #f2e3ca !important;
}

.title {
    padding: 8px 6px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loading,
.empty-message {
    grid-column: 1 / -1;
    padding: 34px 12px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .62);
    color: var(--muted);
    text-align: center;
}

.error-message {
    color: #c5221f;
}

.btns {
    display: flex;
    gap: 8px;
    padding: 0 8px 10px;
}

.btns button {
    flex: 1;
    min-height: 34px;
    border: 0;
    border-radius: 8px;
    background: var(--red-soft);
    color: var(--red);
    cursor: pointer;
}

.btns button:hover {
    background: var(--red);
    color: #fff;
}

.bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 8px 10px 10px;
    border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -8px 24px rgba(84, 45, 19, .12);
    backdrop-filter: blur(12px);
}

.bottom-nav.two-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bottom-nav.three-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}

.bottom-nav-item span {
    font-size: 20px;
    line-height: 1;
}

.bottom-nav-item.active {
    color: var(--red);
}

.back-top {
    position: fixed;
    right: calc(50% - min(50vw, 260px) + 12px);
    bottom: 86px;
    z-index: 31;
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(215, 25, 32, .28);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, .88);
}

.modal img {
    max-width: 100%;
    max-height: 92vh;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.favorite-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 60;
    padding: 12px 22px;
    border-radius: 999px;
    background: rgba(35, 18, 13, .92);
    color: #fff;
    font-size: 15px;
    transform: translate(-50%, -50%);
}

.auth-card,
.upload-card,
.discover-feed {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(113, 58, 22, .08);
}

.auth-card {
    margin-top: 18px;
}

.auth-form,
.discover-form {
    display: grid;
    gap: 12px;
}

.auth-form label,
.discover-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
}

.auth-form input,
.discover-form input,
.discover-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fffdf8;
    color: var(--text);
    outline: 0;
}

.auth-form input,
.discover-form input {
    height: 42px;
    padding: 0 12px;
}

.discover-form textarea {
    min-height: 88px;
    padding: 10px 12px;
    resize: vertical;
}

.file-picker input {
    padding: 9px 10px;
}

.wide-btn {
    min-height: 42px;
}

.form-error,
.discover-message {
    margin-bottom: 12px;
    padding: 9px 10px;
    border-radius: 10px;
    background: var(--gold-soft);
    color: #8a4a00;
    font-size: 14px;
}

.success-message {
    background: #edf9f1;
    color: #087c3d;
}

.auth-switch {
    margin-top: 14px;
    color: var(--muted);
    text-align: center;
}

.auth-switch a {
    color: var(--red);
    text-decoration: none;
}

.upload-card h2 {
    margin-bottom: 12px;
    font-size: 18px;
}

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

.discover-post {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(113, 58, 22, .08);
}

.discover-post img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    background: #f2e3ca;
    cursor: pointer;
}

.discover-post-body {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.discover-post-body h3 {
    font-size: 18px;
    cursor: pointer;
}

.discover-meta,
.discover-content,
.comment-empty {
    color: var(--muted);
    font-size: 13px;
}

.discover-content {
    color: var(--text);
    line-height: 1.5;
}

.comment-list {
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 10px;
    background: #fff7df;
}

.comment-item {
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
}

.comment-item strong {
    color: var(--red);
}

.comment-item button {
    margin-left: 8px;
    border: 0;
    background: transparent;
    color: var(--red);
    font-size: 12px;
    cursor: pointer;
}

.comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px;
    gap: 8px;
}

.comment-form input {
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: 0;
}

.comment-form button {
    border: 0;
    border-radius: 10px;
    background: var(--red);
    color: #fff;
    cursor: pointer;
}

.me-profile,
.me-card {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(113, 58, 22, .08);
}

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

.me-profile h2 {
    font-size: 24px;
}

.me-muted {
    margin: 8px 0 14px;
    color: var(--muted);
    line-height: 1.6;
}

.me-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.link-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    text-decoration: none;
}

.ghost-btn {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--red);
    cursor: pointer;
}

.share-link-box {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 14px;
}

.share-link-box input {
    width: 100%;
    height: 42px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fffdf8;
    color: var(--text);
}

.browse-list {
    display: grid;
    gap: 10px;
}

.browse-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fffdf8;
}

.browse-item img {
    width: 72px;
    height: 88px;
    border-radius: 8px;
    object-fit: cover;
    background: #f2e3ca;
}

.browse-item h3 {
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.browse-item p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.mine-page,
.find-page {
    padding-bottom: 18px;
}

.mine-guest-card,
.mine-profile-card,
.mine-card,
.discover-composer,
.find-feed {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(113, 58, 22, .08);
}

.mine-guest-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 24px 16px 18px;
    text-align: center;
}

.mine-guest-card h2 {
    font-size: 22px;
}

.mine-guest-card p {
    color: var(--muted);
    line-height: 1.55;
}

.mine-avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 3px solid rgba(255, 255, 255, .72);
    border-radius: 50%;
    background: linear-gradient(135deg, #ffef95, #ff3333);
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(215, 25, 32, .22);
}

.mine-avatar img,
.discover-user-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.mine-avatar.guest {
    background: linear-gradient(135deg, #dfdfdf, #999);
}

.mine-avatar.small {
    width: 44px;
    height: 44px;
    border-width: 2px;
    font-size: 18px;
}

.mine-profile-card {
    overflow: hidden;
    border: 0;
    background:
        radial-gradient(circle at 82% 22%, rgba(255, 255, 255, .28) 0 11%, transparent 12%),
        linear-gradient(135deg, #ff4a3d, #d71920);
    color: #fff;
}

.mine-profile-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 18px 14px;
}

.mine-label {
    margin-bottom: 3px;
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
}

.mine-profile-top h2 {
    overflow: hidden;
    font-size: 24px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mine-phone {
    margin-top: 2px;
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
}

.mine-logout {
    min-width: 56px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    cursor: pointer;
}

.mine-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .12);
}

.mine-stats div {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 12px 6px;
}

.mine-stats strong {
    font-size: 22px;
}

.mine-stats span {
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
}

.mine-menu {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.mine-menu a {
    display: grid;
    justify-items: center;
    gap: 6px;
    min-height: 72px;
    padding: 10px 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: #8a3e1a;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(113, 58, 22, .06);
}

.mine-menu span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff3d0;
    color: var(--red);
    font-size: 20px;
}

.mine-card {
    padding: 14px;
}

.checkin-card {
    background:
        radial-gradient(circle at 88% 20%, rgba(255, 215, 106, .45) 0 12%, transparent 13%),
        linear-gradient(135deg, #fffdf6, #fff3d0);
}

.checkin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) 108px;
    gap: 10px;
    align-items: stretch;
}

.checkin-grid div {
    display: grid;
    place-items: center;
    gap: 4px;
    min-height: 68px;
    border: 1px solid #f0d39c;
    border-radius: 12px;
    background: rgba(255, 255, 255, .72);
}

.checkin-grid strong {
    color: var(--red);
    font-size: 24px;
}

.checkin-grid span {
    color: var(--muted);
    font-size: 12px;
}

.checkin-grid button {
    min-height: 68px;
}

.checkin-tip {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.mine-copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 8px;
}

.account-form {
    margin-bottom: 10px;
}

.logout-all-form {
    display: grid;
}

.mine-browse-list {
    max-height: 520px;
    overflow: auto;
    padding-right: 2px;
}

.find-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    padding: 16px 14px;
    border-radius: 12px;
    background:
        radial-gradient(circle at 82% 24%, rgba(255, 255, 255, .38) 0 13%, transparent 14%),
        linear-gradient(135deg, #ff4b37, #d71920);
    color: #fff;
    box-shadow: 0 8px 20px rgba(215, 25, 32, .18);
}

.find-hero p {
    margin-bottom: 3px;
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
}

.find-hero h2 {
    margin-bottom: 6px;
    font-size: 24px;
}

.find-hero span {
    font-size: 13px;
}

.find-hero button {
    min-width: 58px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    cursor: pointer;
}

.find-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.find-tabs button {
    min-height: 38px;
    border: 1px solid #eacaa0;
    border-radius: 999px;
    background: #fff;
    color: #9a4a21;
    cursor: pointer;
}

.find-tabs button.active {
    border-color: var(--red);
    background: linear-gradient(135deg, var(--red), #ff513e);
    color: #fff;
    box-shadow: 0 6px 14px rgba(215, 25, 32, .18);
}

.discover-composer {
    padding: 14px;
}

.composer-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.composer-head h2 {
    font-size: 18px;
}

.composer-head p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
}

.composer-form {
    gap: 10px;
}

.composer-file {
    display: grid;
    gap: 8px;
}

.composer-file span {
    display: grid;
    place-items: center;
    min-height: 42px;
    border: 1px dashed #ff9d96;
    border-radius: 10px;
    background: #fff2ef;
    color: var(--red);
    font-weight: 700;
}

.composer-file input {
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
}

.discover-preview {
    display: none;
    width: 100%;
    max-height: 320px;
    border-radius: 10px;
    object-fit: cover;
    background: #f2e3ca;
}

.find-feed {
    padding: 14px;
}

.discover-load-more {
    display: none;
    width: 100%;
    margin-top: 12px;
}

.discover-post {
    border-radius: 12px;
}

.discover-post-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 10px 0;
}

.discover-user-avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffdf72, #ff3838);
    color: #fff;
    font-weight: 800;
    overflow: hidden;
}

.discover-post-head strong {
    display: block;
    color: var(--text);
    font-size: 14px;
}

.discover-post-head span {
    color: var(--muted);
    font-size: 12px;
}

.discover-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.discover-actions a,
.more-comments-link {
    color: var(--muted);
    text-decoration: none;
}

.more-comments-link {
    width: fit-content;
    color: var(--red);
    font-size: 13px;
}

.detail-post {
    margin-top: 12px;
}

.detail-image-stack {
    display: grid;
    gap: 10px;
}

.detail-post img {
    max-height: none;
    cursor: default;
}

.detail-post .discover-post-body h2 {
    font-size: 21px;
}

.detail-comments {
    max-height: none;
}

.detail-load-more {
    display: grid;
    width: 100%;
    margin-bottom: 8px;
}

.discover-actions button {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #f0c4b4;
    border-radius: 999px;
    background: #fff7f0;
    color: #9a4a21;
    cursor: pointer;
}

.discover-actions button.liked {
    border-color: #ff9d96;
    background: #fff0ef;
    color: var(--red);
    font-weight: 700;
}

.admin-card {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(113, 58, 22, .08);
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.admin-stats-grid div {
    display: grid;
    gap: 4px;
    padding: 14px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(113, 58, 22, .08);
}

.admin-stats-grid strong {
    overflow: hidden;
    color: var(--red);
    font-size: 26px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-stats-grid span {
    color: var(--muted);
    font-size: 13px;
}

.admin-auth-card {
    max-width: 420px;
    margin-right: auto;
    margin-left: auto;
}

.admin-inline-form {
    display: grid;
    grid-template-columns: minmax(130px, .9fr) minmax(150px, 1fr) minmax(150px, 1fr) auto 90px;
    gap: 10px;
    align-items: center;
}

.admin-search-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 90px auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.admin-batch-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.admin-batch-form button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fffdf8;
    color: var(--red);
    cursor: pointer;
}

.admin-select-all,
.admin-selected-count {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fffdf8;
    color: var(--text);
    font-size: 13px;
}

.admin-select-all {
    gap: 6px;
    cursor: pointer;
}

.admin-selected-count {
    color: var(--muted);
}

.admin-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-export-actions form {
    display: contents;
}

.admin-maintenance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.admin-maintenance-grid div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fffdf8;
}

.admin-maintenance-grid strong {
    color: var(--red);
    font-size: 24px;
}

.admin-maintenance-grid span {
    color: var(--muted);
    font-size: 13px;
}

.admin-settings-form,
.admin-banner-form {
    display: grid;
    gap: 10px;
}

.admin-feedback {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
}

.admin-settings-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
}

.admin-settings-form input,
.admin-settings-form textarea,
.admin-banner-form input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fffdf8;
    color: var(--text);
    outline: 0;
}

.admin-settings-form input,
.admin-banner-form input {
    height: 40px;
    padding: 0 10px;
}

.admin-settings-form textarea {
    min-height: 78px;
    padding: 10px;
    resize: vertical;
}

.admin-banner-form {
    grid-template-columns: minmax(140px, 1fr) minmax(220px, 2fr) minmax(180px, 1.5fr) 82px 90px;
    align-items: center;
    margin-bottom: 12px;
}

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

.admin-banner-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fffdf8;
}

.admin-banner-card img {
    width: 140px;
    height: 86px;
    border-radius: 10px;
    object-fit: cover;
    background: #f2e3ca;
}

.admin-banner-card h3 {
    margin-bottom: 6px;
    font-size: 17px;
}

.admin-banner-card p {
    margin-bottom: 8px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

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

.admin-report-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fffdf8;
}

.admin-report-cover {
    position: relative;
    display: block;
    overflow: hidden;
    width: 96px;
    height: 116px;
    border-radius: 10px;
    background: #f2e3ca;
}

.admin-report-cover > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s ease;
}

.admin-report-cover:hover > img {
    transform: scale(1.04);
}

.admin-report-cover span {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .62);
    color: #fff;
    font-size: 12px;
}

.admin-report-card h3 {
    margin-bottom: 6px;
    font-size: 17px;
}

.admin-report-card h3 a {
    color: var(--text);
    text-decoration: none;
}

.admin-report-card h3 a:hover {
    color: var(--red);
}

.admin-report-card p {
    margin-bottom: 8px;
    color: var(--muted);
    line-height: 1.5;
}

.admin-user-agent {
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-inline-form input[type="text"],
.admin-inline-form input[type="tel"],
.admin-inline-form input[type="password"],
.admin-search-form input,
.admin-user-name-form input {
    height: 40px;
    min-width: 0;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: 0;
}

.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 220px;
}

.admin-user-cell img {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(215, 25, 32, .16);
}

.admin-user-cell span {
    color: var(--muted);
}

.admin-user-name-form {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    gap: 6px;
    margin-top: 8px;
}

.admin-user-name-form button {
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fffdf8;
    color: var(--red);
    cursor: pointer;
}

.admin-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    white-space: nowrap;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th,
.admin-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.admin-table th {
    color: var(--muted);
    font-weight: 700;
}

.admin-actions {
    display: flex;
    gap: 6px;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
}

.admin-actions button,
.danger-btn {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fffdf8;
    color: var(--red);
    cursor: pointer;
}

.danger-btn {
    border-color: #ffb7b7;
    background: #fff0f0;
    color: #c5221f;
}

.admin-post-grid {
    display: grid;
    gap: 12px;
}

.admin-post-card {
    position: relative;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fffdf8;
}

.admin-post-check {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.admin-post-cover {
    position: relative;
    display: block;
    overflow: hidden;
    width: 120px;
    height: 150px;
    border-radius: 10px;
    background: #f2e3ca;
}

.admin-post-cover > img {
    width: 120px;
    height: 150px;
    object-fit: cover;
    transition: transform .2s ease;
}

.admin-post-cover:hover > img {
    transform: scale(1.04);
}

.admin-post-cover span {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .62);
    color: #fff;
    font-size: 12px;
}

.admin-post-card h3 {
    margin-bottom: 6px;
    font-size: 17px;
}

.admin-post-card h3 a {
    color: var(--text);
    text-decoration: none;
}

.admin-post-card h3 a:hover {
    color: var(--red);
}

.admin-post-card p {
    margin-bottom: 8px;
    color: var(--muted);
    line-height: 1.5;
}

.admin-post-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 10px;
}

.admin-post-thumbs a {
    display: grid;
    place-items: center;
    overflow: hidden;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #f2e3ca;
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.admin-post-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-muted {
    font-size: 12px;
}

.ad-popup {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.ad-popup.visible {
    display: flex;
}

.ad-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .68);
}

.ad-popup-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    width: min(94vw, 540px);
    max-height: min(92vh, 760px);
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(0, 0, 0, .35);
}

.ad-popup-panel header {
    padding: 14px;
    background: #09c66c;
    color: #fff;
    font-size: 25px;
    font-weight: 700;
    text-align: center;
}

.ad-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    background: rgba(0, 0, 0, .22);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.ad-popup-image {
    display: block;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.ad-popup-image img,
.ad-popup-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    max-height: calc(92vh - 196px);
    object-fit: contain;
}

.ad-popup-placeholder {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 12px;
    min-height: 300px;
    background:
        radial-gradient(circle at 82% 28%, rgba(255, 255, 255, .45) 0 12%, transparent 13%),
        linear-gradient(135deg, #fff5d7, #93c9ff);
    color: #2a5dca;
}

.ad-popup-placeholder strong {
    color: #c59a10;
    font-size: 34px;
}

.ad-popup-placeholder span {
    font-size: 28px;
    font-weight: 700;
}

.ad-popup-panel p {
    max-height: 98px;
    overflow: auto;
    padding: 18px 20px 8px;
    color: #333;
    font-size: 20px;
    line-height: 1.35;
}

.ad-popup-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    padding: 8px 0 12px;
}

.ad-popup-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e8e8e8;
}

.ad-popup-dots .active {
    background: #09c66c;
}

.ad-popup-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid #eee;
}

.ad-popup-actions button {
    height: 68px;
    border: 0;
    background: #fff;
    color: #999;
    font-size: 20px;
    cursor: pointer;
}

.ad-popup-actions button + button {
    border-left: 1px solid #eee;
    color: #09c66c;
}

.find-list-page {
    max-width: 720px;
    padding-bottom: 88px;
    background: #f6f6f6;
}

.detail-page {
    padding-bottom: 96px;
    background: #f6f6f6;
}

.find-simple-header,
.publish-header {
    display: grid;
    grid-template-columns: 54px 1fr 54px;
    align-items: center;
    height: 56px;
    margin: 0 -10px;
    background: #fff;
    color: #111;
}

.find-simple-header h1,
.publish-header h1 {
    font-size: 21px;
    font-weight: 500;
    text-align: center;
}

.find-simple-header button,
.publish-header button {
    border: 0;
    background: transparent;
    color: #111;
    font-size: 28px;
    cursor: pointer;
}

.find-simple-header button:last-child {
    font-size: 15px;
}

.detail-simple-header {
    position: sticky;
    top: 0;
    z-index: 24;
    border-bottom: 1px solid #eee;
}

.detail-simple-header button:first-child,
.publish-header button:first-child {
    font-size: 34px;
    line-height: 1;
}

.detail-post {
    margin-top: 10px;
}

.find-tabs-plain {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 -10px;
    padding: 16px 0;
    background: #fff;
}

.find-tabs-plain button {
    height: 34px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 16px;
    font-weight: 700;
}

.find-tabs-plain button.active {
    color: #08bd68;
}

.find-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px;
    gap: 10px;
    margin: 0 -10px 14px;
    padding: 14px 16px;
    background: #f1f1f1;
}

.find-search-panel input {
    width: 100%;
    height: 64px;
    min-width: 0;
    border: 0;
    border-radius: 999px;
    padding: 0 26px;
    background: #fff;
    color: #333;
    font-size: 20px;
    outline: 0;
}

.find-search-panel button {
    border: 0;
    background: transparent;
    color: #08bd68;
    font-size: 25px;
    font-weight: 800;
    cursor: pointer;
}

.clean-feed {
    margin: 0 -10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.discover-masonry {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.discover-tile {
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.discover-tile > img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1.14;
    object-fit: cover;
    cursor: pointer;
}

.discover-tile-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 54px;
    padding: 8px;
}

.discover-tile-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tile-avatar {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.discover-tile h3 {
    min-width: 0;
    overflow: hidden;
    color: #222;
    font-size: 16px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.discover-tile-actions button {
    border: 0;
    background: transparent;
    color: #aaa;
    font-weight: 700;
    cursor: pointer;
}

.discover-tile-actions button.liked {
    color: #08bd68;
}

.floating-publish {
    position: fixed;
    right: max(16px, calc(50vw - 330px));
    bottom: 92px;
    z-index: 12;
    display: grid;
    justify-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: #333;
    cursor: pointer;
}

.floating-publish strong {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #08c66d;
    color: #fff;
    font-size: 42px;
    font-weight: 300;
    box-shadow: 0 8px 18px rgba(8, 198, 109, .25);
}

.floating-publish span {
    padding: 2px 8px;
    background: rgba(255, 255, 255, .86);
    font-size: 14px;
}

.publish-page {
    max-width: 720px;
    min-height: 100vh;
    background: #fff;
}

.publish-form {
    margin: 0 -10px;
    padding: 18px 22px 0;
    background: #fff;
}

.platform-picker p,
.publish-field > span {
    display: block;
    margin: 18px 0 12px;
    color: #111;
    font-size: 24px;
}

.platform-picker div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #08c66d;
    border-radius: 2px;
    overflow: hidden;
}

.platform-picker input {
    position: absolute;
    opacity: 0;
}

.platform-picker span {
    display: grid;
    place-items: center;
    height: 42px;
    color: #08c66d;
    font-size: 18px;
}

.platform-picker input:checked + span {
    background: #08c66d;
    color: #fff;
}

.publish-field input,
.publish-field textarea {
    width: 100%;
    border: 0;
    background: #fff;
    color: #222;
    font-size: 18px;
    outline: 0;
}

.publish-field input {
    height: 48px;
}

.publish-field textarea {
    min-height: 92px;
    resize: vertical;
}

.publish-field input::placeholder,
.publish-field textarea::placeholder {
    color: #c9c9c9;
}

.publish-image-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    margin-top: 24px;
}

.publish-upload {
    position: relative;
    display: grid;
    align-content: center;
    gap: 4px;
    place-items: center;
    width: 112px;
    height: 112px;
    border: 1px dashed #cfd4dc;
    border-radius: 12px;
    background: #f5f6f8;
    color: #9aa2ad;
    font-size: 30px;
    overflow: hidden;
    cursor: pointer;
}

.publish-upload small {
    font-size: 12px;
    font-weight: 700;
}

.publish-upload input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.discover-preview-grid {
    flex: 1 1 260px;
    display: grid;
    grid-template-columns: repeat(3, minmax(82px, 112px));
    gap: 10px;
    max-width: 356px;
}

.discover-preview-grid:empty {
    display: none;
}

.discover-preview-grid figure {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    background: #f2e3ca;
}

.discover-preview-grid img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discover-preview-grid figcaption {
    position: absolute;
    right: 4px;
    bottom: 4px;
    min-width: 22px;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .58);
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.publish-help {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.publish-submit-wrap {
    margin: 28px -22px 0;
    padding: 70px 22px 80px;
    background: #f6f6f6;
}

.publish-submit {
    width: 100%;
    height: 72px;
    border-radius: 999px;
    background: #08c66d;
    font-size: 20px;
}

.publish-message {
    min-height: 24px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 188px minmax(0, 1fr);
    min-height: 100vh;
    background: #eef3f7;
}

.admin-sidebar {
    background: #535e66;
    color: #fff;
}

.admin-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 24px;
}

.admin-brand strong {
    color: #4ea0ff;
    font-size: 30px;
}

.admin-brand span {
    color: rgba(255, 255, 255, .66);
}

.admin-menu {
    display: grid;
    gap: 4px;
    padding: 12px 0;
}

.admin-menu a {
    display: block;
    padding: 16px 26px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.admin-menu a.active {
    color: #ffd34a;
    background: rgba(0, 0, 0, .12);
}

.admin-main {
    min-width: 0;
    padding: 0 14px 28px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    margin: 0 -14px 10px;
    padding: 0 24px;
    background: #535e66;
    color: #fff;
}

.admin-topbar h1 {
    font-size: 24px;
}

.admin-topbar .header-link {
    background: #ff6b6b;
    color: #fff;
}

.admin-banner-form {
    grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.5fr) minmax(160px, 1.2fr) minmax(160px, 1.2fr) 78px 88px;
}

.inline-check {
    display: flex;
    align-items: center;
}

@media (max-width: 720px) {
    .admin-layout {
        display: block;
    }

    .admin-sidebar {
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .admin-brand {
        height: 54px;
    }

    .admin-menu {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        padding: 0 10px 10px;
    }

    .admin-menu a {
        padding: 10px 14px;
        white-space: nowrap;
    }

    .admin-topbar {
        min-height: 58px;
    }

    .ad-popup-image img,
    .ad-popup-placeholder {
        min-height: 260px;
        max-height: calc(90vh - 184px);
    }

    .ad-popup-panel p {
        font-size: 18px;
    }

    .find-search-panel {
        grid-template-columns: minmax(0, 1fr) 76px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .find-search-panel input {
        height: 58px;
        font-size: 18px;
    }

    .find-search-panel button {
        font-size: 23px;
    }

    .admin-banner-form {
        grid-template-columns: 1fr;
    }
}

.history-modal {
    align-items: flex-end;
    padding: 0;
}

.history-dialog {
    width: min(100%, 520px);
    max-height: 86vh;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
    background: #fff;
    color: var(--text);
    box-shadow: 0 -12px 30px rgba(0, 0, 0, .28);
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(135deg, rgba(255, 215, 106, .2), transparent 40%),
        linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
}

.history-header h2 {
    font-size: 20px;
}

.dark-text {
    color: rgba(255, 255, 255, .78);
}

.history-close {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.history-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    background: #fff9e7;
}

.history-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--muted);
}

.history-controls select {
    flex: 1;
    height: 40px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.history-list {
    display: grid;
    gap: 10px;
    max-height: calc(86vh - 146px);
    overflow: auto;
    padding: 12px;
    background: #fffdf6;
}

.history-item {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(113, 58, 22, .08);
}

.history-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.history-item-head strong {
    color: #08b857;
    font-size: 17px;
}

.history-item-head span {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.history-balls {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
}

.history-ball-wrap {
    display: grid;
    justify-items: center;
    gap: 4px;
}

.history-ball {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 4px solid #fb3038;
    border-radius: 50%;
    background: #fff;
    color: #666;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

.history-ball.green {
    border-color: #18c65a;
}

.history-ball.blue {
    border-color: #30a7ff;
}

.history-ball-wrap small {
    color: #6a5046;
    font-size: 11px;
}

.history-plus {
    align-self: center;
    color: #999;
    font-size: 21px;
    font-weight: 700;
}

.dark {
    background:
        radial-gradient(circle at top left, rgba(215, 25, 32, .24), transparent 32%),
        linear-gradient(180deg, #1d1210 0%, #100d0c 220px);
    color: #fff;
}

.dark .search-box,
.dark .card,
.dark .bottom-nav,
.dark .loading,
.dark .empty-message,
.dark .history-dialog,
.dark .history-controls,
.dark .history-controls label,
.dark .history-list,
.dark .history-item,
.dark .auth-card,
.dark .upload-card,
.dark .discover-feed,
.dark .discover-post,
.dark .me-profile,
.dark .me-card,
.dark .admin-card,
.dark .admin-stats-grid div,
.dark .admin-inline-form input,
.dark .admin-search-form input,
.dark .admin-user-name-form input,
.dark .admin-post-card,
.dark .admin-report-card,
.dark .admin-banner-card,
.dark .admin-maintenance-grid div,
.dark .admin-settings-form input,
.dark .admin-settings-form textarea,
.dark .admin-banner-form input,
.dark .admin-actions button,
.dark .admin-user-name-form button,
.dark .admin-batch-form button,
.dark .danger-btn,
.dark .ghost-btn,
.dark .share-link-box input,
.dark .browse-item,
.dark .auth-form input,
.dark .discover-form input,
.dark .discover-form textarea,
.dark .comment-form input {
    border-color: #3a2b24;
    background: #1d1715;
    color: #fff;
}

.dark .admin-post-check {
    background: rgba(29, 23, 21, .92);
}

.dark .title,
.dark .section-title h2,
.dark .search-box input {
    color: #fff;
}

.dark .search-box input {
    background: transparent;
}

.dark .notice-bar,
.dark .lottery-tab,
.dark .lottery-panel,
.dark .topbar,
.dark .quick-grid a,
.dark .quick-grid button {
    border-color: #3a2b24;
    background: #241a15;
    color: #e3c6a8;
}

.dark .topbar h1,
.dark .top-actions button {
    color: #fff;
}

.dark .backup-badge {
    background: #0aa857;
    color: #fff;
}

.dark .promo-strip {
    background: #d71920;
}

.dark .ball {
    background: #1d1715;
    color: #fff;
}

.dark .history-ball {
    background: #1d1715;
    color: #fff;
}

.dark .ball-meta,
.dark .history-ball-wrap small {
    color: #e3c6a8;
}

.dark .history-controls select {
    color: #fff;
}

.dark .comment-list {
    background: #241a15;
}

.dark .mine-guest-card,
.dark .mine-card,
.dark .discover-composer,
.dark .find-feed,
.dark .mine-menu a,
.dark .find-tabs button {
    border-color: #3a2b24;
    background: #1d1715;
    color: #fff;
}

.dark .mine-menu span,
.dark .composer-file span {
    background: #2b211b;
}

.dark .find-tabs button.active {
    background: linear-gradient(135deg, var(--red), #ff513e);
}

.dark .discover-post-head strong {
    color: #fff;
}

.dark .discover-actions button {
    border-color: #3a2b24;
    background: #241a15;
    color: #e3c6a8;
}

.dark .discover-actions button.liked,
.dark .comment-item button {
    color: #ff6b6f;
}

.dark .discover-actions a {
    color: #c9aa91;
}

.dark .more-comments-link {
    color: #ff6b6f;
}

.dark .discover-content,
.dark .comment-item,
.dark .browse-item h3 {
    color: #fff;
}

.dark .admin-table th,
.dark .admin-table td {
    border-color: #3a2b24;
}

.dark .status-bar,
.dark .bottom-nav-item {
    color: #c9aa91;
}

.dark .bottom-nav-item.active {
    color: #ff6b6f;
}

@media (max-width: 520px) {
    body {
        padding-bottom: 88px;
        background: #fff;
    }

    .app-shell {
        width: 100%;
        padding-right: 12px;
        padding-left: 12px;
        overflow: hidden;
        background: #fff;
    }

    .topbar {
        position: sticky;
        grid-template-columns: 1fr auto;
        min-height: 68px;
        margin: 0 -12px;
        padding: 8px 12px;
        border-bottom-color: #eee;
    }

    .backup-badge {
        display: none;
    }

    .topbar h1 {
        position: absolute;
        right: 0;
        left: 0;
        z-index: 0;
        padding: 0 150px 0 12px;
        color: #222;
        font-size: 25px;
        line-height: 1;
        pointer-events: none;
    }

    .top-actions {
        z-index: 1;
        grid-column: 2;
        width: 150px;
        grid-template-columns: repeat(3, 1fr);
    }

    .top-actions button {
        font-size: 13px;
    }

    .top-actions span {
        font-size: 25px;
    }

    .banner-carousel {
        margin: 0 -12px;
        background: #fff;
    }

    .banner-track {
        min-height: clamp(188px, 42vw, 256px);
    }

    .banner-slide {
        align-content: end;
        padding: 18px 18px 34px;
        background-color: #fff;
    }

    .banner-media {
        object-fit: cover;
        object-position: center;
    }

    .banner-slide strong,
    .banner-slide span,
    .banner-slide p {
        opacity: 0;
        pointer-events: none;
    }

    .banner-slide.image-banner {
        background-image: none !important;
        background-color: #fff;
    }

    .banner-slide.image-banner strong,
    .banner-slide.image-banner span,
    .banner-slide.image-banner p {
        opacity: 0;
    }

    .banner-dots {
        right: auto;
        bottom: 18px;
        left: 50%;
        transform: translateX(-50%);
    }

    .banner-dot {
        background: #f0f0f0;
    }

    .banner-dot.active {
        background: #fff;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, .05);
    }

    .promo-strip {
        margin: 0 -12px;
        padding: 9px 14px;
        font-size: 18px;
        line-height: 1.28;
    }

    .notice-bar {
        margin: 0 -12px 12px;
        padding: 9px 16px;
        font-size: 17px;
    }

    .notice-bar span {
        font-size: 18px;
    }

    .lottery-tabs {
        gap: 12px;
        margin: 0 0 50px;
    }

    .lottery-tab {
        min-height: 66px;
        border-radius: 8px 8px 0 0;
    }

    .lottery-tab strong {
        margin-bottom: 3px;
        font-size: 21px;
    }

    .lottery-tab span {
        font-size: 17px;
    }

    .lottery-panel {
        margin: 0 0 18px;
        padding: 18px 10px 12px;
        border-radius: 3px;
    }

    .live-ribbon {
        top: -40px;
        width: 166px;
        height: 48px;
        padding-top: 12px;
        font-size: 18px;
    }

    .lottery-head {
        grid-template-columns: auto 1fr auto;
        gap: 6px;
        margin-bottom: 10px;
        font-size: 14px;
    }

    .lottery-head strong {
        font-size: 22px;
    }

    .lottery-head .countdown strong {
        font-size: 15px;
    }

    .history-link {
        font-size: 14px;
    }

    .lottery-balls {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr)) 14px minmax(0, 1fr);
        gap: 3px;
        min-height: 78px;
        align-items: start;
    }

    .ball-item {
        gap: 5px;
        min-width: 0;
    }

    .ball {
        width: clamp(40px, 10.6vw, 52px);
        height: clamp(40px, 10.6vw, 52px);
        border-width: 5px;
        font-size: clamp(18px, 5.2vw, 24px);
    }

    .ball-meta {
        font-size: 13px;
    }

    .ball-item.pending .ball-meta {
        max-width: 44px;
        font-size: 11px;
    }

    .ball-plus {
        align-self: start;
        padding-top: 12px;
        font-size: 25px;
    }

    .lottery-next {
        margin-top: 4px;
        font-size: 15px;
        line-height: 1.35;
    }

    .type-tabs {
        gap: 12px;
        margin-bottom: 14px;
    }

    .type-tab {
        min-height: 46px;
        border-radius: 999px;
        font-size: 17px;
    }

    .search-panel {
        grid-template-columns: minmax(0, 1fr) 86px;
        gap: 12px;
        margin-bottom: 14px;
    }

    .search-box {
        height: 48px;
        border-radius: 10px;
    }

    .search-box input {
        height: 46px;
        font-size: 16px;
    }

    .searchBtn,
    .primary-btn {
        border-radius: 10px;
        font-size: 17px;
    }

    .quick-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .quick-grid a,
    .quick-grid button {
        min-height: 48px;
        border-radius: 8px;
        font-size: 15px;
    }

    .bottom-nav {
        right: 0;
        left: 0;
        width: 100%;
        padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
        border-color: #eaeaea;
        border-radius: 16px 16px 0 0;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 -6px 18px rgba(0, 0, 0, .08);
    }

    .bottom-nav-item {
        color: #777;
        font-size: 12px;
        min-height: 50px;
    }

    .bottom-nav-item span {
        font-size: 22px;
    }

    .bottom-nav-item.active {
        color: #0bbf62;
    }

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

    .checkin-grid button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 380px) {
    .topbar {
        grid-template-columns: 94px 1fr 108px;
        gap: 5px;
        padding-right: 7px;
        padding-left: 7px;
    }

    .topbar h1 {
        font-size: 22px;
    }

    .backup-badge {
        padding-right: 5px;
        padding-left: 5px;
    }

    .backup-badge strong {
        font-size: 14px;
    }

    .top-actions button {
        font-size: 12px;
    }

    .top-actions span {
        font-size: 21px;
    }

    .site-header h1 {
        font-size: 21px;
    }

    .type-tabs {
        gap: 6px;
    }

    .type-tab {
        font-size: 13px;
    }

    .gallery-grid {
        gap: 7px;
    }

    .banner-slide p {
        max-width: 90%;
        font-size: 14px;
    }

    .banner-track {
        min-height: 176px;
    }

    .banner-slide strong {
        font-size: 23px;
    }

    .notice-bar {
        font-size: 15px;
    }

    .quick-grid {
        gap: 6px;
    }

    .quick-grid a,
    .quick-grid button {
        min-height: 40px;
        font-size: 12px;
    }

    .mine-profile-top {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .mine-profile-top form {
        grid-column: 1 / -1;
        justify-self: end;
    }

    .mine-menu {
        gap: 6px;
    }

    .mine-menu a {
        min-height: 66px;
        font-size: 12px;
    }

    .mine-copy-row {
        grid-template-columns: 1fr;
    }

    .find-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .find-tabs {
        gap: 6px;
    }

    .lottery-panel {
        margin-right: 4px;
        margin-left: 4px;
        padding-right: 8px;
        padding-left: 8px;
    }

    .lottery-head {
        grid-template-columns: 1fr;
        gap: 4px;
        text-align: center;
    }

    .lottery-balls {
        gap: 4px;
    }

    .ball {
        width: 44px;
        height: 44px;
        border-width: 5px;
        font-size: 20px;
    }

    .ball-meta {
        font-size: 12px;
    }

    .ball-plus {
        font-size: 24px;
    }

    .history-balls {
        gap: 3px;
    }

    .history-ball {
        width: 31px;
        height: 31px;
        border-width: 3px;
        font-size: 14px;
    }

    .history-ball-wrap small {
        font-size: 10px;
    }

    .admin-inline-form {
        grid-template-columns: 1fr;
    }

    .admin-search-form {
        grid-template-columns: 1fr;
    }

    .admin-banner-form {
        grid-template-columns: 1fr;
    }

    .admin-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-maintenance-grid {
        grid-template-columns: 1fr;
    }

    .admin-post-card {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .admin-post-cover,
    .admin-post-cover > img {
        width: 88px;
        height: 112px;
    }

    .admin-report-card {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .admin-report-cover {
        width: 76px;
        height: 96px;
    }

    .admin-banner-card {
        grid-template-columns: 1fr;
    }

    .admin-banner-card img {
        width: 100%;
        height: 130px;
    }
}

@media (max-width: 380px) {
    .topbar {
        grid-template-columns: 1fr auto;
        gap: 8px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .backup-badge {
        display: none;
    }

    .topbar h1 {
        position: absolute;
        right: 0;
        left: 0;
        padding: 0 136px 0 10px;
        font-size: 23px;
        text-align: center;
    }

    .top-actions {
        grid-column: 2;
        width: 136px;
    }

    .lottery-head {
        grid-template-columns: auto 1fr auto;
        gap: 4px;
        font-size: 13px;
        text-align: left;
    }

    .lottery-head strong {
        font-size: 20px;
    }

    .lottery-head .countdown strong,
    .history-link {
        font-size: 13px;
    }

    .lottery-balls {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr)) 12px minmax(0, 1fr);
        gap: 2px;
    }

    .ball {
        width: clamp(38px, 10.4vw, 44px);
        height: clamp(38px, 10.4vw, 44px);
        border-width: 5px;
        font-size: 19px;
    }

    .ball-meta {
        font-size: 11px;
    }

    .ball-item.pending .ball-meta {
        max-width: 38px;
        font-size: 10px;
    }

    .ball-plus {
        padding-top: 10px;
        font-size: 22px;
    }
}
