:root {
  --ink:#123b47; --deep:#093b48; --deeper:#062f3b; --teal:#0e6977;
  --paper:#f3f7f8; --white:#fff; --muted:#67808a; --line:#d8e5e9;
  --yellow:#ffdc24; --yellow-hover:#f6ca08; --red:#b92131;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  color:var(--ink); background:var(--paper); font-synthesis:none;
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; min-height:100vh; }
button { font:inherit; cursor:pointer; }
button:disabled { cursor:not-allowed; opacity:.42; }
button:focus-visible, input:focus-visible { outline:3px solid #22a1b5; outline-offset:3px; }
.hidden { display:none!important; }
.masthead { color:#fff; background:linear-gradient(110deg,#0b4855,#07333f); min-height:107px; }
.masthead-inner { max-width:1100px; margin:auto; padding:21px 28px 19px; display:flex; align-items:center; justify-content:space-between; gap:18px; }
.brand { display:inline-flex; flex-direction:column; align-items:flex-start; line-height:1; position:relative; width:136px; }
.brand-name { position:relative; font-size:34px; font-weight:650; letter-spacing:-1.7px; line-height:32px; }
.brand-dot { color:var(--yellow); font-size:12px; position:absolute; top:-5px; left:19px; }
.brand-home { width:132px; margin-top:5px; padding:4px 0 3px; text-align:center; font-size:12px; font-weight:750; letter-spacing:5px; background:#5ca9cc; border-radius:1px; }
.prototype { color:#c2d9dd; font-size:10px; letter-spacing:1.2px; font-weight:700; text-align:right; }
.app-shell { max-width:1100px; margin:0 auto; padding:31px 28px 72px; }
.eyebrow { color:var(--teal); display:flex; align-items:center; gap:8px; font-size:11px; letter-spacing:2px; font-weight:800; margin:0 0 12px; }
.eyebrow-line { width:17px; height:3px; background:var(--yellow); border-radius:8px; }
.heading-row { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:28px; }
h1 { font-size:clamp(27px,3.5vw,38px); font-weight:760; letter-spacing:-1.35px; margin:0 0 10px; line-height:1.12; }
.lead { max-width:630px; color:var(--muted); line-height:1.5; margin:0; font-size:15px; }
.count-pill { background:#dceff0; color:#0b6877; border-radius:999px; flex-shrink:0; white-space:nowrap; font-size:13px; font-weight:800; padding:11px 18px; }
.workspace { background:#fff; border:1px solid #dce7e9; border-radius:16px; padding:30px; box-shadow:0 11px 38px rgba(10,62,75,.045); }
.section-head { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:23px; }
.step { font-size:10px; font-weight:800; letter-spacing:2px; color:#2a8c97; margin:0 0 7px; }
h2 { font-size:21px; letter-spacing:-.35px; margin:0; }
.privacy-tag { display:flex; gap:8px; align-items:center; font-size:11px; font-weight:650; color:#5a7b79; white-space:nowrap; }
.privacy-dot { background:#28a77b; width:7px; height:7px; border-radius:50%; }
.photo-actions { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:20px; }
.action-button { border:1px solid transparent; border-radius:9px; min-height:49px; display:inline-flex; justify-content:center; align-items:center; gap:10px; padding:12px 19px; font-size:14px; font-weight:780; transition:background .15s,transform .15s; }
.action-button:active { transform:translateY(1px); }
.action-button.primary { background:var(--deep); color:white; }
.action-button.primary:hover { background:#0c5867; }
.action-button.secondary { border-color:#bad1d7; color:var(--deep); background:#f7fbfb; }
.action-button.secondary:hover { background:#e9f4f5; }
.action-button.yellow { background:var(--yellow); color:var(--deeper); }
.action-button.yellow:hover { background:var(--yellow-hover); }
.button-icon { font-size:19px; }
.empty-state { background:repeating-linear-gradient(45deg,#f7fbfb,#f7fbfb 18px,#f3f9f9 18px,#f3f9f9 36px); border:2px dashed #c9dcdf; border-radius:14px; min-height:310px; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding:26px; }
.empty-illustration { width:87px; height:87px; display:grid; place-items:center; border-radius:50%; background:#deedf0; margin-bottom:19px; position:relative; }
.empty-camera { font-size:43px; line-height:1; color:#347989; }
.empty-mark { position:absolute; width:20px; height:20px; border-radius:50%; border:4px solid #f5c923; top:13px; right:12px; }
.empty-state h3 { margin:0 0 8px; font-size:19px; }
.empty-state p { margin:0; color:var(--muted); font-size:14px; max-width:360px; line-height:1.55; }
.editor-topline { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; align-items:center; margin:0 0 10px; font-size:13px; font-weight:750; }
.editor-hint { color:#70858d; font-size:12px; font-weight:500; }
.photo-stage { border-radius:10px; background:#e8eff1; overflow:hidden; position:relative; display:flex; justify-content:center; align-items:center; min-height:260px; background-image:linear-gradient(45deg,#e5edef 25%,transparent 25%),linear-gradient(-45deg,#e5edef 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e5edef 75%),linear-gradient(-45deg,transparent 75%,#e5edef 75%); background-size:20px 20px; background-position:0 0,0 10px,10px -10px,-10px 0; }
#photoCanvas { display:block; width:auto; height:auto; max-width:100%; max-height:68vh; touch-action:none; cursor:crosshair; -webkit-user-select:none; user-select:none; }
.tools { margin:18px 0 10px; display:flex; flex-wrap:wrap; align-items:center; gap:16px; }
.tool-group { display:flex; flex-wrap:wrap; gap:7px; }
.tool-button { background:#f5f9f9; color:#326472; border:1px solid var(--line); border-radius:8px; padding:11px 13px; font-size:13px; font-weight:700; }
.tool-button span { font-size:18px; vertical-align:-1px; margin-right:5px; }
.tool-button.selected { border-color:#2d8090; background:#e0f0f2; box-shadow:inset 0 0 0 1px #2d8090; color:#074b5c; }
.divider-vertical { width:1px; height:30px; background:var(--line); }
.colors { display:flex; gap:13px; align-items:center; }
.color-swatch { background:var(--swatch); border:2px solid #fff; box-shadow:0 0 0 1px #c2d3d7; border-radius:50%; width:28px; height:28px; padding:0; }
.color-swatch.selected { box-shadow:0 0 0 3px #477e8b; }
.history-actions { border-top:1px solid var(--line); padding-top:12px; display:flex; flex-wrap:wrap; align-items:center; gap:12px 19px; }
.link-button { border:0; background:transparent; padding:8px 0; color:#2f6d7b; font-weight:730; font-size:12px; }
.link-button:hover:not(:disabled) { text-decoration:underline; }
.link-button.danger { color:var(--red); }
.push-right { margin-left:auto; }
.thumbnail-bar { margin-top:18px; border-top:1px solid var(--line); padding-top:19px; }
.thumbnail-bar h3 { margin:0 0 11px; font-size:13px; color:#244855; }
.thumbnails { display:flex; gap:11px; flex-wrap:wrap; }
.thumb { position:relative; border:2px solid transparent; width:84px; height:76px; border-radius:8px; padding:2px; background:#e8f0f2; overflow:hidden; }
.thumb.selected { border-color:#138296; }
.thumb canvas { display:block; width:100%; height:100%; object-fit:contain; background:#fff; }
.thumb span { position:absolute; bottom:2px; left:2px; font-size:9px; padding:3px 4px; color:white; background:rgba(8,49,60,.8); border-radius:2px; }
.add-thumb { border:2px dashed #9fbfc7; color:#2d7583; font-size:25px; font-weight:500; background:#f4fafa; }
.add-thumb span { font-size:10px; font-weight:700; background:none; color:inherit; display:block; position:static; margin-top:-2px; }
.save-row { margin-top:22px; background:#eaf5f7; padding:17px; border-radius:10px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:18px; }
.save-row strong { font-size:14px; }
.save-row p { margin:5px 0 0; font-size:12px; line-height:1.45; color:#637e87; }
.message { margin-top:16px; border-radius:8px; background:#e8f4f1; color:#155c50; padding:12px 15px; font-size:13px; }
.message.error { color:#8a2832; background:#fcecee; }
.footer-note { margin:20px 3px; font-size:12px; line-height:1.6; color:#69828b; }
@media(max-width:640px) {
 .masthead { min-height:86px; }
 .masthead-inner { padding:15px 17px; }
 .brand { transform:scale(.84); transform-origin:left center; width:115px; }
 .prototype { font-size:9px; max-width:142px; line-height:1.45; }
 .app-shell { padding:23px 14px 55px; }
 .heading-row { align-items:flex-start; flex-direction:column; gap:13px; margin-bottom:22px; }
 .lead { font-size:14px; }
 .workspace { padding:18px 13px 22px; border-radius:12px; }
 .section-head { align-items:flex-start; flex-direction:column; gap:9px; margin-bottom:19px; }
 .photo-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
 .action-button { padding:11px 9px; font-size:12px; }
 .button-icon { font-size:16px; }
 .empty-state { min-height:260px; }
 .editor-hint { display:none; }
 .tools { gap:12px; }
 .divider-vertical { display:none; }
 .tool-button { font-size:12px; padding:10px 10px; }
 .tool-button span { margin-right:1px; }
 .photo-stage { min-height:200px; }
 #photoCanvas { max-height:55vh; }
 .history-actions { gap:8px 16px; }
 .push-right { margin-left:0; }
 .save-row { align-items:stretch; }
 .save-row .action-button { width:100%; }
}
@media(prefers-reduced-motion:reduce) { *,*:before,*:after { transition:none!important; } }
