:root {
  --bg: #f2f8ff;
  --surface: #ffffff;
  --surface-soft: #e8f2ff;
  --border: #c6ddff;
  --text: #132642;
  --muted: #4b6a92;
  --accent: #2e8cff;
  --accent-strong: #1769cc;
}

body.dark-theme {
  --bg: #090909;
  --surface: #111111;
  --surface-soft: #1a1a1a;
  --border: #2b2b2b;
  --text: #ffc800;
  --muted: #ffe07a;
  --accent: #ffc800;
  --accent-strong: #e8b600;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.header-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lang-select {
  min-width: 9.75rem;
  height: 2.625rem;
  padding: 0 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}

.back-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.theme-btn {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
}

.hero {
  padding: 2rem 0 1.2rem;
}

.badge {
  display: inline-block;
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.82rem;
}

h1 {
  margin: 0.9rem 0 0.8rem;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

.lead {
  color: var(--muted);
  max-width: 720px;
  margin: 0;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0;
}

.role-card {
  text-align: left;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 1rem;
  color: var(--text);
  cursor: pointer;
}

.role-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(46, 140, 255, 0.2);
}

body.dark-theme .role-card.active {
  box-shadow: 0 0 0 2px rgba(255, 200, 0, 0.25);
}

.role-number {
  display: inline-flex;
  width: 1.8rem;
  height: 1.8rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  margin-bottom: 0.6rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-weight: 700;
}

.role-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.role-card p {
  margin: 0;
  color: var(--muted);
}

.detail-card {
  margin-bottom: 2.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem;
}

.detail-card h3 {
  margin-top: 0;
}

.detail-card p {
  color: var(--muted);
}

#detailList {
  margin: 0;
  padding-left: 1.1rem;
}

#detailList li {
  margin-bottom: 0.45rem;
}

.demo-status {
  min-height: 2.6rem;
  margin: 1rem 0 0;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.9rem;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  font: inherit;
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.btn-action {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  background: var(--accent);
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

.list-box {
  margin-top: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem;
  background: var(--surface-soft);
}

.list-box ul {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
}

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

.photo-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 0.8rem;
}

.photo-slot {
  border: 1px dashed var(--border);
  border-radius: 12px;
  min-height: 92px;
  padding: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.9rem;
}

.map-box {
  margin-top: 0.5rem;
}

.task-grid {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.task-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem;
  background: var(--surface);
}

.task-card h4 {
  margin: 0 0 0.5rem;
}

.task-card p {
  margin: 0 0 0.45rem;
}

.task-state {
  font-weight: 700;
}

.btn-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.leader-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.leader-grid ol {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.role-link {
  text-decoration: none;
}

.map-embed {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 320px;
  margin-top: 0.8rem;
  background: var(--surface-soft);
}

.map-embed.map-pick-mode {
  cursor: crosshair;
}

.disabled-task {
  opacity: 0.6;
}

.active-tab {
  outline: 2px solid var(--accent-strong);
}

.top-controls {
  margin-top: 0;
}

.file-input {
  width: 100%;
  padding: 0.5rem 0;
  font: inherit;
  color: var(--text);
}

.upload-preview {
  margin-top: 0.5rem;
  max-width: 200px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.upload-preview img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.doc-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.field-hint {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.hidden {
  display: none;
}

.blind-call-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 0.8rem 0;
}

.big-action {
  min-height: 112px;
  font-size: 1.05rem;
}

@media (max-width: 700px) {
  .blind-call-panel {
    grid-template-columns: 1fr;
  }
}
