:root {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent: #2563eb;
    --success: #16a34a;
    --error: #dc2626;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.card {
    background: var(--bg-card);
    width: 100%;
    max-width: 700px;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

h1 {
    font-size: 1.5rem;
    margin: 0 0 24px 0;
    font-weight: 700;
}

/* --- タブスタイルの強化 --- */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px; /* border-bottomを重ねる */
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 既存パーツ --- */
.field-group { margin-bottom: 20px; }

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

textarea {
    width: 100%;
    height: 180px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    outline: none;
    resize: vertical;
}

textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

button {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover { background-color: #1d4ed8; }

#output {
    margin-top: 24px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    min-height: 80px;
    color: var(--text-main);
    border-left: 4px solid var(--accent);
}