:root {
  --primary: #f46b0b;
  --primary-dark: #d95c05;
  --ink: #202124;
  --muted: #6b7280;
  --line: #d9dee7;
  --surface: #ffffff;
  --page: #f4f6f8;
  --ok: #147a3d;
  --danger: #a53333;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}

a {
  color: var(--primary-dark);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.brand {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.subtle {
  color: var(--muted);
}

.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel {
  padding: 20px;
}

.grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 14px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 700;
}

.button {
  background: var(--primary);
  color: white;
}

.button:hover {
  background: var(--primary-dark);
}

.button.secondary {
  background: #e8edf3;
  color: var(--ink);
}

.button.danger {
  background: #ffe8e8;
  color: var(--danger);
}

.list {
  display: grid;
  gap: 10px;
}

.list button {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.list button.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(244, 107, 11, 0.14);
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.metric b {
  display: block;
  font-size: 24px;
}

.notice {
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.notice.ok {
  background: #edfdf3;
  border-color: #bbf7d0;
  color: var(--ok);
}

.notice.error {
  background: #fff1f1;
  border-color: #ffc7c7;
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.design-card {
  overflow: hidden;
}

.design-card label {
  display: block;
  cursor: pointer;
  font-weight: 400;
}

.design-card input {
  width: auto;
  margin: 12px;
}

.design-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  display: block;
  background: #f7f7f7;
}

.design-title {
  display: block;
  padding: 0 12px 12px;
  font-weight: 700;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login .panel {
  width: min(420px, 100%);
}

.survey-page {
  width: min(820px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero-image {
  width: 100%;
  max-width: 820px;
  display: block;
  margin: 0 auto;
}

@media (max-width: 840px) {
  .grid,
  .meta {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
