.translator-page {
  background: radial-gradient(circle at 10% 15%, rgba(240, 56, 41, 0.18), transparent 36%),
    radial-gradient(circle at 90% 40%, rgba(255, 255, 255, 0.08), transparent 38%),
    linear-gradient(165deg, #171d21 0%, #1e252a 56%, #1a2024 100%);
  color: #e1eaea;
}

.translator-main {
  overflow: hidden;
}

.translator-main .container {
  max-width: 1300px;
  position: relative;
  z-index: 2;
}

.translator-hero {
  padding: 150px 0 80px;
  position: relative;
}

.translator-hero::before {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  right: -230px;
  top: -130px;
  background: rgba(240, 56, 41, 0.14);
  filter: blur(2px);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 38px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f4f8f9;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  letter-spacing: 0.35px;
  margin-bottom: 18px;
}

.hero-copy h1 {
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.08;
  margin-bottom: 14px;
  color: #f0f5f6;
  font-weight: 700;
}

.hero-copy p {
  color: #c4d0d4;
  font-size: 18px;
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 24px;
}

.hero-trust-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.hero-trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #d6e0e2;
}

.hero-trust-list li span {
  width: 10px;
  height: 10px;
  background: #f03829;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(240, 56, 41, 0.62);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f03829 0%, #ce3428 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 14px 30px rgba(240, 56, 41, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(240, 56, 41, 0.34);
}

.hero-graphic {
  position: relative;
}

.translator-visual {
  position: relative;
  min-height: 420px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(155deg, rgba(34, 44, 51, 0.95) 0%, rgba(21, 29, 34, 0.98) 100%);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.4);
  padding: 26px 24px 22px;
}

.translator-visual::before {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  right: -130px;
  top: -110px;
  background: radial-gradient(circle, rgba(240, 56, 41, 0.42) 0%, rgba(240, 56, 41, 0.06) 60%, transparent 100%);
}

.translator-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), transparent 40%);
  pointer-events: none;
}

.visual-doc {
  position: absolute;
  width: 78%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(165deg, rgba(58, 72, 82, 0.96), rgba(38, 49, 56, 0.96));
  padding: 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  z-index: 2;
}

.jp-doc {
  left: 16px;
  top: 56px;
  transform: rotate(-4deg);
}

.en-doc {
  right: 16px;
  top: 168px;
  transform: rotate(3deg);
  border-color: rgba(240, 56, 41, 0.45);
}

.doc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #f2f7f8;
  font-size: 13px;
}

.doc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f03829;
  box-shadow: 0 0 10px rgba(240, 56, 41, 0.7);
  flex-shrink: 0;
}

.doc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.doc-cell {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  min-height: 24px;
  padding: 4px 8px;
  background: rgba(207, 220, 225, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #dce7ea;
  font-size: 12px;
}

.doc-cell.w-40 {
  width: calc(40% - 4px);
}

.doc-cell.w-50 {
  width: calc(50% - 4px);
}

.doc-cell.w-60 {
  width: calc(60% - 4px);
}

.doc-cell.w-100 {
  width: 100%;
}

.visual-translate-flow {
  position: absolute;
  left: 50%;
  top: 182px;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(20, 28, 33, 0.92);
  padding: 8px 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 28px;
  border-radius: 8px;
  color: #e9f1f3;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.lang-jp {
  background: rgba(71, 86, 97, 0.7);
}

.lang-en {
  background: linear-gradient(135deg, #f03829, #ce3428);
}

.flow-arrow {
  color: #d8e4e8;
  font-size: 16px;
  font-weight: 700;
}

.visual-chip {
  position: absolute;
  z-index: 5;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(27, 37, 43, 0.9);
  color: #d9e5e9;
  font-size: 11px;
  letter-spacing: 0.25px;
  padding: 6px 11px;
}

.visual-chip-top {
  right: 16px;
  top: 16px;
}

.visual-chip-bottom {
  left: 16px;
  bottom: 78px;
}

.car-silhouette-wrap {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 12px;
  z-index: 1;
}

.car-silhouette {
  width: 100%;
  height: auto;
  opacity: 0.42;
}

.car-silhouette path {
  fill: rgba(193, 207, 213, 0.2);
}

.car-silhouette circle {
  fill: rgba(193, 207, 213, 0.24);
}

.upload-section,
.history-section,
.results-section,
.trust-section,
.faq-section {
  padding: 36px 0 40px;
}

.translator-content-section {
  padding: 18px 0 10px;
}

.content-shell {
  background: linear-gradient(160deg, rgba(31, 40, 46, 0.94), rgba(23, 31, 36, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 30px 34px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
}

.content-intro h2 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 42px);
  color: #f0f4f6;
  font-weight: 700;
}

.content-kicker {
  margin: 8px 0 10px;
  color: #f69f97;
  font-size: 16px;
  font-weight: 600;
}

.content-intro p {
  margin: 0;
  max-width: 860px;
  color: #b7c7cd;
  line-height: 1.75;
  font-size: 16px;
}

.content-toc {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 16px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(20, 27, 31, 0.9);
}

.content-toc a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: #2b353c;
  color: #d7e3e7;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
}

.content-block {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(23, 30, 34, 0.78);
  padding: 18px;
  margin-bottom: 12px;
}

.content-block h3 {
  margin: 0 0 10px;
  color: #ebf3f6;
  font-size: 22px;
  font-weight: 700;
}

.content-block p {
  margin: 0 0 10px;
  max-width: 860px;
  color: #b4c4ca;
  line-height: 1.75;
}

.content-block p:last-child {
  margin-bottom: 0;
}

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

.feature-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  background: #253138;
  color: #d8e4e8;
  font-size: 14px;
  line-height: 1.55;
  padding: 11px 12px;
}

.upload-shell,
.results-shell {
  background: linear-gradient(160deg, rgba(31, 40, 46, 0.94), rgba(23, 31, 36, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 34px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.3);
}

.upload-shell h2,
.results-shell h2,
.faq-section h2 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 40px);
  color: #f0f4f6;
  font-weight: 700;
}

.section-intro {
  margin: 8px 0 24px;
  color: #9fb0b6;
  font-size: 16px;
}

.upload-card {
  background: rgba(23, 30, 34, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 22px;
}

.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, rgba(48, 61, 69, 0.28), rgba(23, 30, 34, 0.35));
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  padding: 18px;
  position: relative;
}

.dropzone.is-dragover {
  border-color: rgba(240, 56, 41, 0.85);
  background: rgba(240, 56, 41, 0.09);
  box-shadow: 0 0 0 4px rgba(240, 56, 41, 0.12);
}

.dropzone.has-file {
  border-style: solid;
  border-color: rgba(122, 217, 165, 0.46);
  background: linear-gradient(165deg, rgba(22, 49, 40, 0.42), rgba(20, 29, 33, 0.72));
}

.dropzone-empty-state,
.dropzone-selected-state {
  width: 100%;
  height: 100%;
}

.dropzone-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dropzone-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(240, 56, 41, 0.2);
  border: 1px solid rgba(240, 56, 41, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 12px;
}

.dropzone-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #dbe8ec;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  margin-bottom: 14px;
}

.dropzone h3 {
  font-size: 24px;
  color: #edf4f6;
  margin-bottom: 8px;
  font-weight: 600;
}

.dropzone p {
  color: #a8b7bc;
  margin-bottom: 16px;
}

.dropzone-meta {
  display: grid;
  gap: 5px;
}

.browse-button,
.translate-button,
.translation-actions button {
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease;
}

.browse-button {
  background: #36434b;
  color: #f2f8fa;
  padding: 12px 20px;
  margin-bottom: 12px;
}

.browse-button:hover {
  transform: translateY(-1px);
}

.browse-button.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 0;
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: transparent;
  color: #dbe7eb;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 16px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
}

.dropzone small {
  display: block;
  color: #8f9fa5;
  font-size: 13px;
}

.selected-state-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.selected-state-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(122, 217, 165, 0.16);
  color: #8ce4b4;
  border: 1px solid rgba(122, 217, 165, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.selected-state-head strong {
  display: block;
  color: #eef6f8;
  font-size: 19px;
  margin-bottom: 4px;
}

.selected-state-head span {
  color: #a8bbc1;
  font-size: 14px;
  line-height: 1.5;
}

.selected-file-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 25, 29, 0.56);
}

.selected-file-main {
  min-width: 0;
}

.selected-file-name {
  color: #f1f7f8;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

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

.selected-file-details span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #dbe7eb;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
}

.selected-file-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.selected-file-note {
  margin: 14px 0 0;
  color: #9fb2b9;
  font-size: 13px;
  line-height: 1.6;
}

.dropzone-preview-wrap {
  width: 100%;
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 16, 19, 0.65);
}

.dropzone-preview-image {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #fff;
}

.upload-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
}

.translate-button {
  background: linear-gradient(135deg, #f03829 0%, #ce3428 100%);
  color: #fff;
  padding: 15px 24px;
  box-shadow: 0 14px 26px rgba(240, 56, 41, 0.24);
}

.translate-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.translator-status {
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1f292f;
  border-radius: 12px;
  padding: 12px 14px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #d5e2e7;
  font-size: 14px;
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(135deg, #f03829 0%, #ce3428 100%);
  transition: width 0.25s ease;
}

.upload-error {
  margin-top: 14px;
  border: 1px solid rgba(240, 56, 41, 0.5);
  background: rgba(240, 56, 41, 0.12);
  color: #ffd6d2;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
}

.session-usage-info {
  margin-top: 14px;
  font-size: 13px;
  color: #b2c0c5;
  line-height: 1.65;
}

.employee-access-note {
  margin-top: 12px;
  border: 1px solid rgba(122, 217, 165, 0.4);
  background: rgba(122, 217, 165, 0.11);
  color: #cdf4df;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
}

.history-shell {
  background: linear-gradient(160deg, rgba(31, 40, 46, 0.94), rgba(23, 31, 36, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 24px 30px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.3);
}

.history-shell h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  color: #f0f4f6;
  font-weight: 700;
}

.history-status {
  margin-top: 10px;
  color: #a9b9be;
  font-size: 14px;
}

.history-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.history-search-wrap {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(23, 30, 34, 0.82);
  padding: 12px 14px;
}

.history-search-wrap label {
  display: block;
  color: #d7e4e8;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 7px;
}

.history-search-wrap input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: #1a2328;
  color: #e7eff2;
  font-size: 13px;
  padding: 9px 10px;
}

.history-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(23, 30, 34, 0.82);
  padding: 12px 14px;
}

.history-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.history-item-title {
  color: #ecf4f7;
  font-size: 14px;
  font-weight: 600;
}

.history-item-time {
  color: #96a9b0;
  font-size: 12px;
}

.history-item-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.history-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #d4e1e6;
  padding: 4px 9px;
  font-size: 11px;
}

.history-item-actions {
  margin-top: 9px;
}

.history-view-btn {
  border: 1px solid rgba(240, 56, 41, 0.55);
  border-radius: 9px;
  background: rgba(240, 56, 41, 0.14);
  color: #ffdcd7;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 11px;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.sheet-preview-card,
.translation-card {
  background: rgba(20, 27, 31, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  padding: 18px;
}

.sheet-preview-card h3,
.translation-card h3 {
  font-size: 20px;
  margin-bottom: 14px;
  color: #ecf3f6;
  font-weight: 600;
}

.sheet-preview {
  min-height: 460px;
  border-radius: 12px;
  background: #eef3f6;
  border: 1px solid #dbe5ea;
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.sheet-preview-placeholder {
  height: 100%;
}

.sheet-preview-image,
.sheet-preview-pdf {
  width: 100%;
  height: 420px;
  border: 0;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.sheet-header {
  height: 20px;
  border-radius: 6px;
  width: 86%;
  background: #bdccd4;
}

.sheet-subline {
  height: 12px;
  border-radius: 5px;
  background: #c9d5db;
  margin-top: 11px;
}

.w-80 {
  width: 80%;
}

.w-60 {
  width: 60%;
}

.sheet-grid {
  margin-top: 20px;
  min-height: 400px;
  background-image: linear-gradient(#d4dfe5 1px, transparent 1px), linear-gradient(90deg, #d4dfe5 1px, transparent 1px);
  background-size: 36px 36px;
  border-radius: 8px;
}

.sheet-stamp {
  position: absolute;
  left: 24px;
  top: 152px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(206, 52, 40, 0.9);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  transform: rotate(-15deg);
  letter-spacing: 0.5px;
}

.translation-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.translation-actions {
  display: flex;
  gap: 10px;
}

.translation-actions button {
  padding: 10px 14px;
  background: #2f3b43;
  color: #fff;
}

.translation-actions button:last-child {
  background: #f03829;
}

.translation-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.result-tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.tab-button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: #2b353c;
  color: #d7e3e7;
  font-size: 13px;
  padding: 10px 14px;
  font-weight: 600;
}

.tab-button.active {
  background: #f03829;
  border-color: #f03829;
  color: #fff;
}

.tab-panel {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: #1f292f;
  padding: 16px;
}

.tab-panel.active {
  display: block;
}

.summary-list {
  margin: 0;
  padding-left: 20px;
  color: #d7e4e8;
}

.summary-list li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.tab-panel p {
  margin: 0;
  color: #d7e4e8;
  line-height: 1.8;
}

.section-jump-nav {
  position: sticky;
  top: 14px;
  z-index: 6;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: rgba(20, 27, 31, 0.95);
}

.section-jump-btn {
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: #2b353c;
  color: #d7e3e7;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
}

.structured-sections {
  max-height: 650px;
  overflow-y: auto;
  padding-right: 6px;
  scroll-behavior: smooth;
}

.structured-sections::-webkit-scrollbar {
  width: 10px;
}

.structured-sections::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.structured-sections::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(240, 56, 41, 0.88), rgba(206, 52, 40, 0.95));
  border-radius: 999px;
  border: 2px solid rgba(31, 41, 47, 0.95);
}

.structured-section {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #1f292f;
  padding: 14px;
  margin-bottom: 12px;
}

.structured-section h4 {
  margin: 0 0 10px;
  color: #eaf1f4;
  font-size: 18px;
}

.structured-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #d7e4e8;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.structured-table th,
.structured-table td {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: #253138;
  padding: 10px 12px;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
}

.structured-table th {
  width: 32%;
  color: #edf4f7;
  font-weight: 600;
  text-align: left;
}

.equipment-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.equipment-check-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: #253138;
  padding: 10px 12px;
}

.equipment-check-item.is-checked {
  border-color: rgba(122, 217, 165, 0.48);
  background: linear-gradient(155deg, rgba(42, 67, 56, 0.85), rgba(37, 49, 56, 0.95));
}

.equipment-check-item.is-unchecked {
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(155deg, rgba(46, 56, 62, 0.82), rgba(34, 43, 49, 0.95));
}

.equipment-check-main {
  display: flex;
  align-items: center;
  gap: 9px;
}

.equipment-check-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid rgba(181, 198, 205, 0.58);
  background: rgba(25, 34, 39, 0.9);
  position: relative;
  flex-shrink: 0;
}

.equipment-check-item.is-checked .equipment-check-icon {
  border-color: #7ad9a5;
  background: rgba(122, 217, 165, 0.18);
}

.equipment-check-item.is-checked .equipment-check-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 6px;
  height: 11px;
  border: solid #7ad9a5;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.equipment-check-label {
  color: #e9f1f4;
  font-size: 14px;
  font-weight: 600;
}

.equipment-check-status {
  display: inline-flex;
  margin-top: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  padding: 4px 8px;
}

.equipment-check-item.is-checked .equipment-check-status {
  color: #8ce4b4;
  border-color: rgba(122, 217, 165, 0.44);
  background: rgba(122, 217, 165, 0.15);
}

.equipment-check-item.is-unchecked .equipment-check-status {
  color: #c2d1d7;
  border-color: rgba(189, 203, 211, 0.35);
  background: rgba(189, 203, 211, 0.09);
}

.equipment-check-note {
  margin-top: 7px;
  color: #9fb2b9;
  font-size: 12px;
  line-height: 1.45;
}

.details-insights {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 14px;
  margin-bottom: 14px;
}

.risk-card,
.condition-map-card {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: #1f292f;
  padding: 14px;
}

.risk-card h4,
.condition-map-head h4 {
  margin: 0;
  font-size: 16px;
  color: #edf4f6;
}

.risk-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.risk-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  background: rgba(156, 176, 184, 0.2);
  color: #d4e1e6;
  border: 1px solid rgba(156, 176, 184, 0.35);
}

.risk-level-badge.low {
  color: #7ad9a5;
  border-color: rgba(122, 217, 165, 0.45);
  background: rgba(122, 217, 165, 0.12);
}

.risk-level-badge.medium {
  color: #ffd289;
  border-color: rgba(255, 210, 137, 0.45);
  background: rgba(255, 210, 137, 0.12);
}

.risk-level-badge.high {
  color: #ff9f97;
  border-color: rgba(255, 159, 151, 0.5);
  background: rgba(255, 159, 151, 0.12);
}

.risk-meta strong {
  color: #f2f7f8;
  font-size: 15px;
}

.risk-reasons-list {
  margin: 12px 0 0;
  padding-left: 16px;
  color: #c8d7dd;
  font-size: 13px;
}

.risk-reasons-list li {
  margin-bottom: 7px;
  line-height: 1.5;
}

.condition-map-head p {
  margin: 6px 0 0;
  color: #9db1b8;
  font-size: 12px;
}

.condition-map-shell {
  position: relative;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: radial-gradient(circle at 70% 20%, rgba(240, 56, 41, 0.14), transparent 45%),
    linear-gradient(150deg, #212d34 0%, #1b252b 100%);
  padding: 8px;
}

.condition-map-svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-car-body {
  fill: rgba(198, 213, 219, 0.18);
  stroke: rgba(198, 213, 219, 0.28);
  stroke-width: 2;
}

.map-wheel {
  fill: rgba(198, 213, 219, 0.22);
}

.map-zone {
  fill: rgba(235, 243, 246, 0.08);
  stroke: rgba(235, 243, 246, 0.2);
  stroke-width: 1.5;
}

.condition-marker {
  cursor: pointer;
}

.condition-marker .marker-dot {
  stroke: rgba(18, 25, 30, 0.86);
  stroke-width: 2;
}

.condition-marker.severity-low .marker-dot {
  fill: #2fcf87;
}

.condition-marker.severity-medium .marker-dot {
  fill: #ffb648;
}

.condition-marker.severity-high .marker-dot {
  fill: #ff6e62;
}

.condition-marker text {
  fill: #f4f9fb;
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.condition-marker.is-active .marker-dot,
.condition-marker:hover .marker-dot {
  filter: drop-shadow(0 0 8px rgba(240, 56, 41, 0.58));
}

.condition-map-tooltip {
  position: absolute;
  min-width: 190px;
  max-width: 260px;
  pointer-events: none;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(21, 30, 35, 0.97);
  color: #dce7eb;
  font-size: 12px;
  line-height: 1.45;
  padding: 8px 10px;
  z-index: 3;
}

.condition-map-tooltip strong {
  color: #f2f7f8;
  display: block;
  margin-bottom: 3px;
}

.condition-map-legend {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.condition-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  padding: 5px 9px;
  font-size: 12px;
  color: #d4e2e7;
}

.condition-map-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.condition-map-legend .sev-low i {
  background: #2fcf87;
}

.condition-map-legend .sev-medium i {
  background: #ffb648;
}

.condition-map-legend .sev-high i {
  background: #ff6e62;
}

.details-explorer {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 14px;
}

.details-explorer-nav {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #233038;
  padding: 14px;
  align-self: start;
  position: sticky;
  top: 18px;
}

.details-explorer-nav label {
  display: block;
  margin-bottom: 8px;
  color: #dce6ea;
  font-size: 13px;
  font-weight: 600;
}

.details-explorer-nav input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: #182127;
  color: #e8f0f2;
  font-size: 13px;
  padding: 10px;
  margin-bottom: 12px;
}

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

.details-nav-link {
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: #2b363e;
  color: #d6e2e7;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 11px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.details-nav-link:hover {
  background: #33414a;
}

.details-nav-link.active {
  background: #f03829;
  border-color: #f03829;
  color: #fff;
}

.details-explorer-content {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #1f292f;
  padding: 14px;
  max-height: 560px;
  overflow: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(240, 56, 41, 0.7) rgba(255, 255, 255, 0.08);
}

.details-explorer-content::-webkit-scrollbar {
  width: 10px;
}

.details-explorer-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.details-explorer-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(240, 56, 41, 0.9), rgba(206, 52, 40, 0.95));
  border-radius: 999px;
  border: 2px solid rgba(31, 41, 47, 0.95);
}

.details-explorer-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 90, 74, 0.95), rgba(218, 64, 50, 0.98));
}

.detail-section + .detail-section {
  margin-top: 14px;
}

.detail-section h4 {
  margin: 0 0 10px;
  color: #eaf1f4;
  font-size: 16px;
  font-weight: 700;
}

.detail-table {
  display: grid;
  gap: 10px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #253138;
  padding: 12px;
}

.detail-row.is-linked {
  border-color: rgba(240, 56, 41, 0.55);
  box-shadow: 0 0 0 1px rgba(240, 56, 41, 0.22), 0 8px 16px rgba(0, 0, 0, 0.22);
}

.detail-table span {
  color: #9cb0b8;
  font-size: 14px;
}

.detail-table strong {
  color: #edf4f7;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  max-width: 68%;
  white-space: normal;
  word-break: break-word;
}

.field-confidence {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  color: #d7e4e8;
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
}

.field-confidence.low {
  color: #ffab9e;
  border-color: rgba(255, 171, 158, 0.4);
}

.field-confidence.medium {
  color: #ffd58f;
  border-color: rgba(255, 213, 143, 0.42);
}

.field-confidence.high {
  color: #8ae2b3;
  border-color: rgba(138, 226, 179, 0.45);
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.trust-grid article {
  background: linear-gradient(135deg, rgba(34, 42, 47, 0.95), rgba(24, 31, 35, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  min-height: 140px;
  display: flex;
  align-items: center;
  padding: 24px;
  position: relative;
}

.trust-grid article::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f03829;
  margin-right: 12px;
  box-shadow: 0 0 10px rgba(240, 56, 41, 0.55);
}

.trust-grid h3 {
  margin: 0;
  color: #ecf2f6;
  font-size: 23px;
  line-height: 1.4;
}

.faq-section {
  padding-bottom: 70px;
}

.faq-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.faq-list details {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px 18px;
  background: rgba(30, 38, 43, 0.93);
}

.faq-list summary {
  font-size: 18px;
  font-weight: 600;
  color: #f0f5f7;
  cursor: pointer;
}

.faq-list p {
  margin: 10px 0 0;
  color: #b9c7cc;
  line-height: 1.65;
}

@media (max-width: 1199.98px) {
  .hero-layout,
  .results-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

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

  .translator-visual {
    min-height: 390px;
  }

  .visual-doc {
    width: 82%;
  }

  .en-doc {
    top: 176px;
  }
}

@media (max-width: 991.98px) {
  .details-insights {
    grid-template-columns: 1fr;
  }

  .details-explorer {
    grid-template-columns: 1fr;
  }

  .details-explorer-nav {
    position: static;
  }

  .details-explorer-content {
    max-height: none;
  }
}

@media (max-width: 767.98px) {
  .translator-hero {
    padding-top: 115px;
  }

  .hero-copy h1 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .hero-copy p {
    font-size: 16px;
    line-height: 1.6;
  }

  .upload-shell,
  .history-shell,
  .results-shell,
  .content-shell {
    padding: 22px;
  }

  .sheet-preview-card,
  .translation-card {
    width: 100%;
    overflow: hidden;
  }

  .dropzone {
    min-height: 280px;
    padding: 14px;
  }

  .upload-actions {
    justify-content: stretch;
  }

  .browse-button,
  .translate-button,
  .ghost-button {
    width: 100%;
  }

  .selected-file-card,
  .selected-file-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .translation-actions {
    width: 100%;
  }

  .translation-actions button {
    width: 100%;
  }

  .translation-actions {
    flex-direction: column;
  }

  .translator-visual {
    min-height: 360px;
    padding: 18px;
  }

  .visual-doc {
    width: 92%;
    transform: none;
  }

  .jp-doc {
    left: 10px;
    top: 50px;
  }

  .en-doc {
    right: 10px;
    top: 176px;
  }

  .visual-translate-flow {
    top: 154px;
  }

  .visual-chip {
    font-size: 10px;
    padding: 5px 9px;
  }

  .visual-chip-top {
    right: 10px;
    top: 10px;
  }

  .visual-chip-bottom {
    left: 10px;
    bottom: 66px;
  }

  .sheet-preview {
    min-height: 340px;
    padding: 12px;
  }

  .sheet-preview-image,
  .sheet-preview-pdf {
    height: 300px;
  }

  .structured-sections {
    max-height: none;
    padding-right: 0;
    overflow-y: visible;
  }

  .section-jump-nav {
    position: static;
  }

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

  .table-wrap .structured-table {
    min-width: 520px;
  }

  .structured-table th,
  .structured-table td {
    min-width: 160px;
    font-size: 13px;
    padding: 9px 10px;
  }

  .equipment-checklist {
    grid-template-columns: 1fr;
  }

  .trust-grid article {
    min-height: 100px;
    padding: 18px;
  }

  .trust-grid h3 {
    font-size: 18px;
  }

  .faq-list summary {
    font-size: 16px;
  }

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

@media (max-width: 575.98px) {
  .translator-main .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .translator-hero {
    padding-top: 104px;
    padding-bottom: 56px;
  }

  .hero-trust-list {
    gap: 12px;
  }

  .hero-cta {
    width: 100%;
  }

  .upload-shell,
  .history-shell,
  .results-shell,
  .content-shell {
    padding: 16px;
    border-radius: 16px;
  }

  .upload-card,
  .sheet-preview-card,
  .translation-card {
    padding: 14px;
  }

  .dropzone {
    min-height: 250px;
  }

  .selected-state-head {
    gap: 12px;
  }

  .selected-state-head strong {
    font-size: 17px;
  }

  .dropzone-preview-image {
    max-height: 220px;
  }

  .dropzone h3 {
    font-size: 20px;
  }

  .dropzone-icon {
    width: 62px;
    height: 62px;
  }

  .translator-visual {
    min-height: 330px;
    padding: 14px;
  }

  .visual-doc {
    width: calc(100% - 16px);
    padding: 11px;
  }

  .jp-doc {
    left: 8px;
    top: 44px;
  }

  .en-doc {
    right: 8px;
    top: 162px;
  }

  .visual-translate-flow {
    top: 140px;
    gap: 8px;
    padding: 7px 8px;
  }

  .lang-pill {
    width: 32px;
    height: 26px;
    font-size: 12px;
  }

  .flow-arrow {
    font-size: 14px;
  }

  .sheet-preview {
    min-height: 290px;
  }

  .sheet-preview-image,
  .sheet-preview-pdf {
    height: 250px;
  }

  .section-jump-nav {
    padding: 6px;
  }

  .section-jump-btn {
    font-size: 11px;
    padding: 7px 10px;
  }

  .table-wrap .structured-table {
    min-width: 480px;
  }
}
