:root {
  --paper: #f8f6ef;
  --surface: #ffffff;
  --surface-soft: #edf6f0;
  --mint: #74b89b;
  --mint-dark: #286a5a;
  --sun: #ecb66d;
  --sun-soft: #fff1d9;
  --coral: #dc806f;
  --sky: #7aaed0;
  --ink: #20352e;
  --muted: #6c7974;
  --line: #dce7df;
  --danger: #a8473f;
  --shadow: 0 24px 70px rgba(39, 66, 58, 0.16);
  --soft-shadow: 0 14px 34px rgba(39, 66, 58, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(115deg, rgba(236, 182, 109, 0.18) 0%, transparent 28%),
    linear-gradient(145deg, transparent 0%, rgba(122, 174, 208, 0.18) 52%, transparent 82%),
    repeating-linear-gradient(90deg, rgba(32, 53, 46, 0.025) 0 1px, transparent 1px 84px),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.is-hidden {
  display: none !important;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 480px) minmax(420px, 720px);
  align-items: stretch;
  justify-content: center;
  gap: 24px;
  padding: 32px;
}

.auth-card,
.auth-visual {
  border: 1px solid rgba(223, 232, 227, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-card {
  align-self: center;
  padding: 28px;
}

.auth-brand {
  margin-bottom: 28px;
}

.auth-copy h1 {
  margin: 0 0 10px;
  font-size: 38px;
  line-height: 1.15;
}

.auth-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin: 24px 0 18px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.auth-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.auth-switch button.selected {
  color: var(--mint-dark);
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(39, 66, 58, 0.08);
}

.auth-links {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.auth-links a {
  color: var(--mint-dark);
  font-weight: 760;
  text-decoration: none;
}

.policy-page {
  grid-template-columns: minmax(360px, 760px);
}

.policy-page h1 {
  margin: 0 0 14px;
}

.policy-page .auth-card {
  align-self: start;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  min-height: 620px;
}

.auth-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.88) brightness(1.04);
}

.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 32%, rgba(32, 53, 46, 0.62)),
    linear-gradient(90deg, rgba(255, 241, 217, 0.35), transparent 60%);
}

.auth-visual div {
  position: absolute;
  z-index: 1;
  left: 32px;
  right: 32px;
  bottom: 28px;
  color: #fff;
}

.auth-visual .eyebrow {
  color: #fff1d9;
}

.auth-visual h2 {
  max-width: 560px;
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.16;
}

.auth-visual p {
  max-width: 580px;
  margin: 0;
  line-height: 1.7;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1280px);
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  padding: 24px;
}

.rail {
  position: sticky;
  top: 24px;
  align-self: start;
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(223, 232, 227, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--mint-dark), var(--sky));
  font-weight: 850;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 18px;
}

.brand-copy span {
  color: var(--muted);
  font-size: 12px;
}

.rail-button {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  padding: 4px 8px 4px 4px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.rail-button.active {
  color: var(--mint-dark);
  background: var(--surface-soft);
}

.icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  font-weight: 800;
}

.nav-label {
  font-size: 14px;
  font-weight: 760;
}

.rail-note,
.user-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.rail-note {
  margin-top: auto;
  background: linear-gradient(160deg, var(--sun-soft), rgba(255, 255, 255, 0.86));
}

.rail-note span,
.user-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.rail-note strong {
  display: block;
  margin-top: 5px;
  color: var(--mint-dark);
  font-size: 24px;
}

.rail-note p,
.user-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.user-card {
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
  min-width: 0;
}

.workbench {
  position: relative;
  min-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid rgba(223, 232, 227, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.84), rgba(255, 255, 255, 0.9) 31%),
    rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.topbar {
  min-height: 126px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 30px 32px 22px;
  background:
    linear-gradient(120deg, rgba(255, 241, 217, 0.85), rgba(237, 246, 240, 0.64)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 760;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.2;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 23px;
  line-height: 1.22;
  letter-spacing: 0;
}

.ghost-button,
.back-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  padding: 9px 12px;
  box-shadow: 0 8px 18px rgba(39, 66, 58, 0.06);
}

.mobile-tabs {
  display: none;
}

.screen {
  display: none;
  padding: 0 32px 32px;
}

.screen.active {
  display: block;
}

#screen-today.screen.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  grid-template-areas:
    "brief status"
    "tasks hero";
  gap: 18px;
  align-items: stretch;
}

.screen:not(#screen-today).active {
  max-width: 980px;
}

.morning-panel {
  grid-area: hero;
  position: relative;
  min-height: 360px;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: var(--soft-shadow);
}

.morning-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(32, 53, 46, 0.26)),
    linear-gradient(90deg, rgba(255, 241, 217, 0.52), transparent 58%);
  pointer-events: none;
}

.study-photo {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: block;
  object-fit: cover;
  filter: saturate(0.9) brightness(1.06);
}

.morning-copy {
  z-index: 1;
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(32, 53, 46, 0.12);
  backdrop-filter: blur(14px);
}

.morning-copy p {
  margin: 0 0 4px;
}

.gentle-brief {
  grid-area: brief;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: stretch;
}

.brief-time,
.brief-copy {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(39, 66, 58, 0.07);
}

.brief-time {
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
  background: linear-gradient(160deg, var(--sun-soft), rgba(255, 255, 255, 0.9));
}

.brief-time span,
.brief-copy p,
.timeline-row p,
.muted {
  color: var(--muted);
}

.brief-time strong {
  color: var(--mint-dark);
  font-size: 22px;
}

.brief-copy {
  padding: 13px 14px;
}

.brief-copy p {
  margin: 5px 0 0;
  line-height: 1.5;
  font-size: 13px;
}

.status-strip,
.report-grid {
  grid-area: status;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.status-strip div,
.report-grid div {
  background: rgba(255, 255, 255, 0.86);
  padding: 13px 10px;
}

.status-strip span,
.report-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.status-strip strong,
.report-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
}

.task-list {
  grid-area: tasks;
  display: grid;
  gap: 13px;
}

.task-card,
.empty-state,
.form-panel,
.plan-summary,
.goal-manager,
.submit-panel,
.review-panel,
.remedial-panel,
.report-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82)),
    var(--surface);
  box-shadow: var(--soft-shadow);
}

.task-card {
  padding: 15px 15px 15px 13px;
  background:
    linear-gradient(90deg, rgba(237, 246, 240, 0.68), transparent 38%),
    rgba(255, 255, 255, 0.9);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: rgba(116, 184, 155, 0.62);
  box-shadow: 0 16px 32px rgba(39, 66, 58, 0.12);
}

.task-card.done {
  background:
    linear-gradient(90deg, rgba(237, 246, 240, 0.92), transparent 55%),
    rgba(255, 255, 255, 0.92);
}

.task-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: flex-start;
}

.task-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--mint-dark);
  background: linear-gradient(160deg, var(--sun-soft), var(--surface-soft));
  font-size: 13px;
  font-weight: 900;
}

.task-head h3 {
  margin: 0 0 6px;
  font-size: 17px;
  letter-spacing: 0;
}

.task-card p,
.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--mint-dark);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.status-uncertain {
  color: #7a5a20;
  background: var(--sun-soft);
}

.status-failed {
  color: var(--danger);
  background: #fde9e5;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0 46px;
}

.task-submit-button {
  min-height: 44px;
  min-width: 96px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #286a5a, #3f9278);
  box-shadow: 0 12px 24px rgba(40, 106, 90, 0.24);
  font-weight: 850;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.task-submit-button:hover {
  filter: brightness(1.04);
  box-shadow: 0 16px 30px rgba(40, 106, 90, 0.3);
}

.duration-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(236, 182, 109, 0.46);
  border-radius: 8px;
  padding: 0 12px;
  color: #7a5a20;
  background: linear-gradient(160deg, var(--sun-soft), rgba(255, 255, 255, 0.82));
  font-size: 12px;
  font-weight: 760;
}

.duration-chip span {
  color: rgba(122, 90, 32, 0.72);
}

.duration-chip strong {
  color: #286a5a;
  font-size: 13px;
}

.secondary-button,
.primary-button,
.danger-button {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 780;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.primary-button {
  width: 100%;
  color: white;
  background: linear-gradient(135deg, var(--mint-dark), #438f78);
  box-shadow: 0 12px 28px rgba(47, 125, 104, 0.22);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.secondary-button {
  color: var(--mint-dark);
  background: linear-gradient(160deg, var(--surface-soft), rgba(255, 255, 255, 0.82));
}

.danger-button {
  color: #9b3025;
  background: #fde9e5;
}

.secondary-button:active,
.primary-button:active,
.danger-button:active,
.ghost-button:active,
.back-button:active,
.tab:active,
.rail-button:active,
.task-submit-button:active {
  transform: translateY(1px);
}

.empty-state {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.empty-state.compact {
  padding: 12px;
  box-shadow: none;
}

.stacked-panel {
  margin-top: 16px;
}

.empty-state .primary-button {
  max-width: 180px;
}

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

.form-panel,
.plan-summary,
.goal-manager,
.submit-panel,
.review-panel,
.remedial-panel,
.report-panel {
  padding: 18px;
}

.goal-manager {
  margin-top: 14px;
}

.goal-manager-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.goal-manager-head h2 {
  margin: 2px 0 0;
  font-size: 21px;
}

.goal-action-message {
  min-height: 20px;
  margin: 0;
  color: var(--mint-dark);
  font-size: 13px;
  font-weight: 760;
  text-align: right;
}

.goal-action-message.is-error {
  color: var(--danger);
}

.goal-list-block {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.goal-list-block > strong {
  color: var(--muted);
  font-size: 13px;
}

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

.goal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.goal-row.selected {
  border-color: rgba(116, 184, 155, 0.72);
  background: linear-gradient(90deg, rgba(237, 246, 240, 0.9), rgba(255, 255, 255, 0.86));
}

.goal-row.archived {
  background: rgba(248, 248, 244, 0.78);
}

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

.goal-copy strong,
.goal-copy span {
  display: block;
}

.goal-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.goal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  padding: 10px 12px;
  box-shadow: inset 0 1px 2px rgba(39, 66, 58, 0.04);
}

textarea {
  min-height: 106px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(116, 184, 155, 0.32);
  border-color: var(--mint);
}

.form-error {
  min-height: 20px;
  margin: 0 0 12px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  margin: 12px 0 16px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.segmented button.selected {
  color: var(--mint-dark);
  background: var(--surface);
  font-weight: 760;
}

.timeline {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(39, 66, 58, 0.07);
}

.timeline-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid var(--line);
}

.timeline-row:last-child {
  border-bottom: 0;
}

.day {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--mint-dark);
  background: var(--surface-soft);
  font-weight: 850;
}

.timeline-row p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.muted {
  line-height: 1.6;
}

.upload-zone {
  min-height: 190px;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--mint);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 241, 217, 0.58), rgba(237, 246, 240, 0.9)),
    var(--surface-soft);
  color: var(--ink);
}

.proof-code {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 2px 0 12px;
  padding: 0 12px;
  border: 1px solid rgba(236, 182, 109, 0.5);
  border-radius: 8px;
  color: #7a5a20;
  background: var(--sun-soft);
  font-size: 13px;
  font-weight: 820;
}

.upload-zone input {
  display: none;
}

.upload-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--mint-dark);
  font-size: 28px;
}

.upload-zone small {
  color: var(--muted);
  font-weight: 520;
}

.upload-progress {
  height: 8px;
  overflow: hidden;
  margin: 12px 0;
  border-radius: 999px;
  background: var(--surface-soft);
}

.upload-progress[aria-hidden="true"] {
  display: none;
}

.upload-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-dark), var(--sun));
  transition: width 180ms ease;
}

.back-button {
  margin-bottom: 16px;
}

.review-panel {
  min-height: 430px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 24%, rgba(236, 182, 109, 0.26), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(237, 246, 240, 0.72));
}

.review-ring {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 8px solid rgba(237, 246, 240, 0.92);
  border-top-color: var(--mint);
  border-radius: 50%;
  color: var(--mint-dark);
  font-weight: 900;
  animation: spin 1.3s linear infinite;
  box-shadow: 0 18px 38px rgba(47, 125, 104, 0.14);
}

.review-ring.complete {
  animation: none;
  border-color: var(--mint);
  background: var(--surface-soft);
}

.review-ring.failed {
  color: var(--danger);
  border-color: #f0b5ad;
  background: #fde9e5;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.review-actions {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.remedial-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, var(--surface-soft), rgba(255, 255, 255, 0.9));
  box-shadow: 0 9px 18px rgba(39, 66, 58, 0.06);
}

.bars {
  height: 132px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 9px;
  margin: 20px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(237, 246, 240, 0.78)),
    rgba(240, 247, 244, 0.7);
}

.bars span {
  display: block;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--sun), var(--mint));
  box-shadow: 0 10px 18px rgba(116, 184, 155, 0.18);
}

.coach-note {
  padding: 14px;
  border: 1px solid rgba(220, 231, 223, 0.72);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(134, 182, 216, 0.18), rgba(255, 241, 217, 0.58));
}

.coach-note p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 16px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.admin-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 760;
}

.admin-tabs button.selected {
  color: var(--mint-dark);
  background: var(--surface);
}

.admin-row {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
}

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

.compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.compact-row strong,
.compact-row span {
  display: block;
}

.compact-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.compact-row .secondary-button {
  width: max-content;
  white-space: nowrap;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.policy-grid.single {
  grid-template-columns: 1fr;
  margin-top: 20px;
}

.policy-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.policy-grid strong {
  display: block;
  color: var(--mint-dark);
}

.policy-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-row strong,
.admin-row span {
  display: block;
}

.admin-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-row p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.companion-board {
  position: sticky;
  top: 24px;
  align-self: start;
  display: grid;
  gap: 14px;
}

.companion-hero,
.companion-card,
.companion-stats {
  border: 1px solid rgba(220, 231, 223, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.companion-hero {
  overflow: hidden;
}

.companion-hero img {
  width: 100%;
  height: 168px;
  display: block;
  object-fit: cover;
  filter: saturate(0.88) brightness(1.06);
}

.companion-hero div,
.companion-card {
  padding: 16px;
}

.companion-hero h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.companion-card strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
}

.companion-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.companion-card.calm {
  background: linear-gradient(145deg, rgba(237, 246, 240, 0.86), rgba(255, 255, 255, 0.78));
}

.soft-label {
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 820;
}

.companion-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
}

.companion-stats div {
  padding: 13px 10px;
  border-right: 1px solid var(--line);
}

.companion-stats div:last-child {
  border-right: 0;
}

.companion-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.companion-stats strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 18px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .companion-board {
    display: none;
  }
}

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-visual {
    min-height: 320px;
  }
}

@media (max-width: 720px) {
  .auth-shell {
    padding: 0;
  }

  .auth-card,
  .auth-visual {
    border-radius: 0;
  }

  .auth-visual {
    display: none;
  }

  .shell {
    display: block;
    padding: 0;
  }

  .workspace {
    display: block;
  }

  .rail {
    display: none;
  }

  .workbench {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .topbar {
    min-height: 116px;
    padding: 24px 22px 16px;
  }

  h1 {
    font-size: 25px;
  }

  .screen {
    padding: 0 22px 92px;
  }

  #screen-today.screen.active {
    display: block;
  }

  .morning-panel {
    min-height: 220px;
    height: auto;
    margin-top: 14px;
  }

  .study-photo {
    height: 220px;
    min-height: 0;
  }

  .gentle-brief {
    grid-template-columns: 108px 1fr;
    margin: 14px 0 16px;
  }

  .status-strip,
  .report-grid {
    margin: 16px 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .task-head {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .task-head .pill {
    grid-column: 2;
    width: fit-content;
  }

  .task-actions {
    margin-left: 0;
  }

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

  .timeline-row .pill {
    grid-column: 2;
    width: fit-content;
  }

  .goal-manager-head,
  .goal-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .goal-action-message {
    text-align: left;
  }

  .goal-actions {
    justify-content: flex-start;
  }

  .mobile-tabs {
    position: fixed;
    z-index: 5;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
  }

  .tab {
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-weight: 760;
  }

  .tab.active {
    color: var(--mint-dark);
    background: var(--surface-soft);
  }
}
