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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.6;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

header {
    text-align: center;
    margin-bottom: 48px;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.subtitle {
    color: #6e6e73;
    font-size: 1.1rem;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1d1d1f;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.step h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.step p {
    color: #6e6e73;
    font-size: 0.9rem;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
    text-decoration: none;
}

.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
    background: #1d1d1f;
    color: #fff;
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 20px;
}

.btn-secondary {
    background: #e8e8ed;
    color: #1d1d1f;
    margin-top: 8px;
    font-size: 0.85rem;
    padding: 8px 16px;
}

.upload-section {
    margin-bottom: 20px;
}

.upload-area {
    border: 2px dashed #c7c7cc;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fff;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #1d1d1f;
    background: #fafafa;
}

.upload-prompt svg {
    color: #8e8e93;
    margin-bottom: 12px;
}

.upload-prompt p {
    color: #1d1d1f;
    margin-bottom: 4px;
}

.upload-prompt .link {
    color: #0066cc;
    cursor: pointer;
}

.upload-prompt .hint {
    color: #8e8e93;
    font-size: 0.85rem;
}

.preview-img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
}

.options-section {
    background: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.options-section label {
    font-weight: 600;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 6px;
}

.options-section input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
}

.options-section input[type="text"]:focus {
    border-color: #0066cc;
}

.scaling-mode {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e8e8ed;
}

.scaling-mode > label {
    margin-bottom: 8px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-label {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-weight: 400;
    font-size: 0.9rem;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: auto;
    flex-shrink: 0;
}

.radio-label span:first-of-type {
    font-weight: 600;
    min-width: 80px;
}

.radio-hint {
    color: #8e8e93;
    font-size: 0.8rem;
    font-weight: 400 !important;
    min-width: 0 !important;
}

.progress-section {
    margin-top: 24px;
    text-align: center;
}

.progress-bar {
    height: 6px;
    background: #e8e8ed;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: #1d1d1f;
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    color: #6e6e73;
    font-size: 0.9rem;
}

.result-section {
    margin-top: 32px;
    text-align: center;
}

.result-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.preview-text-area {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    text-align: left;
}

.preview-text-area label {
    font-weight: 600;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 6px;
}

.preview-text-area input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    margin-bottom: 16px;
}

.preview-weight-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    margin-top: 12px;
}

.preview-weight-label:first-of-type {
    margin-top: 0;
}

.font-preview {
    font-size: 1.8rem;
    line-height: 1.5;
    word-break: break-word;
    min-height: 60px;
    padding: 12px;
    background: #f5f5f7;
    border-radius: 8px;
}

.char-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.char-grid .char-cell {
    width: 48px;
    height: 56px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
}

.char-grid .char-cell span {
    font-size: 0.65rem;
    color: #8e8e93;
    margin-top: 4px;
}
