
:root {
  --bg: #f7f6f3;
  --ink: #141414;
  --ink-soft: #676767;
  --accent: #ff4c2a;
  --accent-soft: #ffe3db;
  --line: rgba(0, 0, 0, 0.16);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 0;
  --shadow-soft: 0 10px 22px rgba(0, 0, 0, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  height: 100vh;
  max-height: 100vh;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}

/* Brand / header */

.brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 8px;
  row-gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  background: #fdfdfb;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 6px;
  grid-column: 1 / 3;
}

.brand-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background:
    linear-gradient(to right, #ffffff 0, #ffffff 46%, var(--accent-soft) 46%, var(--accent-soft) 100%);
  box-shadow: 4px 4px 0 var(--ink);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 10px;
  color: var(--ink-soft);
}

.brand-tag {
  justify-self: end;
  align-self: center;
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
}

/* Layout */

.main {
  flex: 1;
  display: grid;
  grid-template-rows: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 4px;
  min-height: 0;
}

/* Hero */

.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px 2px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.hero::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  right: 35%;
  height: 2px;
  background: var(--ink);
}

.hero::after {
  content: "POSITIVE IONS";
  position: absolute;
  right: 4px;
  top: 8px;
  font-size: 9px;
  letter-spacing: 0.16em;
  padding: 2px 4px;
  border: 1px solid var(--ink);
  background: #ffffff;
}

.hero-title {
  margin: 18px 0 4px;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.hero-body {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 260px;
  border-left: 1px solid var(--ink);
  padding-left: 6px;
}

/* Cards - Dadaist grid */

.grid {
  position: relative;
  padding: 6px 4px 0;
  display: grid;
  grid-template-columns: 1.1fr 0.95fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
}

.card {
  border: 1px solid var(--ink);
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 7px 7px 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, background-color 0.08s ease-out;
}

/* Intentional “misalignment” */

.card[data-focus="work"] {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  padding-right: 18px;
}

.card[data-focus="life"] {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  margin-top: 8px;
}

.card[data-focus="you"] {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  margin-right: 14px;
}

.card-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  background: var(--accent-soft);
  color: var(--ink);
}

.card-title {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}

.card-body {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink-soft);
}

.card:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
  background-color: #fffaf7;
}

/* CTA panel */

.cta-panel {
  padding: 8px 8px 6px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: #fdfdfb;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 6px;
}

.cta-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  grid-column: 1 / 3;
}

.cta-line {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cta-sub {
  margin: 0;
  font-size: 10px;
  color: var(--ink-soft);
  max-width: 260px;
}

.cta-button {
  border-radius: 0;
  border: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  width: 100%;
}

.cta-secondary {
  border-radius: 0;
  border: 1px solid var(--ink);
  font-size: 10px;
  padding: 7px 6px;
  background: #ffffff;
  color: var(--ink-soft);
  text-align: center;
  cursor: pointer;
  width: 100%;
}

.cta-button:active,
.cta-secondary:active {
  box-shadow: 1px 1px 0 var(--ink);
  transform: translate(1px, 1px);
}

/* Sheet (dialog) */

.sheet {
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 480px;
  background: transparent;
}

.sheet::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.sheet-inner {
  margin: auto;
  margin-bottom: env(safe-area-inset-bottom);
  width: calc(100% - 20px);
  max-width: 440px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 14px 12px 12px;
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.sheet-inner::before {
  content: "";
  position: absolute;
  left: 0;
  right: 40%;
  top: 12px;
  height: 2px;
  background: var(--ink);
}

.sheet-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: #f6f6f6;
  font-size: 14px;
  cursor: pointer;
}

.sheet-title {
  margin: 10px 0 4px;
  font-size: 17px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sheet-body {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--ink-soft);
}

.sheet-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip {
  border-radius: 0;
  border: 1px solid var(--ink);
  background: #f3f3f3;
  padding: 5px 9px;
  font-size: 11px;
  cursor: pointer;
}

.chip.chip--active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field-input {
  border-radius: 0;
  border: 1px solid var(--ink);
  padding: 7px 8px;
  font-size: 12px;
  resize: none;
  font-family: inherit;
}

.field-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.field-note {
  margin: 0;
  font-size: 9px;
  color: var(--ink-soft);
}

.sheet-submit {
  margin-top: 2px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: #141414;
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
}

.sheet-submit:active {
  box-shadow: 1px 1px 0 var(--ink);
  transform: translate(1px, 1px);
}

.audio-result {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--ink);
  background: var(--accent-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audio-explainer {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
}

.stop-audio {
  border-radius: 0;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  font-size: 10px;
  padding: 6px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
}

.stop-audio:active {
  box-shadow: 1px 1px 0 var(--ink);
  transform: translate(1px, 1px);
}

.sheet-status {
  min-height: 14px;
  margin: 4px 0 0;
  font-size: 10px;
  color: var(--ink-soft);
}

/* Small screens */

@media (max-height: 640px) {
  .hero-title {
    font-size: 22px;
  }
  .hero-body {
    font-size: 11px;
  }
  .card-title {
    font-size: 12px;
  }
}