/* ============================================================
   SAYU BRANDS · Kundenkonto, Kollektion, Scan-Seite, Aufkleber
   Gleiche Sprache wie der Shop: Work Sans, Weiß, Schild-Schwarz,
   kleine Versal-Labels. Das eine laute Element: die Edition-Nummer,
   groß und dünn gesetzt, wie auf einem Museumsetikett.
   ============================================================ */
:root {
  --ink: #15181C; --paper: #FFFFFF; --well: #F2F2F2; --muted: #6E7379; --line: #E6E7E8; --error: #B3261E;
  --f: "Work Sans", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.55 var(--f); letter-spacing: .005em; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Label: die kleine Versal-Schrift des Shops */
.lbl { font: 500 .78rem/1.2 var(--f); letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* ---------- Kopfzeile ---------- */
.k-head { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 66px; padding: 0 var(--gutter); background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.k-head__brand { color: var(--ink); }
.brandmark { display: block; width: clamp(115px, 11.26vw, 172px); aspect-ratio: 1600 / 181; background: currentColor;
  -webkit-mask: url(/assets/home/sayu-wordmark-v2.png) center / contain no-repeat; mask: url(/assets/home/sayu-wordmark-v2.png) center / contain no-repeat; }
.k-head nav { display: flex; gap: clamp(14px, 2vw, 28px); align-items: center; }
.k-head nav:last-child { justify-content: flex-end; }
.k-head a, .k-head button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; text-decoration: none; cursor: pointer;
  font: 500 .78rem/1 var(--f); letter-spacing: .08em; text-transform: uppercase; }
.k-head a:hover, .k-head button:hover { text-decoration: underline; }

/* ---------- Bausteine ---------- */
.k-main { padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(64px, 9vw, 120px); max-width: 1440px; margin: 0 auto; }
.k-title { margin: 0; font: 400 clamp(1.9rem, 4.2vw, 3.1rem)/1.04 var(--f); letter-spacing: -.02em; }
.k-lede { max-width: 46ch; margin: 18px 0 0; color: #3b3f45; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 1.8em; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: #fff; cursor: pointer; text-decoration: none;
  font: 600 .78rem/1 var(--f); letter-spacing: .1em; text-transform: uppercase; transition: background-color .2s, color .2s; }
.btn:hover { background: #2c3138; }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn[disabled] { opacity: .5; cursor: progress; }
.link { padding: 0; border: 0; background: none; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.field { display: grid; gap: 8px; }
.field input, .field select { width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid #c9cbce; border-radius: 0; background: var(--paper); font-size: 1rem; }
.field input:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row .field { flex: 1 1 220px; }
.msg { min-height: 1.4em; margin: 12px 0 0; font-size: .9rem; }
.msg.is-error { color: var(--error); }

/* ---------- Anmelden ---------- */
.k-login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.k-login__form { max-width: 440px; padding-top: 6px; }
.k-login__form .btn { width: 100%; margin-top: 12px; }
.k-login__note { margin: 18px 0 0; font-size: .85rem; color: var(--muted); max-width: 44ch; }
.k-sent { max-width: 440px; }
/* Code aus der Mail + automatisch anmelden, wenn der Link auf einem anderen Gerät geöffnet wird */
.k-code > p { margin: 0 0 12px; }
.k-code .field { margin-top: 22px; }
.k-code input[name=code] { font-size: 1.6rem; letter-spacing: .35em; font-variant-numeric: tabular-nums; }
.k-wait { margin: 26px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .9rem; }
.k-wait p { margin: 0 0 8px; }
.k-wait__dot { display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 50%; background: currentColor; vertical-align: .1em; animation: k-pulse 1.6s ease-in-out infinite; }
@keyframes k-pulse { 50% { opacity: .2; } }
.k-match { font-weight: 500; font-variant-numeric: tabular-nums; }
.k-match--big { margin: 4px 0 22px; font-size: 3.4rem; font-weight: 300; line-height: 1; letter-spacing: .04em; }
.k-confirm .btn { width: 100%; }
@media (prefers-reduced-motion: reduce) { .k-wait__dot { animation: none; } }
.k-sent p { margin: 0 0 12px; }

/* ---------- Kollektion ---------- */
.k-bar { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--ink); }
.k-count { font-size: .95rem; color: var(--muted); margin: 10px 0 0; }
.k-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(28px, 3.5vw, 48px) clamp(12px, 1.6vw, 20px); padding-top: clamp(28px, 4vw, 48px); }
.piece { display: grid; gap: 14px; }
.piece__well { position: relative; aspect-ratio: 4 / 5; background: var(--well); display: grid; place-items: center; overflow: hidden; }
.piece__well img { width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; }
.piece__meta { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: end; }
.piece__name { margin: 0; font: 500 .82rem/1.3 var(--f); letter-spacing: .07em; text-transform: uppercase; }
.piece__sub { margin: 0; grid-column: 1; font-size: .85rem; color: var(--muted); }
.piece__no { grid-column: 2; grid-row: 1 / span 2; margin: 0; font: 200 clamp(2.4rem, 3.6vw, 3.2rem)/.85 var(--f); letter-spacing: -.04em; text-align: right; }
.piece__no small { display: block; margin-top: 6px; font: 500 .7rem/1 var(--f); letter-spacing: .08em; color: var(--muted); }

.k-empty { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); padding-top: clamp(32px, 5vw, 64px); }
.k-empty__well { aspect-ratio: 4 / 5; background: var(--well); display: grid; place-items: center; }
.k-empty__well span { font: 200 clamp(5rem, 14vw, 11rem)/1 var(--f); letter-spacing: -.05em; color: #d4d6d9; }
.k-empty h2 { margin: 0 0 12px; font: 400 1.5rem/1.15 var(--f); letter-spacing: -.01em; }

.k-add { margin-top: clamp(48px, 6vw, 80px); padding-top: 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px clamp(28px, 5vw, 80px); }
.k-add h2, .k-acc h2 { margin: 0; font: 500 .82rem/1.3 var(--f); letter-spacing: .07em; text-transform: uppercase; }
.k-add p { margin: 8px 0 0; color: var(--muted); font-size: .9rem; max-width: 40ch; }
.k-add form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.k-add .field { flex: 1 1 240px; }
.k-add input { text-transform: uppercase; letter-spacing: .12em; }

.k-acc { margin-top: clamp(48px, 6vw, 80px); padding-top: 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px clamp(28px, 5vw, 80px); }
.k-acc dl { margin: 0; display: grid; grid-template-columns: 9rem 1fr; gap: 10px 16px; font-size: .92rem; }
.k-acc dt { color: var(--muted); }
.k-acc dd { margin: 0; }
.k-acc__actions { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 22px; font-size: .9rem; }
.k-danger { color: var(--error); }

/* ---------- Scan-Seite ---------- */
.q { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: calc(100svh - 66px); }
.q__well { background: var(--well); display: grid; place-items: center; padding: clamp(24px, 4vw, 64px); }
.q__well img { width: min(100%, 620px); aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; }
.q__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(36px, 6vw, 96px) var(--gutter); max-width: 640px; }
.q__for { margin: 0 0 18px; color: var(--muted); }
.q__name { margin: 0; font: 400 clamp(1.6rem, 3vw, 2.4rem)/1.08 var(--f); letter-spacing: -.015em; }
.q__sub { margin: 10px 0 0; color: var(--muted); }
.q__no { display: flex; align-items: flex-end; gap: 14px; margin: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 44px); padding-top: 18px; border-top: 1px solid var(--ink); }
.q__no-mask { overflow: hidden; }
.q__digits { display: block; font: 200 clamp(6.5rem, 17vw, 14rem)/.8 var(--f); letter-spacing: -.06em; }
.q__of { padding-bottom: 10px; color: var(--muted); }
.q__state { margin: 0 0 18px; max-width: 42ch; }
.q__actions { display: grid; gap: 12px; max-width: 420px; }
.q__actions .btn { width: 100%; }
.q.is-claimed .q__digits { animation: rise 1.1s var(--ease) both; }
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
.q__code { margin-top: 28px; font-size: .8rem; color: var(--muted); letter-spacing: .12em; }
.q-miss { max-width: 560px; }

/* ---------- Fußzeile ---------- */
.k-foot { padding: 24px var(--gutter); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .78rem; color: var(--muted); }
.k-foot a { color: var(--muted); }

@media (max-width: 860px) {
  .k-login, .k-empty, .k-add, .k-acc, .q { grid-template-columns: 1fr; }
  .q { min-height: 0; }
  .q__well img { width: min(78%, 420px); }
  .k-acc dl { grid-template-columns: 7rem 1fr; }
  .k-head nav:first-child { display: none; }
  .k-head__brand { grid-column: 2; }
  .k-head nav:last-child { grid-column: 3; }
  .k-head nav { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { .q.is-claimed .q__digits { animation: none; } }

/* Profil-Icon oben rechts, Kontoangaben in einer eigenen Ansicht */
.k-head .k-head__icon { justify-content: center; width: 44px; margin-right: -10px; color: inherit; }
.k-head .k-head__icon:hover { text-decoration: none; opacity: .65; }
.k-prof { position: fixed; inset: 0 0 0 auto; width: min(440px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 20px var(--gutter) 28px; border: 0; background: var(--paper); color: var(--ink); overflow-y: auto; }
.k-prof::backdrop { background: rgba(21, 24, 28, .4); }
.k-prof__x { display: grid; place-items: center; width: 44px; height: 44px; margin: -6px -10px 8px auto; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.k-prof .k-acc, .k-prof .k-add { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.k-prof .k-acc { margin-top: 0; padding-top: 0; border-top: 0; }
.k-prof .k-acc dl { grid-template-columns: 6rem minmax(0, 1fr); overflow-wrap: anywhere; }
.k-prof .k-add { margin-top: 36px; }
.k-prof .k-logout { width: 100%; margin-top: 20px; }
