:root {
  color-scheme: light;
  --dfc-ink: #172126;
  --dfc-muted: #5b696f;
  --dfc-line: #b8c8c3;
  --dfc-line-soft: #d9e3df;
  --dfc-page: #eef3f1;
  --dfc-paper: #ffffff;
  --dfc-mint: #106761;
  --dfc-mint-dark: #084f4a;
  --dfc-mint-soft: #e1f0ec;
  --dfc-coral: #bd4c3d;
  --dfc-coral-soft: #fae9e5;
  --dfc-amber: #8e6208;
  --dfc-amber-soft: #fff2d5;
  --dfc-blue: #315f84;
  --dfc-blue-soft: #e5eff7;
  --dfc-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(--dfc-page);
  scroll-behavior: smooth;
}

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

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

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
.dfc-button:focus-visible,
.dfc-folder-drop:focus-within {
  outline: 3px solid rgba(16, 103, 97, 0.3);
  outline-offset: 2px;
}

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

.dfc-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;
}

.dfc-page-header,
.dfc-tool,
.dfc-results,
.dfc-zero-files,
.dfc-guide,
.dfc-faq,
.dfc-comments,
.dfc-related {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

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

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

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

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

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

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

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

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

.dfc-tool {
  overflow: hidden;
}

.dfc-folder-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 0.66fr);
  min-width: 0;
  border-bottom: 1px solid var(--dfc-line);
  background: #fbfcfc;
}

.dfc-browser-confirmation-note {
  margin: 0;
  padding: 11px 18px;
  color: #46545b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0;
  text-wrap: pretty;
}

.dfc-note-nowrap {
  white-space: nowrap;
}

.dfc-folder-panel.is-selected {
  background: var(--dfc-mint-soft);
}

.dfc-folder-heading {
  display: flex;
  min-width: 0;
  padding: 20px;
  align-items: center;
  gap: 12px;
  border-right: 1px solid var(--dfc-line);
}

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

.dfc-folder-heading p {
  color: var(--dfc-muted);
  font-size: 12px;
  font-weight: 700;
}

.dfc-folder-heading h2 {
  font-size: 20px;
  line-height: 1.3;
}

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

.dfc-folder-drop {
  display: grid;
  min-width: 0;
  min-height: 146px;
  padding: 18px 22px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 18px;
  border: 0;
  background: #f7faf9;
  transition: background-color 120ms ease;
}

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

.dfc-folder-drop strong,
.dfc-folder-drop p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dfc-folder-drop strong {
  align-self: end;
  font-size: 18px;
  line-height: 1.35;
}

.dfc-folder-drop p {
  margin: 5px 0 0;
  align-self: start;
  color: var(--dfc-muted);
  font-size: 13px;
}

.dfc-folder-drop .dfc-button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

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

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

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

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

.dfc-button-danger {
  border-color: var(--dfc-coral);
  color: #922f23;
  background: var(--dfc-coral-soft);
}

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

.dfc-run-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 18px;
  padding: 15px 18px;
  align-items: end;
  border-bottom: 1px solid var(--dfc-line);
  background: #f7faf9;
}

.dfc-field {
  display: grid;
  max-width: 430px;
  gap: 4px;
  color: #425058;
  font-size: 13px;
  font-weight: 750;
}

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

.dfc-field small {
  color: var(--dfc-muted);
  font-size: 12px;
  font-weight: 400;
}

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

.dfc-start-button {
  min-width: 200px;
}

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

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

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

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

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

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

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

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

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

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

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

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

.dfc-summary-item strong {
  min-width: 0;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.dfc-summary-candidate {
  background: var(--dfc-blue-soft);
}

.dfc-summary-groups {
  background: var(--dfc-amber-soft);
}

.dfc-summary-space {
  background: var(--dfc-coral-soft);
}

.dfc-summary-zero {
  background: #f1f3f3;
}

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

.dfc-results,
.dfc-zero-files,
.dfc-guide,
.dfc-faq {
  margin-top: 16px;
  padding: 18px;
}

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

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

.dfc-result-count {
  color: var(--dfc-muted);
  font-weight: 700;
  white-space: nowrap;
}

.dfc-result-tools {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) minmax(130px, 0.55fr) minmax(170px, 0.65fr) auto;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  align-items: end;
  border: 1px solid var(--dfc-line-soft);
  border-radius: 7px;
  background: #f7faf9;
}

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

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

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

.dfc-group-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.dfc-group {
  overflow: clip;
  border: 1px solid var(--dfc-line);
  border-radius: 7px;
  background: #fff;
  content-visibility: auto;
  contain-intrinsic-size: 250px;
}

.dfc-group summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(120px, auto));
  gap: 14px;
  min-height: 68px;
  padding: 12px 14px;
  align-items: center;
  background: #edf3f0;
  cursor: pointer;
  list-style: none;
}

.dfc-group summary::-webkit-details-marker {
  display: none;
}

.dfc-group summary::before {
  content: "›";
  grid-column: 1;
  grid-row: 1;
  width: 22px;
  color: var(--dfc-mint-dark);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  transform-origin: center;
  transition: transform 120ms ease;
}

.dfc-group[open] summary::before {
  transform: rotate(90deg);
}

.dfc-group-title {
  display: grid;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
  padding-left: 28px;
}

.dfc-group-title strong {
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.dfc-group-title small {
  color: var(--dfc-muted);
  font-size: 12px;
}

.dfc-group-stat {
  display: grid;
  justify-items: end;
  color: var(--dfc-muted);
  font-size: 11px;
  line-height: 1.3;
}

.dfc-group-stat strong {
  color: var(--dfc-ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.dfc-group-stat-space strong {
  color: #96372b;
}

.dfc-file-table-wrap {
  overflow: hidden;
}

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

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

.dfc-file-table-wrap th {
  color: #34434a;
  background: #f5f7f6;
  font-size: 12px;
}

.dfc-file-table-wrap th:nth-child(1) {
  width: 24%;
}

.dfc-file-table-wrap th:nth-child(2) {
  width: 45%;
}

.dfc-file-table-wrap th:nth-child(3) {
  width: 12%;
}

.dfc-file-table-wrap th:nth-child(4) {
  width: 19%;
}

.dfc-file-table-wrap tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: 58px;
}

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

.dfc-file-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;
}

.dfc-file-table-wrap td {
  overflow-wrap: anywhere;
}

.dfc-file-table-wrap td[data-label="容量"] {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dfc-empty-result {
  margin: 14px 0 0;
  padding: 42px 18px;
  border: 1px dashed var(--dfc-line);
  border-radius: 7px;
  color: var(--dfc-muted);
  background: #fafcfb;
  text-align: center;
}

.dfc-zero-note {
  margin: 8px 0 12px;
  color: var(--dfc-muted);
  font-size: 13px;
}

.dfc-zero-files .dfc-file-table-wrap {
  border: 1px solid var(--dfc-line);
  border-radius: 7px;
}

.dfc-zero-files .dfc-file-table-wrap th:nth-child(1) {
  width: 28%;
}

.dfc-zero-files .dfc-file-table-wrap th:nth-child(2) {
  width: 46%;
}

.dfc-zero-files .dfc-file-table-wrap th:nth-child(3) {
  width: 26%;
}

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

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

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

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

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

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

.dfc-faq dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 18px;
  margin: 12px 0 0;
  border-top: 1px solid var(--dfc-line);
}

.dfc-faq dl > div {
  min-width: 0;
  padding: 14px 0 4px;
}

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

.dfc-faq dd {
  margin: 5px 0 0;
  color: #4e5b62;
}

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

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

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

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

@media (max-width: 920px) {
  .dfc-result-tools {
    grid-template-columns: 1fr 1fr;
  }

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

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

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

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

  .dfc-summary-item:nth-child(4) {
    border-left: 0;
  }

  .dfc-summary-item:nth-child(4),
  .dfc-summary-item:nth-child(5) {
    grid-column: span 1;
  }

  .dfc-summary-item:nth-child(5) {
    grid-column: span 2;
  }

  .dfc-group summary {
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(105px, auto));
  }

  .dfc-group-stat-space {
    grid-column: 2 / -1;
  }
}

@media (max-width: 760px) {
  .dfc-folder-panel {
    grid-template-columns: 1fr;
  }

  .dfc-folder-heading {
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--dfc-line-soft);
  }

  .dfc-folder-drop {
    min-height: 140px;
  }

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

  .dfc-field {
    max-width: none;
  }

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

  .dfc-group summary {
    grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
  }

  .dfc-group-stat {
    display: none;
  }

  .dfc-group-stat-space {
    display: grid;
    grid-column: 2;
  }

  .dfc-file-table-wrap {
    overflow: visible;
  }

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

  .dfc-file-table-wrap thead {
    display: none;
  }

  .dfc-file-table-wrap tbody {
    display: grid;
    gap: 8px;
    padding: 10px;
  }

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

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

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

  .dfc-file-table-wrap td[data-label="容量"] {
    white-space: normal;
  }

  .dfc-faq dl {
    grid-template-columns: 1fr;
  }

  .dfc-faq dl > div {
    border-bottom: 1px solid var(--dfc-line-soft);
  }
}

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

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

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

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

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

  .dfc-folder-drop {
    min-height: 160px;
    padding: 15px 12px;
    grid-template-columns: 1fr;
    place-items: center;
    align-content: center;
    text-align: center;
  }

  .dfc-folder-drop strong {
    align-self: auto;
  }

  .dfc-folder-drop p {
    min-height: 22px;
    margin: 5px 0 11px;
    align-self: auto;
  }

  .dfc-folder-drop .dfc-button {
    grid-column: 1;
    grid-row: auto;
  }

  .dfc-run-panel,
  .dfc-progress-region,
  .dfc-summary,
  .dfc-results,
  .dfc-zero-files,
  .dfc-guide,
  .dfc-faq {
    padding: 12px;
  }

  .dfc-browser-confirmation-note {
    padding: 10px 12px;
  }

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

  .dfc-start-button {
    min-width: 0;
  }

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

  .dfc-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
  }

  .dfc-summary-item {
    min-height: 82px;
    padding: 8px 10px;
  }

  .dfc-summary-item:nth-child(-n + 3) {
    border-top: 1px solid var(--dfc-line);
  }

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

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

  .dfc-summary-item:nth-child(4),
  .dfc-summary-item:nth-child(5) {
    grid-column: span 1;
  }

  .dfc-summary-item:nth-child(5) {
    grid-column: 1 / -1;
    border-left: 0;
  }

  .dfc-summary-item strong {
    font-size: 20px;
  }

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

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

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

  .dfc-group summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    min-height: 78px;
  }

  .dfc-group-title {
    grid-column: 1;
  }

  .dfc-group-stat-space {
    grid-column: 1;
    justify-items: start;
    padding-left: 28px;
  }

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

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

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

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

  .dfc-folder-heading {
    padding-inline: 10px;
  }

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

  .dfc-file-table-wrap td {
    grid-template-columns: 86px 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;
  }
}
