/* Board - Mobile-first */
.board-page {
    padding: 0;
    min-height: 100vh;
}

.board-container {
    max-width: 640px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.board-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.board-back {
    flex-shrink: 0;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 6px 0;
}

.board-back:hover {
    text-decoration: underline;
}

.board-title {
    flex: 1;
    text-align: center;
    font-size: 1.2rem;
    margin: 0;
    color: #333;
}

.board-write-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.board-write-btn:hover {
    opacity: 0.95;
}

.board-admin-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
}

.board-admin-btn:hover {
    background: #f8f9fa;
}

.board-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.board-lang-buttons {
    display: flex;
    gap: 4px;
}

.board-lang-buttons .lang-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    cursor: pointer;
}

.board-lang-buttons .lang-btn.active {
    background: #667eea;
    color: white;
}

.board-write-section {
    padding: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.board-form-title {
    font-size: 1rem;
    color: #333;
    margin: 0 0 12px 0;
}

.board-form .board-label {
    display: block;
    font-size: 0.85rem;
    color: #555;
    margin: 12px 0 4px 0;
}

.board-form .board-label:first-of-type {
    margin-top: 0;
}

.board-input,
.board-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
}

.board-input:focus,
.board-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.board-textarea {
    resize: vertical;
    min-height: 80px;
}

.board-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.board-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.board-btn-cancel {
    background: #e9ecef;
    color: #495057;
}

.board-btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.board-main {
    flex: 1;
    padding: 16px;
}

.board-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.board-card {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.board-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.board-card:active {
    transform: translateY(0);
}

.board-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-card-meta {
    font-size: 0.8rem;
    color: #888;
}

.board-loading,
.board-end,
.board-empty {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.9rem;
}

.board-spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto 8px;
    border: 3px solid #e9ecef;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: board-spin 0.8s linear infinite;
}

@keyframes board-spin {
    to { transform: rotate(360deg); }
}

.board-sentinel {
    height: 1px;
    visibility: hidden;
}

.board-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.board-detail-modal {
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    background: white;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.board-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 0 20px;
}

.board-detail-title {
    flex: 1;
    font-size: 1.2rem;
    color: #333;
    margin: 0;
    word-break: break-word;
}

.board-detail-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    color: #666;
    cursor: pointer;
}

.board-detail-meta {
    padding: 8px 20px 12px;
    font-size: 0.85rem;
    color: #888;
}

.board-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 24px;
    white-space: pre-wrap;
    word-break: break-word;
    color: #444;
    line-height: 1.6;
}

.board-detail-actions {
    display: flex;
    gap: 10px;
    padding: 12px 20px 20px;
    border-top: 1px solid #eee;
}

.board-btn-report {
    flex: 1;
    background: #f8f9fa;
    color: #666;
}

.board-btn-delete {
    flex: 1;
    background: #fee;
    color: #c00;
}

.board-card-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #888;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.board-card-delete:hover {
    background: #fee;
    color: #c00;
}

.board-report-overlay {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.board-report-modal {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 16px;
    padding: 20px;
}

.board-report-title {
    font-size: 1.1rem;
    margin: 0 0 16px 0;
    color: #333;
}

.board-report-modal .board-label {
    margin-top: 12px;
}

.board-report-modal .board-form-actions {
    margin-top: 16px;
}

.hidden {
    display: none !important;
}

@media (min-width: 641px) {
    .board-detail-overlay {
        align-items: center;
        padding: 20px;
    }
    .board-detail-modal {
        max-height: 80vh;
        border-radius: 20px;
    }
}
