* { box-sizing: border-box; }
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1d1d1f;
  background: #fff;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
body { margin: 0; }
main { max-width: 960px; margin: auto; padding: 0 40px 24px; }
header { padding: 19px 0; border-bottom: 1px solid #d2d2d7; font-size: 16px; font-weight: 600; }
h1 { margin: 40px 0 8px; font-size: clamp(32px, 4vw, 46px); line-height: 1.16; letter-spacing: -.045em; }
.intro, .success p { margin: 0; color: #626267; line-height: 1.6; }
.supplier { display: flex; align-items: center; gap: 28px; padding: 18px 22px; margin: 28px 0 32px; background: #f5f5f7; border-radius: 14px; }
label { flex-shrink: 0; font-size: 15px; font-weight: 600; }
input {
  width: 100%; min-width: 0; height: 42px; border: 1px solid #c8c8cc; border-radius: 9px;
  background: white; color: inherit; padding: 0 12px; font: inherit; font-size: 16px;
}
input::placeholder { color: #737378; opacity: 1; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #0071e3; outline-offset: 2px; }
.supplier input { max-width: 400px; }
h2 { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 12px; font-size: 23px; letter-spacing: -.025em; }
h2 small, th, .code, .compact, footer span { font-size: 13px; font-weight: 400; color: #626267; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; }
th, td { padding: 11px 10px; border-bottom: 1px solid #e5e5e7; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th:nth-last-child(-n+2), td input { text-align: right; }
td:nth-last-child(-n+2) { width: 16%; }
.code { display: block; font-size: 11px; letter-spacing: .05em; }
td b { display: block; margin-top: 3px; font-size: 17px; font-weight: 600; }
.compact { display: none; }
footer {
  position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 0 max(18px, env(safe-area-inset-bottom)); border-top: 1px solid #d2d2d7;
  margin-top: -1px; background: rgba(255,255,255,.95); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
footer strong { display: block; font-size: 28px; letter-spacing: -.04em; overflow-wrap: anywhere; }
button, .success a {
  display: inline-block; flex-shrink: 0; border: 0; border-radius: 24px; background: #0071e3; color: white;
  padding: 13px 24px; font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer;
}
button:hover, .success a:hover { background: #0066cc; }
.success { margin: 14vh auto; text-align: center; }
.success h1 { margin: 22px 0 8px; }
.success p { margin-bottom: 26px; }
.check { display: inline-grid; place-items: center; width: 54px; height: 54px; border: 2px solid #248a3d; border-radius: 50%; color: #248a3d; font-size: 29px; }
@media (max-width: 650px) {
  main { padding: 0 18px; }
  header { padding: 14px 0; font-size: 15px; }
  h1 { margin-top: 26px; }
  .intro { font-size: 14px; }
  .supplier { display: block; margin: 20px 0 25px; padding: 14px; }
  .supplier label { display: block; margin-bottom: 9px; }
  .supplier input { max-width: none; }
  h2 { font-size: 20px; margin-bottom: 4px; }
  .detail { display: none; }
  .compact { display: block; margin-top: 3px; font-size: 12px; }
  th, td { padding: 10px 4px; }
  td:nth-last-child(-n+2) { width: 23%; }
  td input { padding: 0 8px; height: 44px; }
  td b { font-size: 16px; }
  footer { padding-top: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  footer strong { font-size: 22px; }
  button { padding-inline: 18px; }
}
.editor { margin: 24px 0 12px; }
.edit-row { display: grid; grid-template-columns: 1fr 2fr 1.5fr .8fr auto; gap: 12px; align-items: end; padding: 16px 0; border-top: 1px solid #ddd; }
.editor label { display: grid; gap: 5px; color: #626267; font-size: 13px; font-weight: 500; }
.editor .remove, .editor .secondary { background: #f5f5f7; color: #0066cc; }
.editor .remove { color: #b32624; }
.editor .secondary { margin: 8px 0 24px; }
.editor footer { position: static; }
.password { max-width: 280px; min-width: 0; }
#status { min-height: 1.4em; }
button:disabled { opacity: .45; }
@media(max-width:650px){.edit-row {grid-template-columns:1fr 1fr;} .edit-row .remove {justify-self:start; padding:8px 16px;} }
