/* ── Design tokens (mirrored from Constants.swift) ── */
:root {
  --background:   #faf8f6;
  --accent:       #c1603a;
  --muted:        #717182;
  --muted-bg:     #ececf0;
  --border:       rgba(0, 0, 0, 0.10);
  --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --chip-height:      50px;
  --button-height:    50px;
  --button-radius:    25px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--background);
  font-family: var(--font);
  color: #000;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

/* ── Mobile: full screen, no shell ── */
.screen {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
}

/* ── Desktop: phone shell centered on page ── */
@media (min-width: 600px) {
  body {
    background: #e8e5e0;
    align-items: center;
    padding: 32px 16px;
  }

  .screen {
    background: var(--background);
    width: 390px;
    min-height: unset;
    height: 844px;
    flex-shrink: 0;
    border-radius: 48px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);
    overflow: hidden;
    max-height: calc(100dvh - 64px);
    aspect-ratio: 390 / 844;
  }
}

/* ── Nav bar ── */
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.nav-icon {
  position: absolute;
  left: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

/* ── Main content ── */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 0 32px;
}

.task-title {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  letter-spacing: -0.5px;
}

.task-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.task-subtitle {
  text-align: center;
  font-size: 20px;
  color: var(--muted);
}

.download-subtitle {
  text-align: center;
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
}

/* ── Buttons ── */
.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--button-height);
  border-radius: var(--button-radius);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:hover { opacity: 0.85; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 2px solid var(--border);
}

/* ── Completed view ── */
.completed-view {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.completed-headline {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.5px;
  text-align: center;
}

.completed-subtitle {
  font-size: 20px;
  color: var(--muted);
  text-align: center;
  padding: 0 24px;
}

.download-btn {
  margin-top: 32px;
  width: 100%;
}

/* ── Shift dialogue ── */
.dialogue-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: flex-end;
  border-radius: inherit;
  z-index: 10;
}

.dialogue {
  background: var(--background);
  width: 100%;
  border-radius: 20px 20px 0 0;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dialogue-message {
  font-size: 17px;
  line-height: 1.4;
  text-align: center;
  color: Color.primary;
}

.dialogue-input {
  height: var(--button-height);
  border-radius: var(--button-radius);
  border: 1px solid var(--border);
  background: var(--muted-bg);
  padding: 0 16px;
  font-family: var(--font);
  font-size: 17px;
  outline: none;
  width: 100%;
}

.dialogue-input:focus {
  border-color: var(--accent);
}

.dialogue-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Footer ── */
.footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 16px 0 32px;
  flex-shrink: 0;
}

.footer a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.7;
}

.footer a:hover {
  opacity: 1;
}
