/* ========================================
   티타임 (TeaTime) - 교사 커뮤니티
   DCInside-inspired, Pastel Purple Theme
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
    --primary: #7c6f9b;
    --primary-light: #b8a9d4;
    --primary-pale: #e8e0f0;
    --primary-dark: #5a4f73;
    --bg: #f5f3f8;
    --bg-white: #ffffff;
    --text: #2d2b33;
    --text-sub: #6e6a76;
    --border: #d4cfe0;
    --danger: #c45b5b;
    --success: #5b8c5a;
    --badge-lv1: #9e9e9e;
    --badge-lv2: #5b7fc4;
    --badge-lv3: #c4a035;
}

/* --- Reset / Normalize --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--text);
    text-decoration: none;
}

a:hover {
    color: var(--primary);
    text-decoration: underline;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

table {
    border-collapse: collapse;
    width: 100%;
}


/* ========================================
   HEADER
   ======================================== */
.site-header {
    background: var(--primary-dark);
    border-bottom: 2px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    height: 48px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.header-search {
    flex: 1;
    max-width: 360px;
    display: flex;
}

.header-search input {
    flex: 1;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--primary-light);
    border-right: none;
    border-radius: 2px 0 0 2px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    outline: none;
}

.header-search input:focus {
    background: #fff;
    border-color: var(--primary-light);
}

.header-search button {
    height: 30px;
    padding: 0 14px;
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    border-radius: 0 2px 2px 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.header-search button:hover {
    background: var(--primary-light);
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    white-space: nowrap;
}

.header-user {
    color: #fff;
    font-size: 13px;
}

.btn-header {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 12px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    text-decoration: none !important;
    transition: background 0.15s;
}

.btn-header:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.btn-header-primary {
    background: var(--primary);
    border-color: var(--primary-light);
}


/* ========================================
   LAYOUT
   ======================================== */
.layout-wrap {
    width: 100%;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

/* For PC (Desktop) Layout - Add Ad margins */
@media (min-width: 1024px) {
    .layout-wrap, .header-inner, .recent-boards-bar {
        padding-left: 15vw;  /* 좌측 광고 공간 예상 15% */
        padding-right: 15vw; /* 우측 광고 공간 예상 15% */
    }
}
@media (min-width: 1600px) {
    .layout-wrap, .header-inner, .recent-boards-bar {
        padding-left: 20vw;
        padding-right: 20vw;
    }
}

.content-main {
    flex: 1;
    min-width: 0;
}


/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    width: 240px;
    flex-shrink: 0;
}

.sidebar-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 2px;
    margin-bottom: 8px;
}

.sidebar-title {
    font-size: 13px;
    font-weight: 700;
    padding: 10px 12px;
    background: var(--primary-pale);
    border-bottom: 1px solid var(--border);
    color: var(--primary-dark);
}

.sidebar-menu li {
    border-bottom: 1px solid #f0ecf5;
}

.sidebar-menu li:last-child {
    border-bottom: none;
}

.sidebar-menu a {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
}

.sidebar-menu a:hover {
    background: var(--primary-pale);
    color: var(--primary-dark);
    text-decoration: none;
}

.sidebar-search {
    padding: 8px;
    display: flex;
    gap: 4px;
}

.sidebar-search input {
    flex: 1;
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 12px;
    outline: none;
}

.sidebar-search input:focus {
    border-color: var(--primary-light);
}

.sidebar-search button {
    height: 28px;
    padding: 0 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 12px;
}


/* ========================================
   FLASH MESSAGES / ALERTS
   ======================================== */
.messages-container {
    max-width: 1200px;
    margin: 8px auto 0;
    padding: 0 16px;
}

.alert {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 2px;
    margin-bottom: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-success {
    background: #e8f5e8;
    border-color: var(--success);
    color: #2d5a2d;
}

.alert-error, .alert-danger {
    background: #fce8e8;
    border-color: var(--danger);
    color: #5a2d2d;
}

.alert-warning {
    background: #fef8e8;
    border-color: #c4a035;
    color: #5a4a1a;
}

.alert-info {
    background: var(--primary-pale);
    border-color: var(--primary-light);
    color: var(--primary-dark);
}

.alert-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 0 4px;
}

.alert-close:hover {
    opacity: 1;
}


/* ========================================
   POST TABLE (DCInside Style)
   ======================================== */
.post-table {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 2px;
}

.post-table thead {
    background: var(--primary-pale);
}

.post-table thead th {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-dark);
    border-bottom: 1px solid var(--border);
    text-align: center;
    white-space: nowrap;
}

.post-table tbody tr {
    border-bottom: 1px solid #f0ecf5;
}

.post-table tbody tr:nth-child(even) {
    background: #faf8fd;
}

.post-table tbody tr:hover {
    background: var(--primary-pale);
}

.post-table tbody td {
    padding: 7px 10px;
    font-size: 13px;
}

.col-no {
    width: 60px;
    text-align: center;
    color: var(--text-sub);
    font-size: 12px;
}

.col-title {
    text-align: left;
}

.col-title a {
    color: var(--text);
    text-decoration: none;
}

.col-title a:hover {
    text-decoration: underline;
}

.col-author {
    width: 120px;
    text-align: center;
    font-size: 12px;
    white-space: nowrap;
}

.col-date {
    width: 70px;
    text-align: center;
    color: var(--text-sub);
    font-size: 12px;
}

.col-views {
    width: 55px;
    text-align: center;
    color: var(--text-sub);
    font-size: 12px;
}

.post-board-tag {
    font-size: 11px;
    color: var(--primary);
    margin-right: 4px;
}

.comment-count {
    font-size: 11px;
    color: var(--danger);
    font-weight: 700;
    margin-left: 4px;
}

.profile-activity-table td {
    vertical-align: middle;
}

.status-badge {
    display: inline-block;
    min-width: 48px;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

.status-active {
    background: #e8f2e7;
    color: var(--success);
}

.status-warning {
    background: #fff3d6;
    color: #8a6200;
}

.status-hidden,
.status-muted {
    background: #eceaf0;
    color: var(--text-sub);
}

.muted-title {
    color: var(--text-sub);
}

.author-anon {
    color: var(--text-sub);
}

.author-profile {
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

.author-profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    vertical-align: baseline;
}

.author-profile-trigger:hover,
.author-profile-trigger:focus {
    color: var(--primary);
    text-decoration: underline;
    outline: none;
}

.author-profile-card {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 1000;
    display: none;
    width: 220px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
    color: var(--text);
    text-align: left;
    white-space: normal;
    transform: translateX(-50%);
}

.author-profile-card::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #fff;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
    transform: translateX(-50%) rotate(45deg);
}

.author-profile.is-open .author-profile-card {
    display: block;
}

.author-profile-title {
    display: block;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 700;
}

.author-profile-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
}

.author-profile-label {
    flex-shrink: 0;
    color: var(--text-sub);
}

.notice-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 2px;
    font-weight: 700;
}

.post-notice {
    background: #f5f0ff !important;
}

.empty-msg {
    text-align: center;
    color: var(--text-sub);
    padding: 30px 10px !important;
    font-size: 13px;
}


/* ========================================
   SECTION BOX
   ======================================== */
.section-box {
    margin-bottom: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
}

.section-more {
    font-size: 12px;
    color: var(--primary);
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    padding: 8px 0 12px;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 16px;
    color: var(--primary-dark);
}


/* ========================================
   HERO (Main Page)
   ======================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 30px 24px;
    border-radius: 2px;
    margin-bottom: 16px;
    text-align: center;
}

.hero-section h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.hero-section p {
    font-size: 14px;
    opacity: 0.9;
}

.hero-sub {
    font-size: 12px !important;
    opacity: 0.7 !important;
    margin-top: 4px;
}


/* ========================================
   QUICK LINKS
   ======================================== */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 2px;
    text-decoration: none !important;
    transition: border-color 0.15s;
}

.quick-link-card:hover {
    border-color: var(--primary-light);
    background: var(--primary-pale);
}

.quick-link-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.quick-link-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}


/* ========================================
   BOARD LIST / CARDS
   ======================================== */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.board-card {
    display: block;
    padding: 14px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 2px;
    text-decoration: none !important;
    transition: border-color 0.15s;
}

.board-card:hover {
    border-color: var(--primary-light);
    background: var(--primary-pale);
}

.board-card-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.board-card-count {
    font-size: 12px;
    color: var(--text-sub);
}

.board-search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.board-search-form input {
    flex: 1;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 2px;
    outline: none;
}

.board-search-form input:focus {
    border-color: var(--primary-light);
}


/* ========================================
   BOARD HEADER
   ======================================== */
.board-header {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 14px 16px;
    margin-bottom: 8px;
}

.board-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
}

.board-desc {
    font-size: 13px;
    color: var(--text-sub);
    margin-top: 4px;
}


/* ========================================
   POST LIST ACTIONS / SEARCH
   ======================================== */
.post-list-actions {
    display: flex;
    justify-content: flex-end;
    padding: 10px 0;
}

.board-search {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 10px 12px;
    margin-top: 8px;
}

.board-search form {
    display: flex;
    gap: 6px;
}

.board-search select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--bg-white);
    font-size: 12px;
    outline: none;
}

.board-search input {
    flex: 1;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 2px;
    outline: none;
    font-size: 13px;
}

.board-search input:focus {
    border-color: var(--primary-light);
}


/* ========================================
   POST DETAIL
   ======================================== */
.breadcrumb {
    font-size: 12px;
    color: var(--text-sub);
    padding: 8px 0;
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb .sep {
    margin: 0 6px;
    color: var(--border);
}

.post-header {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 16px;
    margin-bottom: 1px;
}

.post-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-sub);
    flex-wrap: wrap;
}

.post-author {
    font-weight: 500;
    color: var(--text);
}

.post-ip {
    font-size: 11px;
    color: var(--text-sub);
    opacity: 0.7;
}

.post-content {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 2px 2px;
    padding: 20px 16px;
    min-height: 200px;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.post-actions-right {
    display: flex;
    gap: 6px;
}


/* ========================================
   COMMENTS
   ======================================== */
.comments-section {
    margin-top: 12px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 2px;
}

.comments-title {
    font-size: 14px;
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--primary-pale);
    color: var(--primary-dark);
}

.comments-count {
    color: var(--danger);
}

.comment {
    padding: 12px 16px;
    border-bottom: 1px solid #f0ecf5;
}

.comment:last-child {
    border-bottom: none;
}

.comment-reply {
    margin-left: 32px;
    background: #faf8fd;
    border-left: 3px solid var(--primary-pale);
    padding: 10px 14px;
    margin-top: 4px;
    margin-bottom: 4px;
}

.comment-header {
    display: flex;
    position: relative;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.comment-author {
    font-size: 13px;
    font-weight: 500;
}

.comment-date {
    font-size: 11px;
    color: var(--text-sub);
}

.comment-actions-inline {
    margin-left: auto;
}

.comment-body {
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
}

.reply-form-wrap {
    margin-top: 8px;
    padding: 10px;
    background: #f5f3f8;
    border-radius: 2px;
}

.reply-anon-fields {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.reply-anon-fields input {
    flex: 1;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 12px;
    outline: none;
}

.reply-input-wrap {
    display: flex;
    gap: 6px;
    align-items: flex-end;
}

.reply-input-wrap textarea {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 2px;
    resize: vertical;
    font-size: 13px;
    outline: none;
}

.reply-input-wrap textarea:focus {
    border-color: var(--primary-light);
}

.comment-form-wrap {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.comment-form-wrap h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.comment-anon-fields {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.comment-anon-fields input {
    width: 160px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 13px;
    outline: none;
}

.comment-input-wrap {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.comment-input-wrap textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 2px;
    resize: vertical;
    font-size: 13px;
    outline: none;
}

.comment-input-wrap textarea:focus {
    border-color: var(--primary-light);
}


/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none !important;
    text-align: center;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-default {
    background: var(--bg-white);
    color: var(--text);
}

.btn-default:hover {
    background: var(--primary-pale);
    border-color: var(--primary-light);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #a34a4a;
    border-color: #a34a4a;
    color: #fff;
}

.btn-cancel {
    background: var(--bg-white);
    color: var(--text-sub);
}

.btn-cancel:hover {
    background: #f0ecf5;
}

.btn-full {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-text {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-sub);
    padding: 2px 6px;
}

.btn-text:hover {
    color: var(--primary);
    text-decoration: underline;
}

.btn-text-danger:hover {
    color: var(--danger);
}


/* ========================================
   FORMS
   ======================================== */
.form-page {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.form-container {
    width: 100%;
    max-width: 460px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 32px 28px;
}

.form-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.form-subtitle {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text);
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--bg-white);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}

.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--bg-white);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
    resize: vertical;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(184, 169, 212, 0.2);
}

.form-group textarea {
    height: auto;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.6;
}

.form-group select {
    cursor: pointer;
}

.form-group select:disabled {
    background: #f5f3f8;
    color: var(--text-sub);
}

.form-help {
    font-size: 11px;
    color: var(--text-sub);
    margin-top: 4px;
}

.form-errors {
    background: #fce8e8;
    border: 1px solid var(--danger);
    border-radius: 2px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.error-item {
    font-size: 13px;
    color: var(--danger);
    margin-bottom: 2px;
}

.error-item:last-child {
    margin-bottom: 0;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-half {
    flex: 1;
}

.form-inline {
    display: flex;
    gap: 8px;
}

.form-inline input {
    flex: 1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.form-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0ecf5;
    font-size: 13px;
}

.form-footer a {
    color: var(--primary);
    font-weight: 500;
}

.form-author-info {
    background: var(--primary-pale);
    padding: 10px 14px;
    border-radius: 2px;
    margin-bottom: 14px;
    font-size: 13px;
}

.author-label {
    color: var(--text-sub);
    margin-right: 6px;
}

.author-name {
    font-weight: 500;
}


/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
    vertical-align: middle;
    line-height: 1.3;
}

.badge-lv1 {
    background: var(--badge-lv1);
    color: #fff;
}

.badge-lv2 {
    background: var(--badge-lv2);
    color: #fff;
}

.badge-lv3 {
    background: var(--badge-lv3);
    color: #fff;
}

.badge-anonymous {
    background: #e0dce8;
    color: var(--text-sub);
}


/* ========================================
   PAGINATION
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    padding: 14px 0;
}

.page-link {
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--bg-white);
    text-decoration: none !important;
    transition: background 0.15s;
}

.page-link:hover {
    background: var(--primary-pale);
    border-color: var(--primary-light);
    color: var(--primary-dark);
}

.page-current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 700;
}


/* ========================================
   PROFILE PAGE
   ======================================== */
.profile-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 16px;
    margin-bottom: 12px;
}

.profile-section .section-title {
    font-size: 14px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0ecf5;
}

.section-desc {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 12px;
}

/* Verification Steps */
.verification-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 16px 0;
}

.v-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.v-step-icon {
    width: 36px;
    height: 36px;
    border-radius: 2px;
    background: #e0dce8;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.v-step-done .v-step-icon {
    background: var(--primary);
    color: #fff;
}

.v-step-label {
    font-size: 12px;
    color: var(--text-sub);
}

.v-step-done .v-step-label {
    color: var(--primary-dark);
    font-weight: 500;
}

.v-step-line {
    width: 40px;
    height: 2px;
    background: #e0dce8;
    margin: 0 8px;
    margin-bottom: 22px;
}

.v-line-done {
    background: var(--primary);
}

.verification-desc {
    text-align: center;
    font-size: 13px;
    color: var(--text-sub);
    margin-top: 8px;
}

.info-table {
    width: 100%;
}

.info-table th {
    width: 120px;
    padding: 8px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sub);
    background: #faf8fd;
    border-bottom: 1px solid #f0ecf5;
}

.info-table td {
    padding: 8px 12px;
    font-size: 13px;
    border-bottom: 1px solid #f0ecf5;
}

.location-status {
    padding: 10px 14px;
    border-radius: 2px;
    margin-bottom: 12px;
    font-size: 13px;
}


/* ========================================
   DELETE PREVIEW
   ======================================== */
.delete-preview {
    background: #faf8fd;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.text-sub {
    color: var(--text-sub);
    font-size: 12px;
}


/* ========================================
   SEARCH RESULTS
   ======================================== */
.search-query-info {
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 12px;
}

.search-query-info strong {
    color: var(--primary);
}


/* ========================================
   MODAL
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    z-index: 1;
}

.modal-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.modal-content p {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 16px;
}


/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    text-align: center;
    font-size: 12px;
}

.footer-links {
    margin-top: 6px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 8px;
}

.footer-links a:hover {
    color: #fff;
}


/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.hidden {
    display: none;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}


/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
    .layout-wrap {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        display: flex;
        gap: 8px;
        overflow-x: auto;
    }

    .sidebar-section {
        min-width: 200px;
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .quick-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .board-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    body {
        overflow-x: hidden;
    }

    html {
        font-size: 13px;
    }

    .header-inner {
        height: auto;
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 8px;
    }

    .logo {
        font-size: 16px;
    }

    .header-user {
        display: none;
    }

    .btn-header {
        padding: 4px 8px;
    }

    .header-search {
        order: 3;
        max-width: 100%;
        flex-basis: 100%;
    }

    .header-auth {
        margin-left: auto;
    }

    .sidebar {
        flex-direction: column;
    }

    .sidebar-section {
        min-width: 0;
    }

    .layout-wrap {
        padding: 8px;
    }

    .board-header,
    .profile-section,
    .section-box,
    .dashboard-top,
    .board-search {
        padding-left: 10px;
        padding-right: 10px;
    }

    .dashboard-top {
        font-size: 1rem;
    }

    .dashboard-top strong {
        font-size: 1.2rem;
    }

    .post-list-page,
    .profile-page,
    .dashboard-page {
        max-width: 100%;
        overflow-x: hidden;
    }

    .post-table {
        table-layout: fixed;
    }

    .col-no {
        width: 40px;
    }

    .col-author {
        width: 72px;
    }

    .col-date, .col-views {
        width: 46px;
    }

    .post-table tbody td {
        padding: 6px 6px;
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .post-table thead th {
        padding: 6px;
        font-size: 11px;
    }

    .post-table .col-title a,
    .post-board-tag,
    .author-profile-trigger,
    .author-anon {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .post-board-tag {
        display: none;
    }

    .author-profile-card {
        left: auto;
        right: 0;
        width: min(260px, calc(100vw - 24px));
    }

    .profile-tabs {
        gap: 0 !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .profile-tabs .tab-btn {
        flex: 0 0 auto;
        padding: 10px 12px !important;
        white-space: nowrap;
    }

    .profile-activity-table {
        min-width: 640px;
    }

    .profile-section:has(.profile-activity-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .page-link {
        padding: 5px 8px;
    }

    .board-search form,
    .board-search-form {
        flex-wrap: wrap;
    }

    .board-search select,
    .board-search input,
    .board-search .btn,
    .board-search-form input,
    .board-search-form .btn {
        flex: 1 1 100%;
        width: 100%;
    }

    .recent-boards-bar {
        padding: 6px 8px;
        gap: 8px;
    }

    .recent-boards-label {
        margin-right: 0;
    }

    .recent-board-item {
        max-width: 160px;
    }

    .quick-links-grid {
        grid-template-columns: 1fr;
    }

    .board-grid {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 20px 16px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .post-meta {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .comment-reply {
        margin-left: 16px;
    }

    .comment-anon-fields {
        flex-direction: column;
    }

    .comment-anon-fields input {
        width: 100%;
    }

    .verification-steps {
        flex-wrap: wrap;
    }

    .v-step-line {
        width: 24px;
    }

    .reply-anon-fields {
        flex-direction: column;
    }
}

/* ========================================
   DASHBOARD (Board List Redesign)
   ======================================== */
.dashboard-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-top {
    text-align: center;
    padding: 30px 20px;
    background: var(--primary-pale);
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 1.2rem;
}

.dashboard-top strong {
    color: var(--primary-dark);
    font-size: 1.5rem;
}

.dashboard-middle {
    display: flex;
    gap: 20px;
}

.dashboard-middle .list-box {
    flex: 1;
    min-width: 0;
}

.dashboard-table {
    margin-top: 10px;
}

.dashboard-bottom {
    padding: 50px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 2px;
    text-align: center;
}

.search-container h3 {
    margin-bottom: 20px;
    color: var(--text);
}

.search-input-wrapper {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.search-input-wrapper input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--primary);
    border-right: none;
    outline: none;
    font-size: 1rem;
    border-radius: 2px 0 0 2px;
}

.search-input-wrapper .btn-search {
    background: var(--primary);
    color: #fff;
    border: 2px solid var(--primary);
    padding: 0 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 0 2px 2px 0;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--primary);
    border-top: none;
    z-index: 1000;
    list-style: none;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
}

.autocomplete-list li {
    border-bottom: 1px solid var(--border);
}

.autocomplete-list li a {
    display: block;
    padding: 10px 15px;
    color: var(--text);
    text-decoration: none;
}

.autocomplete-list li a:hover,
.autocomplete-list li div:hover {
    background: var(--primary-pale);
}

.board-search-option {
    padding: 10px 15px;
    cursor: pointer;
}

.board-search-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.board-search-name {
    color: var(--text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-search-meta {
    margin-top: 5px;
    padding-left: 58px;
    color: var(--text-sub);
    font-size: 0.78rem;
    line-height: 1.35;
}

.board-type-tag {
    flex-shrink: 0;
    font-size: 0.8rem;
    background: var(--primary-light);
    color: #fff;
    padding: 2px 6px;
    border-radius: 2px;
    margin-right: 8px;
}

.no-results {
    padding: 10px 15px;
    color: var(--text-sub);
    text-align: center;
}

/* Responsive Middle */
@media (max-width: 768px) {
    .dashboard-middle {
        flex-direction: column;
    }
}


/* ========================================
   RECENT BOARDS BAR
   ======================================== */
.recent-boards-bar {
    display: flex;
    align-items: center;
    background: #f9f9f9;
    border-bottom: 1px solid var(--border);
    padding: 8px 16px;
    font-size: 0.9rem;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

@media (min-width: 1024px) {
    .recent-boards-bar {
        padding-left: 15vw;
        padding-right: 15vw;
    }
}
@media (min-width: 1600px) {
    .recent-boards-bar {
        padding-left: 20vw;
        padding-right: 20vw;
    }
}

.recent-boards-label {
    font-weight: bold;
    margin-right: 15px;
    color: var(--primary-dark);
    flex-shrink: 0;
}

.recent-boards-list {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.recent-board-item {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 2px 10px;
    max-width: 240px;
    min-width: 0;
}

.recent-board-link {
    color: var(--text);
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-board-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.recent-board-close {
    background: transparent;
    border: none;
    color: var(--text-sub);
    font-size: 1.1rem;
    margin-left: 5px;
    cursor: pointer;
    line-height: 1;
}

.recent-board-close:hover {
    color: var(--danger);
}

.ip {
    font-size: 0.8em;
    color: var(--text-sub);
    font-weight: 400;
}

.comment-reply {
    padding-left: 30px;
    position: relative;
    margin-top: 5px;
}

.comment-reply::before {
    content: "↳";
    position: absolute;
    left: 10px;
    top: 15px;
    color: var(--text-sub);
    font-size: 1.2rem;
}

.comment-delete-wrap {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 5px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--danger);
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 10;
    white-space: nowrap;
}

.report-form-wrap {
    border-color: var(--primary);
}

.report-form-wrap form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    max-width: min(520px, calc(100vw - 32px));
    white-space: normal;
}

.report-form-wrap select {
    width: auto;
    min-width: 120px;
    padding: 4px 8px;
    font-size: 0.9em;
}

.report-form-wrap textarea {
    width: 220px;
    min-height: 32px;
    padding: 4px 8px;
    font-size: 0.9em;
    resize: vertical;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 250px;
    animation: slideInRight 0.3s ease-out forwards;
}

.toast.fade-out {
    animation: fadeOutRight 0.3s ease-in forwards;
}

.toast-success {
    border-left: 4px solid var(--primary);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-close {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 15px;
}

.toast-close:hover {
    color: #fff;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
