/* ============================================================
   TheCheat Tools - DevToys-inspired Dark Theme
   ============================================================ */

:root {
    --bg-app: #1a1a1a;
    --bg-sidebar: #252525;
    --bg-content: #1e1e1e;
    --bg-surface: #2d2d2d;
    --bg-surface-hover: #363636;
    --bg-surface-active: #404040;
    --bg-input: #1a1a1a;
    --border-color: #3a3a3a;
    --border-focus: #0078d4;
    --text-primary: #e0e0e0;
    --text-secondary: #999;
    --text-muted: #666;
    --accent: #0078d4;
    --accent-hover: #1a8ad4;
    --accent-light: rgba(0, 120, 212, 0.15);
    --success: #4caf50;
    --error: #f44336;
    --warning: #ff9800;
    --radius: 6px;
    --radius-lg: 10px;
    --sidebar-width: 280px;
    --header-height: 60px;
    --font-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
}

[data-theme="light"] {
    --bg-app: #f0f0f0;
    --bg-sidebar: #ffffff;
    --bg-content: #f5f5f5;
    --bg-surface: #ffffff;
    --bg-surface-hover: #e8e8e8;
    --bg-surface-active: #d8d8d8;
    --bg-input: #ffffff;
    --border-color: #d0d0d0;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --text-muted: #999;
    --accent-light: rgba(0, 120, 212, 0.10);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: var(--font-sans);
    background: var(--bg-app);
    color: var(--text-primary);
    overflow: hidden;
}

/* ============================================================
   App Layout
   ============================================================ */

.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ============================================================
   Sidebar
   ============================================================ */

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-header:hover {
    background: var(--bg-surface-hover);
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-search {
    padding: 12px 16px;
    flex-shrink: 0;
}

.sidebar-search input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.sidebar-search input:focus {
    border-color: var(--border-focus);
}

.sidebar-search input::placeholder {
    color: var(--text-muted);
}

.sidebar-nav {
    overflow-y: auto;
    flex: 1;
    padding-bottom: 16px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Home Link */
.nav-item.home-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    cursor: pointer;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.nav-item.home-link:hover {
    background: var(--bg-surface-hover);
}

.nav-item.home-link.active {
    background: var(--accent-light);
    color: var(--accent);
}

/* Category */
.nav-category {
    margin-bottom: 2px;
}

.nav-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    user-select: none;
    transition: color 0.15s;
}

.nav-category-header:hover {
    color: var(--text-primary);
}

.nav-arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s;
}

.nav-category.collapsed .nav-arrow {
    transform: rotate(-90deg);
}

.nav-category-items {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-category.collapsed .nav-category-items {
    max-height: 0;
}

/* Nav Item */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px 7px 36px;
    cursor: pointer;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-surface-hover);
}

.nav-item.active {
    background: var(--accent-light);
    color: var(--accent);
}

/* 즐겨찾기 드래그 핸들 */
.nav-drag-handle {
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0;
    cursor: grab;
    display: flex;
    align-items: center;
    padding: 0 2px;
    transition: opacity 0.12s;
    margin-left: -4px;
}

.nav-drag-handle .lc-icon {
    width: 13px;
    height: 13px;
}

.nav-item:hover .nav-drag-handle {
    opacity: 1;
}

.fav-draggable.drag-over-source {
    opacity: 0.4;
}

.fav-draggable.drag-over-target {
    background: var(--accent-light);
    border-top: 2px solid var(--accent);
}

.fav-draggable[draggable="true"] {
    cursor: default;
}

/* 즐겨찾기 드래그 핸들 */
.nav-fav-btn {
    margin-left: auto;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 2px 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.12s, color 0.12s;
    line-height: 1;
}

.nav-fav-btn .lc-icon {
    width: 13px;
    height: 13px;
}

.nav-item:hover .nav-fav-btn {
    opacity: 1;
}

.nav-fav-btn:hover {
    color: #facc15;
}

.nav-fav-btn.starred {
    opacity: 1;
    color: #facc15;
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   Sidebar Toggle (Mobile)
   ============================================================ */

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   Main Content
   ============================================================ */

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============================================================
   Top Bar
   ============================================================ */

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    min-height: 48px;
    padding: 0 20px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    z-index: 50;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.top-bar-weather {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-right: 8px;
    padding: 4px 4px 4px 10px;
    background: var(--bg-surface);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.weather-icon { font-size: 16px; }

.weather-temp {
    font-weight: 600;
    font-family: var(--font-mono);
}

.weather-loc-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 12px;
    transition: background 0.15s, color 0.15s;
    max-width: 120px;
}

.weather-loc-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.weather-loc-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 90px;
}

.weather-loc-arrow { font-size: 10px; opacity: 0.6; flex-shrink: 0; }

/* ── Location Modal ── */
.loc-mode-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.loc-tab {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.loc-tab:hover { border-color: var(--accent); color: var(--accent); }

.loc-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.loc-panel { padding-top: 4px; }

.loc-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.loc-status {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    min-height: 20px;
}

.loc-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.loc-search-row .setting-input { flex: 1; }

.loc-city-results {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 240px;
    overflow-y: auto;
}

.loc-searching {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    padding: 12px;
}

.loc-city-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    gap: 8px;
}

.loc-city-item:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.loc-city-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.loc-city-sub {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.top-bar-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.15s, border-color 0.15s;
}

.top-bar-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-color);
}

/* ============================================================
   Settings Modal
   ============================================================ */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    width: 460px;
    max-width: 92vw;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s;
}

.modal-close:hover {
    background: var(--bg-surface-hover);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
}

.setting-group {
    margin-bottom: 16px;
}

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

.setting-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.setting-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-mono);
    outline: none;
    transition: border-color 0.2s;
}

.setting-input:focus {
    border-color: var(--border-focus);
}

.setting-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.content {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-content);
    padding: 0;
}

.content::-webkit-scrollbar {
    width: 8px;
}

.content::-webkit-scrollbar-track {
    background: transparent;
}

.content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* ============================================================
   Home Page
   ============================================================ */

.home-page {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.home-header {
    margin-bottom: 32px;
}

.home-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.home-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.home-section {
    margin-bottom: 32px;
}

.home-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.home-section-icon {
    font-size: 18px;
}

.home-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.home-section-count {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.tool-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tool-card-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.tool-card-name {
    font-size: 14px;
    font-weight: 600;
}

.tool-card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ============================================================
   Tool Container
   ============================================================ */

.tool-container {
    padding: 32px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.tool-desc {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============================================================
   Tool Options Bar
   ============================================================ */

.tool-options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--bg-surface);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    align-items: center;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-group label {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.option-group select,
.option-group input[type="number"] {
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    min-width: 80px;
}

.option-group select:focus,
.option-group input[type="number"]:focus {
    border-color: var(--border-focus);
}

.option-group input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-primary);
}

/* ============================================================
   IO Panel (Input/Output)
   ============================================================ */

.tool-io {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tool-io.horizontal {
    flex-direction: row;
}

.tool-io.horizontal .io-panel {
    flex: 1;
    min-width: 0;
}

.io-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.panel-actions {
    display: flex;
    gap: 4px;
}

.code-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    background: var(--bg-input);
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    tab-size: 2;
}

.code-textarea::placeholder {
    color: var(--text-muted);
}

.code-textarea:focus {
    background: #1c1c1c;
}

.code-textarea.tall {
    min-height: 300px;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
}

.btn-group {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap;
}

/* ============================================================
   Result Display
   ============================================================ */

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.result-item:hover { border-color: var(--accent); }

.stor-active {
    border-color: var(--accent) !important;
    background: rgba(var(--accent-rgb, 99, 102, 241), 0.06);
}

.result-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.result-value {
    font-family: var(--font-mono);
    font-size: 13px;
    word-break: break-all;
    color: var(--text-primary);
    padding: 6px 8px;
    background: var(--bg-input);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.result-value:hover {
    background: var(--bg-surface-hover);
}

/* ============================================================
   Stats Display
   ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.stat-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============================================================
   Cron Table
   ============================================================ */

.cron-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: var(--bg-surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.cron-table th,
.cron-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.cron-table th {
    background: var(--bg-surface-hover);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
}

.cron-table tr:last-child td {
    border-bottom: none;
}

/* ============================================================
   Cron Builder UI
   ============================================================ */

.cron-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.cron-preset-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 4px;
    white-space: nowrap;
}

.cron-preset-btn {
    padding: 4px 12px;
    font-size: 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.cron-preset-btn:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.cron-field-builder {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.cron-field-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cron-field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cron-field-label span {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

.cron-field-input {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 8px 10px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 15px;
    text-align: center;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.cron-field-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 99, 102, 241), 0.15);
}

.cron-field-hint {
    font-size: 11px;
    color: var(--accent-color);
    text-align: center;
    min-height: 16px;
}

.cron-expr-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.cron-expr-display {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 0.1em;
    background: none;
    border: none;
}

.cron-desc-box {
    padding: 10px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-primary);
    min-height: 16px;
    margin-bottom: 4px;
}

.cron-error-box {
    padding: 8px 14px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--radius);
    color: #ef4444;
    font-size: 13px;
    margin-bottom: 4px;
}

.cron-next-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    margin-top: 4px;
}

.cron-next-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
    margin-bottom: 16px;
}

.cron-next-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: var(--font-mono);
}

.cron-next-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 16px;
}

/* Reference guide */

.cron-reference {
    margin-top: 28px;
    padding: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.cron-ref-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.cron-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.cron-ref-subtitle {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.cron-ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.cron-ref-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: 4px 8px;
    border-bottom: 1px solid var(--border-color);
}

.cron-ref-table td {
    padding: 5px 8px;
    border-bottom: 1px solid var(--border-subtle, var(--border-color));
    color: var(--text-secondary);
    vertical-align: top;
}

.cron-ref-table tr:last-child td {
    border-bottom: none;
}

.cron-ref-table code {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--bg-hover);
    padding: 1px 5px;
    border-radius: 4px;
    color: var(--accent-color);
}

@media (max-width: 600px) {
    .cron-field-builder {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    .cron-field-input {
        font-size: 13px;
        padding: 6px 4px;
    }
}

/* ============================================================
   JWT Display
   ============================================================ */

.jwt-section {
    margin-top: 16px;
}

.jwt-section h3 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* ============================================================
   Regex Matches
   ============================================================ */

.regex-matches {
    margin-top: 16px;
}

.match-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
}

.match-index {
    font-weight: 700;
    color: var(--accent);
    min-width: 30px;
}

.match-text {
    background: var(--accent-light);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--accent);
}

/* ============================================================
   Diff View
   ============================================================ */

.diff-container {
    margin-top: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.diff-line {
    padding: 2px 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-all;
}

.diff-line.added {
    background: rgba(76, 175, 80, 0.15);
    color: var(--success);
}

.diff-line.removed {
    background: rgba(244, 67, 54, 0.15);
    color: var(--error);
}

.diff-line.unchanged {
    color: var(--text-secondary);
}

/* ============================================================
   Markdown Preview
   ============================================================ */

.md-preview {
    padding: 20px;
    background: var(--bg-input);
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.7;
    min-height: 300px;
    overflow-y: auto;
}

.md-preview h1 { font-size: 24px; margin: 16px 0 8px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.md-preview h2 { font-size: 20px; margin: 14px 0 6px; border-bottom: 1px solid var(--border-color); padding-bottom: 6px; }
.md-preview h3 { font-size: 17px; margin: 12px 0 6px; }
.md-preview h4 { font-size: 15px; margin: 10px 0 4px; }
.md-preview h5 { font-size: 14px; margin: 8px 0 4px; }
.md-preview h6 { font-size: 13px; margin: 8px 0 4px; color: var(--text-secondary); }
.md-preview p { margin: 8px 0; }
.md-preview code { font-family: var(--font-mono); background: var(--bg-surface); padding: 2px 6px; border-radius: 3px; font-size: 0.9em; }
.md-preview pre { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 12px; margin: 12px 0; overflow-x: auto; }
.md-preview pre code { background: none; padding: 0; }
.md-preview blockquote { border-left: 3px solid var(--accent); padding: 8px 16px; margin: 12px 0; color: var(--text-secondary); background: var(--bg-surface); border-radius: 0 var(--radius) var(--radius) 0; }
.md-preview ul, .md-preview ol { padding-left: 24px; margin: 8px 0; }
.md-preview li { margin: 4px 0; }
.md-preview a { color: var(--accent); text-decoration: none; }
.md-preview a:hover { text-decoration: underline; }
.md-preview hr { border: none; border-top: 1px solid var(--border-color); margin: 16px 0; }
.md-preview img { max-width: 100%; border-radius: var(--radius); }
.md-preview table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.md-preview th, .md-preview td { padding: 8px 12px; border: 1px solid var(--border-color); }
.md-preview th { background: var(--bg-surface); }

/* ============================================================
   Color Picker
   ============================================================ */

.color-preview {
    width: 100%;
    height: 120px;
    border-radius: var(--radius);
    border: 2px solid var(--border-color);
    margin: 16px 0;
    transition: background-color 0.2s;
}

.color-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.color-input-row label {
    min-width: 40px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.color-input-row input[type="text"],
.color-input-row input[type="number"] {
    flex: 1;
    padding: 8px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    outline: none;
}

.color-input-row input:focus {
    border-color: var(--border-focus);
}

.color-input-row input[type="color"] {
    width: 48px;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-input);
    cursor: pointer;
    padding: 2px;
}

/* ============================================================
   Password Display
   ============================================================ */

.password-display {
    font-family: var(--font-mono);
    font-size: 18px;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-align: center;
    letter-spacing: 1px;
    word-break: break-all;
    margin: 16px 0;
    cursor: pointer;
    transition: background 0.15s;
}

.password-display:hover {
    background: var(--bg-surface-hover);
}

.password-list {
    list-style: none;
}

.password-list li {
    font-family: var(--font-mono);
    font-size: 14px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    word-break: break-all;
    transition: background 0.15s;
}

.password-list li:hover {
    background: var(--bg-surface-hover);
}

/* ============================================================
   SQL Formatter
   ============================================================ */

.sql-samples-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.sql-samples-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.sql-sample-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sql-sample-btns .btn-secondary {
    font-size: 12px;
    padding: 4px 12px;
    height: 28px;
}

.sql-panel-title {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sql-panel-title span:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.sql-panel-sub {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

.sql-format-btn {
    font-size: 12px;
    padding: 4px 12px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   SSH Key Auth Guide
   ============================================================ */

.ssh-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ssh-step {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.ssh-step:last-child { border-bottom: none; }

.ssh-step-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.ssh-step-body {
    flex: 1;
    min-width: 0;
}

.ssh-step-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.ssh-step-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.ssh-step-desc code, .ssh-note code, .ssh-warn code {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--bg-input);
    padding: 1px 5px;
    border-radius: 4px;
    color: var(--text-primary);
}

.ssh-code-block {
    position: relative;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 44px 12px 14px;
    margin-bottom: 8px;
}

.ssh-code-block pre {
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

.ssh-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: 1px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: all 0.15s;
}

.ssh-copy-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
    border-color: var(--border-color);
}

.ssh-note {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(59, 130, 246, 0.07);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-top: 6px;
    line-height: 1.55;
}

.ssh-warn {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 12px;
    color: #facc15;
    background: rgba(234, 179, 8, 0.07);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-top: 6px;
    line-height: 1.55;
}

.ssh-opt-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ssh-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.ssh-radio-label input[type=radio] {
    accent-color: var(--accent);
    cursor: pointer;
}

.ssh-tag {
    font-size: 10px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.ssh-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.ssh-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ssh-comment-input {
    width: 260px;
}

.ssh-divider-label {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin: 10px 0 8px;
    position: relative;
}

.ssh-divider-label::before,
.ssh-divider-label::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border-color);
}

.ssh-divider-label::before { left: 0; }
.ssh-divider-label::after  { right: 0; }

/* ============================================================
   SQL Linter (검사기)
   ============================================================ */

.sl-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sl-input-panel {
    flex: 0 0 auto;
}

.sl-mode {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sl-mode-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-right: 2px;
}

.sl-lvl {
    padding: 3px 12px;
    font-size: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.sl-lvl:hover { border-color: var(--border-focus); color: var(--text-primary); }
.sl-lvl.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.sl-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    flex-wrap: wrap;
}

.sl-sum-item {
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.sl-sum-err  { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.sl-sum-warn { background: rgba(234, 179, 8, 0.12);  color: #facc15; }
.sl-sum-info { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }

.sl-sum-ok {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4ade80;
    font-size: 13px;
    font-weight: 500;
}

.sl-results-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sl-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    color: var(--text-muted);
    font-size: 13px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.sl-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 14px;
    border-left: 3px solid;
}

.sl-error { border-left-color: #f87171; }
.sl-warn  { border-left-color: #facc15; }
.sl-info  { border-left-color: #60a5fa; }

.sl-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sl-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.sl-badge-error { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.sl-badge-warn  { background: rgba(234, 179, 8, 0.15);  color: #facc15; }
.sl-badge-info  { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

.sl-rule-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.sl-rule-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.sl-rule-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.55;
    padding-left: 2px;
}

/* ============================================================
   Password Generator (새 UI)
   ============================================================ */

.pw-config {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
}

.pw-row {
    margin-bottom: 16px;
}

.pw-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.pw-row-header label,
.pw-row > label,
.pw-section-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
    margin-bottom: 8px;
}

.pw-row-header label { margin-bottom: 0; }

.pw-len-display {
    font-size: 12px;
    font-family: var(--font-mono);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 2px 10px;
    border-radius: 12px;
    color: var(--text-secondary);
}

.pw-slider-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pw-slider-wrap input[type=range] {
    flex: 1;
    cursor: pointer;
    accent-color: var(--accent);
}

.pw-slider-wrap input[type=number] {
    width: 72px;
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    text-align: center;
}

.pw-count-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pw-count-row label { margin-bottom: 0; }
.pw-count-row input[type=number] {
    width: 72px;
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    text-align: center;
}

.pw-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pw-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding: 14px 0 0;
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
}

.pw-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pw-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.pw-stat-val {
    font-size: 12px;
    font-family: var(--font-mono);
    font-weight: 600;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 2px 10px;
    border-radius: 12px;
    color: var(--text-primary);
}

.pw-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.pw-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 8px;
    transition: background 0.15s;
}

.pw-card:hover {
    background: var(--bg-surface-hover);
}

.pw-card-pw {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 14px;
    word-break: break-all;
    color: var(--text-primary);
    user-select: all;
}

.pw-card-copy {
    flex-shrink: 0;
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 5px;
    color: var(--text-muted);
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.pw-card-copy:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
    border-color: var(--border-color);
}

.pw-tips {
    margin-top: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 20px;
}

.pw-tips-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pw-tips ul {
    margin: 0;
    padding-left: 20px;
}

.pw-tips li {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    line-height: 1.55;
}

/* ============================================================
   Toast Notification
   ============================================================ */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   UUID List
   ============================================================ */

.uuid-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.uuid-item {
    font-family: var(--font-mono);
    font-size: 14px;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
    word-break: break-all;
}

.uuid-item:hover {
    background: var(--bg-surface-hover);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -300px;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .content {
        width: 100%;
    }

    .tool-container {
        padding: 20px;
    }

    .home-page {
        padding: 20px;
    }

    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .tool-io.horizontal {
        flex-direction: column;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Scrollbar for textareas
   ============================================================ */

.code-textarea::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.code-textarea::-webkit-scrollbar-track {
    background: transparent;
}

.code-textarea::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* ============================================================
   Range slider
   ============================================================ */

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

/* ============================================================
   Error display
   ============================================================ */

.error-text {
    color: var(--error);
    font-size: 13px;
    padding: 8px 12px;
    background: rgba(244, 67, 54, 0.1);
    border-radius: var(--radius);
    border: 1px solid rgba(244, 67, 54, 0.3);
    margin-top: 8px;
}

/* ============================================================
   Description box
   ============================================================ */

.description-box {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

/* ============================================================
   Timestamp Live Clock
   ============================================================ */

.ts-live-clock {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.ts-clock-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ts-clock-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    min-width: 60px;
}

.ts-clock-value {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
    padding: 4px 8px;
    background: var(--bg-input);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.ts-clock-value:hover {
    background: var(--bg-surface-hover);
}

.ts-epoch {
    color: #4fc3f7;
    font-weight: 600;
    font-size: 16px;
}

.ts-epoch-ms {
    color: #81c784;
    font-weight: 600;
}

.result-item.ts-highlight {
    border-color: var(--border-focus);
    background: #1a2a3d;
}

/* ========== Text Input (single-line) ========== */
.text-input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 14px;
    font-family: var(--font-mono);
    outline: none;
    transition: border-color 0.2s;
}
.text-input:focus { border-color: var(--border-focus); }

/* ========== Color Palette ========== */
.palette-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.palette-swatch {
    min-width: 120px;
    flex: 1;
    height: 120px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    font-family: var(--font-mono);
    user-select: none;
}
.palette-swatch:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.palette-hex { font-size: 15px; font-weight: 600; }
.palette-hsl { font-size: 11px; opacity: 0.75; }

/* ========== CSS Gradient Generator ========== */
.grad-preview {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    margin: 16px 0;
    border: 1px solid var(--border-color);
}
.grad-presets {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.preset-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}
.preset-swatch {
    width: 48px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
}
.preset-swatch:hover {
    border-color: var(--border-focus);
    transform: scale(1.1);
}

/* ========== CSS Box Shadow Generator ========== */
.bs-controls {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.bs-controls input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}
.bs-preview-area {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 240px;
    background: var(--bg-surface);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}
.bs-preview-box {
    width: 160px;
    height: 160px;
    background: var(--accent);
    border-radius: 16px;
    transition: box-shadow 0.15s;
}

/* ========== Fake Data Generator ========== */
.fd-table-wrap {
    overflow-x: auto;
    margin-top: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.fd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.fd-table th {
    background: var(--bg-surface);
    color: var(--text-secondary);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.fd-table td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.12s;
    white-space: nowrap;
}
.fd-table td:hover { background: var(--bg-surface-hover); }
.fd-table tr:last-child td { border-bottom: none; }

/* ========== UTM Builder ========== */
.utm-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.utm-form .option-group:first-child { grid-column: 1 / -1; }
.utm-form .text-input { width: 100%; box-sizing: border-box; }

/* ========== Business Glossary ========== */
.biz-glossary .tool-container { max-width: 960px; }

.biz-glossary-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.biz-search-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 15px;
    padding: 10px 16px;
}

.biz-cat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.biz-cat-btn {
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.biz-cat-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.biz-cat-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.biz-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.biz-cat-group {
    margin-bottom: 28px;
}

.biz-cat-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.biz-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 8px;
    transition: border-color 0.15s;
}

.biz-card:hover { border-color: var(--border-focus); }

.biz-card-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.biz-abbr {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.biz-term {
    font-size: 13px;
    color: var(--text-secondary);
}

.biz-cat-tag {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1px 8px;
    margin-left: auto;
}

.biz-ko {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}

.biz-desc {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 6px;
}

.biz-ex {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
    padding: 6px 10px;
    background: var(--bg-input);
    border-radius: 6px;
    border-left: 3px solid var(--accent);
}

.biz-card mark {
    background: rgba(255, 193, 7, 0.35);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

.biz-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 48px;
    font-size: 15px;
}

/* ============================================================
   Lucide Icons
   ============================================================ */

.lc-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.75;
    fill: none;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.logo-lc {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.nav-icon .lc-icon {
    width: 16px;
    height: 16px;
}

.tool-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.tool-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.lc-tool-header {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.home-section-icon .lc-icon {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.tool-card-icon {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.tool-card-icon .lc-icon {
    width: 26px;
    height: 26px;
    color: var(--accent);
}

.btn-icon .lc-icon {
    width: 14px;
    height: 14px;
    pointer-events: none;
}

.top-bar-btn .lc-icon {
    width: 18px;
    height: 18px;
}

/* ============================================================
   Encryption Tool
   ============================================================ */

.enc-note {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 10px 14px;
    background: var(--bg-surface);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    margin-bottom: 16px;
    line-height: 1.6;
}

.enc-spinner {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.enc-verify-ok,
.enc-verify-fail {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
}
.enc-verify-ok .lc-icon,
.enc-verify-fail .lc-icon { width: 18px; height: 18px; }

.enc-verify-ok {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}
.enc-verify-fail {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* ============================================================
   Cron Builder (상세 설정)
   ============================================================ */

.cron-builder-section {
    border-top: 1px solid var(--border-color);
    margin-top: 16px;
    padding-top: 16px;
    margin-bottom: 16px;
}

.cron-builder-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 12px;
}

.cron-wd-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.cron-wd-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.cron-wd-btn:hover { border-color: var(--accent); color: var(--accent); }
.cron-wd-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.cron-num-in {
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    width: 72px;
}
.cron-num-in:focus { border-color: var(--border-focus); }

/* ================================================
   Korean Spell Checker
   ================================================ */
.spell-err {
    font-style: normal;
    font-weight: 600;
    border-radius: 2px;
    padding: 0 1px;
}
.spell-red-err    { color: #ef4444; text-decoration: underline dotted #ef4444; }
.spell-blue-err   { color: #3b82f6; text-decoration: underline dotted #3b82f6; }
.spell-green-err  { color: #22c55e; text-decoration: underline dotted #22c55e; }
.spell-purple-err { color: #a855f7; text-decoration: underline dotted #a855f7; }

.spell-legend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 14px;
}
.spell-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.spell-red    { background: #ef4444; }
.spell-blue   { background: #3b82f6; }
.spell-green  { background: #22c55e; }
.spell-purple { background: #a855f7; }

/* ================================================
   Regex Tester
   ================================================ */
.rx-pattern-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 4px;
}
.rx-slash { font-size: 20px; color: var(--accent); font-weight: 700; font-family: var(--font-mono); line-height: 1; }
.rx-pattern-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
}
.rx-flags { display: flex; gap: 10px; margin-left: 6px; }
.rx-flag { display: flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 13px; cursor: pointer; color: var(--text-secondary); user-select: none; }
.rx-flag input { cursor: pointer; accent-color: var(--accent); }
.rx-flag input:checked + span { color: var(--accent); font-weight: 700; }

.rx-hl {
    padding: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-y: auto;
    color: var(--text-primary);
}

/* 매치 목록 */
.rx-match-list { display: flex; flex-direction: column; gap: 5px; }
.rx-match-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
}
.rx-m-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.rx-m-val { font-family: var(--font-mono); font-size: 13px; word-break: break-all; }
.rx-m-pos { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.rx-groups { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; padding-top: 6px; border-top: 1px solid var(--border-color); margin-top: 2px; }
.rx-group { font-size: 12px; color: var(--text-secondary); }
.rx-group em { font-style: normal; color: var(--accent); font-weight: 600; }
.rx-group-undef { opacity: .4; }

/* 빌더 */
.rx-builder-wrap { padding: 12px 0; display: flex; flex-direction: column; gap: 14px; }
.rx-b-section { display: flex; flex-direction: column; }
.rx-b-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 6px; }
.rx-b-btns { display: flex; flex-wrap: wrap; gap: 5px; }
.rx-b-btn {
    padding: 4px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.rx-b-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-hover); }
.rx-b-preset { font-family: inherit; }

/* 치트시트 */
.rx-cheat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 5px; padding: 12px 0; }
.rx-cheat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.rx-cheat-item:hover { border-color: var(--accent); background: var(--bg-hover); }
.rx-cheat-code { font-family: var(--font-mono); font-size: 12px; color: var(--accent); min-width: 56px; white-space: nowrap; }
.rx-cheat-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.3; }


.pcode-wrap { display: flex; flex-direction: column; gap: 16px; }
.pcode-embed {
    width: 100%;
    height: calc(100vh - 280px);
    min-height: 500px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-input);
}
.pcode-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.pcode-hint { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.pcode-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.pcode-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    min-width: 0;
}
.pcode-card:hover { border-color: var(--accent); background: var(--bg-hover); }
.pcode-card-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.pcode-card-value { font-size: 13px; font-weight: 500; color: var(--text-primary); flex: 1; font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcode-copy-icon { width: 13px; height: 13px; color: var(--text-muted); flex-shrink: 0; }


/* ============================================================
   특수문자/이모지 공통 스타일
   ============================================================ */
.sc-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.sc-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sc-cat-btn {
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sc-cat-btn:hover { border-color: var(--accent); color: var(--accent); }
.sc-cat-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.sc-copied-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-size: 13px;
}
.sc-copied-label {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    line-height: 1.5;
}
.sc-copied-char {
    font-size: 22px;
    line-height: 1;
    min-width: 28px;
    text-align: center;
}
.sc-copied-char.em { font-size: 26px; }
.sc-copied-name { font-size: 13px; color: var(--text-muted); }
.sc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
}
.em-grid {
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
}
.sc-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-surface);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    min-height: 70px;
    user-select: none;
}
.sc-cell:hover {
    border-color: var(--accent);
    background: var(--bg-surface-hover);
    transform: translateY(-1px);
}
.sc-cell:active { transform: scale(0.96); }
.sc-char {
    font-size: 22px;
    line-height: 1;
    color: var(--text-primary);
}
.em-cell .sc-char { font-size: 26px; }
.sc-name {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.3;
    word-break: keep-all;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.sc-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 14px;
}


/* ============================================================
   텔레그램 메시지 미리보기
   ============================================================ */
.tg-wrap {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.tg-opts {
    width: 252px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* Segment control */
.tg-seg {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}
.tg-seg-btn {
    flex: 1;
    padding: 6px 8px;
    font-size: 12px;
    background: var(--bg-surface);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.tg-seg-btn + .tg-seg-btn { border-left: 1px solid var(--border-color); }
.tg-seg-btn.active { background: var(--accent); color: #fff; }
/* Format help */
.tg-fmt-help {
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
}
.tg-fmt-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 3px;
}
.tg-fmt-row { color: var(--text-secondary); line-height: 1.6; }
.tg-fmt-row code {
    font-family: var(--font-mono);
    font-size: 11px;
    background: var(--bg-input);
    padding: 1px 4px;
    border-radius: 3px;
    color: var(--accent);
}
.tg-fmt-spo {
    background: rgba(128,128,128,0.4);
    border-radius: 3px;
    padding: 0 3px;
}
/* ── Chat window ── */
.tg-chat {
    flex: 1;
    min-width: 0;
    min-height: 520px;
    max-height: 680px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #0e1621;
    border: 1px solid rgba(255,255,255,0.06);
}
[data-theme="light"] .tg-chat {
    background: #c8d9e6;
    border-color: rgba(0,0,0,0.08);
}
/* Header */
.tg-hdr {
    background: #17212b;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
[data-theme="light"] .tg-hdr { background: #517da2; }
.tg-hdr-back {
    color: rgba(255,255,255,0.65);
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.tg-hdr-back svg { width: 20px; height: 20px; }
.tg-hdr-av {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.tg-hdr-body { flex: 1; min-width: 0; }
.tg-hdr-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tg-hdr-sub { font-size: 12px; color: rgba(255,255,255,0.55); }
.tg-hdr-actions { display: flex; gap: 2px; }
.tg-hdr-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.65);
    border-radius: 50%;
    cursor: pointer;
}
.tg-hdr-icon svg { width: 20px; height: 20px; }
.tg-hdr-icon:hover { background: rgba(255,255,255,0.1); }
/* Messages */
.tg-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    scroll-behavior: smooth;
}
.tg-msgs::-webkit-scrollbar { width: 4px; }
.tg-msgs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
[data-theme="light"] .tg-msgs::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }
.tg-date-pill {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    background: rgba(0,0,0,0.28);
    border-radius: 10px;
    padding: 3px 12px;
    margin: 6px auto;
    display: table;
}
[data-theme="light"] .tg-date-pill {
    color: rgba(0,0,0,0.5);
    background: rgba(255,255,255,0.55);
}
/* Message rows */
.tg-row { display: flex; padding: 1px 4px; animation: tgFadeIn 0.15s ease; }
@keyframes tgFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tg-sent { justify-content: flex-end; }
.tg-received { justify-content: flex-start; }
/* Bubbles */
.tg-bubble {
    max-width: 72%;
    padding: 6px 10px 4px;
    border-radius: 14px;
    word-wrap: break-word;
    word-break: break-word;
}
.tg-sent .tg-bubble {
    background: #2b5278;
    border-bottom-right-radius: 4px;
    color: #f5f5f5;
}
.tg-received .tg-bubble {
    background: #182533;
    border-bottom-left-radius: 4px;
    color: #f5f5f5;
}
[data-theme="light"] .tg-sent .tg-bubble {
    background: #effdde;
    color: #000;
}
[data-theme="light"] .tg-received .tg-bubble {
    background: #fff;
    color: #000;
}
.tg-sender {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}
.tg-btext { font-size: 14px; line-height: 1.5; }
.tg-btext b { font-weight: 700; }
.tg-btext i { font-style: italic; }
.tg-btext s { text-decoration: line-through; opacity: 0.8; }
code.tg-code {
    background: rgba(0,0,0,0.22);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: var(--font-mono);
    font-size: 13px;
}
[data-theme="light"] code.tg-code { background: rgba(0,0,0,0.07); }
pre.tg-pre {
    background: rgba(0,0,0,0.22);
    border-radius: 8px;
    padding: 8px 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    margin-top: 4px;
    overflow-x: auto;
    white-space: pre;
}
[data-theme="light"] pre.tg-pre { background: rgba(0,0,0,0.06); }
.tg-spo {
    border-radius: 3px;
    padding: 0 3px;
    cursor: pointer;
    filter: blur(5px);
    user-select: none;
    transition: filter 0.2s;
    background: rgba(255,255,255,0.15);
}
.tg-spo.tg-spo-on { filter: none; background: rgba(255,255,255,0.08); }
[data-theme="light"] .tg-spo { background: rgba(0,0,0,0.18); }
[data-theme="light"] .tg-spo.tg-spo-on { background: rgba(0,0,0,0.05); }
a.tg-a { color: #64b5f6; text-decoration: none; }
a.tg-a:hover { text-decoration: underline; }
[data-theme="light"] a.tg-a { color: #1565c0; }
.tg-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    margin-top: 2px;
}
.tg-time { font-size: 11px; color: rgba(255,255,255,0.5); }
[data-theme="light"] .tg-sent .tg-time { color: rgba(0,90,0,0.55); }
[data-theme="light"] .tg-received .tg-time { color: rgba(0,0,0,0.4); }
.tg-chk { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1; }
[data-theme="light"] .tg-chk { color: rgba(0,90,0,0.5); }
.tg-chk.tg-read { color: #5bc8f5; }
[data-theme="light"] .tg-chk.tg-read { color: #2196f3; }
/* Input bar */
.tg-ibar {
    flex-shrink: 0;
    background: #17212b;
    padding: 8px 10px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
}
[data-theme="light"] .tg-ibar {
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.tg-ibar-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.45);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
}
.tg-ibar-icon svg { width: 20px; height: 20px; }
.tg-ibar-icon:hover { background: rgba(255,255,255,0.08); }
[data-theme="light"] .tg-ibar-icon { color: rgba(0,0,0,0.4); }
[data-theme="light"] .tg-ibar-icon:hover { background: rgba(0,0,0,0.05); }
/* Formatting toolbar */
.tg-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 5px 10px 4px;
    background: #17212b;
    border-top: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}
[data-theme="light"] .tg-toolbar {
    background: #f7f7f7;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.tg-tb-btn {
    padding: 3px 8px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 5px;
    background: transparent;
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    user-select: none;
    white-space: nowrap;
}
.tg-tb-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.25);
}
.tg-tb-mono { font-family: var(--font-mono); }
.tg-tb-block { letter-spacing: -1px; }
.tg-tb-sep {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,0.15);
    margin: 0 3px;
    flex-shrink: 0;
}
[data-theme="light"] .tg-tb-sep { background: rgba(0,0,0,0.15); }
[data-theme="light"] .tg-tb-btn {
    border-color: rgba(0,0,0,0.15);
    color: rgba(0,0,0,0.6);
}
[data-theme="light"] .tg-tb-btn:hover {
    background: rgba(0,0,0,0.07);
    color: #000;
    border-color: rgba(0,0,0,0.25);
}
/* Blockquote inside bubble */
.tg-quote {
    border-left: 3px solid #5bc8f5;
    padding: 3px 0 3px 10px;
    margin: 3px 0;
    color: inherit;
    opacity: 0.85;
    border-radius: 0 4px 4px 0;
    background: rgba(91,200,245,0.08);
    font-style: normal;
}
.tg-sent .tg-quote { border-left-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.06); }
[data-theme="light"] .tg-received .tg-quote { border-left-color: #1976d2; background: rgba(25,118,210,0.07); }
[data-theme="light"] .tg-sent .tg-quote { border-left-color: rgba(0,100,0,0.4); background: rgba(0,100,0,0.05); }
.tg-itxa {
    flex: 1;
    min-width: 0;
    background: #0e1621;
    border: none;
    border-radius: 22px;
    padding: 8px 16px;
    color: #f0f0f0;
    font-size: 14px;
    font-family: var(--font-sans);
    resize: none;
    outline: none;
    line-height: 1.5;
    max-height: 120px;
    overflow-y: auto;
}
[data-theme="light"] .tg-itxa { background: #f0f2f5; color: #111; }
.tg-itxa::placeholder { color: rgba(255,255,255,0.28); }
[data-theme="light"] .tg-itxa::placeholder { color: rgba(0,0,0,0.32); }
.tg-isend {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #2ca5e0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.1s;
}
.tg-isend:hover { background: #3ab5ef; }
.tg-isend:active { transform: scale(0.93); }
.tg-isend svg { width: 18px; height: 18px; }
/* 입력창 복사 버튼 */
.tg-icopy {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.45);
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
}
.tg-icopy:hover { background: rgba(255,255,255,0.1); color: #fff; }
.tg-icopy.tg-icopy-ok { color: #5bc8f5; }
.tg-icopy svg { width: 18px; height: 18px; }
[data-theme="light"] .tg-icopy { color: rgba(0,0,0,0.4); }
[data-theme="light"] .tg-icopy:hover { background: rgba(0,0,0,0.07); color: #000; }
[data-theme="light"] .tg-icopy.tg-icopy-ok { color: #1976d2; }
/* 버블 복사 버튼 */
.tg-bubble { position: relative; }
.tg-bubble-copy {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    opacity: 0;
    transition: opacity 0.15s, background 0.12s;
    padding: 0;
    z-index: 1;
}
.tg-bubble-copy svg { width: 13px; height: 13px; }
.tg-bubble:hover .tg-bubble-copy { opacity: 1; }
.tg-bubble-copy:hover { background: rgba(0,0,0,0.55); color: #fff; }
.tg-bubble-copy.tg-bubble-copy-ok { color: #5bc8f5; background: rgba(0,0,0,0.55); }
[data-theme="light"] .tg-bubble-copy { background: rgba(0,0,0,0.15); color: rgba(0,0,0,0.6); }
[data-theme="light"] .tg-bubble-copy:hover { background: rgba(0,0,0,0.3); color: #000; }
[data-theme="light"] .tg-bubble-copy.tg-bubble-copy-ok { color: #1976d2; }

/* ============================================================
   IP 위치 조회
   ============================================================ */
.ipgeo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 16px;
}
.ipgeo-table th {
    width: 110px;
    padding: 8px 14px 8px 0;
    color: var(--text-muted);
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}
.ipgeo-table td {
    padding: 8px 8px 8px 16px;
    color: var(--text-primary);
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    word-break: break-all;
}
.ipgeo-table tr:last-child th,
.ipgeo-table tr:last-child td { border-bottom: none; }
.ipgeo-val { font-family: var(--font-mono); font-size: 13px; }
.ipgeo-link {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.ipgeo-link:hover { text-decoration: underline; }
.ipgeo-link svg { width: 12px; height: 12px; }
/* 지도 레이아웃 */
.ipgeo-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 16px;
    flex-wrap: wrap;
}
.ipgeo-layout .ipgeo-table {
    margin-top: 0;
    flex: 0 0 auto;
    min-width: 300px;
}
.ipgeo-map-wrap {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ipgeo-map {
    width: 100%;
    height: 340px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-surface);
}
.ipgeo-map-link {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.ipgeo-map-link:hover { color: var(--accent); text-decoration: underline; }
.ipgeo-map-link svg { width: 11px; height: 11px; }

/* ============================================================
   DNS 조회
   ============================================================ */
.dns-type-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: var(--bg-surface);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}
.dns-type-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
}
.dns-chk {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}
.dns-chk input { accent-color: var(--accent); cursor: pointer; }
.dns-host-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dns-host-title svg { width: 16px; height: 16px; }
.dns-records { display: flex; flex-direction: column; gap: 10px; }
.dns-rec-group {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}
.dns-rec-type {
    padding: 5px 12px;
    background: var(--bg-surface);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--accent);
    border-bottom: 1px solid var(--border-color);
}
.dns-rec-vals { padding: 6px 0; }
.dns-rec-val {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    font-size: 13px;
}
.dns-rec-val:hover { background: var(--bg-surface); }
.dns-rec-val code {
    flex: 1;
    font-family: var(--font-mono);
    color: var(--text-primary);
    word-break: break-all;
}
.dns-copy-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
.dns-rec-val:hover .dns-copy-btn { opacity: 1; }
.dns-copy-btn:hover { color: var(--accent); }
.dns-copy-btn svg { width: 13px; height: 13px; }

/* ============================================================
   GIT COMMANDS
   ============================================================ */
.git-url-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: color-mix(in srgb, var(--accent) 7%, var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-radius: var(--radius);
    margin-bottom: 12px;
}
.git-url-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}
.git-url-input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 12.5px;
}
.git-url-placeholder {
    color: #e0a040;
    font-style: italic;
    background: color-mix(in srgb, #e0a040 12%, transparent);
    border-radius: 3px;
    padding: 0 2px;
}
.git-url-highlight {
    color: var(--accent);
    font-weight: 600;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border-radius: 3px;
    padding: 0 2px;
}
.git-section {
    margin-bottom: 24px;
}
.git-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

/* 콤보 (단계별 조합) */
.git-combo {
    background: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 10px;
}
.git-combo-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.git-combo-label .git-copy-all-btn { margin-left: auto; }

/* 섹션 전체 복사 헤더 */
.git-cmd-list-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 4px;
}

/* 전체 복사 버튼 */
.git-copy-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.git-copy-all-btn:hover {
    background: color-mix(in srgb, var(--accent) 20%, transparent);
    border-color: var(--accent);
}
.git-copy-all-btn.git-copied {
    color: #4caf50;
    border-color: #4caf50;
    background: color-mix(in srgb, #4caf50 12%, transparent);
}
.git-copy-all-btn svg { width: 12px; height: 12px; }
.git-combo-steps { display: flex; flex-direction: column; gap: 6px; }
.git-combo-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: calc(var(--radius) - 2px);
}
.git-step-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 개별 명령어 목록 */
.git-cmd-list { display: flex; flex-direction: column; gap: 4px; }
.git-cmd-row, .git-combo-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: border-color 0.15s;
}
.git-cmd-row:hover { border-color: var(--accent); }
.git-cmd-code {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-primary);
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 0;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.git-cmd-desc {
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
    line-height: 1.4;
}
.git-copy-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 3px 5px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.git-cmd-row:hover .git-copy-btn,
.git-combo-step:hover .git-copy-btn { opacity: 1; }
.git-copy-btn:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.git-copy-btn.git-copied { color: #4caf50; opacity: 1; }
.git-copy-btn svg { width: 13px; height: 13px; }

/* ============================================================
   DIABLO 2 — 공통 룬 티어 색상
   ============================================================ */
.d2-tier-low  { --d2-tier-color: #7ec8a0; }
.d2-tier-mid  { --d2-tier-color: #f0c060; }
.d2-tier-high { --d2-tier-color: #e07090; }

/* ============================================================
   DIABLO 2 — 룬 종류 그리드
   ============================================================ */
.d2-rune-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.d2-rune-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 14px;
    transition: border-color 0.15s;
}
.d2-rune-card:hover { border-color: var(--accent); }
.d2-rune-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.d2-rune-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--d2-tier-color, #7ec8a0);
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.d2-rune-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.d2-rune-ko {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    flex: 1;
    white-space: nowrap;
}
.d2-rune-tier-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--d2-tier-color, #7ec8a0) 20%, transparent);
    color: var(--d2-tier-color, #7ec8a0);
    border: 1px solid color-mix(in srgb, var(--d2-tier-color, #7ec8a0) 40%, transparent);
    white-space: nowrap;
}
.d2-rune-clvl {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}
.d2-rune-effects { display: flex; flex-direction: column; gap: 5px; }
.d2-rune-effect-row {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.d2-effect-label {
    flex-shrink: 0;
    width: 60px;
    font-size: 11px;
    color: var(--text-muted);
}
.d2-upgrade-row { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--border-color); }
.d2-upgrade-recipe {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--accent);
}

/* ============================================================
   DIABLO 2 — 룬워드 목록
   ============================================================ */
.d2-rw-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.d2-rw-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 16px;
    transition: border-color 0.15s;
}
.d2-rw-card:hover { border-color: var(--accent); }
.d2-rw-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.d2-rw-runes {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}
.d2-rune-chip {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
}
.d2-rune-arrow {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1;
}
.d2-rw-base {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.d2-rw-effects {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================================
   DIABLO 2 — 소켓 큐빙
   ============================================================ */
.d2-socket-tip {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}
.d2-socket-section { margin-bottom: 24px; }
.d2-socket-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}
.d2-socket-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.d2-socket-table th {
    text-align: left;
    padding: 8px 12px;
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}
.d2-socket-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: top;
    line-height: 1.5;
}
.d2-socket-table tr:last-child td { border-bottom: none; }
.d2-socket-table tr:hover td { background: var(--bg-surface); }
.d2-recipe-cell { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.d2-result-cell { font-weight: 600; color: var(--text-primary); }
.d2-note-cell   { color: var(--text-muted); font-size: 12px; }
.d2-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.d2-tips-list li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}
