.ev-evening {
  --ev-gold: var(--gold, #e7be78);
  --ev-muted: var(--muted, #b7b4ad);
  --ev-panel: var(--panel, #1c1d1f);
  padding: 1.2rem var(--pad, 1rem) 1rem;
  color: var(--text, #f7f3ea);
  overflow-wrap: break-word;
  hyphens: auto;
  container-type: inline-size;
}
.evening-wrap .ev-evening { padding-inline: 0; padding-top: .65rem; }
.ev-evening h1, .ev-evening .ev-title {
  margin: 0;
  font-family: var(--cinema-title);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.ev-evening h1 { font-size: clamp(2.15rem, 5vw, 3.5rem); }
.ev-evening h2:not(.ev-title) { margin: 0; font-size: 1.5rem; line-height: 1.2; letter-spacing: -.025em; }
.ev-columns { display: grid; gap: 2rem; }
.ev-collection, .ev-lane, .ev-item { min-width: 0; }
.ev-note, .ev-feedback { color: var(--ev-muted); line-height: 1.45; font-size: .94rem; }
.ev-note { margin: .65rem 0 1rem; }
.ev-list-head { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: space-between; }
.ev-list-head + .ev-grid { margin-top: .8rem; }
.ev-undo { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; margin-block:.65rem }
.ev-progress, .ev-keys { color:var(--ev-muted); font-variant-numeric:tabular-nums; margin:.45rem 0 }
.ev-keys { visibility:hidden }
.ev-stage:focus-visible { outline:2px solid var(--ev-gold); outline-offset:2px }
.ev-stage:focus-visible + .ev-keys { visibility:visible }
.ev-lane > [data-ev-key="edit-vote"] { margin-top:.65rem }
.ev-evening button { font-family: inherit; min-height: 44px; min-width: 44px; }
.ev-evening button:focus-visible, .ev-evening a:focus-visible {
  outline: 2px solid var(--ev-gold);
  outline-offset: 2px;
}
.ev-evening .ev-button, .ev-evening .ev-heart {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  border: 0;
  border-radius: .8rem;
  padding: .65rem 1rem;
  background: #2b2a29;
  color: inherit;
  font-family: inherit;
  font-size: .94rem;
  line-height: 1.25;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.ev-evening svg { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ev-evening .ev-surprise { background: transparent; color: var(--ev-gold); padding-inline: .5rem; }
.ev-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 1.15rem;
  background: var(--ev-panel);
}
.ev-face {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: end;
  min-height: clamp(16rem, 43dvh, 28rem);
  padding-top: 4.5rem;
  border-radius: inherit;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
}
.ev-face:active { cursor: grabbing; }
.ev-art {
  z-index: -2;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse farthest-side at 65% 12%, #66503c, transparent), #2d2824;
}
.ev-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.ev-face::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, #121212 0%, #121212e8 15%, #121212ac 33%, transparent 70%);
}
.ev-under { position: absolute; inset: 0; pointer-events: none; transform: scale(.965); }
.ev-caption {
  width: 100%;
  padding: 2.75rem 1.15rem 1.15rem;
  background: linear-gradient(0deg, #121212 2%, #121212e8 65%, transparent);
  pointer-events: none;
}
.ev-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .75rem; margin: 0 0 .2rem; font-size: .85rem; font-variant-numeric: tabular-nums; color: #ede6dc; }
.ev-rating { color: var(--ev-gold); font-weight: 650; }
.ev-title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.ev-evening .ev-detail {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding: .15rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  overflow-wrap: break-word;
  hyphens: auto;
  text-align: start;
  pointer-events: auto;
}
.ev-detail svg { width: 1rem; height: 1rem; color: var(--ev-muted); }
.ev-title-text, .ev-under .ev-title, .ev-original {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-width: 0;
}
.ev-original { margin: .25rem 0 0; color: #d2cbc2; font-size: .89rem; }
.ev-evening .ev-heart {
  position: absolute;
  z-index: 1;
  top: .55rem;
  right: .55rem;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: #181818f5;
  color: #f7f3ea;
  box-shadow: 0 1px 6px #0004;
}
.ev-evening .ev-heart[aria-pressed=true] { color: var(--ev-gold); }
.ev-heart[aria-pressed=true] [data-neat=heart] path { fill:currentColor; }
.ev-stamp {
  position: absolute;
  top: .85rem;
  left: 1rem;
  color: #211b13;
  background: var(--ev-gold);
  padding: .3rem .7rem;
  border-radius: .5rem;
  font-size: .95rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
}
.ev-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: .75rem; }
.ev-evening .ev-vote { min-height: 48px; }
.ev-evening .ev-vote:last-child, .ev-evening .ev-more { color: #211b13; background: var(--ev-gold); }
.ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, max(7.5rem, 18%)), 1fr));
  gap: 1.25rem .75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ev-item { position: relative; }
.ev-item > .ev-heart { left: .35rem; right: auto; top: .35rem; }
.ev-tile > .card, .ev-card-fallback { width: 100%; }
.ev-grid .score { top: auto; bottom: .4rem; font-variant-numeric: tabular-nums; }
.ev-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; margin-top: .65rem; }
.ev-evening .ev-retry { color: var(--ev-gold); }
.ev-evening [aria-disabled=true] { opacity: .65; cursor: progress; }
.ev-sr { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

@container (min-width: 46rem) {
  .ev-columns { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2rem; margin-top: 1rem; align-items: start; }
  .ev-instructions { margin-top: 0; }
  .ev-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); }
}
@media (prefers-reduced-motion: no-preference) {
  .ev-evening button { transition: transform 110ms var(--ease-out); }
  .ev-evening button:active { transform: scale(.97); }
  .ev-burst svg { animation: ev-heart-pop 230ms var(--ease-out); }
  .ev-burst::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    box-shadow: 0 -14px, 12px -7px, 12px 7px, 0 14px, -12px 7px, -12px -7px;
    animation: ev-heart-dots 250ms var(--ease-out) both;
    pointer-events: none;
  }
  @keyframes ev-heart-pop { 0% { transform: scale(.92); } 55% { transform: scale(1.13); } }
  @keyframes ev-heart-dots { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.32); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  /* The card still follows the finger (translate only, set from evening.js). */
  .ev-evening button, .ev-evening button:active { transform: none !important; transition: none; }
}
@media (prefers-contrast: more) {
  .ev-evening .ev-button, .ev-evening .ev-heart { outline: 1px solid currentColor; }
  .ev-caption { background: #121212; }
}
.ev-tabs{margin-block:4px 8px}
.ev-evening .ev-lane{position:relative;max-width:42rem;margin-inline:auto}
.ev-stage>.ev-progress{position:absolute;z-index:2;inset:8px auto auto 8px;margin:0;padding:4px 8px;background:#171719eb;color:white;border-radius:8px;font-size:.75rem;pointer-events:none}
.ev-complete{display:grid;justify-items:start;gap:8px;padding-block:12px}
.ev-complete :is(.ev-note,.ev-feedback){margin:0}
.ev-complete>.ev-button[data-ev-key="edit-vote"]{margin:0;padding-inline:0;background:transparent;color:var(--ev-gold)}
.ev-stage .ev-stamp{top:auto;bottom:5rem}
.ev-stage .ev-face{display:grid;grid-template-rows:minmax(0,1fr) auto;height:clamp(150px,calc(100svh - 385px),440px);min-height:0;padding:0;background:#18191b}
.ev-stage .ev-face::after{display:none}
.ev-stage .ev-art{position:relative;inset:auto;z-index:0;grid-row:1;align-self:stretch;min-height:0;background:#18191b}
.ev-stage .ev-art img{position:relative;object-fit:contain;object-position:center}
.ev-stage .ev-art img.ev-scene{position:absolute;inset:0;object-fit:cover;opacity:.23}
.ev-stage .ev-caption{grid-row:2;padding:6px 14px;background:#18191b;z-index:1}
.ev-stage .ev-heart,.ev-stage .ev-stamp{z-index:2}
.ev-stage .ev-meta{font-size:.76rem}
.ev-stage .ev-title{font-size:clamp(1.15rem,4vw,1.65rem)}
.ev-stage .ev-detail{min-height:36px}
.ev-stage+.ev-keys{display:none}
.ev-stage:focus-visible+.ev-keys{display:block}
.ev-picks{display:grid;gap:8px;margin-block:12px}
@media(max-width:380px){.ev-tabs{display:grid;grid-template-columns:auto auto auto;gap:3px}.ev-tabs .pill{padding:4px;font-size:.71rem}.ev-evening h1{font-size:1.8rem}}
@media(min-width:760px){.ev-stage .ev-face{grid-template:1fr / 45% 55%;align-items:center;height:clamp(245px,43svh,440px)}.ev-stage .ev-art{grid-area:1/1}.ev-stage .ev-caption{grid-area:1/2}}
/* The evening pick shares one backdrop across the picture and its caption. */
.evening-wrap:has(.ev-tabs) { max-width:none }
.ev-evening .ev-lane { max-width:none }
.ev-stage .ev-face {
  background:#191a1c; grid-template: minmax(0,1fr) auto / minmax(0,1fr);
  height:auto; align-items:stretch;
}
.ev-stage .ev-face::before {
  content:""; position:absolute; inset:-22px; z-index:-1; pointer-events:none;
  background:var(--evening-art,none) center / cover no-repeat;
  filter:blur(20px) brightness(.40);
}
.ev-stage .ev-art {
  grid-area:1/1; height:clamp(160px,51vw,340px); background:transparent;
  -webkit-mask-image:linear-gradient(#000 86%,transparent);
  mask-image:linear-gradient(#000 86%,transparent);
}
.ev-stage .ev-caption { grid-area:2/1; padding:12px clamp(16px,3vw,40px) 22px; background:transparent }
.ev-stage .ev-title { font-size:clamp(1.5rem,3vw,2.8rem); line-height:1.08 }
.ev-stage .ev-original { margin-top:4px }
.ev-stage .ev-art.ev-no-art img { width:64px; height:64px; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%) }
.ev-stage .ev-under { height:100% }
@media(min-width:760px){
  .ev-stage .ev-face { grid-template:minmax(0,1fr) / minmax(0,.85fr) minmax(0,1.15fr); align-items:center; min-height:230px }
  .ev-stage .ev-art { grid-area:1/2; height:clamp(230px,31vw,430px); -webkit-mask-image:linear-gradient(90deg,transparent,#000 14%); mask-image:linear-gradient(90deg,transparent,#000 14%) }
  .ev-stage .ev-caption { grid-area:1/1; padding-block:48px }
}
/* Small phones: the three tabs share one row and the picture gets shorter on low screens,
   so «Пропустить / Хочу» stay above the bottom bar without scrolling. */
@media (max-width:380px){
  .ev-evening .ev-tabs.shelf-filters{display:grid;grid-template-columns:repeat(3,minmax(0,auto));justify-content:start;gap:4px}
  .ev-evening .ev-tabs.shelf-filters .pill{min-width:0;padding:4px 6px;font-size:.71rem}
}
@media (max-width:759px) and (max-height:760px){
  .ev-evening .ev-stage .ev-art{height:clamp(96px,calc(100svh - 500px),163px)}
  .ev-evening .ev-stage .ev-caption{padding-bottom:12px}
  .ev-evening .ev-stage .ev-original{-webkit-line-clamp:1;line-clamp:1}
}
