/* VOICE: wordless and calm; small labels only where a button needs one.
   IDEA: a light table — the drop box in the middle, every tool laid around its edges.
   PICTURE: the lavender-to-peach drop box that becomes the contact sheet.
   COLOUR and TYPE: white, lavender #f6f0fa / #ecdff5, peach #fde9e3, salmon #f08f7a, plum #5b3f7a; system UI.
   LAYOUT: top = output, left = add, right = metadata, bottom = sort + download. */
:root{color-scheme:light;--bg:#fff;--mint:#f6f0fa;--mint2:#ecdff5;--peach:#fde9e3;--sage:#f4a99a;--salmon:#f08f7a;--deep:#5b3f7a;--ink:#2e2140;--mute:#86719b;--line:#efe6f5;--warn:#b7791f;--bad:#b5534a}
*{box-sizing:border-box;min-width:0}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--deep);font:16px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;overflow-x:clip}
svg.i{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
[hidden]{display:none!important}
button{font:inherit;color:inherit}
input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
main.app{padding:16px max(3vw,14px) 40px;max-width:1440px;margin:0 auto}

/* logo */
.head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.logo{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--deep);border-radius:12px;padding:4px 6px 4px 0}
.logo svg{width:36px;height:36px;flex:none}
.logo span{font:800 23px/1 system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:-.03em}
.logo b{color:var(--salmon);font-weight:800}
.logo:focus-visible{outline:3px solid var(--sage);outline-offset:2px}
.tools{display:flex;gap:6px;flex-wrap:wrap}
.tools a{font-size:13px;font-weight:600;color:var(--deep);text-decoration:none;padding:7px 12px;border-radius:999px;background:var(--mint)}
.tools a:hover,.tools a[aria-current]{background:var(--peach)}

/* frame: everything around the box */
.frame{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"top top top" "left box right" "bottom bottom bottom";gap:12px}
.top{grid-area:top}.left{grid-area:left}.right{grid-area:right}.boxwrap{grid-area:box}.bottom{grid-area:bottom}
.bar{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;align-items:stretch}
.side{display:flex;flex-direction:column;gap:10px;align-self:start;position:sticky;top:12px}
.grp{display:flex;align-items:stretch;gap:2px;background:rgba(255,255,255,.95);border:1px solid var(--line);border-radius:20px;padding:5px;box-shadow:0 6px 24px -14px rgba(91,63,122,.4)}
.side .grp{flex-direction:column}
.bottom{position:sticky;bottom:12px;z-index:6}
.bottom .grp{backdrop-filter:blur(8px)}

/* toolbar buttons: icon + small label */
.tb{position:relative;min-width:66px;min-height:54px;padding:6px 10px 5px;border:0;border-radius:15px;background:transparent;color:var(--deep);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer;transition:background .15s}
.tb:hover{background:var(--mint)}
.tb[aria-pressed=true]{background:var(--peach);color:#4a2f66}
.tb[aria-pressed=true]::after{content:"";position:absolute;top:7px;right:9px;width:7px;height:7px;border-radius:50%;background:var(--salmon)}
.tb:disabled{opacity:.35;cursor:default;background:transparent}
.tb:focus-visible,.ib:focus-visible,.chip:focus-visible,.card:focus-visible{outline:3px solid var(--sage);outline-offset:2px}
.tb small{font:600 11px/1.15 system-ui,sans-serif;white-space:nowrap;max-width:9em;overflow:hidden;text-overflow:ellipsis}
.tb.wide{min-width:96px}
.sum{display:flex;align-items:center;padding:0 12px;font-size:12px;font-weight:600;color:var(--mute);white-space:nowrap}
.sl{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2px 10px 5px 8px;min-height:54px}
.slr{display:flex;align-items:center;gap:6px;height:32px}
.sl small{font:600 11px/1.1 system-ui,sans-serif;white-space:nowrap}
.seg{display:flex;gap:2px;align-items:center;padding:0 4px}
.seg button{border:0;background:transparent;border-radius:10px;padding:8px 10px;font:700 12px system-ui,sans-serif;cursor:pointer;min-height:40px;color:var(--deep)}
.seg button[aria-pressed=true]{background:var(--peach)}
input[type=range]{-webkit-appearance:none;appearance:none;width:110px;height:32px;background:transparent;cursor:pointer}
input[type=range]::-webkit-slider-runnable-track{height:6px;border-radius:3px;background:var(--mint2)}
input[type=range]::-moz-range-track{height:6px;border-radius:3px;background:var(--mint2)}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;margin-top:-7px;border-radius:50%;background:var(--deep);border:3px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.2)}
input[type=range]::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:var(--deep);border:3px solid #fff}
input[type=range]:focus-visible{outline:3px solid var(--sage);outline-offset:-6px;border-radius:8px}

/* the drop box / contact sheet */
.box{position:relative;min-height:min(60vh,520px);border-radius:28px;background:linear-gradient(135deg,var(--mint) 0%,var(--peach) 100%);border:2px dashed var(--sage);padding:14px;transition:background .2s}
.box.empty{display:grid;place-items:center;cursor:pointer}
.box.empty:hover{background:linear-gradient(135deg,var(--mint2) 0%,#fbdcd2 100%)}
.box:focus-visible{outline:3px solid var(--sage);outline-offset:3px}
.disc{width:clamp(120px,16vw,160px);aspect-ratio:1;border-radius:50%;background:#fff;display:grid;place-items:center;box-shadow:0 18px 40px -18px rgba(91,63,122,.5)}
.disc svg{width:46%;height:46%;stroke-width:1.5}
.hint{margin-top:14px;text-align:center;font-size:13px;font-weight:600;color:var(--mute)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,200px),1fr));gap:12px}
.card{position:relative;aspect-ratio:4/3;border-radius:18px;background:#fff;overflow:hidden;cursor:zoom-in;box-shadow:0 2px 10px -6px rgba(91,63,122,.35)}
.card.fresh{animation:in .4s ease-out}
.card img{width:100%;height:100%;object-fit:contain;display:block;padding:8px}
.card.rej{opacity:.42}
.card.rej::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(135deg,transparent 0 12px,rgba(181,83,74,.08) 12px 14px);pointer-events:none;z-index:1}
.add{aspect-ratio:4/3;border-radius:18px;border:2px dashed var(--sage);background:rgba(255,255,255,.5);display:grid;place-items:center;cursor:pointer;color:var(--deep)}
.add:hover{background:#fff}.add svg{width:38px;height:38px}
.ctr{position:absolute;inset:0;display:grid;place-items:center;color:var(--mute)}
.card.bad{background:#faf7fb;cursor:default}.card.bad .ctr{color:var(--bad)}.card.bad .ctr svg{width:40px;height:40px}
.acts{position:absolute;right:7px;bottom:7px;display:flex;gap:5px;z-index:2}
.ib{width:40px;height:40px;border-radius:50%;border:0;display:grid;place-items:center;cursor:pointer;background:rgba(255,255,255,.96);color:var(--deep);box-shadow:0 2px 10px -4px rgba(91,63,122,.5)}
.ib:hover{background:var(--peach)}.ib:disabled{opacity:.5}
.ib svg{width:20px;height:20px}
.badges{position:absolute;left:7px;top:7px;display:flex;gap:4px;flex-wrap:wrap;z-index:2;right:7px}
.bd{display:inline-flex;align-items:center;gap:3px;height:24px;padding:0 8px;border-radius:999px;background:rgba(255,255,255,.96);font:700 11px/1 system-ui,sans-serif;color:var(--deep);box-shadow:0 1px 6px -3px rgba(91,63,122,.5);white-space:nowrap}
.bd svg{width:13px;height:13px;stroke-width:2.2}
.bd.w{color:var(--warn)}.bd.x{color:var(--bad)}.bd.p{background:var(--deep);color:#fff}.bd.s{background:var(--peach)}
.stars{position:absolute;left:9px;bottom:10px;z-index:2;font-size:13px;letter-spacing:1px;color:var(--salmon);text-shadow:0 0 3px #fff}
.spin{width:34px;height:34px;animation:sp 1s linear infinite}
.spin circle{stroke:var(--sage);stroke-dasharray:44 100}

/* popovers */
.pop{position:fixed;z-index:40;width:min(340px,calc(100vw - 24px));background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;box-shadow:0 20px 50px -20px rgba(46,33,64,.45);color:var(--ink);font-size:14px}
.pop h3{margin:0 0 10px;font-size:15px;color:var(--deep)}
.pop label{display:block;font-size:13px;font-weight:600;color:var(--deep);margin:10px 0 4px}
.pop input[type=text]{width:100%;font:16px system-ui,sans-serif;padding:9px 11px;border:1px solid var(--line);border-radius:10px;min-height:44px;color:var(--ink)}
.pop input[type=text]:focus{outline:3px solid var(--sage);outline-offset:0}
.pop .note{font-size:12px;color:var(--mute);margin:8px 0 0}
.pop .row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.opt{display:flex;flex-direction:column;align-items:flex-start;width:100%;text-align:left;border:0;background:transparent;border-radius:12px;padding:9px 11px;cursor:pointer;min-height:44px}
.opt:hover{background:var(--mint)}.opt[aria-pressed=true]{background:var(--peach)}
.opt b{font-size:14px;color:var(--deep)}.opt span{font-size:12px;color:var(--mute)}
.chip{border:1px solid var(--line);background:var(--mint);border-radius:999px;padding:6px 10px;font:600 12px system-ui,sans-serif;cursor:pointer;color:var(--deep);min-height:34px}
.chip[aria-pressed=true]{background:var(--peach);border-color:var(--sage)}
.sw{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 0 6px;font-weight:600;color:var(--deep)}
.sw input{width:44px;height:26px;accent-color:var(--deep)}
.pos{display:grid;grid-template-columns:repeat(3,44px);gap:4px}
.pos button{height:34px;border:1px solid var(--line);background:var(--mint);border-radius:8px;cursor:pointer}
.pos button[aria-pressed=true]{background:var(--salmon);border-color:var(--salmon)}

/* toast */
.toast{position:fixed;left:50%;bottom:92px;transform:translate(-50%,16px);z-index:60;display:flex;align-items:center;gap:10px;max-width:calc(100vw - 24px);background:var(--ink);color:#fff;border-radius:999px;padding:10px 12px 10px 16px;font-size:14px;box-shadow:0 10px 30px -10px rgba(0,0,0,.4);opacity:0;pointer-events:none;transition:.2s}
.toast.on{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.toast button{border:0;background:var(--salmon);color:#fff;font-weight:700;border-radius:999px;padding:6px 12px;cursor:pointer}

/* drag overlay */
.over{position:fixed;inset:0;z-index:50;background:linear-gradient(135deg,rgba(246,240,250,.93),rgba(253,233,227,.93));backdrop-filter:blur(4px);display:grid;place-items:center;border:4px dashed var(--sage);pointer-events:none;opacity:0;transition:opacity .15s}
.over.on{opacity:1}.over svg{width:96px;height:96px;stroke-width:1.4;color:var(--deep)}

/* viewer */
.vw{position:fixed;inset:0;z-index:70;display:grid;grid-template-columns:minmax(0,1fr) 360px;background:#17131c}
.stage{position:relative;overflow:hidden;display:grid;place-items:center;user-select:none}
.stage.zoom{overflow:auto;display:block;cursor:grab}
.stage.zoom.drag{cursor:grabbing}
.stage{min-height:0}
.stage img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}
.stage.zoom #vImg{position:static;width:auto;height:auto;max-width:none;max-height:none}
.vmsg{position:absolute;top:14px;left:50%;transform:translateX(-50%);z-index:4;background:rgba(23,19,28,.8);color:#fff;font:600 13px system-ui,sans-serif;padding:8px 14px;border-radius:999px}
.stage .mask{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.stage.zoom .mask{display:none}
.vbar{position:fixed;left:calc((100vw - 360px)/2);bottom:16px;transform:translateX(-50%);display:flex;gap:6px;background:rgba(23,19,28,.75);backdrop-filter:blur(8px);border-radius:18px;padding:5px;z-index:3}
.vbar .tb{color:#f3ecfa;min-width:58px}.vbar .tb:hover{background:rgba(255,255,255,.1)}
.vbar .tb[aria-pressed=true]{background:rgba(240,143,122,.25);color:#fff}
.side-p{background:#fff;overflow-y:auto;padding:16px 18px 28px;color:var(--ink)}
.vh{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.vh h2{margin:0;font-size:17px;line-height:1.3;color:var(--deep);overflow-wrap:anywhere}
.vh .cnt{font-size:13px;color:var(--mute);font-variant-numeric:tabular-nums}
.rate{display:flex;gap:4px;align-items:center;margin:14px 0 6px;flex-wrap:wrap}
.rate .st{width:36px;height:36px;border:0;background:transparent;font-size:24px;line-height:1;color:var(--mint2);cursor:pointer;border-radius:8px}
.rate .st.on{color:var(--salmon)}
.rate .st:hover{background:var(--mint)}
.flag{display:flex;gap:8px;margin:6px 0 14px}
.flag button{flex:1;min-height:40px;border:1px solid var(--line);background:var(--mint);border-radius:12px;font:700 13px system-ui,sans-serif;color:var(--deep);cursor:pointer;display:flex;gap:6px;align-items:center;justify-content:center}
.flag button[aria-pressed=true].pk{background:var(--deep);color:#fff;border-color:var(--deep)}
.flag button[aria-pressed=true].rj{background:var(--bad);color:#fff;border-color:var(--bad)}
.flag svg{width:16px;height:16px}
dl.det{display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px 14px;margin:0;font-size:14px}
dl.det dt{color:var(--mute);font-weight:600}
dl.det dd{margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
dl.det dd.big{font-size:20px;font-weight:800;color:var(--deep)}
.sec{margin:18px 0 8px;font-size:12px;font-weight:700;color:var(--mute);text-transform:none}
.hist{width:100%;height:110px;display:block;background:var(--mint);border-radius:12px}
.clipline{display:flex;gap:14px;font-size:13px;margin-top:6px;color:var(--ink)}
.clipline i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:5px;vertical-align:0}
.ok{color:#2f7a52;font-weight:700}.no{color:var(--warn);font-weight:700}
.vact{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}
.vact button{min-height:42px;border:0;border-radius:999px;padding:0 16px;font:700 13px system-ui,sans-serif;cursor:pointer;background:var(--mint);color:var(--deep)}
.vact button.go{background:var(--deep);color:#fff}
.keys{font-size:12px;color:var(--mute);margin-top:16px;line-height:1.7}
.keys kbd{font:600 11px system-ui;border:1px solid var(--line);border-bottom-width:2px;border-radius:5px;padding:1px 5px;background:#fff}
a.map{color:var(--deep);font-weight:700}

/* photo of the day + quote of the week */
.extras{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:14px;margin-top:22px}
.extras:has(.potd[hidden]){grid-template-columns:minmax(0,1fr)}
.potd{margin:0;border-radius:22px;overflow:hidden;background:var(--mint);display:flex;flex-direction:column;box-shadow:0 10px 30px -22px rgba(91,63,122,.6)}
.potd-img{display:block;aspect-ratio:3/2;background:var(--mint2);overflow:hidden}
.potd-img img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .6s ease}
.potd-img:hover img{transform:scale(1.02)}
.potd figcaption{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:baseline;padding:12px 16px 14px;font-size:14px;color:var(--ink)}
.potd .by a{color:var(--deep);font-weight:700;text-decoration-color:var(--sage);text-underline-offset:3px}
.potd .ex{color:var(--mute);font-size:13px;font-variant-numeric:tabular-nums}
.tag{display:inline-block;font:700 11px/1 system-ui,sans-serif;color:#fff;background:var(--salmon);border-radius:999px;padding:5px 9px;margin-right:2px}
.qotw{margin:0;border-radius:22px;padding:26px 26px 22px;background:linear-gradient(160deg,var(--mint) 0%,var(--peach) 100%);display:flex;flex-direction:column;justify-content:center;gap:14px;position:relative;overflow:hidden}
.qotw::before{content:"\201C";position:absolute;right:14px;top:-34px;font:800 180px/1 Georgia,serif;color:rgba(91,63,122,.08);pointer-events:none}
.qotw .tag{align-self:flex-start;background:var(--deep)}
.qotw p{margin:0;font:700 clamp(20px,2.4vw,27px)/1.3 system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--deep);text-wrap:balance;letter-spacing:-.01em}
.qotw footer{color:#6a5283;font-weight:600;font-size:15px}
.qotw footer::before{content:"— "}
@media(max-width:900px){.extras{grid-template-columns:minmax(0,1fr)}}

/* below-the-fold guide */
.seo{max-width:760px;margin:72px auto 0;padding-top:40px;border-top:1px solid var(--line);color:#3f2c55;font-size:17px;line-height:1.65}
.seo h1{font-size:clamp(30px,4.5vw,42px);line-height:1.1;margin:0 0 12px;color:var(--deep);letter-spacing:-.01em;text-wrap:balance}
.seo h2{font-size:22px;line-height:1.25;margin:44px 0 12px;color:var(--deep)}
.seo .lead{font-size:19px;color:#6a5283;margin:0}
.seo ol.steps{padding-left:1.3em}.seo ol.steps li{margin:8px 0;padding-left:4px}
.seo ul.ticks{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:10px 24px}
.seo ul.ticks li{background:var(--mint);border-radius:14px;padding:14px 16px}
.seo table{width:100%;border-collapse:collapse;font-size:16px}
.seo th,.seo td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
.seo th{font-weight:600;background:var(--mint)}
.seo .scroll{overflow-x:auto}
.seo .small{font-size:15px;color:#7a6390}
.seo details{border-bottom:1px solid var(--line)}
.seo summary{cursor:pointer;font-weight:600;padding:14px 0;min-height:44px}
.seo details p{margin:0 0 16px}
.seo .foot{margin-top:56px;font-size:14px;color:#86719b}
.seo .foot nav{display:flex;flex-wrap:wrap;gap:6px 16px;margin-bottom:14px}
.seo a{color:var(--deep)}

@keyframes in{from{opacity:0;transform:scale(.97)}}
@keyframes sp{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

@media(max-width:900px){
  .frame{grid-template-columns:minmax(0,1fr);grid-template-areas:"top" "left" "box" "right" "bottom"}
  .side{position:static;flex-direction:row;justify-content:center}
  .side .grp{flex-direction:row;flex-wrap:wrap;justify-content:center}
  .bar .grp{flex-wrap:wrap;justify-content:center}
  .head{flex-wrap:wrap}
}
@media(max-width:820px){
  .vw{grid-template-columns:minmax(0,1fr);grid-template-rows:58vh minmax(0,1fr)}
  .vbar{left:50%;bottom:auto;top:calc(58vh - 66px)}.vbar .tb{min-width:50px;padding:6px 6px 5px}
}
@media(max-width:600px){
  main.app{padding:12px 10px 32px}
  .tb{min-width:58px;padding:6px 6px 5px}
  .box{border-radius:22px;padding:10px;min-height:46vh}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  input[type=range]{width:86px}
  .bottom{bottom:6px}
  .bottom .grp{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;scrollbar-width:none;max-width:100%}
  .bottom .tb{flex:none}
}
