:root {
  --orange: #f05a28;
  --orange-dark: #d64a16;
  --orange-soft: #fff0e9;
  --red: #d93954;
  --red-soft: #fdecef;
  --amber: #f2a900;
  --amber-soft: #fff4d6;
  --purple: #7b4b94;
  --purple-soft: #f3ebf7;
  --charcoal: #2d2d2d;
  --ink: #171717;
  --muted: #6d6865;
  --line: #e6e1de;
  --canvas: #f5f3f1;
  --surface: #ffffff;
  --nav-height: 76px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: #e5e0dc;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: #e5e0dc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
  cursor: pointer;
}

.app-shell {
  position: relative;
  width: min(100%, 540px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--canvas);
  box-shadow: 0 0 34px rgba(45, 34, 27, 0.13);
}

.brand-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: calc(72px + env(safe-area-inset-top));
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top) 17px 0;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 64px;
  height: 43px;
  object-fit: contain;
  object-position: left center;
}

.brand-lockup > div {
  min-width: 0;
  padding-left: 11px;
  border-left: 1px solid #d9d2cd;
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-lockup strong {
  font-size: 14px;
}

.brand-lockup span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.brand-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
}

.brand-actions button,
.round-action,
.me-header > button {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
}

.brand-actions svg,
.round-action svg,
.me-header > button svg {
  width: 23px;
  height: 23px;
  stroke-width: 2;
}

.notification-button span {
  position: absolute;
  top: 2px;
  right: 0;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 5px;
  color: #fff;
  background: var(--red);
  border: 2px solid #fff;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 850;
}

.app-main {
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
}

.page {
  display: none;
  min-height: calc(100dvh - 72px - var(--nav-height));
}

.page.active {
  display: block;
}

.momentum-hero {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  padding: 29px 22px 25px;
  color: #fff;
  background: var(--orange);
}

.momentum-hero > span {
  display: block;
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.momentum-hero h1 {
  max-width: 360px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 500;
  line-height: 1.08;
}

.momentum-hero p {
  max-width: 350px;
  margin: 10px 0 19px;
  font-size: 14px;
  line-height: 1.45;
}

.momentum-hero > button {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(100%, 330px);
  min-height: 47px;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  color: #fff;
  background: #272321;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 750;
}

.momentum-hero > button span {
  flex: 1;
  text-align: left;
}

.momentum-hero > button svg {
  width: 19px;
}

.momentum-mark {
  position: absolute;
  top: 12px;
  right: -12px;
  width: 140px;
  height: 120px;
  opacity: 0.82;
}

.momentum-mark span {
  position: absolute;
  right: 0;
  height: 30px;
  background: #fff;
  transform: skewX(-28deg);
}

.momentum-mark span:nth-child(1) {
  top: 0;
  width: 104px;
}

.momentum-mark span:nth-child(2) {
  top: 38px;
  width: 76px;
  opacity: 0.62;
}

.momentum-mark span:nth-child(3) {
  top: 76px;
  width: 48px;
  opacity: 0.34;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.status-strip button {
  min-width: 0;
  padding: 15px 7px;
  text-align: left;
  background: #fff;
  border: 0;
  border-right: 1px solid var(--line);
}

.status-strip button:last-child {
  border-right: 0;
}

.status-strip strong,
.status-strip span {
  display: block;
}

.status-strip strong {
  font-size: 20px;
}

.status-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
}

.content-band {
  margin-top: 8px;
  padding: 20px 18px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading,
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading {
  margin-bottom: 15px;
}

.section-heading > div > span,
.page-header > div > span {
  display: block;
  margin-bottom: 4px;
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.section-heading h2,
.page-header h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
}

.section-heading > button {
  padding: 7px 0;
  color: var(--orange-dark);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 750;
}

.agenda-list {
  display: grid;
}

.agenda-item {
  display: grid;
  width: 100%;
  grid-template-columns: 50px 40px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.agenda-item:last-child {
  border-bottom: 0;
}

.agenda-item > time {
  font-size: 12px;
  font-weight: 800;
}

.agenda-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--orange-dark);
  background: var(--orange-soft);
  border-radius: 7px;
}

.agenda-item:nth-child(2) .agenda-icon {
  color: var(--red);
  background: var(--red-soft);
}

.agenda-item:nth-child(3) .agenda-icon {
  color: var(--purple);
  background: var(--purple-soft);
}

.agenda-icon svg {
  width: 20px;
  height: 20px;
}

.agenda-item > div {
  min-width: 0;
}

.agenda-item strong,
.agenda-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-item strong {
  font-size: 14px;
}

.agenda-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.agenda-item > svg {
  width: 18px;
  color: #a49e9a;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 19px 7px;
}

.quick-item {
  min-width: 0;
  padding: 0;
  text-align: center;
  background: transparent;
  border: 0;
}

.quick-item > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin: 0 auto 7px;
  color: #fff;
  background: var(--orange);
  border-radius: 7px;
}

.quick-item:nth-child(4n + 2) > span { background: var(--red); }
.quick-item:nth-child(4n + 3) > span { color: #2f2517; background: var(--amber); }
.quick-item:nth-child(4n + 4) > span { background: var(--purple); }

.quick-item svg {
  width: 22px;
  height: 22px;
}

.quick-item strong,
.quick-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-item strong {
  font-size: 11px;
}

.quick-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.for-you-list {
  display: grid;
  gap: 10px;
}

.for-you-list button {
  display: grid;
  width: 100%;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  padding: 13px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.for-you-accent {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  border-radius: 7px;
}

.for-you-accent.orange { background: var(--orange); }
.for-you-accent.red { background: var(--red); }

.for-you-accent svg {
  width: 23px;
}

.for-you-list button > div {
  min-width: 0;
}

.for-you-list small,
.for-you-list strong,
.for-you-list p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.for-you-list small {
  color: var(--orange-dark);
  font-size: 9px;
  font-weight: 850;
}

.for-you-list strong {
  margin-top: 3px;
  font-size: 14px;
}

.for-you-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.for-you-list button > svg {
  width: 18px;
  color: #aaa39f;
}

.page-header {
  padding: 22px 18px 15px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.page-header h1 {
  font-size: 27px;
}

.new-request-button {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  color: #fff;
  background: var(--orange);
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.new-request-button svg {
  width: 18px;
}

.request-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #2d2927;
}

.request-overview div {
  padding: 17px 13px;
  border-right: 1px solid #4b4541;
}

.request-overview div:last-child {
  border-right: 0;
}

.request-overview strong,
.request-overview span {
  display: block;
}

.request-overview strong {
  color: #fff;
  font-size: 21px;
}

.request-overview span {
  margin-top: 4px;
  color: #bbb4b0;
  font-size: 10px;
}

.category-band {
  margin-top: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.category-item {
  min-width: 0;
  min-height: 89px;
  padding: 13px 8px;
  text-align: center;
  background: #fff;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.category-item span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  margin: 0 auto 8px;
  color: var(--orange);
  background: var(--orange-soft);
  border-radius: 6px;
}

.category-item.red span { color: var(--red); background: var(--red-soft); }
.category-item.amber span { color: #9b6900; background: var(--amber-soft); }
.category-item.purple span { color: var(--purple); background: var(--purple-soft); }
.category-item.charcoal span { color: #fff; background: var(--charcoal); }

.category-item svg {
  width: 19px;
}

.category-item strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-tabs {
  display: flex;
  gap: 24px;
  margin-top: 8px;
  padding: 0 18px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.request-tabs button {
  position: relative;
  height: 48px;
  padding: 0 2px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 700;
}

.request-tabs button.active {
  color: var(--ink);
}

.request-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--orange);
  content: "";
}

.request-list {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.request-item {
  display: grid;
  width: 100%;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 15px 18px;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.request-item:last-child {
  border-bottom: 0;
}

.request-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--orange-dark);
  background: var(--orange-soft);
  border-radius: 7px;
}

.request-icon svg {
  width: 20px;
}

.request-copy {
  min-width: 0;
}

.request-copy > span {
  color: var(--muted);
  font-size: 10px;
}

.request-copy strong {
  display: block;
  margin: 4px 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.request-state {
  padding: 4px 7px;
  color: #9a350e;
  background: var(--orange-soft);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.request-state.approved {
  color: #296241;
  background: #e8f4ec;
}

.request-state.closed {
  color: #5f5b58;
  background: #eeeceb;
}

.fitness-panel {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  padding: 24px 19px;
  color: #fff;
  background: #2d2927;
}

.score-ring {
  display: grid;
  width: 108px;
  height: 108px;
  place-content: center;
  text-align: center;
  border: 9px solid var(--orange);
  border-right-color: #6b615c;
  border-radius: 50%;
  transform: rotate(-30deg);
}

.score-ring strong,
.score-ring span {
  transform: rotate(30deg);
}

.score-ring strong {
  font-size: 31px;
  line-height: 1;
}

.score-ring span {
  margin-top: 4px;
  color: #c9c2be;
  font-size: 10px;
}

.fitness-panel > div:last-child > span {
  color: #ffb694;
  font-size: 10px;
  font-weight: 850;
}

.fitness-panel h2 {
  margin: 6px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
}

.fitness-panel p {
  margin: 0;
  color: #c9c2be;
  font-size: 11px;
  line-height: 1.45;
}

.skill-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.skill-strip div {
  padding: 14px 12px;
  border-right: 1px solid var(--line);
}

.skill-strip div:last-child {
  border-right: 0;
}

.skill-strip strong,
.skill-strip span {
  display: block;
}

.skill-strip strong {
  font-size: 18px;
}

.skill-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.weekly-plan {
  margin-top: 8px;
  padding: 18px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.weekly-plan .section-heading {
  margin-bottom: 12px;
}

.weekly-plan .section-heading > strong {
  color: var(--orange-dark);
  font-size: 12px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  background: #ece7e3;
  border-radius: 4px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--orange);
  border-radius: 4px;
  transition: width 300ms ease;
}

.learning-band {
  margin-top: 8px;
}

.learning-list {
  display: grid;
  gap: 10px;
}

.learning-item {
  display: grid;
  width: 100%;
  grid-template-columns: 64px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.learning-art {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  color: #fff;
  background: var(--orange);
  border-radius: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
}

.learning-item:nth-child(2) .learning-art { background: var(--red); }
.learning-item:nth-child(3) .learning-art { color: #352a1e; background: var(--amber); }
.learning-item:nth-child(4) .learning-art { background: var(--purple); }

.learning-copy {
  min-width: 0;
}

.learning-copy > span {
  color: var(--orange-dark);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.learning-copy strong {
  display: -webkit-box;
  margin: 4px 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.learning-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.learning-copy .mini-progress {
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  background: #eee9e6;
  border-radius: 2px;
}

.learning-copy .mini-progress span {
  display: block;
  height: 100%;
  background: var(--orange);
}

.learning-item > svg {
  width: 18px;
  color: #aaa39f;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 18px;
  padding: 0 13px;
  background: #fff;
  border: 1px solid #dcd5d1;
  border-radius: 7px;
}

.search-field svg {
  width: 19px;
  color: #77706c;
}

.search-field input {
  width: 100%;
  height: 44px;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
}

.mail-filter-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px 12px;
}

.mail-filter-bar button {
  height: 32px;
  padding: 0 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
}

.mail-filter-bar button.active {
  color: #fff;
  background: var(--orange);
  border-color: var(--orange);
}

.mail-filter-bar > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}

.mail-list {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mail-item {
  display: grid;
  width: 100%;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 11px;
  padding: 15px 17px;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.mail-item:last-child {
  border-bottom: 0;
}

.mail-item.unread {
  background: #fffaf7;
}

.mail-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #9e360f;
  background: var(--orange-soft);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 850;
}

.mail-item:nth-child(2n) .mail-avatar {
  color: #8e2438;
  background: var(--red-soft);
}

.mail-copy {
  min-width: 0;
}

.mail-sender-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mail-sender-row strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unread-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: var(--orange);
  border-radius: 50%;
}

.mail-copy h3,
.mail-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-copy h3 {
  margin: 4px 0;
  font-size: 14px;
}

.mail-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.mail-tags {
  display: flex;
  margin-top: 7px;
  color: #7d7571;
  font-size: 9px;
}

.mail-tags span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.mail-tags svg {
  width: 11px;
}

.mail-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.mail-side time {
  color: var(--muted);
  font-size: 10px;
}

.star-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #aaa39f;
}

.star-button.active {
  color: var(--amber);
}

.star-button svg {
  width: 18px;
}

.me-header {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 42px;
  gap: 15px;
  align-items: center;
  padding: 28px 18px 23px;
  color: #fff;
  background: #2d2927;
}

.avatar {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  color: #fff;
  background: var(--orange);
  border-radius: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 700;
}

.avatar.has-photo {
  overflow: hidden;
  background: #f4f1ef;
}

.avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.me-header > div:nth-child(2) {
  min-width: 0;
}

.me-header > div:nth-child(2) > span {
  display: inline-block;
  margin-bottom: 5px;
  padding: 3px 7px;
  color: #ffbea2;
  background: #4a3329;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 800;
}

.me-header h1,
.me-header p,
.me-header small {
  margin: 0;
}

.me-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 500;
}

.me-header p {
  margin-top: 4px;
  color: #eee8e4;
  font-size: 14px;
}

.me-header small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #bdb5b0;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-header > button {
  align-self: start;
  color: #fff;
}

.identity-band {
  padding: 14px 18px;
  background: var(--orange);
}

.identity-band > button {
  display: grid;
  width: 100%;
  grid-template-columns: 52px minmax(0, 1fr) 32px;
  gap: 12px;
  align-items: center;
  padding: 0;
  color: #fff;
  text-align: left;
  background: transparent;
  border: 0;
}

.mini-momentum {
  position: relative;
  width: 52px;
  height: 43px;
}

.mini-momentum span {
  position: absolute;
  left: 5px;
  height: 12px;
  background: #fff;
  transform: skewX(-28deg);
}

.mini-momentum span:first-child {
  top: 7px;
  width: 42px;
}

.mini-momentum span:last-child {
  top: 24px;
  width: 29px;
  opacity: 0.64;
}

.identity-band strong,
.identity-band span {
  display: block;
}

.identity-band strong {
  font-size: 14px;
}

.identity-band span {
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.82;
}

.identity-band svg {
  width: 27px;
}

.profile-menu {
  margin-top: 8px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-menu button {
  display: grid;
  width: 100%;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  padding: 13px 18px;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.profile-menu button:last-child {
  border-bottom: 0;
}

.profile-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 7px;
}

.profile-icon.orange { color: var(--orange-dark); background: var(--orange-soft); }
.profile-icon.red { color: var(--red); background: var(--red-soft); }
.profile-icon.amber { color: #996900; background: var(--amber-soft); }
.profile-icon.purple { color: var(--purple); background: var(--purple-soft); }
.profile-icon.charcoal { color: #fff; background: var(--charcoal); }
.profile-icon.gray { color: #5f5a57; background: #efedeb; }

.profile-icon svg {
  width: 20px;
}

.profile-menu button > div {
  min-width: 0;
}

.profile-menu strong,
.profile-menu small {
  display: block;
}

.profile-menu strong {
  font-size: 14px;
}

.profile-menu small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu button > svg {
  width: 18px;
  color: #aaa39f;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, 540px);
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 7px env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid #dcd5d1;
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.bottom-nav > button {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-rows: 33px 18px;
  align-items: center;
  justify-items: center;
  padding: 0;
  color: #77706c;
  background: transparent;
  border: 0;
}

.bottom-nav > button > span {
  position: relative;
  display: grid;
  width: 40px;
  height: 33px;
  place-items: center;
}

.bottom-nav svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.bottom-nav small {
  align-self: start;
  font-size: 10px;
  font-weight: 700;
}

.bottom-nav button.active {
  color: var(--orange-dark);
}

.bottom-nav button.active::after {
  position: absolute;
  top: -7px;
  width: 36px;
  height: 3px;
  background: var(--orange);
  content: "";
}

.bottom-nav b {
  position: absolute;
  top: -3px;
  right: -1px;
  display: grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  padding: 0 4px;
  color: #fff;
  background: var(--red);
  border: 2px solid #fff;
  border-radius: 10px;
  font-size: 9px;
  font-style: normal;
}

.detail-page {
  position: fixed;
  z-index: 45;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(100%, 540px);
  overflow-y: auto;
  background: var(--canvas);
  transform: translateX(-50%);
  animation: slide-in 180ms ease-out;
}

.detail-page[hidden],
.sheet-layer[hidden] {
  display: none;
}

.detail-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  height: calc(58px + env(safe-area-inset-top));
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: end;
  padding: env(safe-area-inset-top) 8px 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.detail-header button {
  display: grid;
  width: 46px;
  height: 52px;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
}

.detail-header button svg {
  width: 24px;
}

.detail-header h2 {
  align-self: center;
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-body {
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 27px 20px;
  color: #fff;
  background: var(--orange);
}

.detail-hero.dark {
  background: var(--charcoal);
}

.detail-hero > span {
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-hero h1 {
  max-width: 390px;
  margin: 7px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.15;
}

.detail-hero p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.86;
}

.detail-section {
  margin-top: 8px;
  padding: 20px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-section h3 {
  margin: 0 0 15px;
  font-size: 17px;
}

.detail-rows {
  border-top: 1px solid var(--line);
}

.detail-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.detail-row span {
  color: var(--muted);
  font-size: 11px;
}

.detail-row strong {
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  text-align: right;
  overflow-wrap: anywhere;
}

.step-list {
  display: grid;
  gap: 0;
}

.step-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 11px;
  min-height: 58px;
}

.step-item::before {
  position: absolute;
  top: 20px;
  bottom: -1px;
  left: 7px;
  width: 1px;
  background: #ddd7d3;
  content: "";
}

.step-item:last-child::before {
  display: none;
}

.step-dot {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  background: #fff;
  border: 2px solid #b5ada8;
  border-radius: 50%;
}

.step-item.complete .step-dot {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: inset 0 0 0 3px #fff;
}

.step-item strong,
.step-item span {
  display: block;
}

.step-item strong {
  font-size: 13px;
}

.step-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.primary-action {
  display: flex;
  width: 100%;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff;
  background: var(--orange);
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.mail-detail {
  padding: 22px 19px;
  background: #fff;
}

.mail-detail h1 {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

.mail-detail-sender {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.mail-detail-sender strong,
.mail-detail-sender span {
  display: block;
}

.mail-detail-sender span,
.mail-detail-sender time {
  color: var(--muted);
  font-size: 10px;
}

.mail-body {
  padding: 22px 0;
  color: #383431;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}

.attachment-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  background: #f5f2f0;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.mail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.mail-actions button {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #fff;
  border: 1px solid #d2cbc7;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 750;
}

.sheet-layer {
  position: fixed;
  z-index: 80;
  inset: 0;
}

.sheet-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  background: rgba(32, 27, 24, 0.5);
  border: 0;
}

.action-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 540px);
  max-height: 84dvh;
  margin: 0 auto;
  overflow-y: auto;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  background: #fff;
  border-radius: 12px 12px 0 0;
  animation: sheet-up 180ms ease-out;
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #3c3531;
  background: #f4f0ed;
  border: 0;
  border-radius: 50%;
}

.sheet-close svg {
  width: 18px;
  height: 18px;
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: -6px auto 14px;
  background: #d4ceca;
  border-radius: 2px;
}

.action-sheet h2 {
  margin: 0 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
}

.action-sheet > p {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 11px;
}

.sheet-choice-list {
  display: grid;
  gap: 8px;
}

.sheet-choice-list button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  text-align: left;
  background: #f8f5f3;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.sheet-choice-list button > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--orange-dark);
  background: var(--orange-soft);
  border-radius: 7px;
}

.sheet-choice-list strong,
.sheet-choice-list small {
  display: block;
}

.sheet-choice-list small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.sheet-choice-list button > svg {
  width: 17px;
  color: #aaa39f;
}

.compose-form {
  display: grid;
  gap: 11px;
}

.compose-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.compose-form input,
.compose-form textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d2cbc7;
  border-radius: 6px;
  outline: 0;
  font-size: 14px;
}

.compose-form textarea {
  min-height: 150px;
  resize: vertical;
}

.toast {
  position: fixed;
  z-index: 120;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 14px);
  left: 50%;
  max-width: calc(100% - 36px);
  padding: 10px 15px;
  color: #fff;
  background: #2d2927;
  border-radius: 6px;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty-state {
  padding: 34px 20px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@keyframes slide-in {
  from { transform: translateX(calc(-50% + 36px)); opacity: 0; }
  to { transform: translateX(-50%); opacity: 1; }
}

@keyframes sheet-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 380px) {
  .brand-lockup > div {
    display: none;
  }

  .quick-grid {
    gap-inline: 4px;
  }

  .fitness-panel {
    grid-template-columns: 96px 1fr;
  }

  .score-ring {
    width: 92px;
    height: 92px;
  }

  .detail-row {
    grid-template-columns: 104px minmax(0, 1fr);
  }
}

@media (min-width: 541px) {
  .bottom-nav,
  .detail-page {
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
  }
}
