:root {
    --background: #f5f2ee;
    --surface: #ffffff;
    --text: #26221f;
    --muted: #716b66;
    --border: #ded8d2;
    --primary: #694f43;
    --primary-dark: #513b32;
    --success: #2f7a4f;
    --radius: 16px;
    --shadow: 0 12px 35px rgba(43, 32, 26, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--background);
    line-height: 1.5;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

a {
    color: inherit;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
}

.brand {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 70px;
}

.hero {
    margin-bottom: 30px;
    text-align: center;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.1;
}

.hero p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 1.05rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.designer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 30px;
    align-items: start;
}

.form-section + .form-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.form-section h2 {
    margin: 0 0 16px;
    font-size: 1.25rem;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.field small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
}

input:focus,
textarea:focus,
select:focus {
    outline: 3px solid rgba(105, 79, 67, 0.15);
    border-color: var(--primary);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.button:hover {
    background: var(--primary-dark);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.price-box {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 24px;
    padding: 18px;
    background: #f7f4f1;
    border-radius: 12px;
}

.price-total {
    font-size: 1.3rem;
    font-weight: 700;
}

.preview-panel {
    position: sticky;
    top: 20px;
}

.preview-title {
    margin: 0 0 14px;
    font-size: 1.2rem;
}

.preview-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 145 / 195;
    overflow: hidden;
    background: #e8e3de;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.preview-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 30px;
    text-align: center;
    color: var(--muted);
}

.preview-watermark {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.58);
    font-size: clamp(1.1rem, 4vw, 2rem);
    font-weight: 700;
    transform: rotate(-25deg);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.status-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 10px;
}

.status-message.success {
    color: var(--success);
    background: #eaf5ef;
}

@media (max-width: 850px) {
    .designer-layout {
        grid-template-columns: 1fr;
    }

    .preview-panel {
        position: static;
    }
}