:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: #242135;
  background: #f7f7fb;
  color-scheme: light;
  --ink: #242135;
  --muted: #625e74;
  --purple: #5739bc;
  --purple-dark: #45269e;
  --lavender: #efebfc;
  --edge: #dedce8;
  --white: #fff;
  --green: #087851;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
a { color: var(--purple-dark); text-underline-offset: .2em; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .54; }
button, input, select, textarea, summary, a { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--purple); }
h1,h2,h3,p,figure { margin: 0; }
h2 { font-size: 1.19rem; font-weight: 720; letter-spacing: -.024em; }
p { line-height: 1.55; }
.shell { width: min(1112px, calc(100% - 52px)); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--edge); }
.top-inner, nav, .section-head, .actions, .modal-head { display: flex; align-items: center; gap: .65rem; }
.top-inner { justify-content: space-between; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 790; letter-spacing: -.045em; font-size: 1.24rem; text-decoration: none; white-space: nowrap; }
.studio { font-weight: 560; color: var(--muted); }
.mark, .tile-icon, .upload-icon { display: grid; place-items: center; flex: none; }
.mark { width: 36px; height: 36px; border-radius: 11px; background: var(--purple); }
.mark i { width: 17px; height: 17px; border: 2px dashed #fff; border-radius: 4px; }
button { color: inherit; border: 1px solid transparent; border-radius: 10px; padding: .62rem .86rem; min-height: 42px; font-size: .9rem; font-weight: 680; background: transparent; }
.quiet { color: var(--purple-dark); }
.quiet:hover { background: var(--lavender); }
.outline { border-color: var(--edge); background: var(--white); }
.outline:hover { border-color: var(--purple); color: var(--purple-dark); }
.primary { background: var(--purple); color: #fff; }
.primary:hover:not(:disabled) { background: var(--purple-dark); }
.intro { padding: 49px 0 35px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
h1 { font-size: clamp(3rem, 8vw, 5.25rem); line-height: .99; letter-spacing: -.078em; font-weight: 810; }
.intro > div:first-child > p { max-width: 520px; margin-top: 16px; color: var(--muted); font-size: 1.08rem; }
.allowance { background: var(--lavender); border: 1px solid #e5dcfa; border-radius: 16px; min-width: 245px; padding: 13px 16px; }
.allowance p + p { margin-top: 3px; }
.signal { width: 8px; height: 8px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.muted { color: var(--muted); font-size: .875rem; }
.destination { margin-bottom: 17px; }
.destinations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 11px; }
.destinations button { display: flex; text-align: left; align-items: center; gap: 12px; padding: 13px; border-color: var(--edge); background: #fff; }
.destinations button:hover, .destinations button[aria-pressed=true] { border-color: var(--purple); }
.destinations button[aria-pressed=true] { background: var(--lavender); box-shadow: inset 0 0 0 1px var(--purple); }
.destinations strong, .destinations small { display: block; }
.destinations strong { font-size: .94rem; }
.destinations small { color: var(--muted); font-weight: 460; font-size: .79rem; margin-top: 4px; }
.tile-icon { width: 37px; height: 37px; background: var(--lavender); border-radius: 9px; }
.tile-icon::before { content: ""; width: 17px; height: 17px; border: 2px solid var(--purple); border-radius: 4px; }
.passport::before { width: 13px; height: 18px; background: radial-gradient(circle, transparent 2px, var(--purple) 2.5px, var(--purple) 3.5px, transparent 4px); }
.box::before { background: linear-gradient(var(--purple),var(--purple)) center top / 2px 7px no-repeat; }
.square::before { border-style: dashed; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(315px, 1fr); gap: 16px; align-items: start; }
.panel { background: white; border-radius: 17px; border: 1px solid var(--edge); padding: 19px; min-width: 0; }
.section-head { justify-content: space-between; margin-bottom: 16px; }
.section-head p { margin-top: 4px; }
.drop { border: 2px dashed #d7cdef; border-radius: 13px; text-align: center; min-height: 270px; display: grid; justify-items: center; align-content: center; gap: 9px; padding: 16px 10px; background: #faf9fe; }
.drop.dragging { background: var(--lavender); border-color: var(--purple); }
.drop p { color: var(--muted); font-size: .85rem; }
.drop .actions { margin-top: 8px; justify-content: center; }
.upload-icon { width: 48px; height: 48px; border-radius: 13px; color: var(--purple-dark); background: var(--lavender); font-size: 1.55rem; font-weight: 700; margin-bottom: 4px; }
.actions { flex-wrap: wrap; }
.batch-link { padding-left: 0; margin-top: 8px; }
.privacy-note { color: var(--muted); font-size: .8rem; margin-top: 10px; }
.privacy-note span { margin-right: 5px; color: var(--green); }
.comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.photo-frame { min-height: 110px; aspect-ratio: 1 / 1; display: grid; place-items: center; background: repeating-conic-gradient(#f0eff5 0% 25%, #e9e8f1 0% 50%) 0 0 / 16px 16px; border-radius: 10px; overflow: hidden; position: relative; color: var(--ink); }
.photo-frame img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.photo-frame span { position: absolute; inset: auto 0 0; padding: 5px; text-align: center; font-size: .72rem; background: #fff; }
figcaption { display: grid; gap: 3px; font-size: .81rem; padding-block: 6px; }
figcaption span { color: var(--muted); }
.photo-actions { margin-bottom: 12px; }
.batch-picker { margin-bottom: 12px; }
.settings form, #dialog-content form { display: grid; gap: 11px; }
#preset-settings, #print-settings { margin-bottom: 13px; }
#preset-settings p, #print-settings p { margin-top: 6px; }
#preset-source { display: inline-block; font-size: .83rem; margin-top: 5px; }
.field-grid { display: grid; gap: 10px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.wide { grid-column: 1 / -1; }
label, legend { display: block; font-size: .84rem; font-weight: 660; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea {
  display: block; width: 100%; padding: .57rem .63rem; min-height: 42px; border: 1px solid #cfccdc; border-radius: 9px; background: white; color: var(--ink);
}
label + input, label + select, label + textarea { margin-top: 5px; }
input[type=range] { width: 100%; min-height: 30px; margin: 4px 0 0; }
input[type=range], input[type=checkbox], input[type=radio], progress { accent-color: var(--purple); }
.check { display: flex; align-items: center; gap: 6px; min-height: 31px; font-weight: 540; }
.check input { width: 16px; height: 16px; }
fieldset { border: 0; margin: 12px 0; padding: 0; }
legend { margin-bottom: 5px; }
.segments { display: grid; grid-template-columns: 1fr 1fr; background: #f4f2fa; padding: 3px; gap: 3px; border-radius: 10px; }
.segments label { cursor: pointer; position: relative; }
.segments input { position: absolute; opacity: 0; }
.segments span { display: block; text-align: center; border-radius: 8px; padding: 9px 4px; min-height: 38px; }
.segments input:checked + span { background: #fff; color: var(--purple-dark); box-shadow: 0 1px 4px #29195022; }
.segments input:focus-visible + span { outline: 2px solid var(--purple); }
details { color: var(--muted); font-size: .86rem; }
details[open] summary { margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 650; }
.background { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.background input[type=color] { padding: 2px; width: 37px; height: 31px; margin: 0; background: white; border: 1px solid var(--edge); border-radius: 6px; }
.encoding { margin-top: 12px; }
output { font-weight: 540; color: var(--muted); margin-left: 3px; }
.download-area { border-top: 1px solid var(--edge); margin-top: 14px; padding-top: 13px; display: grid; gap: 9px; }
.full, progress { width: 100%; }
.notice, .offer { color: #493283; font-size: .86rem; background: var(--lavender); padding: 9px 11px; border-radius: 9px; margin-top: 9px; }
.offer p { margin-bottom: 8px; }
.footer { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding-block: 23px; color: var(--muted); font-size: .79rem; }
.footer nav { flex-wrap: wrap; gap: 2px; }
.footer button { font-size: .8rem; }
dialog { width: min(640px, calc(100% - 28px)); max-height: calc(100dvh - 28px); border: 1px solid var(--edge); border-radius: 18px; padding: 19px; color: var(--ink); box-shadow: 0 14px 60px #26204340; }
dialog::backdrop { background: #211b358a; }
.modal-head { justify-content: space-between; align-items: center; margin-bottom: 11px; }
.modal-head h2 { font-size: 1.38rem; }
.close { font-size: 1.3rem; padding: 0 13px; }
#dialog-content { display: grid; gap: 12px; }
#dialog-content p { font-size: .9rem; }
.card { border: 1px solid var(--edge); border-radius: 10px; padding: 11px; display: grid; gap: 7px; overflow-wrap: anywhere; }
.card h3 { font-size: 1rem; }
.card .actions button { padding-inline: .56rem; }
.price { font-size: 1.4rem; font-weight: 780; }
.pill { display: inline-block; font-size: .8rem; color: var(--purple-dark); }
textarea { resize: vertical; }
@media (max-width: 720px) {
  .shell { width: min(100% - 28px, 540px); }
  .top-inner { min-height: 59px; }
  .intro { padding-block: 29px 23px; align-items: stretch; gap: 13px; flex-direction: column; }
  .intro h1 br { display: none; }
  .intro > div:first-child > p { font-size: .98rem; margin-top: 11px; }
  .allowance { min-width: 0; padding: 9px 11px; }
  .destinations { gap: 6px; }
  .destinations button { flex-direction: column; align-items: start; gap: 7px; padding: 9px 7px; }
  .destinations strong { font-size: .77rem; line-height: 1.23; }
  .destinations small { display: none; }
  .workspace { grid-template-columns: 1fr; gap: 11px; }
  .panel { padding: 13px; }
  .drop { min-height: 180px; }
  input:not([type=checkbox]):not([type=range]):not([type=radio]), select, textarea { font-size: 16px; }
  .footer { gap: 5px; }
}

@media (max-width: 380px) {
  .top-inner, .top-inner nav { gap: 4px; }
  .brand { gap: 6px; font-size: 1.04rem; }
  .brand .mark { width: 30px; height: 30px; }
  .top-inner nav button { padding-inline: .45rem; }
}

.staging-notice { margin-top: 12px; font-size: .9rem; color: var(--muted); }

.history { display: grid; gap: 9px; }
