:root {
  color-scheme: light;
  --canvas: #e9f0eb;
  --ink: #152820;
  --muted: #475e52;
  --line: rgba(24, 59, 46, 0.11);
  --green: #183b2e;
  --green-mid: #214638;
  --acid: #d9f078;
  --acid-bright: #e8f68c;
  --white: #fff;
  --glass-bg: rgba(255, 255, 255, 0.68);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.82);
  --glass-shadow:
    0 12px 36px rgba(17, 39, 29, 0.07),
    0 2px 6px rgba(17, 39, 29, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Avenir Next", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--canvas);
  background-image:
    radial-gradient(ellipse 68% 58% at 8% -4%, rgba(142, 200, 166, 0.44) 0%, transparent 62%),
    radial-gradient(ellipse 62% 52% at 94% 4%, rgba(246, 222, 154, 0.46) 0%, transparent 58%),
    radial-gradient(ellipse 75% 55% at 50% 106%, rgba(188, 220, 232, 0.5) 0%, transparent 64%),
    radial-gradient(circle at 28% 55%, rgba(217, 240, 120, 0.14) 0%, transparent 52%);
  background-attachment: fixed;
  min-height: 100dvh;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(33, 70, 56, 0.55);
  outline-offset: 2px;
}

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

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 60px);
}

.skip {
  position: absolute;
  top: -100px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
  z-index: 50;
}

.skip:focus {
  top: 10px;
  left: 10px;
}

/* Sticky Frosted Glass Top Bar */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 4px 24px rgba(17, 39, 29, 0.05),
    inset 0 -1px 0 rgba(24, 59, 46, 0.06);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 18px;
}

.brand {
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 0;
  font-weight: 650;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  background: linear-gradient(135deg, #e8f68c 0%, #c5e86c 100%);
  color: var(--green);
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 4px 12px rgba(24, 59, 46, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-sub {
  font-weight: 600;
}

.top nav {
  display: flex;
  gap: 6px;
  align-items: center;
}

.top nav button,
.sign-out {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 38px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.14s ease;
}

.top nav button:hover,
.sign-out:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(17, 39, 29, 0.05);
}

.top nav [aria-current] {
  background: rgba(24, 59, 46, 0.1);
  border-color: rgba(24, 59, 46, 0.12);
  color: var(--green);
  font-weight: 650;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 1px 4px rgba(17, 39, 29, 0.05);
}

.top nav button:active,
.sign-out:active {
  transform: scale(0.975);
}

/* Main Layout & Chapter Sidebar */
.layout {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 32px;
  padding-top: 26px;
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
}

.sidebar {
  min-width: 0;
}

.book {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 12px 22px;
  border-bottom: 1px solid var(--line);
}

.book svg {
  color: #365c49;
  margin-top: 3px;
  flex-shrink: 0;
}

.book > div {
  display: grid;
  gap: 3px;
}

.book strong {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.book div > span:last-child,
.aside-foot {
  color: var(--muted);
  font-size: 0.875rem;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.book .eyebrow {
  font-size: 0.74rem;
  color: var(--muted);
}

.chapter-nav {
  display: grid;
  gap: 4px;
  margin-top: 16px;
}

.chapter-nav button {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 11px;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 10px 13px;
  min-height: 44px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.chapter-nav svg {
  flex-shrink: 0;
}

.chapter-nav button:hover {
  background: rgba(255, 255, 255, 0.56);
  border-color: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.chapter-nav [aria-current] {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.92);
  color: var(--green);
  font-weight: 650;
  box-shadow:
    0 4px 14px rgba(17, 39, 29, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.chapter-picker {
  display: none;
}

.aside-foot {
  display: flex;
  gap: 10px;
  margin: 20px 12px 0;
  line-height: 1.45;
}

.aside-foot svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Chapter Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 3vw, 36px);
  background: linear-gradient(135deg, #133126 0%, #1d4a39 55%, #275a46 100%);
  color: #f6f8ec;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 18px 44px rgba(15, 38, 28, 0.2),
    0 4px 12px rgba(15, 38, 28, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 18%, rgba(217, 240, 120, 0.22) 0%, transparent 46%),
    radial-gradient(circle at 12% 90%, rgba(120, 200, 158, 0.16) 0%, transparent 50%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero .eyebrow {
  color: #deed9f;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 550;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 9px 0 10px;
}

.hero p:not(.eyebrow) {
  line-height: 1.5;
  color: #e3ece0;
  max-width: 56ch;
}

.reading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.94rem;
}

.reading svg,
.dot {
  color: var(--acid);
}

.hero-icon {
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(232, 246, 140, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 246, 140, 0.28);
  box-shadow:
    0 8px 24px rgba(10, 26, 19, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: var(--acid-bright);
}

.hero-icon svg {
  width: 52px;
  height: 52px;
}

/* Meeting Strip */
.meeting-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 18px;
  overflow: hidden;
}

.meeting-strip > div {
  background: transparent;
  padding: 12px 16px;
}

.meeting-strip > div + div {
  border-left: 1px solid var(--line);
}

.meeting-strip span,
.schedule-dates span {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}

.meeting-strip time,
.schedule-dates time {
  display: block;
  font-weight: 600;
  margin-bottom: 3px;
}

/* Frosted Glass Cards & Workspace */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(235px, 1fr);
  align-items: start;
  gap: 18px;
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 24px;
  min-width: 0;
}

.panel-heading {
  padding: 20px 22px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.section-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  height: 38px;
  background: rgba(24, 59, 46, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  color: var(--green);
}

.panel-heading h2 {
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.board-jump {
  display: none;
  font-size: 0.875rem;
  text-underline-offset: 3px;
}

.panel-heading p,
.hint,
.share p,
.empty p,
.schedule-card p {
  color: var(--muted);
  line-height: 1.45;
  margin-top: 4px;
}

.panel-heading p,
.share p,
.schedule-card p {
  font-size: 0.875rem;
}

.phases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 18px 12px;
  border-bottom: 1px solid var(--line);
}

.phases button {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 550;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.phases button:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
}

.phases [aria-current] {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(24, 59, 46, 0.12);
  color: var(--green);
  font-weight: 650;
  box-shadow: 0 2px 8px rgba(17, 39, 29, 0.06), inset 0 1px 0 #fff;
}

.entry,
.board,
.loading {
  padding: 20px 22px;
}

.entry h3 {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

fieldset {
  margin: 17px 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.4;
}

textarea,
select {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(24, 59, 46, 0.16);
  border-radius: 13px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 2px rgba(17, 39, 29, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea:focus,
select:focus,
.auth-input:focus {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(33, 70, 56, 0.48);
  box-shadow:
    0 0 0 4px rgba(33, 70, 56, 0.14),
    inset 0 1px 2px rgba(17, 39, 29, 0.04);
  outline: none;
}

textarea {
  resize: vertical;
}

textarea::placeholder {
  color: #546a5d;
}

select {
  padding-right: 34px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23183b2e' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.875rem;
}

.privacy svg {
  flex-shrink: 0;
}

.share,
.baseline {
  background: rgba(235, 244, 237, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  padding: 15px;
  border-radius: 16px;
  margin-top: 17px;
}

.baseline {
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.share .field {
  margin-bottom: 6px;
}

.share small {
  font-size: 0.875rem;
  font-weight: 500;
  margin-left: 5px;
  color: var(--muted);
}

.form-footer {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.form-footer span {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Tactile iOS Buttons */
.primary {
  padding: 11px 18px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, #255442 0%, #193d2f 100%);
  color: #fff;
  font-weight: 650;
  box-shadow:
    0 6px 18px rgba(25, 61, 47, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.15s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease;
}

.primary:hover:not(:disabled) {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow:
    0 9px 22px rgba(25, 61, 47, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.primary:active:not(:disabled) {
  transform: scale(0.985);
  box-shadow: 0 3px 10px rgba(25, 61, 47, 0.2);
}

.primary:disabled {
  background: rgba(24, 59, 46, 0.12);
  color: rgba(21, 40, 32, 0.45);
  border-color: transparent;
  box-shadow: none;
}

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

.board ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.board li {
  padding: 13px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.board li:first-child {
  border-top: 0;
  padding-top: 4px;
}

.board li div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  align-items: baseline;
  justify-content: space-between;
}

.board li span,
.board time {
  color: var(--muted);
  font-size: 0.875rem;
}

.board li p {
  margin: 6px 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

.empty {
  border: 1px dashed rgba(24, 59, 46, 0.2);
  background: rgba(255, 255, 255, 0.45);
  border-radius: 16px;
  padding: 20px 14px;
  text-align: center;
}

.empty p {
  font-size: 0.9375rem;
  margin: 0;
}

.text-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--green);
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: opacity 0.15s ease;
}

.text-button:hover:not(:disabled) {
  opacity: 0.78;
}

.copy {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-top: 10px;
  font-size: 0.875rem;
}

/* Schedule View */
.schedule-layout {
  display: block;
  max-width: 1090px;
}

.schedule-heading {
  margin-bottom: 22px;
}

.schedule-heading h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 550;
  letter-spacing: -0.035em;
  margin: 5px 0 8px;
}

.schedule-heading p {
  color: var(--muted);
  line-height: 1.5;
}

.next-meeting {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(226, 242, 232, 0.78) 0%, rgba(255, 255, 255, 0.72) 100%);
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: var(--glass-shadow);
  border-radius: 22px;
}

.next-meeting > svg {
  flex: none;
  color: var(--green);
}

.next-meeting .eyebrow {
  color: var(--muted);
}

.next-meeting h2 {
  font-size: 1.18rem;
  font-weight: 650;
  margin: 3px 0 4px;
}

.secondary,
.calendar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(24, 59, 46, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--green);
  padding: 8px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow:
    0 2px 8px rgba(17, 39, 29, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.secondary:hover:not(:disabled),
.calendar-link:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(24, 59, 46, 0.24);
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px rgba(17, 39, 29, 0.08),
    inset 0 1px 0 #fff;
}

.secondary:active:not(:disabled),
.calendar-link:active {
  transform: scale(0.985);
}

.secondary:disabled {
  opacity: 0.55;
}

.next-meeting .secondary {
  margin-left: auto;
}

.next-meeting-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.next-meeting-actions .secondary,
.next-meeting-actions .calendar-link {
  margin-left: 0;
  margin-top: 0;
}

.calendar-link {
  margin-top: 14px;
}

.schedule-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.schedule-actions .calendar-link,
.schedule-actions .secondary,
.schedule-actions .primary {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.schedule-editor {
  margin: 18px 0 22px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(185%);
  -webkit-backdrop-filter: blur(24px) saturate(185%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 24px;
}

.schedule-editor:not(:has(> .panel-heading)) {
  padding: 20px 22px;
  display: grid;
  gap: 16px;
}

.schedule-editor h2,
.schedule-editor h3 {
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.schedule-editor .hint {
  margin-top: 0;
}

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

.schedule-editor-grid .field {
  margin-bottom: 0;
}

.schedule-editor input:not([type="checkbox"]):not([type="radio"]) {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(24, 59, 46, 0.16);
  border-radius: 13px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 2px rgba(17, 39, 29, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.schedule-editor input:not([type="checkbox"]):not([type="radio"]):focus {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(33, 70, 56, 0.48);
  box-shadow:
    0 0 0 4px rgba(33, 70, 56, 0.14),
    inset 0 1px 2px rgba(17, 39, 29, 0.04);
  outline: none;
}

.schedule-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.schedule-section-title {
  margin: 26px 0 12px;
  font-size: 1.14rem;
  font-weight: 650;
}

.schedule-list {
  display: grid;
  gap: 12px;
}

.schedule-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 14px 18px;
  padding: 18px 20px;
}

.schedule-card .text-button {
  font-size: 1.05rem;
}

.schedule-dates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedule-dates li {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.schedule-dates .next-date {
  background: rgba(217, 240, 120, 0.28);
  border-color: rgba(24, 59, 46, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.schedule-meeting-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.schedule-meeting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 2px 8px rgba(17, 39, 29, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: background 0.16s ease, border-color 0.16s ease;
}

.schedule-meeting-row.next-date {
  background: linear-gradient(135deg, rgba(217, 240, 120, 0.28) 0%, rgba(232, 244, 236, 0.72) 100%);
  border-color: rgba(24, 59, 46, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.schedule-meeting-row > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
}

.schedule-meeting-row time {
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--ink);
}

.schedule-meeting-row strong {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--ink);
}

.schedule-meeting-row span,
.schedule-meeting-row p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.schedule-meeting-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.schedule-meeting-row .text-button,
.schedule-meeting-actions .text-button {
  font-size: 0.84rem;
  min-height: 36px;
  padding: 4px 6px;
}

@media (max-width: 1050px) {
  .layout {
    grid-template-columns: 188px minmax(0, 1fr);
    gap: 18px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1.55fr) minmax(210px, 1fr);
    gap: 14px;
  }
  .panel-heading,
  .entry,
  .board {
    padding-inline: 16px;
  }
}

@media (max-width: 850px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .board-jump {
    display: inline-flex;
    margin-left: auto;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 650px) {
  .top-inner {
    min-height: 62px;
    flex-wrap: wrap;
    gap: 8px;
    padding-block: 8px;
  }
  .top nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
    gap: 4px;
    padding-bottom: 2px;
  }
  .top nav::-webkit-scrollbar {
    display: none;
  }
  .top nav button,
  .sign-out {
    padding: 7px 11px;
    font-size: 0.85rem;
    min-height: 36px;
    flex-shrink: 0;
  }
  .layout {
    display: block;
    padding-top: 14px;
  }
  .book,
  .aside-foot,
  .chapter-nav {
    display: none;
  }
  .chapter-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    margin-bottom: 12px;
  }
  .chapter-picker select {
    color: var(--ink);
    min-width: 0;
  }
  .hero {
    gap: 12px;
    border-radius: 22px;
  }
  .hero-icon {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }
  .hero-icon svg {
    width: 34px;
    height: 34px;
  }
  .meeting-strip {
    border-radius: 16px;
  }
  .meeting-strip > div {
    padding: 10px 9px;
  }
  .meeting-strip span {
    line-height: 1.25;
  }
  .schedule-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .next-meeting {
    flex-wrap: wrap;
    gap: 10px;
  }
  .next-meeting > div {
    flex: 1 1 75%;
  }
  .next-meeting .secondary {
    margin-left: 34px;
  }
  .next-meeting-actions {
    margin-left: 0;
    width: 100%;
  }
  .next-meeting-actions .secondary,
  .next-meeting-actions .calendar-link {
    margin-left: 0;
    flex: 1 1 auto;
  }
  .schedule-actions {
    gap: 8px;
  }
  .schedule-actions .calendar-link,
  .schedule-actions .secondary,
  .schedule-actions .primary {
    flex: 1 1 auto;
    justify-content: center;
  }
  .schedule-editor:not(:has(> .panel-heading)) {
    padding: 17px;
  }
  .schedule-editor {
    border-radius: 20px;
  }
  .schedule-dates {
    grid-template-columns: 1fr;
  }
  .schedule-editor-grid {
    grid-template-columns: 1fr;
  }
  .schedule-meeting-row {
    flex-direction: column;
    align-items: stretch;
  }
  .schedule-meeting-actions {
    justify-content: flex-start;
  }
  .schedule-layout {
    padding-top: 22px;
  }
}

/* Sleep Protocols Section */
.sleep-views {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 22px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(24, 59, 46, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 2px rgba(17, 39, 29, 0.06);
}

.sleep-views button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 40px;
  padding: 8px 16px;
  color: var(--muted);
  font-weight: 550;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.sleep-views button:hover {
  color: var(--ink);
}

.sleep-views [aria-current] {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.95);
  color: var(--green);
  font-weight: 650;
  box-shadow: 0 2px 8px rgba(17, 39, 29, 0.08), inset 0 1px 0 #fff;
}

.protocol-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.protocol-intro h2 {
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.protocol-intro p {
  color: var(--muted);
  line-height: 1.5;
  margin-top: 5px;
}

.protocol-intro > span {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.875rem;
}

.protocol-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.protocol-list {
  display: grid;
  gap: 4px;
}

.protocol-list button {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 13px;
  text-align: left;
  font-size: 0.9rem;
  min-height: 46px;
  line-height: 1.4;
  background: transparent;
  padding: 9px 11px;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.protocol-list button > span:nth-child(2) {
  flex: 1;
}

.protocol-list button small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.protocol-list button:hover {
  background: rgba(255, 255, 255, 0.56);
  border-color: rgba(255, 255, 255, 0.78);
}

.protocol-list [aria-current] {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.92);
  font-weight: 650;
  box-shadow: 0 4px 14px rgba(17, 39, 29, 0.06), inset 0 1px 0 #fff;
}

.protocol-number {
  color: var(--muted);
  font-size: 0.85rem;
  min-width: 1.2em;
  font-variant-numeric: tabular-nums;
}

.protocol-list svg {
  flex: none;
  color: var(--green);
}

.protocol-picker {
  display: none;
}

.protocol-heading {
  margin-bottom: 17px;
}

.protocol-heading .eyebrow {
  color: var(--muted);
  font-size: 0.8rem;
}

.protocol-heading h3 {
  font-size: 1.6rem;
  font-weight: 550;
  letter-spacing: -0.025em;
  margin: 6px 0;
}

.protocol-heading > p:last-child {
  line-height: 1.5;
  color: var(--muted);
}

.protocol-form,
.protocol-community {
  padding: 22px;
}

.protocol-form-heading,
.community-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.protocol-detail h4 {
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.4;
}

.protocol-form-heading > span {
  font-size: 0.875rem;
  color: var(--muted);
}

.share-checkin,
.compare-members label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  line-height: 1.5;
  cursor: pointer;
}

.share-checkin input,
.compare-members input {
  flex: none;
  width: 19px;
  height: 19px;
  accent-color: var(--green);
  margin: 2px 0;
}

.sharing-hint {
  font-size: 0.875rem;
  margin-left: 29px;
}

.protocol-community {
  margin-top: 18px;
  scroll-margin-top: 90px;
}

.protocol-community h4 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.community-heading .text-button {
  min-height: 44px;
  font-size: 0.875rem;
}

.compare-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0;
}

.compare-members label {
  align-items: center;
  min-height: 44px;
}

.comparison-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  margin-top: 16px;
}

.comparison {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.comparison caption {
  text-align: left;
  padding: 12px;
  color: var(--muted);
  font-size: 0.875rem;
}

.comparison th,
.comparison td {
  padding: 12px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  min-width: 190px;
  max-width: 320px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comparison th {
  font-weight: 600;
  background: rgba(232, 242, 234, 0.72);
}

.comparison th:first-child {
  min-width: 130px;
}

.shared-checkins {
  margin-top: 15px;
}

.shared-checkins details {
  border-top: 1px solid var(--line);
}

.shared-checkins summary {
  cursor: pointer;
  padding: 13px 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.shared-checkins dl {
  margin: 0 0 12px;
}

.shared-checkins dt {
  color: var(--muted);
  font-size: 0.875rem;
}

.shared-checkins dd {
  margin: 4px 0 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.protocol-comments {
  padding: 0;
  list-style: none;
  margin: 16px 0;
}

.protocol-comments li {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.protocol-comments li > div {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.875rem;
}

.protocol-comments strong {
  font-weight: 600;
}

.protocol-comments time {
  color: var(--muted);
}

.protocol-comments li > p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 8px;
  line-height: 1.5;
}

.protocol-comments .text-button {
  font-size: 0.875rem;
  min-height: 44px;
}

.comment-form {
  margin-top: 18px;
}

.reload-entry {
  display: block;
  margin-top: 15px;
  min-height: 44px;
}

@media (max-width: 1150px) {
  .protocol-layout {
    grid-template-columns: 1fr;
  }
  .protocol-list {
    display: none;
  }
  .protocol-picker {
    display: grid;
  }
}

@media (max-width: 650px) {
  .protocol-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .protocol-form,
  .protocol-community {
    padding: 17px;
  }
  .protocol-form .form-footer {
    position: sticky;
    bottom: 0;
    padding: 12px 17px calc(12px + env(safe-area-inset-bottom, 0px));
    margin: 14px -17px -17px;
    background: rgba(247, 251, 248, 0.86);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 0 0 24px 24px;
  }
  .protocol-detail h4 {
    font-size: 1rem;
  }
  .sharing-hint {
    margin-left: 0;
  }
}

/* Auth & OAuth Pages */
.auth-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 54px);
  padding-bottom: calc(clamp(18px, 5vw, 54px) + env(safe-area-inset-bottom, 0px));
  background-color: var(--canvas);
  background-image:
    radial-gradient(ellipse 68% 58% at 8% -4%, rgba(142, 200, 166, 0.44) 0%, transparent 62%),
    radial-gradient(ellipse 62% 52% at 94% 4%, rgba(246, 222, 154, 0.46) 0%, transparent 58%),
    radial-gradient(ellipse 75% 55% at 50% 106%, rgba(188, 220, 232, 0.5) 0%, transparent 64%),
    radial-gradient(circle at 28% 55%, rgba(217, 240, 120, 0.14) 0%, transparent 52%);
}

.auth-card {
  width: min(100%, 480px);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(26px) saturate(185%);
  -webkit-backdrop-filter: blur(26px) saturate(185%);
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  box-shadow:
    0 24px 64px rgba(17, 39, 29, 0.11),
    0 4px 12px rgba(17, 39, 29, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 650;
  margin-bottom: 32px;
}

.auth-card .eyebrow {
  color: var(--muted);
}

.auth-card h1 {
  font-size: clamp(2rem, 5vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 550;
  margin: 11px 0 14px;
}

.auth-intro {
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 26px;
  overflow-wrap: anywhere;
}

.auth-input {
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  width: 100%;
  min-height: 47px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(24, 59, 46, 0.16);
  border-radius: 13px;
  box-shadow:
    inset 0 1px 2px rgba(17, 39, 29, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.82);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-input:focus-visible {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(33, 70, 56, 0.48);
  box-shadow:
    0 0 0 4px rgba(33, 70, 56, 0.14),
    inset 0 1px 2px rgba(17, 39, 29, 0.04);
  outline: none;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field .auth-input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.password-toggle:hover:not(:disabled) {
  background: rgba(24, 59, 46, 0.08);
  color: var(--ink);
}

.password-toggle:disabled {
  opacity: 0.55;
}

.password-toggle:focus-visible {
  outline-offset: 1px;
}

.auth-submit {
  min-height: 48px;
  width: 100%;
  font-weight: 650;
}

.code-input {
  font-size: 1.4rem;
  letter-spacing: 0.2em;
}

.auth-notice {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 13px;
}

.auth-notice:empty {
  display: none;
}

.auth-help {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 22px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.auth-actions button {
  min-height: 44px;
  font-size: 0.875rem;
}

.auth-actions button:disabled {
  color: var(--muted);
  text-decoration: none;
}

.auth-actions + .auth-help {
  margin-top: 8px;
}

.session-error {
  padding: 12px 20px;
  background: rgba(255, 242, 224, 0.9);
  backdrop-filter: blur(12px);
  color: #5c3e1c;
  border-bottom: 1px solid rgba(206, 154, 88, 0.3);
}

/* Modals (Members & AI Connect) */
.member-dialog {
  width: min(580px, calc(100% - 30px));
  max-height: 85dvh;
  background: rgba(247, 251, 248, 0.86);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  box-shadow:
    0 28px 80px rgba(12, 30, 22, 0.22),
    0 4px 14px rgba(12, 30, 22, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  padding: 26px;
  color: var(--ink);
}

.member-dialog::backdrop,
dialog::backdrop {
  background: rgba(15, 31, 24, 0.36);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.member-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.member-dialog h2 {
  font-size: 1.48rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.icon-button {
  border: 1px solid transparent;
  background: transparent;
  min-width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.icon-button:hover:not(:disabled) {
  background: rgba(24, 59, 46, 0.08);
  border-color: rgba(255, 255, 255, 0.8);
}

.icon-button:disabled {
  opacity: 0.4;
}

.member-add {
  margin-top: 20px;
}

.member-list {
  padding: 0;
  list-style: none;
  margin: 20px 0 0;
}

.member-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  font-size: 0.9rem;
}

.member-list li > div:first-child {
  min-width: 0;
}

.member-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.member-list strong {
  font-weight: 600;
  display: block;
}

.member-list span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.role-badge,
.member-list .role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(208, 238, 218, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(33, 94, 58, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}

.member-list .text-button {
  min-height: 44px;
}

.member-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.member-reset {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.member-reset .auth-input {
  flex: 1 1 220px;
  width: auto;
  min-height: 44px;
}

.member-reset .primary {
  min-height: 44px;
}

.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.name-row .field {
  margin-bottom: 0;
}

.invite-card .auth-intro {
  margin-bottom: 14px;
}

.invite-card .text-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9rem;
}

.invite-email-pill {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 59, 46, 0.14);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.invite-request-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.invite-request-form h2 {
  font-size: 1.15rem;
  font-weight: 650;
  margin-bottom: 14px;
}

.invite-request-form small {
  font-weight: 400;
  color: var(--muted);
}

.invite-confirmed {
  margin-top: 20px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(232, 244, 236, 0.72);
  border: 1px solid rgba(45, 114, 72, 0.25);
  display: grid;
  gap: 14px;
}

.invite-confirmed p {
  line-height: 1.5;
  color: var(--ink);
}

.request-section {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(232, 244, 236, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.request-section h3 {
  font-size: 1rem;
  font-weight: 650;
  margin-bottom: 10px;
  color: var(--green);
}

.request-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.request-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(17, 39, 29, 0.04);
}

.request-item > div:first-child {
  min-width: 0;
  flex: 1 1 200px;
}

.request-item strong {
  display: block;
  font-weight: 600;
}

.request-item span {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.request-item p {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--ink);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.request-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.request-actions button {
  min-height: 42px;
  padding: 8px 14px;
  font-size: 0.875rem;
}

/* Today View & Circadian Weather Card */
.daily-tracker,
.daily-page {
  display: grid;
  gap: 18px;
}

.weather-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82) 0%, rgba(236, 246, 240, 0.68) 62%, rgba(252, 244, 224, 0.68) 100%);
  backdrop-filter: blur(24px) saturate(185%);
  -webkit-backdrop-filter: blur(24px) saturate(185%);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 14px 40px rgba(17, 39, 29, 0.08),
    0 2px 8px rgba(17, 39, 29, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: var(--ink);
  border-radius: 24px;
  padding: clamp(16px, 2.2vw, 22px);
  display: grid;
  gap: 12px;
}

.weather-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.weather-header .eyebrow {
  color: var(--green);
  font-size: 0.78rem;
}

.weather-location,
.weather-header h1,
.weather-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-top: 4px;
  color: var(--ink);
}

.weather-location svg {
  color: var(--green);
  flex-shrink: 0;
}

.weather-header p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.weather-header .text-button {
  color: var(--green);
  font-size: 0.875rem;
  min-height: 44px;
}

.weather-header .secondary {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(24, 59, 46, 0.14);
  color: var(--green);
}

.weather-header .secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.96);
}

.weather-card .hint {
  color: var(--muted);
}

.weather-error {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #7c3518;
  font-size: 0.9rem;
}

.weather-error .text-button {
  color: var(--green);
}

.city-search {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.city-geo-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.city-geo-row .secondary {
  min-height: 42px;
  font-size: 0.875rem;
}

.city-search-form .field {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 0.875rem;
}

.city-search-row,
.city-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.city-search-row .auth-input,
.city-picker input {
  flex: 1 1 210px;
  min-height: 46px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.city-search-row .primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
}

.city-results {
  list-style: none;
  margin: 4px 0 0;
  padding: 6px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  color: var(--ink);
  border: 1px solid rgba(24, 59, 46, 0.12);
  border-radius: 14px;
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
}

.city-results button {
  width: 100%;
  justify-content: space-between;
  text-align: left;
  border: 0;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.city-results button:hover:not(:disabled) {
  background: rgba(24, 59, 46, 0.08);
  transform: none;
  box-shadow: none;
}

.city-results span,
.city-results small {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 450;
}

.weather-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.weather-pill,
.weather-metric {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 4px 14px rgba(17, 39, 29, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  min-width: 0;
}

.weather-pill-outside,
.weather-pill-sunrise,
.weather-pill-sunset {
  grid-column: span 2;
}

.weather-pill-window {
  grid-column: span 3;
}

.weather-pill > svg,
.weather-metric > svg {
  color: #21523f;
  flex-shrink: 0;
}

.weather-pill > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.weather-pill-label {
  font-size: 0.7rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.weather-pill strong,
.weather-metric strong {
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.weather-temp-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
  min-width: 0;
}

.weather-pill small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  min-width: 0;
}

.weather-pill small svg {
  flex-shrink: 0;
}

.weather-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(254, 246, 222, 0.82) 0%, rgba(242, 249, 232, 0.76) 100%);
  border: 1px solid rgba(206, 174, 86, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  color: #193025;
  font-size: 0.9rem;
  line-height: 1.48;
}

.weather-tip svg {
  color: #8c6212;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Next Group Call Strip */
.today-next-call {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 14px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(226, 242, 232, 0.74) 0%, rgba(255, 255, 255, 0.68) 100%);
  border: 1px solid rgba(24, 59, 46, 0.14);
  box-shadow:
    0 8px 24px rgba(17, 39, 29, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.today-next-call-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 260px;
}

.today-next-call-info svg {
  color: var(--green);
  flex-shrink: 0;
}

.today-next-call-info p {
  font-size: 0.93rem;
  line-height: 1.45;
  color: var(--ink);
}

.today-next-call .secondary {
  min-height: 40px;
  padding: 7px 14px;
  font-size: 0.875rem;
  margin-left: auto;
}

/* Daily Grid, Progress, Habits */
.daily-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}

.daily-side,
.daily-grid > div {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.daily-checkin .panel-heading {
  border-bottom: 1px solid var(--line);
}

.daily-checkin .entry {
  padding: 16px 20px 18px;
}

.daily-checkin fieldset {
  margin-top: 0;
}

.daily-checkin .field {
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.92rem;
}

.daily-checkin .form-footer {
  margin-top: 14px;
}

.daily-progress {
  width: calc(100% - 44px);
  margin: 14px 22px 0;
  height: 8px;
  border-radius: 999px;
  background: rgba(24, 59, 46, 0.09);
  box-shadow: inset 0 1px 2px rgba(17, 39, 29, 0.08);
  overflow: hidden;
}

.daily-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1f4d3c 0%, #4d9460 58%, #a8d85c 100%);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(77, 148, 96, 0.35);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.daily-checkin-title-wrap {
  flex: 1 1 180px;
  min-width: 0;
}

.day-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.day-stepper .text-button {
  font-size: 0.875rem;
  padding: 0 8px;
  min-height: 40px;
}

.daily-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.daily-header h2 {
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.daily-header p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.habit-group {
  margin-bottom: 14px;
}

.habit-group h3 {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 650;
  margin-bottom: 6px;
}

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

.habit-row,
.habit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow:
    0 2px 8px rgba(17, 39, 29, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: pointer;
  min-height: 44px;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}

.habit-row-anchor {
  grid-column: 1 / -1;
}

.habit-row:hover,
.habit-item:hover {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(24, 59, 46, 0.16);
  transform: translateY(-1px);
  box-shadow:
    0 6px 14px rgba(17, 39, 29, 0.06),
    inset 0 1px 0 #fff;
}

.habit-row input[type="checkbox"],
.habit-item input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  margin-top: 2px;
  cursor: pointer;
}

.habit-row strong,
.habit-item strong {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
}

.habit-row small,
.habit-item span,
.habit-item small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: 2px;
}

.habit-row:has(input:checked),
.habit-item.checked,
.habit-item[aria-checked="true"],
.habit-item:has(input:checked) {
  background: linear-gradient(135deg, rgba(220, 240, 224, 0.78) 0%, rgba(238, 248, 224, 0.72) 100%);
  border-color: rgba(45, 114, 72, 0.36);
  box-shadow:
    0 4px 12px rgba(24, 59, 46, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.sleep-vitals-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 12px 14px;
  margin: 14px 0 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 2px 8px rgba(17, 39, 29, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.sleep-quality-field {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.sleep-vitals-row .sleep-quality-field {
  padding-top: 0;
  border-top: 0;
  margin: 0;
  gap: 6px;
  flex: 0 0 auto;
}

.sleep-quality-group,
.quality-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sleep-vitals-row .sleep-quality-group {
  gap: 6px;
  flex-wrap: nowrap;
}

.sleep-quality-group button,
.quality-buttons button {
  min-width: 48px;
  min-height: 44px;
  padding: 8px 14px;
}

.sleep-vitals-row .sleep-quality-group button {
  min-width: 40px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 11px;
  font-size: 0.9rem;
}

.quality-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}

.quality-buttons button {
  border: 1px solid rgba(24, 59, 46, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.76);
  font-weight: 600;
  color: var(--ink);
}

.quality-buttons button[aria-pressed="true"],
.quality-buttons button.selected {
  background: linear-gradient(180deg, #255442 0%, #193d2f 100%);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: 0 4px 12px rgba(25, 61, 47, 0.22);
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.time-row .field {
  margin-bottom: 0;
}

.sleep-vitals-row .time-row {
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 10px;
  margin: 0;
  flex: 1 1 224px;
}

.sleep-vitals-row .time-row .field {
  margin: 0;
  gap: 6px;
}

.sleep-vitals-row .time-row .auth-input {
  min-height: 40px;
  padding: 6px 10px;
  font-size: 0.9rem;
  border-radius: 11px;
}

/* Streak Card & 14-Day Tiles */
.streak-card .panel-heading {
  padding-bottom: 14px;
}

.streak-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 0 22px;
}

.streak-tile,
.streak-cell {
  display: grid;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 14px;
  border: 1px solid rgba(24, 59, 46, 0.1);
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
  min-height: 62px;
  color: var(--ink);
  transition: transform 0.16s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.streak-tile:hover,
.streak-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(17, 39, 29, 0.09);
}

.streak-tile.level-0,
.streak-tile[data-level="0"],
.streak-cell.level-0 {
  background: rgba(255, 255, 255, 0.54);
  border-color: rgba(24, 59, 46, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.streak-tile.level-1,
.streak-tile[data-level="1"],
.streak-cell.level-1 {
  background: rgba(206, 234, 212, 0.68);
  border-color: rgba(114, 174, 132, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.streak-tile.level-2,
.streak-tile[data-level="2"],
.streak-cell.level-2 {
  background: rgba(132, 198, 146, 0.74);
  border-color: rgba(66, 138, 86, 0.48);
  color: #0e261a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.streak-tile.level-3,
.streak-tile[data-level="3"],
.streak-cell.level-3 {
  background: linear-gradient(180deg, #245340 0%, #183b2e 100%);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f6f8ec;
  box-shadow:
    0 6px 14px rgba(24, 59, 46, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.streak-tile.selected,
.streak-cell.selected {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4.5px var(--green),
    0 8px 18px rgba(24, 59, 46, 0.2);
  transform: translateY(-1px);
}

.streak-tile-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.72rem;
  opacity: 0.84;
}

.streak-tile-date {
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.1;
}

.streak-tile-count {
  font-size: 0.72rem;
  opacity: 0.88;
  font-variant-numeric: tabular-nums;
}

.streak-card-footer {
  padding: 16px 22px 20px;
}

.streak-card-footer .secondary {
  width: 100%;
}

/* Group Pulse Card */
.pulse-card .panel-heading {
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}

.pulse-card .panel-heading > div:nth-child(2) {
  flex: 1 1 auto;
  min-width: 0;
}

.pulse-refresh-btn {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(24, 59, 46, 0.13);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.14s ease;
}

.pulse-refresh-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(24, 59, 46, 0.22);
}

.pulse-refresh-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.pulse-refresh-btn:disabled {
  opacity: 0.6;
}

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

.spin {
  animation: spin 0.9s linear infinite;
}

.pulse-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.board .pulse-list .pulse-item,
.pulse-item {
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow:
    0 2px 8px rgba(17, 39, 29, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: grid;
  gap: 5px;
}

.pulse-item-header,
.pulse-item-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.pulse-item strong {
  font-weight: 650;
  font-size: 0.95rem;
}

.pulse-item span,
.pulse-item time {
  font-size: 0.83rem;
  color: var(--muted);
}

.pulse-item p {
  margin: 2px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.streak-badge,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(217, 240, 120, 0.34);
  border: 1px solid rgba(24, 59, 46, 0.12);
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 650;
}

.daily-ai-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
}

.daily-ai-bar-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.35;
  min-width: 0;
}

.daily-ai-bar-text svg {
  color: var(--green);
  flex-shrink: 0;
}

.daily-ai-bar .secondary {
  flex-shrink: 0;
  min-height: 36px;
  padding: 6px 13px;
  font-size: 0.84rem;
  white-space: nowrap;
}

/* AI Connect Dialog */
.ai-connect-dialog,
.ai-dialog {
  width: min(640px, calc(100% - 30px));
  max-height: 86dvh;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.ai-connect-dialog .member-dialog-heading {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0;
  padding: 18px 24px 14px;
  background: rgba(247, 251, 248, 0.88);
  backdrop-filter: blur(22px) saturate(185%);
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  border-bottom: 1px solid var(--line);
  border-radius: 28px 28px 0 0;
}

.ai-connect-dialog .member-dialog-heading h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ai-dialog-body {
  padding: 16px 24px 24px;
}

.ai-dialog-intro {
  margin-top: 0;
  font-size: 0.9rem;
}

.mcp-url-section {
  margin-top: 16px;
}

.ai-guided-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
}

.ai-guided-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.ai-guided-caption {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
  flex: 1 1 200px;
}

.mcp-url-row,
.mcp-url-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mcp-url-row .auth-input {
  flex: 1 1 240px;
  width: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
}

.mcp-url-row .primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 47px;
}

.ai-app-picker,
.ai-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 16px 0 14px;
  padding: 5px;
  border-radius: 16px;
  background: rgba(24, 59, 46, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 2px rgba(17, 39, 29, 0.06);
}

.ai-app-picker button,
.ai-tabs button {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 550;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.ai-app-picker button:hover,
.ai-tabs button:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
}

.ai-app-picker button[aria-selected="true"],
.ai-tabs button[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.96);
  color: var(--green);
  font-weight: 650;
  box-shadow:
    0 3px 10px rgba(17, 39, 29, 0.09),
    inset 0 1px 0 #fff;
}

.ai-guide-card,
.ai-tab-panel,
.ai-method {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow:
    0 4px 16px rgba(17, 39, 29, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  display: grid;
  gap: 14px;
}

.ai-guide-card h3,
.ai-tab-panel h3,
.ai-method h3 {
  font-size: 1.04rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.ai-guide-card .hint {
  margin-top: 0;
}

.ai-guide-card .mcp-url-section {
  margin-top: 0;
}

.ai-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--ink);
}

.ai-steps li::marker {
  color: var(--green);
  font-weight: 650;
}

.ai-helper-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ai-guide-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-guide-actions .primary,
.ai-guide-actions .secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.prompt-reveal {
  margin-top: 14px;
  padding: 15px;
  border-radius: 16px;
  background: rgba(232, 244, 236, 0.76);
  border: 1px solid rgba(45, 114, 72, 0.28);
  display: grid;
  gap: 10px;
}

.prompt-reveal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.prompt-reveal-header strong {
  font-size: 0.95rem;
  font-weight: 650;
}

.prompt-reveal-header .primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.875rem;
}

.prompt-reveal pre,
.prompt-reveal-text {
  margin: 0;
  padding: 13px;
  border-radius: 12px;
  background: #14261e;
  color: #eef5e7;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 220px;
  overflow-y: auto;
}

.prompt-reveal .hint {
  margin-top: 0;
  font-size: 0.84rem;
}

.ai-examples {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.ai-examples h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.98rem;
  font-weight: 650;
}

.ai-examples h3 svg {
  color: var(--green);
  flex-shrink: 0;
}

.ai-example-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-example-chip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 5px;
  width: 100%;
  text-align: left;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow:
    0 2px 8px rgba(17, 39, 29, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  color: var(--ink);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.15s ease;
}

.ai-example-chip:hover {
  background: rgba(232, 244, 236, 0.86);
  border-color: rgba(45, 114, 72, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(17, 39, 29, 0.07);
}

.ai-example-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-example-card-top strong {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ink);
}

.ai-example-card-text {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.ai-example-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--green);
}

.ai-advanced {
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  overflow: hidden;
}

.ai-advanced summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  min-height: 44px;
}

.ai-advanced summary::-webkit-details-marker {
  display: none;
}

.ai-advanced summary:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.ai-advanced[open] summary {
  border-bottom: 1px solid var(--line);
  background: rgba(235, 244, 237, 0.65);
  color: var(--ink);
}

.ai-advanced-body {
  padding: 15px;
}

.token-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.token-form .field {
  flex: 1 1 220px;
  margin-bottom: 0;
}

.token-form .primary {
  min-height: 47px;
}

.token-reveal {
  margin-top: 14px;
  padding: 15px;
  border-radius: 15px;
  background: rgba(232, 244, 236, 0.76);
  border: 1px solid rgba(45, 114, 72, 0.28);
  display: grid;
  gap: 10px;
}

.token-reveal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.token-reveal-row code {
  flex: 1 1 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  word-break: break-all;
  background: rgba(255, 255, 255, 0.9);
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.token-snippet {
  display: grid;
  gap: 6px;
}

.token-snippet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.token-snippet pre,
.code-snippet {
  margin: 0;
  padding: 13px;
  border-radius: 12px;
  background: #14261e;
  color: #eef5e7;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-x: auto;
}

.token-list-section {
  margin-top: 20px;
}

.token-list-section h3 {
  font-size: 1.05rem;
  font-weight: 650;
  margin-bottom: 6px;
}

.token-list {
  margin-top: 8px;
}

.token-list .text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7a2e2e;
}

.token-kind-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(217, 240, 120, 0.34);
  border: 1px solid rgba(24, 59, 46, 0.12);
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 650;
  margin-left: 4px;
  vertical-align: middle;
}

@media (max-width: 1050px) {
  .daily-progress {
    width: calc(100% - 32px);
    margin-inline: 16px;
  }
}

@media (max-width: 900px) {
  .daily-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .name-row,
  .time-row {
    grid-template-columns: 1fr;
  }
  .weather-card {
    padding: 16px;
  }
  .weather-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .weather-pill-outside {
    grid-column: span 2;
  }
  .weather-pill-sunrise,
  .weather-pill-sunset,
  .weather-pill-window {
    grid-column: span 1;
  }
  .weather-pill {
    padding: 9px 10px;
    gap: 8px;
  }
  .weather-pill strong {
    font-size: 0.88rem;
  }
  .habit-list {
    grid-template-columns: 1fr;
  }
  .sleep-vitals-row {
    padding: 12px;
    gap: 12px;
  }
  .sleep-vitals-row .sleep-quality-field,
  .sleep-vitals-row .time-row {
    width: 100%;
    flex-basis: 100%;
  }
  .sleep-vitals-row .time-row {
    grid-template-columns: 1fr 1fr;
  }
  .today-next-call {
    padding: 13px 15px;
  }
  .today-next-call .secondary {
    width: 100%;
    margin-left: 0;
  }
  .ai-guide-card {
    padding: 15px;
  }
  .ai-example-chips {
    grid-template-columns: 1fr;
  }
  .streak-grid {
    gap: 4px;
    padding: 0 16px;
  }
  .streak-card-footer {
    padding-inline: 16px;
  }
  .member-dialog {
    padding: 18px;
    width: calc(100% - 20px);
    max-height: 90dvh;
    border-radius: 24px;
  }
  .ai-connect-dialog,
  .ai-dialog {
    padding: 0;
    width: calc(100% - 20px);
    max-height: 90dvh;
    border-radius: 24px;
  }
  .ai-connect-dialog .member-dialog-heading {
    padding: 15px 18px 12px;
    border-radius: 24px 24px 0 0;
  }
  .ai-dialog-body {
    padding: 14px 18px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .primary:hover:not(:disabled),
  .secondary:hover:not(:disabled),
  .calendar-link:hover,
  .habit-row:hover,
  .habit-item:hover,
  .streak-tile:hover,
  .streak-cell:hover,
  .streak-tile.selected,
  .streak-cell.selected,
  .ai-example-chip:hover {
    transform: none;
  }
}
