.layout {
    max-width: 1300px;
    margin: 24px auto 60px;
    padding: 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: start;
}

.panel.controls {
    flex: 1 1 340px;
    min-width: 300px;
}

.panel.preview {
    flex: 2 1 420px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.panel.preview h2 {
    margin: 0 0 4px;
    font-size: 16px;
    font-family: "游ゴシック", 'ヒラギノ角ゴ ProN W3', sans-serif;
    color: #4b4b4b;
}

#preview-frame {
    flex: 1;
    width: 100%;
    min-height: 600px;
    margin-top: 12px;
    border: 1px solid gainsboro;
    border-radius: 4px;
    background-color: white;
}

.uploader {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.file-label {
    font-size: 14px;
    color: #4b4b4b;
}

input[type="file"] {
    padding: 8px 0;
    font-size: 13px;
}

.warning {
    color: #8a5a00;
    background-color: whitesmoke;
    border-left: 4px solid #d99a00;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 14px;
}

#options {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid gainsboro;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.title-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.title-row label {
    font-size: 13px;
    color: #4b4b4b;
}

.title-row input {
    width: 100%;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b4b4b;
    padding: 8px 0;
    cursor: pointer;
}

.checkbox-row input {
    width: 16px;
    height: 16px;
    accent-color: #888888;
}

.caption {
    margin: -4px 0 8px 0;
    font-size: 12px;
    color: #9a9a9a;
}

.sub-row {
    margin: 0 0 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sub-row label {
    font-size: 13px;
    color: #888888;
}

.tab-name-input {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.color-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.color-input input[type="color"] {
    width: 40px;
    height: 28px;
    padding: 2px;
    border: 1px solid gainsboro;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
}

select,
input[type="text"] {
    font-size: 14px;
    padding: 6px 8px;
    border: 1px solid gainsboro;
    border-radius: 4px;
    background-color: white;
    color: #4b4b4b;
}

button#download-btn {
    display: block;
    width: 100%;
    margin: 4px 0 20px;
    background-color: whitesmoke;
    color: #4b4b4b;
    border: 1px solid gainsboro;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

button#download-btn:hover:not(:disabled) {
    background-color: #e6e6e6;
}

button#download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
