:root {
  color-scheme: light;
  --fcc-ink: #172126;
  --fcc-muted: #5d6b72;
  --fcc-line: #b9c8c3;
  --fcc-line-soft: #d9e3df;
  --fcc-page: #eef3f1;
  --fcc-paper: #ffffff;
  --fcc-mint: #0d756d;
  --fcc-mint-dark: #075b55;
  --fcc-mint-soft: #e0f0ec;
  --fcc-coral: #c94f3e;
  --fcc-coral-soft: #fae9e5;
  --fcc-amber: #9a6500;
  --fcc-amber-soft: #fff2cf;
  --fcc-blue: #315f84;
  --fcc-blue-soft: #e5eff7;
  --fcc-shadow: 0 10px 24px rgba(25, 54, 49, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--fcc-page);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--fcc-ink);
  background: var(--fcc-page);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
.fcc-button {
  min-height: 42px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.fcc-button:focus-visible,
.fcc-folder-drop:focus-within {
  outline: 3px solid rgba(13, 117, 109, 0.3);
  outline-offset: 2px;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.fcc-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.fcc-page-header,
.fcc-tool,
.fcc-results,
.fcc-guide,
.fcc-ad-reserve,
.fcc-comments,
.fcc-related {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.fcc-page-header {
  padding: 22px 0 16px;
}

.fcc-back-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: var(--fcc-mint-dark);
  font-weight: 700;
  text-decoration: none;
}

.fcc-back-link:hover {
  text-decoration: underline;
}

.fcc-eyebrow {
  margin: 11px 0 2px;
  color: var(--fcc-mint-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.fcc-page-header h1 {
  margin: 0;
  max-width: 940px;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: 0;
}

.fcc-page-header h1 span + span::before {
  content: "";
}

.fcc-lead {
  max-width: 900px;
  margin: 8px 0 0;
  color: #46545b;
  font-size: 16px;
}

.fcc-tool,
.fcc-results,
.fcc-guide {
  border: 1px solid var(--fcc-line);
  border-radius: 8px;
  background: var(--fcc-paper);
  box-shadow: var(--fcc-shadow);
}

.fcc-tool {
  overflow: hidden;
}

.fcc-folder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}

.fcc-folder-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--fcc-line);
  border-radius: 7px;
  background: #fbfcfc;
}

.fcc-folder-panel.is-selected {
  border-color: var(--fcc-mint);
  box-shadow: inset 0 0 0 1px var(--fcc-mint);
}

.fcc-folder-panel > header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px 9px;
  border-bottom: 1px solid var(--fcc-line-soft);
}

.fcc-folder-panel > header p,
.fcc-folder-panel > header h2 {
  margin: 0;
}

.fcc-folder-panel > header p {
  color: var(--fcc-muted);
  font-size: 12px;
  font-weight: 700;
}

.fcc-folder-panel > header h2 {
  font-size: 19px;
  line-height: 1.25;
}

.fcc-folder-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--fcc-mint);
  font-size: 14px;
  font-weight: 800;
}

.fcc-folder-mark-destination {
  background: var(--fcc-coral);
}

.fcc-folder-drop {
  display: grid;
  min-height: 148px;
  padding: 18px;
  place-items: center;
  align-content: center;
  border: 0;
  background: #f7faf9;
  text-align: center;
  transition: background-color 120ms ease;
}

.fcc-folder-drop.is-dragover {
  background: var(--fcc-amber-soft);
  box-shadow: inset 0 0 0 2px var(--fcc-amber);
}

.fcc-folder-drop strong {
  max-width: 100%;
  font-size: 17px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.fcc-folder-drop p {
  min-height: 24px;
  margin: 5px 0 12px;
  color: var(--fcc-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.fcc-button {
  display: inline-flex;
  min-width: 0;
  padding: 9px 14px;
  align-items: center;
  justify-content: center;
  border: 1px solid #95a9a3;
  border-radius: 6px;
  color: var(--fcc-ink);
  background: #fff;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.fcc-button:hover:not(:disabled) {
  border-color: var(--fcc-mint);
}

.fcc-button-primary {
  border-color: var(--fcc-mint);
  color: #fff;
  background: var(--fcc-mint);
}

.fcc-button-primary:hover:not(:disabled) {
  border-color: var(--fcc-mint-dark);
  background: var(--fcc-mint-dark);
}

.fcc-button-danger {
  border-color: var(--fcc-coral);
  color: #9d3022;
  background: var(--fcc-coral-soft);
}

.fcc-button-quiet {
  background: #f4f7f6;
}

.fcc-compare-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 16px 18px;
  align-items: center;
  border-top: 1px solid var(--fcc-line);
  border-bottom: 1px solid var(--fcc-line);
  background: #f7faf9;
}

.fcc-compare-options {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.fcc-check-option {
  display: flex;
  min-width: 220px;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
}

.fcc-check-option input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  flex: 0 0 18px;
  accent-color: var(--fcc-mint);
}

.fcc-check-option span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.fcc-check-option strong {
  line-height: 1.4;
}

.fcc-check-option small {
  color: var(--fcc-muted);
  font-size: 12px;
}

.fcc-primary-actions {
  display: flex;
  gap: 8px;
}

.fcc-compare-button {
  min-width: 210px;
}

.fcc-progress-region {
  padding: 13px 18px 15px;
  border-bottom: 1px solid var(--fcc-line);
  background: var(--fcc-blue-soft);
}

.fcc-progress-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.fcc-progress-region progress {
  width: 100%;
  height: 12px;
  margin: 8px 0 2px;
  accent-color: var(--fcc-mint);
}

.fcc-progress-region p {
  margin: 2px 0 0;
  color: var(--fcc-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.fcc-summary {
  padding: 16px 18px 18px;
}

.fcc-summary-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.fcc-summary-heading .fcc-eyebrow {
  margin: 0;
}

.fcc-summary h2,
.fcc-results h2,
.fcc-guide h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.3;
}

.fcc-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 12px;
  border: 1px solid var(--fcc-line);
  border-radius: 7px;
  overflow: hidden;
}

.fcc-summary-item {
  display: grid;
  min-width: 0;
  min-height: 92px;
  padding: 10px 12px;
  align-content: center;
  border-left: 1px solid var(--fcc-line);
  background: #f8faf9;
}

.fcc-summary-item:first-child {
  border-left: 0;
}

.fcc-summary-item span,
.fcc-summary-item small {
  color: var(--fcc-muted);
  font-size: 12px;
}

.fcc-summary-item strong {
  font-size: 25px;
  line-height: 1.15;
}

.fcc-summary-missing {
  background: var(--fcc-coral-soft);
}

.fcc-summary-extra {
  background: var(--fcc-amber-soft);
}

.fcc-summary-different {
  background: var(--fcc-blue-soft);
}

.fcc-summary-match {
  background: var(--fcc-mint-soft);
}

.fcc-status-message {
  min-height: 25px;
  margin: 12px 0 0;
  color: #425058;
  overflow-wrap: anywhere;
}

.fcc-results,
.fcc-guide {
  margin-top: 16px;
  padding: 18px;
}

.fcc-results-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.fcc-results-header .fcc-eyebrow,
.fcc-guide > .fcc-eyebrow {
  margin: 0 0 2px;
}

.fcc-result-count {
  color: var(--fcc-muted);
  font-weight: 700;
}

.fcc-result-tools {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1fr) auto;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  align-items: end;
  border: 1px solid var(--fcc-line-soft);
  border-radius: 7px;
  background: #f7faf9;
}

.fcc-result-tools label {
  display: grid;
  gap: 4px;
  color: #425058;
  font-size: 13px;
  font-weight: 700;
}

.fcc-result-tools select,
.fcc-result-tools input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #95a9a3;
  border-radius: 5px;
  color: var(--fcc-ink);
  background: #fff;
}

.fcc-result-actions {
  display: flex;
  gap: 8px;
}

.fcc-table-wrap {
  position: relative;
  min-height: 150px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--fcc-line);
  border-radius: 7px;
}

.fcc-table-wrap table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
}

.fcc-table-wrap th,
.fcc-table-wrap td {
  padding: 10px;
  vertical-align: top;
  border-bottom: 1px solid var(--fcc-line-soft);
  text-align: left;
}

.fcc-table-wrap th {
  color: #34434a;
  background: #e9efec;
  font-size: 12px;
}

.fcc-table-wrap th:nth-child(1) {
  width: 16%;
}

.fcc-table-wrap th:nth-child(2) {
  width: 26%;
}

.fcc-table-wrap th:nth-child(3),
.fcc-table-wrap th:nth-child(4) {
  width: 9%;
}

.fcc-table-wrap th:nth-child(5) {
  width: 19%;
}

.fcc-table-wrap th:nth-child(6) {
  width: 21%;
}

.fcc-table-wrap tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: 62px;
}

.fcc-table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.fcc-table-wrap code {
  display: block;
  color: #213038;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: normal;
}

.fcc-table-wrap td small,
.fcc-table-wrap td span:not(.fcc-status) {
  display: block;
  margin-top: 2px;
  color: var(--fcc-muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.fcc-number-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fcc-note-cell {
  color: #46545b;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.fcc-status {
  display: inline-flex;
  max-width: 100%;
  min-height: 27px;
  padding: 4px 7px;
  align-items: center;
  border: 1px solid var(--fcc-line);
  border-radius: 4px;
  color: #35434a;
  background: #f2f5f4;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.fcc-status-missing,
.fcc-status-content-different,
.fcc-status-size-different {
  border-color: #df9d94;
  color: #8e2e22;
  background: var(--fcc-coral-soft);
}

.fcc-status-extra {
  border-color: #d7b15d;
  color: #775000;
  background: var(--fcc-amber-soft);
}

.fcc-status-content-match {
  border-color: #7eb7aa;
  color: #075b55;
  background: var(--fcc-mint-soft);
}

.fcc-status-duplicate {
  border-color: #91abc1;
  color: #244e70;
  background: var(--fcc-blue-soft);
}

.fcc-empty-result {
  margin: 0;
  padding: 45px 18px;
  color: var(--fcc-muted);
  text-align: center;
}

.fcc-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin-top: 12px;
  border-top: 1px solid var(--fcc-line);
}

.fcc-guide-grid > div {
  padding: 14px 0;
  border-bottom: 1px solid var(--fcc-line-soft);
}

.fcc-guide-grid h3,
.fcc-guide-grid p {
  margin: 0;
}

.fcc-guide-grid h3 {
  font-size: 16px;
}

.fcc-guide-grid p {
  margin-top: 4px;
  color: #4e5b62;
}

.fcc-limit-note {
  margin: 14px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--fcc-amber);
  color: #4e5b62;
  font-size: 13px;
}

.fcc-ad-reserve {
  min-height: 120px;
  margin-block: 22px;
  padding-block: 10px;
  color: var(--fcc-muted);
  text-align: center;
}

.fcc-ad-reserve > span {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.fcc-comments {
  margin-top: 24px;
}

.fcc-related {
  display: flex;
  gap: 18px;
  padding: 20px 0;
}

.fcc-related a {
  color: var(--fcc-mint-dark);
  font-weight: 700;
}

.fcc-footer {
  margin-top: 12px;
  padding: 22px 16px 32px;
  border-top: 1px solid var(--fcc-line);
  color: var(--fcc-muted);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 820px) {
  .fcc-folder-grid {
    grid-template-columns: 1fr;
  }

  .fcc-compare-bar {
    grid-template-columns: 1fr;
  }

  .fcc-primary-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

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

  .fcc-summary-item {
    border-top: 1px solid var(--fcc-line);
    border-left: 1px solid var(--fcc-line);
  }

  .fcc-summary-item:nth-child(-n + 2) {
    border-top: 0;
  }

  .fcc-summary-item:nth-child(odd) {
    border-left: 0;
  }

  .fcc-summary-item:last-child {
    grid-column: 1 / -1;
    border-left: 0;
  }

  .fcc-result-tools {
    grid-template-columns: 1fr 1fr;
  }

  .fcc-result-actions {
    grid-column: 1 / -1;
  }

  .fcc-table-wrap {
    overflow: visible;
    border: 0;
  }

  .fcc-table-wrap table,
  .fcc-table-wrap tbody {
    display: block;
  }

  .fcc-table-wrap thead {
    display: none;
  }

  .fcc-table-wrap tbody {
    display: grid;
    gap: 10px;
  }

  .fcc-table-wrap tbody tr {
    display: block;
    overflow: hidden;
    border: 1px solid var(--fcc-line);
    border-radius: 7px;
    background: #fff;
    content-visibility: auto;
    contain-intrinsic-size: 300px;
  }

  .fcc-table-wrap td {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 9px 11px;
  }

  .fcc-table-wrap td::before {
    content: attr(data-label);
    color: var(--fcc-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .fcc-number-cell {
    white-space: normal;
  }
}

@media (max-width: 540px) {
  .fcc-page-header,
  .fcc-tool,
  .fcc-results,
  .fcc-guide,
  .fcc-related {
    width: min(100% - 20px, 1180px);
  }

  .fcc-page-header {
    padding: 14px 0 12px;
  }

  .fcc-page-header h1 {
    font-size: 28px;
    line-height: 1.18;
  }

  .fcc-page-header h1 span {
    display: block;
  }

  .fcc-lead {
    font-size: 14px;
  }

  .fcc-folder-grid,
  .fcc-summary,
  .fcc-results,
  .fcc-guide {
    padding: 12px;
  }

  .fcc-folder-grid {
    gap: 10px;
  }

  .fcc-folder-drop {
    min-height: 135px;
    padding: 14px;
  }

  .fcc-compare-bar {
    gap: 14px;
    padding: 14px 12px;
  }

  .fcc-compare-options {
    display: grid;
    gap: 12px;
  }

  .fcc-check-option {
    min-width: 0;
  }

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

  .fcc-compare-button {
    min-width: 0;
  }

  .fcc-progress-region {
    padding-inline: 12px;
  }

  .fcc-summary-heading {
    display: block;
  }

  .fcc-summary-grid {
    margin-top: 10px;
  }

  .fcc-summary-item {
    min-height: 79px;
    padding: 8px 10px;
  }

  .fcc-summary-item strong {
    font-size: 22px;
  }

  .fcc-result-tools {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .fcc-result-actions {
    display: grid;
    grid-column: auto;
    grid-template-columns: 1fr 1fr;
  }

  .fcc-results-header {
    align-items: start;
  }

  .fcc-table-wrap td {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .fcc-guide-grid {
    grid-template-columns: 1fr;
  }

  .fcc-related {
    flex-direction: column;
    gap: 8px;
    padding: 16px 0;
  }
}

@media (max-width: 340px) {
  .fcc-page-header h1 {
    font-size: 27px;
  }

  .fcc-folder-panel > header {
    padding-inline: 10px;
  }

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

  .fcc-table-wrap td {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 7px;
    padding-inline: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
