*{box-sizing:border-box}
:root{color-scheme:dark}
body{margin:0;min-height:100vh;background:#10131b;color:#f4f0e8;font-family:Arial,sans-serif}
.app{width:min(100%,1440px);min-height:100vh;margin:0 auto;display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr);gap:34px;padding:28px 30px 48px;align-items:start}
.sidebar{position:sticky;top:24px;display:flex;flex-direction:column;gap:20px;min-width:0}
.search-wrap{position:relative;width:100%;z-index:2}
#actor-search{width:100%;padding:14px 16px;border:1px solid #4a5262;border-radius:9px;background:#1b2230;color:#fff;font-size:16px;outline:none}
#actor-search:focus{border-color:#d9b875}
#actor-suggestions{position:absolute;top:calc(100% + 6px);left:0;right:0;max-height:min(55vh,420px);overflow-y:auto;margin:0;padding:5px;list-style:none;background:#1b2230;border:1px solid #4a5262;border-radius:9px;box-shadow:0 14px 32px #0009}
#actor-suggestions[hidden]{display:none}
#actor-suggestions li{padding:11px 12px;border-radius:6px;color:#f4f0e8;cursor:pointer;font-size:14px}
#actor-suggestions li[aria-selected=true],#actor-suggestions li:hover{background:#343b4b;color:#f0d8a4}
.portrait-wrap{width:100%;min-height:220px;display:flex;align-items:flex-start;justify-content:center;overflow:hidden}
#actor-photo{display:none;width:100%;height:auto;max-height:calc(100vh - 120px);object-fit:contain;object-position:top center;border-radius:12px;box-shadow:0 16px 60px #0008}
#photo-status{color:#9ca6b8;font-size:14px;text-align:center;padding:12px}
.filmography{min-width:0;width:100%;max-width:980px}
.film-list{width:100%}
.year-group{margin:0 0 26px}
.year-heading{font-size:20px;font-weight:700;color:#d9b875;border-bottom:1px solid #343b49;padding:0 0 10px;margin:0 0 5px}
.film-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 8px;border-bottom:1px solid #ffffff12}
.film-title{font-size:15px;color:#f4f0e8;text-decoration:none}
.film-title:hover{color:#f0d8a4}
.film-note{font-size:12px;color:#9ca6b8}
.empty{padding:20px 8px;color:#9ca6b8;font-size:14px;text-align:left;background:#181d28;border:1px solid #2b3342;border-radius:10px}
@media(max-width:760px){.app{display:flex;flex-direction:column;padding:16px;gap:24px}.sidebar{position:relative;top:auto;width:100%;gap:14px}.search-wrap{max-width:520px}.portrait-wrap{min-height:0;max-height:42vh}.portrait-wrap #actor-photo{width:auto;max-width:100%;max-height:42vh}.filmography{width:100%}}

/* Compact year-by-year filmography table */
.filmography-table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0;text-align:left}
.filmography-table .year-column{width:104px}
.filmography-table .movies-column{width:auto}
.filmography-table th,.filmography-table td{padding:14px 12px;border-bottom:1px solid #ffffff18;vertical-align:top}
.filmography-table thead th{font-size:14px;font-weight:700;letter-spacing:.04em;color:#d9b875;background:#1b2230;border-bottom:1px solid #4a5262}
.filmography-table .year-cell{width:104px;white-space:nowrap;text-align:left;font-size:16px;color:#d9b875;font-weight:700;vertical-align:top}
.filmography-table .movies-cell{text-align:left;vertical-align:top;overflow-wrap:anywhere}
.filmography-table .movies-cell{font-size:15px;line-height:1.9}


/* Actor movie-count card: matches the portrait width and dark/gold theme */
.movie-count-card{width:100%;padding:18px 20px 16px;text-align:center;background:linear-gradient(145deg,#202838 0%,#171d29 100%);border:1px solid #4a5262;border-radius:12px;box-shadow:0 12px 30px #0005;position:relative;overflow:hidden}
.movie-count-card:before{content:"";position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,#9f7c43,#e4c88e,#9f7c43)}
.movie-count-label{font-size:11px;font-weight:700;letter-spacing:.16em;color:#d9b875}
.movie-count-value{margin:5px 0 1px;font-size:38px;line-height:1.15;font-weight:700;color:#f4f0e8;font-variant-numeric:tabular-nums}
.movie-count-caption{font-size:12px;color:#9ca6b8;letter-spacing:.02em}


/* Main site title */
.page-title{grid-column:1 / -1;margin:0 0 2px;padding:2px 0 16px;color:#d9b875;font-size:clamp(25px,3vw,34px);line-height:1.15;font-weight:700;letter-spacing:.015em;border-bottom:1px solid #343b49;text-shadow:0 2px 14px #d9b87522}
@media(max-width:760px){.page-title{width:100%;font-size:27px;padding-bottom:13px}}


/* Force identical two-column tracks for every header and data row.
   Using grid rows avoids browser table auto-layout shifting the year column. */
.filmography-table{display:block;width:100%;table-layout:auto;border-collapse:separate}
.filmography-table thead,.filmography-table tbody{display:block;width:100%}
.filmography-table tr{display:grid;grid-template-columns:104px minmax(0,1fr);align-items:start;width:100%}
.filmography-table th,.filmography-table td{display:block;min-width:0;margin:0;text-align:left;vertical-align:top}
.filmography-table .year-cell{width:auto}
.filmography-table .movies-cell{width:100%;min-width:0;overflow-wrap:anywhere;word-break:normal}


/* Final alignment: one shared grid for the header and every year row,
   with a continuous divider across the complete row. */
.filmography-table{display:block;width:100%;border:0;border-collapse:separate}
.filmography-table colgroup{display:none}
.filmography-table thead,.filmography-table tbody{display:block;width:100%}
.filmography-table tr{display:grid;grid-template-columns:104px minmax(0,1fr);width:100%;align-items:start;border-bottom:1px solid #ffffff18}
.filmography-table th,.filmography-table td{display:block;min-width:0;margin:0;padding:14px 12px;border:0;text-align:left;vertical-align:top}
.filmography-table thead tr{background:#1b2230;border-bottom:1px solid #4a5262}
.filmography-table thead th{background:transparent}
.filmography-table .year-cell{width:auto;white-space:nowrap}
.filmography-table .movies-cell{width:auto;min-width:0;overflow-wrap:anywhere;word-break:normal}
.movie-count-card{flex:none}


/* Actor suggestions must float over the page, never participate in layout. */
.sidebar{overflow:visible}
.search-wrap{position:relative;z-index:1000;isolation:isolate}
#actor-suggestions{
  position:absolute !important;
  display:block;
  top:calc(100% + 6px);
  left:0;
  right:0;
  z-index:1001;
  max-height:min(55vh,420px);
  overflow-y:auto;
  overscroll-behavior:contain;
}
#actor-suggestions[hidden]{display:none !important}


/* Tighten spacing below the title without changing the two-column gap. */
.app{column-gap:34px;row-gap:12px}
.page-title{margin-bottom:0;padding-bottom:10px}

/* Reserve a stable portrait frame and show a skeleton/spinner while loading. */
.portrait-wrap{position:relative;display:block;width:100%;aspect-ratio:4/5;min-height:0;max-height:none;border-radius:12px;background:#1b2230;overflow:hidden}
#actor-photo{position:absolute;inset:0;display:none;width:100%;height:100%;max-height:none;object-fit:cover;object-position:top center;border-radius:12px}
.photo-skeleton{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(110deg,#1b2230 8%,#283244 18%,#1b2230 33%);background-size:200% 100%;animation:photo-shimmer 1.5s linear infinite}
.photo-skeleton[hidden]{display:none}
.photo-spinner{width:34px;height:34px;border:3px solid #d9b87535;border-top-color:#d9b875;border-radius:50%;animation:photo-spin .8s linear infinite}
@keyframes photo-spin{to{transform:rotate(360deg)}}
@keyframes photo-shimmer{to{background-position-x:-200%}}
#photo-status{position:absolute;inset:auto 0 12px;padding:8px;color:#9ca6b8;font-size:13px;text-align:center;pointer-events:none}

/* The selected actor is highlighted and scrolled into view when the list opens. */
#actor-suggestions li.current-actor{background:#343b4b;color:#f0d8a4;box-shadow:inset 3px 0 #d9b875}

/* Watched-state control beside each title; title itself remains a Wikipedia link. */
.filmography-table .movies-cell{line-height:2.1}
.film-title{color:#f4f0e8}
.film-title.watched{color:#78c995}
.watched-toggle{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;width:19px;height:19px;margin:0 7px 0 3px;padding:0;border:0;background:transparent;color:#8d97a8;cursor:pointer;opacity:.75}
.watched-toggle:hover{opacity:1;color:#d9b875}
.watched-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.watched-toggle.watched{color:#78c995;opacity:1}
@media(max-width:760px){.app{row-gap:12px}.portrait-wrap{width:min(100%,340px);max-height:none;aspect-ratio:4/5}.portrait-wrap #actor-photo{width:100%;max-width:none;max-height:none}}

/* Keep actor selection from changing the page's layout position.
   The sidebar has a stable footprint; portrait content is contained inside
   its reserved frame and the suggestions list is always an overlay. */
html,body{overflow-anchor:none}
.app{align-items:start;grid-template-rows:auto minmax(0,1fr)}
.sidebar{align-self:start;height:fit-content;min-height:0;overflow:visible}
.search-wrap{flex:none;position:relative}
.portrait-wrap{flex:none;width:100%;height:auto;aspect-ratio:4/5;min-height:0}
#actor-photo{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:cover}
#photo-skeleton{position:absolute;inset:0}
.movie-count-card{flex:none}
.filmography{align-self:start;min-height:0}
#film-list{overflow-anchor:none}
#actor-suggestions{position:absolute!important;inset-inline:0;top:calc(100% + 6px);z-index:1001;max-height:min(55vh,420px);overflow-y:auto}
@media(max-width:760px){
  .app{display:flex;flex-direction:column;align-items:stretch}
  .sidebar{height:auto;width:100%;flex:none}
  .portrait-wrap{width:min(100%,340px);height:auto;aspect-ratio:4/5}
  .filmography{width:100%;flex:none}
}


/* Actors / Directors section tabs */
.section-tabs{grid-column:1/-1;display:flex;gap:8px;align-items:center;margin:0 0 4px;border-bottom:1px solid #343b49}
.section-tab{appearance:none;border:0;border-bottom:3px solid transparent;margin:0;padding:11px 18px 10px;background:transparent;color:#aeb6c5;font-size:15px;font-weight:700;cursor:pointer}
.section-tab:hover{color:#f4f0e8;background:#ffffff08}
.section-tab.active{color:#e5c98f;border-bottom-color:#d9b875}
.section-tab:focus-visible{outline:2px solid #d9b875;outline-offset:2px;border-radius:4px}
.app{row-gap:10px}
@media(max-width:760px){.section-tabs{width:100%;margin-bottom:2px}}


/* Correct the desktop grid tracks: title, tabs, then the two-column content.
   The tabs must not occupy the flexible middle row and push content downward. */
@media(min-width:761px){
  .app{grid-template-rows:auto auto minmax(0,1fr)!important;}
}


/* Center the site title and give the page a subtle creator credit. */
.page-title{text-align:center}
.site-footer{grid-column:1/-1;justify-self:stretch;width:100%;box-sizing:border-box;margin-top:28px;padding:18px 0 6px;border-top:1px solid #343b49;text-align:center;color:#9ca6b8;font-size:13px;letter-spacing:.02em}
.site-footer a{color:#d9b875;text-decoration:none;font-weight:700}
.site-footer a:hover{color:#f0d8a4;text-decoration:underline}


/* Fixed shell: only the content pane scrolls; title, tabs and footer stay put. */
html,body{height:100%;overflow:hidden}
.app{
  height:100vh;height:100dvh;min-height:0;overflow:hidden;
  grid-template-rows:auto auto minmax(0,1fr) auto!important;
  grid-template-columns:minmax(260px,340px) minmax(0,1fr);
  padding-bottom:0;
}
.content-area{
  grid-column:1/-1;grid-row:3;display:grid;
  grid-template-columns:minmax(260px,340px) minmax(0,1fr);
  gap:34px;min-height:0;overflow-y:auto;overflow-x:hidden;
  overscroll-behavior:contain;scrollbar-gutter:stable;
  align-items:start;padding:0 2px 18px 0;
}
.sidebar{position:relative;top:auto;align-self:start;height:auto;min-height:0}
.filmography{min-height:0;align-self:start}
.site-footer{grid-row:4;grid-column:1/-1;margin:0;align-self:end;padding:13px 0 12px;background:#10131b}
@media(max-width:760px){
  .app{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px;padding:12px 14px 0}
  .content-area{display:flex;flex-direction:column;gap:18px;width:100%;min-height:0;overflow-y:auto;overflow-x:hidden}
  .sidebar{position:relative;top:auto;width:100%;height:auto;flex:none}
  .filmography{width:100%;flex:none}
  .site-footer{width:100%;margin:0;padding:12px 0 10px}
}


/* KP & AI brand mark in the top-left, while keeping the title centered. */
.page-title{position:relative;display:flex;align-items:center;justify-content:center;min-height:58px}
.page-title .brand-logo{position:absolute;left:0;top:50%;transform:translateY(-50%);width:48px;height:48px;object-fit:contain}
.page-title span{display:block;text-align:center}
@media(max-width:760px){
  .page-title{min-height:48px}
  .page-title .brand-logo{width:38px;height:38px}
}


/* Place the brand mark at the viewport's top-left, independent of the title. */
.page-title .brand-logo{position:fixed;left:14px;top:12px;transform:none;width:48px;height:48px;z-index:20}
@media(max-width:760px){
  .page-title .brand-logo{left:10px;top:10px;width:40px;height:40px}
}

/* Ensure the content pane fills the flexible grid row so its own scrollbar
   activates for long filmographies (e.g. A. R. Rahman's discography). */
.content-area{
  align-self:stretch;
  height:100%;
  min-height:0;
}
@media(max-width:760px){
  .content-area{
    align-self:stretch;
    height:100%;
    min-height:0;
    flex:1 1 0;
  }
}

/* Keep the left profile/sidebar stationary; scroll only the filmography column. */
@media (min-width:761px){
  .content-area{
    overflow:hidden;
    min-height:0;
    height:100%;
  }
  .sidebar{
    overflow:visible;
    align-self:start;
  }
  .filmography{
    height:100%;
    min-height:0;
    align-self:stretch;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
    padding-right:8px;
  }
}


/* Optional Google account controls for cross-device watch progress. */
.account-controls{position:fixed;right:30px;top:12px;transform:none;display:flex;flex-direction:column;align-items:flex-end;gap:5px;max-width:240px;z-index:21}
#account-button{appearance:none;border:1px solid #9f7c43;border-radius:8px;padding:9px 12px;background:#202838;color:#f0d8a4;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}
#account-button:hover:not(:disabled){background:#30394a;border-color:#e4c88e}
#account-button:disabled{opacity:.65;cursor:default}
#account-status{max-width:240px;color:#9ca6b8;font-size:10px;line-height:1.3;text-align:right}
@media(max-width:760px){
  .page-title{padding-top:43px;min-height:88px;align-items:flex-start}
  .account-controls{right:14px;top:8px;transform:none;max-width:calc(100% - 54px);align-items:flex-end}
  #account-status{max-width:220px}
}

.account-action-row{display:flex;align-items:center;justify-content:flex-end;gap:9px}
.account-avatar{width:34px;height:34px;border-radius:50%;object-fit:cover;border:1.5px solid #d9b875;box-shadow:0 1px 5px #0008}
.account-avatar[hidden]{display:none}


/* Split account identity and sync state into two aligned vertical stacks. */
.account-action-row{display:flex;align-items:flex-start;justify-content:flex-end;gap:10px}
.account-avatar-stack,.account-button-stack{display:flex;flex-direction:column;align-items:center;gap:4px}
.account-button-stack{align-items:flex-end}
.account-avatar{display:block;width:36px;height:36px;border-radius:50%;object-fit:cover;border:1.5px solid #d9b875;box-shadow:0 1px 5px #0008}
.account-avatar[hidden]{display:none}
.account-admin-label{font-size:9px;line-height:1.1;font-weight:800;letter-spacing:.14em;color:#d9b875}
.account-admin-label[hidden]{display:none}
#account-status{max-width:220px;color:#9ca6b8;font-size:10px;line-height:1.3;text-align:right;white-space:nowrap}
.admin-panel{position:absolute;right:0;top:calc(100% + 8px);width:min(390px,calc(100vw - 28px));max-height:76vh;overflow:auto;border:1px solid #6e5937;border-radius:12px;background:#151b26;box-shadow:0 14px 38px #000b;color:#e9edf4;text-align:left}
.admin-panel[hidden]{display:none}
.admin-panel>summary{cursor:pointer;list-style:none;padding:10px 13px;color:#e8c985;font-size:12px;font-weight:750}
.admin-panel>summary::-webkit-details-marker{display:none}
.admin-panel>summary:after{content:"＋";float:right;color:#d9b875}
.admin-panel[open]>summary:after{content:"−"}
.admin-panel-content{padding:0 13px 13px;display:flex;flex-direction:column;gap:10px}
.admin-panel-content form,.admin-delete-section{display:flex;flex-direction:column;gap:9px}
.admin-panel-content label{display:flex;flex-direction:column;gap:5px;color:#c8d0dc;font-size:11px;font-weight:650}
.admin-panel-content input,.admin-panel-content select{box-sizing:border-box;width:100%;min-width:0;border:1px solid #414b5c;border-radius:7px;background:#202838;color:#f3f5f8;padding:9px;font:inherit;font-size:12px}
.admin-panel-content button{border:1px solid #8f713f;border-radius:7px;padding:9px 11px;background:#263247;color:#f2d69b;font-size:11px;font-weight:750;cursor:pointer}
.admin-panel-content button:disabled{opacity:.5;cursor:default}
.admin-panel-content .admin-danger{border-color:#824b4b;background:#39252a;color:#ffb8b8}
.admin-help{margin:0;color:#aab4c4;font-size:10px;line-height:1.45}
.artist-import-preview{display:flex;flex-direction:column;gap:5px;max-height:260px;overflow:auto;padding:7px;border:1px solid #343e4e;border-radius:8px;background:#101722}
.artist-import-preview[hidden]{display:none}
.import-candidate{display:flex;flex-direction:row!important;align-items:flex-start;gap:8px!important;padding:5px;border-bottom:1px solid #ffffff10;font-weight:400!important}
.import-candidate input{width:auto!important;margin:2px 0 0;accent-color:#d9b875}
.import-candidate span{display:flex;flex-direction:column;gap:2px;min-width:0}
.import-candidate strong{color:#eef1f6;font-size:11px}
.import-candidate small{color:#9da8b8;font-size:9px;line-height:1.35;font-weight:400}
.admin-delete-section{border-top:1px solid #ffffff20;padding-top:10px}
.admin-message{min-height:14px;margin:0;color:#b8c7d9;font-size:10px;line-height:1.4}
.admin-message.error{color:#ffaaaa}
@media(max-width:760px){
  .account-controls{right:14px;top:8px;max-width:calc(100% - 64px)}
  .account-avatar{width:32px;height:32px}
  .admin-panel{width:min(370px,calc(100vw - 28px));max-height:68vh}
}


/* Final filmography layout: a real two-column table keeps each year and its
   movie list on the same row at every viewport width. */
.filmography-table{
  display:table!important;
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  border-spacing:0;
  text-align:left;
}
.filmography-table colgroup{display:table-column-group!important}
.filmography-table col.year-column{width:88px}
.filmography-table col.movies-column{width:auto}
.filmography-table thead{display:table-header-group!important}
.filmography-table tbody{display:table-row-group!important}
.filmography-table tr{display:table-row!important;width:auto;border-bottom:1px solid #ffffff18}
.filmography-table th,.filmography-table td{
  display:table-cell!important;
  box-sizing:border-box;
  min-width:0;
  margin:0;
  padding:12px 10px;
  border:0;
  border-bottom:1px solid #ffffff18;
  text-align:left;
  vertical-align:top;
}
.filmography-table thead tr{background:#1b2230;border-bottom:1px solid #4a5262}
.filmography-table thead th{color:#d9b875;font-size:13px;font-weight:700}
.filmography-table .year-cell{
  width:88px;
  white-space:nowrap;
  color:#d9b875;
  font-size:15px;
  font-weight:700;
}
.filmography-table .movies-cell{
  width:auto;
  min-width:0;
  line-height:2;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
}
.movie-entry{
  display:inline-flex;
  align-items:baseline;
  white-space:nowrap;
  vertical-align:baseline;
}
.movie-entry .film-title{white-space:nowrap}
.movie-entry .watched-toggle{flex:none}
.account-profile-menu{
  appearance:none;
  display:block;
  padding:0;
  margin:0;
  border:0;
  background:transparent;
  color:inherit;
  cursor:pointer;
  border-radius:50%;
}
.account-profile-menu:disabled{cursor:default}
.account-profile-menu:focus-visible{outline:2px solid #d9b875;outline-offset:4px}
.account-profile-menu[hidden]{display:none}
.admin-panel{padding:0}
.admin-panel[open]{display:block}
.admin-panel-title{margin:0 0 2px;color:#e8c985;font-size:14px;font-weight:750}
@media(max-width:760px){
  .filmography-table col.year-column{width:68px}
  .filmography-table .year-cell{width:68px}
  .filmography-table th,.filmography-table td{padding:10px 6px}
  .filmography-table .movies-cell{line-height:1.9}
}


/* Explicit row alignment: keep the year and its movie list centered
   against one another, regardless of legacy responsive table rules. */
.filmography-table{display:table!important;width:100%!important;table-layout:fixed!important;border-collapse:collapse!important}
.filmography-table thead{display:table-header-group!important}
.filmography-table tbody{display:table-row-group!important}
.filmography-table tr{display:table-row!important}
.filmography-table th,
.filmography-table td{display:table-cell!important;vertical-align:middle!important;box-sizing:border-box}
.filmography-table .year-cell{vertical-align:middle!important;text-align:left!important}
.filmography-table .movies-cell{vertical-align:middle!important;text-align:left!important}
.admin-panel[hidden]{display:none!important}
.admin-panel.is-open{display:block}
.admin-panel>summary,
.admin-panel>summary::-webkit-details-marker,
.admin-panel>summary:after{display:none!important;content:none!important}


/* Align each movie title and its watched control as one centered unit.
   Keep the year vertically centered against the complete movie row. */
.filmography-table .year-cell,
.filmography-table .movies-cell{
  vertical-align:middle!important;
}
.filmography-table .movie-entry{
  display:inline-flex!important;
  align-items:center!important;
  vertical-align:middle!important;
  line-height:1.5!important;
  white-space:nowrap;
}
.filmography-table .movie-entry .film-title{
  display:inline-block;
  line-height:1.5!important;
  vertical-align:middle!important;
}
.filmography-table .movie-entry .watched-toggle{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center!important;
  flex:0 0 19px!important;
  width:19px!important;
  height:19px!important;
  line-height:0!important;
  vertical-align:middle!important;
}
.filmography-table .movie-entry .watched-toggle svg{
  display:block;
  width:16px;
  height:16px;
}

/* Give the Manage artists heading comfortable space inside the admin panel. */
.admin-panel-content{padding:16px 16px 16px;gap:12px}
.admin-panel-title{margin:0 0 6px;padding:2px 0 4px;line-height:1.4}

/* Separate principal film credits from cameo and other screen appearances. */
.filmography-section-title{margin:16px 0 8px;padding:0;font-size:14px;font-weight:700;line-height:1.4;color:#f4f0e8}
.filmography-section-title:first-child{margin-top:0}

/* Highest-grossing films browser */
#account-status{display:none!important}
.highest-grossing-view{grid-column:1/-1;grid-row:3;min-height:0;overflow:auto;padding:0 4px 20px}
.highest-grossing-view[hidden]{display:none!important}
.grossing-toolbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:6px 0 12px}
.grossing-toolbar label{display:flex;flex-direction:column;gap:5px;color:#c8d0dc;font-size:11px;font-weight:700;min-width:150px}
.grossing-toolbar select{min-width:150px;border:1px solid #414b5c;border-radius:8px;background:#202838;color:#f3f5f8;padding:10px;font:inherit;font-size:12px}
.grossing-updated,.grossing-source{color:#9ca6b8;font-size:11px;line-height:1.5}
.grossing-table-wrap{width:100%;overflow:auto;border:1px solid #303949;border-radius:10px}
.grossing-table{width:100%;border-collapse:collapse;min-width:620px;text-align:left}
.grossing-table th,.grossing-table td{padding:12px 14px;border-bottom:1px solid #ffffff18;vertical-align:middle;font-size:12px}
.grossing-table th{position:sticky;top:0;background:#1b2230;color:#d9b875;font-weight:750}
.grossing-table td:first-child{color:#d9b875;font-weight:750;width:64px}
.grossing-table td:last-child{white-space:nowrap;font-variant-numeric:tabular-nums}
.grossing-table a{color:#eef1f6;text-decoration:none}
.grossing-table a:hover{color:#f0d8a4;text-decoration:underline}
.grossing-empty{padding:24px;text-align:center;color:#9ca6b8}
.grossing-source a{color:#d9b875}
.content-area[hidden]{display:none!important}
@media(max-width:760px){.highest-grossing-view{grid-row:3;padding:0 0 16px}.grossing-toolbar{gap:8px}.grossing-toolbar label,.grossing-toolbar select{min-width:0;width:100%}}


/* Highest-grossing browser: keep the rankings in a dedicated, visibly
   scrollable viewport instead of letting the full list stretch the page. */
.highest-grossing-view{
  max-height:calc(100vh - 230px);
  overflow-y:auto;
  scrollbar-gutter:stable;
  overscroll-behavior:contain;
}
.grossing-table-wrap{
  max-height:min(68vh,760px);
  overflow-x:auto;
  overflow-y:scroll;
  scrollbar-width:thin;
  scrollbar-color:#7e6b49 #1a202b;
  overscroll-behavior:contain;
}
.grossing-table-wrap::-webkit-scrollbar{width:10px;height:10px}
.grossing-table-wrap::-webkit-scrollbar-track{background:#1a202b;border-radius:8px}
.grossing-table-wrap::-webkit-scrollbar-thumb{background:#7e6b49;border:2px solid #1a202b;border-radius:8px}
.grossing-table thead th{z-index:2}
.grossing-table tbody tr.currently-running td{
  background:#203a31;
  border-bottom-color:#47745e;
}
.grossing-table tbody tr.currently-running td:first-child{
  box-shadow:inset 4px 0 #78c995;
  color:#a5e4ba;
}
.grossing-table tbody tr.currently-running a{color:#f1fff5}
.running-badge{
  display:inline-block;
  margin-left:9px;
  padding:3px 7px;
  border:1px solid #5e9877;
  border-radius:999px;
  background:#254b39;
  color:#b8f0ca;
  font-size:10px;
  font-weight:700;
  line-height:1.2;
  white-space:nowrap;
  vertical-align:middle;
}
@media(max-width:760px){
  .highest-grossing-view{max-height:calc(100dvh - 210px);overflow-y:auto}
  .grossing-table-wrap{max-height:min(58vh,560px)}
  .grossing-table th,.grossing-table td{padding:10px 9px}
}


/* Highest Grossing occupies the viewport between the navigation and footer.
   The table uses the remaining space and only gains a vertical scrollbar when
   its rows are taller than that space. */
body:has(#highest-grossing-view:not([hidden])) .app{
  height:100vh;
  height:100dvh;
  min-height:100dvh;
  grid-template-rows:auto auto minmax(0,1fr) auto!important;
  padding-bottom:0;
  overflow:hidden;
}
body:has(#highest-grossing-view:not([hidden])) .highest-grossing-view{
  display:flex;
  flex-direction:column;
  min-height:0;
  max-height:none;
  overflow:hidden;
  padding-bottom:0;
}
body:has(#highest-grossing-view:not([hidden])) .grossing-table-wrap{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  overflow-x:auto;
  overflow-y:auto;
  scrollbar-gutter:stable;
}
body:has(#highest-grossing-view:not([hidden])) .site-footer{
  margin:0;
  align-self:stretch;
}
@media(max-width:760px){
  body:has(#highest-grossing-view:not([hidden])) .app{
    height:100dvh;
    min-height:100dvh;
    grid-template-rows:auto auto minmax(0,1fr) auto!important;
    padding:12px 14px 0;
    gap:8px;
  }
  body:has(#highest-grossing-view:not([hidden])) .highest-grossing-view{
    grid-row:3;
    padding:0;
  }
  body:has(#highest-grossing-view:not([hidden])) .grossing-table-wrap{
    max-height:none;
  }
}


.language-pill{display:inline-flex;align-items:center;margin:2px 5px 2px 0;padding:3px 9px;border:1px solid transparent;border-radius:999px;font-size:10px;font-weight:750;line-height:1.25;white-space:nowrap}
.language-telugu{background:#174c45;color:#a7f0df;border-color:#347c70}
.language-hindi{background:#51351d;color:#ffd3a0;border-color:#92643a}
.language-tamil{background:#263f68;color:#c2dcff;border-color:#4d75ad}
.language-kannada{background:#4c2c5e;color:#e9c8ff;border-color:#80539a}
.language-malayalam{background:#4a4b20;color:#e9eea9;border-color:#85883c}
.language-other-unclassified,.language-english,.language-bengali,.language-marathi{background:#343b49;color:#d8dfeb;border-color:#596579}
.grossing-toolbar select{appearance:none;-webkit-appearance:none;-moz-appearance:none;padding:10px 40px 10px 12px;background-color:#202838;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23d9b875' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 13px center;background-size:14px;cursor:pointer}
body:has(#highest-grossing-view:not([hidden])) .highest-grossing-view{min-height:0;height:100%}
body:has(#highest-grossing-view:not([hidden])) .grossing-table-wrap{height:0;flex:1 1 0;min-height:0;max-height:none;overflow-x:auto;overflow-y:auto;scrollbar-gutter:stable;overscroll-behavior:contain}
@media(max-width:760px){body:has(#highest-grossing-view:not([hidden])) .grossing-table-wrap{height:0;flex:1 1 0}}


/* Highest Grossing uses the exact same circular check control as artist filmographies. */
.grossing-table .grossing-watched-toggle{
  appearance:none;
  -webkit-appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:19px;
  height:19px;
  margin:0 7px 0 9px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#8d97a8;
  vertical-align:middle;
  cursor:pointer;
  opacity:.75;
}
.grossing-table .grossing-watched-toggle:hover{opacity:1;color:#d9b875}
.grossing-table .grossing-watched-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.grossing-table .grossing-watched-toggle.watched{background:transparent;color:#78c995;opacity:1}
.grossing-table .grossing-watched-toggle:not(.watched){background:transparent;opacity:.75}

/* Keep Now showing visually distinct from the green watched check. */
.grossing-table tbody tr.currently-running td{
  background:#202d43;
  border-bottom-color:#405675;
}
.grossing-table tbody tr.currently-running td:first-child{
  box-shadow:inset 4px 0 #d9b875;
  color:#f0d8a4;
}
.grossing-table tbody tr.currently-running a{color:#f4f6fb}
.grossing-table .running-badge{
  border-color:#7189ad;
  background:#2a3b56;
  color:#d6e3f8;
}


/* Compact circular portraits in artist/director/music dropdown suggestions. */
#actor-suggestions li{display:flex;align-items:center;gap:11px;min-height:52px;padding:6px 12px}
.artist-option-avatar{display:block;flex:0 0 38px;width:38px;height:38px;border-radius:50%;object-fit:cover;background:#30394a;border:1px solid #566174;color:transparent}
.artist-option-avatar:not(.loaded){opacity:.72}
.artist-option-name{min-width:0;line-height:1.25}


/* Google sign-in button using the app's dark navy / antique-gold palette;
   preserve the multicolor Google mark and leave signed-in styling untouched. */
#account-button:not(.is-signed-in){display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:40px;padding:0 16px;border:1px solid #9f7c43;border-radius:8px;background:#202838;color:#f0d8a4;box-shadow:0 2px 8px #0005;font-family:Arial,sans-serif;font-size:13px;font-weight:700;letter-spacing:.1px;line-height:1}
#account-button:not(.is-signed-in)::before{content:"";display:block;flex:0 0 18px;width:18px;height:18px;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.91c-.58 2.96-2.26 5.48-4.75 7.18l7.73 6C44.4 37.98 46.98 31.92 46.98 24.55z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59A14.4 14.4 0 0 1 9.75 24c0-1.59.27-3.13.76-4.59l-7.98-6.19A23.9 23.9 0 0 0 0 24c0 3.87.93 7.52 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.8l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E")}
#account-button:not(.is-signed-in):hover:not(:disabled){border-color:#e4c88e;background:#30394a;box-shadow:0 3px 10px #0007}
#account-button:not(.is-signed-in):focus-visible{outline:2px solid #d9b875;outline-offset:2px}
#account-button:not(.is-signed-in):disabled{background:#202838;color:#f0d8a4;opacity:.65}


/* Language dividers inside the artist autocomplete. Counts reflect the
   full active artist category; matching names remain alphabetically sorted. */
#actor-suggestions li.language-group-header{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:0;
  margin:9px 7px 3px;
  padding:5px 5px 4px;
  border-radius:0;
  color:#d9b875;
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  line-height:1;
  text-transform:uppercase;
  cursor:default;
}
#actor-suggestions li.language-group-header:first-child{margin-top:4px}
#actor-suggestions li.language-group-header:hover{background:transparent;color:#d9b875}
.language-group-rule{height:1px;flex:1 1 auto;background:linear-gradient(90deg,#8f774e88,#8f774e20)}
.language-group-count{
  flex:none;
  color:#9ca6b8;
  font-size:10px;
  font-weight:700;
  letter-spacing:0;
  font-variant-numeric:tabular-nums;
}
