:root {
  --bg: #fff7eb;
  --surface: #ffffff;
  --surface2: #fceBD0;
  --border: #f0c983;
  --text: #3a2a3f;
  --muted: #8b7b87;
  --accent: #431c51;
  --accent-light: #764576;
  --accent-text: #ffdb9b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Quicksand', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.page-header p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 28px;
}

.field-block-row {
  flex-direction: row;
  gap: 12px;
}

.field-block-row > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-block label {
  font-weight: 600;
  font-size: 0.9rem;
}

.field-block input {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
}

.field-block input:focus {
  outline: 2px solid var(--accent-light);
  outline-offset: 1px;
}

.main-section {
  margin-bottom: 32px;
}

.main-section > h2 {
  font-size: 1.15rem;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.main-section > h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin: 20px 0 10px;
}

.item-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.item-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  transition: border-color 150ms, box-shadow 150ms;
}

.item-card-missing {
  border-color: #b3261e;
  box-shadow: 0 0 0 2px rgba(179, 38, 30, 0.2);
}

.item-card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface2);
  flex-shrink: 0;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-code {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface2);
  border-radius: 6px;
  padding: 2px 6px;
  margin-bottom: 4px;
}

.item-name {
  margin: 0 0 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.rating-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rating-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 36px;
  padding: 4px 8px;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}

.rating-num {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.1;
}

.rating-hint {
  font-size: 0.55rem;
  font-weight: 500;
  opacity: 0.75;
  line-height: 1.1;
  margin-top: 1px;
}

.rating-btn[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.rating-btn-zero .rating-num {
  font-size: 0.7rem;
}

.rating-btn-zero[aria-pressed='true'] {
  background: var(--accent-light);
  border-color: var(--accent-light);
}

.submit-error {
  color: #b3261e;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 30px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.thank-you {
  text-align: center;
  padding: 48px 16px;
}

.thank-you h2 {
  margin: 0 0 8px;
}

.thank-you p {
  color: var(--muted);
}
