* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f0f4f8;
  color: #1e293b;
  min-height: 100vh;
  padding: 16px;
}

.container {
  max-width: 680px;
  margin: 0 auto;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1e3a5f;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #2563eb;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.field {
  margin-bottom: 12px;
}

label {
  display: block;
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 4px;
}

input[type="text"],
input[type="date"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="date"]:focus {
  border-color: #2563eb;
}

.add-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.add-row input {
  flex: 1;
}

.btn-add {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.btn-add:hover {
  background: #1d4ed8;
}

.item-list {
  list-style: none;
  padding: 0;
}

.item-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.95rem;
}

.item-list li:last-child {
  border-bottom: none;
}

.item-num {
  min-width: 22px;
  height: 22px;
  background: #e0eaff;
  color: #2563eb;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.item-text {
  flex: 1;
  line-height: 1.5;
}

.btn-del {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}

.btn-del:hover {
  color: #ef4444;
}

.action-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-primary {
  flex: 1;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

#preview-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.7;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
}

.btn-copy {
  background: #059669;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-copy:hover {
  background: #047857;
}

.copy-msg {
  margin-left: 10px;
  color: #059669;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.copy-msg.show {
  opacity: 1;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.25rem;
  }

  .action-row {
    flex-direction: column;
  }

  .btn-secondary {
    width: 100%;
  }
}
