@font-face {
  font-family: Inter; src: url('fonts/inter.woff') format('woff');
  font-style: normal; font-weight: 100 900; font-display: swap;
}
:root {
  color-scheme:light;
  font: 400 16px/1.5 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --ink:#272331; --muted:#686574; --accent:#6043c8; --hover:#5033b3;
  --line:#e2dfe8;
  background:#f7f6fb; color:var(--ink);
}
* { box-sizing:border-box }
[hidden] { display:none!important }
body { margin:0; min-height:100svh; background:radial-gradient(ellipse at 50% 39%,#efebf9 0%,#f8f7fb 54%,#faf9fc 100%) }
button,input,textarea,select { font:inherit }
button,a { touch-action:manipulation; -webkit-tap-highlight-color:transparent }
button { color:inherit; cursor:pointer; border:0; background:none }
a { color:var(--accent) }
button:disabled { cursor:default; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible { outline:3px solid #9276ea; outline-offset:3px }
h1,h2,h3,p { margin:0 }
.app { width:min(100% - 36px,494px); margin-inline:auto; padding-block:clamp(48px,16svh,180px) max(36px,env(safe-area-inset-bottom)); }
.brand { display:flex; justify-content:center; align-items:center; gap:11px; color:#17151a; font-size:clamp(37px,5vw,43px); line-height:1; font-weight:800; letter-spacing:-.055em; margin:0 0 28px }
.brand img { flex:none; }
.sheet { border:1px solid var(--line); background:#fff; border-radius:22px; box-shadow:0 12px 40px -29px #3b264d60,0 2px 4px #2f254606; padding:26px }
.dropzone { width:100%; min-height:212px; padding:20px 18px; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:3px; background:#f9f7fe; border:1.5px dashed #c7b9e5; border-radius:15px; transition:background .15s,border-color .15s; }
.dropzone:not(:disabled):hover,.dropzone.dragging { border-color:var(--accent); background:#f1ecfd }
.dropzone strong { max-width:100%; overflow-wrap:anywhere; font-size:19px; font-weight:625; letter-spacing:-.055em }
.file-meta { color:var(--muted); font-size:14px; }
.file-art { display:block; position:relative; width:85px; height:72px; margin-bottom:10px; flex:none; }
.file-art > span { position:absolute }
.file-back { width:48px; height:54px; left:12px; top:8px; border:1px solid #8f6dd1; border-radius:8px; transform:rotate(-16deg); background:linear-gradient(140deg,#ad91e9,#7756bd) }
.file-front { width:47px; height:58px; left:28px; top:4px; padding:17px 8px; border:1px solid #b7a5d6; border-radius:7px; transform:rotate(8deg); background:linear-gradient(115deg,#fff,#efebfb); box-shadow:0 4px 6px #42206a14 }
.file-front i { display:block; height:2px; border-radius:2px; background:#b2a1cb; margin-bottom:5px }
.file-front i:first-child { width:63%; height:3px; background:#856bac }
.file-front i:last-child { width:79% }
.file-badge { display:grid; place-items:center; left:50px; top:43px; width:27px; height:27px; background:#6950c9; color:#fff; border:2px solid #f7f3ff; border-radius:50%; }
[data-icon] { display:inline-grid; place-items:center; flex:none; }
[data-icon] svg { display:block; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round }
.file-badge svg { width:15px; height:15px }
.primary,.secondary,.small-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:12px 16px; min-height:46px; font-size:15px; font-weight:565; line-height:1.3; text-align:center; text-decoration:none; border-radius:10px; }
.primary { color:#fff; background:var(--accent); border:1px solid var(--accent); }
.primary:not(:disabled):hover { background:var(--hover); }
.primary:disabled { background:#826dbe; border-color:#826dbe; }
.secondary,.small-btn { border:1px solid var(--line); background:#fff; }
.secondary:hover,.small-btn:hover { background:#f7f5fb }
.generate { width:100%; margin-top:18px; min-height:49px; }
.publish-option { display:flex; align-items:center; justify-content:center; gap:9px; font-size:14px; color:#5e5968; min-height:45px; margin:6px 0 -9px; cursor:pointer; }
.publish-option input { width:17px; height:17px; margin:0; accent-color:var(--accent); }
.feedback { color:var(--muted); font-size:14px; line-height:1.5; margin-top:12px; overflow-wrap:anywhere; }
.feedback:empty { display:none }
.feedback.error,.error-msg,.danger { color:#a32b45 }
.app:has(#result:not([hidden])) { padding-top:clamp(20px,4svh,48px); }
.app:has(#result:not([hidden])) .brand { font-size:30px; gap:9px; margin-bottom:16px; }
.app:has(#result:not([hidden])) .brand img { width:34px; height:34px }
.result-panel { padding:16px; }
.result-panel:focus { outline:none }
.result-actions,.public-actions { display:flex; gap:8px; align-items:center; }
.result-actions .primary,.public-actions > * { flex:1; min-width:0; }
.result-visual { display:grid; justify-items:center; padding:17px 6px; margin:0; }
#result-card { width:100%; display:grid; justify-items:center; min-width:0 }
#result-image { display:block; width:min(100%,375px); height:auto; }
.public-actions { border-top:1px solid var(--line); padding-top:13px; flex-wrap:wrap }
.public-actions > * { font-size:14px }
.public-actions .owner-action { flex:1 0 100%; display:grid; gap:5px; padding-top:5px }
.owner-action button { font-size:14px }
.owner-action small { color:var(--muted); font-size:12px; text-align:center }
.text-actions { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:0 12px; margin-top:4px }
.text-actions button,.text-btn { color:var(--muted); min-height:44px; padding:8px 5px; font-size:14px; }
.text-actions button:hover,.text-btn:hover { color:var(--accent); text-decoration:underline }
.icon-button { width:46px; height:46px; flex:none; display:grid; place-items:center; border-radius:10px; }
.icon-button:hover {background:#f4f1fa}
dialog { padding:0; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:16px; width:min(580px,calc(100% - 24px)); max-height:92dvh; box-shadow:0 18px 65px #21152b34 }
dialog::backdrop { background:#27223972; backdrop-filter:blur(3px) }
body:has(dialog[open]) { overflow:hidden }
.dialog-heading,.dialog-section,.job-title,.dialog-actions { display:flex;align-items:center;justify-content:space-between;gap:10px }
.dialog-heading { position:sticky; top:0; z-index:1; padding:10px 16px 10px 22px; border-bottom:1px solid var(--line); background:#fff }
.dialog-heading h2 { font-size:21px; letter-spacing:-.04em }
#dialog-body { padding:20px 22px; }
.form-stack { display:grid; gap:14px; }
.form-stack label { display:grid; gap:5px; font-size:14px; font-weight:550; }
.form-stack h3 {font-size:17px}
.form-stack input,.form-stack textarea,.form-stack select,.copy-fallback { width:100%; min-width:0; border:1px solid #c9c4d2; background:white; color:var(--ink); border-radius:8px; padding:9px 11px; font-size:16px; }
textarea { resize:vertical }
.job-editor { min-inline-size:0; border:1px solid var(--line); border-radius:10px; background:#f9f8fc; padding:13px; margin:0; display:grid; gap:10px }
.job-editor + .job-editor {margin-top:10px}
.job-title,.delete-job {font-size:14px}
.delete-job {color:#88505b}
.grid-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.small-btn {font-size:14px; padding:8px 10px; min-height:40px}
.field-note,.dialog-note,.notice {color:var(--muted);font-size:14px;line-height:1.5}
.notice {padding:9px 12px;background:#f4f0fc;border-radius:8px}
.dialog-actions { justify-content:flex-end; flex-wrap:wrap; }
.dialog-actions .danger { color:#a32b45 }
.feedback:focus { outline:none }
@media (max-width:500px) {
  .app { width:calc(100% - 28px); padding-top:clamp(55px,12svh,110px); }
  .brand { gap:10px; margin-bottom:21px; }
  .brand img { width:38px; height:38px; }
  .sheet { border-radius:18px; padding:18px; }
  .dropzone { min-height:197px }
  .result-panel { padding:10px }
  .result-visual { padding:12px 0; }
  .public-actions { gap:6px }
  .public-actions > * {font-size:13px; padding-inline:6px}
  #dialog-body {padding:15px}
  .grid-fields {grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce) { * { transition-duration:0s!important } }
