:root {
  --bg: #fff7ec;
  --card: #ffffff;
  --text: #3b2a20;
  --muted: #7a6455;
  --primary: #e07a2f;
  --primary-dark: #b85a17;
  --green: #4f8f4a;
  --red: #b5402f;
  --line: #f0dcc4;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 20px/1.5 "Trebuchet MS", "Segoe UI", Arial, Helvetica, sans-serif;
}
header {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  padding: 16px 24px; background: var(--primary); color: #fff;
}
.brand { color: #fff; font-size: 1.4rem; font-weight: bold; text-decoration: none; }
#who { display: flex; align-items: center; gap: 12px; }
main { max-width: 760px; margin: 0 auto; padding: 24px 16px 80px; }
h1 { font-size: 1.8rem; margin: 0 0 8px; }
h2 { font-size: 1.4rem; margin: 24px 0 8px; }
p.lead { color: var(--muted); margin-top: 0; }
a { color: var(--primary-dark); }

.card {
  background: var(--card); border: 2px solid var(--line); border-radius: 16px;
  padding: 18px 20px; margin: 14px 0;
}
.card h3 { margin: 0 0 6px; font-size: 1.3rem; }
.card .desc { margin: 6px 0 10px; overflow-wrap: anywhere; }
.card.offered { background: #eef6ec; border-color: #bcd9b8; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: bold; cursor: pointer; text-decoration: none; text-align: center;
  min-height: 52px; padding: 10px 22px; border-radius: 14px; border: 2px solid var(--primary);
  background: var(--primary); color: #fff;
}
button:hover, .btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
button.secondary, .btn.secondary { background: #fff; color: var(--primary-dark); }
button.secondary:hover { background: #ffecd6; }
button.danger { background: #fff; color: var(--red); border-color: var(--red); }
button.danger:hover { background: #fbe6e2; }
button.green { background: var(--green); border-color: var(--green); }
button.small { min-height: 44px; padding: 6px 14px; font-size: 0.9rem; }
button:focus-visible, input:focus-visible, select:focus-visible, .editor:focus-visible, a:focus-visible {
  outline: 4px solid #ffb36b; outline-offset: 2px;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.people button, .people a { min-height: 76px; font-size: 1.3rem; }

input[type=text], input[type=password], input[type=number], input:not([type]) {
  font: inherit; padding: 10px 14px; min-height: 52px; border: 2px solid var(--line); border-radius: 12px; width: 100%; background: #fff;
}
label { display: block; font-weight: bold; margin: 14px 0 6px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row input { flex: 1 1 140px; width: auto; }

.toolbar { display: flex; gap: 8px; margin-bottom: 6px; }
.toolbar button { min-height: 44px; padding: 4px 16px; }
.editor {
  min-height: 130px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; overflow-wrap: anywhere;
}

.badge { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 0.85em; font-weight: bold; }
.badge.ok { background: var(--green); color: #fff; }
.badge.info { background: #ffe2bd; color: var(--primary-dark); }
.error { color: var(--red); font-weight: bold; }
.back { display: inline-block; margin-bottom: 8px; }
.member-row { display: flex; gap: 10px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.member-row input { flex: 1 1 180px; width: auto; }

#toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff;
  padding: 12px 22px; border-radius: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw;
}
#toast.show { opacity: 1; }
#toast.err { background: var(--red); }
