/* Amber diary — moon pearl lace */

.amber-page {
  min-height: 100vh;
  background: none;
  padding: 0 0 120px;
  position: relative;
  overflow-x: hidden;
}
.amber-page::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: var(--amber-wall, var(--wall-image));
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
.amber-moon { display: none;
  position: absolute; top: -20px; left: -30px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, var(--bg) 0%, var(--solid-bar) 55%, var(--solid-bar) 100%);
  box-shadow: 0 0 30px var(--glow), inset -12px -10px 20px var(--glow);
  opacity: 0.82; z-index: 0;
}
.amber-pearls { display: none;
  position: absolute; top: 60px; left: 52px;
  flex-direction: column; gap: 10px; z-index: 1;
}
.amber-pearls .p {
  width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff 0%, var(--solid-bar) 50%, var(--solid-bar) 100%);
  box-shadow: 0 1px 4px var(--glow);
}
.amber-pearls .p:nth-child(2) { width: 10px; height: 10px; margin-left: 4px; }
.amber-pearls .p:nth-child(4) { width: 7px; height: 7px; margin-left: -2px; }
.amber-pearls .p-drop {
  width: 12px; height: 16px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #ece4f6 50%, #d8cce8 100%);
  box-shadow: 0 2px 6px var(--glow);
  margin-left: 2px;
}
.amber-menu-btn {
  position: absolute; top: 52px; right: 16px; z-index: 50;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.5); border: 1px solid var(--hairline);
  backdrop-filter: blur(8px); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 18px;
}
.amber-title-area { text-align: center; padding: 80px 20px 0; display: flex; flex-direction: column; align-items: center; position: relative; z-index: 2; }
.amber-title {
  font-family: "Pinyon Script", "Cormorant Garamond", Georgia, cursive;
  font-size: 34px; font-weight: 400; color: var(--accent);
  letter-spacing: 2px; margin-bottom: 6px;
}
.amber-ribbon { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0; opacity: 0.5; }
.amber-ribbon svg { width: 120px; height: 16px; }
/* amber-subtitle above ribbon */
.amber-subtitle { font-size: 11px; letter-spacing: 2px; color: var(--text-dim); margin-top: 4px; margin-bottom: 2px; }
.amber-title-area .amber-ribbon { margin-top: 10px; }
.amber-avatars { display: none;
  display: flex; justify-content: center; gap: 20px;
  padding: 18px 0 8px; position: relative; z-index: 2;
}
.amber-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--hairline);
  background: var(--card-bg) no-repeat center / cover;
  object-fit: cover; box-shadow: 0 2px 10px var(--glow);
}
.amber-week {
  margin: 16px auto; padding: 14px 12px;
  background: rgba(255,255,255,0.55); backdrop-filter: blur(10px);
  border: 1px solid var(--hairline); border-radius: 16px;
  max-width: 360px; position: relative; z-index: 2;
}
.amber-week-head {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; font-size: 12px; color: var(--text-dim);
  margin-bottom: 8px; letter-spacing: 1px;
}
.amber-week-days {
  display: grid; grid-template-columns: repeat(7, 1fr); text-align: center;
}
.amber-week-day {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 15px; color: var(--text); padding: 4px 0;
  cursor: pointer;
}
.amber-week-day.today .amber-day-num {
  background: var(--accent); color: #fff; border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
}
.amber-week-day.selected .amber-day-num {
  border: 1.5px solid var(--accent); border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
}
.amber-week-day.has-entry::after {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); margin-top: 2px;
}
.amber-day-num { font-size: 15px; font-weight: 500; }
.amber-cards-wrap {
  position: relative; z-index: 2;
  margin: 16px auto; max-width: 380px; padding: 0 12px;
}
.amber-cards {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  gap: 0; padding: 0;
}
.amber-cards::-webkit-scrollbar { display: none; }
.amber-card {
  flex: 0 0 100%; scroll-snap-align: start;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(14px);
  border: 1px solid var(--hairline);
  border-radius: 18px; padding: 20px 16px;
  display: flex; gap: 14px; min-height: 200px;
  position: relative; overflow: hidden;
  box-shadow: 0 2px 12px var(--glow);
  background-size: cover; background-position: center;
}
.amber-card::after {
  content: ""; position: absolute; bottom: -2px; right: -2px;
  width: 90px; height: 90px; pointer-events: none; opacity: 0.7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cpath d='M90 0 C60 20 40 50 20 90 M90 15 C65 30 50 55 35 90 M90 30 C70 42 60 60 50 90' fill='none' stroke='%23d4c8e8' stroke-width='0.6'/%3E%3Ccircle cx='75' cy='75' r='3' fill='%23e8e0f4'/%3E%3Ccircle cx='60' cy='82' r='2.5' fill='%23ece5f5'/%3E%3Ccircle cx='80' cy='60' r='2' fill='%23ece5f5'/%3E%3C/svg%3E");
  background-size: cover;
}
.amber-card-date {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-width: 56px;
  border-right: 1px solid var(--hairline); padding-right: 12px;
}
.amber-card-month { font-size: 12px; color: var(--text-dim); letter-spacing: 1px; }
.amber-card-day { font-size: 36px; font-weight: 300; color: var(--accent); line-height: 1.2; }
.amber-card-weekday { font-size: 11px; color: var(--accent); margin-top: 2px; }
.amber-card-body { flex: 1; display: flex; flex-direction: column; }
.amber-card-time { font-size: 11px; color: var(--text-dim); margin-bottom: 8px; }
.amber-card-time .heart { color: var(--accent); }
.amber-card-text {
  font-size: 14px; line-height: 2.2; color: var(--text);
  white-space: pre-wrap; flex: 1;
}
.amber-card-mood {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--accent);
  background: var(--glow); border: 1px solid rgba(140,100,180,0.15);
  border-radius: 999px; padding: 3px 10px 3px 4px; margin-bottom: 6px;
}
.amber-card-mood .amber-mood-ico { width: 22px; height: 22px; display: block; }
.amber-card-text-moodonly { opacity: 0.55; font-style: italic; }
.amber-dots { display: flex; justify-content: center; gap: 6px; padding: 12px 0; }
.amber-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--solid-bar); transition: background 0.2s;
}
.amber-dot.active { background: var(--accent); }
.amber-empty { text-align: center; padding: 50px 20px; color: var(--text-dim); width: 100%; display: flex; flex-direction: column; align-items: center; }
.amber-empty p:first-child { font-size: 28px; margin-bottom: 10px; opacity: 0.5; }
.amber-empty p:last-child { font-size: 12px; letter-spacing: 1.5px; }
.amber-fab {
  position: fixed; bottom: calc(96px + env(safe-area-inset-bottom));
  right: 28px; width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent)); border: none;
  color: white; font-size: 24px; font-weight: 300; cursor: pointer;
  box-shadow: 0 4px 16px var(--accent-soft); z-index: 20;
}
.amber-fab:active { transform: scale(0.92); }
/* editor overlay */
.amber-editor-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px); z-index: 200;
  display: none; align-items: flex-end; justify-content: center;
}
.amber-editor-overlay.open { display: flex; }
.amber-editor {
  width: 100%; max-width: 420px;
  background: var(--solid-card); border-radius: 20px 20px 0 0;
  padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  animation: amberSlide 0.25s ease-out;
}
@keyframes amberSlide { from { transform: translateY(100%); } to { transform: translateY(0); } }
.amber-editor-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.amber-editor-head h3 { font-family: Georgia, serif; font-size: 15px; font-weight: 400; color: var(--accent); }
.amber-close { background: none; border: none; font-size: 20px; color: var(--text-dim); cursor: pointer; padding: 4px 8px; }
.amber-moods {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px 8px; margin-bottom: 14px;
}
.amber-mood-btn {
  background: rgba(255,255,255,0.45); border: 1px solid var(--hairline);
  border-radius: 16px; padding: 8px 4px 6px; font-size: 11px;
  cursor: pointer; color: var(--text-dim);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: border-color .15s, background .15s, transform .12s;
}
.amber-mood-btn img { width: 40px; height: 40px; display: block; pointer-events: none; }
.amber-mood-btn span { letter-spacing: 0.5px; pointer-events: none; }
.amber-mood-btn.on {
  border-color: var(--accent); color: var(--accent);
  background: var(--glow); transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(140,100,180,0.12);
}
.amber-editor textarea {
  width: 100%; min-height: 100px;
  border: 1px solid var(--hairline); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; line-height: 1.9;
  color: var(--text); background: rgba(255,255,255,0.6);
  resize: none; outline: none; font-family: inherit;
}
.amber-editor textarea:focus { border-color: var(--accent); }
.amber-editor textarea::placeholder { color: var(--text-dim); }
.amber-save {
  width: 100%; margin-top: 12px; padding: 11px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent));
  color: white; font-size: 14px; letter-spacing: 0.5px;
  cursor: pointer; font-family: inherit;
}
.amber-save:active { opacity: 0.85; }
/* settings panel */
.amber-settings-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.25);
  backdrop-filter: blur(3px); z-index: 300;
  display: none; align-items: flex-start; justify-content: flex-end;
}
.amber-settings-overlay.open { display: flex; }
.amber-settings {
  width: 280px; max-width: 80vw; height: 100%;
  background: var(--solid-card); padding: 60px 18px 30px;
  box-shadow: -4px 0 20px rgba(0,0,0,0.08);
  overflow-y: auto; animation: amberSlideR 0.2s ease-out;
}
@keyframes amberSlideR { from { transform: translateX(100%); } to { transform: translateX(0); } }
.amber-settings h3 {
  font-family: Georgia, serif; font-size: 16px; font-weight: 400;
  color: var(--accent); margin-bottom: 20px;
}
.amber-set-group { margin-bottom: 22px; }
.amber-set-label { font-size: 12px; color: var(--text-dim); letter-spacing: 1px; margin-bottom: 8px; }
.amber-set-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.amber-set-btn {
  background: rgba(255,255,255,0.6); border: 1px solid var(--hairline);
  border-radius: 10px; padding: 8px 14px; font-size: 12px;
  color: var(--accent); cursor: pointer; font-family: inherit;
}
.amber-set-btn:active { background: var(--glow); }
.amber-set-color {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--hairline); cursor: pointer;
}
.amber-set-close {
  position: absolute; top: 18px; right: 18px;
  background: none; border: none; font-size: 20px;
  color: var(--text-dim); cursor: pointer;
}
.amber-card-del {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,0.7); border: 1px solid var(--hairline);
  color: var(--text-dim); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); line-height: 1;
}
.amber-card-del:active { background: var(--glow); }
.amber-set-input {
  flex: 1; min-width: 0; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--hairline); font-size: 13px;
  color: var(--text); background: rgba(255,255,255,0.6);
  outline: none; font-family: inherit;
}
.amber-set-input:focus { border-color: var(--accent); }
.amber-set-input::placeholder { color: var(--text-dim); }
/* year-month row */
.amber-ym-row {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; padding: 4px 0 10px;
}
.amber-ym {
  font-size: 14px; color: var(--accent); letter-spacing: 1px;
  cursor: pointer; font-weight: 500;
}
.amber-ym-arr {
  background: none; border: none; font-size: 18px;
  color: var(--text-dim); cursor: pointer; padding: 2px 8px;
}
/* month grid */
.amber-month-grid { padding: 8px 0 4px; }
.amber-mg-head {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; font-size: 11px; color: var(--accent);
  margin-bottom: 6px;
}
.amber-mg-body {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; gap: 4px 0;
}
.amber-mg-empty { height: 32px; }
.amber-mg-day {
  height: 32px; line-height: 32px; font-size: 13px;
  color: var(--text); border-radius: 50%; cursor: pointer;
  position: relative;
}
.amber-mg-day.today {
  background: var(--accent); color: #fff;
}
.amber-mg-day.selected:not(.today) {
  border: 1.5px solid var(--accent);
}
.amber-mg-day.has-entry::after {
  content: ; position: absolute; bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.amber-mg-day.today.has-entry::after { background: #fff; }


/* week day nav arrows */
.amber-week-nav {
  display: flex; align-items: center; gap: 4px;
}
.amber-week-nav .amber-week-days { flex: 1; }
.amber-day-arr {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,0.6); border: 1px solid var(--hairline);
  backdrop-filter: blur(4px); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 16px; flex-shrink: 0;
}
.amber-day-arr:active { background: var(--glow); }

/* ── 聊天热力:周历圆圈按当天聊天量填充,数字下方显示条数 ── */
.amber-day-num {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.amber-week-day.h1 .amber-day-num { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.amber-week-day.h2 .amber-day-num { background: color-mix(in srgb, var(--accent) 34%, transparent); }
.amber-week-day.h3 .amber-day-num { background: color-mix(in srgb, var(--accent) 58%, transparent); }
.amber-week-day.h4 .amber-day-num { background: color-mix(in srgb, var(--accent) 88%, transparent); }
.amber-week-day.h1 .amber-day-num, .amber-week-day.h2 .amber-day-num { color: inherit; }
.amber-week-day.h3 .amber-day-num, .amber-week-day.h4 .amber-day-num { color: #fff; }
/* 今天保留一圈描边;今天 0 条时仍是原 accent 实心圆(前方规则),有热力色时被上面覆盖 */
.amber-week-day.today .amber-day-num { box-shadow: inset 0 0 0 1.5px var(--accent); }
.amber-day-count {
  font-size: 10px; line-height: 1; min-height: 10px;
  color: var(--text-dim); font-weight: 400;
}
.amber-week-day.today .amber-day-count { color: var(--accent); font-weight: 600; }

/* ── 月网格聊天热力:圆底按当天聊天量着色(档位与周历条一致) ── */
.amber-mg-day.h1 { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.amber-mg-day.h2 { background: color-mix(in srgb, var(--accent) 34%, transparent); }
.amber-mg-day.h3 { background: color-mix(in srgb, var(--accent) 58%, transparent); }
.amber-mg-day.h4 { background: color-mix(in srgb, var(--accent) 88%, transparent); }
.amber-mg-day.h3, .amber-mg-day.h4 { color: #fff; }
.amber-mg-day.h1, .amber-mg-day.h2 { color: var(--text); }
/* 今天在热力底上保留描边标识;今天 0 条时仍是原 accent 实心圆 */
.amber-mg-day.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.amber-mg-day.today.h1.has-entry::after, .amber-mg-day.today.h2.has-entry::after { background: var(--accent); }

/* ── 月网格改版:正圆热力底 + 日期下方条数(清掉外层椭圆底,全部移进内层圆) ── */
.amber-mg-day {
  background: transparent; border: none; box-shadow: none;
  height: auto; line-height: normal;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.amber-mg-day.today { background: transparent; color: var(--text); box-shadow: none; }
.amber-mg-day.selected:not(.today) { border: none; box-shadow: none; }
.amber-mg-day.h1, .amber-mg-day.h2, .amber-mg-day.h3, .amber-mg-day.h4 { background: transparent; }
.amber-mg-num {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1;
}
.amber-mg-day.h1 .amber-mg-num { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.amber-mg-day.h2 .amber-mg-num { background: color-mix(in srgb, var(--accent) 34%, transparent); }
.amber-mg-day.h3 .amber-mg-num { background: color-mix(in srgb, var(--accent) 58%, transparent); }
.amber-mg-day.h4 .amber-mg-num { background: color-mix(in srgb, var(--accent) 88%, transparent); }
.amber-mg-day.h3 .amber-mg-num, .amber-mg-day.h4 .amber-mg-num { color: #fff; }
.amber-mg-day.h1 .amber-mg-num, .amber-mg-day.h2 .amber-mg-num { color: var(--text); }
.amber-mg-day.today .amber-mg-num { background: var(--accent); color: #fff; box-shadow: inset 0 0 0 1.5px var(--accent); }
.amber-mg-day.selected:not(.today) .amber-mg-num { box-shadow: inset 0 0 0 1.5px var(--accent); }
.amber-mg-count {
  font-size: 10px; line-height: 12px; min-height: 12px;
  color: var(--text-dim); font-weight: 400;
}
.amber-mg-day.today .amber-mg-count { color: var(--accent); font-weight: 600; }
/* 有日记的小圆点挪到数字圆右上角(顺手修了上游 content 为空的坏规则,之前圆点根本没渲染);
   原来在圆底下,现在那儿是条数 */
.amber-mg-day.has-entry::after {
  content: ""; position: absolute; top: 1px; bottom: auto; left: calc(50% + 13px);
  transform: none; width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.amber-mg-day.today.has-entry::after { background: var(--accent); }
/* 有每日心情时：用 SVG 表情盖在日期圆右上角，隐藏原来的小紫点 */
.amber-mg-day.has-mood::after { display: none; }
.amber-mg-num { position: relative; }
.amber-mg-mood {
  position: absolute; top: -4px; right: -6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 0 0 1px rgba(140,100,180,0.18), 0 1px 3px rgba(0,0,0,0.08);
  pointer-events: none; display: block;
}
.amber-week .wd .num { position: relative; }
.amber-wd-mood {
  position: absolute; top: -3px; right: -5px;
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 0 0 1px rgba(140,100,180,0.18);
  pointer-events: none; display: block;
}


/* ── Mind chrome on Lumen ── */
.amber-page {
  --paper: #f7f4ef;
  --ink: #2a241c;
  --mute: #9a9186;
  background: none !important;
  color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  overflow-x: visible;
  z-index: 0;
}
#page-amber.page {
  padding-left: 0;
  padding-right: 0;
}
html.desktop #page-amber {
  padding: 0 0 48px !important;
  max-width: none;
  margin: 0;
}
.amber-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--paper);
  background-image: var(--amber-wall, none);
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
.amber-moon, .amber-pearls, .amber-title-area, .amber-avatars, .amber-ym-row,
.amber-week-head, .amber-ribbon { display: none !important; }

.amber-menu-btn {
  position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 10px; z-index: 50;
  width: 36px; height: 36px; border-radius: 50%;
  background: none; border: 0;
  color: var(--ink); font-size: 18px;
  backdrop-filter: none;
}

.mind-top {
  display: grid; grid-template-columns: 44px 1fr 44px;
  align-items: start; padding: calc(12px + env(safe-area-inset-top, 0px)) 8px 2px;
  max-width: 430px; margin: 0 auto; position: relative; z-index: 6;
}
.mind-head { text-align: center; min-width: 0; }
.mind-top b {
  display: block;
  text-align: center; font-weight: 500;
  font-size: 22px; letter-spacing: .04em;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color: var(--ink); cursor: pointer;
}
#page-amber .amber-subtitle {
  display: block !important;
  margin: 2px 0 0;
  padding: 0 4px;
  color: var(--mute);
  line-height: 1.25;
}

.amber-week {
  margin: 0 auto; padding: 0;
  background: none; backdrop-filter: none;
  border: 0; border-radius: 0;
  max-width: 430px;
}
.amber-week-nav {
  display: grid; grid-template-columns: 28px 1fr 28px;
  align-items: start; padding: 8px 4px 0;
  gap: 0;
}
.amber-week-nav .amber-week-days {
  display: grid; grid-template-columns: repeat(7, 1fr);
  flex: none; text-align: center;
}
.amber-day-arr {
  width: auto; height: auto; border-radius: 0;
  background: none; border: 0; backdrop-filter: none;
  color: var(--mute); font-size: 18px; padding-top: 18px;
}

.amber-week .wd { text-align: center; cursor: pointer; }
.amber-week .wd .lab {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 11px; color: var(--mute); letter-spacing: .08em;
}
.amber-week .wd .num {
  margin: 6px auto 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #b9b1a6;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
}
.amber-week .wd.on .num { color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--ink); }
.amber-week .wd.dim .num { color: #d0cac0; }
.amber-week .wd.h1 .num { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink); }
.amber-week .wd.h2 .num { background: color-mix(in srgb, var(--accent) 34%, transparent); color: var(--ink); }
.amber-week .wd.h3 .num { background: color-mix(in srgb, var(--accent) 58%, transparent); color: #fff; }
.amber-week .wd.h4 .num { background: color-mix(in srgb, var(--accent) 88%, transparent); color: #fff; }
.amber-week .wd.on.h3 .num, .amber-week .wd.on.h4 .num { color: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); }
.amber-week .wd .count {
  font-size: 10px; line-height: 1; min-height: 10px; margin-top: 2px;
  color: var(--mute);
}
.amber-week .wd.on .count { color: var(--ink); font-weight: 600; }

.mind-sky {
  position: relative; height: 180px; margin: 4px auto 0;
  max-width: 430px; overflow: hidden;
}
.mind-sky .art {
  position: absolute; left: 0; right: 0; top: 0;
  height: 232px;
  transform: scale(0.8);
  transform-origin: top center;
  clip-path: polygon(
    0% 0%,
    100% 0%,
    100.00% 77.59%,
    93.30% 78.00%,
    86.66% 78.58%,
    80.08% 79.31%,
    73.56% 80.19%,
    67.10% 81.19%,
    60.70% 82.30%,
    54.36% 83.51%,
    48.08% 84.81%,
    41.86% 86.17%,
    35.70% 87.60%,
    29.60% 89.06%,
    23.56% 90.56%,
    17.58% 92.07%,
    11.66% 93.58%,
    5.80% 95.08%,
    0.00% 96.55%
  );
}
.mind-sky svg.chart {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  transform: translate(36px, 28px);
}
.mind-sky svg.cut {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 3; pointer-events: none;
}
.mind-moon {
  position: absolute; left: 50%; top: 40px;
  width: 228px; height: 228px; margin-left: -78px;
  background: transparent; border-radius: 50%;
  overflow: hidden; z-index: 2;
  opacity: .75;
}
.mind-moon img {
  width: 100%; height: 100%; display: block;
  image-rendering: auto;
}
.mind-hero {
  display: flex; align-items: baseline; gap: 10px;
  position: relative; z-index: 5;
  margin: -6px auto 0; padding: 0 22px 18px;
  max-width: 430px;
}
.mind-hero .day {
  font-size: 64px; line-height: .9; font-weight: 500;
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.03em; color: var(--ink);
}
.mind-hero .meta {
  font-size: 13px; color: var(--mute); letter-spacing: .16em;
  font-family: "Cormorant Garamond", Georgia, serif;
}

.amber-cards-wrap { max-width: 430px; }
.amber-month-grid { background: var(--paper); }

/* Adaptive type on wallpaper (page-on-dark from syncPageTitleInk) */
#page-amber.page-on-dark {
  --ink: #f6f1ea;
  --mute: rgba(246, 241, 234, .72);
}
#page-amber.page-on-dark .mind-top b,
#page-amber.page-on-dark .mind-hero .day {
  text-shadow: 0 1px 10px rgba(0,0,0,.45);
}
#page-amber.page-on-dark .mind-hero .meta,
#page-amber.page-on-dark .amber-week .wd .lab,
#page-amber.page-on-dark .amber-week .wd .count,
#page-amber.page-on-dark .amber-menu-btn,
#page-amber.page-on-dark .amber-day-arr {
  text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
#page-amber.page-on-dark .amber-week .wd .num {
  color: rgba(246, 241, 234, .7);
  text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
#page-amber.page-on-dark .amber-week .wd.dim .num {
  color: rgba(246, 241, 234, .38);
}
#page-amber.page-on-dark .amber-week .wd.on .num,
#page-amber.page-on-dark .amber-week .wd.h1 .num,
#page-amber.page-on-dark .amber-week .wd.h2 .num {
  color: var(--ink);
}
#page-amber.page-on-light .mind-top b,
#page-amber.page-on-light .mind-hero .day,
#page-amber.page-on-light .mind-hero .meta {
  text-shadow: none;
}

/* dual moods: single stays corner; pair snugs together at top center */
.amber-mg-day, .amber-mg-num, .amber-week .wd, .amber-week .wd .num {
  overflow: visible !important;
}
.amber-mg-day { border-radius: 0; }
.amber-mg-mood, .amber-wd-mood { z-index: 2; }
.amber-mg-mood.is-user { top: -5px; right: -4px; left: auto; }
.amber-mg-mood.is-ai { top: -5px; left: -4px; right: auto; }
.amber-wd-mood.is-user { top: -4px; right: -3px; left: auto; }
.amber-wd-mood.is-ai { top: -4px; left: -3px; right: auto; }
/* pair: sit side-by-side on the top rim, almost touching */
.amber-mg-day.has-dual .amber-mg-mood.is-ai {
  top: -6px; left: calc(50% - 15px); right: auto;
}
.amber-mg-day.has-dual .amber-mg-mood.is-user {
  top: -6px; left: calc(50% + 1px); right: auto;
}
.amber-week .wd.has-dual .amber-wd-mood.is-ai {
  top: -5px; left: calc(50% - 13px); right: auto;
}
.amber-week .wd.has-dual .amber-wd-mood.is-user {
  top: -5px; left: calc(50% + 1px); right: auto;
}
