/* Fiszkomat: wygląd strony (styl „Pop”). Wszystkie kolory jako zmienne w OKLCH. */

:root {
  --sun: oklch(0.91 0.14 95);
  --sun-deep: oklch(0.86 0.15 88);
  --cream: oklch(0.985 0.014 95);
  --cream-2: oklch(0.955 0.03 95);
  --ink: oklch(0.21 0.02 65);
  --ink-2: oklch(0.37 0.03 70);
  --ink-3: oklch(0.5 0.03 72);
  --ink-line: oklch(0.21 0.02 65 / 0.22);
  --tomato: oklch(0.66 0.2 33);
  --tomato-ink: oklch(0.48 0.17 33);
  --tomato-wash: oklch(0.93 0.05 35);
  --cobalt: oklch(0.52 0.19 262);
  --cobalt-wash: oklch(0.93 0.04 262);
  --mint: oklch(0.84 0.11 162);
  --mint-wash: oklch(0.94 0.05 162);

  --font: "Bricolage Grotesque", ui-rounded, system-ui, sans-serif;
  --hard-xs: 2px 2px 0 var(--ink);
  --hard-sm: 3px 3px 0 var(--ink);
  --hard: 5px 5px 0 var(--ink);
  --hard-lg: 8px 8px 0 var(--ink);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --out: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--sun); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--sun);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; font-variation-settings: "opsz" 48; }
button, input, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
::selection { background: var(--tomato); color: var(--cream); }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: 40px; }

:where(button, summary, a, [role="button"]):focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }

/* ---------- nagłówek */
.top { padding: 22px 0 0; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 25px; letter-spacing: -0.04em; color: var(--ink); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border: 2.5px solid var(--ink); border-radius: 8px; background: var(--tomato); box-shadow: var(--hard-sm); transform: rotate(-6deg); transition: transform 0.4s var(--spring); }
.brand:hover .brand-mark { transform: rotate(8deg) scale(1.06); }
.top-note { border: 2px solid var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 650; font-size: 14px; background: var(--cream); }

/* ---------- hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; padding-top: 46px; padding-bottom: 48px; }
.hero h1 { font-weight: 800; font-size: clamp(46px, 7.2vw, 112px); line-height: 0.9; letter-spacing: -0.055em; font-variation-settings: "opsz" 96; }
.sticker { display: inline-block; background: var(--tomato); color: var(--cream); border: 3px solid var(--ink); border-radius: 0.18em; padding: 0 0.14em 0.05em; margin: 0.06em 0.02em; transform: rotate(-3deg); box-shadow: 6px 6px 0 var(--ink); animation: stick 0.7s 0.15s var(--spring) both; }
@keyframes stick { from { transform: rotate(-14deg) scale(0.6); opacity: 0; } }
.hero-copy p { margin: 28px 0 30px; font-size: 20px; line-height: 1.45; max-width: 40ch; color: var(--ink-2); font-weight: 450; }
.steps-mini { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.steps-mini li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 7px; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); font-weight: 650; }
.steps-mini b { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--ink); color: var(--sun); font-size: 13px; }

/* talia przykładowych fiszek */
.hero-deck { position: relative; height: 410px; }
.hcard {
  position: absolute; left: 50%; top: 50%; width: 340px; height: 232px; margin: -116px 0 0 -170px;
  border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--hard); cursor: pointer; user-select: none;
  transform-style: preserve-3d; transition: transform 0.6s var(--spring), box-shadow 0.2s;
}
.hcard-face, .hcard-back { position: absolute; inset: 0; padding: 22px 24px; border-radius: 17px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.hcard-back { background: var(--ink); color: var(--sun); transform: rotateY(180deg); }
.hcard p { margin: 18px 0 0; font-weight: 750; font-size: 28px; line-height: 1.06; letter-spacing: -0.03em; font-variation-settings: "opsz" 40; }
.hcard-tag { display: inline-block; border: 2px solid var(--ink); border-radius: 999px; padding: 3px 11px; font-weight: 750; font-size: 12.5px; letter-spacing: 0.05em; text-transform: uppercase; background: var(--cream); color: var(--ink); }
.hcard-back .hcard-tag { background: var(--sun); }
.k-blue { background: var(--cobalt); color: var(--cream); }
.k-red { background: var(--tomato); color: var(--ink); }
.k-mint { background: var(--mint); color: var(--ink); }
.hcard[data-pos="0"] { transform: rotate(-2deg); z-index: 3; }
.hcard[data-pos="1"] { transform: translate(36px, -28px) rotate(7deg); z-index: 2; }
.hcard[data-pos="2"] { transform: translate(-42px, -40px) rotate(-11deg); z-index: 1; }
.hcard[data-pos="0"]:not(.is-flipped):hover { transform: rotate(-4deg) translateY(-8px); box-shadow: 8px 10px 0 var(--ink); }
.hcard[data-pos="0"].is-flipped { transform: rotate(-2deg) rotateY(180deg); box-shadow: -5px 5px 0 var(--ink); }
.hero-deck:not(.is-touched) .hcard[data-pos="0"]:not(.is-flipped) { animation: nudge 5s 2.5s var(--out) infinite; }
@keyframes nudge { 0%, 84%, 100% { translate: 0 0; } 88% { translate: 0 -10px; } 92% { translate: 0 0; } 95% { translate: 0 -4px; } }
.hero-hint { position: absolute; right: 4%; bottom: 0; display: flex; gap: 6px; align-items: center; font-weight: 700; font-size: 15px; transform: rotate(-4deg); transition: opacity 0.3s; }
.hero-hint svg { width: 44px; height: 28px; stroke-width: 2.4; }
.hero-deck.is-touched .hero-hint { opacity: 0; }

/* pasek z formatami */
.marquee { background: var(--ink); color: var(--sun); border-block: 3px solid var(--ink); overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; align-items: center; padding: 13px 0; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; animation: marquee 32s linear infinite; }
.marquee-track i { font-style: normal; color: var(--tomato); margin: 0 20px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- panele */
.work { padding-top: 48px; }
.panel { background: var(--cream); border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--hard-lg); padding: 28px 30px 30px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.panel-head h2, .deck-title h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; }
.progress-head h2 { font-size: 24px; font-weight: 800; }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--sun); font-weight: 800; font-size: 19px; flex: none; }
#settings-panel .step-num { background: var(--mint); }
.deck .step-num { background: var(--tomato); }
#export .step-num { background: var(--cobalt); color: var(--cream); }

.builder { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: stretch; }
#material-panel { display: flex; flex-direction: column; }
#tab-files, #tab-text { flex: 1; display: flex; flex-direction: column; }
#tab-files .dropzone { flex: 1; }
#tab-text textarea { flex: 1; min-height: 260px; }

.banner { margin: 0 0 26px; padding: 14px 18px; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--tomato-wash); box-shadow: var(--hard-sm); font-weight: 600; }

.access { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; margin-bottom: 30px; background: var(--mint); }
.access h2 { font-size: 28px; font-weight: 800; }
.access p { margin: 4px 0 0; color: var(--ink-2); font-weight: 500; max-width: 52ch; }
.access-form { display: flex; gap: 10px; }
.access-form input { width: 230px; }

/* ---------- zakładki */
.tabs { align-self: flex-start; display: inline-flex; gap: 3px; padding: 3px; border: 2px solid var(--ink); border-radius: 999px; margin-bottom: 16px; background: var(--cream); }
.tabs button { border: 0; background: transparent; padding: 7px 17px; border-radius: 999px; font-weight: 650; font-size: 15px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--sun); }

/* ---------- strefa wgrywania */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; min-height: 262px; padding: 26px 18px; border: 3px dashed var(--ink); border-radius: 18px; background: var(--sun); cursor: pointer; transition: transform 0.25s var(--spring), background 0.15s; }
.dropzone:hover, .dropzone.is-over { background: var(--sun-deep); transform: rotate(-0.6deg) scale(1.01); }
.dropzone:focus-within { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.dz-tile { display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 14px; border: 3px solid var(--ink); border-radius: 18px; background: var(--cream); box-shadow: 4px 4px 0 var(--ink); transform: rotate(-6deg); transition: transform 0.35s var(--spring); }
.dropzone:hover .dz-tile, .dropzone.is-over .dz-tile { transform: rotate(5deg) scale(1.08); }
.dz-icon { width: 28px; height: 28px; stroke-width: 2.6; }
.dropzone strong { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.dropzone span { color: var(--ink-2); font-weight: 500; }
.dropzone small { color: var(--ink-2); font-weight: 600; font-size: 13px; margin-top: 14px; }

.file-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 9px; border: 2px solid var(--ink); border-radius: 14px; background: var(--cream); animation: pop-in 0.35s var(--spring) both; }
.file-icon { display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 10px; background: var(--tomato); font-size: 10.5px; font-weight: 800; flex: none; }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.file-size { color: var(--ink-3); font-size: 13px; font-weight: 600; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.94) translateY(6px); } }

/* ---------- pola */
textarea, input[type="text"], input[type="search"], input[type="password"], input:not([type]) {
  width: 100%; padding: 11px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream); font-weight: 500; outline: none;
  transition: box-shadow 0.15s, transform 0.15s;
}
textarea { resize: vertical; line-height: 1.5; }
textarea:focus, input:focus { box-shadow: 4px 4px 0 var(--cobalt); transform: translate(-1px, -1px); }
::placeholder { color: var(--ink-3); opacity: 1; }
.hint { color: var(--ink-3); font-size: 13px; font-weight: 550; margin-top: 7px; display: block; }

.field { display: block; margin-bottom: 20px; }
.field .label { display: block; font-weight: 750; font-size: 14.5px; margin-bottom: 8px; }
.field .label em { font-style: normal; color: var(--ink-3); font-weight: 550; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { border: 2px solid var(--ink); background: var(--cream); padding: 8px 16px; border-radius: 999px; font-weight: 650; font-size: 15px; cursor: pointer; white-space: nowrap; transition: transform 0.2s var(--spring), box-shadow 0.15s, background 0.15s, color 0.15s; }
.seg button:hover { transform: translateY(-2px); box-shadow: var(--hard-sm); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--sun); box-shadow: 3px 3px 0 var(--tomato); transform: none; }
.seg.small { gap: 6px; }
.seg.small button { padding: 5px 12px; font-size: 14px; }

.switch { display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 22px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; width: 54px; height: 31px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--cream); flex: none; transition: background 0.15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: transform 0.35s var(--spring); }
.switch input:checked + .switch-ui { background: var(--mint); }
.switch input:checked + .switch-ui::after { transform: translateX(23px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.switch-text strong { display: block; font-weight: 750; }
.switch-text small { color: var(--ink-2); font-size: 14px; font-weight: 450; line-height: 1.4; display: block; margin-top: 2px; }

input[type="radio"], input[type="checkbox"] { accent-color: var(--ink); width: 18px; height: 18px; cursor: pointer; }

/* ---------- przyciski */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 17px; border: 2.5px solid var(--ink); border-radius: 13px;
  background: var(--cream); color: var(--ink); font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: var(--hard-sm);
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: var(--hard-xs); }
.btn.primary { background: var(--tomato); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--cream-2); border-color: var(--ink); transform: none; }
.btn.big { padding: 17px 38px; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; border: 3px solid var(--ink); border-radius: 20px; box-shadow: 7px 7px 0 var(--ink); font-variation-settings: "opsz" 48; }
.btn.big svg { width: 24px; height: 24px; }
.btn.big:hover { transform: translate(-2px, -2px); box-shadow: 9px 9px 0 var(--ink); }
.btn.big:active { transform: translate(5px, 5px); box-shadow: 2px 2px 0 var(--ink); }
.btn.small { padding: 5px 12px; font-size: 14px; border-width: 2px; border-radius: 10px; box-shadow: var(--hard-xs); }
.btn.small:hover { box-shadow: var(--hard-sm); }
.btn.is-busy { pointer-events: none; opacity: 0.85; }
.btn.is-busy::before { content: ""; width: 15px; height: 15px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 2px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.2s var(--spring); }
.icon-btn:hover { border-color: var(--ink); background: var(--cream-2); color: var(--ink); transform: rotate(-6deg); }
.icon-btn.ai:hover { background: var(--mint); }
.icon-btn.danger:hover { background: var(--tomato-wash); color: var(--tomato-ink); }

/* ---------- generowanie */
.generate-bar { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 44px 0 10px; text-align: center; }
.generate-bar .btn.big { min-width: 320px; }
.privacy { margin: 0; color: var(--ink-2); font-size: 14px; font-weight: 500; max-width: 60ch; }
.append-choice { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.append-choice label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; padding: 7px 15px 7px 11px; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); font-weight: 650; font-size: 15px; }
.append-choice label:has(input:checked) { background: var(--ink); color: var(--sun); }
.append-choice label:has(input:checked) input { accent-color: var(--sun); }

/* ---------- postęp */
.progress { margin-top: 30px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.progress-btns { display: flex; gap: 8px; }
.bar { height: 26px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--cream-2); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-right: 2.5px solid var(--ink); background: var(--tomato); transition: width 0.5s var(--out); }
.progress.is-running .bar-fill {
  background-image: repeating-linear-gradient(-45deg, transparent 0 12px, oklch(0.21 0.02 65 / 0.16) 12px 24px);
  background-size: 34px 100%; animation: stripes 0.8s linear infinite;
}
@keyframes stripes { to { background-position: 34px 0; } }
.progress-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; font-size: 14.5px; font-weight: 550; color: var(--ink-2); }
.progress-stats span { padding: 4px 12px; border-radius: 999px; background: var(--cream-2); border: 2px solid var(--ink-line); }
.progress-stats b { color: var(--ink); font-weight: 800; }
.chunk-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 7px; }
.chunk-list li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border: 2px solid var(--ink); border-radius: 999px; font-size: 13.5px; font-weight: 650; background: var(--cream); max-width: 100%; }
.chunk-list li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-line); flex: none; }
.chunk-list li.running { background: var(--sun); }
.chunk-list li.running::before { background: var(--tomato); animation: pulse 0.9s ease-in-out infinite; }
.chunk-list li.done { background: var(--mint-wash); }
.chunk-list li.done::before { background: oklch(0.55 0.12 162); }
.chunk-list li.error { background: var(--tomato-wash); color: var(--tomato-ink); }
.chunk-list li.error::before { background: var(--tomato); }
.chunk-list li.cancelled { opacity: 0.55; }
@keyframes pulse { 50% { transform: scale(0.55); } }

/* ---------- talia */
.deck { margin-top: 56px; }
.deck-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.deck-title { display: flex; align-items: center; gap: 12px; }
.deck-count { margin: 0; color: var(--ink-2); font-size: 14.5px; font-weight: 600; }
.deck-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.deck-tools input[type="search"] { width: 220px; padding: 8px 14px; border-radius: 999px; }
.deck-hint { color: var(--ink-2); font-size: 14.5px; font-weight: 500; margin: 14px 0 20px; }

.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 210px; padding: 6px; border: 2.5px solid var(--ink); border-radius: 16px; background: var(--cream); box-shadow: var(--hard); display: grid; animation: pop-in 0.25s var(--spring) both; }
.menu-list button { text-align: left; border: 0; background: transparent; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-weight: 650; }
.menu-list button:hover { background: var(--sun); }
.menu-list .danger { color: var(--tomato-ink); }
.menu-list .danger:hover { background: var(--tomato-wash); }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.fcard {
  display: flex; flex-direction: column; background: var(--cream); border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: var(--hard);
  transition: transform 0.2s var(--spring), box-shadow 0.2s, opacity 0.2s; animation: deal 0.45s var(--spring) both;
}
.fcard:hover { transform: translate(-2px, -2px) rotate(-0.3deg); box-shadow: 7px 7px 0 var(--ink); }
.card-grid .fcard:nth-child(2n) { animation-delay: 0.05s; }
.card-grid .fcard:nth-child(3n) { animation-delay: 0.1s; }
@keyframes deal { from { opacity: 0; transform: translateY(18px) rotate(2deg) scale(0.97); } }
.fcard.is-off { opacity: 0.5; border-style: dashed; box-shadow: none; }
.fcard.is-off .fcard-body { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.fcard.is-editing { box-shadow: 6px 6px 0 var(--cobalt); transform: none; }
.fcard.is-busy { opacity: 0.6; pointer-events: none; animation: busy 1.1s ease-in-out infinite; }
@keyframes busy { 50% { transform: rotate(-0.6deg); } }
.fcard-head { display: flex; align-items: center; gap: 9px; padding: 12px 12px 0 16px; }
.fcard-head input[type="checkbox"] { margin: 0; }
.badge { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--cobalt); color: var(--cream); }
.badge.cloze { background: var(--tomato); color: var(--ink); }
.fcard-src { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 550; color: var(--ink-3); }
.acts { display: flex; gap: 2px; }
.fcard-body { padding: 12px 18px 16px; overflow-wrap: anywhere; }
.fcard-q { font-weight: 750; font-size: 18px; line-height: 1.3; letter-spacing: -0.015em; }
.fcard-a { margin-top: 12px; padding-top: 12px; border-top: 2px dashed var(--ink-line); color: var(--ink-2); font-weight: 450; }
.fcard-a:empty { display: none; }
.fcard ul, .fcard ol { margin: 4px 0; padding-left: 20px; }
.fcard code { font-size: 0.9em; padding: 1px 6px; border-radius: 6px; background: var(--cream-2); border: 1.5px solid var(--ink-line); }
.fcard .katex { font-size: 1.05em; }
.cloze-mark { background: var(--tomato-wash); color: var(--tomato-ink); font-weight: 800; padding: 0 5px; border-radius: 6px; box-shadow: inset 0 -2px 0 var(--tomato); }
.cloze-mark sup { font-size: 9.5px; font-weight: 800; margin-right: 2px; }
.fcard-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 14px; margin-top: auto; }
.fcard-tags span { font-size: 12px; font-weight: 650; color: var(--ink-2); padding: 1px 9px; border: 1.5px solid var(--ink-line); border-radius: 999px; }

.fcard-edit { padding: 12px 16px 16px; display: grid; gap: 12px; }
.fcard-edit label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 750; }
.fcard-edit textarea { min-height: 72px; font-size: 15px; }
.edit-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.edit-actions .spacer { flex: 1; }

.improve-box { display: flex; gap: 8px; padding: 0 16px 16px; }
.improve-box input { flex: 1; padding: 7px 12px; font-size: 14px; }

.empty { text-align: center; color: var(--ink-2); font-weight: 650; padding: 34px 0; }

/* ---------- eksport */
.export { margin-top: 44px; }
.export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; align-items: start; }
.checks { grid-column: 1 / -1; display: grid; gap: 10px; margin-bottom: 4px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }
.export-actions { margin-top: 20px; }
.howto { margin-top: 24px; border-top: 2px dashed var(--ink-line); padding-top: 16px; color: var(--ink-2); }
.howto summary { cursor: pointer; font-weight: 750; color: var(--ink); }
.howto ol { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; }

/* ---------- stopka i powiadomienia */
.foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 64px; padding-bottom: 36px; color: var(--ink-2); font-size: 13.5px; font-weight: 550; }

.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 10px; z-index: 100; width: min(460px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 2.5px solid var(--ink); border-radius: 16px; background: var(--ink); color: var(--sun); box-shadow: 5px 5px 0 var(--tomato); font-weight: 650; animation: toast-in 0.45s var(--spring) both; }
.toast.error { background: var(--tomato); color: var(--ink); box-shadow: var(--hard); }
.toast span { flex: 1; }
.toast button { border: 0; background: transparent; color: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px) rotate(-2deg) scale(0.95); } }

/* ---------- tablet i telefon */
@media (max-width: 960px) {
  .wrap { padding-inline: 24px; }
  .hero { grid-template-columns: 1fr; padding-top: 30px; gap: 10px; }
  .hero-deck { height: 330px; }
  .builder { grid-template-columns: 1fr; gap: 26px; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .wrap { padding-inline: 16px; }
  .top-note { display: none; }
  .hero { padding-top: 22px; padding-bottom: 34px; }
  .hero-copy p { font-size: 18px; margin: 20px 0 22px; }
  .hero-deck { display: none; }
  .marquee-track { font-size: 18px; padding: 10px 0; }
  .work { padding-top: 32px; }
  .panel { padding: 20px 18px 22px; border-radius: 18px; box-shadow: var(--hard); }
  .panel-head h2, .deck-title h2 { font-size: 26px; }
  .dropzone { min-height: 210px; }
  .export-grid { grid-template-columns: 1fr; }
  .deck-tools { width: 100%; }
  .deck-tools input[type="search"] { flex: 1 1 100%; width: 100%; }
  .generate-bar .btn.big { width: 100%; min-width: 0; font-size: 23px; }
  .access-form, .access-form input { width: 100%; }
  .access-form input { flex: 1; }
  .seg button { white-space: normal; }
  .export-actions .btn.big { width: 100%; }
  .icon-btn { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
