body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #f4f4f4;
    margin: 0;
}

.container {
    background-color: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 720px;
    width: 92%;
}

h1 {
    text-align: center;
    margin-top: 8px;
    font-size: 1.4em;
}

.navigation-links {
    margin-bottom: 8px;
    font-size: 0.9em;
}

.navigation-links a {
    color: #007aff;
    text-decoration: none;
}

.navigation-links a:hover {
    text-decoration: underline;
}

details summary {
    cursor: pointer;
    font-weight: bold;
}

details ol {
    padding-left: 1.5em;
    line-height: 1.7;
}

.input-area {
    margin: 16px 0;
}

.input-label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 0.95em;
}

textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95em;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #007aff;
}

.input-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 0.85em;
    color: #666;
}

.input-meta .error {
    color: #c0392b;
    font-weight: bold;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0 20px;
    padding: 12px;
    background: #f7f7f7;
    border-radius: 6px;
}

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

.control-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
}

.control-row input[type="number"] {
    width: 80px;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
}

.control-row select {
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    background: white;
}

input[type="color"] {
    width: 36px;
    height: 28px;
    border: 1px solid #ccc;
    padding: 0;
    vertical-align: middle;
    border-radius: 4px;
}

.preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.preview-box {
    width: 100%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
            linear-gradient(45deg, #ddd 25%, transparent 25%),
            linear-gradient(-45deg, #ddd 25%, transparent 25%),
            linear-gradient(45deg, transparent 75%, #ddd 75%),
            linear-gradient(-45deg, transparent 75%, #ddd 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    border-radius: 8px;
    padding: 16px;
    box-sizing: border-box;
    overflow: auto;
}

.preview-box .placeholder {
    color: #888;
    font-size: 0.9em;
    text-align: center;
    margin: 0;
}

.download-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

button {
    padding: 8px 14px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    background-color: #007aff;
    color: white;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

button:hover:not(:disabled) {
    background-color: #005bbf;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#downloadSvgBtn {
    background-color: #34c759;
}

#downloadSvgBtn:hover:not(:disabled) {
    background-color: #28a745;
}
