/* Home: write a line, pick a look */
.write{display:grid;gap:12px}
.write label{font-size:24px;font-weight:800;line-height:1.35}
.write input{width:100%;height:56px;border:2px solid var(--brand);border-radius:var(--r);padding:0 16px;background:var(--surface);font-size:18px;font-weight:500}
.write small{color:var(--mute);font-size:13px}
.looks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.looks button{padding:0;border:0;border-radius:18px;overflow:hidden;aspect-ratio:4/5;min-height:0;background:var(--surface-2)}
.looks canvas{display:block;width:100%;height:100%;object-fit:cover}
@media (min-width:620px){.looks{grid-template-columns:repeat(3,minmax(0,1fr))}}
.quick{display:flex;gap:10px;margin-top:14px}
.quick button{flex:1}
.section{display:flex;align-items:center;justify-content:space-between;margin:24px 0 10px}
.section a{font-size:14px;text-decoration:none;font-weight:700}
.formats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.formats button{flex-direction:column;gap:6px;min-height:96px;padding:10px 4px;border-radius:var(--r)}
.formats i{display:block;border-radius:5px;background:#1d3fbb}
.formats button:nth-child(2) i{background:var(--teal)}
.formats button:nth-child(3) i{background:var(--accent)}
.formats button:nth-child(4) i{background:var(--rose)}
.formats small{font-size:12px;color:var(--mute);font-weight:400}
.rail{display:flex;gap:12px;overflow-x:auto;padding:2px 2px 8px;margin-inline:-2px;scrollbar-width:none;scroll-snap-type:x proximity}
.rail::-webkit-scrollbar{display:none}
.rail>.thumb{flex:0 0 118px;scroll-snap-align:start}
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(108px,1fr));gap:12px;align-items:start}
.gallery>.empty{grid-column:1/-1}
.thumb{display:grid;gap:6px;padding:0;border:0;background:none;min-width:0;min-height:0;justify-items:stretch}
.thumb .art{display:block;border-radius:14px;overflow:hidden;background:var(--surface-2);box-shadow:var(--shadow);aspect-ratio:9/16}
.thumb .art>*{display:block;width:100%;height:100%;object-fit:cover}
.thumb small{font-size:12px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thumb.on .art{outline:3px solid var(--brand);outline-offset:2px}
.empty{display:grid;justify-items:center;gap:10px;padding:34px 16px;text-align:center;color:var(--mute);border:1.5px dashed var(--line);border-radius:var(--r-l)}
.empty .ic{width:44px;height:44px;color:var(--brand)}
.banner{display:flex;gap:12px;align-items:center;margin-top:14px}
.banner p{margin:0;font-size:13px}
.list{display:grid;gap:1px;background:var(--line);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.list>*{display:flex;align-items:center;gap:12px;background:var(--surface);padding:13px 14px;border:0;border-radius:0;text-align:start;text-decoration:none;color:inherit;justify-content:flex-start;min-height:52px}
.list select{width:auto;padding:6px 10px}
.step{display:flex;gap:14px;align-items:flex-start;margin-bottom:10px}
.step b{display:grid;place-items:center;flex:0 0 32px;height:32px;border-radius:50%;background:var(--brand);color:var(--brand-ink)}
.step p{margin:3px 0 0}
.art-hero{height:190px;border-radius:var(--r);display:grid;place-items:center;color:#fff;background:#1d3fbb url(/icons/khatam.svg) right -50px top -60px/220px no-repeat;font:64px/1.2 Lalezar,Vazirmatn;text-align:center}
.dots{display:flex;gap:6px;justify-content:center}
.dots i{width:7px;height:7px;border-radius:4px;background:var(--line);transition:width .2s}
.dots i.on{width:22px;background:var(--brand)}
/* Drawing pad */
.pad{width:100%;aspect-ratio:3/4;max-height:58dvh;background:#fff;border-radius:var(--r);touch-action:none;display:block;margin:auto;box-shadow:var(--shadow)}
.swatch{width:36px;height:36px;min-height:36px;padding:0;border-radius:50%;border:2px solid var(--line)}
.swatch.on{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--brand)}
.search{width:100%;height:46px;margin-bottom:12px;padding:0 14px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);font-size:16px}
.brand{display:grid;gap:10px;justify-items:start}
.selfie{width:100%;justify-content:flex-start;gap:14px;margin-bottom:16px;padding:14px 16px;border:0;border-radius:var(--r);background:var(--rose);color:#fff;text-align:start}
.selfie span{display:grid;line-height:1.45}
.selfie small{font-size:12px;opacity:.92}
/* Tools */
.toolsentry{width:100%;justify-content:flex-start;gap:14px;margin-bottom:16px;padding:12px 16px;border-radius:var(--r);text-align:start}
.toolsentry span,.toolhead span{display:grid;line-height:1.45}
.toolsentry small,.toolhead small{font-size:12px;color:var(--mute);font-weight:400}
.tool{margin-bottom:12px;padding:6px}
.toolhead{width:100%;justify-content:flex-start;text-align:start;gap:14px;border:0;background:none;min-height:60px}
.toolbody{display:grid;gap:10px;padding:8px}
.toolout{display:grid;gap:8px}
.toolout audio{width:100%}
.tips{margin:0;padding-inline-start:20px;line-height:2}
.biorow{justify-content:flex-start;text-align:start;gap:8px;white-space:normal}
.biorow span{flex:1;min-width:0;overflow-wrap:anywhere}
.biorow small{color:var(--mute);font-size:11px}
/* Templates screen: soft colour behind frosted controls */
#view.glassy::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(60% 40% at 12% 8%,#8fa6ff55,transparent 70%),radial-gradient(55% 38% at 92% 30%,#ff9ccb44,transparent 70%),radial-gradient(70% 45% at 40% 96%,#5ee6c43d,transparent 70%)}
.glassbar{position:sticky;top:calc(var(--top) + 6px);z-index:10;display:grid;gap:8px;min-width:0;padding:8px;margin:0 -4px 14px;border-radius:26px;background:color-mix(in srgb,var(--surface) 48%,transparent);backdrop-filter:saturate(1.8) blur(22px);-webkit-backdrop-filter:saturate(1.8) blur(22px);border:1px solid color-mix(in srgb,#fff 55%,transparent);box-shadow:inset 0 1px 0 #ffffff70,0 10px 30px #0e14301a}
:root[data-theme=dark] .glassbar{border-color:#ffffff1f;box-shadow:inset 0 1px 0 #ffffff1f,0 10px 30px #0006}
.glassbar input.search[type=text]{background:color-mix(in srgb,var(--surface) 55%,transparent);border-radius:18px}
.glassbar .chip{background:color-mix(in srgb,var(--surface) 45%,transparent);border-color:color-mix(in srgb,var(--ink) 8%,transparent)}
.glassbar .chip.on{background:var(--ink);color:var(--bg)}
.glassy .gallery{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
.glassy .thumb .art{border-radius:24px;box-shadow:0 2px 4px #0e143014,0 14px 30px #0e14301f}
.glassy .thumb small{text-align:center}
.gridend{height:1px}
