:root {
    --lgw-bg: #f5f6f8;
    --lgw-surface: #fff;
    --lgw-text: #0f172a;
    --lgw-muted: #64748b;
    --lgw-faint: #94a3b8;
    --lgw-border: #e8ebf0;
    --lgw-accent: #2563eb;
    --lgw-accent-hover: #1d4ed8;
    --lgw-accent-soft: #eef3ff;
    --lgw-danger: #dc2626;
    --lgw-radius: 14px;
    --lgw-shadow: 0 1px 2px rgba(15,23,42,.04), 0 2px 8px rgba(15,23,42,.04);
    --lgw-shadow-hover: 0 4px 18px rgba(15,23,42,.08);
    --lgw-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--lgw-font);
    background: var(--lgw-bg);
    color: var(--lgw-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--lgw-accent); text-decoration: none; }
a:hover { color: var(--lgw-accent-hover); }

.lgw-shell { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.lgw-shell--admin { max-width: 1080px; }

.lgw-top {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--lgw-border);
}

.lgw-top__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
}
 
.lgw-top__nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.lgw-top__nav a {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 15px;
    color: var(--lgw-muted);
}
.lgw-top__nav a.is-active {
    background: #eef2ff;
    color: var(--lgw-accent);
    font-weight: 700;
}
.lgw-top__nav a:hover { color: var(--lgw-accent); }
.lgw-top__back {
    display: none;
    width: 36px;
    height: 36px;
    margin-left: -8px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--lgw-text);
}
.lgw-top__back:active { background: var(--lgw-accent-soft); }
.lgw-top__back .lgw-ico { width: 22px; height: 22px; }
@media (max-width: 640px) {
    .lgw-top__inner { gap: 4px; min-height: 48px; }
    .lgw-top__back { display: inline-flex; }
    .lgw-top__nav a { padding: 6px 4px; background: none !important; font-size: 17px; color: var(--lgw-text); }
    .lgw-top__nav a + a { display: none; }
}

.lgw-top__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.lgw-iconbtn {
    position: relative;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--lgw-text);
}
.lgw-iconbtn:hover,
.lgw-iconbtn.is-active {
    background: #eef2ff;
    color: var(--lgw-accent);
}
.lgw-iconbtn svg { display: block; }
.lgw-iconbtn .lgw-badge {
    position: absolute;
    top: 2px;
    right: 0;
    margin: 0;
    min-width: 16px;
    padding: 0 4px;
    line-height: 16px;
    font-size: 10px;
}

.lgw-admin-link {
    margin-left: 4px;
    padding: 4px 8px;
    font-size: 14px;
    color: var(--lgw-text);
    white-space: nowrap;
}
.lgw-admin-link:hover,
.lgw-admin-link.is-active { color: var(--lgw-accent); }

.lgw-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.lgw-feed-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.lgw-feed-head h1 { margin: 0; min-width: 0; font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; }
.lgw-feed-head__actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.lgw-feed-head .lgw-btn--primary { padding: 9px 18px; box-shadow: 0 4px 12px rgba(37,99,235,.25); }
.lgw-app .lgw-main { padding-top: 12px; }
.lgw-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.lgw-boards {
    display: flex;
    gap: 2px;
    padding: 4px;
    min-width: 0;
    background: var(--lgw-surface);
    border: 1px solid var(--lgw-border);
    border-radius: 999px;
    overflow-x: auto;
    scrollbar-width: none;
}
.lgw-boards::-webkit-scrollbar { display: none; }
.lgw-boards a {
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--lgw-muted);
    transition: background .15s, color .15s;
}
.lgw-boards a:hover { color: var(--lgw-text); }
.lgw-boards a.is-active { background: var(--lgw-text); color: #fff; font-weight: 600; }
.lgw-select { position: relative; display: block; margin-left: auto; flex-shrink: 0; }
.lgw-select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 7px;
    height: 7px;
    margin-top: -6px;
    border-right: 1.8px solid var(--lgw-muted);
    border-bottom: 1.8px solid var(--lgw-muted);
    transform: rotate(45deg);
    pointer-events: none;
}
.lgw-select select {
    width: 100%;
    height: 40px;
    padding: 0 36px 0 14px;
    border: 1px solid var(--lgw-border);
    border-radius: 999px;
    background: var(--lgw-surface);
    color: var(--lgw-text);
    font: inherit;
    font-size: 14px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.lgw-select select:focus { outline: none; border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.lgw-select--board { display: none; }
@media (max-width: 640px) {
    .lgw-feed-head h1 { font-size: 1.25rem; }
    .lgw-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .lgw-filter .lgw-boards { display: none; }
    .lgw-select--board { display: block; }
    .lgw-select { margin: 0; }
    .lgw-select select { border-radius: 12px; }
}
.lgw-toolbar .lgw-btn { flex-shrink: 0; }

.lgw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    cursor: pointer;
    background: transparent;
    color: var(--lgw-text);
    text-decoration: none;
    line-height: 1.2;
}
.lgw-btn--primary { background: var(--lgw-accent); color: #fff; }
.lgw-btn--primary:hover { background: var(--lgw-accent-hover); color: #fff; }
.lgw-btn--ghost { border-color: var(--lgw-border); background: var(--lgw-surface); }
.lgw-btn--ghost:hover { border-color: #cbd5e1; }
.lgw-btn--danger { background: #fef2f2; color: var(--lgw-danger); border-color: #fecaca; }
.lgw-btn--sm { padding: 6px 12px; font-size: 13px; }
.lgw-btn--block { width: 100%; }
.lgw-btn:disabled,
.lgw-btn[aria-busy="true"] { opacity: 0.65; cursor: wait; }

.lgw-badge {
    display: inline-block;
    min-width: 18px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 999px;
    background: var(--lgw-danger);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.lgw-main { padding: 24px 0 48px; }

.lgw-hero { margin-bottom: 20px; }
.lgw-hero h1 { margin: 0 0 8px; font-size: 1.5rem; letter-spacing: -.02em; }
.lgw-hero p { margin: 0; color: var(--lgw-muted); font-size: 14px; }
.lgw-hero--row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lgw-back { font-size: 14px; color: var(--lgw-muted); }

.lgw-empty {
    padding: 48px 24px;
    text-align: center;
    background: var(--lgw-surface);
    border-radius: var(--lgw-radius);
    border: 1px dashed var(--lgw-border);
    color: var(--lgw-muted);
}

.lgw-post-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }

.lgw-ico { width: 15px; height: 15px; flex-shrink: 0; vertical-align: -3px; }

.lgw-post-card {
    background: var(--lgw-surface);
    border-radius: var(--lgw-radius);
    box-shadow: var(--lgw-shadow);
    border: 1px solid var(--lgw-border);
    transition: box-shadow .2s, transform .2s;
}
.lgw-post-card:hover { box-shadow: var(--lgw-shadow-hover); transform: translateY(-1px); }
.lgw-post-card__link { display: block; padding: 16px 20px 14px; color: inherit; text-decoration: none; }
.lgw-post-card__link:hover { color: inherit; }
.lgw-post-card__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.lgw-post-card__author { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.lgw-post-card__author img { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; background: var(--lgw-bg); }
.lgw-post-card__author > span:not(.lgw-tag) { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.lgw-post-card__author strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lgw-post-card__author em { font-style: normal; font-size: 12px; color: var(--lgw-faint); margin-top: 2px; }
.lgw-post-card__author .lgw-tag { flex-shrink: 0; }
.lgw-post-card__title { margin: 0 0 6px; font-size: 1.06rem; font-weight: 650; letter-spacing: -.01em; line-height: 1.4; }
.lgw-post-card__excerpt {
    margin: 0;
    color: var(--lgw-muted);
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lgw-post-card__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    align-items: center;
    margin-top: 12px;
    font-size: 13px;
}
.lgw-post-card__stat { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--lgw-faint); font-size: 13px; }
.lgw-post-card__stat .lgw-ico:not(:first-child),
.lgw-thread__stat .lgw-ico { margin-left: 10px; }
.lgw-pin-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 4px 0;
    background: var(--lgw-surface);
    border: 1px solid var(--lgw-border);
    border-radius: var(--lgw-radius);
    box-shadow: var(--lgw-shadow);
}
.lgw-pin + .lgw-pin { border-top: 1px solid var(--lgw-border); }
.lgw-pin a { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: var(--lgw-text); }
.lgw-pin a:hover strong { color: var(--lgw-accent); }
.lgw-pin strong { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lgw-pin time { flex-shrink: 0; font-size: 12px; color: var(--lgw-faint); }
.lgw-pin-flag {
    display: inline-block;
    flex-shrink: 0;
    padding: 1px 7px;
    border-radius: 6px;
    background: #fff4e5;
    color: #c2410c;
    font-size: 12px;
    font-weight: 600;
}

.lgw-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--lgw-accent-soft);
    color: var(--lgw-accent);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}
.lgw-muted { color: var(--lgw-muted); font-size: 13px; }

.lgw-user-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    font-size: 13px;
}
.lgw-user-inline img { border-radius: 50%; object-fit: cover; }

.lgw-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.lgw-board-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    background: var(--lgw-surface);
    border-radius: var(--lgw-radius);
    border: 1px solid var(--lgw-border);
    box-shadow: var(--lgw-shadow);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s;
}
.lgw-board-tile:hover { border-color: #a5b4fc; }
.lgw-board-tile span { color: var(--lgw-muted); font-size: 13px; }

.lgw-form {
    background: var(--lgw-surface);
    padding: 20px;
    border-radius: var(--lgw-radius);
    border: 1px solid var(--lgw-border);
    box-shadow: var(--lgw-shadow);
}
.lgw-form--compact { margin-top: 16px; }
.lgw-field { display: block; margin-bottom: 16px; }
.lgw-field > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.lgw-field input[type="text"],
.lgw-field select,
.lgw-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--lgw-border);
    border-radius: 8px;
    font: inherit;
    background: #fff;
}
.lgw-field textarea { resize: vertical; min-height: 120px; }
.lgw-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) {
    .lgw-field-row { grid-template-columns: 1fr; }
    .lgw-profile > .lgw-btn { margin-left: 0; }
}
.lgw-hint { font-size: 13px; color: var(--lgw-muted); margin: 0 0 12px; }
.lgw-field input:focus,
.lgw-field select:focus,
.lgw-field textarea:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.lgw-compose-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.lgw-kicker { margin: 0 0 4px; font-size: 13px; color: var(--lgw-muted); }
.lgw-compose-head h1 { margin: 0; font-size: 1.45rem; letter-spacing: -.02em; }
.lgw-opt { margin-left: 6px; font-style: normal; font-weight: 500; color: var(--lgw-muted); }

.lgw-compose { padding: 22px; }
.lgw-compose__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 4px;
}
.lgw-compose__bar .lgw-hint { margin: 0; }
.lgw-compose__bar .lgw-btn { flex-shrink: 0; padding: 10px 22px; }
@media (max-width: 560px) {
    .lgw-compose__bar { flex-direction: column; align-items: stretch; }
    .lgw-compose__bar .lgw-btn { width: 100%; }
}

.lgw-compose .ggy-section-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}
.lgw-compose .ggy-section-box::after { display: none; }
.lgw-compose .ggy-image-section,
.lgw-compose .ggy-upload-section {
    float: none;
    width: 88px !important;
    height: 88px !important;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
}
.lgw-compose .ggy-image-section {
    border: 1px solid var(--lgw-border);
    background: #f8fafc;
}
.lgw-compose .ggy-upload-section {
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
}
.lgw-compose .ggy-upload-section:hover { border-color: #93c5fd; background: #eff6ff; }
.lgw-compose .ggy-upload-section .ggy-upload-icon {
    border: 0;
    background: center / 28px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='8.5' cy='10' r='1.4'/%3E%3Cpath d='M21 16l-5.2-5.2L7 19'/%3E%3C/svg%3E");
}
.lgw-compose .ggy-upload-section:hover .ggy-upload-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='8.5' cy='10' r='1.4'/%3E%3Cpath d='M21 16l-5.2-5.2L7 19'/%3E%3C/svg%3E");
}
.lgw-compose .ggy-image-show {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lgw-compose .ggy-image-shade,
.lgw-compose .ggy-zoom-icon { display: none !important; }
.lgw-compose .ggy-delete-icon {
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(17, 24, 39, .72);
}
.lgw-compose .ggy-delete-icon::before {
    content: "×";
    display: block;
    color: #fff;
    font-style: normal;
    font-size: 16px;
    line-height: 22px;
    text-align: center;
}
.lgw-compose .ggy-upload-loading {
    border-radius: 12px;
    font-size: 12px;
}
.lgw-compose .ggy-delete-box {
    width: min(320px, calc(100vw - 32px));
    height: auto;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}
.lgw-compose .ggy-delete-tip {
    height: auto;
    line-height: 1.4;
    padding: 28px 20px 20px;
    font-size: 15px;
}
.lgw-compose .ggy-delete-btn {
    position: static;
    display: flex;
    height: 48px;
    line-height: 48px;
    border-top: 1px solid var(--lgw-border);
}
.lgw-compose .ggy-delete-btn span { font-size: 15px; color: var(--lgw-text); }
.lgw-compose .ggy-confirm-btn { color: var(--lgw-danger) !important; }

.lgw-thread {
    background: var(--lgw-surface);
    padding: 28px 32px;
    border-radius: var(--lgw-radius);
    border: 1px solid var(--lgw-border);
    box-shadow: var(--lgw-shadow);
    margin-bottom: 24px;
}
.lgw-thread__meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.lgw-thread h1 { margin: 12px 0 18px; font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.35; overflow-wrap: anywhere; }
.lgw-thread__author {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--lgw-border);
}
.lgw-thread__who { gap: 10px; min-width: 0; color: inherit; }
.lgw-thread__who img { width: 42px; height: 42px; flex-shrink: 0; }
.lgw-thread__who span,
.lgw-thread__who strong { display: block; }
.lgw-thread__who strong { font-size: 15px; font-weight: 600; }
.lgw-thread__who .lgw-muted { margin-top: 2px; font-size: 12px; color: var(--lgw-faint); }
.lgw-thread__stat { display: inline; font-style: normal; }
.lgw-thread__stat .lgw-ico { width: 13px; height: 13px; margin-right: 3px; vertical-align: -2px; }
.lgw-thread__tools { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.lgw-thread__tools form { margin: 0; }
.lgw-thread__body { margin-top: 20px; font-size: 16px; line-height: 1.8; color: #1e293b; overflow-wrap: anywhere; }
.lgw-thread__body p { margin: 0 0 14px; }
.lgw-thread__body p:last-child { margin-bottom: 0; }
.lgw-thread__body img { display: block; max-width: 100%; height: auto; margin: 4px 0; border-radius: 10px; }
.lgw-thread__body a { word-break: break-all; }
.lgw-alert {
    padding: 10px 12px;
    margin-bottom: 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 14px;
}

.lgw-replies h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 700; margin: 0 0 12px; }
.lgw-replies h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--lgw-accent); }
.lgw-reply-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0 20px;
    background: var(--lgw-surface);
    border: 1px solid var(--lgw-border);
    border-radius: var(--lgw-radius);
    box-shadow: var(--lgw-shadow);
}
.lgw-reply { padding: 16px 0; }
.lgw-reply + .lgw-reply { border-top: 1px solid var(--lgw-border); }
.lgw-reply.is-muted { opacity: .75; }
.lgw-reply__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.lgw-reply__head .lgw-user-inline { gap: 8px; font-size: 14px; font-weight: 600; }
.lgw-reply__head .lgw-user-inline img { width: 32px; height: 32px; }
.lgw-reply__head time { margin-left: auto; font-size: 12px; color: var(--lgw-faint); }
.lgw-reply__body,
.lgw-reply__acts,
.lgw-reply-sub,
.lgw-reply > .lgw-review__reason { margin-left: 40px; }
.lgw-reply__body { margin-top: 4px; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.lgw-reply__body p { margin: 0 0 8px; }
.lgw-reply__body p:last-child { margin-bottom: 0; }
.lgw-reply__body img { max-width: 100%; height: auto; border-radius: 8px; }
.lgw-reply__acts { display: flex; gap: 18px; margin-top: 8px; font-size: 13px; }
.lgw-reply__acts button,
.lgw-reply__acts a { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--lgw-faint); font: inherit; cursor: pointer; text-decoration: none; }
.lgw-reply__acts button:hover,
.lgw-reply__acts a:hover { color: var(--lgw-accent); }
.lgw-like.is-liked { color: var(--lgw-accent) !important; font-weight: 600; }
.lgw-thread__acts { display: flex; justify-content: center; margin-top: 28px; }
.lgw-like--post {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    border: 1px solid var(--lgw-border);
    border-radius: 999px;
    background: var(--lgw-surface);
    color: var(--lgw-muted);
    font: inherit;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}
.lgw-like--post .lgw-ico { width: 18px; height: 18px; }
.lgw-like--post:hover { border-color: #bfdbfe; color: var(--lgw-accent); }
.lgw-like--post.is-liked { border-color: var(--lgw-accent); background: var(--lgw-accent); color: #fff !important; }
.lgw-reply-sub { list-style: none; margin-top: 10px; padding: 2px 14px; background: #f8fafc; border-radius: 10px; }
.lgw-reply-sub .lgw-reply__body,
.lgw-reply-sub .lgw-reply__acts { margin-left: 0; }
.lgw-reply-sub .lgw-user-inline img { width: 24px; height: 24px; }
.lgw-reply-sub .lgw-reply__body { font-size: 14px; }
@media (max-width: 640px) {
    .lgw-shell { padding: 0 12px; }
    .lgw-main { padding-top: 14px; }
    .lgw-post-list { gap: 10px; }
    .lgw-post-card:hover { transform: none; }
    .lgw-post-card__link { padding: 14px 16px 12px; }
    .lgw-post-card__title { font-size: 1rem; }
    .lgw-pin a { padding: 11px 16px; }
    .lgw-thread { padding: 20px 16px; margin-bottom: 18px; }
    .lgw-thread h1 { margin: 10px 0 14px; font-size: 1.3rem; }
    .lgw-thread__body { font-size: 15.5px; }
    .lgw-reply-list { padding: 0 16px; }
    .lgw-reply__body,
    .lgw-reply__acts,
    .lgw-reply-sub,
    .lgw-reply > .lgw-review__reason { margin-left: 0; }
    .lgw-reply-sub { margin-top: 8px; }
    .lgw-form { padding: 16px; }
}
.lgw-reply-sub__item { padding: 10px 0; }
.lgw-reply-sub__item + .lgw-reply-sub__item { border-top: 1px solid var(--lgw-border); }
.lgw-reply-sub__item.is-muted { opacity: .7; }
.lgw-reply-to { margin: 0 0 8px; font-size: 13px; color: var(--lgw-muted); }
.lgw-reply-to button { margin-left: 6px; padding: 0; border: 0; background: none; color: var(--lgw-accent); cursor: pointer; font: inherit; }
.lgw-replies .lgw-field textarea { min-height: 88px; }

.lgw-profile {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    padding: 20px;
    background: var(--lgw-surface);
    border-radius: var(--lgw-radius);
    border: 1px solid var(--lgw-border);
    box-shadow: var(--lgw-shadow);
    margin-bottom: 16px;
}
.lgw-profile__avatar { border-radius: 50%; object-fit: cover; }
.lgw-profile__main { flex: 1; min-width: 180px; }
.lgw-profile h1 { margin: 0; font-size: 1.25rem; }
.lgw-profile__stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lgw-profile .lgw-alert--ok { margin: 10px 0 0; }
.lgw-profile > .lgw-btn { margin-left: auto; }

.lgw-conv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lgw-conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--lgw-surface);
    border: 1px solid var(--lgw-border);
    border-radius: var(--lgw-radius);
    color: inherit;
    text-decoration: none;
}
.lgw-conv-item.is-unread { border-color: #c7d2fe; background: #f8faff; }
.lgw-conv-item img { border-radius: 50%; flex-shrink: 0; }
.lgw-conv-item__body { flex: 1; min-width: 0; }
.lgw-conv-item__body strong { display: flex; align-items: center; }
.lgw-conv-item__body p { margin: 4px 0 0; color: var(--lgw-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lgw-conv-item time { margin-left: auto; white-space: nowrap; }

.lgw-chat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.lgw-chat-head .lgw-thread__who { color: var(--lgw-text); font-size: 16px; }
.lgw-chat-box {
    background: var(--lgw-surface);
    border: 1px solid var(--lgw-border);
    border-radius: var(--lgw-radius);
    box-shadow: var(--lgw-shadow);
    overflow: hidden;
}
.lgw-chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(62vh, 560px);
    min-height: 220px;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    margin: 0;
}
.lgw-chat__empty { margin: auto; color: var(--lgw-muted); font-size: 14px; }
.lgw-chat-form { padding: 12px; border-top: 1px solid var(--lgw-border); background: #fff; }
.lgw-chat-form textarea {
    width: 100%;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid var(--lgw-border);
    border-radius: 10px;
    font: inherit;
    resize: vertical;
}
.lgw-chat-form textarea:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.lgw-chat-form__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.lgw-chat-form__bar .lgw-hint { margin: 0; }
.lgw-chat__bubble {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
}
.lgw-chat__bubble time { display: block; margin-top: 4px; font-size: 11px; opacity: .7; }
.lgw-chat__bubble.is-mine {
    align-self: flex-end;
    background: #dbeafe;
    border-bottom-right-radius: 4px;
}
.lgw-chat__bubble.is-theirs {
    align-self: flex-start;
    background: #f3f4f6;
    border-bottom-left-radius: 4px;
}

.lgw-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.lgw-tabs a {
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--lgw-surface);
    border: 1px solid var(--lgw-border);
    color: var(--lgw-muted);
    font-size: 14px;
}
.lgw-tabs a.is-active { background: #eef2ff; border-color: #c7d2fe; color: var(--lgw-accent); font-weight: 600; }

.lgw-admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lgw-admin-item {
    background: var(--lgw-surface);
    border: 1px solid var(--lgw-border);
    border-radius: var(--lgw-radius);
    padding: 16px;
}
.lgw-admin-item__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.lgw-admin-item__body { font-size: 14px; color: var(--lgw-muted); margin-bottom: 12px; }
.lgw-admin-item__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lgw-inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lgw-inline-form input[type="text"] {
    padding: 6px 10px;
    border: 1px solid var(--lgw-border);
    border-radius: 8px;
    font-size: 13px;
    max-width: 180px;
}

.lgw-pager { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.lgw-pager__item {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--lgw-border);
    background: var(--lgw-surface);
    color: var(--lgw-text);
    font-size: 14px;
    text-decoration: none;
}
.lgw-pager__item.is-active { background: var(--lgw-accent); border-color: var(--lgw-accent); color: #fff; }

.lgw-debug {
    margin: 24px 0;
    padding: 12px 14px;
    background: #111827;
    color: #e5e7eb;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.45;
}
.lgw-debug__sum { margin: 0 0 10px; font-weight: 700; }
.lgw-debug__marks { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.lgw-debug__marks th,
.lgw-debug__marks td { padding: 4px 8px; text-align: left; border-bottom: 1px solid #374151; }
.lgw-debug__marks td:nth-child(2),
.lgw-debug__marks td:nth-child(3) { white-space: nowrap; }
.lgw-debug__sql { max-height: 360px; overflow: auto; }
.lgw-debug__sql h3 { margin: 12px 0 6px; font-size: 12px; color: #93c5fd; }
.lgw-debug__sql ol { margin: 0; padding-left: 18px; }
.lgw-debug__sql li { margin: 0 0 8px; }
.lgw-debug__sql b { color: #fbbf24; }
.lgw-debug__sql code { display: block; white-space: pre-wrap; word-break: break-all; color: #f9fafb; }
.lgw-debug__sql span { display: block; color: #9ca3af; }

.lgw-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
}
.lgw-tabs--sub {
    display: inline-flex;
    gap: 2px;
    margin: -8px 0 16px;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--lgw-border);
    border-radius: 999px;
}
.lgw-tabs--sub a { border: 0; background: transparent; font-size: 13px; padding: 6px 12px; }
.lgw-tabs--sub a.is-active { background: #eef2ff; }
.lgw-review__title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.lgw-review__title a {
    flex: 1;
    min-width: 0;
    color: var(--lgw-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}
.lgw-review__title a:hover { color: var(--lgw-accent); }
.lgw-review__meta,
.lgw-review__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 8px;
}
.lgw-review__excerpt {
    margin: 10px 0 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
}
.lgw-review__reason {
    display: block;
    margin: 10px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
}
.lgw-review__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--lgw-border);
}
.lgw-review__buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lgw-reject-form { display: flex; gap: 8px; align-items: center; width: 100%; }
.lgw-reject-form input[type="text"] { flex: 1; width: auto; max-width: none; min-width: 0; }
.lgw-reject-form .lgw-reason-pick { flex: 0 0 148px; width: 148px; max-width: 40%; }
.lgw-reasons {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--lgw-surface);
    border: 1px solid var(--lgw-border);
    border-radius: var(--lgw-radius);
}
.lgw-reasons__row { display: flex; gap: 8px; align-items: center; }
.lgw-reasons__row input[type="text"] { flex: 1; width: auto; min-width: 0; max-width: none; }
.lgw-reasons__row.is-busy { opacity: .6; pointer-events: none; }
.lgw-reasons__list { display: flex; flex-wrap: wrap; gap: 6px; }
.lgw-reasons__list:has(.lgw-reason) { margin-top: 10px; }
.lgw-reason {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    max-width: 100%;
    padding: 2px 4px 2px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    font-size: 13px;
    overflow-wrap: anywhere;
}
.lgw-reason.is-busy { opacity: .5; pointer-events: none; }
.lgw-reason__del {
    border: 0;
    background: transparent;
    color: var(--lgw-muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 2px 6px;
}
.lgw-batch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: var(--lgw-surface);
    border: 1px solid var(--lgw-border);
    border-radius: var(--lgw-radius);
}
.lgw-batch input[type="text"] { flex: 1; width: auto; min-width: 140px; max-width: none; }
.lgw-batch.is-busy { opacity: .55; pointer-events: none; }
.lgw-pick { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--lgw-muted); cursor: pointer; }
.lgw-review__title .lgw-pick { margin-top: 3px; }
.lgw-admin-item.is-busy { position: relative; pointer-events: none; }
.lgw-admin-item.is-busy::after {
    content: "处理中…";
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: rgba(255,255,255,.8);
    font-weight: 600;
}
.lgw-mod-err { margin: 8px 0 0; color: var(--lgw-danger); font-size: 13px; }
.lgw-batch .lgw-mod-err { margin: 0; }
.lgw-reasons .lgw-mod-err { margin: 8px 0 0; }
.lgw-st {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.lgw-st--pending { background: #fffbeb; color: #92400e; }
.lgw-st--approved { background: #ecfdf5; color: #065f46; }
.lgw-st--rejected { background: #fef2f2; color: #991b1b; }
.lgw-pm__who {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.lgw-pm__who time { margin-left: auto; }
.lgw-pm__arrow { color: var(--lgw-muted); }
.lgw-pm__text {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--lgw-text);
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}
.lgw-tag-stack { display: flex; flex-direction: column; gap: 12px; }
.lgw-tag-card__head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}
.lgw-tag-card__head .lgw-inline-form { flex: 1; }
.lgw-tag-card__head input[type="text"] { flex: 1; min-width: 140px; max-width: none; }
.lgw-admin-h { margin: 0 0 8px; font-size: 1rem; }
.lgw-admin-create { display: flex; flex-direction: column; gap: 10px; }
.lgw-admin-create .lgw-inline-form input[type="text"] { flex: 1; min-width: 140px; max-width: none; }
.lgw-tag-admin { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lgw-tag-chip {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 10px;
    border: 1px solid var(--lgw-border);
    border-radius: 999px;
    background: #f8fafc;
    font-size: 13px;
}
.lgw-tag-chip__n {
    min-width: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
}
.lgw-tag-chip summary {
    cursor: pointer;
    color: var(--lgw-accent);
    list-style: none;
}
.lgw-tag-chip summary::-webkit-details-marker { display: none; }
.lgw-tag-chip details[open] { flex-basis: 100%; }
.lgw-tag-chip:has(details[open]) { width: 100%; border-radius: 12px; align-items: flex-start; }
.lgw-tag-chip details[open] form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}
.lgw-tag-chip details[open] input[type="text"],
.lgw-tag-chip details[open] select { flex: 1; min-width: 120px; max-width: none; }
.lgw-admin input[type="text"],
.lgw-admin input[type="number"],
.lgw-admin select {
    padding: 8px 10px;
    border: 1px solid var(--lgw-border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 13px;
}
.lgw-admin .lgw-inline-form input[type="text"] { max-width: none; }
@media (max-width: 560px) {
    .lgw-reject-form { flex-wrap: wrap; }
    .lgw-reject-form .lgw-reason-pick { flex: 1 1 100%; width: 100%; max-width: none; }
    .lgw-reject-form .lgw-btn { width: 100%; }
    .lgw-pm__who time { margin-left: 0; }
}
.lgw-alert--ok {
    padding: 8px 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    color: #065f46;
    font-size: 13px;
}
.lgw-tag-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.lgw-tag-pick label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--lgw-border);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}
.lgw-tag-pick label:has(input:checked) {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: var(--lgw-accent);
}
.lgw-num { width: 72px; padding: 6px 8px; border: 1px solid var(--lgw-border); border-radius: 8px; }

.lgw-foot {
    padding: 24px 0;
    border-top: 1px solid var(--lgw-border);
    text-align: center;
    color: var(--lgw-muted);
    font-size: 13px;
}
