:root {
  --lfc-ink: #20252b;
  --lfc-muted: #5b6570;
  --lfc-line: #cfd6dc;
  --lfc-line-strong: #aeb9c1;
  --lfc-paper: #ffffff;
  --lfc-canvas: #f2f5f6;
  --lfc-soft: #e8f2f1;
  --lfc-teal: #106761;
  --lfc-teal-dark: #0b4d49;
  --lfc-coral: #cf5948;
  --lfc-coral-soft: #faece9;
  --lfc-blue-soft: #eaf0f7;
  --lfc-warning: #865900;
  --lfc-danger: #a1322b;
  --lfc-shadow: 0 8px 20px rgb(24 39 49 / 8%);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  color: var(--lfc-ink);
  background: var(--lfc-canvas);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}

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

button,
a,
input,
select,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #f0a43c;
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

a {
  color: var(--lfc-teal-dark);
}

.lfc-page-header,
main,
.lfc-footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.lfc-page-header {
  padding: 26px 0 20px;
}

.lfc-back-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
}

.lfc-eyebrow {
  margin: 12px 0 4px;
  color: var(--lfc-teal);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.lfc-page-header h1 {
  margin: 0;
  max-width: 100%;
  font-size: 2.5rem;
  line-height: 1.16;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

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

.lfc-lead {
  max-width: 850px;
  margin: 12px 0 0;
  color: var(--lfc-muted);
  font-size: 1rem;
}

main {
  padding-bottom: 36px;
}

.lfc-tool,
.lfc-files-panel,
.lfc-folder-breakdown,
.lfc-category-breakdown,
.lfc-guide,
.lfc-faq {
  border: 1px solid var(--lfc-line);
  border-radius: 8px;
  background: var(--lfc-paper);
}

.lfc-tool {
  padding: 22px;
  box-shadow: var(--lfc-shadow);
}

.lfc-folder-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.lfc-folder-heading {
  display: flex;
  gap: 12px;
  align-items: center;
}

.lfc-folder-heading p,
.lfc-folder-heading h2 {
  margin: 0;
}

.lfc-folder-heading p {
  color: var(--lfc-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.lfc-folder-heading h2 {
  font-size: 1.22rem;
  line-height: 1.3;
}

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

.lfc-folder-drop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  min-width: 0;
  min-height: 90px;
  align-items: center;
  padding: 16px;
  border: 2px dashed var(--lfc-line-strong);
  border-radius: 8px;
  background: #f9fbfb;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.lfc-folder-drop[data-drag="true"] {
  border-color: var(--lfc-coral);
  background: var(--lfc-coral-soft);
}

.lfc-folder-drop[data-state="received"] {
  border-style: solid;
  border-color: var(--lfc-teal);
  background: var(--lfc-soft);
}

.lfc-folder-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.lfc-folder-copy strong,
.lfc-folder-copy span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.lfc-folder-copy span {
  color: var(--lfc-muted);
  font-size: 0.87rem;
}

.lfc-browser-confirmation-note {
  margin: 12px 0 0;
  padding-left: max(0px, calc(32% + 18px));
  color: #3f4a54;
  font-size: 0.875rem;
  line-height: 1.55;
}

.lfc-run-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--lfc-line);
}

.lfc-button {
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid var(--lfc-line-strong);
  border-radius: 6px;
  color: var(--lfc-ink);
  background: #fff;
  font-weight: 750;
  line-height: 1.35;
  cursor: pointer;
}

.lfc-button:hover:not(:disabled) {
  border-color: var(--lfc-teal);
}

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

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

.lfc-button-danger {
  border-color: var(--lfc-danger);
  color: #fff;
  background: var(--lfc-danger);
}

.lfc-button-quiet {
  color: var(--lfc-teal-dark);
  background: var(--lfc-soft);
}

.lfc-button-danger-quiet {
  border-color: #d9aaa5;
  color: var(--lfc-danger);
  background: #fff6f4;
}

.lfc-start-button {
  min-width: 180px;
}

.lfc-progress-region {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--lfc-teal);
  background: var(--lfc-soft);
}

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

.lfc-progress-region progress {
  width: 100%;
  height: 12px;
  margin-top: 8px;
  accent-color: var(--lfc-teal);
}

.lfc-progress-region p {
  margin: 5px 0 0;
  color: var(--lfc-muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.lfc-summary {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--lfc-line);
}

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

.lfc-section-heading .lfc-eyebrow,
.lfc-section-heading h2 {
  margin: 0;
}

.lfc-section-heading h2 {
  font-size: 1.35rem;
  line-height: 1.3;
}

.lfc-section-heading-compact h2 {
  font-size: 1.18rem;
}

.lfc-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--lfc-line);
}

.lfc-summary-item {
  display: grid;
  min-width: 0;
  min-height: 106px;
  align-content: center;
  gap: 2px;
  padding: 14px;
  border-right: 1px solid var(--lfc-line);
}

.lfc-summary-item:last-child {
  border-right: 0;
}

.lfc-summary-item span,
.lfc-summary-item small {
  color: var(--lfc-muted);
  font-size: 0.78rem;
}

.lfc-summary-item strong {
  min-width: 0;
  color: var(--lfc-teal-dark);
  font-size: 1.18rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.lfc-summary-file strong,
.lfc-summary-folder strong {
  font-size: 0.98rem;
}

.lfc-summary-folder {
  background: var(--lfc-blue-soft);
}

.lfc-summary-file {
  background: var(--lfc-coral-soft);
}

.lfc-status-message {
  display: flex;
  min-height: 3.25rem;
  margin: 10px 0 0;
  padding: 6px 0 6px max(0px, calc(32% + 18px));
  align-items: center;
  color: var(--lfc-muted);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
}

.lfc-status-message[data-tone="success"] {
  color: var(--lfc-teal-dark);
}

.lfc-status-message[data-tone="warning"] {
  color: var(--lfc-warning);
}

.lfc-status-message[data-tone="error"] {
  color: var(--lfc-danger);
}

.lfc-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(300px, 0.82fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.lfc-files-panel,
.lfc-folder-breakdown,
.lfc-category-breakdown,
.lfc-guide,
.lfc-faq {
  padding: 20px;
}

.lfc-breakdown {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.lfc-review-summary {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0 8px;
  align-items: baseline;
  text-align: right;
}

.lfc-review-summary span {
  grid-column: 1 / -1;
  color: var(--lfc-muted);
  font-size: 0.76rem;
}

.lfc-review-summary strong {
  color: var(--lfc-coral);
}

.lfc-review-summary small {
  color: var(--lfc-muted);
}

.lfc-filters {
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) repeat(4, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-block: 1px solid var(--lfc-line);
  background: #f7f9fa;
}

.lfc-filters label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--lfc-muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.lfc-filters input,
.lfc-filters select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--lfc-line-strong);
  border-radius: 5px;
  color: var(--lfc-ink);
  background: #fff;
}

.lfc-filters .lfc-button {
  grid-column: -2 / -1;
}

.lfc-scope-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 2px;
  color: var(--lfc-muted);
  font-size: 0.84rem;
}

.lfc-scope-row strong {
  color: var(--lfc-ink);
  overflow-wrap: anywhere;
}

.lfc-text-button {
  padding: 4px 2px;
  border: 0;
  color: var(--lfc-teal-dark);
  background: transparent;
  font-weight: 750;
  text-decoration: underline;
  cursor: pointer;
}

.lfc-file-table-wrap {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--lfc-line);
  border-radius: 6px;
}

.lfc-file-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

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

.lfc-file-table th {
  color: #37414a;
  background: #e8ecef;
  font-size: 0.78rem;
}

.lfc-file-table th:first-child,
.lfc-file-table td:first-child {
  width: 64px;
  text-align: center;
}

.lfc-file-table th:nth-child(2) {
  width: 38%;
}

.lfc-file-table th:nth-child(3) {
  width: 16%;
}

.lfc-file-table th:nth-child(4) {
  width: 15%;
}

.lfc-file-table th:nth-child(5) {
  width: 18%;
}

.lfc-file-table tbody tr:last-child td {
  border-bottom: 0;
}

.lfc-file-table tbody tr:hover {
  background: #f7fbfa;
}

.lfc-file-name {
  min-width: 0;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.lfc-file-name small {
  display: block;
  margin-top: 2px;
  color: var(--lfc-muted);
  font-size: 0.75rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.lfc-size-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lfc-review-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--lfc-coral);
}

.lfc-empty-result {
  margin: 0;
  padding: 24px 12px;
  color: var(--lfc-muted);
  text-align: center;
}

.lfc-load-more {
  display: block;
  width: min(100%, 340px);
  margin: 14px auto 0;
}

.lfc-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.lfc-count-label {
  color: var(--lfc-muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.lfc-section-note {
  margin: -4px 0 12px;
  color: var(--lfc-muted);
  font-size: 0.82rem;
}

.lfc-folder-rows {
  display: grid;
  gap: 7px;
  max-height: 510px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.lfc-folder-row {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--lfc-ink);
  background: #f7f9fa;
  text-align: left;
  cursor: pointer;
}

.lfc-folder-row:hover,
.lfc-folder-row[aria-pressed="true"] {
  border-color: var(--lfc-teal);
}

.lfc-folder-row[aria-pressed="true"] {
  background: var(--lfc-soft);
}

.lfc-folder-row-top,
.lfc-category-row > div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
}

.lfc-folder-row-top strong {
  min-width: 0;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.lfc-folder-row-top span,
.lfc-folder-row small,
.lfc-category-row span,
.lfc-category-row small {
  flex: 0 0 auto;
  color: var(--lfc-muted);
  font-size: 0.72rem;
}

.lfc-meter {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #dce3e6;
}

.lfc-meter-fill {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--lfc-teal);
}

.lfc-category-rows {
  display: grid;
  gap: 12px;
}

.lfc-category-row {
  display: grid;
  gap: 5px;
}

.lfc-category-row strong {
  font-size: 0.86rem;
}

.lfc-category-row:nth-child(2n) .lfc-meter-fill {
  background: var(--lfc-coral);
}

.lfc-guide,
.lfc-faq {
  margin-top: 16px;
}

.lfc-guide > .lfc-eyebrow,
.lfc-guide > h2,
.lfc-faq > .lfc-eyebrow,
.lfc-faq > h2 {
  margin: 0;
}

.lfc-guide > h2,
.lfc-faq > h2 {
  font-size: 1.32rem;
}

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

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

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

.lfc-guide-grid h3 {
  font-size: 0.98rem;
}

.lfc-guide-grid p {
  margin-top: 5px;
  color: var(--lfc-muted);
  font-size: 0.9rem;
}

.lfc-faq dl {
  margin: 12px 0 0;
  border-top: 1px solid var(--lfc-line);
}

.lfc-faq dl > div {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--lfc-line);
}

.lfc-faq dt {
  font-weight: 800;
}

.lfc-faq dd {
  margin: 0;
  color: var(--lfc-muted);
}

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

.lfc-related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 18px;
  padding: 16px 0;
  border-block: 1px solid var(--lfc-line);
}

.lfc-related a {
  min-height: 36px;
  font-weight: 750;
}

.lfc-footer {
  padding: 18px 0 28px;
  color: var(--lfc-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

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

@media (max-width: 1060px) {
  .lfc-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lfc-search-field {
    grid-column: span 2;
  }

  .lfc-filters .lfc-button {
    grid-column: auto;
  }

  .lfc-dashboard {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  }
}

@media (max-width: 900px) {
  .lfc-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .lfc-folder-rows {
    max-height: 420px;
  }
}

@media (max-width: 700px) {
  .lfc-page-header,
  main,
  .lfc-footer {
    width: min(100% - 24px, 1180px);
  }

  .lfc-page-header {
    padding-top: 18px;
  }

  .lfc-tool,
  .lfc-files-panel,
  .lfc-folder-breakdown,
  .lfc-category-breakdown,
  .lfc-guide,
  .lfc-faq {
    padding: 16px;
  }

  .lfc-folder-panel {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lfc-browser-confirmation-note {
    padding-left: 0;
  }

  .lfc-status-message {
    min-height: 3.5rem;
    padding-left: 0;
  }

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

  .lfc-summary-item:nth-child(2) {
    border-right: 0;
  }

  .lfc-summary-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--lfc-line);
  }

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

  .lfc-search-field {
    grid-column: 1 / -1;
  }

  .lfc-breakdown,
  .lfc-guide-grid {
    grid-template-columns: 1fr;
  }

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

  .lfc-file-table,
  .lfc-file-table tbody {
    display: block;
  }

  .lfc-file-table thead {
    display: none;
  }

  .lfc-file-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 14px;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid var(--lfc-line);
    border-radius: 6px;
    background: #fff;
  }

  .lfc-file-table td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
    width: auto !important;
    padding: 0;
    border: 0;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .lfc-file-table td::before {
    content: attr(data-label);
    color: var(--lfc-muted);
    font-size: 0.75rem;
    font-weight: 750;
  }

  .lfc-file-table td:first-child {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
  }

  .lfc-file-table td:first-child::before {
    margin-right: 8px;
  }

  .lfc-file-table td:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 1;
    display: block;
    padding-right: 78px;
  }

  .lfc-file-table td:nth-child(2)::before {
    display: block;
    margin-bottom: 2px;
  }

  .lfc-size-cell {
    white-space: normal;
  }

  .lfc-faq dl > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 540px) {
  .lfc-page-header h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }

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

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

  .lfc-folder-drop {
    grid-template-columns: 1fr;
  }

  .lfc-folder-drop .lfc-button {
    width: 100%;
  }

  .lfc-run-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .lfc-start-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .lfc-run-panel .lfc-button {
    min-width: 0;
  }

  .lfc-summary-item {
    min-height: 96px;
    padding: 11px;
  }

  .lfc-section-heading {
    align-items: flex-start;
  }

  .lfc-filters {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
  }

  .lfc-search-field {
    grid-column: 1 / -1;
  }

  .lfc-file-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .lfc-file-actions .lfc-button:first-child {
    grid-column: 1 / -1;
  }

  .lfc-related {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .lfc-page-header,
  main,
  .lfc-footer {
    width: calc(100% - 20px);
  }

  .lfc-tool,
  .lfc-files-panel,
  .lfc-folder-breakdown,
  .lfc-category-breakdown,
  .lfc-guide,
  .lfc-faq {
    padding: 13px;
  }

  .lfc-page-header h1 {
    font-size: 1.68rem;
  }

  .lfc-summary-grid,
  .lfc-filters,
  .lfc-file-actions {
    grid-template-columns: 1fr;
  }

  .lfc-summary-item {
    min-height: 82px;
    border-right: 0;
    border-bottom: 1px solid var(--lfc-line);
  }

  .lfc-summary-item:last-child {
    border-bottom: 0;
  }

  .lfc-file-actions .lfc-button:first-child,
  .lfc-search-field {
    grid-column: 1;
  }

  .lfc-file-table tr {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px;
  }

  .lfc-file-table td {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .lfc-file-table td:nth-child(2) {
    padding-right: 68px;
  }
}
