.shoe-size-tool .shoe-size-layout { align-items: stretch; row-gap: 16px; }
.shoe-size-input-panel .form-control-group-body { gap: 14px; }
.shoe-size-field,
.shoe-size-result-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  min-width: 0;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
}
.shoe-size-field .form-control,
.shoe-size-result-item .form-control { width: 100%; min-width: 0; }
.shoe-size-mode,
.shoe-size-chart-tabs,
.shoe-size-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.shoe-size-mode .btn,
.shoe-size-chart-tabs .btn {
  min-width: 88px;
  justify-content: center;
}
.shoe-size-quick-list .btn { min-width: 112px; }
.shoe-size-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13.5px;
  line-height: 1.45;
}
.shoe-size-summary,
.shoe-size-fit-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.55;
}
.shoe-size-fit-note {
  color: var(--text);
  font-weight: 600;
}
.shoe-size-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.shoe-size-result {
  background: var(--bg-soft);
  font-family: var(--mono-font);
  font-size: 14px;
}
.shoe-size-results-header,
.shoe-size-chart-header {
  flex: 0 0 auto;
  padding-top: 6px;
  padding-bottom: 6px;
}
.shoe-size-results-header > span,
.shoe-size-chart-header > span {
  flex: 1;
  min-width: 0;
}
.btn-copy-shoe,
.btn-copy-shoe-chart {
  min-width: 92px;
  justify-content: center;
  white-space: nowrap;
}
.shoe-size-chart-panel,
.shoe-size-reference-panel { margin-top: 16px; }
.shoe-size-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.shoe-size-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--bg);
}
.shoe-size-table th,
.shoe-size-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.4;
  text-align: left;
  vertical-align: middle;
}
.shoe-size-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.shoe-size-table tr:last-child td { border-bottom: 0; }
.shoe-size-table tbody tr.is-active { background: var(--primary-soft); }
.shoe-size-table code {
  display: inline-flex;
  min-width: 52px;
  justify-content: center;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text);
  font-family: var(--mono-font);
  font-size: 12.5px;
}
.shoe-size-reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.shoe-size-reference-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}
.shoe-size-reference-grid > div:last-child { border-right: 0; }
.shoe-size-reference-grid strong { color: var(--text); font-size: 13.5px; }
.shoe-size-reference-grid span { color: var(--text-2); font-size: 13px; line-height: 1.45; }
:root[data-theme="dark"] .shoe-size-result { background: var(--bg-soft); }
:root[data-theme="dark"] .shoe-size-message { border-color: #7f1d1d; background: rgba(127, 29, 29, .18); }
@media (max-width: 991px) {
  .shoe-size-result-grid,
  .shoe-size-reference-grid { grid-template-columns: 1fr; }
  .shoe-size-reference-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .shoe-size-reference-grid > div:last-child { border-bottom: 0; }
}
@media (max-width: 640px) {
  .shoe-size-tool .form-control-group-body { padding: 14px; }
  .shoe-size-input-panel .form-control-group-footer { flex-direction: column; align-items: stretch; }
  .shoe-size-input-panel .form-control-group-footer .btn { width: 100%; justify-content: center; }
  .shoe-size-results-header,
  .shoe-size-chart-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    min-height: 0;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .shoe-size-results-header > span,
  .shoe-size-chart-header > span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .btn-copy-shoe,
  .btn-copy-shoe-chart {
    width: 92px;
    min-width: 92px;
    padding-right: 8px;
    padding-left: 8px;
  }
  .shoe-size-mode,
  .shoe-size-chart-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .shoe-size-mode .btn,
  .shoe-size-chart-tabs .btn,
  .shoe-size-quick-list .btn {
    width: 100%;
    min-width: 0;
  }
  .shoe-size-quick-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
