@font-face { font-family: "Fustat"; src: url("fonts/fustat-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fustat"; src: url("fonts/fustat-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --orange: #FF5A14; --purple: #8230F0; --purple-soft: #B070FF; --turquoise: #00B896;
  --paper: #FAF7F2; --ink: #231A2B; --ink-soft: #62586B; --line: #E4DDD3; --white: #FFFFFF; --error: #B3261E;
  --brand-wash:
    radial-gradient(60% 90% at 8% 0%, rgba(255, 90, 20, .95), rgba(255, 90, 20, 0) 70%),
    radial-gradient(55% 90% at 92% 12%, rgba(130, 48, 240, .9), rgba(130, 48, 240, 0) 72%),
    radial-gradient(70% 90% at 50% 100%, rgba(255, 160, 130, .85), rgba(255, 160, 130, 0) 75%),
    #FFC9B0;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 "Fustat", system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; }
[hidden] { display: none !important; }
h1, h2 { font-weight: 700; letter-spacing: -.02em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(36px, 6.4vw, 72px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
code { font-size: .92em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 4px; }

.wordmark { font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.logo { height: 34px; width: auto; display: block; }

.btn { appearance: none; border: 0; border-radius: 999px; background: var(--orange); color: var(--ink); font: 700 18px/1 "Fustat", sans-serif; padding: 18px 30px; cursor: pointer; text-decoration: none; display: inline-block; transition: background-color .15s, transform .15s; }
.btn:hover:not(:disabled) { background: #FF743A; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { background: #EDE6DC; color: #6F6678; cursor: not-allowed; }
.btn-quiet { background: var(--ink); color: var(--white); }
.btn-quiet:hover:not(:disabled) { background: #3A2E44; }
.link { appearance: none; background: none; border: 0; padding: 4px 0; font: 600 16px "Fustat", sans-serif; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Login */
.login { flex: 1; display: flex; align-items: center; padding: 32px clamp(16px, 7vw, 96px); background: var(--brand-wash); }
.is-login { background: #FFC9B0; }
.login-inner { width: 100%; max-width: 640px; }
.login .wordmark { display: block; margin-bottom: clamp(32px, 7vh, 72px); }
.login .logo { margin-bottom: clamp(32px, 7vh, 72px); }
.login form { margin-top: 36px; max-width: 400px; }
.login label { display: block; font-weight: 600; margin-bottom: 6px; }
.login input { width: 100%; font: 400 18px "Fustat", sans-serif; padding: 15px 18px; border-radius: 14px; border: 2px solid transparent; background: rgba(255, 255, 255, .92); color: var(--ink); }
.login input:focus { outline: none; border-color: var(--purple); }
.login .btn { margin-top: 16px; background: var(--ink); color: var(--white); }
.login .btn:hover { background: #3A2E44; }
.notice { margin-top: 28px; background: rgba(255, 255, 255, .85); padding: 16px 18px; border-radius: 14px; max-width: 480px; }
.login .form-error { background: rgba(255, 255, 255, .92); padding: 8px 14px; border-radius: 10px; }

/* App */
.top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 16px clamp(16px, 4vw, 48px); }
.top .link { background: rgba(255, 255, 255, .86); padding: 5px 14px; border-radius: 999px; text-decoration: none; }
.top .link:hover { background: var(--white); }
.view-run .top { position: static; background: var(--brand-wash); }
.compose { background: var(--brand-wash); padding: 96px clamp(16px, 4vw, 48px) clamp(36px, 5vw, 64px); }
.compose-head { max-width: 860px; margin-bottom: clamp(24px, 4vw, 40px); }
.compose-head p { font-size: clamp(18px, 2vw, 21px); line-height: 1.4; margin: 16px 0 0; max-width: 620px; }
#run-form { max-width: 1120px; }

.slots { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: 16px; }
.slot-main { grid-row: 1 / span 2; }
.slot { min-width: 0; position: relative; display: flex; flex-direction: column; }
.slot label { display: flex; flex: 1; cursor: pointer; position: relative; }
.slot input[type=file] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slot-frame { flex: 1; display: flex; background: var(--white); border-radius: 20px; overflow: hidden; min-height: 220px; border: 2px solid var(--white); transition: border-color .15s; position: relative; }
.slot-main .slot-frame { min-height: 470px; }
.slot label:hover .slot-frame, .slot.is-drag .slot-frame { border-color: var(--purple); }
.slot input:focus-visible + .slot-frame { outline: 3px solid var(--purple); outline-offset: 3px; }
.slot.has-error .slot-frame { border-color: var(--error); }
.slot-empty { margin: auto; padding: 24px; display: flex; flex-direction: column; gap: 4px; max-width: 340px; color: var(--ink-soft); }
.slot-empty strong { color: var(--ink); font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 4px; }
.slot-cta { margin-top: 14px; color: var(--purple); font-weight: 700; }
.slot-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #F3EEE7; }
.slot-title { display: none; }
.slot.has-file .slot-title { display: flex; justify-content: space-between; gap: 12px; margin: 8px 4px 0; font-weight: 600; font-size: 15px; }
.slot-remove { appearance: none; background: none; border: 0; padding: 0; font: 600 15px "Fustat", sans-serif; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.slot-note { margin: 4px 4px 0; font-size: 14px; }
.slot-error { margin: 8px 4px 0; font-size: 15px; font-weight: 600; color: var(--error); background: rgba(255, 255, 255, .92); padding: 6px 12px; border-radius: 10px; }

.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.submit-row p { margin: 0; font-weight: 600; }
.is-app .compose .btn:not(:disabled) { background: var(--ink); color: var(--white); }
.is-app .compose .btn:not(:disabled):hover { background: #3A2E44; }
.is-app .compose .btn:disabled { background: rgba(255, 255, 255, .7); color: #5A5062; }
.form-error { color: var(--error); font-weight: 600; margin: 14px 0 0; }
.compose .form-error { background: rgba(255, 255, 255, .92); padding: 10px 14px; border-radius: 10px; display: inline-block; }
.fineprint { font-size: 15px; margin: 14px 0 0; }

/* Lauf und Ergebnisse */
.run { padding: clamp(20px, 3vw, 36px) clamp(16px, 4vw, 48px) 48px; }
.back { margin-bottom: 18px; }
.run-state { max-width: 720px; }
.run-state p { margin: 10px 0 0; font-size: 18px; }
.bar { height: 12px; border-radius: 999px; background: var(--line); margin-top: 18px; overflow: hidden; }
#bar-fill { display: block; height: 100%; width: 3%; min-width: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--orange), var(--purple)); transition: width .8s ease; }
.warnings { list-style: none; margin: 18px 0 0; padding: 14px 18px; max-width: 720px; background: #FFF0E9; border-left: 4px solid var(--orange); border-radius: 0 12px 12px 0; }
.warnings li + li { margin-top: 6px; }
.results { display: flex; flex-wrap: wrap; gap: 28px 20px; margin-top: 28px; align-items: flex-start; }
.result { margin: 0; max-width: 100%; }
.result img, .result video { display: block; height: 340px; width: auto; max-width: 100%; border-radius: 14px; background: #EFE9E0; }
.result figcaption { width: 0; min-width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 14px; margin-top: 8px; font-size: 15px; }
.result-meta { color: var(--ink-soft); }
.result strong { display: block; color: var(--ink); font-weight: 700; }
.result a { font-weight: 600; text-underline-offset: 3px; }
#zip { margin-top: 32px; }

.history { padding: 28px clamp(16px, 4vw, 48px) 56px; border-top: 1px solid var(--line); }
.history h2 { font-size: 24px; }
#history-list { list-style: none; margin: 14px 0 0; padding: 0; max-width: 720px; }
#history-list button { appearance: none; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 2px; font: 400 17px "Fustat", sans-serif; color: var(--ink); text-align: left; display: flex; justify-content: space-between; gap: 16px; cursor: pointer; }
#history-list button:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }
#history-list .h-status { color: var(--ink-soft); }

.foot { display: flex; gap: 20px; padding: 16px clamp(16px, 4vw, 48px); font-size: 15px; }

.check { max-width: 760px; margin: 0 auto; padding: 40px 16px; }
.check h1 { font-size: 40px; margin-bottom: 24px; }
.check h2 { margin-top: 32px; font-size: 24px; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.check-list strong { flex: 0 0 64px; }
.check-list small { display: block; color: var(--ink-soft); font-size: 14px; word-break: break-word; }
.check-list .ok strong { color: #00755F; }
.check-list .warn strong { color: #B23C07; }
.check-list .bad strong { color: var(--error); }

@media (max-width: 720px) {
  .slots { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 12px; }
  .slot-main { grid-column: 1 / span 2; grid-row: auto; }
  .slot-main .slot-frame { min-height: 340px; }
  .slot-frame { min-height: 190px; }
  .slot-empty { padding: 16px; font-size: 15px; }
  .slot-empty strong { font-size: 17px; }
  .slot-main .slot-empty strong { font-size: 22px; }
  .compose { padding-top: 76px; background:
    radial-gradient(70% 45% at 5% 0%, rgba(255, 90, 20, .95), rgba(255, 90, 20, 0) 70%),
    radial-gradient(60% 30% at 100% 0%, rgba(176, 112, 255, .6), rgba(176, 112, 255, 0) 75%),
    radial-gradient(90% 60% at 50% 100%, rgba(255, 160, 130, .85), rgba(255, 160, 130, 0) 75%), #FFC9B0; }
  #submit { width: 100%; }
  .result, .result img, .result video { width: 100%; height: auto; }
  .btn-quiet { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
