:root {
  --bg: #f7efe4;
  --bg-accent: #efe0c8;
  --surface: rgba(255, 251, 245, 0.88);
  --surface-strong: #fffdf9;
  --text: #2a211b;
  --muted: #6a5748;
  --line: rgba(86, 60, 39, 0.14);
  --primary: #b64926;
  --primary-dark: #8f3517;
  --secondary: #255f5a;
  --shadow: 0 18px 48px rgba(69, 42, 23, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 30%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-accent) 100%);
}

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

.hero-card,
.panel {
  backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 32px;
  margin-bottom: 24px;
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-preview {
  display: block;
  width: min(50vw, 480px);
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  margin: 0 auto 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  padding: 12px;
}

.results-header-text {
  margin: 0 auto 18px;
  text-align: center;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  font-weight: 700;
}

.results-header-text.is-hidden {
  display: none;
}

.logo-preview.is-hidden {
  display: none;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  color: var(--secondary);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  margin-bottom: 12px;
}

.intro {
  max-width: 62ch;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.panel {
  padding: 24px;
  margin-bottom: 20px;
}

.controls-panel {
  display: grid;
  gap: 22px;
}

.status-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.status-panel-content {
  flex: 1;
}

.status-action-row {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 24px;
}

.field-group label,
.status-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.file-row,
.action-row,
.status-grid,
.section-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.file-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.action-row-controls {
  justify-content: flex-start;
}

.file-name,
.hint,
.section-heading p,
.status-message {
  color: var(--muted);
}

.hint,
.status-message,
.section-heading p {
  margin-bottom: 0;
  line-height: 1.5;
}

select,
.text-input,
.button {
  border-radius: 14px;
  font: inherit;
}

select,
.text-input {
  width: min(220px, 100%);
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
}

.text-input {
  width: min(420px, 100%);
}

.button {
  padding: 12px 18px;
  border: 0;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

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

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

.button.ghost {
  background: rgba(37, 95, 90, 0.08);
  color: var(--secondary);
}

.status-grid {
  align-items: stretch;
  gap: 18px;
  flex-wrap: wrap;
}

.status-grid > div {
  flex: 1 1 180px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
}

.status-value {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
}

.status-message {
  margin-top: 16px;
}

.winner-list {
  margin: 18px 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.winner-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 245, 234, 0.92));
}

.winner-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.winner-name {
  font-size: 1.3rem;
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 980px);
    padding-top: 20px;
  }

  .hero-card,
  .panel {
    padding: 18px;
  }

  .hero-header,
  .action-row,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .logo-preview {
    width: min(100%, 320px);
  }

  .button,
  select,
  .text-input {
    width: 100%;
  }
}



.drawing-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(42, 33, 27, 0.62);
  backdrop-filter: blur(6px);
  z-index: 1000;
}

.drawing-overlay.is-hidden {
  display: none;
}

.drawing-message {
  min-width: min(80vw, 420px);
  padding: 28px 36px;
  border-radius: 24px;
  background: rgba(255, 251, 245, 0.94);
  border: 1px solid rgba(86, 60, 39, 0.14);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  text-align: center;
  font-size: clamp(2rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary-dark);
}







