/* =====================================================================
   摸鱼树洞 —— 样式
   调性：温暖 / 柔软 / 像深夜的一杯热可可
   ===================================================================== */

/* ---- 调色板 ---- */
:root {
    --th-cream:    #fff8ee;
    --th-cream-2:  #fbeed8;
    --th-warm:     #f5e6c8;
    --th-coffee:   #b89671;
    --th-coffee-d: #8c6b48;
    --th-rose:     #f5a896;
    --th-rose-d:   #e08a78;
    --th-mint:     #b9d4b9;
    --th-mint-d:   #88b889;
    --th-night:    #6b4f3a;
    --th-line:     #ead9b8;
    --th-line-2:   #f1e2c1;
    --th-text:     #5a4634;
    --th-text-soft:#8a7458;
    --th-danger:   #d96560;
    --th-me-bg:    #fff1d8;
    --th-shadow-sm:0 1px 2px rgba(180, 130, 70, 0.08);
    --th-shadow:   0 4px 18px rgba(180, 130, 70, 0.10);
    --th-shadow-lg:0 12px 36px rgba(180, 130, 70, 0.14);
    --th-radius:   16px;
    --th-radius-sm:10px;
}

/* ---- 基础重置 ---- */
.th-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--th-text);
    line-height: 1.7;
    font-size: 15px;
    padding: 0 0 40px;
    min-height: 60vh;
}

/* ---- 全站背景层（浮动装饰）---- */
.th-bg-decor {
    position: relative;
    overflow: hidden;
}
.th-bg-decor::before,
.th-bg-decor::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
}
.th-bg-decor::before {
    width: 240px; height: 240px;
    top: 8%; left: -60px;
    background:
        radial-gradient(circle at 30% 50%, rgba(255,255,255,0.85) 0 22%, transparent 23%),
        radial-gradient(circle at 60% 45%, rgba(255,255,255,0.85) 0 28%, transparent 29%),
        radial-gradient(circle at 80% 60%, rgba(255,255,255,0.85) 0 20%, transparent 21%);
    filter: blur(2px);
    animation: th-float-cloud 32s linear infinite;
}
.th-bg-decor::after {
    width: 360px; height: 360px;
    bottom: 6%; right: -80px;
    background-image:
        radial-gradient(circle, rgba(245,168,150,0.35) 0 4px, transparent 5px),
        radial-gradient(circle, rgba(185,212,185,0.30) 0 3px, transparent 4px),
        radial-gradient(circle, rgba(184,150,113,0.25) 0 5px, transparent 6px);
    background-size: 120px 120px, 80px 80px, 150px 150px;
    background-position: 0 0, 40px 60px, 90px 30px;
    animation: th-float-cloud 48s linear infinite reverse;
    opacity: 0.4;
}
@keyframes th-float-cloud {
    from { transform: translateX(0); }
    to   { transform: translateX(120vw); }
}

.th-wrap > * { position: relative; z-index: 1; }

/* ---- 容器 ---- */
.th-wrap .container {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 16px;
}

/* =====================================================================
   Hero 区
   ===================================================================== */
.th-hero {
    position: relative;
    margin: 16px 0 28px;
    padding: 28px 32px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, #fde7c8 0%, #fbd0b8 50%, #e8b8d0 100%);
    box-shadow: var(--th-shadow);
    overflow: hidden;
}
.th-hero::before {
    content: "\1F319";
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 64px;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
    animation: th-bob 4s ease-in-out infinite;
    pointer-events: none;
}
.th-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.6) 0 2px, transparent 3px),
        radial-gradient(circle at 70% 60%, rgba(255,255,255,0.5) 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 85% 25%, rgba(255,255,255,0.7) 0 2.5px, transparent 3.5px),
        radial-gradient(circle at 50% 80%, rgba(255,255,255,0.4) 0 1.5px, transparent 2.5px);
    pointer-events: none;
}
@keyframes th-bob {
    0%, 100% { transform: translateY(-50%) rotate(-3deg); }
    50%      { transform: translateY(-58%) rotate(3deg); }
}
.th-hero-inner {
    position: relative;
    z-index: 1;
    padding-left: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.th-hero-text h1 {
    margin: 0 0 4px;
    font-size: 28px;
    font-weight: 800;
    color: #6b3a20;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.th-hero-text p {
    margin: 0 0 14px;
    color: #7d4f30;
    font-size: 14px;
    opacity: 0.92;
}
.th-hero-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #6b3a20;
}
.th-hero-stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.55);
    border-radius: 999px;
    backdrop-filter: blur(4px);
}
.th-hero-greet {
    background: rgba(255,255,255,0.7);
    color: #7d4f30;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: var(--th-shadow-sm);
    backdrop-filter: blur(6px);
}
.th-hero-greet b { color: #6b3a20; }

/* =====================================================================
   发帖框
   ===================================================================== */
.th-composer {
    background: var(--th-cream);
    border-radius: var(--th-radius);
    box-shadow: var(--th-shadow);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--th-line-2);
    position: relative;
}
.th-composer::before {
    content: "\1F43E";
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 20px;
    background: var(--th-cream);
    padding: 0 6px;
    line-height: 1;
}
.th-composer::after {
    content: "\2615";
    position: absolute;
    bottom: -8px;
    right: 28px;
    font-size: 18px;
    opacity: 0.5;
}
.th-composer-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.th-composer-head .th-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--th-rose), var(--th-coffee));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(245,168,150,0.4);
    flex-shrink: 0;
}
.th-nick-input {
    flex: 1;
    min-width: 140px;
    border: 1px solid var(--th-line);
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    color: var(--th-text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.th-nick-input:focus {
    border-color: var(--th-rose);
    box-shadow: 0 0 0 3px rgba(245,168,150,0.18);
}
.th-nick-shuffle {
    border: none;
    background: transparent;
    color: var(--th-coffee-d);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}
.th-nick-shuffle:hover { background: var(--th-warm); }
.th-nick-shuffle:active { transform: scale(0.95); }

.th-textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    border: 1px solid var(--th-line);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fffdf7;
    font-size: 15px;
    line-height: 1.7;
    color: var(--th-text);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.th-textarea:focus {
    border-color: var(--th-rose);
    box-shadow: 0 0 0 3px rgba(245,168,150,0.15);
}
.th-textarea::placeholder { color: var(--th-text-soft); opacity: 0.6; }

.th-composer-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    gap: 10px;
    flex-wrap: wrap;
}
.th-count {
    font-size: 12px;
    color: var(--th-text-soft);
}
.th-count b { color: var(--th-text); font-weight: 600; }

.th-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    font-family: inherit;
}
.th-btn-primary {
    background: linear-gradient(135deg, var(--th-rose), var(--th-rose-d));
    color: #fff;
    box-shadow: 0 4px 12px rgba(245,168,150,0.4);
}
.th-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(245,168,150,0.5); }
.th-btn-primary:active { transform: translateY(0); }
.th-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.th-btn-ghost {
    background: transparent;
    color: var(--th-coffee-d);
    border: 1px solid var(--th-line);
}
.th-btn-ghost:hover { background: var(--th-warm); }

.th-btn-danger {
    background: linear-gradient(135deg, var(--th-danger), #c44e4a);
    color: #fff;
    box-shadow: 0 4px 12px rgba(217,101,96,0.35);
}
.th-btn-danger:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(217,101,96,0.45); }

/* =====================================================================
   公约
   ===================================================================== */
.th-rule {
    margin-bottom: 22px;
    padding: 14px 18px;
    background: linear-gradient(90deg, #e8f0e5 0%, #f0e8d4 100%);
    border-radius: 14px;
    border-left: 4px solid var(--th-mint-d);
    font-size: 13px;
    color: var(--th-night);
    line-height: 1.9;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: center;
}
.th-rule b { color: var(--th-coffee-d); margin-right: 4px; }
.th-rule span { white-space: nowrap; }

/* =====================================================================
   时间分组（按天）
   ===================================================================== */
.th-day-group {
    margin-bottom: 28px;
}
.th-day-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 14px;
    color: var(--th-text-soft);
    font-size: 13px;
}
.th-day-head::before,
.th-day-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--th-line), transparent);
}
.th-day-head .th-day-label {
    padding: 4px 14px;
    background: var(--th-cream-2);
    border-radius: 999px;
    border: 1px solid var(--th-line);
    font-weight: 500;
}

/* =====================================================================
   帖子卡片
   ===================================================================== */
.th-item {
    position: relative;
    background: var(--th-cream);
    border-radius: var(--th-radius);
    padding: 18px 20px 14px;
    margin-bottom: 16px;
    box-shadow: var(--th-shadow-sm);
    border: 1px solid var(--th-line-2);
    transition: transform 0.25s, box-shadow 0.25s;
    animation: th-item-in 0.4s ease;
}
.th-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--th-shadow);
}
.th-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    bottom: 18px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--th-rose), var(--th-coffee));
    opacity: 0.6;
}
.th-item.th-item-mine {
    background: var(--th-me-bg);
    border-color: #f3dcaf;
}
.th-item.th-item-mine::before {
    background: linear-gradient(180deg, var(--th-rose-d), var(--th-rose));
    opacity: 1;
}
@keyframes th-item-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.th-item-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.th-avatar-sm {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--th-rose), var(--th-coffee));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.th-item-mine .th-avatar-sm {
    background: linear-gradient(135deg, var(--th-rose-d), #d96560);
}
.th-nick { font-weight: 600; color: var(--th-night); font-size: 14px; }
.th-tag-mine {
    background: linear-gradient(135deg, var(--th-rose), var(--th-rose-d));
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.4;
}
.th-tag-user {
    background: rgba(139, 179, 132, 0.14);
    color: #6a9264;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.4;
    border: 1px solid rgba(139, 179, 132, 0.32);
    white-space: nowrap;
}
.th-time {
    font-size: 12px;
    color: var(--th-text-soft);
    margin-left: auto;
    white-space: nowrap;
}

.th-content {
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--th-text);
    padding: 6px 0 10px;
    font-size: 15px;
    line-height: 1.85;
}
.th-content .th-redacted {
    background: #e8e0d0;
    color: transparent;
    border-radius: 4px;
    padding: 0 6px;
    user-select: none;
    text-shadow: none;
    position: relative;
    display: inline-block;
}
.th-content .th-redacted::before {
    content: "***";
    color: #a89678;
    font-weight: 600;
    letter-spacing: 1px;
}

.th-filtered-note {
    display: inline-block;
    margin: -4px 0 10px;
    font-size: 12px;
    color: var(--th-coffee-d);
    background: var(--th-warm);
    padding: 4px 10px;
    border-radius: 6px;
    border-left: 3px solid var(--th-rose);
}

.th-item-foot {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--th-line);
    font-size: 13px;
    color: var(--th-text-soft);
}
.th-action {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--th-text-soft);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    font-family: inherit;
}
.th-action:hover { background: var(--th-warm); color: var(--th-coffee-d); }
.th-action:active { transform: scale(0.92); }
.th-action:disabled { opacity: 0.55; cursor: not-allowed; }

/* 抱抱按钮特殊态 */
.th-hug-btn { position: relative; overflow: visible; }
.th-hug-btn.is-hugged { color: var(--th-rose-d); }
.th-hug-btn.is-hugged:hover { color: var(--th-rose-d); background: rgba(245,168,150,0.15); }

/* 抱抱飘心 */
.th-hug-heart {
    position: absolute;
    pointer-events: none;
    font-size: 22px;
    line-height: 1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: th-hug-fly 1s ease-out forwards;
    z-index: 5;
}
@keyframes th-hug-fly {
    0%   { opacity: 1; transform: translate(-50%, -10%) scale(0.5) rotate(0deg); }
    60%  { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -180%) scale(1.4) rotate(20deg); }
}

/* 举报按钮 */
.th-report-btn:hover { color: var(--th-danger); background: rgba(217,101,96,0.10); }

/* =====================================================================
   回复列表
   ===================================================================== */
.th-replies {
    margin-top: 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.55);
    border-radius: 12px;
    border: 1px dashed var(--th-line);
}
.th-replies-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--th-coffee-d);
    font-size: 13px;
    padding: 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
}
.th-replies-toggle:hover { color: var(--th-rose-d); }
.th-replies-toggle .th-arrow {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 11px;
}
.th-replies.open .th-replies-toggle .th-arrow { transform: rotate(90deg); }

.th-replies-list {
    margin-top: 10px;
    display: none;
    padding-top: 8px;
    border-top: 1px dashed var(--th-line);
}
.th-replies.open .th-replies-list { display: block; }

.th-reply {
    padding: 8px 0;
    border-bottom: 1px dashed var(--th-line-2);
    font-size: 13px;
    color: var(--th-text);
    animation: th-fade-in 0.3s ease;
}
.th-reply:last-child { border-bottom: none; }
.th-reply-mine {
    background: linear-gradient(90deg, transparent, rgba(245,168,150,0.10), transparent);
    border-radius: 8px;
    padding-left: 8px;
    padding-right: 8px;
}
.th-reply-avatar {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--th-mint), var(--th-mint-d));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}
.th-reply-name {
    font-weight: 600;
    color: var(--th-night);
    font-size: 13px;
}
.th-reply-time {
    color: var(--th-text-soft);
    font-size: 11px;
}
.th-replies-empty {
    color: var(--th-text-soft);
    font-size: 12px;
    padding: 6px 0 8px;
    text-align: center;
    background: rgba(255,255,255,0.4);
    border-radius: 8px;
    margin-bottom: 6px;
}
.th-reply-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.th-reply-content {
    white-space: pre-wrap;
    word-break: break-word;
    padding-left: 0;
    line-height: 1.7;
}
@keyframes th-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 回复表单 */
.th-reply-form {
    margin-top: 10px;
    display: none;
}
.th-replies.open .th-reply-form { display: block; }
.th-reply-input {
    width: 100%;
    min-height: 60px;
    resize: vertical;
    border: 1px solid var(--th-line);
    border-radius: 10px;
    padding: 8px 12px;
    background: #fffdf7;
    font-size: 13px;
    color: var(--th-text);
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.th-reply-input:focus {
    border-color: var(--th-rose);
    box-shadow: 0 0 0 3px rgba(245,168,150,0.15);
}
.th-reply-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.th-reply-hint { font-size: 11px; color: var(--th-text-soft); }

/* =====================================================================
   空状态
   ===================================================================== */
.th-empty {
    text-align: center;
    padding: 60px 20px 40px;
    color: var(--th-text-soft);
}
.th-empty .th-empty-icon {
    font-size: 80px;
    display: block;
    margin-bottom: 16px;
    animation: th-breathe 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(180,130,70,0.15));
}
@keyframes th-breathe {
    0%, 100% { transform: scale(1) rotate(-2deg); }
    50%      { transform: scale(1.08) rotate(2deg); }
}
.th-empty h3 {
    margin: 0 0 6px;
    color: var(--th-coffee-d);
    font-size: 17px;
    font-weight: 600;
}
.th-empty p { margin: 0; font-size: 13px; opacity: 0.85; }

/* =====================================================================
   分页
   ===================================================================== */
.th-pager {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.th-pager a, .th-pager span {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--th-cream);
    color: var(--th-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border: 1px solid var(--th-line-2);
    transition: background 0.2s, transform 0.15s;
}
.th-pager a:hover { background: var(--th-warm); transform: translateY(-1px); }
.th-pager .active { background: linear-gradient(135deg, var(--th-rose), var(--th-rose-d)); color: #fff; border-color: transparent; }
.th-pager .disabled { opacity: 0.45; pointer-events: none; }

/* =====================================================================
   Toast
   ===================================================================== */
.th-toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(60,40,20,0.92);
    color: #fff8ee;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 13px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    max-width: 80vw;
    text-align: center;
}
.th-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.th-toast.th-toast-err { background: rgba(217,101,96,0.95); }
.th-toast.th-toast-ok  { background: rgba(136,184,137,0.95); }

/* =====================================================================
   举报弹层
   ===================================================================== */
.th-modal-mask {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(30, 20, 10, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: th-mask-in 0.2s ease;
}
.th-modal-mask[hidden] { display: none; }
@keyframes th-mask-in { from { opacity: 0; } to { opacity: 1; } }

.th-modal {
    width: 100%;
    max-width: 460px;
    background: var(--th-cream);
    border-radius: 20px;
    padding: 22px 22px 20px;
    box-shadow: var(--th-shadow-lg);
    animation: th-modal-in 0.25s cubic-bezier(0.2, 0.8, 0.4, 1.1);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
@keyframes th-modal-in {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.th-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.th-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--th-night);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.th-modal-close {
    background: none;
    border: none;
    color: var(--th-text-soft);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s, transform 0.15s;
}
.th-modal-close:hover { color: var(--th-night); transform: rotate(90deg); }
.th-modal-desc {
    margin: 0 0 14px;
    font-size: 12px;
    color: var(--th-text-soft);
    line-height: 1.6;
}
.th-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.th-reason {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--th-line);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--th-text);
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.th-reason:hover { border-color: var(--th-rose); background: #fff7eb; }
.th-reason input { margin-right: 6px; accent-color: var(--th-rose-d); }
.th-reason:has(input:checked) {
    border-color: var(--th-rose-d);
    background: #fff1d8;
    color: var(--th-night);
    font-weight: 600;
}
.th-modal-input {
    width: 100%;
    min-height: 60px;
    border: 1px solid var(--th-line);
    border-radius: 10px;
    padding: 8px 12px;
    background: #fffdf7;
    font-size: 13px;
    font-family: inherit;
    color: var(--th-text);
    box-sizing: border-box;
    resize: vertical;
    outline: none;
}
.th-modal-input:focus { border-color: var(--th-rose); box-shadow: 0 0 0 3px rgba(245,168,150,0.15); }
.th-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

/* =====================================================================
   底部感言
   ===================================================================== */
.th-footer-msg {
    text-align: center;
    margin-top: 36px;
    padding: 24px 16px;
    color: var(--th-text-soft);
    font-size: 13px;
    position: relative;
}
.th-footer-msg::before {
    content: "\2740 \273F \2740";
    display: block;
    color: var(--th-rose);
    letter-spacing: 8px;
    margin-bottom: 8px;
    opacity: 0.6;
    font-size: 12px;
}
.th-footer-msg p { margin: 4px 0; }
.th-footer-msg .th-footer-quote {
    font-size: 12px;
    opacity: 0.75;
    font-style: italic;
}

/* =====================================================================
   日期 · 摸鱼进度
   ===================================================================== */
.th-today {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px dashed rgba(245, 168, 150, 0.55);
    border-radius: 12px;
}
.th-today-date {
    font-weight: 700;
    color: var(--th-night);
    font-size: 14px;
}
.th-today-week {
    font-size: 12px;
    color: var(--th-coffee-d);
    background: var(--th-warm);
    padding: 2px 10px;
    border-radius: 999px;
}
.th-today-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 180px;
    margin-left: auto;
}
.th-today-label {
    font-size: 12px;
    color: var(--th-coffee-d);
    white-space: nowrap;
}
.th-progress-track {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: rgba(245, 168, 150, 0.25);
    overflow: hidden;
}
.th-progress-bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--th-mint), #74c69d, var(--th-rose));
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.th-progress-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--th-mint-d);
    min-width: 38px;
    text-align: right;
}

/* =====================================================================
   快捷键提示 · 底部感言小字
   ===================================================================== */
.th-kbd-hint {
    font-size: 12px;
    color: var(--th-text-soft);
    margin-left: 4px;
    white-space: nowrap;
}
.th-footer-sub {
    margin-top: 8px;
    font-size: 12px;
    color: var(--th-text-soft);
    opacity: 0.9;
}
.th-footer-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--th-text-soft);
    opacity: 0.8;
    animation: th-hint-blink 3.2s ease-in-out infinite;
}
@keyframes th-hint-blink {
    0%, 100% { opacity: 0.8; }
    50%      { opacity: 0.35; }
}
.th-link-login {
    color: var(--th-rose-d);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
}
.th-link-login:hover { opacity: 0.8; }
.th-checkin-hint b { color: var(--th-rose-d); }
.th-reply-count {
    font-size: 11px;
    color: var(--th-text-soft);
    margin-left: auto;
    background: rgba(255, 255, 255, 0.6);
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

/* =====================================================================
   背景漂浮小鱼（会浮沉、摆尾、吐泡泡，可被渔网捞起）
   ===================================================================== */
.th-fish {
    position: absolute;
    left: -60px;
    top: 0;
    z-index: 0;
    font-size: 26px;
    line-height: 1;
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
    animation: th-fish-swim 24s linear infinite;
}
.th-fish i {
    display: inline-block;
    font-style: normal;
    animation: th-fish-bob 2.6s ease-in-out infinite;
}
.th-fish-1 { top: 16%; font-size: 26px; animation-duration: 26s; animation-delay: 0s; }
.th-fish-1 i { animation-duration: 2.2s; }
.th-fish-2 { top: 42%; font-size: 19px; opacity: 0.32; animation-duration: 34s; animation-delay: -9s; }
.th-fish-2 i { animation-duration: 3.1s; animation-delay: -0.8s; }
.th-fish-3 { top: 66%; font-size: 30px; opacity: 0.42; animation-duration: 40s; animation-delay: -19s; }
.th-fish-3 i { animation-duration: 2.6s; animation-delay: -1.4s; }
.th-fish-4 { top: 86%; font-size: 17px; opacity: 0.28; animation-duration: 30s; animation-delay: -5s; }
.th-fish-4 i { animation-duration: 1.9s; }

/* 稀有小鱼：微微发光，透出一点神秘感 */
.th-fish.th-fish-rare { opacity: 0.62; }
.th-fish-rare i {
    text-shadow: 0 0 6px rgba(255, 215, 120, 0.95), 0 0 14px rgba(255, 190, 80, 0.55);
}

@keyframes th-fish-swim {
    0%   { transform: translateX(0) rotate(0deg); }
    48%  { transform: translateX(108vw) rotate(0deg); }
    52%  { transform: translateX(108vw) rotate(180deg); }
    98%  { transform: translateX(0) rotate(180deg); }
    100% { transform: translateX(0) rotate(0deg); }
}
@keyframes th-fish-bob {
    0%, 100% { transform: translateY(-7px) rotate(-9deg) scale(1); }
    50%      { transform: translateY(7px)  rotate(9deg)  scale(1.06); }
}

/* 小鱼吐的泡泡 */
.th-bubble {
    position: fixed;
    z-index: 5;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.95), rgba(150, 205, 245, 0.35));
    box-shadow: inset -1px -1px 2px rgba(90, 140, 190, 0.25);
    pointer-events: none;
    animation: th-bubble-rise 2.2s ease-in forwards;
}
@keyframes th-bubble-rise {
    0%   { transform: translate(0, 0) scale(0.45); opacity: 0.85; }
    100% { transform: translate(8px, -72px) scale(1.2); opacity: 0; }
}

/* 捞到鱼时的水花 */
.th-splash {
    position: fixed;
    z-index: 75;
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
    animation: th-splash-out 0.6s ease-out forwards;
}
@keyframes th-splash-out {
    0%   { transform: translate(0, 0) scale(0.5); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(1.15); opacity: 0; }
}

/* =====================================================================
   回顶部
   ===================================================================== */
.th-back-top {
    position: fixed;
    right: 24px;
    bottom: 28px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #a8d5ba, var(--th-mint-d));
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    box-shadow: 0 6px 18px rgba(127, 196, 160, 0.4);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 60;
}
.th-back-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.th-back-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(127, 196, 160, 0.55);
}

/* =====================================================================
   图形验证码
   ===================================================================== */
.th-captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px dashed rgba(245, 168, 150, 0.5);
    border-radius: 10px;
}
.th-captcha-img {
    height: 46px;
    width: 120px;
    flex: 0 0 auto;
    object-fit: fill;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #f0d9cc;
}
.th-captcha-refresh {
    border: none;
    background: transparent;
    color: var(--th-mint-d);
    font-size: 12px;
    cursor: pointer;
    padding: 6px 4px;
    white-space: nowrap;
}
.th-captcha-refresh:hover { color: var(--th-coffee-d); }
.th-captcha-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #ead9cf;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    background: #fff;
    color: var(--th-night);
    letter-spacing: 4px;
}
.th-captcha-input:focus {
    outline: none;
    border-color: var(--th-mint);
    box-shadow: 0 0 0 3px rgba(168, 213, 186, 0.25);
}

/* =====================================================================
   下班倒计时
   ===================================================================== */
.th-countdown {
    font-size: 13px;
    font-weight: 700;
    color: var(--th-rose);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    background: rgba(255, 214, 200, 0.45);
    padding: 3px 10px;
    border-radius: 999px;
}

/* =====================================================================
   打卡 + 幸运签入口
   ===================================================================== */
.th-feature-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 18px 0 4px;
}
.th-feature-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    border: none;
    border-radius: 16px;
    padding: 14px 16px;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 4px 16px rgba(230, 200, 185, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}
.th-feature-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(230, 200, 185, 0.5);
}
.th-checkin-btn {
    background: linear-gradient(135deg, #fff, #eef7f0);
    border: 1px solid #d8ecd9;
}
.th-fortune-btn {
    background: linear-gradient(135deg, #fff, #fff4ec);
    border: 1px solid #f3dfce;
}
.th-feature-icon {
    font-size: 26px;
    flex: 0 0 auto;
}
.th-feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.th-feature-text b {
    font-size: 15px;
    color: var(--th-night);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.th-feature-text i {
    font-size: 12px;
    color: var(--th-text-soft);
    font-style: normal;
}
.th-streak-badge {
    display: none;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: #b7791f;
    background: #fdf1d7;
    padding: 1px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.th-checkin-status,
.th-fortune-go {
    margin-left: auto;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--th-mint-d);
    background: rgba(168, 213, 186, 0.25);
    padding: 5px 12px;
    border-radius: 999px;
    white-space: nowrap;
}
.th-checkin-btn[data-checked="1"] .th-checkin-status {
    color: #b7791f;
    background: rgba(253, 241, 215, 0.9);
}
.th-fortune-go {
    color: #d9803f;
    background: rgba(255, 224, 200, 0.5);
}

/* =====================================================================
   本周最暖 Top3
   ===================================================================== */
.th-top {
    margin: 18px 0 6px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7f0, #fffaf4);
    border: 1px solid #f4e2d0;
}
.th-top-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}
.th-top-title {
    font-weight: 800;
    color: #d9803f;
    font-size: 15px;
}
.th-top-sub {
    font-size: 12px;
    color: var(--th-text-soft);
}
.th-top-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.th-top-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}
.th-top-item:hover {
    background: #fff;
    transform: translateX(3px);
}
.th-top-rank {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: #c9c2b8;
}
.th-top-rank-1 { background: linear-gradient(135deg, #f6c453, #e8a33d); }
.th-top-rank-2 { background: linear-gradient(135deg, #b8c6d4, #93a5b8); }
.th-top-rank-3 { background: linear-gradient(135deg, #d9a06b, #c07e4a); }
.th-top-content {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--th-night);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.th-top-meta {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--th-text-soft);
    white-space: nowrap;
}

/* =====================================================================
   幸运签弹窗
   ===================================================================== */
.th-modal-fortune { max-width: 340px; }
.th-fortune-card {
    margin-top: 6px;
    padding: 22px 20px;
    border-radius: 16px;
    background: linear-gradient(160deg, #fff6ea, #fdecd8);
    border: 1px solid #f2d8b8;
    text-align: center;
    position: relative;
}
.th-fortune-banner {
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    color: #b7791f;
    background: #fdf1d7;
    padding: 4px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
}
.th-fortune-text {
    font-size: 16px;
    font-weight: 600;
    color: #7c5a33;
    line-height: 1.7;
    min-height: 56px;
}
.th-fortune-tip {
    margin-top: 14px;
    font-size: 12px;
    color: #b08d63;
    background: rgba(255, 255, 255, 0.6);
    padding: 6px 12px;
    border-radius: 8px;
    border-left: 3px solid #e8b576;
}
body.th-lock { overflow: hidden; }

/* =====================================================================
   捞鱼小游戏（点击角标召唤渔网）
   ===================================================================== */
.th-net {
    position: fixed;
    left: -200px;
    top: -200px;
    z-index: 60;
    display: none;
    font-size: 52px;
    line-height: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 8px 12px rgba(80, 60, 40, 0.28));
    opacity: 0.9;
    user-select: none;
}
.th-net.active {
    display: block;
    animation: th-net-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes th-net-pop {
    0%   { transform: translate(-50%, -50%) scale(0.15) rotate(-35deg); opacity: 0; }
    60%  { transform: translate(-50%, -50%) scale(1.12) rotate(6deg);  opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0);        opacity: 0.9; }
}
.th-catch-badge {
    position: fixed;
    right: 18px;
    bottom: 96px;
    z-index: 55;
    background: linear-gradient(135deg, #fff8ef, #ffedd9);
    border: 1px solid #f0d5b8;
    color: #8a6b45;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(180, 130, 80, 0.18);
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    animation: th-badge-hint 3s ease-in-out 1.4s infinite;
}
.th-catch-badge:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(180, 130, 80, 0.3); }
.th-catch-badge:active { transform: scale(0.94); }
.th-catch-badge.is-active {
    background: linear-gradient(135deg, #e8f7ff, #d4edff);
    border-color: #9fd0ee;
    color: #2c6a8c;
    box-shadow: 0 6px 18px rgba(80, 150, 200, 0.28);
    animation: th-badge-sway 2.4s ease-in-out infinite;
}
.th-catch-badge b { color: var(--th-rose-d); font-size: 15px; }
@keyframes th-badge-hint {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}
@keyframes th-badge-sway {
    0%, 100% { transform: rotate(0); }
    50%      { transform: rotate(-6deg); }
}
.th-catch-badge.is-rare {
    animation: th-badge-rare 0.6s ease-in-out 4;
}
@keyframes th-badge-rare {
    0%, 100% { box-shadow: 0 0 0 rgba(255, 200, 80, 0); }
    50%      { box-shadow: 0 0 18px 5px rgba(255, 200, 80, 0.75); }
}

/* =====================================================================
   响应式
   ===================================================================== */
@media (max-width: 640px) {
    .th-hero { padding: 22px 18px; }
    .th-hero::before { font-size: 48px; left: 12px; }
    .th-hero-inner { padding-left: 60px; }
    .th-hero-text h1 { font-size: 22px; }
    .th-hero-greet { font-size: 12px; padding: 8px 12px; }
    .th-composer { padding: 16px; }
    .th-item { padding: 14px 14px 12px; }
    .th-modal-grid { grid-template-columns: 1fr; }
    .th-bg-decor::before { width: 160px; height: 160px; }
    .th-bg-decor::after { width: 240px; height: 240px; }
    .th-today-progress { min-width: 120px; }
    .th-kbd-hint { display: none; }
    .th-fish, .th-net, .th-catch-badge, .th-bubble, .th-splash { display: none; }
    .th-back-top { right: 14px; bottom: 18px; width: 38px; height: 38px; font-size: 17px; }
    .th-feature-bar { grid-template-columns: 1fr; }
    .th-countdown { display: none; }
    .th-captcha-refresh { font-size: 11px; padding: 6px 2px; }
    .th-top-meta { display: none; }
}

/* =====================================================================
   无障碍
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
    .th-item,
    .th-reply,
    .th-modal-mask,
    .th-modal,
    .th-hero::before,
    .th-bg-decor::before,
    .th-bg-decor::after,
    .th-empty .th-empty-icon,
    .th-fish,
    .th-fish i,
    .th-bubble,
    .th-splash,
    .th-progress-bar,
    .th-back-top {
        animation: none !important;
        transition: none !important;
    }
}