:root {
  --blue: #073d91;
  --blue-dark: #06265f;
  --green: #0a7a3d;
  --green-dark: #085d30;
  --orange: #f04a23;
  --gold: #f3b61f;
  --silver: #a7adb7;
  --bronze: #c76522;
  --bg: #f3f7fb;
  --panel: #ffffff;
  --ink: #10234a;
  --muted: #5d6b83;
  --line: #dbe5f1;
  --shadow: 0 10px 26px rgba(18, 45, 96, 0.12);
}

/* Final voting homepage layout */
.page-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px 72px;
}

.site-header {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: center;
}

.logo-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

.logo-group img {
  display: block;
  width: 100%;
  max-height: 58px;
  object-fit: contain;
}

.title-group {
  min-width: 0;
  text-align: center;
  color: var(--blue-dark);
}

.title-id {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.title-cn {
  margin-top: 3px;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.2;
}

.status-group {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.status-badge,
.deadline-badge,
.internal-badge {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(15, 47, 92, 0.08);
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.status-badge {
  color: var(--green-dark);
  background: #e8f8ef;
}

.deadline-badge {
  color: #c5291a;
}

.theme-banner {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  padding: 18px 28px;
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 94% 50%, rgba(255,255,255,0.12), transparent 24%),
    linear-gradient(90deg, #075f35, #0b7a43);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  text-align: left;
}

.theme-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 58px;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  background: linear-gradient(180deg, #18a0b5, #064793);
  clip-path: polygon(50% 0, 92% 16%, 84% 74%, 50% 100%, 16% 74%, 8% 16%);
  border: 4px solid rgba(255,255,255,0.86);
}

.theme-id {
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.theme-cn {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.18;
}

.main-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 340px;
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.side-nav,
.right-panel {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 12px;
}

.side-nav {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow);
}

.nav-item {
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--blue-dark);
  background: transparent;
  text-align: left;
  font-size: 15px;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: var(--blue);
}

.work-area {
  min-width: 0;
}

.category-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.tab {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--blue-dark);
  font-size: 16px;
}

.tab span {
  font-size: 13px;
  color: var(--muted);
}

.tab.active {
  color: #fff;
  background: linear-gradient(180deg, #0c58bd, var(--blue));
}

.tab.active span {
  color: #fff;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 4px 0 12px;
}

.section-heading h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 28px;
}

.section-heading span {
  color: var(--muted);
  font-weight: 800;
}

.works-area {
  display: grid;
  gap: 18px;
}

.work-section {
  display: grid;
  gap: 12px;
}

.work-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  color: var(--blue-dark);
  font-size: 22px;
  font-weight: 900;
}

.work-section-title span {
  color: var(--muted);
  font-size: 15px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(22, 56, 106, 0.1);
}

.work-card.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(10, 122, 61, 0.18), 0 8px 18px rgba(22, 56, 106, 0.1);
}

.cover-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #d9e9f6;
}

.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: #fff;
  background: rgba(7, 61, 145, 0.86);
  border: 3px solid #fff;
}

.card-body {
  padding: 10px;
}

.card-tags,
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.work-code,
.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 5px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.type-pill.comic {
  background: var(--orange);
}

.card-body h3,
.title-zh,
.summary-id,
.summary-zh {
  margin: 0;
}

.card-body h3 {
  margin-top: 7px;
  color: var(--blue-dark);
  font-size: 16px;
  line-height: 1.25;
}

.title-zh {
  margin-top: 2px;
  color: var(--blue);
  font-weight: 900;
  line-height: 1.25;
}

.summary-id,
.summary-zh {
  margin-top: 5px;
  color: #233b61;
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 8px;
  font-size: 13px;
}

.view-link {
  text-decoration: none;
  color: var(--blue);
  font-weight: 900;
}

.vote-button {
  width: 100%;
  min-height: 36px;
  margin-top: 8px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}

.work-card[data-category="comic"] .vote-button {
  background: var(--orange);
}

.vote-button.selected {
  background: var(--green);
}

.vote-button:disabled,
#submitVote:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.panel-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-card h2 {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-size: 19px;
}

.vote-window {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 5px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #c9d8ea;
  border-radius: 8px;
  background: #fff;
}

.primary {
  min-height: 42px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}

.vote-hint,
.login-message {
  min-height: 20px;
  margin: 0;
  color: #c93228;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.ranking-list li:nth-child(1) .rank-no { background: var(--gold); }
.ranking-list li:nth-child(2) .rank-no { background: var(--silver); }
.ranking-list li:nth-child(3) .rank-no { background: var(--bronze); }

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-votes {
  font-weight: 900;
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.mini-stats span {
  display: grid;
  place-items: center;
  min-height: 56px;
  padding: 6px;
  border-radius: 9px;
  background: #f2f6fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.mini-stats strong {
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
}

.rules-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules-panel li {
  padding: 8px 8px 8px 28px;
  border: 1px solid #dce9dc;
  border-radius: 8px;
  background: #fbfefb;
  color: #183f24;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.rules-panel li::before {
  content: "âœ“";
  float: left;
  width: 18px;
  height: 18px;
  margin-left: -22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
}

.rules-panel span {
  color: var(--muted);
}

.site-footer {
  position: static;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 54px;
  padding: 10px 24px;
  color: #fff;
  background: linear-gradient(90deg, #063773, #064c9e);
  font-size: 13px;
}

.site-footer span:last-child {
  text-align: right;
}

@media (min-width: 1280px) {
  .works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .status-group {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .main-layout {
    grid-template-columns: 160px minmax(0, 1fr) 310px;
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .page-container {
    padding: 10px 10px 18px;
  }

  .site-header {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  .logo-group {
    width: min(240px, 74vw);
    justify-self: center;
  }

  .logo-group img {
    max-height: 42px;
  }

  .title-id {
    font-size: 15px;
    line-height: 1.22;
  }

  .title-cn {
    font-size: 22px;
    line-height: 1.2;
  }

  .status-group {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .internal-badge {
    display: none;
  }

  .status-badge,
  .deadline-badge {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .theme-banner {
    min-height: 76px;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 12px;
  }

  .theme-icon {
    width: 38px;
    height: 44px;
    font-size: 22px;
    border-width: 3px;
  }

  .theme-id {
    font-size: 14px;
    line-height: 1.28;
  }

  .theme-cn {
    font-size: 22px;
    line-height: 1.2;
  }

  .main-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
  }

  .side-nav {
    display: none;
  }

  .right-panel {
    position: static;
    display: contents;
  }

  .vote-window {
    order: 1;
  }

  .work-area {
    order: 2;
  }

  .ranking-card {
    order: 3;
  }

  .rules-panel {
    order: 4;
  }

  .category-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
  }

  .tab {
    min-height: 40px;
    padding: 5px 3px;
    font-size: 12px;
    line-height: 1.15;
  }

  .tab span {
    font-size: 11px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 2px;
    margin: 4px 0 8px;
  }

  .section-heading h2 {
    font-size: 20px;
  }

  .section-heading span {
    font-size: 13px;
  }

  .works-area {
    gap: 14px;
  }

  .work-section {
    gap: 8px;
  }

  .work-section-title {
    font-size: 17px;
  }

  .work-section-title span {
    font-size: 12px;
  }

  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .work-card {
    border-radius: 12px;
  }

  .cover-box {
    aspect-ratio: 16 / 9;
  }

  .play-badge {
    width: 32px;
    height: 32px;
    border-width: 2px;
    font-size: 12px;
  }

  .card-body {
    padding: 8px;
  }

  .card-tags {
    gap: 4px;
  }

  .work-code,
  .type-pill {
    min-height: 18px;
    padding: 2px 5px;
    border-radius: 5px;
    font-size: 10px;
    line-height: 1.1;
  }

  .type-pill {
    display: none;
  }

  .card-body h3 {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .title-zh {
    font-size: 12px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .summary-id,
  .summary-zh {
    display: none;
  }

  .card-meta {
    align-items: flex-start;
    margin-top: 6px;
    gap: 4px;
    font-size: 11px;
  }

  .view-link {
    display: none;
  }

  .vote-button {
    min-height: 34px;
    margin-top: 6px;
    border-radius: 8px;
    font-size: 13px;
  }

  .panel-card {
    padding: 10px;
    border-radius: 12px;
  }

  .panel-card h2 {
    font-size: 18px;
  }

  label {
    font-size: 12px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px;
    text-align: center;
  }

  .site-footer span:last-child {
    text-align: center;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f6fbff 0%, #edf5f1 100%);
  color: var(--ink);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

a {
  color: inherit;
}

.app-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: calc(100vh - 58px);
}

.left-vote-panel {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: calc(100vh - 58px);
  max-height: calc(100vh - 58px);
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
  background: #eef5f8;
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 2;
}

.safety-badge {
  display: grid;
  justify-items: center;
  gap: 5px;
  margin-bottom: 12px;
  text-align: center;
  color: var(--blue-dark);
  font-weight: 900;
}

.shield-mark,
.shield-small {
  display: grid;
  place-items: center;
  width: 48px;
  height: 54px;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(180deg, #18a0b5, #064793);
  clip-path: polygon(50% 0, 92% 16%, 84% 74%, 50% 100%, 16% 74%, 8% 16%);
  border: 4px solid #fff;
  outline: 3px solid var(--blue);
}

.safety-badge span,
.internal-note span {
  font-size: 11px;
  line-height: 1.25;
}

.internal-note {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, #eff6ff, #fff);
  color: var(--blue-dark);
}

.main-content {
  min-width: 0;
  padding: 8px 12px 66px;
}

.topbar {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 8px;
}

.top-logos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.top-logos img {
  display: block;
  width: 100%;
  max-height: 52px;
  object-fit: contain;
}

.top-title {
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  color: var(--blue-dark);
  text-align: left;
}

.topbar h1 span,
.topbar h1 strong {
  display: block;
  font-weight: 900;
}

.topbar h1 span {
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.15;
}

.topbar h1 strong {
  margin-top: 2px;
  font-size: clamp(20px, 1.95vw, 29px);
  line-height: 1.08;
}

.topbar p {
  margin: 3px 0 0;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.top-status,
.brand-logos {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 7px;
}

.top-status span,
.brand-logos strong,
.brand-logos span {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 8px 13px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(15, 47, 92, 0.08);
  color: var(--blue-dark);
  font-weight: 900;
  font-size: 16px;
  text-align: center;
  white-space: nowrap;
}

#statusBadge {
  color: var(--green-dark);
  background: #eaf7ef;
}

#topDeadline {
  color: #c5291a;
}

.theme-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  justify-items: center;
  margin-bottom: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(90deg, #086632, #0d8a49);
  box-shadow: var(--shadow);
  text-align: center;
}

.shield-small {
  width: 32px;
  height: 36px;
  font-size: 18px;
  outline-color: #fff;
}

.theme-banner strong,
.theme-banner span {
  display: block;
  font-weight: 900;
}

.theme-banner strong {
  font-size: clamp(12px, 1vw, 16px);
  line-height: 1.15;
}

.theme-banner span {
  margin-top: 1px;
  font-size: clamp(13px, 1.1vw, 17px);
  line-height: 1.15;
}

.visual-icons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(620px, 100%);
  justify-self: center;
}

.visual-icons span {
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.content-grid {
  display: block;
}

.category-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--blue-dark);
}

.tab span {
  font-size: 13px;
  color: var(--muted);
}

.tab.active {
  color: #fff;
  background: linear-gradient(180deg, #0c58bd, var(--blue));
}

.tab.active span {
  color: #fff;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 8px 0;
}

.section-heading h2 {
  margin: 0;
  font-size: 25px;
  color: var(--blue-dark);
}

.section-heading span {
  color: var(--muted);
  font-weight: 800;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.work-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(22, 56, 106, 0.1);
}

.work-card.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(10, 122, 61, 0.18), 0 8px 18px rgba(22, 56, 106, 0.1);
}

.cover-box {
  position: relative;
  aspect-ratio: 16 / 7.2;
  background: #d9e9f6;
}

.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: #fff;
  background: rgba(7, 61, 145, 0.86);
  border: 3px solid #fff;
}

.card-body {
  padding: 9px;
}

.card-tags,
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.work-code,
.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 5px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.type-pill.comic {
  background: var(--orange);
}

.card-body h3,
.title-zh,
.summary-id,
.summary-zh {
  margin: 0;
}

.card-body h3 {
  margin-top: 5px;
  color: var(--blue-dark);
  font-size: 15px;
}

.title-zh {
  margin-top: 2px;
  color: var(--blue);
  font-weight: 900;
}

.summary-id,
.summary-zh {
  margin-top: 4px;
  color: #233b61;
  font-size: 12px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 7px;
  font-size: 13px;
}

.view-link {
  text-decoration: none;
  color: var(--blue);
  font-weight: 900;
}

.vote-button {
  width: 100%;
  min-height: 32px;
  margin-top: 7px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
}

.work-card[data-category="comic"] .vote-button {
  background: var(--orange);
}

.vote-button.selected {
  background: var(--green);
}

.vote-button:disabled,
#submitVote:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.panel-card,
.admin-panel,
.prototype-banner {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-card {
  padding: 12px;
}

.panel-card h2 {
  margin: 0 0 9px;
  color: var(--blue-dark);
  font-size: 17px;
}

.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.ranking-list li:nth-child(1) .rank-no { background: var(--gold); }
.ranking-list li:nth-child(2) .rank-no { background: var(--silver); }
.ranking-list li:nth-child(3) .rank-no { background: var(--bronze); }

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-votes {
  font-weight: 900;
}

.stats-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stats-card h2 {
  grid-column: 1 / -1;
}

.stats-card div {
  display: grid;
  place-items: center;
  min-height: 58px;
  border-radius: 8px;
  background: #f2f6fb;
  text-align: center;
}

.stats-card strong {
  color: var(--blue);
  font-size: 24px;
  line-height: 1;
}

.stats-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.vote-window {
  display: grid;
  gap: 9px;
}

label {
  display: grid;
  gap: 5px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #c9d8ea;
  border-radius: 6px;
  background: #fff;
}

.primary {
  min-height: 40px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
}

.primary:hover {
  background: var(--blue-dark);
}

.vote-hint,
.login-message {
  min-height: 20px;
  margin: 0;
  color: #c93228;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.rules-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules-panel li {
  padding: 8px 8px 8px 28px;
  border: 1px solid #dce9dc;
  border-radius: 7px;
  background: #fbfefb;
  color: #183f24;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.rules-panel li::before {
  content: "âœ“";
  float: left;
  width: 18px;
  height: 18px;
  margin-left: -22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
}

.rules-panel span {
  color: var(--muted);
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 58px;
  padding: 8px 18px;
  color: #fff;
  background: linear-gradient(90deg, #063773, #064c9e);
  font-size: 13px;
  z-index: 5;
}

.site-footer strong {
  text-align: center;
}

.site-footer a {
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
}

.hero {
  min-height: 210px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 34px clamp(18px, 5vw, 72px);
  color: #fff;
  background: linear-gradient(135deg, #073d91, #0a7a3d);
}

.hero.compact {
  min-height: 170px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
}

.hero-zh {
  margin: 12px 0 0;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 800;
}

.top-link,
.button-link,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 6px;
  color: var(--ink);
  background: #e9f0f8;
  font-weight: 800;
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: -42px auto 70px;
}

.prototype-banner {
  display: grid;
  gap: 6px;
  padding: 15px 18px;
  margin-bottom: 16px;
  border-left: 6px solid var(--gold);
}

.admin-panel {
  padding: 20px;
  margin-bottom: 18px;
}

.admin-hero {
  background: linear-gradient(135deg, #06265f, #0b6d4b);
}

.admin-shell {
  max-width: 1120px;
}

.admin-note {
  box-shadow: 0 6px 18px rgba(18, 45, 96, 0.08);
}

.login-panel {
  max-width: 760px;
}

.admin-section-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.admin-section-title.no-margin {
  margin-bottom: 0;
}

.admin-section-title.compact-title {
  margin-top: 18px;
}

.admin-section-title > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.admin-section-title h2,
.admin-section-title p {
  margin: 0;
}

.admin-section-title h2 {
  color: var(--blue-dark);
  font-size: 22px;
}

.admin-section-title p {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.hidden {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.button-row,
.panel-heading {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.compact-row {
  justify-content: flex-start;
  margin-top: 0;
}

.import-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.import-box p {
  margin: 5px 0 0;
  color: var(--muted);
}

.import-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.file-button input {
  display: none;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
}

@media (max-width: 1180px) {
  .app-layout {
    grid-template-columns: 330px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .app-layout {
    display: block;
  }

  .left-vote-panel {
    position: static;
    max-height: none;
    min-height: auto;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .safety-badge {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    gap: 10px;
    margin-bottom: 12px;
    text-align: left;
  }

  .safety-badge .shield-mark {
    width: 42px;
    height: 48px;
    font-size: 24px;
    outline-width: 2px;
  }

  .safety-badge strong {
    font-size: 15px;
    line-height: 1.05;
  }

  .safety-badge span {
    display: none;
  }

  .internal-note {
    position: static;
    margin-top: 16px;
    padding: 10px;
    text-align: center;
  }

  .topbar,
  .content-grid,
  .works-grid,
  .category-switch,
  .visual-icons,
  .form-grid,
  .import-box,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 14px 12px 96px;
  }

  .topbar {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 12px;
  }

  .top-logos img {
    max-height: 44px;
  }

  .topbar h1 span {
    font-size: 16px;
  }

  .topbar h1 strong {
    font-size: 24px;
  }

  .topbar p {
    font-size: 14px;
    line-height: 1.35;
  }

  .brand-logos,
  .top-status {
    flex-wrap: wrap;
  }

  .top-status span,
  .brand-logos strong,
  .brand-logos span {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .theme-banner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    padding: 6px 10px;
    text-align: center;
  }

  .theme-banner strong {
    font-size: 13px;
    line-height: 1.2;
  }

  .theme-banner span {
    font-size: 14px;
    line-height: 1.2;
  }

  .visual-icons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-switch {
    gap: 6px;
    padding: 8px 0;
    background: linear-gradient(180deg, #f6fbff 70%, rgba(246,251,255,0));
  }

  .tab {
    min-height: 44px;
    font-size: 13px;
  }

  .tab span {
    font-size: 12px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 3px;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .work-card {
    border-radius: 7px;
  }

  .card-body h3 {
    font-size: 17px;
  }

  .summary-id,
  .summary-zh {
    font-size: 13px;
  }

  .site-footer {
    position: static;
    text-align: center;
  }
}

@media (max-width: 520px) {
  body {
    background: #f4f8f4;
  }

  .app-layout {
    display: flex;
    flex-direction: column;
  }

  .main-content {
    order: 1;
    padding: 8px 7px 18px;
  }

  .left-vote-panel {
    order: 2;
    gap: 7px;
    padding: 7px;
    box-shadow: none;
    background: #eef5f0;
  }

  .internal-note {
    display: none;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    margin-bottom: 6px;
  }

  .top-logos {
    width: min(210px, 72vw);
    justify-self: center;
    gap: 8px;
  }

  .top-logos img {
    max-height: 34px;
  }

  .topbar h1 {
    max-width: 100%;
    line-height: 1.18;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .topbar h1 span {
    font-size: 13px;
    line-height: 1.2;
  }

  .topbar h1 strong {
    margin-top: 2px;
    font-size: 19px;
    line-height: 1.15;
  }

  .topbar p,
  .brand-logos {
    display: none;
  }

  .top-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-top: 6px;
  }

  .top-status span {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .theme-banner {
    grid-template-columns: 1fr;
    margin-bottom: 6px;
    padding: 6px 9px;
    text-align: center;
    border-radius: 7px;
  }

  .theme-banner .shield-small {
    display: none;
  }

  .theme-banner strong {
    display: block;
    font-size: 12px;
    line-height: 1.22;
  }

  .theme-banner span {
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.22;
  }

  .category-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 0;
    margin-bottom: 6px;
    background: transparent;
  }

  .tab {
    min-height: 38px;
    padding: 4px 2px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.15;
  }

  .tab span {
    font-size: 11px;
  }

  .section-heading {
    margin: 6px 0;
  }

  .section-heading h2 {
    font-size: 20px;
  }

  .section-heading span {
    font-size: 13px;
  }

  .panel-card {
    padding: 9px;
  }

  .panel-card h2 {
    margin-bottom: 6px;
    font-size: 18px;
  }

  .ranking-list {
    gap: 5px;
  }

  .ranking-list li {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 5px;
    font-size: 12px;
  }

  .rank-no {
    width: 21px;
    height: 21px;
  }

  .stats-card div {
    min-height: 46px;
  }

  .stats-card {
    grid-template-columns: 1fr 1fr;
  }

  .stats-card strong {
    font-size: 20px;
  }

  .stats-card span {
    font-size: 11px;
  }

  .vote-window {
    gap: 6px;
  }

  label {
    gap: 3px;
    font-size: 12px;
  }

  input,
  select,
  textarea,
  .primary {
    min-height: 38px;
    border-radius: 6px;
  }

  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .cover-box {
    aspect-ratio: 4 / 3;
  }

  .play-badge {
    width: 32px;
    height: 32px;
    border-width: 2px;
    font-size: 12px;
  }

  .card-body {
    padding: 7px;
  }

  .card-tags {
    gap: 4px;
  }

  .work-code,
  .type-pill {
    min-height: 18px;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.1;
  }

  .type-pill {
    display: none;
  }

  .card-body h3 {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .title-zh {
    font-size: 12px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .summary-id,
  .summary-zh {
    display: none;
  }

  .card-meta {
    align-items: flex-start;
    margin-top: 5px;
    gap: 3px;
    font-size: 11px;
  }

  .vote-button {
    min-height: 30px;
    margin-top: 5px;
    border-radius: 5px;
    font-size: 13px;
  }

  .vote-hint,
  .login-message {
    font-size: 12px;
  }

  .rules-panel li {
    padding: 7px 7px 7px 25px;
    font-size: 12px;
  }

  .site-footer {
    font-size: 12px;
    padding: 10px;
  }
}

/* Final voting homepage layout overrides */
/* Final voting homepage layout */
.page-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px 72px;
}

.site-header {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: center;
}

.logo-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

.logo-group img {
  display: block;
  width: 100%;
  max-height: 58px;
  object-fit: contain;
}

.title-group {
  min-width: 0;
  text-align: center;
  color: var(--blue-dark);
}

.title-id {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.title-cn {
  margin-top: 3px;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.2;
}

.status-group {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.status-badge,
.deadline-badge,
.internal-badge {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(15, 47, 92, 0.08);
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.status-badge {
  color: var(--green-dark);
  background: #e8f8ef;
}

.deadline-badge {
  color: #c5291a;
}

.theme-banner {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  padding: 18px 28px;
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 94% 50%, rgba(255,255,255,0.12), transparent 24%),
    linear-gradient(90deg, #075f35, #0b7a43);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  text-align: left;
}

.theme-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 58px;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  background: linear-gradient(180deg, #18a0b5, #064793);
  clip-path: polygon(50% 0, 92% 16%, 84% 74%, 50% 100%, 16% 74%, 8% 16%);
  border: 4px solid rgba(255,255,255,0.86);
}

.theme-id {
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.theme-cn {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.18;
}

.main-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 340px;
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.side-nav,
.right-panel {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 12px;
}

.side-nav {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow);
}

.nav-item {
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--blue-dark);
  background: transparent;
  text-align: left;
  font-size: 15px;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: var(--blue);
}

.work-area {
  min-width: 0;
}

.category-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.tab {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--blue-dark);
  font-size: 16px;
}

.tab span {
  font-size: 13px;
  color: var(--muted);
}

.tab.active {
  color: #fff;
  background: linear-gradient(180deg, #0c58bd, var(--blue));
}

.tab.active span {
  color: #fff;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 4px 0 12px;
}

.section-heading h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 28px;
}

.section-heading span {
  color: var(--muted);
  font-weight: 800;
}

.works-area {
  display: grid;
  gap: 18px;
}

.work-section {
  display: grid;
  gap: 12px;
}

.work-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  color: var(--blue-dark);
  font-size: 22px;
  font-weight: 900;
}

.work-section-title span {
  color: var(--muted);
  font-size: 15px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(22, 56, 106, 0.1);
}

.work-card.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(10, 122, 61, 0.18), 0 8px 18px rgba(22, 56, 106, 0.1);
}

.cover-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #d9e9f6;
}

.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: #fff;
  background: rgba(7, 61, 145, 0.86);
  border: 3px solid #fff;
}

.card-body {
  padding: 10px;
}

.card-tags,
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.work-code,
.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 5px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.type-pill.comic {
  background: var(--orange);
}

.card-body h3,
.title-zh,
.summary-id,
.summary-zh {
  margin: 0;
}

.card-body h3 {
  margin-top: 7px;
  color: var(--blue-dark);
  font-size: 16px;
  line-height: 1.25;
}

.title-zh {
  margin-top: 2px;
  color: var(--blue);
  font-weight: 900;
  line-height: 1.25;
}

.summary-id,
.summary-zh {
  margin-top: 5px;
  color: #233b61;
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 8px;
  font-size: 13px;
}

.view-link {
  text-decoration: none;
  color: var(--blue);
  font-weight: 900;
}

.vote-button {
  width: 100%;
  min-height: 36px;
  margin-top: 8px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}

.work-card[data-category="comic"] .vote-button {
  background: var(--orange);
}

.vote-button.selected {
  background: var(--green);
}

.vote-button:disabled,
#submitVote:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.panel-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-card h2 {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-size: 19px;
}

.vote-window {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 5px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #c9d8ea;
  border-radius: 8px;
  background: #fff;
}

.primary {
  min-height: 42px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}

.vote-hint,
.login-message {
  min-height: 20px;
  margin: 0;
  color: #c93228;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.ranking-list li:nth-child(1) .rank-no { background: var(--gold); }
.ranking-list li:nth-child(2) .rank-no { background: var(--silver); }
.ranking-list li:nth-child(3) .rank-no { background: var(--bronze); }

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-votes {
  font-weight: 900;
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.mini-stats span {
  display: grid;
  place-items: center;
  min-height: 56px;
  padding: 6px;
  border-radius: 9px;
  background: #f2f6fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.mini-stats strong {
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
}

.rules-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules-panel li {
  padding: 8px 8px 8px 28px;
  border: 1px solid #dce9dc;
  border-radius: 8px;
  background: #fbfefb;
  color: #183f24;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.rules-panel li::before {
  content: "âœ?;
  float: left;
  width: 18px;
  height: 18px;
  margin-left: -22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
}

.rules-panel span {
  color: var(--muted);
}

.site-footer {
  position: static;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 54px;
  padding: 10px 24px;
  color: #fff;
  background: linear-gradient(90deg, #063773, #064c9e);
  font-size: 13px;
}

.site-footer span:last-child {
  text-align: right;
}

@media (min-width: 1280px) {
  .works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .status-group {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .main-layout {
    grid-template-columns: 160px minmax(0, 1fr) 310px;
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .page-container {
    padding: 10px 10px 18px;
  }

  .site-header {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  .logo-group {
    width: min(240px, 74vw);
    justify-self: center;
  }

  .logo-group img {
    max-height: 42px;
  }

  .title-id {
    font-size: 15px;
    line-height: 1.22;
  }

  .title-cn {
    font-size: 22px;
    line-height: 1.2;
  }

  .status-group {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .internal-badge {
    display: none;
  }

  .status-badge,
  .deadline-badge {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .theme-banner {
    min-height: 76px;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 12px;
  }

  .theme-icon {
    width: 38px;
    height: 44px;
    font-size: 22px;
    border-width: 3px;
  }

  .theme-id {
    font-size: 14px;
    line-height: 1.28;
  }

  .theme-cn {
    font-size: 22px;
    line-height: 1.2;
  }

  .main-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
  }

  .side-nav {
    display: none;
  }

  .right-panel {
    position: static;
    display: contents;
  }

  .vote-window {
    order: 1;
  }

  .work-area {
    order: 2;
  }

  .ranking-card {
    order: 3;
  }

  .rules-panel {
    order: 4;
  }

  .category-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
  }

  .tab {
    min-height: 40px;
    padding: 5px 3px;
    font-size: 12px;
    line-height: 1.15;
  }

  .tab span {
    font-size: 11px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 2px;
    margin: 4px 0 8px;
  }

  .section-heading h2 {
    font-size: 20px;
  }

  .section-heading span {
    font-size: 13px;
  }

  .works-area {
    gap: 14px;
  }

  .work-section {
    gap: 8px;
  }

  .work-section-title {
    font-size: 17px;
  }

  .work-section-title span {
    font-size: 12px;
  }

  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .work-card {
    border-radius: 12px;
  }

  .cover-box {
    aspect-ratio: 16 / 9;
  }

  .play-badge {
    width: 32px;
    height: 32px;
    border-width: 2px;
    font-size: 12px;
  }

  .card-body {
    padding: 8px;
  }

  .card-tags {
    gap: 4px;
  }

  .work-code,
  .type-pill {
    min-height: 18px;
    padding: 2px 5px;
    border-radius: 5px;
    font-size: 10px;
    line-height: 1.1;
  }

  .type-pill {
    display: none;
  }

  .card-body h3 {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .title-zh {
    font-size: 12px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .summary-id,
  .summary-zh {
    display: none;
  }

  .card-meta {
    align-items: flex-start;
    margin-top: 6px;
    gap: 4px;
    font-size: 11px;
  }

  .view-link {
    display: none;
  }

  .vote-button {
    min-height: 34px;
    margin-top: 6px;
    border-radius: 8px;
    font-size: 13px;
  }

  .panel-card {
    padding: 10px;
    border-radius: 12px;
  }

  .panel-card h2 {
    font-size: 18px;
  }

  label {
    font-size: 12px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px;
    text-align: center;
  }

  .site-footer span:last-child {
    text-align: center;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f6fbff 0%, #edf5f1 100%);
  color: var(--ink);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

a {
  color: inherit;
}


/* Final two-column voting homepage overrides */
.page-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 96px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-group img {
  width: auto;
  max-width: 104px;
  height: 58px;
  object-fit: contain;
}

.title-group {
  min-width: 0;
  text-align: center;
}

.title-id {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  color: #08275c;
}

.title-cn {
  margin-top: 4px;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.18;
  color: #08275c;
}

.status-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.status-badge,
.deadline-badge,
.internal-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #cfe0ee;
  border-radius: 9px;
  background: #fff;
  color: #0a2a60;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(8, 39, 92, 0.08);
}

.status-badge {
  background: #edf9f0;
  color: #08733d;
}

.deadline-badge {
  color: #c3291d;
}

.theme-banner {
  min-height: 86px;
  margin-top: 16px;
  padding: 18px 28px;
  border-radius: 14px;
  background: linear-gradient(90deg, #075f35, #0b7a43);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.theme-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px 14px 20px 20px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 26px;
  font-weight: 900;
}

.theme-id {
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.theme-cn {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.2;
}

.main-layout {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.left-panel {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 12px;
  align-self: start;
}

.content-panel {
  min-width: 0;
}

.side-nav,
.right-panel {
  display: none !important;
}

.panel-card {
  border: 1px solid #cfe0ee;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  padding: 16px;
  box-shadow: 0 10px 24px rgba(8, 39, 92, 0.08);
}

.panel-card h2 {
  margin: 0 0 12px;
  color: #08275c;
  font-size: 20px;
  line-height: 1.2;
}

.rules-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules-panel li {
  position: relative;
  min-height: 44px;
  padding: 8px 10px 8px 36px;
  border: 1px solid #d8e5d8;
  border-radius: 10px;
  background: #fbfefb;
  color: #163027;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.rules-panel li::before {
  content: "âœ“";
  position: absolute;
  left: 10px;
  top: 9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #139447;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

.rules-panel li span {
  display: block;
  margin-top: 2px;
  color: #536273;
  font-weight: 700;
}

.rules-panel .privacy-rule {
  border-color: #ffd591;
  background: #fff8e7;
  color: #7a3b00;
}

.vote-window {
  display: grid;
  gap: 10px;
}

.vote-window label {
  display: grid;
  gap: 5px;
  color: #08275c;
  font-weight: 800;
}

.vote-window input,
.vote-window select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c7d7e8;
  border-radius: 9px;
  padding: 8px 10px;
  background: #fff;
  color: #0b2140;
  font-weight: 700;
}

.primary,
.vote-button {
  min-height: 42px;
  border-radius: 9px;
  background: #0d4fa8;
  color: #fff;
  font-weight: 900;
}

.vote-hint {
  margin: 0;
  color: #c4322c;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.ranking-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #08275c;
}

.rank-no {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0d4fa8;
  color: #fff;
}

.ranking-list li:nth-child(1) .rank-no {
  background: #f1b51c;
}

.ranking-list li:nth-child(2) .rank-no {
  background: #a6afb9;
}

.ranking-list li:nth-child(3) .rank-no {
  background: #ca6a22;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-votes {
  color: #132333;
}

.stats-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stats-card h2 {
  grid-column: 1 / -1;
}

.stats-card div {
  border-radius: 12px;
  background: #f1f5fb;
  padding: 12px 8px;
  text-align: center;
}

.stats-card strong {
  display: block;
  color: #0d4fa8;
  font-size: 28px;
  line-height: 1;
}

.stats-card span {
  display: block;
  margin-top: 7px;
  color: #5a6778;
  font-size: 12px;
  font-weight: 800;
}

.category-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.tab {
  min-height: 54px;
  border: 1px solid #cfe0ee;
  border-radius: 10px;
  background: #fff;
  color: #08275c;
  font-size: 17px;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(8, 39, 92, 0.06);
}

.tab span {
  color: #536273;
  font-size: 13px;
}

.tab.active {
  background: #0d4fa8;
  color: #fff;
}

.tab.active span {
  color: #fff;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 0 0 12px;
}

.section-heading h2 {
  margin: 0;
  color: #08275c;
  font-size: 28px;
  line-height: 1.1;
}

.section-heading span {
  color: #5a6778;
  font-size: 16px;
  font-weight: 800;
}

.works-area {
  display: grid;
  gap: 18px;
}

.work-section {
  display: grid;
  gap: 12px;
}

.work-section-title {
  margin: 0;
  color: #08275c;
  font-size: 22px;
  line-height: 1.2;
}

.work-section-title span {
  display: block;
  color: #5a6778;
  font-size: 14px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  overflow: hidden;
  border: 1px solid #cfe0ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(8, 39, 92, 0.1);
}

.work-card.selected {
  border-color: #0d4fa8;
  box-shadow: 0 0 0 3px rgba(13, 79, 168, 0.18), 0 12px 24px rgba(8, 39, 92, 0.12);
}

.cover-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e8f2ed;
}

.cover {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.play-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: rgba(13, 79, 168, 0.9);
  color: #fff;
}

.card-body {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
}

.work-code,
.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 7px;
  padding: 3px 8px;
  background: #0d4fa8;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.type-pill.comic {
  background: #f24622;
}

.card-body h3,
.title-zh,
.summary-id,
.summary-zh {
  margin: 0;
}

.card-body h3 {
  color: #08275c;
  font-size: 17px;
  line-height: 1.25;
}

.title-zh {
  color: #0d4fa8;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

.summary-id,
.summary-zh {
  color: #25374d;
  font-size: 13px;
  line-height: 1.4;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: #08275c;
  font-size: 14px;
  font-weight: 900;
}

.view-link {
  color: #0d4fa8;
  text-decoration: none;
}

.vote-button {
  width: 100%;
}

.work-card[data-category="comic"] .vote-button {
  background: #f24622;
}

.vote-button.selected,
.vote-button:disabled {
  background: #aab4c2;
  color: #fff;
}

.site-footer {
  max-width: 1440px;
  margin: 22px auto 0;
  padding: 14px 24px;
  background: #08336d;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}

.site-footer span:last-child {
  text-align: right;
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .status-group {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .main-layout {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .page-container {
    padding: 0 10px;
  }

  .site-header {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: auto;
    padding-top: 8px;
  }

  .logo-group {
    justify-content: center;
  }

  .logo-group img {
    height: 42px;
    max-width: 86px;
  }

  .title-id {
    font-size: 15px;
    line-height: 1.25;
  }

  .title-cn {
    font-size: 22px;
    line-height: 1.18;
  }

  .status-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .internal-badge {
    display: none;
  }

  .status-badge,
  .deadline-badge {
    justify-content: center;
    min-height: 32px;
    padding: 5px 7px;
    font-size: 11px;
    white-space: normal;
    text-align: center;
  }

  .theme-banner {
    min-height: 76px;
    margin-top: 10px;
    padding: 12px;
    gap: 10px;
    text-align: left;
  }

  .theme-icon {
    width: 38px;
    height: 44px;
    font-size: 22px;
  }

  .theme-id {
    font-size: 14px;
    line-height: 1.25;
  }

  .theme-cn {
    font-size: 22px;
    line-height: 1.18;
  }

  .main-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
  }

  .left-panel {
    position: static;
    order: 1;
    gap: 10px;
  }

  .content-panel {
    order: 2;
  }

  .panel-card {
    padding: 10px;
    border-radius: 12px;
  }

  .panel-card h2 {
    font-size: 18px;
  }

  .rules-panel li {
    padding: 8px 8px 8px 34px;
    font-size: 12px;
  }

  .category-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
  }

  .tab {
    min-height: 42px;
    padding: 5px 3px;
    font-size: 12px;
  }

  .tab span {
    font-size: 11px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 2px;
    margin: 4px 0 8px;
  }

  .section-heading h2 {
    font-size: 20px;
  }

  .section-heading span {
    font-size: 13px;
  }

  .works-area {
    gap: 14px;
  }

  .work-section-title {
    font-size: 17px;
  }

  .work-section-title span {
    font-size: 12px;
  }

  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .work-card {
    border-radius: 12px;
  }

  .card-body {
    padding: 8px;
  }

  .work-code,
  .type-pill {
    min-height: 18px;
    padding: 2px 5px;
    border-radius: 5px;
    font-size: 10px;
    line-height: 1.1;
  }

  .type-pill {
    display: none;
  }

  .card-body h3 {
    font-size: 13px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .title-zh {
    font-size: 12px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .summary-id,
  .summary-zh {
    display: none;
  }

  .card-meta {
    align-items: flex-start;
    margin-top: 2px;
    gap: 4px;
    font-size: 11px;
  }

  .view-link {
    display: none;
  }

  .vote-button {
    min-height: 34px;
    margin-top: 2px;
    border-radius: 8px;
    font-size: 13px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 14px;
    padding: 10px;
    text-align: center;
  }

  .site-footer span:last-child {
    text-align: center;
  }
}

/* Force left function panel order: rules, voting, ranking, summary */
.left-panel .rules-panel {
  order: 1 !important;
}

.left-panel .vote-window {
  order: 2 !important;
}

.left-panel .ranking-card {
  order: 3 !important;
}

.left-panel .stats-card {
  order: 4 !important;
}

/* Header title two-line balance override */
.site-header {
  grid-template-columns: 220px minmax(520px, 1fr) 420px;
  align-items: center;
  gap: 20px;
}

.title-group {
  min-width: 0;
  text-align: center;
}

.title-id {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  color: #123b7a;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

.title-cn {
  margin-top: 6px;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.2;
  color: #0b2f6b;
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
}

.status-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  justify-content: center;
}

.status-badge,
.deadline-badge,
.internal-badge {
  justify-content: center;
  white-space: normal;
  text-align: center;
}

@media (max-width: 1280px) {
  .site-header {
    grid-template-columns: 190px minmax(420px, 1fr) 360px;
  }

  .title-id {
    font-size: 18px;
  }

  .title-cn {
    font-size: 30px;
  }

  .status-badge,
  .deadline-badge,
  .internal-badge {
    font-size: 13px;
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .logo-group {
    justify-content: center;
  }

  .status-group {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .site-header {
    display: block;
  }

  .title-group {
    text-align: center;
    margin-top: 10px;
  }

  .title-id {
    font-size: 15px;
    line-height: 1.3;
  }

  .title-cn {
    font-size: 22px;
    line-height: 1.2;
  }

  .status-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 8px;
  }
}

/* Mobile overflow and touch comfort fix */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.page-container,
.site-footer {
  width: 100%;
}

@media (max-width: 768px) {
  .vote-button,
  .primary {
    min-height: 40px;
  }

  .title-id,
  .title-cn,
  .theme-id,
  .theme-cn,
  .rules-panel li,
  .vote-hint {
    overflow-wrap: anywhere;
  }
}

/* Final work-list grid override: PC 3 columns, mobile 2 columns */
.work-area .work-section {
  width: 100%;
  min-width: 0;
}

.work-area .works-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: start;
  width: 100%;
}

.work-area .work-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  border-radius: 14px;
  overflow: hidden;
}

.work-area .cover-box {
  width: 100%;
  aspect-ratio: 16 / 9 !important;
}

.work-area .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-area .card-body h3,
.work-area .title-zh {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-area .summary-id,
.work-area .summary-zh {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .work-area .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .work-area .work-card {
    border-radius: 12px;
  }

  .work-area .card-body {
    padding: 8px;
    gap: 6px;
  }

  .work-area .card-tags {
    gap: 4px;
  }

  .work-area .type-pill {
    display: none;
  }

  .work-area .card-body h3 {
    font-size: 13px;
    line-height: 1.3;
  }

  .work-area .title-zh {
    font-size: 12px;
    line-height: 1.3;
  }

  .work-area .summary-id,
  .work-area .summary-zh {
    display: none !important;
  }

  .work-area .card-meta {
    gap: 4px;
    font-size: 12px;
  }

  .work-area .vote-button {
    min-height: 38px;
    font-size: 13px;
    border-radius: 8px;
  }
}

/* Final work-card alignment override: equal media, equal text rhythm, bottom aligned buttons */
.work-area .works-grid {
  align-items: stretch !important;
  grid-auto-rows: 1fr;
}

.work-area .work-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

.work-area .cover-box {
  flex: 0 0 auto;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  background: #eef5f4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-area .cover {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block;
}

.work-area .play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.work-area .card-body {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0;
  padding: 12px;
  gap: 7px;
}

.work-area .card-tags {
  min-height: 28px;
  align-items: center;
}

.work-area .card-body h3 {
  min-height: 43px;
  margin: 0;
}

.work-area .title-zh {
  min-height: 38px;
  margin: 0;
}

.work-area .summary-id,
.work-area .summary-zh {
  min-height: 36px;
  margin: 0;
}

.work-area .card-meta {
  margin-top: auto !important;
  min-height: 28px;
  align-items: center;
}

.work-area .vote-button {
  margin-top: 8px !important;
  min-height: 42px;
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  .work-area .works-grid {
    align-items: stretch !important;
    grid-auto-rows: 1fr;
  }

  .work-area .cover-box {
    aspect-ratio: 16 / 9 !important;
    border-radius: 12px 12px 0 0;
  }

  .work-area .card-body {
    padding: 8px;
    gap: 5px;
  }

  .work-area .card-tags {
    min-height: 22px;
  }

  .work-area .work-code {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .work-area .card-body h3 {
    min-height: 34px;
  }

  .work-area .title-zh {
    min-height: 32px;
  }

  .work-area .summary-id,
  .work-area .summary-zh {
    display: none !important;
    min-height: 0;
  }

  .work-area .card-meta {
    min-height: 24px;
    margin-top: auto !important;
  }

  .work-area .vote-button {
    min-height: 38px;
    margin-top: 6px !important;
  }
}

/* Unit select dropdown readability fix */
#unitSelect,
#unitSelect optgroup,
#unitSelect option,
.vote-window select,
.vote-window select optgroup,
.vote-window select option {
  color: #111827 !important;
  background-color: #ffffff !important;
  -webkit-text-fill-color: #111827 !important;
}

#unitSelect optgroup,
.vote-window select optgroup {
  color: #0f172a !important;
  background-color: #ffffff !important;
  font-weight: 700;
}

#unitSelect option:checked,
#unitSelect option:hover,
.vote-window select option:checked,
.vote-window select option:hover {
  color: #111827 !important;
  background-color: #e8f1ff !important;
  -webkit-text-fill-color: #111827 !important;
}

@media (max-width: 768px) {
  #unitSelect,
  #unitSelect optgroup,
  #unitSelect option,
  .vote-window select,
  .vote-window select optgroup,
  .vote-window select option {
    color: #111827 !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #111827 !important;
  }
}

/* Mobile custom unit picker */
.unit-mobile-select {
  display: none;
}

@media (max-width: 768px) {
  #unitSelect {
    display: none !important;
  }

  .unit-mobile-select {
    display: block;
    position: relative;
  }

  .unit-select-trigger {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid #c7d7e8;
    border-radius: 10px;
    background: #ffffff;
    color: #111827 !important;
    text-align: left;
    font: inherit;
  }

  .unit-trigger-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .unit-trigger-text strong {
    color: #111827 !important;
    font-size: 15px;
    line-height: 1.25;
  }

  .unit-trigger-text small {
    color: #374151 !important;
    font-size: 13px;
    line-height: 1.25;
  }

  .unit-trigger-arrow {
    flex: 0 0 auto;
    color: #111827 !important;
    font-size: 18px;
    font-weight: 900;
  }

  .unit-select-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 23, 42, 0.22);
  }

  .unit-select-menu {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 91;
    max-height: min(72vh, 620px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    background: #ffffff !important;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.25);
    color: #111827 !important;
  }

  .unit-select-menu[hidden],
  .unit-select-backdrop[hidden] {
    display: none !important;
  }

  .unit-select-menu-head {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #0f172a !important;
    font-size: 17px;
    font-weight: 900;
    text-align: left;
  }

  .unit-group-title {
    padding: 14px 16px 8px;
    background: #ffffff;
    color: #0f172a !important;
    text-align: left;
    font-weight: 900;
  }

  .unit-group-title span,
  .unit-group-title small {
    display: block;
    color: #0f172a !important;
    line-height: 1.3;
  }

  .unit-group-title span {
    font-size: 15px;
  }

  .unit-group-title small {
    margin-top: 2px;
    font-size: 13px;
    color: #334155 !important;
  }

  .unit-option {
    width: 100%;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff !important;
    color: #111827 !important;
    text-align: left;
    font: inherit;
  }

  .unit-option:last-child {
    border-bottom: 0;
  }

  .unit-option-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .unit-id,
  .unit-cn {
    display: block;
    width: 100%;
    color: #111827 !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .unit-id {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
  }

  .unit-cn {
    margin-top: 3px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #374151 !important;
  }

  .unit-radio {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: 2px solid #64748b;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 0 0 4px #ffffff;
  }

  .unit-option.selected {
    background: #eff6ff !important;
  }

  .unit-option.selected .unit-radio {
    border-color: #0f55b5;
    background: #0f55b5;
    box-shadow: inset 0 0 0 5px #ffffff;
  }
}

/* Media file display: PDF label */
.work-area .play-badge.pdf-badge {
  width: auto;
  min-width: 52px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  background: rgba(220, 38, 38, 0.95);
}
