/* The swipe deck — the card is the page. Loaded after app.css on /swipe only. */
.dk { max-width: 1100px; margin: 0 auto; padding: .5rem clamp(1rem, 4vw, 2rem) 1rem; }
.swipe-page main.kits { padding-bottom: 0; }

/* ---------- one line of chrome: the title, when · where · filters, what is left ---------- */
.dk-top { display: flex; align-items: center; gap: .6rem 1rem; margin-bottom: .7rem; }
.dk-h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; flex: 0 0 auto; }
.dk-left-wrap { margin-left: auto; white-space: nowrap; }
.dk-shortlist { flex: 0 0 auto; gap: .3rem; text-decoration: none; color: var(--ink-2); padding: .3rem .7rem; }
.dk-shortlist svg { width: 14px; height: 14px; color: var(--ink-3); }
.dk-shortlist.has { border-color: var(--ink); color: var(--ink); }
.dk-shortlist.has svg { color: var(--ok); }
.dk-shortlist b { min-width: 1ch; text-align: center; }
.dk-shortlist:hover { text-decoration: none; border-color: var(--ink); }
.dk-shortlist.bump { animation: dk-bump .4s var(--ease); }
@keyframes dk-bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); background: var(--ok-soft); } 100% { transform: scale(1); } }
.dk-left-wrap b { color: var(--ink); }
.dk-filters { position: relative; min-width: 0; }
.dk-filters summary { list-style: none; cursor: pointer; }
.dk-filters summary::-webkit-details-marker { display: none; }
.dk-summary { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.dk-summary .chip { white-space: nowrap; }
.dk-summary .chip svg { width: 14px; height: 14px; flex: 0 0 auto; }
.dk-summary .chip.on:hover { background: #333; }
.dk-filters-btn { gap: .3rem; }
.dk-filters[open] .dk-filters-btn { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dk-filters-panel { position: absolute; left: 0; top: calc(100% + .5rem); z-index: 260;   /* above the cards (100 - i) */ width: min(92vw, 520px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .7rem; animation: rise .22s var(--ease); }
.dk-filters-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-display); font-size: 1.05rem; }
.dk-filters-panel label { display: flex; flex-direction: column; gap: .3rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .12em; font-size: .66rem; color: var(--ink-3); font-weight: 700; }
.dk-filters-panel input, .dk-filters-panel select { font: inherit; font-family: var(--font); font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--ink); }
.dk-filters-panel .dk-check { flex-direction: row; align-items: center; gap: .5rem; text-transform: none; letter-spacing: 0; font: 600 .92rem var(--font); color: var(--ink); }
.dk-check input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.dk-filters-foot { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .2rem; }
.dk-filters-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .7rem; }
.dk-window { margin: -.2rem 0 0; }
.dk-window:empty { display: none; }
/* When: four pills made of radios (no JS needed); the lit one is the window */
.dk-seg { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.dk-seg legend { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .12em; font-size: .66rem; color: var(--ink-3); font-weight: 700; margin-bottom: .45rem; padding: 0; float: left; width: 100%; }
.dk-seg label { display: block; position: relative; text-transform: none; letter-spacing: 0; }
.dk-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dk-seg span { display: block; white-space: nowrap; padding: .45rem .85rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font: 600 .86rem var(--font); color: var(--ink); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.dk-seg label:hover span { border-color: var(--ink); }
.dk-seg input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dk-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.dk-later { display: none; flex-direction: column; gap: .5rem; padding: .7rem; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.dk-later.open { display: flex; }
.dk-later-chips .chip { font-size: .8rem; padding: .28rem .65rem; }
.dk-later-chips .chip:hover { text-decoration: none; }
.dk-day input { max-width: 220px; }
.dk-note { max-width: 440px; margin: -.2rem auto .5rem; text-align: center; }
.dk-flash { max-width: 440px; margin: 0 auto .6rem; }
.dk-join { z-index: 300; }
.dk-join-foot { flex-wrap: wrap; }

/* ---------- the stage ---------- */
.dk-stage { display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.dk-deck { position: relative; width: min(100%, 440px); height: min(70vh, 720px); }
.dk-card { position: absolute; inset: 0; border-radius: 26px; overflow: hidden; background: #121212; color: #fff; box-shadow: 0 18px 50px rgba(21, 19, 15, .22);
  transform: translateY(calc(var(--i) * 12px)) scale(calc(1 - var(--i) * .045)); z-index: calc(100 - var(--i)); transition: transform .32s var(--ease), opacity .32s; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.dk-card:nth-child(n+4) { visibility: hidden; }             /* three deep before JS takes over */
.dk-card.dragging { transition: none; cursor: grabbing; }
.dk-card.gone.fly-right { transform: translate(120vw, -40px) rotate(20deg) !important; opacity: 0; }
.dk-card.gone.fly-left { transform: translate(-120vw, -40px) rotate(-20deg) !important; opacity: 0; }
.dk-photo { position: absolute; inset: 0; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 55%, #111) 0%, #121212 100%); display: grid; place-items: center; }
.dk-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; pointer-events: none; }
.dk-initial { font-family: var(--font-display); font-size: 7rem; font-weight: 800; color: #fff; opacity: .85; margin-top: -20%; }
.dk-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 68%; background: linear-gradient(to top, rgba(10, 9, 8, .97) 0%, rgba(10, 9, 8, .8) 38%, rgba(10, 9, 8, .35) 70%, transparent 100%); pointer-events: none; }
.dk-verified { position: absolute; top: .9rem; left: .9rem; z-index: 2; background: rgba(255, 255, 255, .94); color: var(--ink); font: 700 .72rem var(--font); padding: .28rem .6rem; border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.dk-play { position: absolute; top: .8rem; right: .8rem; z-index: 2; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); transition: transform .15s var(--ease), background .15s; }
.dk-play:hover { transform: scale(1.06); }
.dk-play.on { background: var(--accent); color: #fff; }
.dk-play .bi { width: 20px; height: 20px; fill: currentColor; }
.dk-stamp { position: absolute; top: 1.4rem; z-index: 3; padding: .35rem .75rem; border: 3px solid; border-radius: 10px; font: 800 1.2rem var(--font-display); letter-spacing: .12em; opacity: 0; pointer-events: none; }
.dk-stamp.yes { left: 1.1rem; color: #6EE7A0; border-color: #6EE7A0; transform: rotate(-14deg); opacity: var(--yes, 0); }
.dk-stamp.no { right: 1.1rem; color: #FF6B4A; border-color: #FF6B4A; transform: rotate(14deg); opacity: var(--no, 0); }

.dk-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 1.25rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; }
.dk-kicker { margin: 0; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .14em; font-size: .68rem; font-weight: 700; color: #E9873F; }
.dk-info h2 { margin: 0; font-size: clamp(1.9rem, 7vw, 2.5rem); line-height: .98; color: #fff; letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.dk-tag { margin: 0; color: rgba(255, 255, 255, .78); font-size: .95rem; line-height: 1.3; }
.dk-open { margin: .1rem 0 0; font-size: .88rem; color: #fff; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.dk-open b { color: #6EE7A0; font-weight: 700; }
.dk-open .open-dot { background: #6EE7A0; margin-right: .1rem; }
.dk-open.dim { color: rgba(255, 255, 255, .6); }
.dk-genres { display: flex; gap: .35rem; flex-wrap: wrap; }
.dk-genres span { padding: .24rem .62rem; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(6px); font-size: .78rem; font-weight: 600; }
.dk-row { display: flex; align-items: flex-end; justify-content: space-between; gap: .8rem; margin-top: .2rem; }
.dk-stats { margin: 0; display: flex; gap: 1.1rem; flex-wrap: wrap; }
.dk-stats span { display: flex; flex-direction: column; line-height: 1.1; }
.dk-stats b { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: -.01em; }
.dk-stats small { color: rgba(255, 255, 255, .62); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.dk-more { flex: 0 0 auto; background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .4); color: #fff; border-radius: 999px; padding: .32rem .85rem; font: 600 .82rem var(--font); cursor: pointer; }
.dk-more:hover { background: rgba(255, 255, 255, .2); }

.dk-about { position: absolute; inset: 0; z-index: 4; background: rgba(12, 11, 10, .95); backdrop-filter: blur(8px); padding: 1.1rem 1.25rem 1.25rem; overflow: auto; display: flex; flex-direction: column; gap: .7rem; animation: fade .18s ease; touch-action: pan-y; }
.dk-about[hidden] { display: none; }
.dk-about-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-display); font-size: 1.25rem; }
.dk-about-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.dk-about-x .bi { width: 16px; height: 16px; fill: currentColor; }
.dk-about p { margin: 0; color: rgba(255, 255, 255, .86); line-height: 1.5; font-size: .95rem; }
.dk-about ul { margin: 0; padding-left: 1.1rem; color: rgba(255, 255, 255, .8); font-size: .9rem; line-height: 1.5; }
.dk-about-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: auto !important; padding-top: .6rem; }
.dk-about-links a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- actions ---------- */
.dk-actions { display: flex; align-items: center; justify-content: center; gap: .85rem; }
.dk-actions.only-undo form, .dk-actions.only-undo .book { display: none; }
.dk-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); box-shadow: 0 6px 18px rgba(21, 19, 15, .12); display: grid; place-items: center; cursor: pointer; transition: transform .12s var(--ease), box-shadow .12s; padding: 0; }
.dk-btn svg { width: 24px; height: 24px; }
.dk-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(21, 19, 15, .16); }
.dk-btn:active { transform: scale(.92); }
.dk-btn:disabled { opacity: .35; cursor: default; transform: none; box-shadow: none; }
.dk-btn.no { color: var(--danger); width: 64px; height: 64px; }
.dk-btn.yes { color: var(--ok); width: 64px; height: 64px; }
.dk-btn.yes svg { width: 28px; height: 28px; }
.dk-btn.undo, .dk-btn.msg { width: 46px; height: 46px; color: var(--ink-2); }
.dk-btn.undo svg, .dk-btn.msg svg { width: 20px; height: 20px; }
.dk-btn.book { background: var(--accent); color: #fff; width: auto; height: 56px; border-radius: 999px; padding: 0 1.2rem 0 1rem; display: inline-flex; align-items: center; gap: .45rem; font: 700 .95rem var(--font); }
.dk-btn.book:hover { background: #ff3d0d; }
.dk-hint { margin: 0; text-align: center; }
.dk-hint a { font-weight: 600; color: var(--ink); }

/* ---------- empty ---------- */
.dk-empty { text-align: center; padding: 2.6rem 1.2rem; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); max-width: 440px; margin: 1rem auto; }
.dk-empty h2 { font-size: 1.6rem; }
.dk-empty p { color: var(--ink-3); margin-bottom: 1.2rem; }
.dk-empty-actions { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; }
.dk-empty-actions .btn { width: 100%; }
.dk-deck .dk-done { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; margin: 0; max-width: none; }

/* ---------- book sheet ---------- */
.deck-book { z-index: 300; }                             /* above the cards (z-index 100 - i) and the tab bar */
.deck-book .sheet-body textarea { width: 100%; font: inherit; font-size: 1rem; line-height: 1.45; margin-top: .4rem; }
.deck-book-dates { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0 .2rem; max-height: 110px; overflow: auto; }
.deck-book-dates .chip { cursor: pointer; }
#deck-book-dates .chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); opacity: 1; }

/* ---------- phones: the card fills what is left of the screen, the buttons sit right under it ---------- */
@media (max-width: 720px) {
  .dk { padding: .4rem 1rem 0; }
  .dk-top { margin-bottom: .5rem; gap: .5rem; }
  .dk-h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }   /* the chips say it; the card is the page */
  .dk-filters { flex: 1 1 auto; }
  .dk-summary { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .dk-summary::-webkit-scrollbar { display: none; }
  .dk-summary .chip { flex: 0 0 auto; }
  .dk-filters-word { display: none; }
  .dk-shortlist-word { display: none; }
  .dk-shortlist { padding: .3rem .55rem; }
  .dk-left-wrap { display: none; }                          /* the Shortlist chip is the one number that matters on a phone */
  .dk-filters-btn { padding-left: .55rem; padding-right: .55rem; }
  .swipe-page .footer > span, .swipe-page .footer > nav:not(.tabbar) { display: none; }   /* the deck owns the screen; the tab bar stays */
  .swipe-page .footer { padding: 0; margin: 0; height: 0; }
  .dk-filters { position: static; }
  .dk-seg span { font-size: .84rem; padding: .45rem .75rem; }
  .dk-filters-grid { grid-template-columns: 1fr 1fr; }
  .dk-filters-panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: var(--radius) var(--radius) 0 0; padding-bottom: calc(1.1rem + env(safe-area-inset-bottom)); max-height: 86dvh; overflow: auto; z-index: 320; box-shadow: 0 -12px 40px rgba(21, 19, 15, .25); }
  .dk-filters[open]::before { content: ""; position: fixed; inset: 0; background: rgba(21, 19, 15, .5); z-index: 310; }
  .dk-stage { gap: .7rem; }
  .dk-deck { width: 100%; height: var(--dk-h, calc(100dvh - 268px - env(safe-area-inset-bottom))); min-height: 360px; }
  .dk-card { border-radius: 22px; }
  .dk-info { padding: 0 1.05rem 1rem; gap: .32rem; }
  .dk-info h2 { font-size: clamp(1.7rem, 8.5vw, 2.3rem); }
  .dk-tag { font-size: .9rem; }
  .dk-stats b { font-size: 1.1rem; }
  .dk-actions { gap: .6rem; }
  .dk-btn { width: 52px; height: 52px; }
  .dk-btn.no, .dk-btn.yes { width: 58px; height: 58px; }
  .dk-btn.undo, .dk-btn.msg { width: 42px; height: 42px; }
  .dk-btn.book { height: 52px; padding: 0 1rem 0 .85rem; }
  .dk-hint { display: none; }
}
@media (max-height: 640px) and (max-width: 720px) {
  .dk-tag, .dk-genres { display: none; }
}
@media (prefers-reduced-motion: reduce) { .dk-card { transition: none; } }

/* swiping for one of the promoter's nights */
.dk-night { margin: 0 0 .6rem; color: var(--ink-2); }
.dk-night b { color: var(--ink); }
.dk-night a { color: var(--accent); }
