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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f7fa;
  color: #333;
  min-height: 100vh;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px;
}

h1 {
  font-size: 1.6rem;
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #4a90d9;
}

h2 {
  font-size: 1.1rem;
  color: #2c3e50;
  margin-bottom: 12px;
}

/* フォーム */
.form-section {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 520px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

.required {
  color: #e74c3c;
}

input[type="text"],
input[type="number"],
textarea,
select {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.95rem;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #4a90d9;
}

textarea {
  resize: vertical;
}

/* 星評価 */
.star-input {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.star {
  font-size: 1.8rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
  user-select: none;
}

.star:hover,
.star.active {
  color: #f5a623;
}

.star:hover {
  transform: scale(1.15);
}

.btn-primary {
  background: #4a90d9;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: #357abd;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* リスト */
.list-section {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.list-header h2 {
  margin-bottom: 0;
}

#count {
  font-size: 0.85rem;
  color: #888;
  font-weight: normal;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #555;
}

.sort-control select {
  width: auto;
  font-size: 0.85rem;
  padding: 4px 8px;
}

/* 物件カード */
.property-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.empty-msg {
  text-align: center;
  color: #aaa;
  padding: 40px 0;
  font-size: 0.95rem;
}

.property-card {
  border: 1px solid #e8ecf0;
  border-radius: 10px;
  padding: 16px;
  position: relative;
  background: #fafbfc;
  transition: box-shadow 0.2s;
}

.property-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2c3e50;
  flex: 1;
}

.card-stars {
  color: #f5a623;
  font-size: 1.1rem;
  white-space: nowrap;
}

.card-stars .empty {
  color: #ddd;
}

.card-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  min-width: 90px;
}

.detail-label {
  font-size: 0.75rem;
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-value {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

.detail-value.rent {
  color: #e74c3c;
  font-weight: 700;
}

.card-memo {
  font-size: 0.88rem;
  color: #666;
  background: #f0f4f8;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 10px;
  white-space: pre-wrap;
}

.card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-edit-star {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.82rem;
  color: #555;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-edit-star:hover {
  background: #f0f4f8;
}

.btn-delete {
  background: none;
  border: 1px solid #f0c0c0;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.82rem;
  color: #e74c3c;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-delete:hover {
  background: #fef0f0;
}

/* 優先度変更モード */
.priority-editor {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.priority-editor .star {
  font-size: 1.5rem;
}
