:root {
  --bg: #ffd23f;
  --surface: #fffdf6;
  --ink: #1e1f24;
  --muted: #4f5570;
  --line: #e3c042;
  --brand-purple: #6d3ac6;
  --brand-cyan: #1db9d2;
  --danger: #b23838;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

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

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

.topbar {
  background: #f5e8b5;
  border-bottom: 1px solid rgba(67, 49, 12, 0.2);
}

.topbar-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-logo {
  height: 52px;
  width: auto;
}

.topbar-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
}

.card {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0;
}

.section-block {
  border-top: 1px solid #ead88b;
  margin-top: 16px;
  padding-top: 14px;
}

.section-block:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.one {
  grid-template-columns: minmax(0, 1fr);
}

.grid.checks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

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

input,
select,
textarea {
  margin-top: 6px;
  width: 100%;
  border: 1px solid #e0cb75;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.action-input {
  min-height: 42px;
  height: 42px;
  resize: none;
}

.action-input:focus,
.action-input.expanded {
  min-height: 120px;
  height: 120px;
  resize: vertical;
}

.is-hidden {
  display: none !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-cyan);
  box-shadow: 0 0 0 3px rgba(29, 185, 210, 0.18);
}

.item-rows {
  display: grid;
  gap: 10px;
}

.item-row {
  border: 1px solid #ecd785;
  border-radius: 10px;
  background: #fff8dd;
  padding: 10px;
}

.item-row h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

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

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.checkbox input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
}

.full-row {
  grid-column: 1 / -1;
}

.auth-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-row.signed-in #signInBtn {
  display: none;
}

.confirm-check {
  margin-top: 14px;
}

#authState {
  font-weight: 700;
  color: var(--brand-purple);
}

button {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  background: var(--brand-purple);
  font-weight: 700;
  cursor: pointer;
}

#submitBtn {
  margin-top: 22px;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status-message {
  margin: 14px 0 0;
  min-height: 22px;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-purple);
}

.status-message.error {
  color: var(--danger);
}

.status-detail {
  margin: 6px 0 0;
  min-height: 18px;
  font-size: 13px;
  color: var(--muted);
}

.signout-row {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.signout-btn {
  padding: 8px 12px;
  width: auto;
  min-height: 0;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  border: 1px solid #c7b57a;
  border-radius: 999px;
}

@media (max-width: 900px) {
  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar-title {
    font-size: 18px;
  }

  .brand-logo {
    height: 42px;
  }

  .grid.two,
  .grid.checks,
  .item-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  button {
    width: 100%;
    min-height: 48px;
  }

  .signout-btn {
    width: auto;
    min-height: 0;
  }
}
