.movies { --movie-accent: var(--accent, #218977); }
.movie-header {display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:24px;}
.movie-header h1 {font-size:32px;letter-spacing:-1px;margin:8px 0;}
.movie-header .eyebrow {font-size:10px;font-weight:700;letter-spacing:2px;color:var(--muted);}
.movies .fin-button-icon,.movie-dialog .fin-button-icon {width:16px;height:16px;flex-shrink:0;}
.movie-actions {display:flex;align-items:center;gap:8px;flex-wrap:nowrap;}
.movie-actions > :is(button,a) {flex:0 0 auto;margin-block:0;}
.movie-header > .movie-actions {max-width:100%;overflow-x:auto;}
.movies button,.movie-dialog button,.movie-link {display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;}
.movie-stats {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:20px;}
.movie-stats .card {padding:18px 20px;display:flex;flex-direction:column;gap:10px;}
.movie-stats span {font-size:12px;color:var(--muted);}
.movie-stats strong {font-size:28px;}
.movie-tabs {display:flex;gap:6px;overflow-x:auto;border-bottom:1px solid var(--border);padding-bottom:12px;}
.movie-tabs button {background:transparent;border-color:transparent;}
.movie-tabs [aria-pressed=true] {background:var(--accent-soft);color:var(--accent);border-color:var(--accent);}
.movie-filters {display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:20px 0;}
.movie-filters>label:first-child {flex:1;min-width:210px;}
.movies label,.movie-dialog label {display:flex;flex-direction:column;font-size:12px;gap:6px;color:var(--muted);}
.movies :is(input,select),.movie-dialog :is(input,select,textarea) {min-height:40px;padding:9px 12px;border:1px solid var(--border);border-radius:7px;background:var(--surface);color:var(--text);width:100%;font:inherit;}
.movie-filters button {min-height:40px;}
.movie-check {flex-direction:row!important;align-items:center;min-height:40px;gap:8px!important;}
.movie-check input {width:16px!important;min-height:16px!important;accent-color:var(--accent);}
.movie-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px;}
.movie-card {overflow:hidden;padding:0;display:flex;flex-direction:column;}
.movie-art {height:160px;position:relative;padding:22px;display:flex;flex-direction:column;justify-content:end;gap:10px;background:linear-gradient(125deg,var(--accent-soft),var(--surface-2));border-bottom:1px solid var(--border);color:var(--text);}
.movie-art>span:first-child {position:absolute;top:22px;right:22px;color:var(--accent);opacity:.25;}
.movie-art>span:first-child svg {width:70px;height:70px;}
.movie-art .badge {align-self:start;max-width:80%;}
.movie-art>strong {font-size:24px;max-width:90%;line-height:1.15;overflow-wrap:anywhere;}
.movie-art .movie-favorite {position:absolute;right:18px;bottom:20px;color:var(--accent);}
.movie-card-body {padding:18px;display:flex;flex-direction:column;flex:1;gap:10px;}
.movie-title {display:flex;justify-content:space-between;align-items:start;gap:8px;}
.movie-title h2 {font-size:17px;margin:0;overflow-wrap:anywhere;}
.movie-title .badge {font-size:10px;white-space:nowrap;}
.movie-card-body p {margin:0;line-height:1.5;}
.movie-rating {color:var(--accent);font-size:13px;letter-spacing:2px;}
.movie-position {display:flex;justify-content:space-between;font-size:12px;gap:8px;}
.movie-position span {color:var(--muted);}
.movies progress {appearance:none;height:6px;width:100%;border:0;border-radius:8px;background:var(--border);accent-color:var(--accent);}
.movies progress::-webkit-progress-bar {background:var(--border);border-radius:8px;}
.movies progress::-webkit-progress-value {background:var(--accent);border-radius:8px;}
.movies progress::-moz-progress-bar {background:var(--accent);border-radius:8px;}
.movie-note {white-space:pre-wrap;font-size:12px;color:var(--muted);max-height:56px;overflow:auto;}
.movie-card-body>.movie-actions {margin-top:auto;padding-top:10px;overflow-x:auto;max-width:100%;padding-bottom:3px;}
.movie-card-body>.movie-actions > :is(button,a),.movie-table .movie-actions > :is(button,a) {box-sizing:border-box;height:32px;min-height:32px;line-height:1;padding:6px 8px;font-size:11px;}
.movie-table :is(th,td):last-child {width:1%;white-space:nowrap;}
.movie-card button,.movie-table button {font-size:11px;min-height:32px;padding:6px 8px;}
.movie-link {color:var(--accent);text-decoration:none;border:1px solid var(--border);padding:6px 9px;border-radius:7px;font-size:12px;}
.movie-table {min-width:900px;width:100%;}
.movie-table small {display:block;color:var(--muted);margin-top:6px;}
.movie-table td:nth-child(5) {min-width:100px;}
.movie-footer {font-size:11px;color:var(--muted);margin:20px 0;}
.movie-empty {text-align:center;padding:55px 20px;}
.movie-empty>div svg {width:46px;height:46px;color:var(--accent);}
.movie-empty h2 {margin-top:18px;}
.movie-dialog {max-width:680px;width:calc(100% - 28px);max-height:90dvh;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--text);padding:24px;overflow:auto;}
.movie-dialog::backdrop {background:#0009;backdrop-filter:blur(4px);}
.movie-dialog .panel-heading {gap:16px;align-items:center;margin-bottom:20px;}
.movie-dialog h2 {font-size:20px;margin:0;}
.movie-form-grid {display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.movie-wide {grid-column:1/-1;}
.movie-dialog-actions {display:flex;justify-content:end;margin-top:16px;}
.movie-form-error {color:#c43d3d;font-size:12px;}
.movie-trailer {aspect-ratio:16/9;background:#080808;border-radius:10px;overflow:hidden;}
.movie-trailer iframe {height:100%;width:100%;border:0;}
.movie-dialog :focus-visible,.movies :focus-visible {outline:1px solid var(--accent);outline-offset:2px;}
@media(max-width:700px) {.movie-header {align-items:start;flex-direction:column;}.movie-stats {grid-template-columns:1fr 1fr;}.movie-header h1 {font-size:27px;}.movie-form-grid {grid-template-columns:1fr;}.movie-dialog {padding:18px;}.movie-grid {grid-template-columns:1fr;}}

/* Align the library search, filters and actions along one baseline. */
.movies .movie-filters > label {
  margin: 0;
}
body .movies .movie-filters :is(input:not([type=checkbox]), select) {
  height: 40px !important;
  min-height: 40px !important;
  box-sizing: border-box;
}
.movies .movie-filters > .segment {
  height: 40px;
  padding: 0;
  align-items: center;
}

.movies .movie-play {min-height:32px;padding:6px 10px;font-size:11px;}
.movies a.movie-play {background:var(--accent);border-color:var(--accent);color:var(--on-accent,#fff);font-weight:600;}
.movies button.movie-play:disabled {opacity:.55;cursor:not-allowed;}
