/* Weekly planner: keep day settings inside the compact Day cards. */


/* Final weekly card overrides (kept last so legacy planner rules cannot win). */


/* Day-card side area: large sticker with the overall status directly below it. */


.site-header{
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 17px;
  color: inherit;
  text-decoration: none;
}

.brand img{
  width: 96px;
  height: 44px;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.brand-divider{
  width: 1px;
  height: 34px;
  background: var(--line);
}

.brand > span:last-child{
  display: grid;
  gap: 3px;
}

.brand strong{
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 17px;
  letter-spacing: 0.03em;
}

.brand small{
  color: var(--ink-soft);
  font-size: 11px;
}

.header-tools{
  display: flex;
  align-items: center;
  gap: 8px;
}

.local-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  margin-right: 5px;
  border: 1px solid rgba(54, 165, 139, 0.2);
  border-radius: 999px;
  color: #247d69;
  background: rgba(231, 249, 243, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.local-badge i{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #42b397;
  box-shadow: 0 0 0 4px rgba(54, 165, 139, 0.12);
}

main,
footer{
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}


.section-heading p{
  max-width: 34rem;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}


.dialog-fields{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
}


.section-heading{
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 34px;
}

.section-heading h2{
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}


footer{
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 46px;
  border-top: 1px solid var(--line);
  color: #918d9b;
  font-size: 11px;
}

.dialog{
  width: min(650px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 28px;
  background: transparent;
}

.dialog::backdrop{
  background: rgba(35, 31, 47, 0.38);
  backdrop-filter: blur(8px);
}

.dialog-card{
  max-height: calc(100vh - 30px);
  padding: 34px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  background: #fffdfb;
  box-shadow: 0 34px 100px rgba(35, 31, 47, 0.28);
}

.dialog-card--wide{
  width: min(760px, calc(100vw - 30px));
}

.dialog:has(.dialog-card--wide){
  width: min(760px, calc(100% - 30px));
}

.dialog-head{
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.dialog-head h2{
  margin-bottom: 0;
  font-size: 27px;
  letter-spacing: -0.03em;
}

.icon-button{
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-soft);
  background: rgba(36, 35, 53, 0.05);
  font-size: 23px;
  line-height: 1;
}

.icon-button:hover{
  background: rgba(36, 35, 53, 0.1);
}


.color-picker{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.color-picker legend{
  width: 100%;
  margin-bottom: 12px;
}

.color-picker label{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
}

.color-picker input{
  position: absolute;
  opacity: 0;
}

.color-picker label > span{
  width: 20px;
  height: 20px;
  border: 4px solid white;
  border-radius: 50%;
  outline: 1px solid var(--line);
  background: var(--swatch);
  box-shadow: 0 2px 7px rgba(50, 44, 64, 0.14);
}

.color-picker input:checked + span{
  outline: 2px solid var(--swatch);
  outline-offset: 2px;
}

.dialog-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 30px;
}

.dialog-actions--split{
  justify-content: initial;
}

.dialog-spacer{
  flex: 1;
}


.sticker-tabs{
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #f4f1f5;
}

.sticker-tab{
  flex: 1;
  min-height: 35px;
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.sticker-tab.is-active{
  color: var(--ink);
  background: white;
  box-shadow: 0 3px 12px rgba(57, 47, 68, 0.08);
}

.sticker-grid{
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  max-height: 188px;
  margin-top: 12px;
  padding: 2px;
  overflow-y: auto;
}

.sticker-item{
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  padding: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #f8f6f7;
}

.sticker-item img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sticker-item:hover{
  background: #fff0f2;
}

.sticker-item.is-selected{
  border-color: var(--coral);
  background: #fff5f6;
}

.sticker-none{
  color: #9c97a5;
  font-size: 11px;
  font-weight: 700;
}

.toast{
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 30px;
  padding: 12px 18px;
  border-radius: 12px;
  color: white;
  background: rgba(36, 35, 53, 0.93);
  box-shadow: 0 12px 30px rgba(36, 35, 53, 0.24);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible{
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 899.98px){
  .site-header{
    min-height: 88px;
  }

  .local-badge{
    display: none;
  }


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

@media (max-width: 650px){
  .site-header,
main,
footer{
    width: min(100% - 28px, 1180px);
  }

  .site-header{
    align-items: center;
  }

  .brand{
    gap: 10px;
  }

  .brand img{
    width: 73px;
    height: 34px;
  }

  .brand-divider,
.brand small{
    display: none;
  }

  .brand strong{
    font-size: 13px;
  }

  .header-tools{
    gap: 0;
  }

  .header-tools .text-button{
    padding-inline: 7px;
    font-size: 12px;
  }


  .dialog-fields{
    grid-template-columns: 1fr;
  }

  .field--wide{
    grid-column: auto;
  }


  .section-heading{
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 24px;
  }

  .section-heading .primary-button{
    width: 100%;
  }


  .dialog-card{
    padding: 26px 20px;
    border-radius: 22px;
  }

  .color-picker{
    display: grid;
    grid-template-columns: 1fr 1fr;
  }


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

  .dialog-actions--split{
    flex-wrap: wrap;
  }

  .dialog-spacer{
    display: none;
  }

  #deleteNodeButton{
    width: 100%;
    margin-bottom: 4px;
  }

  footer{
    flex-direction: column;
  }
}

/* Weekly planner: compact header and yes/no completion rows */


@media (prefers-reduced-motion: reduce){
  html{
    scroll-behavior: auto;
  }

  *,
*::before,
*::after{
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 2026 scrapbook redesign */
body{
  background:
    linear-gradient(rgba(255, 252, 244, 0.92), rgba(255, 252, 248, 0.94)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(231, 160, 168, 0.13) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(143, 122, 234, 0.11) 31px 32px),
    #fffaf1;
}

body::before{
  opacity: 0.12;
  background-size: 18px 18px;
}

.site-header{
  min-height: 92px;
}

.brand img{
  width: 84px;
  height: 38px;
  object-fit: contain;
}

.brand strong{
  font-weight: 900;
}

.brand small{
  color: #8d7f8d;
}

.header-tools{
  padding: 5px;
  border: 1px solid rgba(98, 78, 111, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 8px 28px rgba(82, 56, 78, 0.06);
}

.header-tools .text-button{
  min-width: 52px;
}

.header-tools .reset-data-button{
  color: #a96673;
}

.header-tools .reset-data-button:hover{
  color: #c54860;
  background: #fff0f3;
}


.section-heading .eyebrow{
  display: block;
  min-height: 0;
  padding: 0;
  color: var(--member-diana-ink);
  background: transparent;
  letter-spacing: .16em;
  transform: none;
}

.section-heading h2{
  color: #252442;
  font-weight: 950;
}

.section-heading .primary-button,
.dialog-actions .primary-button{
  border-radius: var(--control-radius);
  background: var(--member-eileen);
  box-shadow: 0 10px 22px rgba(87, 102, 144, .2);
}


.secondary-button{
  border-radius: var(--control-radius);
  color: var(--member-eileen-ink);
  border-color: rgba(87, 102, 144, .16);
  background: var(--member-eileen-soft);
}

.dialog-card{
  border-radius: 17px 30px 18px 26px;
  background:
    repeating-linear-gradient(0deg, transparent 0 37px, rgba(196, 157, 176, 0.06) 37px 38px),
    #fffdfb;
}


@media (max-width: 760px){
  .site-header{
    min-height: 76px;
  }


}

@media (max-width: 480px){
  .brand-divider,
.brand > span:last-child{
    display: none;
  }

  .header-tools{
    background: transparent;
    box-shadow: none;
  }


}


.avatar-sticker-grid{
  grid-template-columns: repeat(8, minmax(0, 1fr));
  max-height: min(430px, 48vh);
  padding: 10px 3px 3px;
}


@media (max-width: 650px){


  .avatar-sticker-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


/* Long-term chart navigation and editable joke library */


.joke-editor-copy{
  margin: -7px 0 18px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.75;
}

.joke-editor-list{
  display: grid;
  gap: 10px;
  max-height: min(470px, 54vh);
  padding: 3px 5px 3px 2px;
  overflow-y: auto;
}

.joke-editor-row{
  display: grid;
  grid-template-columns: 32px minmax(0, 1.3fr) minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(103, 82, 119, 0.1);
  border-radius: 12px;
  background: rgba(255, 250, 248, 0.82);
}

.joke-editor-number{
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  align-self: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #ff7791, #8f7aea);
  font-size: 11px;
  font-weight: 900;
}

.joke-editor-row textarea{
  min-height: 66px;
  resize: vertical;
}

.joke-remove-row{
  width: 34px;
  height: 44px;
  border: 0;
  border-radius: 9px;
  color: #b18e98;
  background: transparent;
  cursor: pointer;
  font-size: 19px;
}

.joke-remove-row:hover{
  color: #d4475f;
  background: rgba(212, 71, 95, 0.08);
}

.joke-add-row{
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 1px dashed rgba(143, 122, 234, 0.32);
  border-radius: 11px;
  color: #705bbb;
  background: #f5f1ff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.joke-editor-actions{
  flex-wrap: wrap;
}


@media (max-width: 850px){


  .joke-editor-row{
    grid-template-columns: 29px minmax(0, 1fr) 32px;
  }

  .joke-editor-row .field:nth-of-type(2){
    grid-column: 2 / 3;
  }

  .joke-remove-row{
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
  }
}

@media (max-width: 560px){


  .joke-editor-row{
    grid-template-columns: 26px minmax(0, 1fr) 30px;
    padding: 10px 8px;
  }

  .joke-editor-actions > button{
    flex: 1 1 42%;
  }
}


/* Weekly plan timeline, daily schedule and AI handoff */


.day-editor-columns{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.day-editor-block{
  min-width: 0;
  padding: 17px;
  border: 1px solid rgba(67, 59, 80, 0.08);
  border-radius: 18px;
}

.day-editor-block--plan{ background: #fff9f2; }
.day-editor-block--record{ background: #f3faf7; }

.day-editor-head{
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.day-editor-head > div{
  display: grid;
  gap: 3px;
}

.day-editor-head strong{
  font-size: 13px;
}

.day-editor-head span{
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.day-editor-head button{
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  color: #716587;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(81, 69, 96, 0.08);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

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

.day-pair-row{
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.35fr) 28px;
  align-items: end;
  gap: 7px;
}

.day-pair-row .field{
  gap: 4px;
}

.day-pair-row .field > span{
  font-size: 9px;
}

.day-pair-row input{
  height: 38px;
  padding: 0 10px;
  font-size: 11px;
}

.day-pair-row > button{
  display: grid;
  width: 28px;
  height: 28px;
  margin-bottom: 5px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #a27c87;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.day-notes-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.day-status-fieldset{
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.day-status-fieldset legend{
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 900;
}

.day-status-options{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.day-status-option{
  cursor: pointer;
}

.day-status-option input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.day-status-option span{
  display: grid;
  min-height: 64px;
  align-content: center;
  gap: 3px;
  padding: 10px 13px;
  border: 1px solid rgba(70, 63, 82, 0.1);
  border-radius: 14px;
  color: #5d5765;
  background: #faf9fb;
  font-size: 12px;
  font-weight: 950;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.day-status-option small{
  color: #96909c;
  font-size: 9px;
  font-weight: 600;
}

.day-status-option input:focus-visible + span{
  outline: 3px solid rgba(143, 122, 234, 0.2);
  outline-offset: 2px;
}

.day-status-option input:checked + span{
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(74, 59, 85, 0.09);
}

.day-status-option--missed input:checked + span{
  color: #445176;
  border-color: rgba(87, 102, 144, 0.32);
  background: #eef0f6;
}

.day-status-option--okay input:checked + span{
  color: #a95878;
  border-color: rgba(231, 153, 176, 0.42);
  background: #fff0f5;
}

.day-status-option--great input:checked + span{
  color: #a94f49;
  border-color: rgba(219, 125, 116, 0.42);
  background: #fff0ed;
}


@media (max-width: 820px){


  .day-editor-columns,
.day-notes-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px){


  .day-status-options{
    grid-template-columns: 1fr;
  }


  .day-pair-row{
    grid-template-columns: 1fr 28px;
    padding-bottom: 9px;
    border-bottom: 1px dashed rgba(71, 62, 83, 0.09);
  }

  .day-pair-row .field:nth-child(2){
    grid-column: 1;
  }

  .day-pair-row > button{
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }

  .day-editor-head{
    align-items: stretch;
    flex-direction: column;
  }


}


/* Compact weekly navigation and direct day editing */


/* Final weekly card overrides (kept last so legacy planner rules cannot win). */
