.ifc-tool {
  --ifc-accent: #6552e8;
  --ifc-accent-dark: #4f3bd2;
  --ifc-ink: #24263a;
  --ifc-muted: #697087;
  --ifc-line: #e2e5ef;
  --ifc-soft: #f7f7fc;
  color: var(--ifc-ink);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: #fff;
  border: 1px solid var(--ifc-line);
  border-radius: 18px;
  box-shadow: 0 16px 45px rgba(44, 42, 91, .08);
  overflow: hidden;
  max-width: 1120px;
  margin: 24px auto;
}
.ifc-tool *, .ifc-tool *::before, .ifc-tool *::after { box-sizing: border-box; }
.ifc-header { display: flex; align-items: center; gap: 14px; padding: 16px 22px 10px; }
.ifc-header h1 { margin: 0; font-size: clamp(20px, 3vw, 27px); line-height: 1.2; letter-spacing: .01em; }
.ifc-logo { display: grid; place-items: center; min-width: 48px; height: 42px; }
.ifc-logo img { display: block; max-width: 120px; max-height: 42px; width: auto; height: auto; }
.ifc-logo-fallback { display: grid; place-items: center; width: 44px; height: 44px; color: #fff; background: linear-gradient(135deg, #7159f3, #9a55df); border-radius: 12px; font-size: 12px; font-weight: 800; }
.ifc-account { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 7px 22px; color: var(--ifc-muted); border-top: 1px solid #f1f2f7; border-bottom: 1px solid #f1f2f7; }
.ifc-account > * + *::before { content: "｜"; color: #c3c7d5; margin-right: 14px; }
.ifc-plan { color: #523ed2; font-weight: 750; }
.ifc-privacy { display: flex; gap: 9px; align-items: flex-start; padding: 10px 22px; background: #f0fbf7; color: #285e50; border-bottom: 1px solid #d8eee7; }
.ifc-privacy p { margin: 0; }
.ifc-intro { padding: 14px 22px 8px; }
.ifc-intro h2 { margin: 0 0 4px; font-size: 17px; }
.ifc-intro p { margin: 0; color: var(--ifc-muted); }
.ifc-error { margin: 10px 22px; padding: 12px 14px; color: #842029; background: #fff3f4; border: 1px solid #f4c2c7; border-radius: 10px; }
.ifc-error p { margin: 3px 0 0; }
.ifc-steps { border-top: 1px solid var(--ifc-line); border-bottom: 1px solid var(--ifc-line); background: #fff; }
.ifc-steps ol { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 14px 22px; }
.ifc-steps li { position: relative; display: flex; align-items: center; justify-content: center; gap: 9px; color: #9096aa; font-weight: 700; }
.ifc-steps li:not(:last-child)::after { content: ""; position: absolute; left: calc(75% + 10px); width: calc(50% - 20px); height: 2px; background: #e6e8f1; }
.ifc-steps b { display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid #cbd0de; border-radius: 50%; font-size: 15px; }
.ifc-steps .is-current { color: var(--ifc-accent); }
.ifc-steps .is-current b { color: #fff; border-color: var(--ifc-accent); background: var(--ifc-accent); }
.ifc-steps .is-done b { color: #fff; border-color: #36aa79; background: #36aa79; }
.ifc-panel { padding: 22px; }
.ifc-panel[hidden], .ifc-options [hidden] { display: none !important; }
.ifc-panel h2 { margin: 0 0 15px; font-size: 20px; }
.ifc-dropzone { display: flex; min-height: 170px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; border: 2px dashed #b8b1ef; border-radius: 16px; background: linear-gradient(145deg, #faf9ff, #f4f6ff); cursor: pointer; transition: .18s ease; }
.ifc-dropzone:hover, .ifc-dropzone.is-dragging { border-color: var(--ifc-accent); background: #f0edff; transform: translateY(-1px); }
.ifc-dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ifc-dropzone__icon { display: grid; place-items: center; width: 46px; height: 46px; color: #fff; background: var(--ifc-accent); border-radius: 50%; font-size: 28px; }
.ifc-help { color: var(--ifc-muted); text-align: center; }
.ifc-file-list, .ifc-results { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 8px; }
.ifc-file-list li, .ifc-result { display: flex; align-items: center; gap: 11px; padding: 10px 12px; background: var(--ifc-soft); border: 1px solid var(--ifc-line); border-radius: 10px; }
.ifc-file-list li > span:nth-child(2), .ifc-result > div { min-width: 0; flex: 1; }
.ifc-file-list strong, .ifc-file-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ifc-file-icon { display: grid; place-items: center; width: 38px; height: 38px; color: #5c49d7; background: #ebe8ff; border-radius: 9px; font-size: 11px; font-weight: 800; }
.ifc-file-list button { border: 0; background: transparent; color: #737990; font-size: 22px; min-width: 44px; min-height: 44px; cursor: pointer; }
.ifc-format-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px; }
.ifc-format-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; min-height: 84px; padding: 12px; border: 2px solid var(--ifc-line); border-radius: 12px; cursor: pointer; }
.ifc-format-card:has(input:checked) { border-color: var(--ifc-accent); background: #f5f2ff; box-shadow: 0 0 0 3px rgba(101, 82, 232, .08); }
.ifc-format-card input { width: 20px; height: 20px; grid-row: 1 / 3; }
.ifc-format-card strong { font-size: 15px; }
.ifc-format-card small { color: var(--ifc-muted); line-height: 1.35; }
.ifc-options { display: grid; gap: 12px; margin-top: 16px; padding: 15px; background: var(--ifc-soft); border-radius: 12px; }
.ifc-options fieldset { border: 0; margin: 0; padding: 0; }
.ifc-options legend { font-weight: 750; margin-bottom: 7px; }
.ifc-options label { display: inline-flex; align-items: center; gap: 5px; margin: 4px 16px 4px 0; }
.ifc-options details label { display: flex; }
.ifc-options p { color: var(--ifc-muted); margin: 4px 0 0; }
.ifc-confirm { padding: 16px; background: var(--ifc-soft); border-radius: 12px; }
.ifc-confirm dl { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.ifc-confirm dl > div { padding: 6px 14px; border-right: 1px solid var(--ifc-line); }
.ifc-confirm dl > div:last-child { border: 0; }
.ifc-confirm dt { color: var(--ifc-muted); }
.ifc-confirm dd { margin: 3px 0 0; font-weight: 750; }
.ifc-result.is-success { border-color: #bfe5d6; background: #f1fbf7; }
.ifc-result.is-error, .is-error { color: #a12631; }
.ifc-result p { margin: 2px 0; }
.ifc-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.ifc-actions button, .ifc-result button { min-height: 44px; padding: 9px 18px; border: 1px solid #b8bdcc; border-radius: 9px; color: var(--ifc-ink); background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.ifc-actions .ifc-primary { color: #fff; border-color: var(--ifc-accent); background: var(--ifc-accent); }
.ifc-actions .ifc-primary:hover { background: var(--ifc-accent-dark); }
.ifc-actions button:disabled { opacity: .45; cursor: not-allowed; }
.ifc-tool :focus-visible { outline: 3px solid #f0a12a; outline-offset: 3px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 700px) {
  .ifc-tool { margin: 12px 0; border-radius: 12px; }
  .ifc-header, .ifc-panel { padding: 15px; }
  .ifc-account, .ifc-privacy, .ifc-intro { padding-left: 15px; padding-right: 15px; }
  .ifc-account { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; }
  .ifc-account > * + *::before { display: none; }
  .ifc-account > :last-child { grid-column: 1 / -1; }
  .ifc-privacy { font-size: 12.5px; }
  .ifc-steps ol { padding: 10px 5px; }
  .ifc-steps li { flex-direction: column; gap: 2px; text-align: center; font-size: 11px; }
  .ifc-steps li:not(:last-child)::after { top: 16px; left: calc(75% + 4px); width: calc(50% - 8px); }
  .ifc-steps b { width: 28px; height: 28px; }
  .ifc-dropzone { min-height: 145px; }
  .ifc-format-grid { grid-template-columns: 1fr 1fr; }
  .ifc-confirm dl { grid-template-columns: 1fr 1fr; }
  .ifc-confirm dl > div:nth-child(2) { border-right: 0; }
  .ifc-actions button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .ifc-tool * { scroll-behavior: auto !important; transition: none !important; } }
