@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 100 900;
}

:root {
  --pk-paper: #fbfaf5;
  --pk-surface: #f2f5ef;
  --pk-surface-clay: #f7eee2;
  --pk-green: #173f35;
  --pk-green-soft: #dfe9e1;
  --pk-clay: #a85f49;
  --pk-clay-dark: #7f4637;
  --pk-ink: #17251f;
  --pk-muted: #5c645f;
  --pk-line: #d9ddd8;
  --pk-focus: #b47131;
  --pk-danger: #8c2f2f;
}

* { box-sizing: border-box; }

html { background: #e9ece8; }

body {
  margin: 0;
  color: var(--pk-ink);
  background: #e9ece8;
  font-family: "Geist", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--pk-focus);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.pk-skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: 6px;
  background: #fff;
  color: var(--pk-green);
  font-weight: 750;
}

.pk-skip-link:focus { transform: none; }

.pk-app {
  position: relative;
  display: grid;
  width: min(100%, 500px);
  min-height: 100dvh;
  margin: 0 auto;
  grid-template-rows: auto 1fr auto;
  background: var(--pk-paper);
  box-shadow: 0 0 35px rgb(23 63 53 / 8%);
}

.pk-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid rgb(217 221 216 / 78%);
  background: rgb(251 250 245 / 96%);
}

.pk-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--pk-green);
  font-size: 22px;
  font-weight: 780;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.pk-brand img { border-radius: 50%; }

.pk-menu-button {
  display: inline-flex;
  width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--pk-green);
  cursor: pointer;
  font-size: 30px;
}

.pk-menu-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.pk-main {
  min-width: 0;
  padding: 34px 24px 42px;
  outline: 0;
}

.pk-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.pk-kicker,
.pk-step-kicker {
  margin: 0 0 14px;
  color: var(--pk-clay);
  font-size: 13px;
  font-weight: 790;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

.pk-home h1,
.pk-process h1,
.pk-impulses h1,
.pk-journey h1 {
  margin: 0;
  color: var(--pk-green);
  font-size: clamp(37px, 11vw, 54px);
  font-weight: 790;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.pk-process h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -0.04em; }

.pk-home-intro,
.pk-step-intro,
.pk-impulses > p,
.pk-journey > p {
  margin: 22px 0 26px;
  color: var(--pk-muted);
  font-size: 17px;
  line-height: 1.55;
}

.pk-movements {
  position: relative;
  display: grid;
  gap: 0;
  margin: 24px 0 28px;
  padding: 0;
  list-style: none;
}

.pk-movements li {
  position: relative;
  display: grid;
  min-height: 58px;
  grid-template-columns: 48px 1fr;
  align-items: start;
  color: #66706a;
}

.pk-movements li:not(:last-child)::after {
  position: absolute;
  top: 34px;
  bottom: -4px;
  left: 16px;
  width: 2px;
  background: var(--pk-line);
  content: "";
}

.pk-movements li span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #e9eae6;
  font-weight: 720;
}

.pk-movements li.is-active span { background: var(--pk-green); color: #fff; }
.pk-movements li.is-active { color: var(--pk-green); }
.pk-movements strong { display: block; font-size: 17px; line-height: 1.2; }
.pk-movements small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.3; }

.pk-home-actions,
.pk-step-actions { display: grid; gap: 12px; }

.pk-primary,
.pk-secondary,
.pk-danger,
.pk-text-button {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 760;
  line-height: 1.2;
}

.pk-primary { border: 2px solid var(--pk-green); background: var(--pk-green); color: #fff; }
.pk-primary .ph { margin-left: auto; font-size: 24px; }
.pk-secondary { border: 2px solid var(--pk-green); background: transparent; color: var(--pk-green); }
.pk-text-button { border: 0; background: transparent; color: var(--pk-green); text-decoration: underline; text-underline-offset: 4px; }
.pk-danger { border: 2px solid #c9a5a5; background: transparent; color: var(--pk-danger); }
.pk-primary:hover { background: #0f3129; }
.pk-secondary:hover { background: var(--pk-green-soft); }

.pk-device-note {
  display: grid;
  margin: 22px 0 0;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  color: var(--pk-muted);
  font-size: 13px;
}

.pk-device-note .ph { color: var(--pk-green); font-size: 25px; }

@media (max-height: 900px) {
  .pk-main { padding-top: 24px; }
  .pk-home .pk-kicker { margin-bottom: 10px; }
  .pk-home-intro { margin-top: 12px; margin-bottom: 18px; font-size: 16px; line-height: 1.45; }
  .pk-movements { margin-top: 16px; margin-bottom: 18px; }
  .pk-movements li { min-height: 48px; }
  .pk-movements small { margin-top: 1px; }
  .pk-home-actions { gap: 9px; }
  .pk-home-actions .pk-primary,
  .pk-home-actions .pk-secondary { min-height: 50px; padding-top: 11px; padding-bottom: 11px; }
  .pk-home .pk-device-note { margin-top: 13px; }
}

.pk-bottom-nav {
  position: sticky;
  z-index: 15;
  bottom: 0;
  display: grid;
  padding: 9px max(12px, env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border-top: 1px solid var(--pk-line);
  grid-template-columns: repeat(4, 1fr);
  background: rgb(251 250 245 / 97%);
}

.pk-bottom-nav button {
  display: grid;
  min-height: 54px;
  place-items: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: #666d69;
  cursor: pointer;
  font-size: 12px;
}

.pk-bottom-nav .ph { font-size: 24px; }
.pk-bottom-nav button.is-active { color: var(--pk-green); font-weight: 750; }

.pk-menu {
  position: fixed;
  z-index: 60;
  inset: 0;
  width: min(100%, 500px);
  margin: 0 auto;
  padding: 22px 24px 32px;
  overflow-y: auto;
  background: var(--pk-green);
  color: #fff;
}

.pk-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pk-menu-head strong { font-size: 24px; }
.pk-menu-head button { min-height: 48px; border: 1px solid #aec4bb; border-radius: 7px; background: transparent; color: #fff; padding: 10px 14px; }
.pk-menu nav { display: grid; margin: 38px 0; border-top: 1px solid #517067; }
.pk-menu nav button,
.pk-menu nav a { min-height: 56px; padding: 15px 0; border: 0; border-bottom: 1px solid #517067; background: transparent; color: #fff; font-size: 18px; text-align: left; text-decoration: none; }
.pk-menu-note { padding: 18px; border: 1px solid #517067; border-radius: 8px; color: #dbe7e2; font-size: 14px; }

.pk-process-head { display: flex; align-items: center; justify-content: space-between; color: var(--pk-muted); font-size: 14px; }
.pk-back { min-height: 44px; padding: 6px 0; border: 0; background: transparent; color: var(--pk-green); font-weight: 720; }
.pk-progress { height: 4px; margin: 12px 0 24px; overflow: hidden; border-radius: 4px; background: var(--pk-line); }
.pk-progress span { display: block; height: 100%; background: var(--pk-clay); transition: width 180ms ease; }
.pk-step-form { margin-top: 28px; }
.pk-step-actions { margin-top: 28px; }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend,
.pk-field-label { display: block; margin-bottom: 10px; color: var(--pk-green); font-weight: 760; }

.pk-choice-list { display: grid; gap: 9px; }
.pk-choice {
  position: relative;
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #b8c1bc;
  border-radius: 8px;
  background: #fffefa;
  cursor: pointer;
}

.pk-choice:has(input:checked) { border: 2px solid var(--pk-green); background: var(--pk-green-soft); }
.pk-choice input { width: 21px; height: 21px; accent-color: var(--pk-green); }
.pk-field { display: grid; margin-top: 22px; gap: 8px; }
.pk-field small { color: var(--pk-muted); font-weight: 500; }

.pk-field textarea,
.pk-field select,
.pk-field input[type="text"] {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid #9caaa2;
  border-radius: 8px;
  background: #fffefa;
  color: var(--pk-ink);
}

.pk-field textarea { min-height: 118px; resize: vertical; }
.pk-range-row { display: grid; gap: 10px; margin-top: 22px; }
.pk-range-row label { display: flex; justify-content: space-between; gap: 12px; color: var(--pk-green); font-weight: 700; }
.pk-range-row input { width: 100%; accent-color: var(--pk-green); }

.pk-mode-grid { display: grid; gap: 12px; }
.pk-mode-option { align-items: flex-start; padding: 16px; }
.pk-mode-option span { display: grid; gap: 3px; }
.pk-mode-option strong { color: var(--pk-green); font-size: 17px; }
.pk-mode-option small { color: var(--pk-muted); line-height: 1.35; }

.pk-safety-box,
.pk-listening-rule,
.pk-hypothesis-note {
  margin-top: 22px;
  padding: 15px 16px;
  border-left: 4px solid var(--pk-clay);
  background: var(--pk-surface-clay);
  color: #57382f;
  font-size: 14px;
}

.pk-selection-count { margin: 14px 0 0; color: var(--pk-green); font-weight: 700; }

.pk-behavior-map { display: grid; gap: 22px; }
.pk-behavior-intro { padding-bottom: 17px; border-bottom: 1px solid var(--pk-line); }
.pk-section-label { margin: 0 0 4px; color: var(--pk-clay); font-size: 12px; font-weight: 790; letter-spacing: .12em; text-transform: uppercase; }
.pk-behavior-intro h2 { margin: 0; color: var(--pk-green); font-family: Georgia, "Times New Roman", serif; font-size: 25px; line-height: 1.08; }
.pk-behavior-intro > p:last-child { margin: 9px 0 0; color: var(--pk-muted); font-size: 14px; }
.pk-mood-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pk-mood-choice,
.pk-heading-choice,
.pk-pair-choice { position: relative; cursor: pointer; }
.pk-mood-choice { display: grid; min-height: 82px; align-items: center; padding: 13px; border: 1px solid #a8b3ad; border-radius: 9px; grid-template-columns: 42px 1fr; gap: 10px; background: #fffefa; }
.pk-mood-choice input,
.pk-heading-choice input,
.pk-pair-choice input { position: absolute; opacity: 0; pointer-events: none; }
.pk-mood-choice:has(input:focus-visible),
.pk-heading-choice:has(input:focus-visible),
.pk-pair-choice:has(input:focus-visible) { outline: 3px solid var(--pk-focus); outline-offset: 3px; }
.pk-mood-sign { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: #e8ece8; font-size: 27px; font-weight: 780; }
.pk-mood-choice strong,
.pk-mood-choice small { display: block; }
.pk-mood-choice strong { color: var(--pk-green); line-height: 1.15; }
.pk-mood-choice small { margin-top: 4px; color: var(--pk-muted); font-size: 11px; line-height: 1.25; }
.pk-mood-positive:has(input:checked) { border: 2px solid var(--pk-green); background: var(--pk-green-soft); }
.pk-mood-positive:has(input:checked) .pk-mood-sign { background: var(--pk-green); color: #fff; }
.pk-mood-negative:has(input:checked) { border: 2px solid var(--pk-clay-dark); background: var(--pk-surface-clay); }
.pk-mood-negative:has(input:checked) .pk-mood-sign { background: var(--pk-clay-dark); color: #fff; }
.pk-behavior-stage { padding-top: 20px; border-top: 1px solid var(--pk-line); }
.pk-heading-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pk-heading-choice { display: flex; min-height: 58px; align-items: center; padding: 10px 11px; border: 1px solid #a8b3ad; border-radius: 8px; background: #fffefa; }
.pk-heading-choice span { display: grid; gap: 2px; }
.pk-heading-choice strong { color: var(--pk-green); font-size: 14px; line-height: 1.15; }
.pk-heading-choice small { color: var(--pk-muted); font-size: 10px; letter-spacing: .08em; }
.pk-heading-choice:has(input:checked) { border: 2px solid var(--pk-green); background: var(--pk-green-soft); }
.pk-stage-hint { margin: 0 0 11px; color: var(--pk-muted); font-size: 13px; }
.pk-pair-grid { display: grid; gap: 8px; }
.pk-pair-choice { display: grid; min-height: 54px; align-items: center; padding: 10px 12px; border: 1px solid #a8b3ad; border-radius: 8px; grid-template-columns: 1fr auto; gap: 8px; background: #fffefa; }
.pk-pair-choice > span { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; }
.pk-pair-choice > span span { overflow-wrap: anywhere; }
.pk-pair-choice > span span:last-child { text-align: right; }
.pk-pair-choice > span i { color: var(--pk-clay); font-style: normal; font-weight: 800; }
.pk-pair-choice > b { display: none; color: var(--pk-green); font-size: 19px; }
.pk-pair-choice:has(input:checked) { border: 2px solid var(--pk-green); background: var(--pk-green-soft); font-weight: 700; }
.pk-pair-choice:has(input:checked) > b { display: block; }
.pk-source-note { margin: 0; padding: 12px 14px; border-left: 3px solid var(--pk-line); color: var(--pk-muted); font-size: 11px; line-height: 1.45; }

.pk-context-disclosure {
  margin-top: 22px;
  border: 1px solid var(--pk-line);
  border-radius: 9px;
  background: #fffefa;
}
.pk-context-disclosure summary { min-height: 52px; padding: 14px 15px; color: var(--pk-green); cursor: pointer; font-weight: 750; }
.pk-context-disclosure summary small { color: var(--pk-muted); font-weight: 500; }
.pk-context-disclosure > p,
.pk-context-disclosure > fieldset,
.pk-context-disclosure > .pk-context-grid { margin-right: 15px; margin-left: 15px; }
.pk-context-disclosure > p { color: var(--pk-muted); font-size: 14px; }
.pk-context-disclosure > fieldset { padding: 16px 0; border: 0; border-top: 1px solid var(--pk-line); }
.pk-context-disclosure legend { padding-top: 14px; color: var(--pk-green); font-weight: 750; }
.pk-context-grid { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; }
.pk-context-choice { position: relative; display: inline-flex; min-height: 44px; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid #a8b3ad; border-radius: 999px; cursor: pointer; }
.pk-context-choice input { position: absolute; opacity: 0; pointer-events: none; }
.pk-context-choice .ph { display: none; }
.pk-context-choice:has(input:checked) { border: 2px solid var(--pk-green); background: var(--pk-green-soft); color: var(--pk-green); font-weight: 700; }
.pk-context-choice:has(input:checked) .ph { display: inline-block; font-size: 18px; }

.pk-handoff { padding: 26px 0; text-align: center; }
.pk-handoff .ph { color: var(--pk-clay); font-size: 48px; }
.pk-handoff h2 { margin: 14px 0 8px; color: var(--pk-green); font-size: 30px; line-height: 1.1; }
.pk-handoff p { color: var(--pk-muted); }

.pk-perspective-stack { overflow: hidden; border-radius: 9px; }
.pk-perspective { padding: 20px; background: var(--pk-surface); }
.pk-perspective + .pk-perspective { border-top: 4px solid var(--pk-paper); background: var(--pk-surface-clay); }
.pk-perspective h2 { margin: 0 0 10px; color: var(--pk-green); font-size: 22px; }
.pk-perspective p { margin: 12px 0 0; }
.pk-perspective-mood small { color: var(--pk-muted); font-size: 11px; letter-spacing: .06em; }
.pk-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-chip { padding: 7px 11px; border-radius: 999px; background: #dfe9e1; color: var(--pk-green); font-weight: 680; }
.pk-perspective + .pk-perspective .pk-chip { background: #efddc8; color: #6f3f2f; }

.pk-needs-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-need { position: relative; }
.pk-need input { position: absolute; opacity: 0; }
.pk-need span { display: block; min-height: 44px; padding: 9px 13px; border: 1px solid #a8b3ad; border-radius: 999px; background: #fffefa; }
.pk-need:has(input:checked) span { border: 2px solid var(--pk-green); background: var(--pk-green-soft); color: var(--pk-green); font-weight: 700; }

.pk-summary { margin-top: 20px; padding: 18px; border: 1px solid var(--pk-line); border-radius: 8px; background: #fffefa; }
.pk-summary h2 { margin: 0 0 8px; color: var(--pk-green); font-size: 21px; }
.pk-summary p { margin: 6px 0; }

.pk-emotion-reference { display: grid; gap: 18px; margin: 28px 0; }
.pk-reference-mood { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--pk-line); border-radius: 9px; background: #fffefa; }
.pk-reference-mood > h2 { margin: 0; color: var(--pk-green); font-size: 23px; }
.pk-reference-zone { padding-bottom: 16px; border-bottom: 1px solid var(--pk-line); }
.pk-reference-zone h3 { margin: 2px 0 10px; color: var(--pk-green); font-size: 17px; }
.pk-reference-zone p { margin: 0; color: var(--pk-muted); font-size: 10px; font-weight: 760; letter-spacing: .08em; }
.pk-reference-zone ul { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.pk-reference-zone li { padding: 6px 9px; border: 1px solid var(--pk-line); border-radius: 999px; background: #fffefa; font-size: 13px; }

.pk-rules { margin: 30px 0; padding: 20px; background: var(--pk-surface); }
.pk-rules h2 { margin: 0 0 12px; color: var(--pk-green); font-size: 23px; }
.pk-rules ol { margin: 0; padding-left: 21px; }
.pk-rules li + li { margin-top: 9px; }

.pk-journey-list { display: grid; gap: 14px; margin-top: 22px; }
.pk-journey-card { padding: 18px; border: 1px solid var(--pk-line); border-radius: 9px; background: #fffefa; }
.pk-journey-card time { color: var(--pk-muted); font-size: 13px; }
.pk-journey-card h2 { margin: 7px 0; color: var(--pk-green); font-size: 21px; }
.pk-journey-card p { margin: 6px 0; }
.pk-empty { padding: 22px; border: 1px dashed #9caaa2; color: var(--pk-muted); text-align: center; }

.pk-dialog-layer {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 16px;
  background: rgb(11 27 22 / 62%);
}
.pk-dialog { width: min(100%, 460px); max-height: 90dvh; margin: 0 auto; padding: 24px; overflow-y: auto; border-radius: 14px 14px 8px 8px; background: var(--pk-paper); }
.pk-dialog h2 { margin: 0 0 10px; color: var(--pk-green); font-size: 29px; line-height: 1.08; }
.pk-dialog-actions { display: grid; gap: 10px; margin-top: 22px; }

.pk-safety-stop { text-align: left; }
.pk-safety-stop .ph { color: var(--pk-danger); font-size: 44px; }
.pk-safety-stop a { color: var(--pk-green); font-weight: 750; }

@media (max-width: 480px) {
  .pk-mood-choice { min-width: 0; min-height: 104px; align-content: center; justify-items: center; grid-template-columns: 1fr; text-align: center; }
  .pk-mood-choice > span:last-child { min-width: 0; }
  .pk-mood-choice strong { font-size: 14px; overflow-wrap: anywhere; }
  .pk-pair-choice { grid-template-columns: 1fr; padding-right: 34px; font-size: 13px; }
  .pk-pair-choice > b { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); }
}

@media (max-width: 370px) {
  .pk-header, .pk-main { padding-right: 18px; padding-left: 18px; }
  .pk-home h1, .pk-process h1, .pk-impulses h1, .pk-journey h1 { font-size: 36px; }
  .pk-brand { font-size: 20px; }
}

@media (min-width: 700px) {
  .pk-app { min-height: calc(100dvh - 32px); margin-top: 16px; margin-bottom: 16px; border-radius: 16px; overflow: clip; }
  .pk-menu { top: 16px; bottom: 16px; border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
