/* Amber diary — moon pearl lace */

.amber-page {
  min-height: 100vh;
  background: linear-gradient(175deg, #f3edf7 0%, #e8dff0 35%, #ede5f5 70%, #f7f2fa 100%);
  background-size: cover;
  padding: 0 0 120px;
  position: relative;
  overflow-x: hidden;
}
.amber-moon {
  position: absolute; top: -20px; left: -30px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #f8f4ff 0%, #e4daf2 55%, #cfc0e4 100%);
  box-shadow: 0 0 30px rgba(180,160,220,0.2), inset -12px -10px 20px rgba(150,120,200,0.12);
  opacity: 0.82; z-index: 0;
}
.amber-pearls {
  position: absolute; top: 60px; left: 52px;
  display: flex; 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%, #f0eaf8 50%, #ddd4ea 100%);
  box-shadow: 0 1px 4px rgba(160,140,200,0.25);
}
.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 rgba(160,140,200,0.3);
  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 rgba(180,160,210,0.25);
  backdrop-filter: blur(8px); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #8B70AD; 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: #7B5EA7;
  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 { font-size: 11px; letter-spacing: 2px; color: #9B85B5; margin-top: 6px; }
.amber-avatars {
  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 rgba(180,160,210,0.35);
  background: rgba(240,235,248,0.6) no-repeat center / cover;
  object-fit: cover; box-shadow: 0 2px 10px rgba(160,140,200,0.15);
}
.amber-week {
  margin: 16px auto; padding: 14px 12px;
  background: rgba(255,255,255,0.55); backdrop-filter: blur(10px);
  border: 1px solid rgba(180,160,210,0.2); 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: #9B85B5;
  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: #5a4a6a; padding: 4px 0;
  cursor: pointer;
}
.amber-week-day.today .amber-day-num {
  background: #B8A4D4; 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 #B8A4D4; 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: #B8A4D4; 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 rgba(180,160,210,0.2);
  border-radius: 18px; padding: 20px 16px;
  display: flex; gap: 14px; min-height: 200px;
  position: relative; overflow: hidden;
  box-shadow: 0 2px 12px rgba(160,140,200,0.08);
  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 rgba(180,160,210,0.2); padding-right: 12px;
}
.amber-card-month { font-size: 12px; color: #9B85B5; letter-spacing: 1px; }
.amber-card-day { font-size: 36px; font-weight: 300; color: #7B5EA7; line-height: 1.2; }
.amber-card-weekday { font-size: 11px; color: #B8A4D4; margin-top: 2px; }
.amber-card-body { flex: 1; display: flex; flex-direction: column; }
.amber-card-time { font-size: 11px; color: #9B85B5; margin-bottom: 8px; }
.amber-card-time .heart { color: #B388D9; }
.amber-card-text {
  font-size: 14px; line-height: 2.2; color: #3D2F4A;
  white-space: pre-wrap; flex: 1;
}
.amber-card-mood {
  display: inline-block; font-size: 11px; color: #8B6AAD;
  background: rgba(140,100,180,0.06); border: 1px solid rgba(140,100,180,0.15);
  border-radius: 999px; padding: 2px 10px; margin-bottom: 6px;
}
.amber-dots { display: flex; justify-content: center; gap: 6px; padding: 12px 0; }
.amber-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #d4cae4; transition: background 0.2s;
}
.amber-dot.active { background: #8B6AAD; }
.amber-empty { text-align: center; padding: 50px 20px; color: #B8A0D0; 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, #B388D9, #8B5FBF); border: none;
  color: white; font-size: 24px; font-weight: 300; cursor: pointer;
  box-shadow: 0 4px 16px rgba(140,95,191,0.35); 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: #f9f5fd; 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: #7B5EA7; }
.amber-close { background: none; border: none; font-size: 20px; color: #9B85B5; cursor: pointer; padding: 4px 8px; }
.amber-moods { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.amber-mood-btn {
  background: none; border: 1px solid rgba(180,160,210,0.3);
  border-radius: 999px; padding: 4px 11px; font-size: 12px;
  cursor: pointer; color: #9B85B5;
}
.amber-mood-btn.on { border-color: #8B6AAD; color: #8B6AAD; background: rgba(140,100,180,0.06); }
.amber-editor textarea {
  width: 100%; min-height: 100px;
  border: 1px solid rgba(180,160,210,0.3); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; line-height: 1.9;
  color: #3D2F4A; background: rgba(255,255,255,0.6);
  resize: none; outline: none; font-family: inherit;
}
.amber-editor textarea:focus { border-color: #8B6AAD; }
.amber-editor textarea::placeholder { color: #B8A0D0; }
.amber-save {
  width: 100%; margin-top: 12px; padding: 11px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #B388D9, #8B5FBF);
  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: #f9f5fd; 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: #7B5EA7; margin-bottom: 20px;
}
.amber-set-group { margin-bottom: 22px; }
.amber-set-label { font-size: 12px; color: #9B85B5; 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 rgba(180,160,210,0.3);
  border-radius: 10px; padding: 8px 14px; font-size: 12px;
  color: #7B5EA7; cursor: pointer; font-family: inherit;
}
.amber-set-btn:active { background: rgba(180,160,210,0.15); }
.amber-set-color {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid rgba(180,160,210,0.3); cursor: pointer;
}
.amber-set-close {
  position: absolute; top: 18px; right: 18px;
  background: none; border: none; font-size: 20px;
  color: #9B85B5; 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 rgba(180,160,210,0.25);
  color: #9B85B5; 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: rgba(200,160,210,0.2); }
