:root {
  --gold: #EFB924;
  --sunset: #DF9424;
  --navy: #19475C;
  --sky: #8AC2CC;
  --cream: #FFF9E7;
  --ink: #19475C;
  --ink2: #3E6272;
  --mut: #6D8794;
  --tl: #19475C;
  --tl2: #24566C;
  --tl3: #E5F3F5;
  --sand: #FFF3D4;
  --clay: #DF9424;
  --line: #E7E1D0;
  --bg: #FFF9E7;
  --f: "Poppins", "Segoe UI", sans-serif;
  --sf: "Gelica", "Fraunces", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 400 15px/1.5 var(--f);
  -webkit-font-smoothing: antialiased;
}
h1, h2, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 80;
  background: #fff;
  padding: 8px 12px;
}
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.shell {
  height: 100%;
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
}
.side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding: 18px 14px 16px;
  border-right: 1px solid var(--line);
  background: #fff;
}
.col {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}
.brand img { height: 40px; width: auto; max-width: 100%; display: block; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; }
.nav button {
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 7px 10px;
  font-size: 14.5px;
  color: var(--ink2);
}
.nav button[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--gold);
}
.side-foot { margin-top: auto; padding-top: 22px; }
.staff { display: flex; flex-direction: column; font-size: 14px; }
.staff span, .sample, .shift-meta, .quiet, .foot { color: var(--mut); }
.sample { margin-top: 8px; font-size: 12px; line-height: 1.4; }

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(255, 249, 231, 0.94);
  border-bottom: 1px solid var(--line);
}
.top h1 {
  flex: 1;
  min-width: 0;
  font-family: var(--sf);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.shift-meta, .top .back { font-size: 13px; white-space: nowrap; }
.top .back { color: var(--tl2); font-weight: 600; text-decoration: none; }
main { flex: 1; max-width: 980px; padding: 16px 28px 8px; }
.foot { max-width: 68ch; padding: 20px 28px 22px; font-size: 12px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.seg, .choices { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.seg button, .choice {
  border: 0;
  background: #F4EFE3;
  color: var(--ink2);
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
}
.seg button[aria-pressed="true"],
.choice[aria-pressed="true"] {
  background: var(--navy);
  color: var(--cream);
}
.search {
  width: 160px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 12px;
}
.sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 14px;
}
.note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--sand);
  color: var(--navy);
  font-size: 13.5px;
}
.note button {
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 600;
  color: var(--navy);
}
.roster button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid #f0f2f1;
  background: transparent;
  text-align: left;
}
.roster li:last-child button { border-bottom: 0; }
.roster button > span:not(.av):not(.status) { flex: 1; min-width: 0; }
.roster b { display: block; font-size: 14.5px; font-weight: 600; }
.roster small, .who small { display: block; font-size: 12.5px; color: var(--mut); }
.roster small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status {
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #F4EFE3;
  color: var(--ink2);
}
.status.ready { background: #E5F3F5; color: var(--navy); }
.status.adapt { background: #FDECCE; color: var(--navy); }
.status.logged { background: var(--tl3); color: var(--tl); }
.empty { color: var(--ink2); padding: 12px 4px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--mut); font-size: 13px; margin-bottom: 12px; }
.crumbs button { border: 0; background: transparent; padding: 0; color: var(--tl2); font-weight: 600; }
.who { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.who p { flex: 1; min-width: 0; }
.who b { display: block; font-size: 14.5px; }
.av {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  color: var(--cream);
}
.a1 { background: linear-gradient(135deg, #2C6478, #19475C); }
.a2 { background: linear-gradient(135deg, #C47E1A, #8C5410); }
.a3 { background: linear-gradient(135deg, #5E9AA6, #19475C); }
.a4 { background: linear-gradient(135deg, #D7A43A, #8A5A12); }
.a5 { background: linear-gradient(135deg, #8C5410, #5C380C); }
.a6 { background: linear-gradient(135deg, #3E7384, #19475C); }
.a7 { background: linear-gradient(135deg, #C4922A, #8A5A12); }
.a8 { background: linear-gradient(135deg, #24566C, #0F2E3C); }

.profile {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.ic {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fff;
}
.ic::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; }
.ic.l::before { background: var(--gold); }
.ic.n::before { background: var(--tl2); }
.ic.s::before { background: var(--clay); }
.ic.p::before { background: var(--navy); }
.ic h2 { font-size: 16px; font-weight: 600; }
.ic .k { font-size: 12.5px; color: var(--mut); margin: 2px 0 8px; }
.ic li { font-size: 13px; padding: 6px 10px; border-radius: 8px; margin-top: 6px; }
.ic.l { background: #fffdf8; }
.ic.n { background: #f7fbfb; }
.ic.s { background: #fffaf4; }
.ic.p { background: #f7fbfb; }
.ic.l li { background: #FFF4D4; }
.ic.n li { background: var(--tl3); }
.ic.s li { background: #FDECCE; }
.ic.p li { background: #E7F5F7; }
.pref-k {
  display: inline-block;
  min-width: 4.5em;
  font-weight: 600;
  color: var(--ink2);
  margin-right: 4px;
}

.interest-list { display: flex; flex-direction: column; gap: 6px; }
.interest-list li {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(48px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 0;
  padding: 5px 8px;
}
.interest-label { font-size: 12.5px; line-height: 1.25; }
.interest-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #F6E7C0;
  overflow: hidden;
}
.interest-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}
.interest-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}
.interest-note { margin-top: 8px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.chips li {
  margin-top: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  background: #F4EFE3;
  color: var(--ink2);
}
.chips.accommodations li {
  background: #FDECCE;
  color: var(--navy);
}
.ic .chips li { margin-top: 0; }

.score-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 4px;
}
.score-row span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #F4FBFC;
}
.score-row i {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--mut);
}
.score-row b {
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.score-row .rank { background: var(--tl3); }
.score-row .rank b { color: var(--tl); }

.pi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.pi-head b { flex: 1; min-width: 0; }
.guide-status { margin: 4px 0 2px; }
.plans-label { margin-bottom: 2px; }

.plans { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.pi, .card, .lib button, .modules li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.pi, .lib button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.pi b, .lib b { display: block; font-size: 14.5px; font-weight: 600; }
.pi small, .lib small { display: block; font-size: 12.5px; color: var(--tl2); margin-top: 2px; }
.pi em, .lib em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--mut);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.detail .score-row { margin-top: 10px; }
.detail .chips { margin-bottom: 4px; }
.detail .quiet + .chips { margin-top: 2px; }
.filters { margin-bottom: 10px; }
.lib { display: flex; flex-direction: column; gap: 10px; }
.lib button[aria-pressed="true"] { background: #F4FBFC; border-color: #C5E0E4; }
.card { padding: 14px 16px; margin-top: 12px; }
.card h2, .doc h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
}
.card.sand { background: var(--sand); border-color: transparent; }
.card.sand h2, .card.sand li, .card.sand p { color: var(--navy); }
.card.works { background: #E5F3F5; border-color: transparent; }
.card.works li { color: var(--navy); }
.card.avoid { background: #FDECCE; border-color: transparent; }
.card.avoid li { color: var(--navy); }
.card.prompt { background: #F4FBFC; }
.plain li, .log-list li, .open li { padding: 4px 0; font-size: 14px; }
.detail p + p { margin-top: 8px; }
.detail .text-btn { margin-left: 8px; }
.text-btn { border: 0; background: transparent; padding: 0; color: var(--tl2); font-weight: 600; font-size: 13.5px; }

.heat {
  display: grid;
  grid-template-columns: 84px repeat(7, 1fr);
  gap: 4px;
  align-items: center;
  max-width: 520px;
  font-size: 12px;
  color: var(--mut);
}
.heat .day { text-align: center; }
.heat .cell { display: block; height: 18px; border-radius: 3px; background: #F4EFE3; }
.heat .h1 { background: #D7EEF1; }
.heat .h2 { background: var(--sky); }
.heat .h3 { background: var(--navy); }
.hint { margin-top: 8px; font-size: 13.5px; color: var(--ink2); }
.quiet + .heat { margin-top: 8px; }

.step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
}
.step + .step { border-top: 1px solid var(--line); }
.step input { margin-top: 3px; }
.prompt { font-family: var(--sf); font-size: 20px; line-height: 1.35; }
.log-form label, .line-form label { display: block; font-weight: 600; font-size: 13px; margin-top: 8px; }
textarea, .line-form input[type="text"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  resize: vertical;
}
textarea { min-height: 64px; }
.choices { margin-top: 2px; }
.saved, .form-error { margin-top: 8px; font-size: 14px; }
.saved { color: var(--navy); }
.form-error { color: #8C5410; font-weight: 600; }
.go {
  display: inline-flex;
  align-items: center;
  height: 32px;
  margin-top: 10px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
}
.go.quiet {
  height: 28px;
  margin-top: 0;
  padding: 0 10px;
  background: var(--tl3);
  color: var(--tl);
}
.line-form { margin-top: 4px; }
.modules { display: flex; flex-direction: column; gap: 10px; }
.modules li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}
.modules h2 { font-size: 15px; font-weight: 600; }
.modules p { color: var(--mut); font-size: 13px; margin-top: 2px; }
.bar { display: block; height: 3px; margin-top: 8px; background: #F4EFE3; border-radius: 999px; max-width: 180px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--sunset)); border-radius: inherit; }

@media (max-width: 760px) {
  html, body, .shell { height: auto; }
  .shell { display: block; }
  .side {
    position: sticky;
    top: 0;
    z-index: 20;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 16px 8px;
  }
  .nav { flex-direction: row; margin-top: 10px; overflow-x: auto; }
  .nav button { white-space: nowrap; }
  .nav button[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); }
  .side-foot { margin-top: 8px; padding-top: 0; }
  .sample { margin-top: 4px; }
  .top { position: static; flex-wrap: wrap; padding: 14px 16px; }
  .top h1 { flex-basis: 100%; }
  main, .foot { padding-left: 16px; padding-right: 16px; }
  .profile { grid-template-columns: 1fr; }
  .modules li { grid-template-columns: 1fr; }
  .score-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .interest-list li { grid-template-columns: minmax(0, 1fr) minmax(40px, 0.8fr) auto; }
  .heat { grid-template-columns: 72px repeat(7, 1fr); gap: 3px; }
}
