:root {
  color-scheme: light;
  --school-cyan: #00bef2;
  --school-pink: #cd0068;
  --school-yellow: #ffcc00;
  --school-green: #4db400;
  --bg: #f3fbfd;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #cde9f1;
  --accent: var(--school-cyan);
  --accent-dark: #007fa3;
  --action: var(--school-pink);
  --success: var(--school-green);
  --warning: #fff4bf;
  --soft: #e9f9fd;
  --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Calibri Light", Calibri, "Aptos", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--ink);
}

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

button {
  border: 0;
  border-radius: var(--radius);
  background: var(--action);
  color: white;
  min-height: 42px;
  padding: 0 14px;
  font-weight: 600;
}

button.secondary {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 14px) 14px calc(env(safe-area-inset-bottom) + 14px);
}

body.locked .app-shell {
  filter: blur(10px);
  pointer-events: none;
  user-select: none;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(90deg, var(--school-cyan) 0 25%, var(--school-pink) 25% 50%, var(--school-yellow) 50% 75%, var(--school-green) 75% 100%) top/100% 10px no-repeat,
    var(--bg);
}

.login-screen.hidden {
  display: none;
}

.login-card {
  width: min(100%, 360px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.12);
}

.login-card .assistant-mark {
  margin-bottom: 14px;
}

.assistant-mark.large {
  width: 56px;
  height: 56px;
  font-size: 24px;
}

.login-card p {
  color: var(--muted);
  margin: 6px 0 18px;
}

.login-card form {
  display: grid;
  gap: 10px;
}

.login-card input {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  min-height: 46px;
}

.login-error {
  min-height: 18px;
  margin-top: 10px;
  color: var(--school-pink);
  font-size: 13px;
  font-weight: 700;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--school-cyan), var(--school-pink), var(--school-yellow), var(--school-green)) 1;
  padding-bottom: 12px;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin: 0;
}

h1 {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
  font-weight: 300;
}

h3 {
  font-size: 16px;
  font-weight: 400;
}

.icon-button {
  width: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 24px;
  background: var(--school-pink);
}

.update-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 3px 0 var(--school-pink);
}

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

.update-panel strong {
  display: block;
  margin-top: 2px;
}

.update-panel p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.today-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.summary-tile {
  min-height: auto;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: inset 0 3px 0 var(--school-cyan);
}

.summary-tile:nth-child(2) {
  box-shadow: inset 0 3px 0 var(--school-yellow);
}

.summary-tile:nth-child(3) {
  box-shadow: inset 0 3px 0 var(--school-green);
}

.today-strip span,
.card-meta,
.section-heading p,
.plan-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.today-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.tabs {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  position: sticky;
  top: env(safe-area-inset-top);
  z-index: 2;
  padding: 6px 0 12px;
  background: var(--bg);
}

.tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 6px;
  min-width: 82px;
  background: #ffffff;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 13px;
}

.tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--school-pink);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.view {
  display: none;
  padding-bottom: 88px;
}

.view.active {
  display: block;
}

.assistant-card,
.request-card,
.approval-card,
.task-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.request-card.work-event {
  border-left: 4px solid var(--school-green);
}

.request-card.personal-event {
  border-left: 4px solid var(--school-pink);
}

.approval-card {
  border-left: 4px solid var(--school-yellow);
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply-builder,
.plan-goal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--school-cyan);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
}

.reply-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}

.reply-controls select,
.reply-builder textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  font: inherit;
  background: #ffffff;
}

.reply-builder textarea {
  width: 100%;
  resize: vertical;
}

.plan-goal-card {
  border-left-color: var(--school-pink);
}

.plan-goal-card p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.plan-goal-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  line-height: 1.4;
}

.assistant-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.assistant-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--school-cyan), var(--school-green));
  color: white;
  font-weight: 900;
}

.assistant-card p,
.request-card p,
.approval-card p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.morning-card {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.calendar-page {
  background: #fffdf7;
  border: 1px solid #efe7d4;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.08);
}

.calendar-quote {
  font-size: 25px;
  line-height: 1.08;
  font-weight: 600;
  color: #1d1d1d;
  text-align: center;
}

.calendar-quote::after {
  content: "";
  display: block;
  width: 92px;
  height: 3px;
  margin: 8px auto 0;
  background: var(--school-cyan);
  border-radius: 99px;
}

.calendar-sketch {
  position: relative;
  min-height: 145px;
  margin: 8px 0 4px;
}

.sketch-board {
  position: absolute;
  left: 12px;
  top: 26px;
  width: 42%;
  height: 96px;
  border: 3px solid #202020;
  background: #fffdf7;
  padding: 18px 10px 0;
}

.sketch-board span {
  display: block;
  height: 4px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--school-cyan) 0 60%, #202020 60% 100%);
}

.sketch-person {
  position: absolute;
  left: 44%;
  top: 26px;
  width: 92px;
  height: 118px;
}

.sketch-person::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 0;
  width: 42px;
  height: 50px;
  border: 3px solid #202020;
  border-radius: 50%;
  background: #fffdf7;
}

.sketch-person::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 52px;
  width: 70px;
  height: 68px;
  background: var(--school-cyan);
  border: 3px solid #202020;
  border-radius: 45% 45% 8px 8px;
  transform: skew(-8deg);
}

.sketch-books {
  position: absolute;
  right: 14px;
  top: 20px;
  width: 50px;
  height: 116px;
  border: 3px solid #202020;
  background:
    linear-gradient(90deg, transparent 0 18%, #202020 18% 24%, transparent 24% 48%, #202020 48% 54%, transparent 54%),
    linear-gradient(180deg, transparent 0 30%, #202020 30% 34%, transparent 34% 63%, #202020 63% 67%, transparent 67%);
}

.calendar-footer {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding-top: 10px;
  border-top: 8px solid;
  border-image: linear-gradient(90deg, var(--school-cyan), var(--school-pink), var(--school-yellow), var(--school-green)) 1;
}

.calendar-footer strong {
  font-size: 52px;
  line-height: 0.9;
  font-weight: 600;
}

.calendar-footer span,
.calendar-footer b {
  display: block;
  color: var(--ink);
}

.calendar-footer span {
  font-size: 18px;
}

.calendar-footer b {
  margin-top: 3px;
  font-size: 14px;
  text-transform: uppercase;
}

.morning-details {
  display: grid;
  gap: 8px;
}

.morning-details article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--school-yellow);
  border-radius: var(--radius);
  padding: 12px;
}

.morning-details article:first-child {
  border-left-color: var(--school-pink);
}

.morning-details span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-dark);
  font-weight: 600;
}

.morning-details p,
.morning-details li {
  line-height: 1.4;
}

.morning-details ol {
  margin: 0;
  padding-left: 20px;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 90%;
  padding: 12px;
  border-radius: var(--radius);
}

.bubble span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.bubble.assistant {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--school-cyan);
}

.bubble.user {
  align-self: flex-end;
  background: var(--school-pink);
  color: white;
}

.bubble.clickable {
  cursor: pointer;
  border-color: rgba(0, 190, 242, 0.55);
  box-shadow: 0 10px 22px rgba(0, 190, 242, 0.14);
}

.bubble.clickable:focus-visible {
  outline: 3px solid rgba(255, 204, 0, 0.7);
  outline-offset: 2px;
}

.bubble-action {
  margin-top: 10px;
  width: 100%;
  min-height: 36px;
  background: var(--school-cyan);
  color: white;
}

.composer {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 8px;
  padding: 10px 14px calc(env(safe-area-inset-bottom) + 10px);
  background: rgba(243, 251, 253, 0.96);
  border-top: 1px solid var(--line);
}

.composer input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  min-height: 42px;
}

.voice-button {
  padding: 0;
  background: var(--school-green);
}

.voice-button.listening {
  background: var(--school-pink);
  box-shadow: 0 0 0 4px rgba(205, 0, 104, 0.16);
}

.section-heading {
  margin: 8px 0 12px;
}

.draft {
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--accent-dark);
  line-height: 1.4;
}

.date-switcher {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px auto;
  gap: 8px;
  margin: 0 0 12px;
}

.date-switcher input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  min-height: 42px;
  font: inherit;
  background: var(--surface);
}

.date-switcher button {
  min-height: 42px;
  padding: 0 12px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.segmented button {
  min-height: 36px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
}

.segmented button.active {
  background: var(--school-green);
  color: white;
  border-color: var(--school-green);
}

.block-assistant {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 12px 0;
}

.block-assistant input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  min-height: 42px;
}

.source-form {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 4px 0 0 var(--school-yellow);
}

.source-form input,
.source-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

.project-card,
.source-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.project-card {
  box-shadow: inset 4px 0 0 var(--school-green);
}

.source-card {
  box-shadow: inset 4px 0 0 var(--school-yellow);
}

.project-card h3,
.source-card h3 {
  margin: 6px 0;
  font-size: 18px;
  font-weight: 600;
}

.source-card a,
.project-card a {
  color: var(--accent-dark);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.project-card p,
.source-card p {
  color: var(--muted);
  line-height: 1.4;
}

.project-columns {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.project-columns strong {
  display: block;
  margin-bottom: 6px;
}

.project-columns ul {
  margin: 0;
  padding-left: 18px;
}

.project-columns li {
  margin: 5px 0;
  line-height: 1.35;
}

.block-response {
  margin: 10px 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--school-cyan);
  border-radius: var(--radius);
  background: var(--surface);
  white-space: pre-line;
}

.block-response:empty,
.block-response[hidden] {
  display: none;
}

.block-response span {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.block-response p {
  margin: 0;
  line-height: 1.45;
}

.block-response.clickable {
  cursor: pointer;
}

.block-link {
  width: 100%;
  margin-top: 10px;
  background: var(--school-cyan);
}

.actions,
.bottom-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.actions button,
.bottom-actions button {
  flex: 1;
}

.log-toolbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.log-toolbar button {
  min-height: 36px;
  padding: 0 8px;
  font-size: 12px;
}

.log-toolbar button.active {
  background: var(--school-cyan);
  color: white;
  border-color: var(--school-cyan);
}

.log-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--school-cyan);
  border-radius: var(--radius);
  padding: 12px;
}

.log-card.executed {
  border-left-color: var(--school-green);
}

.log-card.rejected {
  border-left-color: #98a2b3;
  opacity: 0.86;
}

.log-card.proposed {
  border-left-color: var(--school-yellow);
}

.log-card p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.danger-lite {
  width: 100%;
  margin-top: 12px;
  color: var(--school-pink);
  border-color: rgba(205, 0, 104, 0.28);
}

.plan-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eisenhower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.matrix-card {
  min-height: 150px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.matrix-card h3 {
  font-size: 14px;
  font-weight: 700;
}

.matrix-card p {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.matrix-card ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.35;
  font-size: 13px;
}

.matrix-red { border-left: 4px solid var(--school-pink); }
.matrix-yellow { border-left: 4px solid var(--school-yellow); }
.matrix-blue { border-left: 4px solid var(--school-cyan); }
.matrix-green { border-left: 4px solid var(--school-green); }
.muted-item { color: var(--muted); }

.plan-list li {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.plan-item.event { border-left: 4px solid var(--school-green); }
.plan-item.deep { border-left: 4px solid var(--school-pink); }
.plan-item.task { border-left: 4px solid var(--school-cyan); }
.plan-item.inbox { border-left: 4px solid var(--school-yellow); }
.plan-item.postpone {
  border-left: 4px solid #98a2b3;
  background: #f8fafc;
}
.plan-item.delegate {
  border-left: 4px solid var(--school-cyan);
  background: #f3fbfd;
}
.plan-item.buffer {
  border-left: 4px solid var(--school-yellow);
  background: #fffdf0;
}

.plan-list time {
  color: var(--school-pink);
  font-weight: 600;
}

.plan-item.postpone time,
.plan-item.delegate time,
.plan-item.buffer time {
  color: var(--muted);
  font-size: 12px;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.quick-grid button {
  min-height: 56px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: inset 0 3px 0 var(--school-yellow);
}

.task-row {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid #eaecf0;
  font-size: 13px;
}

.task-row:first-child {
  border-top: 0;
}

.task-row.head {
  color: var(--muted);
  font-weight: 600;
}

.month-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 12px;
}

.month-title {
  grid-column: 1 / -1;
  font-size: 24px;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}

.month-weekday {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.month-cell {
  min-height: 70px;
  padding: 5px 3px;
  background: #fbfdff;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 6px;
  text-align: left;
  overflow: hidden;
}

.month-cell.empty {
  background: transparent;
}

.month-cell.selected {
  border-color: var(--school-cyan);
  box-shadow: inset 0 0 0 2px rgba(0, 190, 242, 0.16);
}

.month-cell strong {
  display: block;
  text-align: center;
  margin-bottom: 4px;
}

.month-cell span,
.week-event {
  display: block;
  border-radius: 5px;
  padding: 2px 4px;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-day-list,
.week-day-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.week-day-card h3,
.selected-day-list h3 {
  margin-bottom: 8px;
}

.week-event {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  font-size: 14px;
  white-space: normal;
}

.week-event span {
  color: var(--accent-dark);
  font-size: 12px;
}

.timeline-event {
  position: relative;
}

.event-pink { background: rgba(205, 0, 104, 0.14); }
.event-yellow { background: rgba(255, 204, 0, 0.22); }
.event-blue { background: rgba(0, 190, 242, 0.16); }
.event-green { background: rgba(77, 180, 0, 0.14); }

.health-grid {
  display: grid;
  gap: 12px;
}

.health-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.soft-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.habit-list,
.ascetic-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.habit-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: var(--soft);
  border-radius: var(--radius);
}

.habit-item.compact {
  grid-template-columns: 24px 1fr;
}

.habit-title-input,
.ascetic-title-input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 38px;
  padding: 0 10px;
  background: #ffffff;
  font: inherit;
}

.habit-item input[type="checkbox"],
.week-event input {
  width: 18px;
  height: 18px;
}

.habit-item b {
  color: var(--school-green);
}

.ascetic-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ascetic-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.ascetic-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ascetic-dates input,
.fasting-controls select,
.water-goal input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 38px;
  padding: 0 8px;
  background: var(--surface);
}

.ascetic-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.ascetic-day {
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.ascetic-day.done {
  background: var(--school-green);
  color: white;
  border-color: var(--school-green);
}

.ascetic-day.today {
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.45);
}

.fasting-controls {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin: 10px 0;
}

.fasting-timer {
  padding: 12px;
  background: var(--soft);
  border-radius: var(--radius);
  color: var(--accent-dark);
  font-weight: 600;
}

.water-card {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  align-items: center;
}

.water-card p {
  margin-top: 6px;
  color: var(--muted);
}

.water-ring {
  --water-percent: 0%;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(var(--school-cyan) 0 var(--water-percent), #e8f2f5 var(--water-percent) 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 190, 242, 0.25), 0 12px 28px rgba(0, 190, 242, 0.16);
}

.water-ring-inner {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background: #ffffff;
  border: 1px solid var(--line);
}

.water-ring-inner strong {
  font-size: 25px;
}

.water-ring-inner span {
  margin-top: -4px;
  color: var(--muted);
  font-size: 12px;
}

.water-goal {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
}

.water-buttons {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.water-buttons button {
  padding: 0 6px;
}

.coach-card {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.coach-card p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.coach-composer {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
}

.coach-composer textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}

.coach-composer button[type="submit"] {
  grid-column: 1 / -1;
}

.coach-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 10px;
}

.coach-history-head button {
  min-height: 36px;
}

.coach-history-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--school-green);
  border-radius: var(--radius);
  padding: 12px;
}

.coach-history-card summary {
  cursor: pointer;
  list-style: none;
}

.coach-history-card summary::-webkit-details-marker {
  display: none;
}

.coach-history-card summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.coach-history-card summary strong {
  display: block;
  line-height: 1.3;
}

.coach-history-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.coach-history-body h4 {
  margin: 10px 0 4px;
  font-size: 13px;
  color: var(--accent-dark);
}

.coach-history-body p {
  white-space: pre-line;
  color: var(--ink);
  line-height: 1.45;
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 14px;
  line-height: 1.4;
}

@media (max-width: 380px) {
  .tab { font-size: 12px; }
  .composer { grid-template-columns: 42px 1fr; }
  .composer button[type="submit"] { grid-column: 1 / -1; }
  .date-switcher { grid-template-columns: 42px 1fr 42px; }
  .date-switcher .secondary { grid-column: 1 / -1; }
  .block-assistant { grid-template-columns: 1fr; }
  .eisenhower-grid { grid-template-columns: 1fr; }
  .water-card { grid-template-columns: 1fr; }
  .water-ring { margin: 0 auto; }
  .water-buttons { grid-template-columns: repeat(2, 1fr); }
  .coach-composer { grid-template-columns: 1fr; }
}
