.photobook-page { background: #f7f5f0; }
.photobook-shell { --ink:#20352f; --muted:#62736c; --accent:#d75734; --accent-dark:#af3e22; --paper:#fff; --line:#dce2de; color:var(--ink); max-width:1440px; margin:0 auto; padding:28px clamp(16px,4vw,64px) 72px; }
.photobook-shell * { box-sizing:border-box; }
.photobook-hero { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(310px,.85fr); gap:clamp(34px,6vw,86px); align-items:center; min-height:510px; padding:48px clamp(10px,3vw,42px); background:linear-gradient(135deg,#edf4ef,#fff7ed 70%); border-radius:30px; overflow:hidden; }
.photobook-kicker { display:block; color:var(--accent); font-size:.78rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; margin-bottom:10px; }
.photobook-hero h1,.photobook-builder h2,.photobook-explainer h2 { font-size:clamp(2.05rem,4.5vw,4.4rem); line-height:1.02; margin:0 0 18px; letter-spacing:-.04em; }
.photobook-hero p { font-size:clamp(1rem,1.4vw,1.22rem); max-width:700px; line-height:1.65; color:var(--muted); }
.photobook-specs { display:flex; flex-wrap:wrap; gap:9px 22px; margin:24px 0 30px; font-weight:750; }
.photobook-primary-link,.photobook-primary,.photobook-secondary { display:inline-flex; min-height:48px; align-items:center; justify-content:center; border-radius:13px; padding:11px 20px; font-weight:800; cursor:pointer; text-decoration:none; }
.photobook-primary-link,.photobook-primary { color:#fff; border:1px solid var(--accent); background:var(--accent); box-shadow:0 9px 22px rgba(215,87,52,.18); }
.photobook-primary-link:hover,.photobook-primary:hover { background:var(--accent-dark); border-color:var(--accent-dark); color:#fff; }
.photobook-secondary { background:#fff; border:1px solid var(--line); color:var(--ink); }
.photobook-hero-art { position:relative; height:380px; perspective:900px; }
.photobook-mock-page { position:absolute; top:36px; left:50%; width:230px; height:300px; border-radius:7px 18px 18px 7px; background:#f0d4bd; box-shadow:0 28px 50px rgba(32,53,47,.23); transform-origin:left center; }
.photobook-mock-back { transform:translateX(-50%) rotate(-8deg); background:#e8e1d3; }
.photobook-mock-front { display:flex; flex-direction:column; justify-content:flex-end; gap:16px; padding:24px; transform:translateX(-35%) rotateY(-8deg) rotate(5deg); background:linear-gradient(155deg,#496f69,#99b3a8); color:#fff; }
.photobook-mock-front i { position:absolute; inset:20px 20px 92px; background:linear-gradient(135deg,#f4b36d,#e76f51 48%,#355c58 49%); border-radius:80px 80px 8px 8px; }
.photobook-mock-front b { font-family:Georgia,serif; font-size:1.4rem; z-index:1; }
.photobook-builder { margin-top:42px; background:#fff; border:1px solid var(--line); border-radius:26px; box-shadow:0 22px 60px rgba(32,53,47,.08); overflow:hidden; }
.photobook-builder-header { display:flex; justify-content:space-between; gap:24px; align-items:end; padding:30px clamp(20px,4vw,50px) 20px; }
.photobook-builder-header h2 { font-size:clamp(1.7rem,3vw,2.7rem); margin:0; }
.photobook-save-status { color:var(--muted); font-size:.86rem; }
.photobook-save-status.saving { color:#a56521; }
.photobook-steps { display:grid; grid-template-columns:repeat(3,1fr); border-block:1px solid var(--line); background:#f8faf8; }
.photobook-steps button { border:0; background:transparent; padding:16px; color:#78867f; font-weight:750; cursor:pointer; }
.photobook-steps button span { display:inline-grid; place-items:center; width:28px; height:28px; margin-right:8px; border-radius:50%; background:#e2e8e4; }
.photobook-steps button.active { color:var(--ink); background:#fff; }
.photobook-steps button.active span { color:#fff; background:var(--accent); }
.photobook-stage { display:none; padding:clamp(24px,4vw,52px); }
.photobook-stage.active { display:block; }
.photobook-error { margin:20px clamp(24px,4vw,52px) 0; padding:13px 16px; border-radius:10px; background:#fff0ed; border:1px solid #eead9b; color:#932f19; }
.photobook-choice-grid,.photobook-review-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(280px,.65fr); gap:clamp(28px,5vw,72px); }
.photobook-stage h3 { font-size:1.45rem; margin:0 0 8px; }
.photobook-stage p { color:var(--muted); line-height:1.55; }
.photobook-stage fieldset { border:0; margin:26px 0; padding:0; }
.photobook-stage legend,.photobook-stage label>span { display:block; font-weight:800; margin-bottom:9px; }
.photobook-format-options { display:grid; grid-template-columns:repeat(4,minmax(100px,1fr)); gap:12px; }
.photobook-format-options label { position:relative; min-height:135px; padding:14px 8px; display:flex; flex-direction:column; align-items:center; justify-content:end; gap:9px; border:1px solid var(--line); border-radius:14px; cursor:pointer; text-align:center; }
.photobook-format-options input { position:absolute; opacity:0; }
.photobook-format-options label:has(input:checked) { outline:3px solid rgba(215,87,52,.18); border-color:var(--accent); }
.photobook-format-shape { display:block; width:min(64px,75%); aspect-ratio:var(--ratio); max-height:72px; background:#eef1ee; border:2px solid #98aaa1; border-radius:3px; }
.photobook-select-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.photobook-stage select,.photobook-stage input[type=number],.photobook-stage input[type=text] { width:100%; min-height:45px; padding:9px 12px; border:1px solid #becac4; border-radius:10px; background:#fff; font:inherit; }
.photobook-fixed-specs,.photobook-order-summary { padding:24px; border-radius:18px; background:#f4f7f4; align-self:start; }
.photobook-fixed-specs dl,.photobook-order-summary dl { margin:20px 0; }
.photobook-fixed-specs dl div,.photobook-order-summary dl div { display:flex; justify-content:space-between; gap:20px; padding:10px 0; border-bottom:1px solid #dfe6e1; }
.photobook-fixed-specs dt,.photobook-order-summary dt { color:var(--muted); }
.photobook-fixed-specs dd,.photobook-order-summary dd { margin:0; font-weight:800; text-align:right; }
.photobook-price { padding-top:18px; display:grid; gap:3px; }
.photobook-price small,.photobook-price span { color:var(--muted); }
.photobook-price strong { font-size:1.8rem; }
.photobook-stage-actions { display:flex; justify-content:space-between; gap:14px; padding-top:36px; }
.photobook-editor-heading { display:flex; justify-content:space-between; gap:22px; align-items:end; }
.photobook-editor-heading strong { flex:none; padding:8px 12px; border-radius:9px; background:#edf3ef; }
.photobook-page-strip { display:flex; gap:7px; overflow-x:auto; scroll-snap-type:x proximity; padding:12px 3px 15px; scrollbar-width:thin; }
.photobook-page-strip button { flex:0 0 auto; scroll-snap-align:start; min-width:63px; padding:8px 10px; border:1px solid var(--line); border-radius:9px; color:var(--ink); background:#fff; font-weight:750; cursor:pointer; }
.photobook-page-strip button.active { color:#fff; background:var(--ink); border-color:var(--ink); }
.photobook-editor-grid { display:grid; grid-template-columns:270px minmax(0,1fr); gap:24px; min-height:620px; }
.photobook-tools { display:grid; align-content:start; gap:17px; padding:18px; border:1px solid var(--line); background:#fbfcfb; border-radius:16px; }
.photobook-tools label>span { font-size:.88rem; }
.photobook-cover-tabs,.photobook-layout-buttons { display:grid; grid-template-columns:repeat(2,1fr); gap:7px; }
.photobook-cover-tabs button,.photobook-layout-buttons button { min-height:39px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink); font-weight:750; cursor:pointer; }
.photobook-cover-tabs button.active,.photobook-layout-buttons button.active { border-color:var(--accent); color:var(--accent-dark); background:#fff4ef; }
.photobook-layout-buttons { grid-template-columns:repeat(3,1fr); }
.photobook-upload input { position:absolute; width:1px; height:1px; opacity:0; }
.photobook-upload>span { display:flex!important; align-items:center; justify-content:center; min-height:44px; padding:8px; border-radius:10px; background:var(--ink); color:#fff; cursor:pointer; }
.photobook-upload small { display:block; color:var(--muted); margin-top:6px; }
#photoBookTextFields { display:grid; gap:8px; }
.photobook-text-field { display:flex; gap:6px; }
.photobook-text-field input { min-width:0; }
.photobook-text-field button { width:38px; border:1px solid var(--line); border-radius:8px; background:#fff; cursor:pointer; }
.photobook-tools input[type=color] { width:100%; height:40px; padding:3px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.photobook-tools input[type=range] { width:100%; }
.photobook-danger-link { border:0; padding:0; background:transparent; color:#9b3924; text-align:left; cursor:pointer; }
.photobook-workspace { min-width:0; display:grid; align-content:center; justify-items:center; padding:24px; border-radius:18px; background:repeating-conic-gradient(#e7eae8 0 25%,#f0f2f0 0 50%) 50%/20px 20px; }
.photobook-canvas-wrap { position:relative; width:min(100%,760px); display:grid; place-items:center; }
#photoBookCanvas { display:block; max-width:100%; max-height:68vh; width:auto; height:auto; background:#fff; box-shadow:0 15px 36px rgba(22,38,33,.25); touch-action:none; }
.photobook-canvas-help { margin:14px 0 0!important; text-align:center; font-size:.86rem; background:rgba(255,255,255,.88); padding:6px 10px; border-radius:8px; }
.photobook-review-checks { display:grid; gap:9px; margin:24px 0; }
.photobook-check { display:flex; gap:10px; align-items:flex-start; padding:12px 14px; border-radius:11px; background:#eef5f0; }
.photobook-check.warning { background:#fff5df; color:#735111; }
.photobook-check.error { background:#fff0ed; color:#8f2f1b; }
.photobook-proof,.photobook-quality-proof { display:flex; align-items:flex-start; gap:9px; margin-top:14px; font-weight:700; }
.photobook-proof input,.photobook-quality-proof input { margin-top:4px; }
.photobook-explainer { max-width:900px; margin:70px auto 0; text-align:center; }
.photobook-explainer h2 { font-size:clamp(1.7rem,3vw,2.8rem); }
.photobook-explainer p { color:var(--muted); line-height:1.7; }
.photobook-primary[disabled] { cursor:wait; opacity:.6; }

@media (max-width:900px) {
    .photobook-hero { grid-template-columns:1fr; min-height:0; }
    .photobook-hero-art { height:290px; }
    .photobook-mock-page { width:185px; height:245px; }
    .photobook-choice-grid,.photobook-review-grid { grid-template-columns:1fr; }
    .photobook-editor-grid { grid-template-columns:1fr; }
    .photobook-workspace { order:-1; min-height:440px; }
    .photobook-tools { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .photobook-tools>* { min-width:0; }
}

@media (max-width:620px) {
    .photobook-shell { padding:12px 10px 44px; }
    .photobook-hero { border-radius:18px; padding:30px 20px; }
    .photobook-hero-art { display:none; }
    .photobook-builder { border-radius:18px; margin-top:18px; }
    .photobook-builder-header { align-items:start; flex-direction:column; padding:22px 18px 15px; }
    .photobook-steps button { padding:11px 4px; font-size:.78rem; }
    .photobook-steps button span { width:23px; height:23px; margin-right:3px; }
    .photobook-stage { padding:20px 14px 24px; }
    .photobook-format-options { grid-template-columns:repeat(2,1fr); }
    .photobook-select-row { grid-template-columns:1fr; }
    .photobook-editor-heading { display:block; }
    .photobook-editor-heading strong { display:inline-block; }
    .photobook-page-strip { position:sticky; top:0; z-index:7; margin-inline:-14px; padding:9px 14px; background:#fff; box-shadow:0 5px 10px rgba(32,53,47,.08); }
    .photobook-page-strip button { min-width:57px; padding:7px 8px; }
    .photobook-editor-grid { min-height:0; gap:14px; }
    .photobook-workspace { min-height:360px; padding:14px 8px; }
    #photoBookCanvas { max-height:58vh; }
    .photobook-tools { grid-template-columns:1fr 1fr; padding:12px; gap:12px; }
    #photoBookTextTools,.photobook-upload,.photobook-danger-link { grid-column:1/-1; }
    .photobook-stage-actions { position:sticky; bottom:0; z-index:8; margin:22px -14px -24px; padding:12px 14px; background:rgba(255,255,255,.97); box-shadow:0 -6px 16px rgba(32,53,47,.1); }
    .photobook-stage-actions>* { flex:1; }
}
