/* ===== Komunitas / Forum ===== */
.identitas-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 14px;
    padding: 14px 20px;
    backdrop-filter: blur(10px);
}

.identitas-box span {
    color: var(--text-soft);
    font-size: 0.95rem;
}

.identitas-box strong {
    color: var(--accent-secondary);
}

/* Kartu form umum */
.form-masuk,
.form-thread,
.form-balas {
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 16px;
    padding: 22px 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.08);
}

.form-sub {
    color: var(--text-soft);
    font-size: 0.88rem;
    margin-bottom: 14px;
}

/* Login: sejajar di layar lebar, menumpuk di HP */
.form-masuk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.form-masuk .form-sub {
    flex-basis: 100%;
    margin-bottom: 4px;
}

.form-masuk input {
    flex: 1 1 180px;
}

/* Thread & balasan: menumpuk penuh */
.form-thread,
.form-balas {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Field */
.form-masuk input,
.form-thread input,
.form-thread textarea,
.form-balas textarea {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-ice);
    background: rgba(8, 21, 36, 0.55);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-thread input,
.form-thread textarea,
.form-balas textarea {
    width: 100%;
}

.form-thread textarea,
.form-balas textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

.form-masuk input::placeholder,
.form-thread input::placeholder,
.form-thread textarea::placeholder,
.form-balas textarea::placeholder {
    color: var(--text-soft);
}

.form-masuk input:focus,
.form-thread input:focus,
.form-thread textarea:focus,
.form-balas textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(95, 211, 240, 0.15);
}

/* Tombol utama */
.form-masuk button,
.form-thread button,
.form-balas button {
    align-self: flex-start;
    padding: 11px 26px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: var(--accent-primary);
    color: #04121f;
    font-weight: 700;
    font-size: 0.92rem;
    font-family: inherit;
    box-shadow: 0 6px 18px rgba(95, 211, 240, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.form-masuk button {
    align-self: auto;
    flex: 0 0 auto;
}

.form-masuk button:hover,
.form-thread button:hover,
.form-balas button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(95, 211, 240, 0.45);
}

/* Daftar thread */
.thread-list {
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thread-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 14px;
    padding: 16px 20px;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.thread-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(95, 211, 240, 0.14);
}

.thread-judul {
    color: var(--accent-secondary);
    font-weight: 700;
    font-size: 1.08rem;
    text-decoration: none;
}

.thread-judul:hover {
    color: var(--accent-primary);
}

.thread-meta {
    color: var(--text-soft);
    font-size: 0.8rem;
}

/* Balasan */
.balasan-list {
    list-style: none;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.balasan-item {
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 14px;
    padding: 14px 18px;
}

.balasan-head {
    color: var(--accent-secondary);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-ice);
}

.balasan-isi {
    color: var(--text-main);
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .form-masuk {
        flex-direction: column;
        align-items: stretch;
    }

    .form-masuk input,
    .form-masuk button {
        width: 100%;
    }
}

/* ===== Komunitas: kategori, statistik, kutipan ===== */
.komunitas-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

.kategori-list {
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kategori-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 14px;
    padding: 16px 20px;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.kategori-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(95, 211, 240, 0.14);
}

.kategori-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.kategori-emoji {
    font-size: 1.7rem;
    line-height: 1;
    flex: 0 0 auto;
}

.kategori-teks {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.kategori-nama {
    color: var(--accent-secondary);
    font-weight: 700;
    font-size: 1.05rem;
}

.kategori-item:hover .kategori-nama {
    color: var(--accent-primary);
}

.kategori-desk {
    color: var(--text-soft);
    font-size: 0.85rem;
}

.kategori-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: var(--text-soft);
    font-size: 0.78rem;
    white-space: nowrap;
    flex: 0 0 auto;
}

/* Panel statistik */
.statistik-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 16px;
    padding: 18px 20px;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 20px;
}

.statistik-panel h3 {
    margin: 0 0 14px;
    color: var(--accent-secondary);
    font-size: 1rem;
}

.stat-online {
    background: rgba(46, 204, 113, 0.10);
    border: 1px solid rgba(46, 204, 113, 0.30);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 14px;
}

.stat-online strong {
    color: #56d98b;
}

.stat-list {
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text-soft);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-ice);
}

.stat-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-list strong {
    color: var(--accent-secondary);
}

.stat-catatan {
    margin: 12px 0 0;
    color: var(--text-soft);
    font-size: 0.75rem;
    font-style: italic;
}

/* Waktu posting */
.thread-meta span[title],
.balasan-waktu {
    cursor: help;
    border-bottom: 1px dotted var(--border-ice);
}

.balasan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.balasan-waktu {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 400;
}

/* Kutipan */
blockquote.kutipan {
    margin: 0 0 8px;
    padding: 8px 14px;
    border-left: 3px solid var(--accent-primary);
    background: rgba(95, 211, 240, 0.08);
    border-radius: 8px;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.balasan-aksi {
    margin-top: 10px;
}

.btn-kutip {
    padding: 4px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-ice);
    background: transparent;
    color: var(--accent-secondary);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-kutip:hover {
    background: rgba(127, 224, 255, 0.12);
    border-color: var(--accent-primary);
}

@media (max-width: 820px) {
    .komunitas-layout {
        grid-template-columns: 1fr;
    }

    .statistik-panel {
        position: static;
    }
}

/* Buat Thread Baru — panel lipat */
.thread-baru {
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.08);
    overflow: hidden;
}

.thread-baru-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    color: var(--accent-secondary);
    font-weight: 700;
    font-size: 1.05rem;
    transition: background 0.15s ease;
}

.thread-baru-toggle::-webkit-details-marker {
    display: none;
}

.thread-baru-toggle:hover {
    background: rgba(127, 224, 255, 0.06);
}

.tb-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: #04121f;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1;
    flex: 0 0 auto;
}

.tb-teks {
    flex: 1;
}

.tb-arrow {
    color: var(--text-soft);
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.thread-baru[open] .tb-arrow {
    transform: rotate(180deg);
}

.thread-baru[open] .thread-baru-toggle {
    border-bottom: 1px solid var(--border-ice);
}

.thread-baru .form-thread {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
    padding: 18px 22px 22px;
    animation: tbFade 0.2s ease;
}

@keyframes tbFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Upload & tampilan gambar forum */
.upload-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-soft);
}

.upload-label span {
    font-weight: 600;
    color: var(--accent-secondary);
}

.upload-label input[type="file"] {
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--text-soft);
    max-width: 100%;
}

.upload-label input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-ice);
    background: rgba(127, 224, 255, 0.10);
    color: var(--accent-secondary);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.upload-label input[type="file"]::file-selector-button:hover {
    background: rgba(127, 224, 255, 0.18);
    border-color: var(--accent-primary);
}

.balasan-gambar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.balasan-gambar a {
    display: block;
    line-height: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-ice);
    background: rgba(8, 21, 36, 0.4);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.balasan-gambar a:hover {
    transform: translateY(-3px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 24px rgba(95, 211, 240, 0.2);
}

.balasan-gambar img {
    display: block;
    max-width: 220px;
    max-height: 220px;
    width: auto;
    height: auto;
    object-fit: cover;
}

@media (max-width: 520px) {
    .balasan-gambar img {
        max-width: 46vw;
        max-height: 46vw;
    }
}

/* Moderator: banner catatan + panel */
.mod-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 820px;
    margin: 16px auto 0;
    padding: 14px 18px;
    background: rgba(224, 156, 90, 0.10);
    border: 1px solid rgba(224, 156, 90, 0.35);
    border-left: 4px solid #e0a25a;
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.9rem;
}

.mod-banner-ic {
    font-size: 1.1rem;
    line-height: 1.3;
}

.mod-banner strong {
    color: #f0b877;
}

.mod-banner-waktu {
    color: var(--text-soft);
    font-weight: 400;
    cursor: help;
}

.mod-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.mod-panel-toggle {
    padding: 14px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    color: var(--accent-secondary);
    font-weight: 700;
    font-size: 0.98rem;
    transition: background 0.15s ease;
}

.mod-panel-toggle::-webkit-details-marker {
    display: none;
}

.mod-panel-toggle:hover {
    background: rgba(127, 224, 255, 0.06);
}

.mod-panel[open] .mod-panel-toggle {
    border-bottom: 1px solid var(--border-ice);
}

.form-mod {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px 20px;
}

.mod-label {
    color: var(--text-soft);
    font-size: 0.85rem;
    font-weight: 600;
}

.mod-select,
.form-mod textarea {
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-ice);
    background: rgba(8, 21, 36, 0.55);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-mod textarea {
    resize: vertical;
    min-height: 60px;
    line-height: 1.5;
}

.mod-select:focus,
.form-mod textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(95, 211, 240, 0.15);
}

.form-mod button {
    align-self: flex-start;
    padding: 10px 24px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #e0a25a;
    color: #2a1704;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: inherit;
    box-shadow: 0 6px 18px rgba(224, 162, 90, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.form-mod button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(224, 162, 90, 0.45);
}

/* Lupa PIN & email pemulihan */
.form-note {
    flex-basis: 100%;
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.4;
    margin: 0;
}

.form-lupa {
    flex-basis: 100%;
    margin: 0;
    font-size: 0.85rem;
}

.form-lupa a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.form-lupa a:hover {
    text-decoration: underline;
}

.form-email {
    max-width: 820px;
    margin: 12px auto 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-email-baris {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-email-baris input {
    flex: 1 1 220px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-ice);
    background: rgba(8, 21, 36, 0.55);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-email-baris input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(95, 211, 240, 0.15);
}

/* Masuk / Daftar & email pemulihan — panel lipat ringkas */
.masuk-fold,
.email-fold-box {
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 14px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.email-fold-box {
    margin-top: 12px;
}

.masuk-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 0.92rem;
    transition: background 0.15s ease;
}

.masuk-toggle::-webkit-details-marker {
    display: none;
}

.masuk-toggle:hover {
    background: rgba(127, 224, 255, 0.06);
}

.masuk-ic {
    font-size: 1rem;
    flex: 0 0 auto;
}

.masuk-teks {
    flex: 1;
    min-width: 0;
}

.masuk-arrow {
    color: var(--text-soft);
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}

.masuk-fold[open] .masuk-arrow,
.email-fold-box[open] .masuk-arrow {
    transform: rotate(180deg);
}

.masuk-fold[open] .masuk-toggle,
.email-fold-box[open] .masuk-toggle {
    border-bottom: 1px solid var(--border-ice);
}

.masuk-fold .form-masuk {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
    padding: 14px 18px 16px;
    align-items: center;
}

.email-fold-box .form-email {
    margin: 0;
    padding: 14px 18px 16px;
}

.form-lupa-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.form-lupa-link:hover {
    text-decoration: underline;
}

/* ===== Tools thread (bisukan) ===== */
.thread-tools {
    max-width: 820px;
    margin: 12px auto 0;
    display: flex;
    justify-content: flex-end;
}

.thread-tools form {
    margin: 0;
}

.btn-bisukan {
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-ice);
    background: transparent;
    color: var(--accent-secondary);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-bisukan:hover {
    background: rgba(127, 224, 255, 0.12);
    border-color: var(--accent-primary);
}

/* ===== Badge Post / Balasan ===== */
.balasan-head-kiri {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.post-badge {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #04121f;
    background: var(--accent-primary);
    padding: 2px 9px;
    border-radius: 999px;
}

.balasan-badge {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--text-soft);
    border: 1px solid var(--border-ice);
    padding: 1px 8px;
    border-radius: 999px;
}

.balasan-item.balasan-post {
    border-color: rgba(95, 211, 240, 0.45);
    box-shadow: 0 0 0 1px rgba(95, 211, 240, 0.25) inset;
}

/* ===== Tombol hapus (moderator) ===== */
.balasan-aksi {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.form-hapus-balasan,
.form-mod-hapus {
    margin: 0;
}

/* ===== Toggle ping di form balas ===== */
.ping-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-soft);
    cursor: pointer;
}

.ping-label input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

/* ===== Indikator "sedang melihat" (👁) ===== */
.nonton-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #56d98b;
    font-weight: 700;
    font-size: 0.74rem;
}

.nonton-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #56d98b;
    font-weight: 600;
}

.nonton-ic {
    font-size: 0.9em;
    line-height: 1;
}

.thread-nonton {
    margin: 8px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #56d98b;
    font-size: 0.82rem;
    font-weight: 600;
}

/* ===== Sematkan (pin) thread ===== */
.pin-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #04121f;
    background: var(--accent-primary);
    vertical-align: middle;
}

.pin-mini {
    margin-right: 2px;
}

.thread-item.thread-disematkan {
    border-color: rgba(95, 211, 240, 0.45);
    background: rgba(95, 211, 240, 0.06);
}

.form-mod-sematkan {
    margin: 0;
}

.btn-sematkan {
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--accent-primary);
    cursor: pointer;
    background: transparent;
    color: var(--accent-secondary);
    font-weight: 700;
    font-size: 0.88rem;
    font-family: inherit;
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn-sematkan:hover {
    background: rgba(95, 211, 240, 0.12);
    transform: translateY(-2px);
}

/* ===== Reaksi balasan ===== */
.reaksi-tampil {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.reaksi-form {
    margin: 0;
}

.reaksi-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px;
    border-radius: 999px;
    border: 1px solid var(--border-ice);
    background: rgba(8, 21, 36, 0.4);
    color: var(--text-soft);
    font-family: inherit;
    font-size: 0.82rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.reaksi-chip:hover {
    border-color: var(--accent-primary);
    background: rgba(95, 211, 240, 0.10);
    transform: translateY(-1px);
}

.reaksi-chip.reaksi-aktif {
    border-color: var(--accent-primary);
    background: rgba(95, 211, 240, 0.18);
    color: var(--accent-secondary);
    font-weight: 700;
}

.reaksi-chip.reaksi-statis {
    cursor: help;
}

.reaksi-chip.reaksi-statis:hover {
    transform: none;
    border-color: var(--border-ice);
    background: rgba(8, 21, 36, 0.4);
}

.reaksi-emoji {
    font-size: 1rem;
    line-height: 1;
}

.reaksi-jml {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

/* Pemicu emoji picker di baris aksi */
.reaksi-pop {
    position: relative;
    display: inline-block;
}

.reaksi-trigger {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-ice);
    background: transparent;
    color: var(--accent-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.reaksi-trigger::-webkit-details-marker {
    display: none;
}

.reaksi-trigger:hover {
    background: rgba(127, 224, 255, 0.12);
    border-color: var(--accent-primary);
}

.reaksi-trigger-ic {
    font-size: 0.95rem;
    line-height: 1;
}

.reaksi-trigger-plus {
    font-weight: 800;
    color: var(--accent-primary);
}

.reaksi-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 30;
    display: flex;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(10, 26, 44, 0.98);
    border: 1px solid var(--border-ice);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    animation: reaksiPop 0.14s ease;
}

@keyframes reaksiPop {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.reaksi-pilih {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.12s ease;
}

.reaksi-pilih:hover {
    background: rgba(95, 211, 240, 0.16);
    transform: translateY(-2px) scale(1.14);
}

.reaksi-pilih.dipilih {
    background: rgba(95, 211, 240, 0.22);
    box-shadow: 0 0 0 2px var(--accent-primary) inset;
}

@media (max-width: 520px) {
    .reaksi-menu {
        flex-wrap: wrap;
        width: 216px;
    }
}

/* ===== Chip mention (@nama) ===== */
.mention-chip {
    display: inline-flex;
    align-items: center;
    padding: 1px 9px;
    border-radius: 999px;
    background: rgba(95, 211, 240, 0.16);
    border: 1px solid rgba(95, 211, 240, 0.4);
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 0.92em;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.mention-chip:hover {
    background: rgba(95, 211, 240, 0.28);
    border-color: var(--accent-primary);
}

.mention-chip.mention-aku {
    background: rgba(240, 184, 119, 0.18);
    border-color: rgba(240, 184, 119, 0.5);
    color: #f0b877;
}

/* ===== Nama user yang bisa diklik ===== */
.user-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.user-link:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* ===== Tanda "diedit" + riwayat edit ===== */
.diedit-tanda {
    color: var(--text-soft);
    font-style: italic;
    cursor: help;
    border-bottom: 1px dotted var(--border-ice);
}

.riwayat-edit {
    margin-top: 10px;
    border: 1px dashed var(--border-ice);
    border-radius: 10px;
    overflow: hidden;
}

.riwayat-toggle {
    padding: 8px 14px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 600;
    transition: background 0.15s ease;
}

.riwayat-toggle::-webkit-details-marker {
    display: none;
}

.riwayat-toggle:hover {
    background: rgba(127, 224, 255, 0.06);
}

.riwayat-isi {
    padding: 8px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border-ice);
}

.riwayat-versi {
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(8, 21, 36, 0.4);
}

.riwayat-meta {
    color: var(--text-soft);
    font-size: 0.74rem;
    margin-bottom: 4px;
}

.riwayat-teks {
    color: var(--text-soft);
    font-size: 0.86rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ===== Edit balasan ===== */
.btn-edit {
    padding: 4px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-ice);
    background: transparent;
    color: var(--accent-secondary);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-edit:hover {
    background: rgba(127, 224, 255, 0.12);
    border-color: var(--accent-primary);
}

.form-edit-balasan {
    display: none;
    margin-top: 10px;
}

.form-edit-balasan.tampil {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-edit-balasan textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-ice);
    background: rgba(8, 21, 36, 0.55);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 90px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-edit-balasan textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(95, 211, 240, 0.15);
}

.form-edit-aksi {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-edit-aksi button {
    padding: 9px 20px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.form-edit-aksi button[type="submit"] {
    background: var(--accent-primary);
    color: #04121f;
    box-shadow: 0 6px 18px rgba(95, 211, 240, 0.35);
}

.form-edit-aksi button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(95, 211, 240, 0.45);
}

.btn-batal-edit {
    background: transparent;
    border: 1px solid var(--border-ice) !important;
    color: var(--text-soft);
}

.btn-batal-edit:hover {
    border-color: var(--accent-primary) !important;
    color: var(--accent-secondary);
}

.form-edit-nota {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.76rem;
    font-style: italic;
}

/* ===== Tautan & Spoiler dalam isi ===== */
.balasan-isi a.isi-link,
.riwayat-teks a.isi-link {
    color: var(--accent-primary);
    text-decoration: underline;
    word-break: break-word;
}

.spoiler {
    background: var(--text-main);
    color: transparent;
    border-radius: 4px;
    padding: 0 4px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: color 0.15s ease, background 0.15s ease;
}

.spoiler.revealed {
    background: rgba(127, 224, 255, 0.16);
    color: var(--text-main);
    user-select: auto;
    -webkit-user-select: auto;
}

/* ===== Kartu Event / Distribusi ===== */
.kartu-event-wrap {
    display: flex;
    justify-content: center;
    margin: 0 auto 20px;
    max-width: 820px;
}

.kartu-event {
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 28px rgba(30, 58, 95, 0.14);
}

.ke-banner {
    background: linear-gradient(135deg, #63bc5a, #3f9a49);
    color: #04121f;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    padding: 10px 16px;
}

.ke-poke {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px;
}

.ke-sprite-wrap {
    flex: 0 0 auto;
    width: 108px;
    height: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: radial-gradient(circle, rgba(127, 224, 255, 0.16), transparent 70%);
}

.ke-sprite {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.ke-info {
    flex: 1;
    border-collapse: collapse;
    width: 100%;
}

.ke-info th,
.ke-info td {
    text-align: left;
    padding: 5px 6px;
    border-bottom: 1px solid var(--border-ice);
    font-size: 0.88rem;
    vertical-align: top;
}

.ke-info tr:last-child th,
.ke-info tr:last-child td {
    border-bottom: none;
}

.ke-info th {
    color: var(--text-soft);
    font-weight: 700;
    width: 34%;
    white-space: nowrap;
}

.ke-info td {
    color: var(--text-main);
}

.ke-dex {
    color: var(--accent-primary);
    font-weight: 800;
    font-size: 0.82rem;
}

.ke-nama {
    color: var(--accent-secondary);
    font-weight: 800;
    font-size: 1rem;
}

.ke-gender.ke-male { color: #6db3ff; }
.ke-gender.ke-female { color: #ff8fb0; }
.ke-shiny { color: #f4d23c; }

.ke-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 0 12px 12px;
}

.ke-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 2px;
    background: rgba(8, 21, 36, 0.4);
    border: 1px solid var(--border-ice);
    border-radius: 8px;
}

.ke-stat-label {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--text-soft);
}

.ke-stat-val {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--accent-secondary);
}

.ke-moves {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 12px 12px;
}

.ke-move {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-ice);
    border-left: 3px solid var(--mv, var(--accent-primary));
    background: var(--mv-bg, var(--card-bg));
}

.ke-move-nama {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
}

.ke-meta {
    width: 100%;
    border-collapse: collapse;
    border-top: 1px solid var(--border-ice);
}

.ke-meta th {
    background: rgba(79, 176, 217, 0.15);
    color: var(--accent-secondary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 6px 10px;
    text-align: center;
    border: 1px solid var(--border-ice);
}

.ke-meta td {
    padding: 8px 10px;
    text-align: center;
    color: var(--text-main);
    font-size: 0.85rem;
    border: 1px solid var(--border-ice);
}

.ke-note {
    padding: 8px 16px;
    font-size: 0.78rem;
    color: var(--text-soft);
    text-align: center;
    white-space: pre-line;   /* hormati baris baru (aturan/bonus bisa >1 baris) */
    border-top: 1px solid var(--border-ice);
}

/* Bonus memakai gaya yang sama dengan aturan (.ke-note) — tanpa warna berbeda. */

/* ===== Tombol "Buat Event" di kategori admin ===== */
.kartu-buat-event {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kategori-admin-nota {
    max-width: 820px;
    margin: 12px 0 0;
    padding: 12px 16px;
    border: 1px dashed var(--border-ice);
    border-radius: 12px;
    color: var(--text-soft);
    font-size: 0.85rem;
}

/* ===== Form Event / Distribusi ===== */
.form-event {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-event input[type="text"],
.form-event input[type="number"],
.form-event textarea,
.form-event select.mod-select {
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-ice);
    background: rgba(8, 21, 36, 0.55);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-event input:focus,
.form-event textarea:focus,
.form-event select.mod-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(95, 211, 240, 0.15);
}

.form-event textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

.form-event button[type="submit"] {
    align-self: flex-start;
    padding: 11px 26px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: var(--accent-primary);
    color: #04121f;
    font-weight: 700;
    font-size: 0.92rem;
    font-family: inherit;
    box-shadow: 0 6px 18px rgba(95, 211, 240, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.form-event button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(95, 211, 240, 0.45);
}

.event-grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.event-grid6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.event-grid6 > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.event-grid6 .ev-h {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-soft);
}

.event-grid-moves {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 8px;
}

.event-distribusi {
    border: 1px solid var(--border-ice);
    border-radius: 14px;
    padding: 14px 16px 18px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-distribusi legend {
    color: var(--accent-secondary);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0 8px;
}

.event-inline {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 4px 0;
}

@media (max-width: 640px) {
    .event-grid3 { grid-template-columns: 1fr; }
    .event-grid6 { grid-template-columns: repeat(3, 1fr); }
    .event-grid-moves { grid-template-columns: 1fr; }
    .ke-stats { grid-template-columns: repeat(3, 1fr); }
    .ke-moves { grid-template-columns: 1fr; }
}

/* ===== Autocomplete (form event: Pokémon & move) ===== */
.ac-field {
    position: relative;
}

.form-event input[type="date"] {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-ice);
    background: rgba(8, 21, 36, 0.55);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    color-scheme: dark;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-event input[type="date"]:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(95, 211, 240, 0.15);
}

.ac-box {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 260px;
    overflow-y: auto;
    background: rgba(10, 26, 44, 0.98);
    border: 1px solid var(--border-ice);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    padding: 4px;
}

.ac-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 0.9rem;
}

.ac-item:hover,
.ac-item.ac-aktif {
    background: rgba(95, 211, 240, 0.16);
}

.ac-sprite {
    width: 34px;
    height: 34px;
    object-fit: contain;
    image-rendering: pixelated;
    flex: 0 0 auto;
}

.ac-nama {
    font-weight: 600;
}

/* ===== Daftar event: warna status + durasi ===== */
.thread-item.event-item {
    border-left: 4px solid var(--border-ice);
}

.thread-item.event-aktif {
    border-left-color: #56d98b;
    background: rgba(46, 204, 113, 0.07);
}

.thread-item.event-akan {
    border-left-color: var(--accent-primary);
    background: rgba(95, 211, 240, 0.06);
}

.thread-item.event-selesai {
    border-left-color: rgba(159, 194, 216, 0.5);
    opacity: 0.72;
}

.event-baris {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 2px 0;
}

.event-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.event-status-aktif {
    color: #04121f;
    background: #56d98b;
}

.event-status-akan {
    color: #04121f;
    background: var(--accent-primary);
}

.event-status-selesai {
    color: var(--text-soft);
    background: rgba(159, 194, 216, 0.18);
    border: 1px solid var(--border-ice);
}

.event-durasi {
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 600;
}

.event-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 2px;
}

.event-dot-aktif { background: #56d98b; box-shadow: 0 0 6px #56d98b; }
.event-dot-akan { background: var(--accent-primary); }
.event-dot-selesai { background: rgba(159, 194, 216, 0.6); }

/* ===== Daftar event: sprite Pokemon + chip game di kanan kartu ===== */
.thread-item.event-item,
.thread-item.thread-item-tanda {
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
}

.thread-item-utama {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.event-tanda {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.event-sprite {
    width: 60px;
    height: 60px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

.event-game {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 120px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(95, 211, 240, 0.14);
    border: 1px solid rgba(95, 211, 240, 0.4);
    color: var(--accent-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Kartu Distribusi Item (Mystery Gift dll) ===== */
.ke-hadiah {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
}

.ke-hadiah-item {
    border: 1px solid var(--border-ice);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(8, 21, 36, 0.4);
    box-shadow: 0 6px 16px rgba(30, 58, 95, 0.16);
}

.ke-hadiah-utama {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 18px 18px 16px;
    background: radial-gradient(circle at 50% 0%, rgba(127, 224, 255, 0.16), transparent 72%);
}

.ke-hadiah-ikon {
    width: 54px;
    height: 54px;
    object-fit: contain;
    image-rendering: pixelated;
    flex: 0 0 auto;
    filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.4));
}

.ke-hadiah-nama {
    color: var(--accent-secondary);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.2px;
    text-align: center;
}

.ke-hadiah-jml {
    background: linear-gradient(135deg, rgba(95, 211, 240, 0.22), rgba(79, 176, 217, 0.12));
    border-top: 1px solid var(--border-ice);
    color: var(--accent-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    padding: 9px 12px;
    letter-spacing: 0.3px;
}

.ke-hadiah-jml strong {
    color: var(--accent-primary);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-size: 1rem;
    margin-left: 2px;
}

/* Ikon item inline di dalam teks bonus (mis. "10 [ikon] Quick Coupons") */
.ke-ikon-item {
    width: 18px;
    height: 18px;
    object-fit: contain;
    image-rendering: pixelated;
    vertical-align: -4px;
    margin: 0 2px;
}

/* ===== Form: baris Distribusi Item ===== */
.event-hint {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.8rem;
    line-height: 1.4;
}

.event-item-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-item-baris {
    display: grid;
    grid-template-columns: 2fr 0.9fr 1.6fr;
    gap: 8px;
    align-items: center;
}

.event-item-spr {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.event-item-thumb {
    width: 30px;
    height: 30px;
    object-fit: contain;
    image-rendering: pixelated;
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .event-item-baris { grid-template-columns: 1fr; }
}