:root {
  color-scheme: light;
  --ink: #121820;
  --muted: #66727d;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --line: rgba(25, 38, 47, 0.12);
  --navy: #111923;
  --jade: #0f766e;
  --copper: #b65b3b;
  --gold: #c79a3b;
  --blue: #2f5d86;
  --mist: #eef3f0;
  --shadow: 0 24px 70px rgba(17, 25, 35, 0.14);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "SF Pro Display", "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.08), transparent 34%),
    radial-gradient(circle at 85% 6%, rgba(199, 154, 59, 0.2), transparent 30%),
    #e9efed;
  letter-spacing: 0;
}

body.site-auth-only {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

html.modal-open,
body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.site-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(17, 25, 35, 0.94), rgba(15, 118, 110, 0.78)),
    var(--navy);
}

.site-auth-gate[hidden] {
  display: none;
}

.site-auth-card {
  width: min(460px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 30px;
}

.site-auth-logo {
  display: block;
  width: 116px;
  height: auto;
  margin: 0 auto 18px;
}

.site-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.site-auth-tabs button {
  border: 1px solid var(--line);
  background: #f4f8f7;
  color: #38535f;
  border-radius: 6px;
  padding: 10px 12px;
  font-weight: 700;
}

.site-auth-tabs button.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), var(--jade));
  color: #fff;
}

.site-auth-card h1 {
  margin: 4px 0 18px;
  font-size: 28px;
}

.site-auth-card form {
  display: grid;
  gap: 14px;
}

.site-auth-secondary {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.site-auth-link {
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.site-auth-link:hover {
  text-decoration: underline;
}

.site-auth-card label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #41545c;
}

.site-auth-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
}

.site-auth-message {
  min-height: 20px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.member-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: #285463;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: clamp(248px, 17vw, 292px) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px;
  color: #f8f3e7;
  background:
    linear-gradient(180deg, rgba(199, 154, 59, 0.12), transparent 34%),
    var(--navy);
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup {
  width: 100%;
  max-width: 226px;
  aspect-ratio: 680 / 360;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 20px;
}

.brand span {
  margin-top: 3px;
  color: #b8c7c8;
  font-size: 12px;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-list a {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #d7e2df;
  text-decoration: none;
  border-radius: 8px;
}

.nav-list a:hover,
.nav-list a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-list span {
  width: 24px;
  text-align: center;
}

.sidebar-panel {
  margin-top: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-panel span,
.sidebar-panel p {
  color: #c7d5d2;
}

.sidebar-panel strong {
  display: block;
  margin-top: 8px;
  font-size: 38px;
  color: #f2c166;
}

.sidebar-panel p {
  margin: 8px 0 0;
  line-height: 1.6;
  font-size: 14px;
}

.contact-panel {
  display: grid;
  gap: 10px;
}

.contact-panel p {
  margin: 0;
}

.contact-panel b {
  color: #eef6f2;
  font-weight: 850;
}

.contact-panel a {
  color: #f2c166;
  font-weight: 760;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-panel a:hover {
  text-decoration: underline;
}

.qr-placeholder {
  width: 104px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-top: 4px;
  border: 1px dashed rgba(242, 193, 102, 0.62);
  border-radius: 8px;
  color: #d4dfdc;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  text-align: center;
}

.qr-placeholder img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 6px;
  object-fit: contain;
  background: #ffffff;
}

.workspace {
  min-width: 0;
  padding: clamp(18px, 2vw, 28px);
}

.topbar {
  min-height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar-title {
  min-width: 0;
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.topbar-logo {
  width: 146px;
  max-height: 86px;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
  border: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--copper);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 44px;
  line-height: 1.12;
}

h2 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.24;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.35;
}

.top-actions,
.search-row,
.filters,
.control-grid,
.progress-list,
.button-row {
  display: flex;
  gap: 10px;
}

.primary-button,
.secondary-button,
.icon-button,
.filter-chip {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.language-switcher {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.language-switcher button {
  min-width: 52px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.language-switcher button.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--jade), #174f74);
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--jade), #174f74);
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.22);
}

.secondary-button,
.filter-chip {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.filter-chip {
  font-weight: 760;
}

.icon-button {
  width: 42px;
  padding: 0;
  color: var(--ink);
  background: var(--panel-solid);
  border: 1px solid var(--line);
}

.wide {
  width: 100%;
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.filter-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 30px;
  align-items: center;
  padding: 30px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 236, 221, 0.86)),
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(199, 154, 59, 0.12));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-visual,
.insight-panel,
.library-section,
.ai-section {
  display: none;
}

.system-pill {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #174f74;
  background: rgba(47, 93, 134, 0.1);
  font-size: 13px;
  font-weight: 800;
}

.system-pill[hidden] {
  display: none !important;
}

.hero-copy h2 {
  max-width: 820px;
  font-size: 44px;
  line-height: 1.08;
}

.hero-logo {
  width: min(100%, 430px);
  max-height: 230px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 18px;
  border-radius: 8px;
  border: 1px solid rgba(17, 25, 35, 0.08);
  box-shadow: 0 18px 38px rgba(17, 25, 35, 0.08);
}

.hero-copy p {
  max-width: 680px;
  margin: 16px 0 22px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 16px;
}

.company-intro {
  width: 100%;
  max-width: none;
  color: #344955;
  line-height: 1.9;
  font-size: 18px;
}

.company-intro p {
  max-width: none;
  margin: 15px 0;
}

.company-intro ul {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
  padding: 0;
  list-style: none;
}

.company-intro li {
  position: relative;
  padding-left: 18px;
  color: #344955;
  line-height: 1.85;
}

.company-intro li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.company-intro strong {
  color: #102433;
}

.command-search {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.search-in-results {
  margin: 0 0 18px;
  padding: 12px 16px;
  background: #ffffff;
  border-color: var(--line);
}

.search-in-results .search-row {
  width: min(100%, 980px);
}

.search-in-results .primary-button {
  min-width: 150px;
}

.command-search label,
.ai-form label {
  display: block;
  margin-bottom: 8px;
  color: #40515a;
  font-weight: 750;
}

.search-row input,
.ai-form textarea,
.ai-form select,
.ai-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}

.search-row input,
.ai-form input,
.ai-form select {
  min-height: 46px;
  padding: 0 14px;
}

.hero-visual {
  position: relative;
  min-height: 372px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(145deg, #101923, #253846);
}

.hero-visual.activity-video-shell {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  background: transparent;
}

.hero-visual img {
  width: min(96%, 560px);
  filter: drop-shadow(0 28px 34px rgba(0, 0, 0, 0.3));
}

.hero-activity-card {
  width: 100%;
  height: 100%;
  min-height: 372px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  color: #ffffff;
}

.hero-activity-card.hero-activity-clean {
  position: relative;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  padding: 0;
  min-height: 0;
  background: transparent;
}

.hero-media-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #05090c;
  cursor: pointer;
}

.hero-carousel-media,
.hero-media-stage img.hero-carousel-media,
.hero-media-stage video.hero-carousel-media {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  object-position: center center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  filter: none;
}

.hero-carousel-video {
  cursor: default;
}

.hero-video-media {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.hero-media-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(17, 25, 35, 0.42);
  font-size: 30px;
  line-height: 1;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 180ms ease, background 180ms ease, transform 180ms ease;
}

.hero-media-nav.prev {
  left: 16px;
}

.hero-media-nav.next {
  right: 16px;
}

.hero-activity-clean:hover .hero-media-nav,
.hero-media-nav:focus-visible {
  opacity: 1;
}

.hero-media-nav:hover {
  background: rgba(17, 25, 35, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hero-media-dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 3;
  display: flex;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(17, 25, 35, 0.38);
  transform: translateX(-50%);
}

.hero-media-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.56);
}

.hero-media-dots button.active {
  width: 22px;
  border-radius: 999px;
  background: #ffffff;
}

.hero-activity-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.hero-activity-heading span {
  color: #b8c7c8;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-activity-heading strong {
  font-size: 18px;
}

.hero-activity-video {
  width: 100%;
  min-height: 240px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #05090c;
}

.hero-activity-media {
  width: 100%;
  min-height: 280px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
}

.hero-activity-media img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
  filter: none;
}

.hero-activity-media:hover img {
  transform: scale(1.02);
}

.hero-activity-player {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  object-position: center center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.hero-video-fallback {
  position: relative;
  overflow: hidden;
  padding: 0;
  color: #ffffff;
}

.hero-video-fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.hero-video-fallback span {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(17, 25, 35, 0.82);
}

.hero-activity-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  text-align: left;
}

.hero-activity-title span {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: #f2c166;
}

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

.floating-stat {
  position: absolute;
  padding: 12px 14px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(17, 25, 35, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.floating-stat.top {
  top: 20px;
  right: 20px;
}

.floating-stat.bottom {
  left: 20px;
  bottom: 20px;
}

.floating-stat span {
  display: block;
  color: #b8c7c8;
  font-size: 12px;
}

.floating-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.metrics-grid article,
.results-panel,
.insight-panel,
.library-section,
.ai-section,
.draft-panel,
.form-card {
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.metrics-grid article {
  padding: 18px;
  backdrop-filter: blur(14px);
}

.metrics-grid span,
.media-card span,
.video-copy span,
.draft-panel span,
.api-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.metrics-grid strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--blue);
  font-size: 32px;
}

.metrics-grid p,
.lot-card p,
.media-card p,
.video-copy p,
.draft-panel p,
.form-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.results-panel,
.insight-panel,
.library-section,
.ai-section {
  padding: 22px;
  backdrop-filter: blur(14px);
  scroll-margin-top: 22px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 12px;
}

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

.filters {
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.filter-chip.active {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.sub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 12px;
}

.sub-filters[hidden] {
  display: none;
}

.sub-filter-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #40515a;
  background: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 760;
}

.sub-filter-chip:hover,
.sub-filter-chip.active {
  color: #ffffff;
  background: var(--jade);
  border-color: var(--jade);
}

.year-filter {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.year-filter label {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #40515a;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.year-filter select {
  height: 32px;
  min-width: 92px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 750;
}

.year-filter-end select {
  min-width: 78px;
}

.year-range-separator {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.year-reset {
  width: 32px;
  min-height: 32px;
  height: 32px;
  border-radius: 7px;
  font-size: 18px;
}

.sort-filter {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: #40515a;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.sort-filter select {
  height: 32px;
  min-width: 128px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 750;
}

.category-samples {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.sample-group,
.sample-empty {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.sample-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.sample-empty span,
.sample-empty a {
  color: var(--muted);
  line-height: 1.6;
}

.sample-empty a {
  color: var(--jade);
  font-weight: 800;
}

.sample-group-head {
  width: 100%;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.sample-group-head strong {
  font-size: 14px;
}

.sample-group-head span,
.sample-muted {
  color: var(--muted);
  font-size: 12px;
}

.sample-file-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.sample-file-list button {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(25, 38, 47, 0.08);
  border-radius: 8px;
  color: var(--ink);
  background: #f7faf8;
  text-align: left;
}

.sample-file-list button:hover {
  border-color: rgba(15, 118, 110, 0.28);
  background: #eef6f3;
}

.sample-file-list span,
.sample-file-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sample-file-list span {
  font-weight: 800;
}

.sample-file-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.lot-list {
  display: grid;
  gap: 12px;
  max-height: clamp(560px, 65vh, 760px);
  padding-right: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.lot-list::-webkit-scrollbar {
  width: 10px;
}

.lot-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(218, 225, 220, 0.72);
}

.lot-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(218, 225, 220, 0.72);
  border-radius: 999px;
  background: #93a2a2;
}

.lot-list::-webkit-scrollbar-thumb:hover {
  background: #657777;
}

.lot-card {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  content-visibility: auto;
  contain-intrinsic-size: 178px;
}

.record-preview-fallback {
  display: grid;
  width: 154px;
  aspect-ratio: 1.35 / 1;
  place-items: center;
  border: 1px solid rgba(89, 106, 110, 0.18);
  border-radius: 6px;
  color: #53656a;
  background: #edf1ef;
  cursor: pointer;
  overflow: hidden;
}

.record-preview-fallback:hover {
  color: #24383d;
  background: #e1e9e5;
}

.record-preview-fallback strong {
  max-width: calc(100% - 20px);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  overflow-wrap: anywhere;
}

.render-fallback-card .detail-button {
  margin-top: 10px;
}

.lot-card img,
.lot-card video {
  width: 154px;
  aspect-ratio: 1.35 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: #dfe5e2;
}

.record-preview-button {
  position: relative;
  width: 154px;
  align-self: start;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #172027;
  overflow: hidden;
}

.record-preview-button img {
  width: 100%;
  display: block;
}

.word-doc-thumbnail {
  position: relative;
  width: 154px;
  aspect-ratio: 1.35 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(145deg, #7a7f82, #5f666b);
}

.word-doc-page {
  position: relative;
  width: 58%;
  height: 72%;
  margin-top: -10px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.word-doc-page::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #dfe5ec 0 50%, transparent 51%);
  border-bottom-left-radius: 6px;
}

.word-doc-page span {
  position: absolute;
  left: 48%;
  right: 12%;
  height: 7px;
  border-radius: 999px;
  background: #e6edf5;
}

.word-doc-page span:nth-child(1) {
  top: 38%;
}

.word-doc-page span:nth-child(2) {
  top: 52%;
}

.word-doc-page span:nth-child(3) {
  left: 24%;
  top: 70%;
}

.word-doc-badge {
  position: absolute;
  left: 18px;
  top: 28px;
  width: 70px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #2f80ed, #0b5bd3);
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 22px rgba(11, 91, 211, 0.3);
}

.word-doc-thumbnail strong {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 5px;
  overflow: hidden;
  color: #ffffff;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.media-entry-button:hover .word-doc-thumbnail {
  filter: brightness(1.04);
}

.lot-card img.journal-cover {
  object-fit: contain;
  object-position: center top;
  background: #f4f0e7;
}

.lot-card img.pdf-cover {
  object-fit: contain;
  object-position: center top;
  background: #f4f0e7;
}

.media-entry-button:hover img {
  transform: scale(1.02);
}

.record-preview-button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.4);
  outline-offset: 3px;
}

.record-preview-button img {
  transition: transform 0.18s ease;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: #111923;
  background: rgba(242, 193, 102, 0.94);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.lot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.lot-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #40515a;
  background: #eef3f1;
  font-size: 12px;
  font-weight: 750;
}

.raw-file-card h3 {
  overflow-wrap: anywhere;
}

.raw-file-card .lot-meta span {
  max-width: min(100%, 520px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raw-file-card p {
  overflow-wrap: anywhere;
}

.auction-lot-grid {
  display: grid;
  grid-template-columns:
    minmax(100px, 0.72fr)
    minmax(120px, 0.85fr)
    minmax(190px, 1.25fr)
    minmax(150px, 1fr)
    minmax(150px, 1fr);
  width: 100%;
  gap: 8px;
  margin: 12px 0 10px;
  background: transparent;
}

.auction-lot-content {
  min-width: 0;
  max-width: 100%;
  container: auction-lot / inline-size;
}

.auction-lot-content h3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.auction-lot-cell {
  min-width: 0;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  color: #25313a;
  font-size: 12px;
  line-height: 1.42;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.auction-lot-cell.lot-no {
  background: #edf4f3;
}

.auction-lot-cell.grade {
  background: #f0f3ea;
}

.auction-lot-cell.cert {
  background: #f4f0e7;
}

.auction-lot-cell.currency {
  background: #eef2f8;
}

.auction-lot-cell.realized-price {
  background: #f7f0ed;
}

.auction-lot-label {
  min-height: 0;
  display: flex;
  align-items: center;
  color: #62717a;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.22;
}

.auction-lot-value {
  color: #1f2d35;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.auction-search-match {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 7px 0 0;
  color: #41515a;
  font-size: 12px;
  line-height: 1.4;
}

.auction-search-match span {
  color: #0f5f66;
  font-weight: 800;
}

.auction-search-match strong {
  min-width: 0;
  color: #24323a;
  overflow-wrap: anywhere;
}

.auction-group-card {
  --auction-media-width: clamp(260px, 22vw, 320px);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-columns: var(--auction-media-width) minmax(0, 1fr);
}

.auction-group-media {
  width: var(--auction-media-width);
  display: grid;
  gap: 12px;
  align-content: start;
}

.auction-series-frame {
  position: relative;
  width: 100%;
}

.auction-series-frame.is-loading::after,
.image-lightbox.is-loading::after {
  content: "";
  position: absolute;
  z-index: 4;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.56);
  border-top-color: #167d6b;
  border-radius: 50%;
  pointer-events: none;
  animation: image-preview-spin 0.75s linear infinite;
}

.auction-series-frame.is-loading::after {
  top: 14px;
  right: 14px;
  background: rgba(17, 25, 35, 0.38);
  box-shadow: 0 0 0 6px rgba(17, 25, 35, 0.38);
}

@keyframes image-preview-spin {
  to { transform: rotate(360deg); }
}

.auction-group-media .record-preview-button {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: #f8faf9;
}

.auction-group-media .record-preview {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  background: #ffffff;
}

.auction-series-nav {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 44px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 0;
  color: #ffffff;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 2px 8px rgba(17, 25, 35, 0.72);
  font-size: 31px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.auction-series-nav:hover {
  color: #0f766e;
  background: transparent;
}

.auction-series-nav.prev {
  left: -4px;
}

.auction-series-nav.next {
  right: -4px;
}

.auction-series-count {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 25, 35, 0.62);
  font-size: 12px;
  font-weight: 800;
  z-index: 2;
}

.auction-group-video-actions {
  display: grid;
  gap: 10px;
}

.auction-group-video-button {
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 7px;
  color: #0f5f66;
  background: #f5fbf9;
  font-weight: 800;
  cursor: pointer;
}

.auction-group-video-button:hover {
  color: #ffffff;
  background: #0f766e;
}

.auction-lot-cell.description {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  display: block;
  min-height: 0;
  padding: 10px 12px;
  align-items: stretch;
  justify-content: initial;
  justify-items: stretch;
  text-align: left;
  background: #eef2f6;
}

.auction-description-content {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: left;
}

.lot-card .auction-description-row {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  margin-left: 0;
  margin-right: 0;
  color: #35434c;
  font-size: 13.5px;
  line-height: 1.43;
  overflow-wrap: anywhere;
  white-space: pre-line;
  text-align: left;
}

.lot-card .auction-description-row + .auction-description-row {
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid rgba(99, 116, 129, 0.16);
}

.lot-card .auction-description-row.english-line {
  color: #4e5d66;
}

.lot-card .auction-description-row mark {
  padding: 0 2px;
  border-radius: 3px;
  color: inherit;
  background: rgba(242, 193, 102, 0.42);
}

.auction-lot-cell.description.is-collapsible:not(.is-expanded) .auction-description-content {
  max-height: 214px;
  overflow: hidden;
}

.auction-lot-cell.description.is-collapsible:not(.is-expanded) .auction-description-content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(238, 242, 246, 0), #eef2f6 82%);
}

.auction-description-toggle {
  min-height: 30px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  color: #0f6f72;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
}

.auction-description-toggle:hover {
  color: #0a4f53;
  text-decoration: underline;
}

.auction-lot-cell.lot-no,
.auction-lot-cell.grade,
.auction-lot-cell.cert,
.auction-lot-cell.currency,
.auction-lot-cell.realized-price {
  align-items: center;
  text-align: center;
}

.auction-lot-cell.lot-no .auction-lot-label,
.auction-lot-cell.grade .auction-lot-label,
.auction-lot-cell.cert .auction-lot-label,
.auction-lot-cell.currency .auction-lot-label,
.auction-lot-cell.realized-price .auction-lot-label {
  justify-content: center;
  text-align: center;
}

@container auction-lot (max-width: 760px) {
  .auction-lot-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .auction-lot-cell.lot-no,
  .auction-lot-cell.grade,
  .auction-lot-cell.cert {
    grid-column: span 2;
  }

  .auction-lot-cell.currency,
  .auction-lot-cell.realized-price {
    grid-column: span 3;
  }
}

@container auction-lot (max-width: 560px) {
  .auction-lot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auction-lot-cell.lot-no,
  .auction-lot-cell.grade,
  .auction-lot-cell.currency,
  .auction-lot-cell.realized-price {
    grid-column: span 1;
  }

  .auction-lot-cell.cert,
  .auction-lot-cell.description {
    grid-column: 1 / -1;
  }

  .lot-card .auction-description-row {
    font-size: 13px;
  }
}

.image-file-card {
  grid-template-columns: 168px minmax(0, 1fr);
  padding: 16px;
}

.image-file-card .record-preview-button,
.image-file-card .record-preview {
  width: 168px;
}

.image-file-card.auction-group-card {
  grid-template-columns: var(--auction-media-width) minmax(0, 1fr);
}

.image-file-card.auction-group-card .record-preview-button,
.image-file-card.auction-group-card .record-preview {
  width: 100%;
}

.lot-price {
  color: var(--copper);
  font-weight: 850;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.raw-file-card .file-list a[href$=".doc"],
.raw-file-card .file-list a[href$=".docx"],
.raw-file-card .file-list a[href$=".xls"],
.raw-file-card .file-list a[href$=".xlsx"],
.raw-file-card .file-list a[href$=".csv"],
.raw-file-card .file-list a[href$=".tsv"],
.raw-file-card .file-list a[href$=".txt"],
.raw-file-card .file-list a[href$=".md"],
.raw-file-card .file-list a[href$=".log"] {
  display: none;
}

.file-list a,
.file-list button,
.file-list span,
.inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #40515a;
  background: #eef3f1;
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
  border: 0;
}

.file-list a:hover,
.file-list button:hover,
.inline-link:hover {
  color: var(--jade);
  background: #e2eeea;
}

.detail-button {
  margin-top: 14px;
}

.record-title-button {
  max-width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.record-title-button:hover {
  color: var(--jade);
}

.forum-package-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.forum-package-counts span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(49, 96, 91, 0.1);
  border-radius: 999px;
  color: #40515a;
  background: #eef3f1;
  font-size: 12px;
  font-weight: 760;
}

.forum-package-counts strong {
  color: var(--ink);
  font-size: 12px;
}

.insight-card {
  padding: 16px;
  border-radius: 8px;
  background: #f4f0e7;
  border-left: 4px solid var(--gold);
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--jade);
}

.timeline {
  margin-top: 18px;
}

.timeline ol {
  margin: 12px 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.timeline li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.timeline strong {
  color: var(--jade);
}

.timeline span {
  color: var(--muted);
  line-height: 1.55;
}

.library-section,
.ai-section {
  margin-top: 18px;
}

.ai-section {
  display: block;
  min-height: calc(100vh - 72px);
}

.media-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: 14px;
}

.media-card {
  min-height: 228px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.cover-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.media-card img,
.media-card video {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 6px;
  background: #eef0ec;
}

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.text-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(145deg, rgba(238, 245, 242, 0.92), rgba(255, 255, 255, 0.72));
}

.text-card.accent {
  background: linear-gradient(145deg, rgba(245, 238, 233, 0.94), rgba(255, 255, 255, 0.7));
}

.video-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 18px;
  align-items: center;
}

.video-layout img,
.video-layout video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #172027;
}

.progress-list {
  flex-wrap: wrap;
  margin-top: 16px;
}

.progress-list span {
  padding: 8px 10px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-size: 13px;
}

.api-status {
  padding: 8px 10px;
  border-radius: 999px;
  color: #174f74;
  background: rgba(47, 93, 134, 0.1);
}

.api-status.online {
  color: #0f5f56;
  background: rgba(15, 118, 110, 0.12);
}

.api-status.error {
  color: #9a3f2b;
  background: rgba(182, 91, 59, 0.12);
}

.ai-progress {
  display: grid;
  gap: 9px;
  margin: -4px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.09), rgba(199, 154, 59, 0.08)),
    rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 24px rgba(17, 25, 35, 0.06);
}

.ai-progress[hidden] {
  display: none;
}

.ai-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #33434c;
  font-size: 13px;
  font-weight: 820;
}

.ai-progress-head strong {
  min-width: 42px;
  color: var(--jade);
  text-align: right;
  font-size: 13px;
}

.ai-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(25, 38, 47, 0.11);
}

.ai-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), var(--gold));
  transition: width 0.34s ease;
}

.ai-progress.complete {
  border-color: rgba(15, 118, 110, 0.3);
  background: rgba(15, 118, 110, 0.08);
}

.ai-progress.error {
  border-color: rgba(182, 91, 59, 0.32);
  background: rgba(182, 91, 59, 0.08);
}

.ai-progress.error .ai-progress-head strong {
  color: var(--copper);
}

.ai-progress.error .ai-progress-bar {
  background: linear-gradient(90deg, var(--copper), #d3924d);
}

.ai-workbench {
  display: grid;
  grid-template-columns: minmax(520px, 0.95fr) minmax(360px, 1.05fr);
  gap: 18px;
  min-height: 520px;
}

.ai-form {
  display: grid;
  gap: 14px;
}

.form-card,
.draft-panel,
.draft-preview {
  padding: 18px;
}

.form-card,
.draft-preview {
  min-height: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.form-card h3 {
  margin-bottom: 8px;
}

.draft-preview {
  display: grid;
  align-content: start;
  gap: 12px;
}

.draft-preview > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.draft-preview h3 {
  font-size: 26px;
  line-height: 1.25;
}

.draft-preview p {
  max-width: 980px;
  color: #344955;
  font-size: 16px;
  line-height: 1.8;
  white-space: pre-wrap;
}

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

.draft-preview li {
  padding: 9px 11px;
  border-radius: 8px;
  color: #344955;
  background: rgba(47, 93, 134, 0.08);
}

.source-index-link {
  color: #0f5f66;
  font-weight: 800;
  text-decoration: none;
}

.source-index-link:hover {
  text-decoration: underline;
}

.source-index-pages {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.source-index-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #0f5f66;
  background: #e3f0ed;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.source-index-chip:hover {
  color: #ffffff;
  background: #0f766e;
}

.ai-form textarea {
  resize: vertical;
  min-height: 132px;
  padding: 14px;
}

.control-grid {
  margin: 14px 0;
}

.control-grid label {
  flex: 1;
}

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

.ai-form .button-row {
  margin-top: 14px;
}

.proxy-label {
  margin-top: 10px;
}

.button-row {
  flex-wrap: wrap;
  margin-top: 14px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  margin-top: 18px;
  padding: 16px 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.site-footer strong {
  color: #21323b;
}

.site-footer span {
  display: inline-flex;
  margin-right: 16px;
}

.draft-panel {
  min-height: 100%;
  background:
    linear-gradient(145deg, rgba(17, 25, 35, 0.96), rgba(35, 52, 63, 0.95)),
    #172027;
  color: #ffffff;
}

.draft-panel span,
.draft-panel p,
.draft-panel li {
  color: #c8d4d0;
}

.draft-panel ul {
  margin: 16px 0 0;
  padding-left: 20px;
  line-height: 1.7;
}

.raw-output {
  white-space: pre-wrap;
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  color: #d8e8e4;
  background: rgba(0, 0, 0, 0.2);
  overflow: auto;
}

.record-modal[hidden] {
  display: none;
}

.video-player-modal[hidden] {
  display: none;
}

.video-player-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  overscroll-behavior: none;
}

.video-player-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 12, 0.76);
  backdrop-filter: blur(10px);
  touch-action: none;
}

.video-player-panel {
  position: relative;
  width: min(1180px, 100%);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  color: #ffffff;
  background: #111923;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  overscroll-behavior: contain;
}

.video-player-topbar {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 2px 2px 8px;
}

.video-player-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.video-player-download,
.video-download-link,
.embedded-video-download,
.auction-group-video-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 7px;
  color: #0f5f66;
  background: #f5fbf9;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.video-player-download {
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.video-player-download:hover,
.video-download-link:hover,
.embedded-video-download:hover,
.auction-group-video-download:hover {
  color: #ffffff;
  background: #0f766e;
}

.video-player-panel h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-player-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 28px;
  line-height: 1;
}

.video-player-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.video-player-body video,
.video-player-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 110px);
  display: block;
  border-radius: 8px;
  background: #05090c;
}

.video-player-placeholder {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #ffffff;
}

.video-player-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.video-player-placeholder span {
  position: relative;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(17, 25, 35, 0.82);
}

.record-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  overscroll-behavior: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 13, 18, 0.62);
  backdrop-filter: blur(8px);
  touch-action: none;
}

.detail-panel {
  position: relative;
  width: min(1180px, 100%);
  max-height: min(880px, calc(100vh - 48px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-radius: 8px;
  background: #f7f9f7;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  overscroll-behavior: none;
}

.record-modal.pdf-focus .detail-panel {
  width: min(96vw, 1800px);
  height: min(96vh, 1120px);
  max-height: calc(100vh - 24px);
  grid-template-rows: minmax(0, 1fr);
}

.record-modal.document-focus .detail-panel {
  width: min(96vw, 1800px);
  height: min(94vh, 1080px);
  max-height: calc(100vh - 24px);
}

.record-modal.pdf-focus .detail-header,
.record-modal.pdf-focus .detail-tabs {
  display: none;
}

.record-modal.pdf-focus .detail-body {
  padding: 10px;
  overflow: hidden;
}

.record-modal.pdf-focus .pdf-search-results {
  display: none;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--navy);
  font-size: 28px;
  line-height: 1;
}

.record-modal.pdf-focus .modal-close {
  top: 26px;
}

.detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  padding: 26px 76px 18px 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 244, 241, 0.9)),
    #ffffff;
  border-bottom: 1px solid var(--line);
}

.detail-header h2 {
  max-width: 760px;
}

.detail-header p {
  max-width: 860px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-summary-toggle {
  display: none;
}

.detail-summary-toggle[hidden] {
  display: none !important;
}

.detail-meta {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.detail-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  color: #40515a;
  background: #e7efeb;
  font-size: 12px;
  font-weight: 780;
}

.detail-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.detail-tabs[hidden] {
  display: none !important;
}

.detail-tabs button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #f6f8f7;
  white-space: nowrap;
}

.detail-tabs button.active {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.detail-tabs span {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px;
}

.detail-body {
  overflow: auto;
  padding: 18px;
  overscroll-behavior: contain;
}

.record-modal.document-focus .detail-body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: 14px;
}

.detail-body:has(.pdf-reader) {
  overflow: hidden;
}

.detail-note {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.image-gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.image-gallery-toolbar .detail-note {
  margin: 0;
}

.image-gallery-mode {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #eef3f1;
}

.image-gallery-mode button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.image-gallery-mode button.active {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.18);
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.image-gallery button {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #ffffff;
  text-align: left;
}

.image-gallery button:hover {
  border-color: rgba(15, 118, 110, 0.3);
  background: #f4faf7;
}

.image-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: #e5ebe8;
}

.image-gallery-preview {
  position: relative;
  display: block;
  color: inherit;
}

.image-gallery-preview em {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 25, 35, 0.72);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.image-gallery span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-gallery > button > span:last-child {
  color: var(--ink);
  font-weight: 750;
}

.image-gallery-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.image-gallery-footer button {
  min-width: 150px;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(5, 9, 12, 0.9);
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.image-lightbox.is-loading::after {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 83;
  transform: translateX(-50%);
  animation-name: image-preview-spin-centered;
}

@keyframes image-preview-spin-centered {
  to { transform: translateX(-50%) rotate(360deg); }
}

.image-lightbox img {
  --lightbox-scale: 1;
  --lightbox-pan-x: 0px;
  --lightbox-pan-y: 0px;
  max-width: min(94vw, 1500px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 6px;
  background: #111923;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  transform: translate(var(--lightbox-pan-x), var(--lightbox-pan-y)) scale(var(--lightbox-scale));
  transition: transform 0.16s ease;
  user-select: none;
  touch-action: none;
  cursor: zoom-in;
}

.image-lightbox.is-zoomed img {
  cursor: grab;
}

.image-lightbox.is-zoomed .lightbox-nav {
  opacity: 0;
  pointer-events: none;
}

.image-lightbox.is-zoomed img:active {
  cursor: grabbing;
}

.image-lightbox.is-panning img {
  transition: none;
}

.lightbox-close,
.lightbox-fullscreen,
.lightbox-nav,
.lightbox-ocr {
  position: fixed;
  z-index: 82;
  border: 0;
  color: #ffffff;
  background: rgba(17, 25, 35, 0.82);
  backdrop-filter: blur(10px);
}

.lightbox-close,
.lightbox-fullscreen {
  top: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 28px;
}

.lightbox-close {
  right: 20px;
}

.lightbox-fullscreen {
  right: 80px;
  font-size: 22px;
}

.lightbox-ocr {
  top: 20px;
  right: 140px;
  min-width: 78px;
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.lightbox-zoom-control {
  position: fixed;
  left: 50%;
  bottom: 62px;
  z-index: 82;
  width: min(470px, calc(100vw - 44px));
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) 56px;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  padding: 9px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 25, 35, 0.82);
  backdrop-filter: blur(10px);
}

.lightbox-zoom-control button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.lightbox-zoom-control input {
  width: 100%;
  accent-color: var(--jade);
}

.lightbox-zoom-control span {
  font-size: 12px;
  font-weight: 850;
  text-align: right;
}

.lightbox-hint {
  position: fixed;
  left: 50%;
  bottom: 112px;
  z-index: 82;
  transform: translateX(-50%);
  padding: 7px 12px;
  border-radius: 999px;
  color: rgba(220, 230, 226, 0.92);
  background: rgba(17, 25, 35, 0.72);
  font-size: 12px;
  pointer-events: none;
}

.lightbox-ocr-status {
  position: fixed;
  top: 78px;
  right: 20px;
  z-index: 82;
  max-width: min(420px, calc(100vw - 40px));
  color: #dce6e2;
  font-size: 13px;
  text-align: right;
}

.lightbox-ocr-status.ok {
  color: #80e5d1;
}

.lightbox-ocr-status.error {
  color: #ffb4a8;
}

.lightbox-nav {
  top: 50%;
  width: 54px;
  height: 74px;
  transform: translateY(-50%);
  border-radius: 8px;
  font-size: 52px;
  line-height: 1;
}

.lightbox-nav.prev {
  left: 24px;
}

.lightbox-nav.next {
  right: 24px;
}

.lightbox-nav:disabled {
  opacity: 0.22;
  cursor: default;
  pointer-events: none;
}

.lightbox-caption {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 82;
  max-width: min(90vw, 900px);
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  color: #dce6e2;
  background: rgba(17, 25, 35, 0.82);
  font-size: 13px;
}

.embedded-layout {
  height: clamp(420px, calc(100vh - 300px), 620px);
  min-height: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
}

.pdf-reader {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.pdf-reader.has-file-picker {
  grid-template-rows: auto minmax(0, 1fr);
}

.pdf-file-picker {
  min-width: 0;
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.pdf-file-picker label {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pdf-file-picker select {
  width: 100%;
  min-height: 38px;
  padding: 0 36px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 760;
}

.pdf-file-picker > strong {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-size: 13px;
}

.pdf-reader-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 58px 8px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  overflow-x: auto;
}

.pdf-mobile-tools-toggle,
.pdf-mobile-page-nav,
.pdf-edge-nav,
.pdf-page-toast {
  display: none;
}

.pdf-mobile-tools-panel {
  display: contents;
}

.pdf-document-title {
  flex: 1 1 220px;
  min-width: 170px;
  max-width: 280px;
  display: grid;
  gap: 2px;
}

.pdf-document-title span {
  color: var(--muted);
  font-size: 12px;
}

.pdf-document-title strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-toolbar-spacer {
  min-width: 0;
}

.pdf-page-controls {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-left: 1px solid var(--line);
}

.pdf-page-jump {
  min-width: 104px;
  display: grid;
  grid-template-columns: 54px auto;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.pdf-page-jump input {
  width: 54px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 7px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 850;
  text-align: center;
}

.pdf-ocr-tools {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

.icon-tool {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--navy);
  font-size: 26px;
  line-height: 1;
}

#pdfPageLabel {
  min-width: 108px;
  color: var(--ink);
  font-weight: 850;
  text-align: center;
}

[data-pdf-page-label] {
  min-width: 124px;
  color: var(--ink);
  font-weight: 850;
  text-align: center;
}

.pdf-page-jump [data-pdf-page-label] {
  min-width: 0;
  text-align: left;
}

.pdf-search {
  min-width: 0;
  width: 100%;
  display: flex;
  gap: 6px;
}

.pdf-search-tools {
  flex: 0 1 360px;
  min-width: 230px;
  width: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.pdf-zoom-control {
  flex: 0 0 196px;
  min-width: 196px;
  display: grid;
  grid-template-columns: auto minmax(84px, 1fr) 44px;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  background: transparent;
}

.pdf-zoom-control button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 7px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 800;
}

.pdf-zoom-control input {
  width: 100%;
  accent-color: var(--jade);
}

.pdf-zoom-control span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-align: right;
}

.pdf-toolbar-fullscreen {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  font-size: 22px;
}

.pdf-search input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pdf-ocr-button {
  min-height: 38px;
  justify-self: start;
}

.pdf-copy-button {
  color: #ffffff;
  border: 0;
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.pdf-ocr-status {
  grid-column: 1 / -1;
  min-height: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.pdf-ocr-status button {
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: 999px;
  color: var(--jade);
  background: #eef8f4;
  font-weight: 750;
}

.pdf-ocr-status.ok {
  color: var(--jade);
}

.pdf-ocr-status.error {
  color: var(--copper);
}

.pdf-page-stage {
  position: relative;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #172027;
  overscroll-behavior: contain;
}

.pdf-page-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: auto;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.pdf-reader.is-zoomed .pdf-page-stage {
  display: block;
}

.pdf-reader.is-zoomed .pdf-page-stage img {
  max-width: none;
  max-height: none;
  margin: 0 auto;
}

.pdf-page-hit-layer {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 2;
  width: min(78%, 720px);
  transform: translateX(-50%);
  border: 1px solid rgba(245, 158, 11, 0.55);
  border-radius: 8px;
  background: rgba(255, 248, 220, 0.94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  touch-action: none;
}

.pdf-hit-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  color: #5f370e;
  background: rgba(245, 158, 11, 0.22);
  font-size: 12px;
  font-weight: 850;
  cursor: grab;
  user-select: none;
}

.pdf-page-hit-layer.dragging {
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.3);
}

.pdf-page-hit-layer.dragging .pdf-hit-ribbon {
  cursor: grabbing;
}

.pdf-hit-ribbon button {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #5f370e;
  background: rgba(255, 255, 255, 0.58);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.pdf-hit-ribbon button:hover {
  background: #ffffff;
}

.pdf-hit-snippet {
  max-height: 96px;
  overflow: auto;
  padding: 10px 12px;
  color: #1f2933;
  font-size: 13px;
  line-height: 1.65;
}

.pdf-search-results mark,
.pdf-hit-snippet mark {
  padding: 1px 3px;
  border-radius: 3px;
  color: #111827;
  background: #ffe66d;
  box-shadow: inset 0 -1px 0 rgba(146, 64, 14, 0.4);
}

.pdf-reader-main:fullscreen {
  padding: 18px;
  background: #172027;
}

.pdf-reader-main:fullscreen .pdf-page-stage {
  min-height: 0;
  height: calc(100vh - 170px);
}

.pdf-reader-main:fullscreen .pdf-page-stage img {
  max-width: 100%;
  max-height: 100%;
}

.pdf-search-results {
  max-height: 180px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
}

.pdf-search-results p {
  margin: 0;
  line-height: 1.6;
}

.pdf-search-results button {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f7faf8;
  text-align: left;
}

.pdf-search-results button:hover {
  border-color: rgba(15, 118, 110, 0.28);
  background: #eef6f3;
}

.pdf-search-results button.active {
  border-color: rgba(15, 118, 110, 0.5);
  background: #e4f4ef;
}

.pdf-search-results strong,
.pdf-search-results span {
  display: block;
}

.pdf-search-results span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.55;
}

.embedded-list {
  height: 100%;
  max-height: 100%;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
}

.embedded-video-list-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: stretch;
}

.embedded-list button {
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: anywhere;
}

.embedded-list button.active {
  color: #ffffff;
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: inset 4px 0 0 var(--gold);
}

.video-preview-pane {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
}

.video-preview-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 2px 0;
}

.video-preview-toolbar > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auction-group-video-control {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: stretch;
}

.pdf-viewer,
.video-viewer {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #172027;
}

.video-viewer {
  display: block;
  object-fit: contain;
}

.pdf-page-preview {
  position: relative;
  overflow: auto;
  display: grid;
  place-items: start center;
  padding: 18px;
  background: #172027;
}

.pdf-page-preview img {
  width: min(100%, 760px);
  height: auto;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.pdf-preview-caption {
  width: min(100%, 760px);
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  color: #dce6e2;
  background: rgba(255, 255, 255, 0.08);
}

.pdf-preview-caption h3 {
  margin-bottom: 6px;
  color: #ffffff;
}

.pdf-preview-caption p {
  margin: 0;
  color: #b7c7c8;
  line-height: 1.6;
}

.video-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #ffffff;
  text-align: center;
}

.video-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.video-placeholder div {
  position: relative;
  max-width: 520px;
  padding: 20px;
  border-radius: 8px;
  background: rgba(23, 32, 39, 0.82);
}

.video-placeholder p {
  margin: 0;
  color: #c7d5d2;
  line-height: 1.7;
}

.pdf-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px;
  color: #dce6e2;
  text-align: center;
}

.pdf-placeholder h3 {
  max-width: 560px;
  margin-bottom: 0;
  color: #ffffff;
}

.pdf-placeholder p {
  max-width: 520px;
  color: #b7c7c8;
  line-height: 1.7;
}

.document-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.document-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.record-modal.document-focus .document-list {
  max-height: 116px;
  overflow: auto;
  padding-right: 4px;
}

.document-list button {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
}

.document-list .file-download-link,
.document-download-button,
.pdf-download-button {
  align-items: center;
  justify-content: center;
  min-width: 62px;
  text-decoration: none;
  white-space: nowrap;
}

.document-list .file-download-link {
  display: inline-flex;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--jade), var(--blue));
  font-size: 13px;
  font-weight: 800;
}

.document-list span,
.empty-detail p {
  color: var(--muted);
}

.document-preview {
  margin-top: 14px;
  min-height: 220px;
  max-height: 520px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.record-modal.document-focus .document-preview {
  min-height: 0;
  max-height: none;
  height: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
}

.record-modal.single-file-focus .detail-header {
  padding-bottom: 14px;
}

.record-modal.single-file-focus .detail-tabs,
.record-modal.single-file-focus .document-list {
  display: none;
}

.record-modal.single-file-focus .document-preview {
  margin-top: 0;
}

.document-preview-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: -14px -14px 0;
  padding: 12px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.document-preview-back {
  display: none;
}

.document-preview-head span,
.doc-error,
.doc-empty {
  color: var(--muted);
}

.doc-sheet {
  margin-top: 14px;
}

.doc-spreadsheet-preview {
  min-width: 0;
}

.record-modal.document-focus .doc-spreadsheet-preview.is-single-sheet {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.doc-table-gesture-tools {
  display: none;
}

.doc-sheet h4 {
  margin: 0 0 8px;
}

.doc-table-fixed-scroll,
.doc-table-scroll-top {
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f8faf9;
}

.doc-table-fixed-scroll {
  position: sticky;
  top: 54px;
  z-index: 2;
  height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 8px 12px;
  overflow: visible;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: #eef6f2;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.doc-table-fixed-scroll span {
  color: #31565f;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.doc-table-scroll-track {
  position: relative;
  min-width: 0;
  height: 20px;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.doc-table-scroll-track:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.doc-table-scroll-thumb {
  position: absolute;
  top: 3px;
  left: 0;
  bottom: 3px;
  width: 40px;
  min-width: 40px;
  border-radius: 999px;
  background: linear-gradient(90deg, #39758c, #0f8c82);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.24);
  cursor: grab;
  will-change: transform, width;
}

.doc-table-scroll-thumb:hover {
  background: linear-gradient(90deg, #2e667d, #0b776f);
}

.doc-table-scroll-thumb.dragging {
  cursor: grabbing;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.32);
}

.doc-table-fixed-scroll.no-horizontal-overflow {
  display: none;
}

.doc-spreadsheet-preview .doc-table-scroll-top {
  display: none;
}

.record-modal.document-focus .doc-table-scroll-top {
  position: sticky;
  top: 54px;
  z-index: 2;
}

.doc-table-scroll-spacer {
  height: 1px;
}

.doc-table-wrap {
  max-height: min(58vh, 620px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  overscroll-behavior: contain;
}

.record-modal.document-focus .doc-sheet {
  min-height: 0;
}

.record-modal.document-focus .doc-spreadsheet-preview.is-single-sheet .doc-sheet {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.record-modal.document-focus .doc-spreadsheet-preview.is-single-sheet .doc-table-wrap {
  min-height: 180px;
  flex: 1 1 auto;
  max-height: none;
}

.doc-table-wrap table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.doc-table-wrap th,
.doc-table-wrap td {
  max-width: 360px;
  padding: 8px 10px;
  border: 1px solid rgba(25, 38, 47, 0.1);
  color: var(--ink);
  font-size: 13px;
  vertical-align: top;
}

.doc-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  color: #223640;
  background: #f4f8f6;
  box-shadow: 0 2px 0 rgba(15, 118, 110, 0.18), 0 5px 12px rgba(15, 23, 42, 0.08);
  font-weight: 850;
  text-align: left;
}

.doc-table-wrap tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 74px;
  background: #ffffff;
  box-shadow: 2px 0 0 rgba(15, 118, 110, 0.12), 5px 0 10px rgba(15, 23, 42, 0.05);
}

.doc-table-wrap thead th:first-child {
  left: 0;
  z-index: 6;
  min-width: 74px;
  background: #edf5f1;
  box-shadow: 2px 2px 0 rgba(15, 118, 110, 0.18), 5px 5px 12px rgba(15, 23, 42, 0.08);
}

.doc-word p,
.doc-text {
  color: var(--ink);
  line-height: 1.75;
}

.doc-text {
  white-space: pre-wrap;
  margin: 0;
}

.empty-detail {
  display: grid;
  place-items: center;
  min-height: 320px;
  text-align: center;
}

@media (min-width: 721px) {
  .record-modal.document-focus:not(.single-file-focus) .detail-header {
    min-height: 44px;
    display: block;
    padding: 6px 58px 5px 18px;
  }

  .record-modal.document-focus:not(.single-file-focus) .detail-header .eyebrow,
  .record-modal.document-focus:not(.single-file-focus) #detailDescription,
  .record-modal.document-focus:not(.single-file-focus) .detail-meta {
    display: none;
  }

  .record-modal.document-focus:not(.single-file-focus) .detail-header h2 {
    max-width: none;
    margin: 0;
    overflow: hidden;
    font-size: 19px;
    line-height: 30px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .record-modal.document-focus:not(.single-file-focus) .modal-close {
    top: 5px;
    right: 12px;
    width: 34px;
    height: 34px;
    font-size: 23px;
  }

  .record-modal.document-focus:not(.single-file-focus) .detail-body {
    padding: 4px 14px 14px;
  }

  .record-modal.document-focus:not(.single-file-focus) .document-list {
    max-height: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 3px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .record-modal.document-focus:not(.single-file-focus) .document-list-item {
    min-width: 0;
    flex: 0 0 auto;
    display: block;
  }

  .record-modal.document-focus:not(.single-file-focus) .document-list button {
    width: auto;
    max-width: min(420px, 42vw);
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 7px;
    background: #ffffff;
  }

  .record-modal.document-focus:not(.single-file-focus) .document-list button strong {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .record-modal.document-focus:not(.single-file-focus) .document-list button.active {
    color: #ffffff;
    border-color: var(--blue);
    background: var(--blue);
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.18);
  }

  .record-modal.document-focus:not(.single-file-focus) .document-preview {
    margin-top: 0;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sidebar-panel {
    display: none;
  }

  .content-grid,
  .video-layout,
  .ai-workbench,
  .hero {
    grid-template-columns: 1fr;
  }

  .ai-section {
    min-height: auto;
  }

  .metrics-grid,
  .media-grid,
  .category-samples {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sub-filters {
    margin-left: 0;
  }

  .auction-lot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px), (max-device-width: 720px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background:
      linear-gradient(180deg, rgba(15, 118, 110, 0.08), transparent 320px),
      #e9efed;
  }

  .app-shell,
  .workspace,
  .sidebar,
  .topbar,
  .hero,
  .metrics-grid,
  .content-grid,
  .results-panel,
  .ai-section,
  .ai-workbench,
  .form-card,
  .draft-preview,
  .lot-list,
  .lot-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .workspace,
  .sidebar {
    padding: 14px;
  }

  .sidebar {
    position: relative;
    gap: 14px;
    border-radius: 0 0 8px 8px;
  }

  .brand {
    justify-content: center;
  }

  .brand-lockup {
    max-width: 168px;
    box-shadow: none;
  }

  h1 {
    font-size: 30px;
  }

  .hero-copy h2 {
    font-size: 30px;
  }

  .topbar,
  .section-heading,
  .search-row,
  .control-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: flex-start;
  }

  .top-actions > *,
  .top-actions a,
  .top-actions button,
  .member-badge {
    width: 100%;
    min-width: 0;
  }

  .language-switcher {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .language-switcher button {
    flex: 1;
  }

  .topbar-title {
    width: 100%;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
  }

  .topbar-logo {
    width: 88px;
    max-height: 72px;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-list a {
    min-height: 42px;
    justify-content: center;
    padding: 9px 8px;
    font-size: 14px;
    text-align: center;
  }

  .nav-list span {
    width: auto;
  }

  .metrics-grid,
  .media-grid,
  .category-samples,
  .cover-card {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    gap: 10px;
  }

  .metrics-grid article,
  .results-panel,
  .ai-section,
  .form-card,
  .draft-preview {
    padding: 14px;
  }

  .metrics-grid strong {
    font-size: 28px;
  }

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

  .filter-chip {
    width: 100%;
    min-height: 40px;
    padding: 0 10px;
  }

  .year-filter,
  .sort-filter {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
  }

  .year-filter {
    justify-content: space-between;
    gap: 6px;
  }

  .year-filter label,
  .year-filter select,
  .sort-filter select {
    min-width: 0;
  }

  .sort-filter {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .command-search {
    padding: 12px;
  }

  .search-in-results .primary-button,
  .search-row .primary-button {
    width: 100%;
    min-width: 0;
  }

  .search-row input,
  .ai-form input,
  .ai-form select {
    min-width: 0;
  }

  .lot-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .lot-card img,
  .lot-card video,
  .record-preview-button,
  .record-preview-fallback {
    width: 100%;
  }

  .image-file-card.auction-group-card {
    --auction-media-width: 100%;
    grid-template-columns: 1fr;
  }

  .auction-group-media,
  .auction-series-frame {
    width: 100%;
  }

  .auction-group-media .record-preview-button {
    max-height: 260px;
  }

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

  .auction-lot-cell.cert,
  .auction-lot-cell.description {
    grid-column: 1 / -1;
  }

  .auction-lot-cell {
    min-height: 50px;
    padding: 6px 9px;
  }

  .auction-lot-label {
    min-height: 0;
    font-size: 10px;
  }

  .lot-card .auction-description-row {
    font-size: 13px;
    line-height: 1.42;
  }

  .lot-list {
    max-height: none;
    padding-right: 0;
    overflow-x: hidden;
    overflow-y: visible;
    scrollbar-gutter: auto;
  }

  .ai-workbench {
    min-height: 0;
    gap: 12px;
  }

  .ai-form .control-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 10px 0;
  }

  .draft-preview h3 {
    font-size: 22px;
  }

  .draft-preview p {
    font-size: 15px;
  }

  .record-modal {
    padding: 10px;
  }

  .image-gallery-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .image-gallery-mode {
    width: 100%;
  }

  .image-gallery-mode button {
    flex: 1 1 0;
    min-width: 0;
  }

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

  .image-gallery-footer {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }

  .image-gallery-footer button {
    width: 100%;
  }

  .image-lightbox img {
    max-width: calc(100vw - 12px);
    max-height: calc(100dvh - 178px);
  }

  .lightbox-nav {
    width: 48px;
    height: 64px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    font-size: 44px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.92);
  }

  .lightbox-nav.prev {
    left: 4px;
  }

  .lightbox-nav.next {
    right: 4px;
  }

  .hero-media-nav {
    width: 34px;
    height: 34px;
    left: auto;
    right: auto;
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(17, 25, 35, 0.5);
    font-size: 23px;
    opacity: 0.82;
  }

  .hero-media-nav.prev {
    left: 8px;
  }

  .hero-media-nav.next {
    right: 8px;
  }

  .lightbox-close,
  .lightbox-fullscreen {
    top: max(10px, env(safe-area-inset-top));
    width: 42px;
    height: 42px;
    font-size: 24px;
  }

  .lightbox-close {
    right: 10px;
  }

  .lightbox-fullscreen {
    right: 60px;
  }

  .lightbox-ocr {
    top: max(10px, env(safe-area-inset-top));
    right: 110px;
    min-width: 64px;
    height: 42px;
    padding: 0 12px;
  }

  .lightbox-hint {
    display: none;
  }

  .lightbox-zoom-control {
    bottom: calc(48px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    grid-template-columns: auto auto minmax(70px, 1fr) 44px;
    gap: 6px;
    padding: 7px 8px;
  }

  .lightbox-zoom-control button {
    min-height: 30px;
    padding: 0 9px;
  }

  .lightbox-caption {
    bottom: calc(7px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 28px);
    padding: 6px 10px;
    font-size: 11px;
  }

  .detail-panel {
    max-height: calc(100vh - 20px);
  }

  .record-modal.pdf-focus,
  .record-modal.document-preview-open {
    padding: 0;
    place-items: stretch;
  }

  .record-modal.pdf-focus .detail-panel {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .record-modal.pdf-focus .detail-body {
    height: 100%;
    padding: 0;
  }

  .record-modal.pdf-focus .modal-close,
  .record-modal.document-preview-open .modal-close {
    top: max(8px, env(safe-area-inset-top));
    right: 8px;
    z-index: 12;
    width: 40px;
    height: 40px;
    font-size: 25px;
  }

  .record-modal.document-preview-open .detail-panel {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    grid-template-rows: minmax(0, 1fr);
    border: 0;
    border-radius: 0;
  }

  .record-modal.document-preview-open .detail-header,
  .record-modal.document-preview-open .detail-tabs,
  .record-modal.document-preview-open .document-list {
    display: none;
  }

  .record-modal.document-preview-open .detail-body {
    min-height: 0;
    display: block;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .record-modal.document-preview-open .document-preview {
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 12px 12px;
    overflow: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    border: 0;
    border-radius: 0;
  }

  .record-modal.document-preview-open .document-preview-head {
    min-height: 60px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin: 0 -12px 12px;
    padding: max(8px, env(safe-area-inset-top)) 56px 8px 10px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  }

  .record-modal.document-preview-open .document-preview-head > div {
    min-width: 0;
  }

  .record-modal.document-preview-open .document-preview-head > div > strong,
  .record-modal.document-preview-open .document-preview-head > div > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .document-preview-back {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: var(--ink);
    background: #eef3f1;
    font-size: 30px;
    line-height: 1;
  }

  .document-preview-back strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .record-modal.document-preview-open .document-download-button {
    min-width: 52px;
    min-height: 38px;
    padding: 0 10px;
  }

  .record-modal.document-preview-open .doc-table-gesture-tools {
    position: sticky;
    top: 60px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    padding: 8px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
  }

  .doc-table-gesture-tools button {
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 7px;
    color: var(--ink);
    background: #ffffff;
    font-weight: 800;
    white-space: nowrap;
  }

  .doc-table-gesture-tools [data-sheet-zoom] {
    width: 36px;
    padding: 0;
    font-size: 20px;
  }

  .doc-table-gesture-tools [data-sheet-zoom-label] {
    min-width: 42px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 850;
    text-align: center;
  }

  .record-modal.document-preview-open .doc-table-fixed-scroll {
    top: 112px;
  }

  .record-modal.document-preview-open .doc-table-wrap {
    touch-action: none;
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: contain;
  }

  .detail-header {
    grid-template-columns: 1fr;
    padding: 22px 62px 16px 18px;
  }

  .detail-meta {
    justify-content: flex-start;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .detail-header {
    gap: 6px;
    padding: 12px 58px 9px 14px;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .detail-header > div {
    min-width: 0;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .modal-close {
    top: 11px;
    right: 11px;
    width: 40px;
    height: 40px;
    font-size: 25px;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .detail-header .eyebrow {
    margin: 0 0 3px;
    font-size: 12px;
    line-height: 17px;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .detail-header h2 {
    max-width: none;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    font-size: 23px;
    line-height: 1.22;
    letter-spacing: 0;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    cursor: pointer;
  }

  .record-modal.mobile-compact-detail.detail-title-expanded:not(.single-file-focus) .detail-header h2 {
    max-height: 32vh;
    display: block;
    overflow: auto;
    overscroll-behavior: contain;
    text-overflow: clip;
    -webkit-line-clamp: unset;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .detail-header h2:focus-visible {
    outline: 2px solid rgba(15, 118, 110, 0.4);
    outline-offset: 3px;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) #detailDescription {
    max-width: none;
    margin: 4px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 19px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .record-modal.mobile-compact-detail.detail-description-empty:not(.single-file-focus) #detailDescription {
    display: none;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .detail-meta {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    margin: 1px 0 0;
    padding-bottom: 1px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .detail-meta::-webkit-scrollbar {
    display: none;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .detail-meta span {
    min-height: 26px;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 4px 8px;
    font-size: 11px;
    line-height: 16px;
    white-space: nowrap;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .detail-meta span[data-detail-meta="package"] {
    display: none;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .detail-tabs {
    gap: 6px;
    padding: 7px 10px;
    scrollbar-width: none;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .detail-tabs::-webkit-scrollbar {
    display: none;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .detail-tabs button {
    min-height: 36px;
    gap: 6px;
    padding: 0 11px;
    font-size: 14px;
  }

  .record-modal.mobile-compact-detail:not(.single-file-focus) .detail-tabs span {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
  }

  .record-modal.forum-focus:not(.single-file-focus) .detail-summary-toggle {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 6px;
    padding: 0 10px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 7px;
    color: var(--blue);
    background: #eef5fb;
    font-size: 12px;
    font-weight: 800;
  }

  .record-modal.forum-focus.forum-summary-open:not(.single-file-focus) #detailDescription {
    max-height: 24vh;
    display: block;
    overflow: auto;
    overscroll-behavior: contain;
    text-overflow: clip;
    white-space: normal;
  }

  .record-modal.forum-focus.forum-summary-open:not(.single-file-focus) .detail-meta {
    display: flex;
    margin-top: 5px;
  }

  .embedded-layout {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .pdf-reader {
    height: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .record-modal.pdf-focus .pdf-reader.has-file-picker {
    gap: 0;
  }

  .record-modal.pdf-focus .pdf-file-picker {
    position: relative;
    z-index: 5;
    align-items: center;
    gap: 8px;
    padding: max(7px, env(safe-area-inset-top)) 56px 7px 8px;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
  }

  .record-modal.pdf-focus .pdf-file-picker label {
    display: block;
  }

  .record-modal.pdf-focus .pdf-file-picker label > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .record-modal.pdf-focus .pdf-file-picker > strong {
    display: none;
  }

  .record-modal.pdf-focus .pdf-reader-main {
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0;
  }

  .pdf-toolbar,
  .pdf-search {
    width: 100%;
  }

  .pdf-toolbar {
    flex-wrap: nowrap;
    align-items: center;
  }

  .record-modal.pdf-focus .pdf-toolbar {
    position: relative;
    z-index: 4;
    width: calc(100% - 48px);
    padding: max(8px, env(safe-area-inset-top)) 8px 8px;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    overflow: visible;
  }

  .record-modal.pdf-focus .pdf-document-title {
    min-width: 0;
    max-width: none;
  }

  .record-modal.pdf-focus .pdf-document-title strong {
    font-size: 16px;
  }

  .pdf-mobile-tools-toggle {
    min-width: 54px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 8px;
    color: var(--jade);
    background: #eef8f4;
    font-weight: 850;
  }

  .pdf-mobile-tools-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 8px;
    z-index: 9;
    width: calc(100vw - 16px);
    max-height: min(62dvh, 520px);
    display: none;
    gap: 10px;
    padding: 12px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.2);
  }

  .record-modal.pdf-tools-open .pdf-mobile-tools-panel {
    display: grid;
  }

  .pdf-mobile-tools-panel .pdf-page-controls {
    display: none;
  }

  .pdf-ocr-tools {
    padding-left: 0;
    border-left: 0;
    flex-wrap: wrap;
    white-space: normal;
  }

  .pdf-toolbar-spacer {
    display: none;
  }

  .pdf-search {
    justify-self: stretch;
  }

  .pdf-search-tools {
    min-width: 0;
    width: 100%;
    padding-left: 0;
    border-left: 0;
  }

  .pdf-mobile-tools-panel .pdf-zoom-control {
    width: 100%;
    min-width: 0;
    padding-left: 0;
    border-left: 0;
  }

  .pdf-mobile-tools-panel .pdf-ocr-status {
    width: 100%;
  }

  .pdf-page-stage {
    min-height: 420px;
    height: 58vh;
  }

  .record-modal.pdf-focus .pdf-page-stage {
    height: auto;
    min-height: 0;
    padding: 8px;
    border-radius: 0;
    overscroll-behavior: none;
    touch-action: pan-y;
  }

  .pdf-reader.is-zoomed .pdf-page-stage {
    touch-action: none;
  }

  .pdf-edge-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    height: 72px;
    display: grid;
    place-items: center;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.9);
    background: transparent;
    font-size: 42px;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.88);
  }

  .pdf-edge-nav.prev {
    left: 0;
  }

  .pdf-edge-nav.next {
    right: 0;
  }

  .pdf-reader.is-zoomed .pdf-edge-nav {
    opacity: 0;
    pointer-events: none;
  }

  .pdf-page-toast {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 5;
    display: block;
    transform: translate(-50%, -50%);
    padding: 8px 13px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(17, 25, 35, 0.8);
    font-size: 13px;
    font-weight: 800;
    pointer-events: none;
  }

  .pdf-page-toast[hidden] {
    display: none;
  }

  .pdf-mobile-page-nav {
    min-height: 62px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 10px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.1);
  }

  .pdf-mobile-page-nav > button {
    width: 48px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: var(--navy);
    font-size: 30px;
    line-height: 1;
  }

  .pdf-mobile-page-jump {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(58px, 76px) auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 850;
  }

  .pdf-mobile-page-jump input {
    width: 100%;
    height: 40px;
    padding: 0 8px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 8px;
    color: var(--ink);
    background: #ffffff;
    font-size: 16px;
    font-weight: 850;
    text-align: center;
  }

  .pdf-mobile-page-jump [data-pdf-page-label] {
    min-width: 0;
    text-align: left;
    white-space: nowrap;
  }

  .embedded-list {
    max-height: 160px;
  }

  .embedded-video-list-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .embedded-video-download,
  .video-download-link,
  .auction-group-video-download,
  .video-player-download {
    min-height: 38px;
    padding: 7px 9px;
  }

  .video-preview-toolbar {
    gap: 8px;
  }

  .video-preview-toolbar .video-download-link {
    flex: 0 0 auto;
  }

  .video-player-actions {
    gap: 5px;
  }

  .pdf-viewer,
  .video-viewer {
    height: min(58vh, 520px);
    min-height: 320px;
  }

  .hero {
    padding: 20px;
  }

  .company-intro {
    font-size: 16px;
    line-height: 1.75;
  }

  .hero-visual {
    min-height: 280px;
  }

  .site-footer {
    display: grid;
    padding-bottom: 18px;
  }

  .site-footer span {
    display: block;
    margin-right: 0;
  }
}

@media (max-width: 430px), (max-device-width: 430px) {
  .workspace,
  .sidebar {
    padding: 12px;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  .nav-list a {
    justify-content: flex-start;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .top-actions {
    grid-template-columns: 1fr;
  }

  .topbar-title {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .topbar-logo {
    width: 72px;
  }

  h1 {
    font-size: 26px;
  }
}
