/* ==========================================================================
   Rich Drag-and-Drop Image Editor Styles
   ========================================================================== */

.post-form-rich-editor {
    min-height: 220px;
    max-height: 360px;
    overflow-y: auto;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    outline: none;
    white-space: pre-wrap;
    word-break: break-word;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-form-rich-editor:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(217, 119, 87, 0.25);
}

.post-form-rich-editor:empty:before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    pointer-events: none;
    display: block;
}

.post-form-rich-editor p {
    margin: 0 0 0.5rem 0;
}

/* Clean & Minimal Draggable Image Block (No clutter, pure image by default) */
.editor-img-block {
    position: relative;
    margin: 0.75rem 0;
    border: none;
    background: transparent;
    cursor: grab;
    user-select: none;
    transition: opacity 0.15s ease;
    text-align: left;
    line-height: 0;
}

.editor-img-block[data-align="center"] {
    text-align: center;
}
.editor-img-block[data-align="right"] {
    text-align: right;
}
.editor-img-block[data-align="left"] {
    text-align: left;
}

/* Image Media Container: Only wraps the exact dimensions of media */
.editor-img-media-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    border-radius: var(--radius-sm, 6px);
    transition: outline 0.15s ease, box-shadow 0.15s ease;
}

.editor-img-block img,
.editor-img-block video {
    max-width: 100%;
    max-height: 480px;
    height: auto;
    object-fit: contain;
    display: block;
    background: transparent;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
    border-radius: var(--radius-sm, 6px);
}

/* Hover & Selected Focus States */
.editor-img-block:hover .editor-img-media-container {
    outline: 1.5px dashed rgba(217, 119, 87, 0.45);
    outline-offset: 2px;
}

.editor-img-block.selected .editor-img-media-container {
    outline: 2px solid var(--accent-blue, #D97757);
    outline-offset: 3px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Compact Floating Toolbar (Shown only when selected) */
.editor-img-floating-toolbar {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(250, 247, 240, 0.96);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3px 6px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px) scale(0.96);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 20;
    line-height: normal;
}

.editor-img-block.selected .editor-img-floating-toolbar {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.editor-img-floating-toolbar .img-align-btn {
    background: none;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.12s ease;
    line-height: 1.2;
}

.editor-img-floating-toolbar .img-align-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.06);
}

.editor-img-floating-toolbar .img-align-btn.active {
    color: var(--accent-blue);
    background: rgba(217, 119, 87, 0.15);
    font-weight: 700;
}

.editor-img-toolbar-divider {
    width: 1px;
    height: 12px;
    background: var(--border-color);
    margin: 0 2px;
}

.editor-img-floating-toolbar .img-remove-btn {
    background: none;
    border: none;
    color: var(--color-danger, #e74c3c);
    cursor: pointer;
    padding: 2px 5px;
    font-size: 0.85rem;
    line-height: 1;
    border-radius: 4px;
    transition: background 0.12s ease;
}

.editor-img-floating-toolbar .img-remove-btn:hover {
    background: rgba(231, 76, 60, 0.15);
}

/* Corner Resize Handle (Circle handle at bottom-right corner) */
.editor-img-resize-handle {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 14px;
    height: 14px;
    background: var(--accent-blue, #D97757);
    border: 2px solid #ffffff;
    border-radius: 50%;
    cursor: se-resize !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.85);
    transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.12s ease;
    z-index: 25;
}

.editor-img-block.selected .editor-img-resize-handle {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.editor-img-resize-handle:hover {
    transform: scale(1.3) !important;
    background: #b85435;
}

/* Dragging & Drop Line Indicators */
.editor-img-block.dragging {
    opacity: 0.35;
    cursor: grabbing;
}

.editor-img-block.drag-over-top {
    border-top: 3px solid var(--accent-blue) !important;
}

.editor-img-block.drag-over-bottom {
    border-bottom: 3px solid var(--accent-blue) !important;
}

/* Post Detail Modal Content Images */
.post-detail-image-box {
    margin: 0.85rem 0;
    border-radius: var(--radius-md);
    overflow: visible;
    border: none;
    background: transparent;
    text-align: left;
}

.post-detail-image-box[data-align="center"] {
    text-align: center;
}
.post-detail-image-box[data-align="right"] {
    text-align: right;
}
.post-detail-image-box[data-align="left"] {
    text-align: left;
}

.post-detail-image-box img,
.post-detail-image-box video {
    max-width: 100%;
    max-height: 520px;
    height: auto;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    background: transparent;
    border-radius: var(--radius-md);
}

/* Rich Text Editor Toolbar */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.6rem;
    background: #FAF7F0;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
    flex-wrap: wrap;
    user-select: none;
}

.post-form-rich-editor {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.toolbar-select {
    height: 28px;
    padding: 0 0.4rem;
    font-size: 0.78rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #ffffff;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease;
}

.toolbar-select:focus, .toolbar-select:hover {
    border-color: var(--accent-blue);
}

.toolbar-divider {
    width: 1px;
    height: 18px;
    background: var(--border-color);
    margin: 0 0.2rem;
    flex-shrink: 0;
}

.toolbar-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.82rem;
    line-height: 1;
    padding: 0;
    transition: all 0.15s ease;
}

.toolbar-btn:hover {
    background: #EDE8DF;
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.toolbar-btn.active {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
}

.toolbar-color-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.toolbar-color-picker {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Post Detail YouTube Embed Box (16:9 Responsive) */
.post-detail-youtube-box {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    margin: 1.25rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #111;
}

.post-detail-youtube-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.editor-youtube-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #111;
}

.editor-youtube-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Custom Select Dropdown Component (PinZoy Dark Glassmorphism) */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-wrapper.open {
    z-index: 100;
}

.custom-select-trigger {
    width: 100%;
    height: 42px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 0.85rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
    outline: none;
    user-select: none;
}

.custom-select-trigger:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-card-hover);
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--accent-purple);
    box-shadow: 0 0 16px rgba(217, 119, 87, 0.2);
    background: #FAF7F0;
}

.custom-select-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
    font-weight: 500;
}

.custom-select-label.is-placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.custom-select-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-left: 0.5rem;
    color: var(--text-muted);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
    pointer-events: none;
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
    color: var(--accent-blue);
}

.custom-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: #FAF7F0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(125, 100, 75, 0.08);
    z-index: 1050;
    padding: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    user-select: none;
}

.custom-select-menu.hidden {
    display: none !important;
}

.custom-select-group {
    margin-bottom: 0.65rem;
}

.custom-select-group:last-child {
    margin-bottom: 0;
}

/* 2단계: 드롭다운 내 게시판 분류 (대분류 섹션 헤더, UI 매니저 연동: 1.05rem) */
.custom-select-group-title {
    font-size: var(--font-board-group, 1.05rem);
    font-weight: 700;
    color: var(--accent-blue);
    padding: 0.45rem 0.5rem 0.35rem;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.3rem;
}

/* 3단계: 드롭다운 내 게시판 하위 항목 (0.92rem) */
.custom-select-item {
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    background: transparent;
    margin-bottom: 0.2rem;
}

.custom-select-item-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.custom-select-item-name {
    font-size: var(--font-board-item, 0.92rem);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.18s ease;
}

/* 보조 메타: 식별 태그 (0.72rem) */
.custom-select-item-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.custom-select-item-tag {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(180, 160, 135, 0.1);
    border: 1px solid var(--border-color);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    font-family: monospace;
    transition: all 0.15s ease;
}

.custom-select-item:hover {
    background: rgba(217, 119, 87, 0.12);
    border-color: rgba(217, 119, 87, 0.28);
    transform: translateX(2px);
}

.custom-select-item:hover .custom-select-item-name {
    color: var(--accent-purple);
}

.custom-select-item:hover .custom-select-item-tag {
    color: var(--text-primary);
    background: rgba(217, 119, 87, 0.25);
}

/* 선택된 게시판 스타일 (사이드바 .active와 완전 일치) */
.custom-select-item.selected {
    background: rgba(217, 119, 87, 0.16);
    border-left: 3.5px solid var(--accent-purple);
    border-color: rgba(217, 119, 87, 0.38);
    box-shadow: 0 0 16px rgba(217, 119, 87, 0.12) inset;
}

.custom-select-item.selected .custom-select-item-name {
    color: var(--accent-purple);
    font-weight: 700;
}

.custom-select-item.selected .custom-select-item-tag {
    color: #ffffff;
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    font-weight: 600;
}

/* Custom Scrollbar for Dropdown Menu */
.custom-select-menu::-webkit-scrollbar {
    width: 6px;
}
.custom-select-menu::-webkit-scrollbar-track {
    background: rgba(180, 160, 135, 0.08);
    border-radius: 4px;
}
.custom-select-menu::-webkit-scrollbar-thumb {
    background: rgba(217, 119, 87, 0.3);
    border-radius: 4px;
}
.custom-select-menu::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* Representative Cover Image Upload & Preview */
.cover-upload-container {
    width: 100%;
}

.cover-preview-box {
    margin-top: 0.6rem;
    padding: 0.6rem 0.85rem;
    background: #FAF7F0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: all 0.2s ease;
}

.cover-preview-box:hover {
    border-color: var(--border-color-hover);
}

.cover-preview-box.hidden {
    display: none !important;
}

.cover-preview-img-wrapper {
    width: 80px;
    height: 52px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #EDE8DF;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.cover-preview-img-wrapper img,
.cover-preview-img-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover-preview-info {
    flex: 1;
    min-width: 0;
}

.cover-preview-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.cover-preview-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* User-Resizable & Draggable Post Form Modal */
.post-form-modal-content {
    width: 700px;
    height: 780px;
    min-width: 360px;
    min-height: 420px;
    max-width: 95vw !important;
    max-height: 92vh !important;
    resize: both;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    padding: 1.15rem 1.35rem 0.75rem 1.35rem;
    box-sizing: border-box;
    position: relative;
}

.post-form-modal-content.dragging {
    transition: none !important;
    box-shadow: var(--shadow-lg), 0 0 0 2px var(--accent-blue);
}

.post-form-modal-content form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.post-form-modal-content .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto;
    padding-right: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem !important;
}

.post-form-modal-content .modal-body > .info-group {
    flex-shrink: 0;
}

/* Compact 2-Column Row for Title & Category */
.post-form-row {
    display: flex;
    gap: 0.65rem;
    width: 100%;
    flex-shrink: 0;
}

.post-form-title-group {
    flex: 2.2;
    min-width: 0;
    margin-bottom: 0 !important;
}

.post-form-category-group {
    flex: 1.3;
    min-width: 135px;
    margin-bottom: 0 !important;
}

.post-form-category-group .custom-select-trigger {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0.3rem 0.65rem !important;
    font-size: 0.85rem !important;
}

/* Compact Cover Image Upload */
.post-form-cover-group {
    flex-shrink: 0;
    margin-bottom: 0 !important;
}

.post-form-cover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.post-form-cover-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.cover-upload-controls {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.cover-preview-box {
    margin-top: 0.35rem;
    padding: 0.35rem 0.65rem;
    background: #FAF7F0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.cover-preview-img-wrapper {
    width: 60px;
    height: 40px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #EDE8DF;
    flex-shrink: 0;
}

/* Story Editor: Maximized Vertical Space, Never Overflow Into Tag Section */
.post-form-modal-content .post-form-editor-group {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
    overflow: hidden;
}

.post-form-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    flex-shrink: 0;
}

.editor-sub-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.post-form-modal-content .editor-toolbar {
    padding: 0.25rem 0.5rem;
    gap: 0.25rem;
    flex-shrink: 0;
}

.post-form-modal-content .post-form-editor-group .post-form-rich-editor {
    flex: 1 1 0 !important;
    min-height: 120px !important;
    max-height: none !important;
    height: auto !important;
    overflow-y: auto !important;
}

/* Compact Tag Section */
.post-form-tag-group {
    flex-shrink: 0;
    margin-bottom: 0 !important;
}

.form-input-compact {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0.3rem 0.65rem !important;
    font-size: 0.85rem !important;
}

.post-form-modal-content .modal-footer {
    flex-shrink: 0;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.post-form-modal-content::-webkit-resizer {
    background: transparent;
}

.modal-resize-handle-icon {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 14px;
    height: 14px;
    pointer-events: none;
    opacity: 0.45;
    color: var(--accent-blue);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    transition: opacity 0.2s ease;
}

.post-form-modal-content:hover .modal-resize-handle-icon {
    opacity: 0.9;
}

/* ==========================================================================
   Admin UI Settings Manager Modal Styles (Non-blur, Movable Floating Window)
   ========================================================================== */

#admin-settings-modal.modal-overlay {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none !important;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0;
}

.modal-settings-dialog {
    pointer-events: auto !important;
    position: fixed;
    top: 76px;
    right: 24px;
    margin: 0;
    max-width: 900px;
    min-width: 340px;
    width: min(480px, calc(100vw - 32px));
    min-height: 320px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.5rem 1.25rem;
    background: #FAF7F0 !important;
    border: 1px solid rgba(180, 160, 135, 0.45) !important;
    box-shadow: 0 16px 45px rgba(125, 100, 75, 0.2), 0 0 25px rgba(217, 119, 87, 0.22) !important;
    border-radius: var(--radius-lg);
    transform: none !important;
    z-index: 1001;
    overflow: hidden;
}

#admin-settings-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 120px;
    max-height: none !important;
}

.modal-resize-handle {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    user-select: none;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 3px;
    z-index: 10;
    touch-action: none;
}
.modal-resize-handle::after {
    content: '';
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--text-muted, #8C7E72);
    border-bottom: 2px solid var(--text-muted, #8C7E72);
    opacity: 0.65;
    transition: opacity 0.2s, border-color 0.2s;
}
.modal-resize-handle:hover::after,
.modal-settings-dialog.resizing .modal-resize-handle::after {
    opacity: 1;
    border-color: var(--accent-orange, #D97757);
}

.modal-drag-header {
    cursor: grab;
    user-select: none;
    padding-right: 2.25rem;
}

.modal-drag-header:active,
.modal-settings-dialog.dragging .modal-drag-header {
    cursor: grabbing;
}

.drag-hint-badge {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--accent-blue);
    background: rgba(217, 119, 87, 0.12);
    border: 1px solid rgba(217, 119, 87, 0.25);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    pointer-events: none;
}

.settings-section {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.2s ease;
}

.settings-section:hover {
    border-color: var(--border-color-hover);
}

.settings-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin: 0;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.settings-row {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.settings-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-label {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-value-badge {
    font-size: 0.8rem;
    font-weight: 700;
    font-family: monospace;
    color: var(--accent-blue);
    background: rgba(217, 119, 87, 0.15);
    border: 1px solid rgba(217, 119, 87, 0.3);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    min-width: 56px;
    text-align: center;
}

.settings-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-slider-wrapper span.settings-bound {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: monospace;
    white-space: nowrap;
}

.settings-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(180, 160, 135, 0.25);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.settings-slider:hover {
    background: rgba(180, 160, 135, 0.45);
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(217, 119, 87, 0.6);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.settings-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--accent-purple);
}

.settings-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(217, 119, 87, 0.6);
}

/* Settings Modal Season Theme Selector */
.season-theme-selector-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.55rem;
    margin-top: 0.45rem;
}

.season-theme-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.5rem;
    background: var(--bg-card, #ffffff);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    text-align: center;
}

.season-theme-btn:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.season-theme-btn.active {
    border-color: var(--accent-blue);
    background: rgba(217, 119, 87, 0.08);
    box-shadow: 0 0 0 2px rgba(217, 119, 87, 0.25);
}

.season-theme-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.season-theme-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.season-theme-desc {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.25;
}

@media (max-width: 640px) {
    .season-theme-selector-group {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Interactive Season Crop Modal Styles */
.season-crop-container {
    position: relative;
    background: #111111;
    border-radius: var(--radius-sm, 8px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.season-crop-box {
    position: absolute;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62);
    cursor: move;
    touch-action: none;
    box-sizing: border-box;
}

.crop-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--accent-blue, #D97757);
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
    z-index: 10;
    transition: transform 0.1s ease;
}

.crop-handle:hover {
    transform: scale(1.25);
    background: #b85435;
}

.crop-handle-nw { top: -7px; left: -7px; cursor: nwse-resize; }
.crop-handle-ne { top: -7px; right: -7px; cursor: nesw-resize; }
.crop-handle-sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.crop-handle-se { bottom: -7px; right: -7px; cursor: nwse-resize; }

.crop-grid-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.25) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.25) 1px, transparent 1px);
    background-size: 33.333% 33.333%;
}

/* Season Custom Upload Buttons & Thumbnails in Settings Modal */
.season-theme-item-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.season-theme-thumb-box {
    width: 100%;
    height: 52px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    margin: 0.2rem 0;
    position: relative;
    overflow: hidden;
}

.season-theme-action-row {
    display: flex;
    gap: 0.25rem;
    width: 100%;
    margin-top: 0.2rem;
}

.season-upload-btn, .season-reset-img-btn {
    flex: 1;
    font-size: 0.68rem !important;
    padding: 0.2rem 0.35rem !important;
    white-space: nowrap;
    text-align: center;
}

/* Custom Cursor Slot Management in Settings Modal */
.cursor-state-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm, 8px);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cursor-state-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.4rem;
}

.state-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.state-val-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-orange, #D97757);
    background: rgba(217, 119, 87, 0.1);
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    white-space: nowrap;
}

.cursor-slots-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cursor-slot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.3rem 0.45rem;
    border-radius: 6px;
    border: 1px solid transparent;
    background: #FAF7F0;
    transition: all 0.15s ease;
}

.cursor-slot-item:hover {
    background: #F3EFE6;
    border-color: rgba(180, 160, 135, 0.4);
}

.cursor-slot-item.active {
    background: rgba(217, 119, 87, 0.12);
    border-color: var(--accent-orange, #D97757);
    box-shadow: 0 1px 4px rgba(217, 119, 87, 0.15);
}

.btn-cursor-slot-select {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    text-align: left;
    color: var(--text-primary);
}

.slot-number-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cursor-slot-item.active .slot-number-badge {
    background: var(--accent-orange, #D97757);
    color: #FFFFFF;
}

.slot-name-label {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.custom-tag {
    font-size: 0.62rem;
    background: #5D755A;
    color: #FFFFFF;
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    font-weight: 700;
}

.slot-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.btn-cursor-upload {
    font-size: 0.68rem !important;
    padding: 0.2rem 0.45rem !important;
    white-space: nowrap;
}

.btn-cursor-reset-slot {
    font-size: 0.72rem !important;
    padding: 0.2rem 0.35rem !important;
    line-height: 1;
}

.cursor-preview-canvas {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    flex-shrink: 0;
    pointer-events: none;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.02);
}
