:root {
    --paper: #f7f4ef;
    --ink: #1d1b19;
    --line: #d3cac0;
    --cobalt: #243fca;
    --muted: #625a54;
    --radius: 12px;
    color: var(--ink);
    font: 16px/1.45 Montserrat, "Avenir Next", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: var(--paper); }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1 { margin-bottom: 24px; font-size: clamp(2.2rem, 5vw, 4.65rem); line-height: .98; letter-spacing: -.075em; font-weight: 850; }
h2 { font-size: 1.24rem; letter-spacing: -.035em; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #5872ff; outline-offset: 3px; }
.header { min-height: 80px; display: flex; padding: 14px clamp(16px, 5vw, 76px); justify-content: space-between; align-items: center; gap: 14px; }
.admin .header { border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 10px; align-items: center; font-size: 1.3rem; font-weight: 850; letter-spacing: -.055em; text-decoration: none; }
.brand img { flex: 0 0 auto; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; font-size: .88rem; font-weight: 650; }
nav a { text-decoration: none; }
nav [aria-current] { color: var(--cobalt); text-decoration: underline; text-underline-offset: .35em; }
.shell { width: min(1120px, 100% - 32px); margin: clamp(38px, 8vw, 96px) auto; }
.panel { border: 1px solid var(--line); background: #fdfbf8; padding: clamp(17px, 3vw, 30px); border-radius: var(--radius); min-width: 0; }
.narrow { max-width: 660px; }
.stack { display: grid; align-content: start; gap: 14px; }
.meta { color: var(--muted); font-size: .88rem; }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.inline { display: flex; align-items: center; gap: 7px; }
.inline input { width: 76px; }
label { font-weight: 650; }
label:not(.inline):not(.drop) { display: grid; gap: 6px; }
input, select { border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; padding: 9px; min-width: 0; }
.button { display: inline-grid; place-items: center; border: 0; border-radius: 7px; padding: 12px 15px; background: var(--cobalt); color: #fff; font-weight: 750; text-align: center; text-decoration: none; }
.button:hover { background: #1d319a; }
.button:disabled { opacity: .63; cursor: wait; }
.secondary { background: var(--ink); }
.full { width: 100%; }
.text-button { border: 0; padding: 2px 0; text-align: left; background: none; color: inherit; text-decoration: underline; font-weight: 650; }
.drop { border: 1px dashed #80766e; border-radius: 8px; position: relative; display: grid; gap: 3px; justify-items: center; padding: 22px 10px; text-align: center; cursor: pointer; }
.drop:focus-within, .drop.over { border-color: var(--cobalt); background: #e9edff; }
.drop input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.arrow { font: 750 2rem/1 system-ui; color: var(--cobalt); }
.drop span:last-of-type { font-size: .8rem; color: var(--muted); }
.file-list { margin: 0; padding: 0; list-style: none; }
.file-list li { border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; overflow-wrap: anywhere; min-width: 0; }
.file-list li:last-child { border-bottom: 1px solid var(--line); }
.file-list li > :first-child { min-width: 0; }
.file-link { text-decoration: none; color: var(--cobalt); padding: 3px 8px; font-size: 1.25rem; line-height: 1; }
.notice { padding: 10px 13px; margin-bottom: 16px; background: #eaf0ff; border-radius: 6px; }
.error { background: #fae7e5; color: #752924; }
progress { width: 100%; accent-color: var(--cobalt); }
.settings { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); align-items: start; gap: 18px; }
.preview, .recipient { background: radial-gradient(ellipse at 86% 20%, #776857, #272424 50%, #181717); }
.preview { width: 100%; min-height: 330px; margin-inline: auto; overflow: hidden; border-radius: 8px; padding: 15px; position: relative; display: grid; align-content: space-between; color: white; }
.preview.mobile { max-width: 240px; min-height: 390px; }
.preview > img, .wallpaper { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview-brand { position: relative; display: flex; align-items: center; gap: 5px; font-weight: 800; }
.preview-card { position: relative; width: min(165px, 100%); background: var(--paper); color: var(--ink); border-radius: 7px; padding: 10px; font-size: .71rem; }
.preview-card p { margin: 6px 0; }
.preview-card .button { padding: 5px; }
.recipient { position: relative; display: flex; flex-direction: column; isolation: isolate; }
.recipient .wallpaper { position: fixed; z-index: -1; }
.recipient .header { color: white; }
.recipient .brand span { background: rgb(26 21 20 / 82%); border-radius: 5px; padding: 4px 8px; }
.recipient-main { display: flex; align-items: center; flex: 1; padding: 24px clamp(16px, 5vw, 76px) 48px; }
.download-card { width: min(100%, 340px); padding: 23px; border-radius: 12px; background: #fbf8f3; box-shadow: 0 9px 36px #16141d38; display: grid; gap: 13px; }
.download-card h1 { font-size: clamp(1.7rem, 3vw, 2.45rem); margin: 0; }
.download-card .file-list { max-height: 245px; overflow: auto; }
@media (max-width: 700px) {
    .settings { grid-template-columns: 1fr; }
    .admin .header { flex-wrap: wrap; }
    .recipient-main { align-items: flex-end; justify-content: center; }
}
