:root{
  color-scheme:dark;
  --bg:#15171c;
  --fg:#e6e8eb;
  --fg-dim:#a0a6b0;
  --line:#2b2f36;
  --surface:#1d2027;
  --surface-hi:#262a33;
  --accent:#6fb7ff;
  --top3-num:#5fd98a;
}

body{
  font-family:Arial,sans-serif;max-width:900px;margin:20px auto;padding:0 15px;
  background:var(--bg);color:var(--fg)
}
.top{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:10px}
.rank{padding:8px;border-bottom:1px solid var(--line);display:block}
a,button{cursor:pointer}
a{color:var(--accent)}

input{
  padding:6px;font-size:14px;
  background:var(--surface);color:var(--fg);
  border:1px solid var(--line);border-radius:4px
}
input:focus{outline:none;border-color:var(--accent)}
/* Looks like a text input. 16px from the start: a description is typed on a
   phone, and anything smaller makes iOS zoom in on focus. */
textarea{
  padding:8px;font-size:16px;font-family:inherit;line-height:1.4;
  background:var(--surface);color:var(--fg);
  border:1px solid var(--line);border-radius:4px
}
textarea:focus{outline:none;border-color:var(--accent)}

button{
  padding:6px 12px;
  background:var(--surface-hi);color:var(--fg);
  border:1px solid var(--line);border-radius:4px
}
button:hover{background:var(--line)}

/* Headings and nav are left-aligned; only the DE/EN/Admin controls stay right. */
.site-title{font-size:2.4em;margin:10px 0 4px;text-align:left}
.main-nav{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:10px;margin:12px 0}

/* Page title and the DE/EN/Admin controls in one row. */
.pagehead{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:8px}
.pagehead .site-title{margin:6px 0 4px}
#lang{display:flex;gap:6px;flex-wrap:wrap}
/* The DE/EN/Admin and the page-specific action buttons stay visually compact --
   small type, tight padding -- so the header row does not turn into a wall of
   chrome. On a phone they still have to be hit with a thumb, so the mobile block
   gives them the full 44px of height without making them any wider or louder. */
#lang button{padding:6px 9px;font-size:13px}
.nav-right button{font-size:13px;padding:8px 10px}

/* ☰ page menu: a dropdown of the pages, so the nav row stays short. */
.menu-wrap{position:relative}
.menu-btn{font-size:1.3em;line-height:1;padding:5px 12px}
.menu-panel{position:absolute;top:100%;left:0;margin-top:5px;min-width:170px;z-index:15;
  display:none;flex-direction:column;overflow:hidden;
  background:var(--surface);border:1px solid var(--line);border-radius:6px;box-shadow:0 6px 18px rgba(0,0,0,.4)}
.menu-panel.open{display:flex}
.menu-item{padding:11px 14px;color:var(--fg);text-decoration:none;border-bottom:1px solid var(--line)}
.menu-item:last-child{border-bottom:none}
.menu-item:hover{background:var(--surface-hi)}
.menu-on{color:var(--accent);font-weight:bold}

/* Small "report bug" button at the end of the page, in the flow.
   It used to float above the bottom right corner -- and on every page with a
   calendar that corner is the column of tappable days, so the button swallowed
   taps meant for a date. Nothing that overlays a scrolling page can avoid that. */
.bug-btn{display:block;margin:28px 0 4px auto;font-size:.8em;padding:6px 11px;
  border-radius:20px;background:var(--surface-hi);border:1px solid var(--line);opacity:.8}
.bug-btn:hover{opacity:1;border-color:var(--accent)}

/* Text button linking to the YouTube trailer search. Darker than the movie box
   it sits in, so it stays readable as a button. */
.trailer-btn{
  display:inline-block;margin-left:10px;
  padding:2px 10px;border-radius:6px;
  border:1px solid var(--line);background:var(--bg);
  color:var(--accent);text-decoration:none;
  font-size:.8em;line-height:1.6;vertical-align:middle;white-space:nowrap
}
.trailer-btn:hover{background:var(--surface)}

.votes-count{font-weight:bold;margin-left:12px}

/* --- movie rows with cover ------------------------------------------------ */
/* Same surface, border and rounding as a button. */
.movie-row{
  display:flex;align-items:flex-start;gap:12px;padding:10px 12px;margin-bottom:8px;
  background:var(--surface-hi);border:1px solid var(--line);border-radius:6px
}
.movie-row input[type=checkbox]{margin-top:22px;flex:none;width:16px;height:16px}

.poster{width:46px;height:69px;flex:none;border-radius:4px;object-fit:cover;background:var(--surface)}
.poster-empty{display:flex;align-items:center;justify-content:center;font-size:20px;color:var(--fg-dim)}
.poster-lg{width:92px;height:138px}

/* --- picture of an evening or a motto (KaraokeNight) ------------------------
   Not a poster: this is a picture somebody uploaded, shown in a square box. The
   file itself is stored untouched (see readImageFile -- re-encoding it in a
   canvas is what produced striped garbage on one machine), so the squaring is
   done *here*: `cover` fills the box from the middle of the picture and crops
   what does not fit, never two grey bars or a stamp in the corner. */
.event-img{display:block;max-width:100%;max-height:120px;height:auto;flex:none;
  border-radius:6px;background:var(--surface);object-fit:cover}
/* On a tile it gets the *whole* footprint of a poster, not a poster's width:
   a fixed width left a 64x64 stamp in a 96px-tall row. */
.tile-img{width:96px;height:96px;max-height:96px}
/* Next to a motto in a list, where a film would have its cover. */
.motto-img{width:64px;height:64px;max-height:64px}
/* Preview of a picture being attached: big enough to judge the crop, small
   enough that the calendar below it stays in reach. */
.event-img-md{width:100%;max-width:140px;max-height:none;aspect-ratio:1/1}
.event-img-md.event-img-empty{width:140px;height:140px;font-size:44px}
/* On the event page the picture *is* the content of the evening -- show it. */
.event-img-lg{width:100%;max-width:300px;max-height:none;aspect-ratio:1/1}
.event-img-empty{display:flex;align-items:center;justify-content:center;
  width:64px;height:64px;font-size:22px;color:var(--fg-dim)}
.event-img-lg.event-img-empty{width:120px;height:120px;font-size:44px}

/* --- ranking rows (day view) ------------------------------------------------
   No place number on the left: the list is sorted, so the place can be read off
   the vote count on the right, and the top three carry that count in green.
   The freed space goes to the cover, which is bigger here than in a list.

   The cover keeps its own 2:3 and stays at the top: letting it stretch to the
   row's height (align-self:stretch) meant every voter added to the line below
   made the cover taller and object-fit cropped its sides away -- the same film
   looked different on every evening. */
.rank-row .poster{
  align-self:flex-start;
  width:80px;height:120px;
}
.rank-row .votes-count{align-self:center;font-size:1.4em}

.movie-info{flex:1;min-width:0}
.movie-head{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.movie-title{font-weight:bold}
.movie-year{font-weight:normal;color:var(--fg-dim)}

/* Fills the space next to the cover: three lines, a click opens the full text. */
.overview{
  margin-top:3px;color:var(--fg-dim);font-size:.85em;line-height:1.45;cursor:pointer;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden
}
.overview.open{-webkit-line-clamp:unset;overflow:visible}

/* Movies that cannot be watched right now: listed below the ballot, not votable. */
.pending-head{display:flex;justify-content:space-between;align-items:center;gap:12px;
  margin:26px 0 10px;color:var(--fg-dim);border-top:1px solid var(--line);padding-top:16px}
.movie-row.pending{opacity:.6}
.movie-row.pending:hover{opacity:1}
.rent-btn{flex:none;margin-top:8px}
/* Which service carries an unavailable film -- the one actionable fact about it. */
.runs-on{margin-top:5px;font-size:.85em;color:var(--fg-dim)}
.runs-on b{color:var(--accent);font-weight:600}

.badge{font-size:.72em;padding:2px 7px;border-radius:10px;background:var(--bg);color:var(--fg-dim);white-space:nowrap}
.badge-streaming{background:#1c3a26;color:#8fe0a8}
.badge-free{background:#1c3a3a;color:#8fdede}
.badge-rent{background:#3a3320;color:#e8c887}
.badge-buy{background:#3a2a20;color:#e8b087}
.badge-dvd{background:#25304a;color:#9dbcf0}
.badge-lang{background:#2c2440;color:#c3b0f0;cursor:help}
.badge-sub{background:#22262e;color:#9aa3b2;cursor:help}

/* --- rental options, one row per provider --------------------------------- */
.rent-list{display:flex;flex-direction:column;gap:6px;margin:8px 0}
.rent-option{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:8px 10px}
/* The option picked on the add-movie page -- a choice, not yet a save. */
.opt-pick.nav-on{box-shadow:0 0 0 2px var(--accent);background:var(--surface-hi)}
.rent-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.rent-tag{flex:none;font-weight:bold;color:#e8c887}
.rent-langs{flex:none;display:flex;gap:4px}

/* --- modal: rent confirmation and subscription offer ---------------------- */
.modal{position:fixed;inset:0;background:rgba(0,0,0,.6);display:flex;align-items:center;
  justify-content:center;padding:16px;z-index:10}
.modal-box{background:var(--surface);border:1px solid var(--line);border-radius:8px;
  padding:18px;max-width:520px;width:100%;max-height:85vh;overflow-y:auto}
.modal-box h3{margin:0 0 10px}
.modal-box input{width:100%;box-sizing:border-box;margin-top:6px}
.rent-price{font-size:1.2em;font-weight:bold;color:#e8c887;margin:6px 0}
.offered-by{color:var(--top3-num);font-size:.85em;margin-left:4px}

/* --- add movie ------------------------------------------------------------ */
.result{display:flex;gap:12px;align-items:flex-start;padding:10px 12px;margin-bottom:8px;cursor:pointer;
  background:var(--surface-hi);border:1px solid var(--line);border-radius:6px}
.result:hover{border-color:var(--accent)}
.chosen{display:flex;gap:14px;align-items:flex-start;padding:12px;margin-bottom:14px;
  background:var(--surface-hi);border:1px solid var(--line);border-radius:6px}

.msg-ok{color:#8fe0a8}
.msg-warn{color:#e8c887}
.msg-err{color:#f09b9b}
.options{display:flex;flex-direction:column;gap:8px;align-items:flex-start;margin-top:12px}
.hint{color:var(--fg-dim);font-size:.9em}

/* --- admin provider picker ------------------------------------------------ */
.provider-grid{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;max-height:260px;overflow-y:auto;
  padding:10px;border:1px solid var(--line);border-radius:6px;background:var(--surface)}
.provider{display:flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid var(--line);
  border-radius:6px;cursor:pointer;font-size:.85em;background:var(--bg)}
.provider img{width:22px;height:22px;border-radius:4px}
.provider.on{border-color:var(--top3-num);background:#1c3a26}

/* Enabled services, each removable on its own. */
.active-services{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.active-services .provider{cursor:default}
.provider .x{padding:0 5px;margin-left:4px;line-height:1.4;font-size:.9em;
  background:transparent;border:none;color:var(--fg-dim)}
.provider .x:hover{color:#f09b9b;background:transparent}

/* --- admin health panel --------------------------------------------------- */
.health-row{display:flex;align-items:center;gap:8px;padding:5px 0;flex-wrap:wrap}
.health-name{font-weight:bold;min-width:9em}
.health-detail{color:var(--fg-dim);font-size:.9em}
.health-when{margin-top:6px;color:var(--fg-dim);font-size:.85em}
.health-stats{margin-top:8px;padding-top:8px;border-top:1px solid var(--line);
  color:var(--fg-dim);font-size:.85em}
.dot{width:9px;height:9px;border-radius:50%;flex:none}
.dot-ok{background:var(--top3-num)}
.dot-bad{background:#f09b9b}
button.mini{padding:1px 7px;font-size:.75em;margin-left:6px}

/* --- admin: who committed money to which film ----------------------------- */
.commit-list{display:flex;flex-direction:column;gap:4px;margin:8px 0}
.commit-row{display:flex;align-items:center;gap:10px;padding:6px 10px;
  background:var(--surface);border:1px solid var(--line);border-radius:6px}
.commit-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.commit-provider{flex:none;color:var(--fg-dim);font-size:.85em}
.commit-payer{flex:none;font-weight:bold;min-width:6em;text-align:right}
.commit-price{flex:none;font-weight:bold;color:#e8c887;min-width:5.5em;text-align:right}
.commit-total{background:transparent;border:none;border-top:1px solid var(--line);
  border-radius:0;padding-top:8px}

/* --- calendar tiles (start page) -------------------------------------------
   A ranking row cut into thirds: three tiles next to each other on a desktop,
   one per row on a phone. A tile only exists for a day somebody entered. */
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px;margin-bottom:20px}
.tile{display:flex;flex-direction:column;gap:8px;padding:12px;color:var(--fg);text-decoration:none;
  background:var(--surface-hi);border:1px solid var(--line);border-left-width:4px;border-radius:6px}
.tile:hover{border-color:var(--accent)}
/* Highlighted when the calendar overview jumps here. */
.tile-focus{box-shadow:0 0 0 2px var(--accent)}

/* Overview legend: a coloured dot per format. */
.cal-legend{display:flex;flex-wrap:wrap;gap:14px;margin:0 0 14px}
.legend-item{display:flex;align-items:center;gap:6px;font-size:.9em;color:var(--fg-dim)}
.legend-dot{width:12px;height:12px;border-radius:3px;display:inline-block}
.tile-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
/* The format name is written the way the page headings write it (HasselKino,
   SerienEvening) -- no uppercasing, that turned the tiles into HASSELKINO. */
.tile-kind{font-size:.78em;color:var(--fg-dim)}
.tile-date{font-weight:bold}
/* "14:00 · Sa 19/09" stays on one line -- a time wrapped away from its date
   reads like a second piece of information. */
.tile-date{white-space:nowrap}
/* An idea tile has no picture, so its description fills that space -- clipped
   to three lines to keep the tiles one size, like the ranking lists. */
.tile-desc{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.tile-body{display:flex;gap:10px;align-items:flex-start;min-height:96px}
.tile-poster{width:64px;height:96px;flex:none}
/* As many ranking rows as fit beside the poster; the rest is clipped so every
   tile keeps the same height. */
.tile-top3{list-style:none;margin:0;padding:0;flex:1;min-width:0;display:flex;flex-direction:column;
  gap:4px;max-height:96px;overflow:hidden}
.tile-top3 li{display:flex;gap:8px;align-items:baseline;font-size:.85em}
.t3-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.t3-votes{flex:none;font-weight:bold;color:var(--fg-dim)}
/* Nothing on the ballot yet -- said in words, next to the placeholder cover, so
   the tile does not read as one that failed to load. */
.tile-empty{flex:1;min-width:0;margin:0;align-self:center;color:var(--fg-dim);font-size:.85em}
.tile-lines{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;font-size:.85em}
.tile-series{font-weight:bold}
.tile-line{color:var(--fg-dim)}
.tile-foot{display:flex;align-items:baseline;gap:6px;border-top:1px solid var(--line);padding-top:8px}

/* The attendance number: grey while the evening is short of people, green once
   it will happen. Same green as the top-3 vote counts -- it means the same. */
.going{font-size:1.5em;font-weight:bold;color:var(--fg-dim)}
.going-ok{color:var(--top3-num)}
.going-label{font-size:.8em;color:var(--fg-dim)}

/* Who voted for what -- a signed vote is more binding than an anonymous one. */
.voters{margin-top:4px;font-size:.85em;color:var(--fg-dim)}
.guests-tag{color:var(--accent);font-weight:600}

/* --- nav: the active format is highlighted -------------------------------- */
.nav-on{border-color:var(--accent);color:var(--accent)}

/* Weekday switches in the admin format panel. Wrapping row with gap, so the
   seven buttons stay reachable on a narrow phone. */
.wd-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.wd-toggle{min-width:44px;padding:8px 6px;font-size:13px;text-align:center}

/* Picture management of an evening (admin). Gap, not margin: every row here
   wraps on a phone, where a margin would turn into an indent. */
.img-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:6px}
.img-row input[type=file]{font-size:14px;max-width:100%}
.img-list{display:flex;flex-wrap:wrap;gap:12px;margin-top:10px}
.img-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;font-size:.85em}
/* Action bar over the admin calendar: what happens to the ticked days. Wraps on
   a phone, and the destructive action is the only coloured one. */
.cal-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0}
.cal-bar button:disabled{opacity:.45;cursor:default}
/* Picking days runs over six month grids. The bar belongs to that calendar, so it
   stays at the top edge while they scroll past -- otherwise the number of days
   picked, and the button that confirms them, are half a page away. It carries its
   own surface: it sits on the page on one screen and inside a panel on another. */
.cal-bar.sticky{position:sticky;top:0;z-index:10;padding:8px 10px;
  background:var(--surface-hi);border:1px solid var(--line);border-radius:6px}
.cal-danger:not(:disabled){border-color:#f09b9b;color:#f09b9b}
/* Page buttons left, an action button (Film hinzufügen / New date) pushed right. */
.nav-row{align-items:center}
.nav-right{margin-left:auto}

/* --- real month calendar (date picker, admin) ----------------------------- */
.cal-months{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:18px}
.cal-month{min-width:0}
.cal-title{font-weight:bold;margin:0 0 6px;text-transform:capitalize}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.cal-wd{text-align:center;font-size:.7em;color:var(--fg-dim);padding-bottom:2px}
.cal-empty{aspect-ratio:1}
.cal-day{aspect-ratio:1;display:flex;align-items:center;justify-content:center;
  border-radius:5px;font-size:.9em;padding:0}
/* Days you can pick: buttons. Everything else is dim and inert. */
.cal-day.dim{color:var(--line);background:transparent;border:1px solid transparent}
.cal-day.pick{background:var(--surface-hi);color:var(--fg);border:1px solid var(--line);cursor:pointer}
.cal-day.pick:hover{border-color:var(--accent)}
.cal-day.blocked{background:#3a2020;color:#f09b9b;border-color:#5a2a2a}

/* A ticked day: filled in the accent colour, dark bold number, a ring around it.
   Two reasons it stands *here*, last of the day states: `.cal-day.pick` has the
   same specificity, so whichever comes later wins -- with the rule further up the
   selection kept the ordinary background and was practically invisible. And the
   event colours of a day are inline styles, which no rule can beat; they are
   taken off the cell while it is ticked (markDay in app.js). */
.cal-day.cal-sel,
.cal-day.pick.cal-sel{background:var(--accent);color:#10131a;font-weight:bold;
  border-color:var(--fg);box-shadow:0 0 0 2px rgba(111,183,255,.35)}
.cal-day.pick.cal-sel:hover{background:#8ac6ff}

/* --- single event page ----------------------------------------------------- */
.event-head{margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid var(--line)}
/* The format name is the big heading; the date sits one size smaller under it. */
.event-format{margin:0;font-size:1.7em}
/* Heading left, "Share" right; under a long name the button wraps below it. */
.event-title-row{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px}
.share-btn{flex:none}
/* 16px: a smaller field makes iOS zoom in when it is tapped. */
.modal-box input.share-url{font-size:16px;margin:0}
.event-date{font-size:1.3em;font-weight:bold;color:var(--fg-dim);margin:2px 0 10px}
/* The start time sits right under the date it belongs to. */
.event-time{font-size:1.1em;font-weight:bold;color:var(--fg-dim);margin:-6px 0 10px}
/* One idea: its title and, in full, what it is about -- line breaks kept. */
.idea-body{margin-bottom:14px}
.idea-title{margin:0 0 6px}
.idea-desc{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
.event-going{display:flex;align-items:baseline;gap:8px}
.event-actions{justify-content:flex-start;margin:0 0 16px}

/* The vote / sign-up panel at the bottom of an event. */
.vote-panel{margin-top:20px;padding:14px;background:var(--surface);
  border:1px solid var(--line);border-radius:8px}
.vote-panel h3{margin:0 0 10px}
.vote-panel input:not(.guests-num){width:100%;box-sizing:border-box}
.vote-panel textarea{width:100%;box-sizing:border-box;margin:8px 0;resize:vertical}
/* An optional field with its label above it (time, threshold). */
.field-label{display:block;margin:8px 0}
.field-label .going-label{display:block;margin-bottom:4px}
.mode-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0}
#mode{flex:1;min-width:12em;padding:8px;border-radius:4px;
  background:var(--surface-hi);color:var(--fg);border:1px solid var(--line)}
.film-pick{margin-top:22px;flex:none;width:18px;height:18px}

/* Guest count with its label, so "+2" is never a bare number. */
.guests-field{display:inline-flex;align-items:center;gap:6px;color:var(--fg-dim);
  font-size:.9em;white-space:nowrap;cursor:help}
.guests-input{display:inline-flex;align-items:center;gap:1px}
.guests-num{width:3.4em;padding:4px;text-align:center}

/* (The list with one row per date is gone -- days are picked in the calendar
   above. Its rules went with it; the picker's own bar is .cal-bar.) */

/* --- a name that is already taken ------------------------------------------
   Nobody's answer gets overwritten without asking: "yes" moves the name to
   this browser, "no" hands it back for editing. The input only appears where
   the page's own name field is off screen (add-movie's hidden step 1). */
.name-taken{margin:10px 0;padding:10px 12px;background:var(--surface);
  border:1px solid var(--line);border-radius:6px}
.name-fix{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.name-fix input{flex:1;min-width:8em;margin-bottom:0}

/* ==========================================================================
   Phone layout. Most people open this on a phone, so the multi-column rows
   (rent options, commitments, admin movie rows) have to reflow instead of
   being squeezed into unreadable slivers.
   ========================================================================== */
@media (max-width: 640px){
  body{margin:12px auto;padding:0 12px}
  .site-title{font-size:1.9em}
  h2{font-size:1.35em}
  h3{font-size:1.1em}

  /* Fingers are not mouse pointers: every button is at least 44px tall -- the
     size a thumb hits reliably -- and input text is 16px so iOS does not zoom
     the page on focus. The height comes from min-height rather than from more
     padding, so a button with a long label still wraps inside its own box
     instead of growing taller than the row around it. */
  button{padding:10px 14px;font-size:15px;min-height:44px}
  button.mini{padding:5px 10px;font-size:.8em;margin-left:0;min-height:36px}
  input:not([type=checkbox]):not([type=radio]){
    padding:10px;font-size:16px;width:100%;box-sizing:border-box;margin-bottom:8px
  }
  .main-nav{gap:8px}

  /* Title smaller so it fits the row with DE/EN/Admin (their size is set in the
     base rules and already compact). */
  .pagehead .site-title{font-size:1.5em}

  /* The ☰ menu stays left; the page-specific action buttons drop to their own
     row, left-aligned. */
  .nav-row{flex-wrap:wrap}
  .nav-right{margin-left:0;flex-basis:100%;display:flex;justify-content:flex-start;
    gap:8px;flex-wrap:wrap;margin-top:6px}

  /* Small type, thumb-sized target: the compact buttons keep their font and
     padding and only gain height, so the header stays quiet but stays tappable. */
  #lang button,.nav-right button,.menu-btn,.bug-btn,.share-btn{min-height:44px}
  .bug-btn{font-size:.75em;padding:5px 14px}

  /* --- movie rows ---
     On a phone the head gets its own line per purpose: title, then trailer and
     languages, then the description. Cramming them into one wrapping line left
     the second line indented, because the trailer button's left margin turns
     into an indent the moment it starts a line. */
  .movie-row{gap:10px;padding:10px;flex-wrap:wrap}
  .movie-row input[type=checkbox]{width:22px;height:22px;margin-top:20px}
  .poster{width:54px;height:81px}
  .movie-info{flex:1 1 55%}

  /* Same 2:3 cover, just narrower -- on a phone the title needs the width more
     than the poster does. */
  .rank-row .poster{width:68px;height:102px}
  .rank-row .votes-count{font-size:1.25em}

  .movie-head{gap:6px 8px}
  .movie-title{flex:1 1 100%;line-height:1.3}   /* title alone on the first line */
  .trailer-btn{margin-left:0}                   /* no indent when it starts a line */
  .votes-count{margin-left:auto}
  /* Action buttons (Leihen/Kaufen, Löschen) go full width below the film
     instead of being wedged beside it and squeezing the title to nothing. */
  .movie-row > button{flex:1 1 100%;margin-top:10px}

  /* --- rent / buy options: name on its own line, price and languages below --- */
  .rent-option{flex-wrap:wrap;gap:6px;padding:10px}
  .rent-name{flex:1 1 100%;white-space:normal;overflow:visible;font-weight:bold}
  .rent-tag{flex:0 0 auto}
  .rent-langs{margin-left:auto;flex-wrap:wrap;justify-content:flex-end}

  /* --- admin: commitments --- */
  .commit-row{flex-wrap:wrap;gap:4px 8px;padding:8px 10px}
  .commit-title{flex:1 1 100%;white-space:normal}
  .commit-provider{flex:1 1 auto}
  .commit-payer{min-width:0;text-align:left}
  .commit-price{min-width:0;margin-left:auto}
  .commit-total .commit-title{flex:1 1 auto}

  /* --- admin: health --- */
  .health-row{gap:6px}
  .health-name{min-width:0;flex:0 0 auto}
  .health-detail{flex:1 1 100%;margin-left:17px}
  .health-when{margin-left:0}

  /* --- admin: provider picker --- */
  .provider-grid{max-height:220px;padding:8px;gap:6px}
  .provider{font-size:.8em;padding:6px 8px}
  .active-services{gap:6px}

  /* --- add movie --- */
  .result{padding:10px}
  .chosen{padding:10px;gap:10px}
  .poster-lg{width:72px;height:108px}
  .options{gap:10px}
  .options button{width:100%}

  /* --- modal --- */
  .modal{padding:10px;align-items:flex-start}
  .modal-box{padding:14px;max-height:92vh;margin-top:10px}
  .modal-box h3{font-size:1.1em}

  .pending-head{flex-wrap:wrap;gap:8px}
  .pending-head button{flex:1 1 100%}

  /* --- calendar: one tile per row --- */
  .tiles{grid-template-columns:1fr;gap:10px}
  .tile-poster{width:58px;height:87px}
  .tile-img{width:87px;height:87px;max-height:87px}
  .motto-img{width:56px;height:56px;max-height:56px}
  .tile-body{min-height:0}

  /* --- single event: film checkbox and vote panel --- */
  .film-pick{width:22px;height:22px;margin-top:20px}
  .event-head h1{font-size:1.3em}
  #mode{flex:1 1 100%;font-size:16px;padding:10px}
  .guests-num{font-size:16px;margin-bottom:0;width:3.8em}
  .vote-panel .options button{width:100%}
}

/* Very narrow phones (iPhone SE and friends). */
@media (max-width: 380px){
  .poster{width:46px;height:69px}
  .movie-head{gap:5px 6px}
  .badge{font-size:.68em;padding:2px 5px}
}

/* --- own film list, list import, invitations (2026-11) -------------------- */
.auto-row{display:flex;gap:8px;align-items:flex-start;margin:6px 0}
.auto-row input{margin-top:3px;flex:none;width:18px;height:18px}

/* A film of the own list: the star right of the title, actions below it. A bare
   icon, no box -- the tap area comes from padding, not from a frame. */
.star-btn{flex:none;font-size:22px;line-height:1;padding:4px 6px;color:var(--fg-dim);
  background:none;border:none}
.star-btn:hover{background:none;color:var(--fg)}
/* Title and star on one line: a long title wraps inside its own box instead of
   pushing the star onto the next line. */
.my-film .movie-head{flex-wrap:nowrap}
.my-film .movie-title{flex:0 1 auto;min-width:0}
.star-btn.on{color:#fff}   /* filled and white: set; outlined and dim: not set */
.my-film-status{margin:4px 0}
.my-film-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.badge-seen{background:#2a2a2a;color:#c9c9c9}

/* List import: one block per pasted line. */
.list-item{padding:10px 12px;margin-bottom:8px;background:var(--surface-hi);
  border:1px solid var(--line);border-radius:6px}
.list-item p{margin:0 0 8px}
.list-ok{display:flex;gap:12px;align-items:flex-start}
.list-retry{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.list-retry input{flex:1 1 12em;min-width:0}
.cand-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-bottom:8px}
.cand{display:flex;gap:8px;align-items:flex-start;text-align:left;padding:6px}
.cand-title{font-size:.9em}
#listText{width:100%;box-sizing:border-box;font-size:16px}

/* The groups of a ballot: this evening, own list, already suggested, seen. */
.list-head{margin:16px 0 8px;color:var(--fg-dim);font-weight:normal;text-transform:uppercase;
  letter-spacing:.04em;font-size:.85em}
.event-sub{color:var(--fg-dim);margin:0 0 6px}
.same-day-box{margin-top:14px}
.same-day{display:inline-block;margin:4px 6px 0 0;padding:6px 10px;border:1px solid var(--line);
  border-radius:6px;color:var(--fg);text-decoration:none}
.mode-tabs{margin:0 0 14px}

@media (max-width: 640px){
  /* Thumb-sized star without making the title line taller: the negative margin
     takes back the extra height the 44px target would add. */
  .movie-head .star-btn{min-height:44px;min-width:44px;margin:-10px 0}
  .cand-grid{grid-template-columns:1fr}
  .same-day{min-height:44px;line-height:30px}
}
