:root {
  --bg: #f4f4f2;
  --panel: #ffffff;
  --ink: #1a1a1a;
  --muted: #7a7a7a;
  --line: #e6e6e3;
  --accent: #e8452a;

  /* A4 ratio 210 x 297 mm -> keep vertical proportion */
  --poster-w: 794px;   /* ~ A4 @ 96dpi */
  --poster-h: 1123px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 32px;
  min-height: 100vh;
}

/* ---------- Controls sidebar ---------- */
.controls {
  position: sticky;
  top: 32px;
  width: 300px;
  flex: 0 0 300px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

.controls__title {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.5px;
}

.controls__subtitle {
  margin: 4px 0 24px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field__label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="file"],
.field select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}

.field input[type="color"] {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  cursor: pointer;
}

.btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn:hover {
  opacity: 0.85;
}

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

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 8px;
  cursor: pointer;
}

.toggle input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.controls__hint {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Stage + Poster ---------- */
.stage {
  flex: 1;
  display: flex;
  justify-content: center;
}

.poster {
  width: var(--poster-w);
  min-height: var(--poster-h);
  background: var(--panel);
  padding: 56px 56px 40px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.poster__header {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 18px;
  margin-bottom: 28px;
}

.poster__title {
  margin: 0;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.05;
  word-break: break-word;
}

.poster__subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.poster__map {
  border: 1px solid var(--line);
  overflow: hidden;
}

#map {
  width: 100%;
  height: 520px;
  background: #e9e9e6;
}

.poster__stats {
  display: flex;
  margin-top: 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  flex: 1;
  padding: 20px 8px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.stat.is-last {
  border-right: none;
}

.stat.is-hidden {
  display: none;
}

.stat__value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.stat__label {
  margin-top: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.poster__profile {
  margin-top: 32px;
}

.profile__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 12px;
}

#profile {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 1180px) {
  .app {
    flex-direction: column;
    align-items: center;
  }
  .controls {
    position: static;
    width: 100%;
    max-width: var(--poster-w);
    flex: none;
  }
}
