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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    background: #0c0c0f;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    padding-top: max(72px, calc(env(safe-area-inset-top) + 52px));
    color: #fafafa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: rgba(12, 12, 15, 0.8);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.site-header-logo {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fafafa;
    letter-spacing: -0.02em;
}

.site-nav {
    display: flex;
    gap: 3px;
}

.site-nav button {
    color: #71717a;
    text-decoration: none;
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
}

.site-nav button:hover {
    color: #d4d4d8;
    background: rgba(255, 255, 255, 0.05);
}

.site-nav button.active {
    color: #fff;
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
    font-weight: 600;
}

/* --- Pages --- */
.tool-page {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.tool-page.active {
    display: flex;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fafafa;
    letter-spacing: -0.03em;
}

.subtitle {
    color: #71717a;
    margin-bottom: 28px;
    font-size: 0.95rem;
    font-weight: 400;
}

/* --- Layout --- */
.main-container {
    display: flex;
    gap: 24px;
    width: 100%;
    max-width: 1000px;
    flex-wrap: wrap;
    justify-content: center;
}

.left-panel {
    flex: 1;
    min-width: 280px;
    max-width: 480px;
}

.right-panel {
    flex: 1;
    min-width: 280px;
    max-width: 420px;
}

/* --- Drop Zone --- */
.drop-zone {
    width: 100%;
    height: 180px;
    border: 2px dashed #27272a;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #18181b;
    margin-bottom: 16px;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: #a78bfa;
    background: rgba(167, 139, 250, 0.04);
    transform: scale(1.01);
}

.drop-zone-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    color: #52525b;
}

.drop-zone-text {
    font-size: 0.95rem;
    color: #a1a1aa;
    font-weight: 500;
}

.drop-zone-hint {
    font-size: 0.8rem;
    color: #52525b;
    margin-top: 4px;
}

/* --- Preview --- */
.preview-section {
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.preview-title {
    font-size: 0.8rem;
    color: #71717a;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-size {
    font-size: 0.8rem;
    color: #34d399;
    font-weight: 600;
}

.preview-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: repeating-conic-gradient(#1e1e22 0% 25%, #141418 0% 50%) 50% / 20px 20px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-placeholder {
    color: #3f3f46;
    font-size: 0.85rem;
    text-align: center;
    padding: 20px;
}

.preview-compare {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.compare-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    background: transparent;
    color: #71717a;
    font-family: inherit;
}

.compare-btn.active {
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
    border-color: transparent;
    color: #fff;
}

/* --- Settings Card --- */
.settings {
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 16px;
}

.settings-title {
    font-size: 0.7rem;
    color: #52525b;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

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

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

.setting-row label,
.setting-row > span {
    color: #a1a1aa;
    font-size: 0.85rem;
    min-width: 45px;
    font-weight: 500;
}

.setting-row input[type="range"] {
    flex: 1;
    accent-color: #a78bfa;
    height: 6px;
}

.quality-value {
    color: #a78bfa;
    font-weight: 700;
    min-width: 45px;
    text-align: right;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.quality-note {
    font-size: 0.75rem;
    color: #52525b;
    margin-top: -4px;
    margin-bottom: 10px;
    padding-left: 57px;
}

/* --- Resize --- */
.resize-section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 14px;
    margin-top: 6px;
}

.resize-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.resize-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.resize-toggle input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    width: 40px;
    height: 22px;
    background: #27272a;
    border-radius: 11px;
    position: relative;
    transition: background 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #52525b;
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
}

.resize-toggle input:checked + .toggle-switch,
.meta-toggle input:checked + .toggle-switch,
.watermark-toggle input:checked + .toggle-switch {
    background: #a78bfa;
}

.resize-toggle input:checked + .toggle-switch::after,
.meta-toggle input:checked + .toggle-switch::after,
.watermark-toggle input:checked + .toggle-switch::after {
    transform: translateX(18px);
    background: #fff;
}

.resize-toggle span {
    color: #d4d4d8;
    font-size: 0.85rem;
    font-weight: 500;
}

.original-dims {
    font-size: 0.75rem;
    color: #52525b;
}

.resize-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.3s;
}

.resize-controls.enabled {
    opacity: 1;
    pointer-events: auto;
}

.resize-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.resize-input label {
    font-size: 0.7rem;
    color: #52525b;
    font-weight: 600;
}

.resize-input input {
    width: 100%;
    padding: 10px;
    background: #27272a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #fafafa;
    font-size: 0.85rem;
    text-align: center;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.resize-input input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.resize-input input::placeholder {
    color: #3f3f46;
}

.aspect-lock {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    margin-top: 16px;
    color: #52525b;
}

.aspect-lock.locked {
    border-color: #a78bfa;
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.08);
}

/* --- Meta --- */
.meta-section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 14px;
    margin-top: 6px;
}

.meta-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.meta-toggle input[type="checkbox"] {
    display: none;
}

.meta-toggle span {
    color: #d4d4d8;
    font-size: 0.85rem;
    font-weight: 500;
}

.meta-note {
    font-size: 0.75rem;
    color: #8a8a94;
    margin-top: 6px;
    padding-left: 50px;
}

/* --- Watermark Section --- */
.watermark-section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 14px;
    margin-top: 6px;
}

.watermark-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.watermark-toggle input[type="checkbox"] {
    display: none;
}

.watermark-toggle span {
    color: #d4d4d8;
    font-size: 0.85rem;
    font-weight: 500;
}

.watermark-controls {
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.3s;
    padding-top: 12px;
    padding-left: 4px;
}

.watermark-controls.enabled {
    opacity: 1;
    pointer-events: auto;
}

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

.watermark-row label {
    font-size: 0.8rem;
    color: #71717a;
    min-width: 60px;
    flex-shrink: 0;
    font-weight: 500;
}

.watermark-row input[type="text"] {
    flex: 1;
    padding: 8px 10px;
    background: #27272a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #fafafa;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.watermark-row input[type="text"]:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.watermark-row input[type="range"] {
    flex: 1;
    accent-color: #a78bfa;
    height: 6px;
}

.wm-opacity-value, .wm-size-value {
    color: #a78bfa;
    font-weight: 700;
    min-width: 35px;
    text-align: right;
    font-size: 0.8rem;
}

.wm-color-presets {
    display: flex;
    gap: 6px;
}

.wm-color-chip {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #3f3f46;
    background: var(--chip-color);
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.wm-color-chip:hover {
    border-color: #71717a;
}

.wm-color-chip.active {
    border-color: #a78bfa;
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.3);
}

/* --- Badges --- */
.format-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.format-badge.jpeg {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
}

.format-badge.png {
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
}

/* --- Bulk Actions --- */
.bulk-actions {
    display: none;
    gap: 8px;
    margin-bottom: 14px;
}

.bulk-actions.visible {
    display: flex;
}

.bulk-btn {
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
    border: none;
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    font-family: inherit;
}

.bulk-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.25);
}

.bulk-btn.clear {
    background: #27272a;
    color: #71717a;
    flex: 0;
    padding: 10px 14px;
}

.bulk-btn.clear:hover {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    box-shadow: none;
    transform: none;
}

.bulk-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Results --- */
.results {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
}

.result-item {
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.result-name {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    color: #e4e4e7;
}

.result-stats {
    font-size: 0.75rem;
    color: #71717a;
}

.result-stats .saved {
    color: #34d399;
    font-weight: 600;
}

.result-stats .increased {
    color: #f87171;
    font-weight: 600;
}

.download-btn {
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
    border: none;
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    margin-left: 8px;
    flex-shrink: 0;
    text-decoration: none;
    font-family: inherit;
}

.download-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.2);
}

.processing {
    color: #fbbf24;
}

input[type="file"] {
    display: none;
}

/* --- Stats --- */
.stats-summary {
    padding: 10px 16px;
    background: rgba(52, 211, 153, 0.06);
    border: 1px solid rgba(52, 211, 153, 0.15);
    border-radius: 10px;
    color: #34d399;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 14px;
    display: none;
}

.stats-summary.visible {
    display: block;
}

/* --- Convert Button --- */
.convert-btn {
    width: 100%;
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
    border: none;
    color: #fff;
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    display: none;
    font-family: inherit;
}

.convert-btn.visible {
    display: block;
}

.convert-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(167, 139, 250, 0.25);
}

.convert-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Install Prompt --- */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(24, 24, 27, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 20px;
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.install-prompt.visible {
    display: flex;
}

.install-prompt span {
    font-size: 0.85rem;
    color: #a1a1aa;
    font-weight: 500;
}

.install-btn {
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
    border: none;
    color: #fff;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
}

.install-close {
    background: none;
    border: none;
    color: #52525b;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 4px;
}

/* --- Progress Bar --- */
.progress-section {
    margin-bottom: 14px;
    display: none;
}
.progress-section.visible {
    display: block;
}
.progress-bar-track {
    width: 100%;
    height: 6px;
    background: #27272a;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #a78bfa, #38bdf8);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}
.progress-text {
    font-size: 0.75rem;
    color: #71717a;
    display: flex;
    justify-content: space-between;
}
.progress-text .progress-percent {
    color: #a78bfa;
    font-weight: 700;
}

/* --- File Queue --- */
.file-queue {
    display: none;
    margin-bottom: 14px;
}
.file-queue.visible {
    display: block;
}
.file-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.file-queue-header .queue-info {
    font-size: 0.75rem;
    color: #71717a;
    font-weight: 500;
}
.file-queue-header .queue-clear-btn {
    background: none;
    border: none;
    color: #52525b;
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
    font-family: inherit;
}
.file-queue-header .queue-clear-btn:hover {
    color: #f87171;
}
.queue-list {
    max-height: 200px;
    overflow-y: auto;
}
.queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    margin-bottom: 4px;
    animation: slideIn 0.2s ease;
}
.queue-item-thumb {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    background: #27272a;
    flex-shrink: 0;
}
.queue-item-info {
    flex: 1;
    min-width: 0;
}
.queue-item-name {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #d4d4d8;
    font-weight: 500;
}
.queue-item-size {
    font-size: 0.7rem;
    color: #52525b;
}
.queue-item-remove {
    background: none;
    border: none;
    color: #3f3f46;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.queue-item-remove:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

/* --- Cancel State --- */
.convert-btn.cancel-mode {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
}
.convert-btn.cancel-mode:hover {
    background: rgba(248, 113, 113, 0.25);
    box-shadow: none;
}

/* --- Lucide Icons --- */
.lucide {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    stroke-width: 2;
}

.drop-zone-icon .lucide {
    width: 2.5rem;
    height: 2.5rem;
}

.bulk-btn .lucide,
.convert-btn .lucide,
.fav-generate-btn .lucide,
.fav-snippet-copy .lucide {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.15em;
}

.aspect-lock .lucide {
    width: 1rem;
    height: 1rem;
}

.stats-summary .lucide {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
}

.ph-thumb-actions button .lucide {
    width: 1rem;
    height: 1rem;
}

/* --- Tool Help Section --- */
.tool-help {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.tool-help-section h3 {
    font-size: 0.8rem;
    color: #a1a1aa;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-help-section h3 .lucide {
    width: 1em;
    height: 1em;
}

.tool-help-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-help-section li {
    font-size: 0.8rem;
    color: #52525b;
    line-height: 1.8;
    padding-left: 14px;
    position: relative;
}

.tool-help-section li::before {
    content: '·';
    position: absolute;
    left: 2px;
    color: #3f3f46;
    font-weight: bold;
}

@media (max-width: 600px) {
    .tool-help {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* --- Server Processor: sub-mode tabs --- */
.srv-mode-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 24px;
    width: fit-content;
}

.srv-mode-tab {
    background: none;
    border: none;
    color: #71717a;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.srv-mode-tab:hover {
    color: #d4d4d8;
}

.srv-mode-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
    font-weight: 600;
}

/* Inline code in meta notes (used by server-processing help/note text) */
.meta-note code,
.tool-help-section code {
    background: rgba(255, 255, 255, 0.06);
    color: #d4d4d8;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 0.78em;
}

/* Server-processor: upload-limit warning banner */
.srv-limit-warning {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.25);
    color: #fca5a5;
    font-size: 0.78rem;
    line-height: 1.55;
}

/* Server-processor: host capability readout under "サーバー設定" */
.srv-capabilities {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--text-secondary, #94a3b8);
}

.srv-capabilities .srv-cap-line + .srv-cap-line {
    margin-top: 3px;
}

/* Guarantee-compression preset buttons (軽め/標準/強め) */
.srv-guarantee-controls {
    display: none;
    gap: 8px;
    margin: 8px 0 0 44px;
}

.srv-guarantee-controls.enabled {
    display: flex;
}

.srv-guar-btn {
    flex: 1;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: transparent;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}

.srv-guar-btn:hover {
    border-color: var(--accent, #22d3ee);
}

.srv-guar-btn.active {
    background: var(--accent, #22d3ee);
    border-color: var(--accent, #22d3ee);
    color: #06283d;
    font-weight: 600;
}

/* Live server limits echoed into the "注意点" help text */
.srv-note-limits {
    display: inline-block;
    margin-top: 2px;
    font-weight: 600;
    color: var(--accent, #22d3ee);
}

.srv-note-limits:empty {
    display: none;
}

/* Server-processor: "kept original" explanatory notice inside a result row */
.srv-kept-notice {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: #fcd34d;
    font-size: 0.74rem;
    line-height: 1.55;
}
.srv-kept-notice strong {
    color: #fde68a;
}
.srv-kept-notice ul {
    margin: 4px 0 0 0;
    padding-left: 16px;
}
.srv-kept-notice li {
    margin-top: 2px;
}
