:root {
  --ink: #171615;
  --muted: #747477;
  --paper: #fcfaf7;
  --accent: #c95331;
  --line: #242321;
  --card-line: #eaded4;
}

* { box-sizing: border-box; }

html { max-width: 100%; overflow-x: clip; }
img, svg, video, canvas { max-width: 100%; }

body {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  color: var(--ink);
  background: #eee8e2;
  font-family: Avenir Next, Avenir, Montserrat, Helvetica Neue, Arial, sans-serif;
}

.kata-page { min-height: 100vh; }

.app-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.app-shell > *, .app-shell :is(section, article, header, form, fieldset, div) { min-width: 0; }

.onboarding-card {
  width: min(100%, 500px);
  min-height: min(100vh - 48px, 980px);
  padding: clamp(38px, 9vw, 72px) clamp(25px, 7vw, 48px) 28px;
  background: radial-gradient(circle at 50% 35%, #fff 0%, var(--paper) 68%, #f8f4ee 100%);
  box-shadow: 0 16px 40px rgb(57 41 27 / 12%);
}
.profile-back { display: block; margin: -11px 0 24px; color: var(--ink); font-size: 14px; text-decoration: none; }
.profile-back[hidden] { display: none; }

/* App entry */
.app-entry-screen { display: grid; width: min(100%, 500px); min-height: min(100vh - 48px, 1000px); align-content: center; justify-items: center; gap: 28px; background: radial-gradient(circle at 50% 35%, #fff 0%, var(--paper) 68%, #f8f4ee 100%); box-shadow: 0 16px 40px rgb(57 41 27 / 12%); }
.app-entry-screen img { width: min(65vw, 260px); height: auto; }
.app-entry-spinner { width: 32px; height: 32px; border: 3px solid #e3eaf3; border-top-color: #c95331; border-radius: 50%; animation: flow-spin .85s linear infinite; }
.app-entry-screen p { margin: 0; color: var(--muted); font-size: 16px; }
.pwa-update-notice { position: fixed; z-index: 30; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 14px; max-width: min(92vw, 360px); padding: 13px 14px 13px 17px; border: 1px solid #dfd5cc; border-radius: 12px; background: #fffdfb; box-shadow: 0 9px 24px rgb(37 31 26 / 20%); color: var(--ink); font-size: 14px; }
.pwa-update-notice button { min-height: 34px; padding: 7px 12px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: 700 13px Avenir Next, Avenir, sans-serif; cursor: pointer; }
.pwa-update-notice button:focus-visible { outline: 3px solid #24558b; outline-offset: 2px; }
.install-kata-cta { position: fixed; z-index: 15; right: max(16px, env(safe-area-inset-right)); bottom: max(118px, calc(104px + env(safe-area-inset-bottom))); display: flex; align-items: center; overflow: hidden; border: 1px solid #dfd5cc; border-radius: 24px; background: #fffdfb; box-shadow: 0 8px 20px rgb(37 31 26 / 18%); }
.install-kata-cta[hidden] { display: none; }
.install-kata-cta > button { border: 0; background: transparent; color: var(--ink); font: 700 14px Avenir Next, Avenir, sans-serif; cursor: pointer; }
.install-kata-cta > [data-request-install-kata] { display: inline-flex; min-height: 46px; align-items: center; gap: 8px; padding: 7px 8px 7px 13px; }
.install-kata-cta img { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; }
.install-kata-cta > [data-dismiss-install-kata] { min-width: 37px; min-height: 46px; padding: 0 12px 2px 4px; color: #6b6967; font-size: 24px; font-weight: 400; }
.install-kata-cta > button:focus-visible, .pwa-install-dialog button:focus-visible { outline: 3px solid #24558b; outline-offset: -3px; }
.pwa-install-dialog { width: min(90vw, 360px); border: 0; border-radius: 20px; box-shadow: 0 18px 50px rgb(0 0 0 / 23%); }
.pwa-install-dialog::backdrop { background: rgb(23 22 21 / 38%); }
.pwa-install-dialog section { position: relative; padding: 30px 27px 25px; text-align: center; }
.pwa-install-dialog img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }
.pwa-install-dialog h2 { margin: 16px 0 11px; font: 400 30px/1.1 Georgia, Times New Roman, serif; }
.pwa-install-dialog p { margin: 0; color: #5f6063; font-size: 16px; line-height: 1.5; }
.pwa-install-dialog-close { position: absolute; top: 10px; right: 14px; border: 0; background: transparent; color: #555; font-size: 29px; cursor: pointer; }
.pwa-install-dialog-done { min-height: 43px; margin-top: 22px; padding: 8px 20px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: 700 15px Avenir Next, Avenir, sans-serif; cursor: pointer; }
.pwa-install-toast { position: fixed; z-index: 30; right: 16px; bottom: max(118px, calc(104px + env(safe-area-inset-bottom))); max-width: min(330px, calc(100vw - 32px)); margin: 0; padding: 14px 17px; border: 1px solid #d6e8d9; border-radius: 12px; background: #f2faf3; box-shadow: 0 8px 22px rgb(44 67 46 / 18%); color: #2e6840; font-size: 14px; line-height: 1.4; }
@media (max-width: 540px) { .app-entry-screen { min-height: 100vh; box-shadow: none; } }

.brand { text-align: center; }
.brand-art { display: block; width: min(78%, 292px); height: auto; margin: 0 auto; }
.brand-mark { height: 43px; position: relative; }
.brand-mark::before {
  content: "";
  position: absolute;
  left: calc(50% - 50px);
  top: 16px;
  width: 100px;
  height: 25px;
  border-top: 7px solid #171615;
  border-radius: 50% 50% 0 0;
  transform: skewY(-10deg);
}
.brand-mark span {
  position: absolute;
  left: calc(50% - 7px);
  top: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #cb5b38;
}
.brand-name { font-size: 44px; font-weight: 800; letter-spacing: .22em; line-height: 1; }
.brand p { margin: 13px 0 0; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .38em; text-transform: uppercase; }

.intro { margin: 42px 0 52px; text-align: center; }
.intro h1 { margin: 0; font-family: Georgia, Times New Roman, serif; font-size: clamp(36px, 8vw, 46px); font-weight: 400; }
.accent-rule { display: block; width: 40px; height: 3px; margin: 27px auto 33px; background: var(--accent); }
.intro p { margin: 0; font-size: 18px; line-height: 1.55; }

.field-group { margin-bottom: 48px; }
.field-group label, .choice-group legend { display: block; font-size: 19px; line-height: 1.3; }
.field-hint { display: block; margin-top: 4px; font-size: 16px; }
.field-group > input {
  width: 100%;
  height: 36px;
  margin-top: 19px;
  padding: 3px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: none;
}
.field-group > input:focus, .inline-input:focus { border-color: var(--accent); border-width: 2px; }
.field-group > select {
  width: 100%;
  height: 36px;
  margin-top: 19px;
  padding: 3px 24px 3px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: none;
}
.field-group > select:focus { border-color: var(--accent); border-width: 2px; }
.demographic-group { margin: 0 0 48px; padding: 25px 25px 1px; border: 1px solid var(--card-line); border-radius: 12px; }
.demographic-group legend { padding: 0 8px; font-size: 19px; line-height: 1.3; }
.demographic-group .field-group { margin-bottom: 32px; }
.analytics-consent-card { margin: 20px 0 48px; padding: 25px; border: 1px solid var(--card-line); border-radius: 12px; }
.analytics-consent-card legend { padding: 0 8px; font-size: 19px; line-height: 1.3; }
.analytics-consent-card > p { margin: 0 0 18px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.demographic-consent { display: flex; gap: 12px; align-items: flex-start; color: #4f4e4d; font-size: 15px; line-height: 1.45; }
.demographic-consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.privacy-data-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid #eaded4; color: var(--muted); font-size: 14px; line-height: 1.5; }

.choice-group { margin: 0 0 48px; padding: 0; border: 0; }
.choice-group legend { margin-bottom: 18px; }
.check-option { display: flex; align-items: center; gap: 14px; margin: 14px 0; font-size: 18px; cursor: pointer; }
.check-option input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
.check-option input[type="radio"]:checked { background: var(--accent); box-shadow: inset 0 0 0 4px var(--paper); }
.other-option { gap: 12px; }
.inline-input {
  width: min(100%, 200px);
  height: 28px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.commitment-card { padding: 27px 25px 20px; border: 1px solid var(--card-line); border-radius: 12px; }
.commitment-card h2 { margin: 0; font-size: 19px; font-weight: 700; }
.commitment-card h2 span { display: inline-block; margin-right: 11px; color: #6c7780; font-size: 22px; transform: rotate(-13deg); }
.commitment-icon { width: 25px; height: 25px; margin: 0 11px -6px 0; object-fit: contain; }
.commitment-card p { margin: 19px 0 14px; font-size: 18px; }
.commitment-options { display: flex; gap: 27px; }
.commitment-options .check-option { margin: 0; }
.commitment-note { margin: 35px 0 38px; text-align: center; font-size: 17px; font-style: italic; }
.form-message { min-height: 18px; margin: -22px 0 10px; color: #a63922; font-size: 14px; text-align: center; }

.continue-button {
  width: 100%;
  min-height: 66px;
  border: 0;
  border-radius: 26px;
  background: var(--accent);
  box-shadow: 0 7px 12px rgb(73 45 30 / 18%);
  color: white;
  font: 700 22px/1 Avenir Next, Avenir, sans-serif;
  cursor: pointer;
}
.continue-button span { margin-left: 28px; font-size: 34px; font-weight: 300; vertical-align: -2px; }
.continue-button:hover { background: #b7472a; }
.continue-button:focus-visible { outline: 3px solid #201f1d; outline-offset: 3px; }

.method-mark { margin-top: 42px; color: #7d7c79; text-align: center; font-size: 13px; letter-spacing: .32em; text-transform: uppercase; }
.method-symbol { display: block; width: 45px; height: 45px; margin: 0 auto 7px; border: 1px solid #aaa59e; border-radius: 50%; font-size: 35px; line-height: 43px; letter-spacing: 0; }
.method-art { display: block; width: 130px; height: auto; margin: 0 auto; }

@media (max-width: 540px) {
  .app-shell { padding: 0; place-items: start center; }
  .onboarding-card { min-height: 100vh; box-shadow: none; }
}

/* My Profile (S10) */
.profile-screen { width: min(100%, 500px); min-height: min(100vh - 48px, 1000px); display: flex; flex-direction: column; background: radial-gradient(circle at 50% 35%, #fff 0%, var(--paper) 68%, #f8f4ee 100%); box-shadow: 0 16px 40px rgb(57 41 27 / 12%); }
.profile-header { padding-bottom: 30px; }
.profile-card { position: relative; margin: 0 22px 28px; padding: 5px 24px 24px; border: 1px solid #eee4dc; border-radius: 24px; box-shadow: 0 8px 16px rgb(74 56 43 / 6%); }
.profile-edit-all { position: absolute; z-index: 1; top: 24px; right: 22px; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; }
.profile-edit-all:focus-visible { outline: 2px solid #24558b; outline-offset: 2px; }
.profile-edit-all img { width: 28px; height: 28px; object-fit: contain; }
.profile-row { display: grid; grid-template-columns: 82px 1fr; gap: 16px; align-items: start; padding: 27px 0; }
.profile-row + .profile-row { border-top: 1px solid #eee8e2; }
.profile-art { width: 74px; height: 74px; object-fit: contain; }
.profile-row h2, .profile-commitment h2 { margin: 10px 0 13px; font-size: 18px; line-height: 1.25; }
.profile-row p { margin: 0; padding-bottom: 10px; border-bottom: 1px solid #d5d1cc; font-size: 17px; }
.profile-hint { display: block; margin: -5px 0 11px; color: #747477; font-size: 14px; }
.profile-demographics { display: grid; gap: 9px; margin: 0; font-size: 16px; }
.profile-demographics div { display: grid; grid-template-columns: minmax(92px, auto) 1fr; gap: 10px; }
.profile-demographics dt { color: var(--muted); }
.profile-demographics dd { margin: 0; }
.profile-timing-row p { border-bottom: 0; padding-bottom: 0; }
.profile-commitment { display: grid; grid-template-columns: 45px 1fr; gap: 12px; align-items: start; margin-top: 4px; padding: 23px 18px; border: 1px solid #eaded4; border-radius: 13px; }
.profile-commitment > img { width: 38px; height: 38px; object-fit: contain; }
.profile-commitment h2 { margin: 2px 0 16px; }
.profile-commitment p { margin: 0 0 14px; font-size: 16px; }
.profile-commitment strong { color: #bd461f; font-size: 16px; }
.profile-analytics-card { margin-top: 20px; padding: 23px 18px; border: 1px solid #eaded4; border-radius: 13px; }
.profile-analytics-card h2 { margin: 0 0 11px; font-size: 18px; }
.profile-analytics-card > p { margin: 0 0 17px; color: var(--muted); font-size: 16px; line-height: 1.4; }
.profile-analytics-card .privacy-data-note { margin: 16px 0 0; padding-top: 14px; font-size: 14px; line-height: 1.5; }
.profile-analytics-card .profile-analytics-message { min-height: 17px; margin: 10px 0 0; color: #357047; font-size: 13px; }
.auto-lock-card { display: grid; grid-template-columns: 58px 1fr; gap: 15px; align-items: start; margin: 0 22px 18px; padding: 20px 22px; border: 1px solid #eee4dc; border-radius: 18px; box-shadow: 0 8px 16px rgb(74 56 43 / 6%); }
.auto-lock-card > img { width: 50px; height: 50px; object-fit: contain; }
.auto-lock-card h2 { margin: 3px 0 11px; font-size: 18px; }
.auto-lock-card label { color: #4f5053; font-size: 16px; }
.auto-lock-card input { width: 42px; height: 28px; margin: 0 3px; padding: 1px 3px; border: 0; border-bottom: 1px solid #77736f; border-radius: 0; background: transparent; color: var(--ink); font: inherit; text-align: center; outline: none; }
.auto-lock-card input:focus { border-bottom: 2px solid var(--accent); }
.auto-lock-card input[aria-invalid="true"] { border-color: #a63922; }
.auto-lock-card p { margin: 8px 0 0; color: #747477; font-size: 13px; }
.auto-lock-card .auto-lock-message { min-height: 17px; margin-top: 4px; color: #a63922; }
.auto-lock-card .auto-lock-message.success { color: #357047; }
.password-row { display: grid; grid-template-columns: 74px 1fr 26px; align-items: center; gap: 16px; margin: 0 22px 30px; padding: 17px 22px; border: 1px solid #eee4dc; border-radius: 18px; box-shadow: 0 8px 16px rgb(74 56 43 / 6%); color: var(--ink); font-size: 18px; font-weight: 600; text-decoration: none; }
.password-row img { width: 55px; height: 55px; object-fit: contain; }
.password-row img:last-child { width: 22px; height: 22px; }
.danger-zone { margin: 0 22px 30px; padding: 21px 22px; border: 1px solid #e6bdb3; border-radius: 18px; background: #fff8f6; }
.danger-zone h2 { margin: 0 0 9px; color: #9d341f; font-size: 18px; }
.danger-zone p { margin: 0 0 17px; color: #6b4d48; font-size: 15px; line-height: 1.4; }
.danger-zone button { width: 100%; min-height: 46px; border: 1px solid #b83d28; border-radius: 11px; background: transparent; color: #a63220; font: 700 15px/1 Avenir Next, Avenir, sans-serif; cursor: pointer; }
.danger-zone button:hover, .danger-zone button:focus-visible { background: #fff0ec; outline: 2px solid #b83d28; outline-offset: 2px; }
.delete-data-dialog { width: min(92vw, 430px); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 18px 50px rgb(0 0 0 / 23%); }
.delete-data-dialog::backdrop { background: rgb(23 22 21 / 44%); }
.delete-data-dialog section { padding: 30px 26px 25px; }
.delete-data-dialog h2 { margin: 0 0 16px; color: #9d341f; font: 400 30px/1.12 Georgia, Times New Roman, serif; }
.delete-data-dialog p { margin: 0 0 13px; color: #555257; font-size: 16px; line-height: 1.45; }
.delete-data-dialog label { display: block; margin-top: 23px; color: #343235; font-size: 16px; }
.delete-data-dialog input { width: 100%; height: 48px; margin-top: 10px; padding: 8px 12px; border: 1px solid #cfc8c3; border-radius: 10px; color: var(--ink); font: 600 17px/1 Avenir Next, Avenir, sans-serif; outline: none; }
.delete-data-dialog input:focus { border-color: #b83d28; box-shadow: 0 0 0 2px rgb(184 61 40 / 14%); }
.delete-data-message { min-height: 18px; margin: 8px 0 0 !important; color: #a63220 !important; font-size: 13px !important; }
.delete-data-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 23px; }
.delete-data-actions button { min-height: 48px; border-radius: 11px; font: 700 15px/1 Avenir Next, Avenir, sans-serif; cursor: pointer; }
.delete-data-actions [data-cancel-delete] { border: 1px solid #cfc8c3; background: #fff; color: #4f4b4d; }
.delete-data-actions [data-confirm-delete] { border: 1px solid #b83d28; background: #b83d28; color: #fff; }
.delete-data-actions [data-confirm-delete]:disabled { cursor: not-allowed; opacity: .45; }
.more-active { color: #24558b; }
.more-active::before { background: #24558b; }
@media (max-width: 540px) { .profile-screen { min-height: 100vh; box-shadow: none; } }
@media (max-width: 410px) { .profile-card { margin-inline: 16px; padding-inline: 18px; } .profile-row { grid-template-columns: 67px 1fr; gap: 11px; } .profile-art { width: 62px; height: 62px; } .auto-lock-card, .password-row, .danger-zone { margin-inline: 16px; } .auto-lock-card { grid-template-columns: 49px 1fr; padding-inline: 17px; } .auto-lock-card > img { width: 43px; height: 43px; } }

/* Change Password (S12) */
.pin-screen { width: min(100%, 500px); min-height: min(100vh - 48px, 1000px); display: flex; flex-direction: column; background: radial-gradient(circle at 50% 35%, #fff 0%, var(--paper) 68%, #f8f4ee 100%); box-shadow: 0 16px 40px rgb(57 41 27 / 12%); }
.pin-header { padding-bottom: 18px; }
.pin-header h1 { font-size: clamp(28px, 7.5vw, 42px); overflow-wrap: anywhere; }
.pin-brand { margin: 4px auto 35px; text-align: center; }
.pin-brand img { display: block; width: 190px; height: auto; margin: auto; }
.pin-introduction { display: grid; grid-template-columns: 54px 1fr; gap: 16px; align-items: center; margin: 0 52px 47px; }
.pin-info-icon { display: grid; width: 47px; height: 47px; place-items: center; border: 1.5px solid #c95331; border-radius: 50%; box-shadow: inset 0 0 0 10px #fdf3ea; color: #c95331; font: 400 27px/1 Georgia, serif; }
.pin-introduction p { margin: 0; color: #414146; font-size: 17px; line-height: 1.55; }
.pin-form { padding: 0 52px 35px; }
.pin-fieldset { margin: 0 0 42px; padding: 0; border: 0; }
.pin-fieldset legend { margin-bottom: 14px; color: #646468; font-size: 19px; }
.pin-inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pin-inputs input { width: 100%; aspect-ratio: 1 / 1; min-height: 70px; padding: 0; border: 1px solid #d8d5d2; border-radius: 12px; background: rgb(255 255 255 / 35%); color: var(--ink); font: 400 38px/1 Avenir Next, sans-serif; text-align: center; outline: none; }
.pin-inputs input:focus { border: 2px solid #24558b; box-shadow: 0 0 0 2px rgb(36 85 139 / 12%); }
.pin-inputs input[aria-invalid="true"] { border-color: #ad3f28; }
.pin-requirements { margin: 2px 0 40px; }
.pin-requirements h2 { margin: 0 0 22px; color: #646468; font-size: 18px; font-weight: 500; }
.pin-requirements ul { display: grid; gap: 17px; margin: 0; padding: 0; list-style: none; color: #5f6063; font-size: 16px; }
.pin-requirements li { display: flex; align-items: center; gap: 13px; }
.pin-requirements li::before { content: "✓"; display: grid; width: 24px; height: 24px; place-items: center; border: 1.5px solid #c95331; border-radius: 50%; color: #c95331; font-size: 15px; font-weight: 700; }
.pin-message { min-height: 20px; margin: -23px 0 11px; color: #a63922; font-size: 14px; text-align: center; }
.pin-message.success { color: #357047; }
.pin-update-button, .pin-cancel-button { display: flex; width: 100%; min-height: 62px; align-items: center; justify-content: center; border-radius: 15px; font: 700 19px/1 Avenir Next, Avenir, sans-serif; text-decoration: none; }
.pin-update-button { gap: 18px; border: 0; background: #c94d16; box-shadow: 0 7px 12px rgb(73 45 30 / 18%); color: #fff; cursor: pointer; }
.pin-update-button:disabled { cursor: not-allowed; opacity: .48; }
.pin-update-button:not(:disabled):hover { background: #b94614; }
.pin-update-button:focus-visible, .pin-cancel-button:focus-visible { outline: 3px solid #24558b; outline-offset: 3px; }
.pin-lock { position: relative; width: 22px; height: 18px; border: 2px solid currentColor; border-radius: 3px; }
.pin-lock::before { content: ""; position: absolute; left: 4px; bottom: 16px; width: 10px; height: 10px; border: 2px solid currentColor; border-bottom: 0; border-radius: 8px 8px 0 0; }
.pin-lock::after { content: ""; position: absolute; left: 8px; top: 6px; width: 3px; height: 5px; border-radius: 2px; background: currentColor; }
.pin-cancel-button { margin-top: 18px; border: 1.5px solid #c95331; color: #bf461f; }
@media (max-width: 540px) { .pin-screen { min-height: 100vh; box-shadow: none; } }
@media (max-width: 410px) { .pin-introduction, .pin-form { margin-inline: 0; padding-inline: 34px; } .pin-introduction { grid-template-columns: 46px 1fr; gap: 12px; } .pin-info-icon { width: 42px; height: 42px; } .pin-inputs { gap: 12px; } }

/* Enter Password (S13) */
.enter-pin-screen { width: min(100%, 500px); min-height: min(100vh - 48px, 1000px); display: flex; flex-direction: column; background: radial-gradient(circle at 50% 35%, #fff 0%, var(--paper) 68%, #f8f4ee 100%); box-shadow: 0 16px 40px rgb(57 41 27 / 12%); }
.enter-pin-brand { margin: clamp(68px, 14vw, 118px) auto 56px; text-align: center; }
.enter-pin-brand img { display: block; width: min(67vw, 275px); height: auto; }
.enter-pin-heading { text-align: center; }
.enter-pin-heading h1 { margin: 0; font: 600 clamp(30px, 7vw, 39px)/1.2 Georgia, Times New Roman, serif; }
.enter-pin-heading p { margin: 17px 0 0; color: #646468; font-size: 19px; }
.enter-pin-lock { position: relative; display: grid; width: 100px; height: 100px; place-items: center; margin: 68px auto 73px; border-radius: 50%; background: #f8ece6; }
.enter-pin-lock span { position: relative; width: 36px; height: 30px; border: 3px solid #c04a22; border-radius: 4px; }
.enter-pin-lock span::before { content: ""; position: absolute; left: 6px; bottom: 28px; width: 18px; height: 20px; border: 3px solid #c04a22; border-bottom: 0; border-radius: 13px 13px 0 0; }
.enter-pin-lock span::after { content: ""; position: absolute; left: 14px; top: 9px; width: 5px; height: 10px; border-radius: 3px; background: #c04a22; }
.enter-pin-form { padding: 0 54px; }
.enter-pin-inputs { gap: 20px; }
.enter-pin-inputs input { min-height: 87px; }
.enter-pin-message { min-height: 22px; margin: 13px 0 0; color: #a63922; font-size: 14px; text-align: center; }
.forgot-pin { margin: auto 46px 52px; color: #646468; text-align: center; }
.forgot-pin h2 { display: flex; align-items: center; gap: 18px; margin: 0 0 21px; color: #bf461f; font-size: 20px; font-weight: 600; }
.forgot-pin h2::before, .forgot-pin h2::after { content: ""; height: 1px; flex: 1; background: #e4d9d2; }
.forgot-pin p { margin: 0; font-size: 17px; line-height: 1.55; }
.forgot-pin a { color: inherit; text-decoration: none; }
.forgot-pin a:hover, .forgot-pin a:focus-visible { color: #bf461f; text-decoration: underline; }
@media (max-width: 540px) { .enter-pin-screen { min-height: 100vh; box-shadow: none; } }
@media (max-width: 410px) { .enter-pin-brand { margin-top: 62px; } .enter-pin-form { padding-inline: 34px; } .enter-pin-inputs { gap: 12px; } .enter-pin-lock { margin-block: 55px 62px; } }

/* Forgot Password (S14) */
.forgot-pin-screen { width: min(100%, 500px); min-height: min(100vh - 48px, 1000px); display: flex; flex-direction: column; background: radial-gradient(circle at 50% 35%, #fff 0%, var(--paper) 68%, #f8f4ee 100%); box-shadow: 0 16px 40px rgb(57 41 27 / 12%); }
.forgot-pin-header { padding-bottom: 16px; }
.forgot-pin-header h1 { font-size: clamp(28px, 7.4vw, 40px); overflow-wrap: anywhere; }
.forgot-pin-header p { margin-top: 14px; }
.reset-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 42px 42px; padding: 0; list-style: none; text-align: center; }
.reset-progress li { position: relative; display: grid; justify-items: center; gap: 10px; color: #98999b; font-size: 13px; }
.reset-progress li:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: calc(50% + 22px); width: calc(100% - 30px); height: 1px; background: #d9d6d2; }
.reset-progress span { display: grid; z-index: 1; width: 34px; height: 34px; place-items: center; border: 1.5px solid #bec0c2; border-radius: 50%; background: var(--paper); font-size: 17px; font-weight: 600; }
.reset-progress strong { font-size: 13px; font-weight: 500; line-height: 1.25; }
.reset-progress .active { color: #bf461f; }
.reset-progress .active span { border-color: #bf461f; background: #bf461f; color: #fff; }
.forgot-pin-form { padding: 0 52px 28px; }
.verify-notice { display: grid; grid-template-columns: 49px 1fr; gap: 16px; align-items: center; margin-bottom: 38px; padding: 21px; border: 1px solid #f0d9c9; border-radius: 12px; }
.verify-notice .pin-info-icon { width: 39px; height: 39px; font-size: 23px; box-shadow: none; }
.verify-notice p { margin: 0; color: #454549; font-size: 17px; line-height: 1.45; }
.reset-field { margin-bottom: 32px; }
.reset-field label { display: block; margin-bottom: 11px; color: #56575a; font-size: 18px; }
.reset-field :is(input, select) { width: 100%; min-height: 55px; padding: 12px 16px; border: 1px solid #d5d1cc; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; outline: none; }
.reset-field :is(input, select):focus { border-color: #24558b; box-shadow: 0 0 0 2px rgb(36 85 139 / 12%); }
.forgot-pin-message { min-height: 19px; margin: -20px 0 11px; color: #a63922; font-size: 14px; text-align: center; }
.reset-verify-button, .reset-cancel-button { display: flex; width: 100%; min-height: 61px; align-items: center; justify-content: center; border-radius: 13px; font: 700 19px/1 Avenir Next, Avenir, sans-serif; text-decoration: none; }
.reset-verify-button { border: 0; background: #c94d16; color: #fff; cursor: pointer; box-shadow: 0 7px 12px rgb(73 45 30 / 18%); }
.reset-cancel-button { border: 1.5px solid #c95331; color: #bf461f; }
.reset-or { display: flex; align-items: center; gap: 18px; margin: 18px 0; color: #a5a3a0; font-size: 15px; text-align: center; }
.reset-or::before, .reset-or::after { content: ""; height: 1px; flex: 1; background: #e4d9d2; }
.reset-complete { padding: 56px 52px; text-align: center; }
.reset-complete-check { display: grid; width: 72px; height: 72px; place-items: center; margin: 0 auto 24px; border-radius: 50%; background: #e9f3eb; color: #357047; font-size: 36px; font-weight: 700; }
.reset-complete h2 { margin: 0 0 12px; font: 600 32px/1.2 Georgia, Times New Roman, serif; }
.reset-complete p { margin: 0 0 40px; color: #626367; font-size: 17px; }
.pin-reset-progress { margin-top: 0; margin-bottom: 16px; }
.pin-reset-progress[hidden] { display: none; }
@media (max-width: 540px) { .forgot-pin-screen { min-height: 100vh; box-shadow: none; } }
@media (max-width: 410px) { .reset-progress { margin-inline: 24px; } .forgot-pin-form { padding-inline: 34px; } .verify-notice { padding-inline: 16px; } }

/* About (S11) */
.about-screen { width: min(100%, 500px); min-height: min(100vh - 48px, 1000px); display: flex; flex-direction: column; background: radial-gradient(circle at 50% 35%, #fff 0%, var(--paper) 68%, #f8f4ee 100%); box-shadow: 0 16px 40px rgb(57 41 27 / 12%); }
.about-header { padding-bottom: 30px; }
.about-card { margin: 0 22px; padding: 31px 32px; border: 1px solid #eee4dc; border-radius: 23px; box-shadow: 0 8px 16px rgb(74 56 43 / 6%); }
.about-card-title { display: flex; align-items: center; gap: 18px; }
.about-card-title img { width: 49px; height: 49px; object-fit: contain; }
.about-card-title h2 { margin: 0; font-size: 23px; }
.about-description { margin: 26px 0 34px 67px; font-size: 16px; line-height: 1.7; }
.about-facts { margin: 0 0 0 67px; }
.about-facts div { display: grid; grid-template-columns: 1fr 1.45fr; gap: 16px; padding: 19px 0; border-top: 1px solid #e8e1db; }
.about-facts dt, .about-facts dd { margin: 0; font-size: 16px; }
.about-facts dd { color: #5f6063; text-align: right; }
@media (max-width: 540px) { .about-screen { min-height: 100vh; box-shadow: none; } }
@media (max-width: 410px) { .about-card { margin-inline: 16px; padding: 26px 22px; } .about-description, .about-facts { margin-left: 0; } }

@media (max-width: 375px) {
  .onboarding-card { padding-inline: 22px; }
  .brand-name { font-size: 38px; }
  .intro { margin-block: 34px 43px; }
  .field-group { margin-bottom: 38px; }
  .commitment-card { padding-inline: 19px; }
}

/* My Practice (S02) */
.practice-screen {
  width: min(100%, 500px);
  min-height: min(100vh - 48px, 1000px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #fff 0%, var(--paper) 68%, #f8f4ee 100%);
  box-shadow: 0 16px 40px rgb(57 41 27 / 12%);
}
.practice-brand { padding-top: clamp(38px, 9vw, 63px); }
.practice-brand .brand-art { width: min(73%, 286px); }
.practice-intro { margin: 35px 25px 47px; }
.practice-intro h1 { font-size: clamp(39px, 9vw, 51px); }
.practice-intro .accent-rule { margin-block: 27px 31px; }
.practice-list { padding: 0 22px 25px; }
.practice-card {
  position: relative;
  display: grid;
  grid-template-columns: 34% 1fr 20px;
  align-items: center;
  min-height: 192px;
  margin-bottom: 25px;
  padding: 20px 20px 20px 18px;
  overflow: hidden;
  border: 1px solid #eee4dc;
  border-radius: 26px;
  box-shadow: 0 8px 16px rgb(74 56 43 / 6%);
  color: var(--ink);
  text-decoration: none;
}
.daily-card { --practice-color: #d25725; background: #fffdfb; }
.weekly-card { --practice-color: #507838; background: #fbfcf8; }
.monthly-card { --practice-color: #2f5d91; background: #f8fafc; }
.practice-card:focus-visible { outline: 3px solid var(--practice-color); outline-offset: 3px; }
.practice-card:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgb(74 56 43 / 12%); }
.practice-art {
  width: 130px;
  height: 130px;
  display: block;
  margin-right: 13px;
  object-fit: contain;
  object-position: center;
}
.practice-copy { display: block; align-self: center; }
.practice-title { display: block; margin-bottom: 20px; font: 400 29px/1.08 Georgia, Times New Roman, serif; }
.practice-description { display: block; font-size: 16px; line-height: 1.45; }
.practice-status { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 22px; color: #6a6968; font-size: 14px; }
.practice-status strong { color: var(--practice-color); font-weight: 600; }
.calendar-icon { width: 20px; height: 20px; object-fit: contain; }
.card-arrow { width: 22px; height: 38px; align-self: center; object-fit: contain; }
.bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: auto; border-top: 1px solid #ede6df; }
.nav-link { position: relative; display: flex; min-width: 0; min-height: 104px; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: #5f6063; font-size: 13px; overflow-wrap: anywhere; text-align: center; text-decoration: none; }
.nav-link.nav-more-trigger { border: 0; background: transparent; font-family: inherit; cursor: pointer; }
.nav-link.active { color: var(--accent); font-weight: 700; }
.nav-link.active::before { content: ""; position: absolute; top: 0; width: 72px; height: 2px; background: var(--accent); }
.nav-icon { min-height: 30px; font-size: 29px; line-height: 1; letter-spacing: -3px; }
.nav-icon-image { width: 46px; height: 35px; object-fit: contain; }
.nav-enso { width: 43px; height: 43px; min-height: 43px; border: 8px solid currentColor; border-left-color: transparent; border-radius: 50%; transform: rotate(-22deg); }
.nav-mountain { font-size: 40px; letter-spacing: -12px; transform: rotate(-7deg); }

@media (max-width: 540px) {
  .practice-screen { min-height: 100vh; box-shadow: none; }
}
@media (max-width: 410px) {
  .practice-list { padding-inline: 16px; }
  .practice-card { grid-template-columns: 33% 1fr 14px; min-height: 172px; padding: 16px 13px; border-radius: 22px; }
  .practice-art { transform: scale(.82); transform-origin: left center; }
  .practice-title { margin-bottom: 12px; font-size: 24px; }
  .practice-description { font-size: 14px; }
  .practice-status { margin-top: 13px; font-size: 12px; gap: 7px; }
  .card-arrow { width: 18px; height: 33px; }
}

/* Daily Practice (S03) */
.reflection-screen {
  width: min(100%, 500px);
  min-height: min(100vh - 48px, 1050px);
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 35%, #fff 0%, var(--paper) 68%, #f8f4ee 100%);
  box-shadow: 0 16px 40px rgb(57 41 27 / 12%);
}
.reflection-header { display: grid; grid-template-columns: 45px 1fr 45px; align-items: start; min-height: 163px; padding: 48px 24px 14px; border-bottom: 1px solid #eee5dd; text-align: center; }
.reflection-header h1 { margin: 0 0 12px; font: 400 clamp(32px, 7vw, 42px)/1 Georgia, Times New Roman, serif; }
.back-button, .more-button { display: grid; width: 40px; height: 40px; place-items: center; color: var(--ink); font-size: 38px; line-height: 1; text-decoration: none; }
.back-button { margin-top: 3px; }
.more-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.header-icon { display: block; width: 28px; height: 30px; object-fit: contain; }
.more-button .header-icon { width: 23px; height: 32px; }
.more-popup { position: fixed; z-index: 20; display: flex; min-width: 155px; flex-direction: column; overflow: hidden; border: 1px solid #e3d9d0; border-radius: 13px; background: #fffdfb; box-shadow: 0 10px 24px rgb(61 45 34 / 18%); }
.more-popup[hidden] { display: none; }
.more-popup a, .more-popup button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 14px 17px; border: 0; background: transparent; color: var(--ink); font: 15px Avenir Next, Avenir, sans-serif; text-align: left; text-decoration: none; cursor: pointer; }
.more-popup > :not(:first-child) { border-top: 1px solid #eee6df; }
.more-popup a:hover, .more-popup a:focus-visible, .more-popup button:hover, .more-popup button:focus-visible { background: #f8f2ec; outline: none; }
.more-lock-icon { position: relative; width: 14px; height: 12px; margin-left: 1px; border: 1.5px solid #a84b2c; border-radius: 2px; }
.more-lock-icon::before { content: ""; position: absolute; left: 2px; bottom: 10px; width: 7px; height: 7px; border: 1.5px solid #a84b2c; border-bottom: 0; border-radius: 6px 6px 0 0; }
.export-notice { position: fixed; z-index: 30; right: 16px; bottom: 104px; max-width: min(330px, calc(100vw - 32px)); margin: 0; padding: 14px 17px; border: 1px solid #d6e8d9; border-radius: 12px; background: #f2faf3; box-shadow: 0 8px 22px rgb(44 67 46 / 18%); color: #2e6840; font-size: 14px; line-height: 1.4; }
.date-picker-label { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.date-picker-label > span { font-size: 19px; }
.date-icon { width: 20px; height: 20px; object-fit: contain; }
.date-picker-label input { width: 142px; border: 0; background: transparent; color: var(--ink); font: inherit; }
.header-rule { display: block; width: 66px; height: 3px; margin: 17px auto 0; background: var(--accent); }
.reflection-form { padding: 26px 38px 16px; }
.reflection-question { margin-bottom: 39px; }
.reflection-question label { display: block; font-size: 18px; line-height: 1.35; }
.reflection-question p { margin: 7px 0 18px; font-size: 15px; font-style: italic; }
.reflection-question textarea { width: 100%; min-height: 43px; height: 43px; padding: 5px 0 8px; overflow: hidden; resize: none; border: 0; border-bottom: 1px solid #aaa8a5; border-radius: 0; background: transparent; color: var(--ink); font: 16px/1.45 Avenir Next, Avenir, sans-serif; outline: none; }
.reflection-question textarea:focus { border-bottom: 2px solid var(--accent); }
.quick-check { margin: 8px 0 0; padding: 19px 0 15px; border: 0; border-top: 1px solid #eee5dd; border-bottom: 1px solid #eee5dd; }
.quick-check legend { padding: 0; font-size: 20px; font-weight: 700; }
.quick-check legend span { display: inline-block; margin-right: 9px; color: #6c7780; transform: rotate(-13deg); }
.quick-check-icon { width: 25px; height: 25px; margin: 0 9px -6px 0; object-fit: contain; }
.quick-check label { display: flex; align-items: center; gap: 12px; margin: 13px 0; font-size: 15px; cursor: pointer; }
.quick-check input { appearance: none; width: 17px; height: 17px; margin: 0; border: 1px solid var(--line); border-radius: 0; background: transparent; }
.quick-check input:checked { background: var(--accent); box-shadow: inset 0 0 0 4px var(--paper); }
.reflection-note { margin: 25px 0 22px; font-size: 16px; font-style: italic; }
.reflection-form .form-message { margin: -10px 0 9px; }
.complete-button { min-height: 59px; font-size: 18px; }
.complete-button span { margin-left: 16px; font-size: 25px; }
.button-icon { width: 25px; height: 25px; margin-left: 16px; vertical-align: -6px; object-fit: contain; }
.reflection-screen .bottom-nav { margin-top: auto; }

@media (max-width: 540px) {
  .reflection-screen { min-height: 100vh; box-shadow: none; }
}
@media (max-width: 390px) {
  .reflection-header { padding-inline: 17px; }
  .reflection-form { padding-inline: 26px; }
  .reflection-question { margin-bottom: 32px; }
}

/* Weekly Practice (S04) */
.weekly-rule { background: #54743c; }
.weekly-form { padding-top: 27px; }
.weekly-section { margin-bottom: 28px; }
.weekly-section h2 { margin: 0 0 27px; font-size: 21px; line-height: 1.2; }
.weekly-form .reflection-question { margin-bottom: 35px; }
.upgrade-section { margin: 0 -38px 26px; padding: 28px 38px 8px; border-top: 1px solid #eee5dd; }
.improvement-list, .reality-check { margin: 0; padding: 0; border: 0; }
.improvement-list legend { margin-bottom: 13px; font-size: 17px; line-height: 1.4; }
.improvement-list legend em { font-style: italic; }
.improvement-list label, .reality-check label { display: flex; align-items: center; gap: 11px; margin: 12px 0; font-size: 16px; cursor: pointer; }
.improvement-list input, .reality-check input { appearance: none; width: 16px; height: 16px; margin: 0; border: 1px solid var(--line); border-radius: 0; background: transparent; }
.improvement-list input:checked { background: #54743c; box-shadow: inset 0 0 0 4px var(--paper); }
.reality-check { margin: 0 0 31px; }
.reality-check legend { font-size: 21px; font-weight: 700; }
.reality-check p { margin: 15px 0 12px; font-size: 17px; }
.reality-check > div { display: flex; gap: 20px; flex-wrap: wrap; }
.reality-check label { margin: 0; }
.reality-check input { border-radius: 50%; }
.reality-check input:checked { background: #54743c; box-shadow: inset 0 0 0 4px var(--paper); }
.weekly-complete { background: #de4017; }

@media (max-width: 390px) {
  .upgrade-section { margin-inline: -26px; padding-inline: 26px; }
}

/* Monthly Practice (S05) */
.monthly-rule { background: #244f84; }
.monthly-form { padding-top: 28px; }
.monthly-section { margin-bottom: 27px; }
.monthly-section h2 { margin: 0 0 27px; font-size: 21px; font-weight: 400; line-height: 1.25; }
.monthly-section h2 strong { font-weight: 700; }
.monthly-form .reflection-question { margin-bottom: 29px; }
.monthly-form .compact-question { margin-bottom: 27px; }
.build-section { margin: 0 -38px 27px; padding: 37px 38px 0; border-top: 1px solid #eee5dd; }
.monthly-reality { margin-bottom: 0; }
.monthly-reality > div { gap: 21px; align-items: center; }
.monthly-reality p { margin: 0 12px 0 0; }
.monthly-note { margin: 31px 0 27px; color: #244f84; font-size: 17px; font-style: italic; }
.monthly-complete { background: #244f84; }
.monthly-complete:hover { background: #193e6d; }

@media (max-width: 390px) {
  .build-section { margin-inline: -26px; padding-inline: 26px; }
  .monthly-section h2 { font-size: 19px; }
  .monthly-reality > div { gap: 13px; }
}

/* My Journey (S06) */
.journey-screen {
  width: min(100%, 500px);
  min-height: min(100vh - 48px, 1000px);
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 35%, #fff 0%, var(--paper) 68%, #f8f4ee 100%);
  box-shadow: 0 16px 40px rgb(57 41 27 / 12%);
}
.journey-header { display: grid; grid-template-columns: 45px 1fr 45px; align-items: start; padding: 48px 24px 17px; text-align: center; }
.journey-header h1 { margin: 0; font: 400 clamp(35px, 8vw, 44px)/1.15 Georgia, Times New Roman, serif; }
.journey-header p { margin: 20px 0 0; font-size: 16px; line-height: 1.35; }
.journey-rule { display: block; width: 69px; height: 3px; margin: 27px auto 0; background: #24558b; }
.journey-list { padding: 90px 24px 24px; }
.journey-card {
  display: grid;
  grid-template-columns: 43% 1fr 22px;
  align-items: center;
  min-height: 230px;
  margin-bottom: 27px;
  padding: 18px 18px 18px 10px;
  border: 1px solid #eee4dc;
  border-radius: 25px;
  box-shadow: 0 8px 16px rgb(74 56 43 / 6%);
  color: var(--ink);
  text-decoration: none;
}
.journey-card:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgb(74 56 43 / 12%); }
.journey-card:focus-visible { outline: 3px solid #24558b; outline-offset: 3px; }
.journey-art { width: 100%; height: 192px; object-fit: contain; }
.reflections-art { height: 178px; }
.journey-title { display: block; margin-bottom: 20px; font: 400 29px/1.08 Georgia, Times New Roman, serif; }
.journey-description { display: block; font-size: 16px; line-height: 1.48; }
.journey-arrow { width: 20px; height: 38px; object-fit: contain; }
.journey-active { color: #24558b; }
.journey-active::before { background: #24558b; }

@media (max-width: 540px) {
  .journey-screen { min-height: 100vh; box-shadow: none; }
}
@media (max-width: 410px) {
  .journey-list { padding-inline: 16px; padding-top: 68px; }
  .journey-card { grid-template-columns: 43% 1fr 17px; min-height: 207px; padding: 12px 12px 12px 5px; border-radius: 22px; }
  .journey-art { height: 164px; }
  .reflections-art { height: 153px; }
  .journey-title { margin-bottom: 14px; font-size: 24px; }
  .journey-description { font-size: 14px; }
  .journey-arrow { width: 17px; height: 32px; }
}

/* My Flow (S07) */
.flow-screen { width: min(100%, 500px); min-height: min(100vh - 48px, 1000px); display: flex; flex-direction: column; background: radial-gradient(circle at 50% 35%, #fff 0%, var(--paper) 68%, #f8f4ee 100%); box-shadow: 0 16px 40px rgb(57 41 27 / 12%); }
.flow-header { padding-bottom: 39px; }
.flow-as-of { margin: -19px 22px 17px; color: #777; font-size: 12px; text-align: center; }
.flow-loading { display: flex; min-height: 460px; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #14508e; text-align: center; }
.flow-loading[hidden] { display: none; }
.flow-loading strong { font-size: 19px; }
.flow-loading span:last-child { color: #777; font-size: 14px; }
.flow-spinner { width: 42px; height: 42px; border: 4px solid #e3eaf3; border-top-color: #14508e; border-radius: 50%; animation: flow-spin .85s linear infinite; }
@keyframes flow-spin { to { transform: rotate(360deg); } }
.flow-card { margin: 0 22px 25px; padding: 28px 24px; border: 1px solid #eee4dc; border-radius: 24px; box-shadow: 0 8px 16px rgb(74 56 43 / 6%); }
.flow-card h2 { margin: 0 0 26px; font-size: 20px; }
.flow-summary { position: relative; display: grid; grid-template-columns: 145px 1fr; gap: 14px; align-items: center; }
.current-flow-art { width: 145px; height: 145px; object-fit: contain; }
.flow-summary h3, .index-summary h3 { margin: 0 0 12px; color: #14508e; font: 400 31px/1 Georgia, Times New Roman, serif; }
.flow-summary p { margin: 0 0 12px; font-size: 16px; line-height: 1.35; }
.flow-summary .flow-emphasis { color: #14508e; }
.level-badge { position: absolute; top: 4px; right: 0; padding: 10px 12px; border-radius: 9px; background: #e7edf5; color: #14508e; font-size: 14px; font-weight: 700; }
.level-track { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; }
.level-track::before { content: ""; position: absolute; top: 43px; right: 16%; left: 16%; height: 4px; background: #e7e7e7; }
.level-track::after { content: ""; position: absolute; top: 43px; left: 16%; width: var(--level-line, 0%); height: 4px; background: #14508e; }
.level-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 13px; line-height: 1.35; }
.level-step img { width: 86px; height: 86px; margin-bottom: 9px; border-radius: 50%; object-fit: contain; }
.level-step strong { margin-bottom: 7px; font-size: 16px; }
.level-step.active strong { color: #14508e; }
.level-step.active img { box-shadow: 0 0 0 3px #14508e; }
.level-step.achieved img { box-shadow: 0 0 0 2px #96afca; }
.level-step:not(.active):not(.achieved) { opacity: .42; filter: grayscale(1); }
.guidance-content { display: grid; grid-template-columns: 145px 1fr; align-items: center; gap: 16px; }
.guidance-art { width: 145px; height: 145px; object-fit: contain; }
.guidance-content p { margin: 0 0 17px; font-size: 16px; line-height: 1.4; }
.guidance-content strong { color: #14508e; }
.guidance-content ul { margin: 0; padding: 0; list-style: none; }
.guidance-content li { display: flex; gap: 10px; margin: 12px 0; font-size: 15px; line-height: 1.35; }
.guidance-content li::before { content: ""; width: 18px; height: 18px; flex: 0 0 18px; background: url("icons/icon-flow-check.png") center / contain no-repeat; }
.index-summary { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 14px; }
.flow-ring { --flow-progress: 0%; display: grid; width: 145px; height: 145px; place-content: center; border-radius: 50%; background: conic-gradient(#14508e var(--flow-progress), #e7edf5 0); position: relative; text-align: center; }
.flow-ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--paper); }
.flow-ring strong, .flow-ring span { position: relative; z-index: 1; }
.flow-ring strong { color: #14508e; font-size: 48px; line-height: 1; }
.flow-ring span { margin-top: 8px; color: #666; font-size: 16px; }
.index-summary h3 { font-family: Avenir Next, Avenir, sans-serif; font-size: 20px; font-weight: 700; line-height: 1.2; }
.index-summary p { margin: 0; font-size: 16px; line-height: 1.45; }
.index-bar { height: 16px; margin-top: 20px; overflow: hidden; border-radius: 99px; background: #e6e6e6; }
.index-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: #14508e; transition: width .25s ease; }
.index-scale { display: flex; justify-content: space-between; margin: 10px 0 26px; color: #777; font-size: 13px; }
.index-updated { margin: 0; color: #777; font-size: 14px; text-align: center; }
.index-updated::before { content: "▣"; margin-right: 10px; color: #666; }

@media (max-width: 540px) { .flow-screen { min-height: 100vh; box-shadow: none; } }
@media (max-width: 410px) {
  .flow-card { margin-inline: 16px; padding: 23px 19px; }
  .flow-summary, .guidance-content { grid-template-columns: 119px 1fr; gap: 10px; }
  .current-flow-art, .guidance-art { width: 119px; height: 119px; }
  .flow-summary h3 { font-size: 27px; }
  .flow-summary p, .guidance-content p { font-size: 14px; }
  .level-badge { padding: 8px; font-size: 12px; }
  .level-step img { width: 70px; height: 70px; }
  .level-track::before, .level-track::after { top: 35px; }
  .level-step strong { font-size: 14px; }
  .index-summary { grid-template-columns: 130px 1fr; }
  .flow-ring { width: 125px; height: 125px; }
}

/* My Reflections (S08) */
.reflections-screen { position: relative; width: min(100%, 500px); min-height: min(100vh - 48px, 1000px); display: flex; flex-direction: column; background: radial-gradient(circle at 50% 35%, #fff 0%, var(--paper) 68%, #f8f4ee 100%); box-shadow: 0 16px 40px rgb(57 41 27 / 12%); }
.reflections-header { padding-bottom: 25px; }
.reflections-toolbar { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 22px 25px; border-bottom: 1px solid #eee5dd; }
.reflections-toolbar.search-open { margin-bottom: 57px; }
.entry-type-select { display: flex; height: 49px; flex: 1; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid #d8d4cf; border-radius: 12px; }
.entry-type-select img { width: 24px; height: 24px; object-fit: contain; }
.entry-type-select select { width: 100%; border: 0; appearance: auto; background: transparent; color: var(--ink); font: 16px Avenir Next, Avenir, sans-serif; outline: 0; }
.toolbar-actions { display: flex; gap: 10px; }
.toolbar-actions button { display: grid; width: 49px; height: 49px; place-items: center; padding: 0; border: 1px solid #d8d4cf; border-radius: 12px; background: transparent; cursor: pointer; }
.toolbar-actions img { width: 100%; height: 100%; object-fit: contain; }
.entry-search { position: absolute; z-index: 2; top: calc(100% + 8px); right: 22px; left: 22px; height: 48px; padding: 0 15px; border: 1px solid #24558b; border-radius: 12px; background: white; color: var(--ink); font: 16px Avenir Next, Avenir, sans-serif; box-shadow: 0 6px 18px rgb(35 46 57 / 15%); outline: none; }
.reflection-timeline { padding: 14px 16px 0; }
.timeline-heading { margin: 0 0 13px 4px; color: #6f7071; font-size: 16px; font-weight: 500; }
.reflection-entry { display: grid; width: 100%; grid-template-columns: 62px 78px 1fr 20px; align-items: start; padding: 20px 14px; border: 0; border-bottom: 1px solid #eee8e2; background: transparent; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.reflection-entry:first-of-type { border-top: 1px solid #eee8e2; border-radius: 15px 15px 0 0; }
.entry-date { display: flex; min-height: 103px; flex-direction: column; align-items: center; justify-content: flex-start; border-right: 1px solid #e4ded8; font-size: 13px; line-height: 1.35; }
.entry-date strong { font-size: 28px; font-weight: 400; line-height: 1.05; }
.entry-art { width: 70px; height: 70px; object-fit: contain; }
.entry-copy { min-width: 0; }
.entry-meta { display: flex; gap: 12px; margin-bottom: 9px; color: #747477; font-size: 13px; }
.entry-meta strong { color: var(--entry-color); font-weight: 600; }
.entry-preview { display: -webkit-box; overflow: hidden; margin: 0; font: 18px/1.3 Georgia, Times New Roman, serif; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.entry-more { margin: 15px 0 0; color: #707173; font-size: 14px; }
.reflection-entry.expanded .entry-preview { display: block; overflow: visible; }
.reflection-entry.expanded .entry-more { color: #24558b; }
.entry-chevron { width: 18px; height: 24px; align-self: center; object-fit: contain; }
.reflection-empty { padding: 65px 25px; color: #717275; text-align: center; }
.reflection-empty img { width: 85px; height: 85px; object-fit: contain; opacity: .75; }
.reflection-archive { padding: 14px 16px 90px; }
.archive-row { margin: 10px 0; border: 1px solid #eee5dd; border-radius: 13px; }
.archive-row summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 17px; cursor: pointer; list-style: none; }
.archive-row summary::-webkit-details-marker { display: none; }
.archive-row summary::after { content: "⌄"; color: #65676a; font-size: 21px; }
.archive-row[open] summary::after { transform: rotate(180deg); }
.archive-count { margin-left: auto; margin-right: 15px; color: #737476; font-size: 14px; }
.archive-entries .reflection-entry { grid-template-columns: 55px 65px 1fr 18px; padding-inline: 10px; }
.archive-entries .entry-art { width: 58px; height: 58px; }
.add-reflection { position: absolute; z-index: 3; right: 28px; bottom: 83px; width: 70px; height: 70px; padding: 0; border: 0; border-radius: 50%; background: #24558b; box-shadow: 0 7px 14px rgb(33 63 99 / 28%); cursor: pointer; }
.add-reflection img { width: 100%; height: 100%; object-fit: contain; }
.reflection-composer { width: min(92vw, 420px); border: 0; border-radius: 20px; box-shadow: 0 18px 50px rgb(0 0 0 / 23%); }
.reflection-composer::backdrop { background: rgb(23 22 21 / 38%); }
.reflection-composer form { position: relative; display: flex; flex-direction: column; padding: 28px; }
.composer-close { position: absolute; top: 13px; right: 16px; border: 0; background: transparent; color: #555; font-size: 28px; cursor: pointer; }
.composer-art { width: 65px; height: 65px; margin: 0 auto 8px; object-fit: contain; }
.reflection-composer h2 { margin: 0 0 20px; text-align: center; font: 400 29px Georgia, Times New Roman, serif; }
.composer-date { margin: -12px 0 20px; color: #737476; font-size: 13px; text-align: center; }
.reflection-composer label { margin-bottom: 8px; font-size: 15px; }
.reflection-composer textarea { width: 100%; margin-bottom: 20px; padding: 12px; border: 1px solid #d7d0c9; border-radius: 10px; color: var(--ink); font: 16px/1.45 Avenir Next, Avenir, sans-serif; resize: vertical; outline-color: #24558b; }

@media (max-width: 540px) { .reflections-screen { min-height: 100vh; box-shadow: none; } }
@media (max-width: 410px) {
  .reflections-toolbar { padding-inline: 16px; }
  .entry-type-select { padding-inline: 10px; }
  .reflection-timeline, .reflection-archive { padding-inline: 10px; }
  .reflection-entry { grid-template-columns: 57px 65px 1fr 16px; padding-inline: 10px; }
  .entry-art { width: 60px; height: 60px; }
  .entry-preview { font-size: 16px; }
}

/* My KATA reader (S09) */
.kata-library-screen { width: min(100%, 500px); min-height: min(100vh - 48px, 1000px); display: flex; flex-direction: column; background: radial-gradient(circle at 50% 35%, #fff 0%, var(--paper) 68%, #f8f4ee 100%); box-shadow: 0 16px 40px rgb(57 41 27 / 12%); }
.kata-library-header { padding-bottom: 35px; }
.kata-library-rule { display: block; width: 64px; height: 3px; margin: 27px auto 0; background: #bf461f; }
.kata-reader { display: flex; flex: 1; flex-direction: column; padding: 0 18px 25px; }
.kata-reader-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 14px; }
.kata-page-jump { display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: #5f6063; font-size: 14px; font-weight: 600; white-space: nowrap; }
.kata-page-jump input { width: 38px; height: 29px; padding: 2px 0; border: 0; border-bottom: 1px solid #77736f; border-radius: 0; background: transparent; color: var(--ink); font: inherit; text-align: center; outline: none; }
.kata-page-jump input:focus { border-bottom: 2px solid #bf461f; }
.kata-page-jump input[aria-invalid="true"] { border-color: #a63922; }
.kata-page-jump input:disabled { opacity: .5; }
.kata-page-error { min-height: 18px; margin: -9px 0 8px; color: #a63922; font-size: 12px; text-align: center; }
.kata-page-error[hidden] { display: none; }
.kata-reader-actions { display: flex; min-width: 0; align-items: center; justify-content: end; gap: 7px; }
.kata-page-button { display: inline-flex; min-width: 0; min-height: 40px; align-items: center; justify-content: center; gap: 5px; padding: 8px 10px; border: 1px solid #dfd5cc; border-radius: 10px; background: #fffdfb; color: #4d4d4e; font: 600 14px Avenir Next, Avenir, sans-serif; cursor: pointer; }
.kata-page-button:last-child { justify-self: end; }
.kata-page-button:hover:not(:disabled) { background: #f8f2ec; }
.kata-page-button:focus-visible, .kata-notes-button:focus-visible, .kata-note-dialog button:focus-visible { outline: 3px solid #24558b; outline-offset: 2px; }
.kata-page-button:disabled { cursor: not-allowed; opacity: .42; }
.kata-notes-button { display: inline-flex; min-height: 40px; align-items: center; gap: 6px; padding: 8px 9px; border: 1px solid #dfd5cc; border-radius: 10px; background: #fffdfb; color: #4d4d4e; font: 600 14px Avenir Next, Avenir, sans-serif; cursor: pointer; }
.kata-notes-button:hover:not(:disabled) { background: #f8f2ec; }
.kata-notes-button:disabled { cursor: not-allowed; opacity: .42; }
.kata-note-dot { width: 7px; height: 7px; border-radius: 50%; background: #bf461f; }
.kata-page-stage { display: grid; min-height: 300px; place-items: center; overflow: hidden; border: 1px solid #e8e0d8; border-radius: 16px; background: #f5f1ec; box-shadow: 0 8px 18px rgb(74 56 43 / 8%); }
.kata-page-stage canvas { display: block; max-width: 100%; height: auto; background: #fff; box-shadow: 0 2px 7px rgb(0 0 0 / 12%); }
.kata-reader-status { max-width: 280px; margin: 0; padding: 25px; color: #67686b; font-size: 16px; line-height: 1.5; text-align: center; }
.kata-reader-help { margin: 17px 0 15px; color: #767678; font-size: 13px; line-height: 1.45; text-align: center; }
.kata-note-dialog { width: min(92vw, 420px); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 18px 50px rgb(0 0 0 / 23%); }
.kata-note-dialog::backdrop { background: rgb(23 22 21 / 38%); }
.kata-note-dialog section { position: relative; padding: 30px 26px 24px; }
.kata-note-close { position: absolute; top: 10px; right: 15px; border: 0; background: transparent; color: #555; font-size: 29px; cursor: pointer; }
.kata-note-eyebrow { margin: 0 0 8px; color: #bf461f; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.kata-note-dialog h2 { margin: 0 0 19px; font: 400 30px/1.1 Georgia, Times New Roman, serif; }
.kata-note-dialog textarea { width: 100%; min-height: 175px; padding: 12px; border: 1px solid #d7d0c9; border-radius: 10px; color: var(--ink); font: 16px/1.45 Avenir Next, Avenir, sans-serif; resize: vertical; outline-color: #24558b; }
.kata-note-status { min-height: 19px; margin: 8px 0 0; color: #5f6063; font-size: 13px; }
.kata-note-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 15px; }
.kata-note-actions button { min-height: 43px; padding: 8px 15px; border-radius: 10px; font: 600 15px Avenir Next, Avenir, sans-serif; cursor: pointer; }
.kata-note-clear { border: 1px solid #d7d0c9; background: transparent; color: #5f6063; }
.kata-note-done { border: 0; background: #bf461f; color: #fff; }
.kata-active { color: #bf461f; }
.kata-active::before { background: #bf461f; }
@media (max-width: 540px) { .kata-library-screen { min-height: 100vh; box-shadow: none; } }

/* Narrow mobile viewport fit */
@media (max-width: 360px) {
  .journey-header, .reflection-header { grid-template-columns: 36px minmax(0, 1fr) 36px; padding-inline: 16px; }
  .journey-header h1, .reflection-header h1 { overflow-wrap: anywhere; }
  .pin-introduction, .pin-form, .enter-pin-form, .forgot-pin-form { padding-inline: 22px; }
  .pin-introduction { margin-inline: 0; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; }
  .pin-info-icon { width: 39px; height: 39px; font-size: 22px; }
  .pin-inputs, .enter-pin-inputs { gap: 8px; }
  .pin-inputs input { min-height: 58px; font-size: 31px; }
  .enter-pin-inputs input { min-height: 74px; }
  .reset-progress { margin-inline: 16px; gap: 3px; }
  .reset-progress li { gap: 7px; font-size: 11px; }
  .reset-progress strong { font-size: 11px; }
  .reset-progress li:not(:last-child)::after { left: calc(50% + 19px); width: calc(100% - 25px); }
  .verify-notice { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 16px; }
  .verify-notice .pin-info-icon { width: 34px; height: 34px; font-size: 20px; }
  .flow-summary, .guidance-content, .index-summary { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .level-badge { position: static; justify-self: center; margin-bottom: 10px; }
  .nav-link { min-height: 94px; gap: 6px; font-size: 11px; }
  .nav-icon-image { width: 40px; height: 31px; }
  .kata-page-button span { display: none; }
  .kata-reader-toolbar { gap: 5px; }
  .kata-reader-actions { gap: 4px; }
  .kata-page-button, .kata-notes-button { padding-inline: 8px; }
}
