/* The existing paper, sage and lilac palette carries through the new tools. */
.reflection-panel {
  min-width: 0;
  padding: 1rem 1.15rem;
  margin: .8rem 0;
  border: 1px solid #dbe3d3;
  border-radius: 17px;
  background: #f4f7ef;
  color: #33453b;
}
.reflection-panel h3, .reflection-panel h4, .reflection-panel p { margin: 0; }
.reflection-panel h3 { font-size: 1rem; }
.reflection-panel p { line-height: 1.65; overflow-wrap: anywhere; }
.reflection-panel blockquote {
  margin: .6rem 0 0;
  color: #4d6054;
  font-size: 1rem;
  line-height: 1.65;
}
.reflection-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .65rem; }
.reflection-fields { display: grid; gap: .65rem; }
.reflection-fields label { display: grid; gap: .3rem; font-weight: 600; }
.reflection-fields :is(input:not([type=checkbox]),textarea,select) {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: .65rem .7rem;
  border: 1px solid #adbba7;
  border-radius: 9px;
  background: #fffefb;
  color: #303c35;
  font: inherit;
  font-size: 16px;
}
.reflection-fields textarea { resize: vertical; }
.reflection-fields button[type=submit] { justify-self: start; }
.reflection-fields input:focus-visible, .reflection-fields textarea:focus-visible,
.reflection-fields select:focus-visible, .reflection-panel button:focus-visible,
.bottom-letter .message-bottom { justify-content: space-between; gap: .65rem; }
.message-actions, .letter-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .7rem; }
.message-bottom .message-actions button {
  align-items: center;
  min-height: 38px;
  padding: .35rem .65rem;
  border: 1px solid #d9dfd0;
  border-radius: 9px;
  background: #f9faf3;
  color: #435b46;
  font-size: .8125rem;
  font-weight: 650;
  letter-spacing: 0;
}
.message-bottom .message-actions button:hover { background: #edf1e5; }
.message-bottom #save-quote { align-items: center; justify-content: center; flex: none; color: #796958; }
.message-bottom #save-quote:focus-visible, .message-actions button:focus-visible, .letter-list-entry:focus-visible {
  outline: 2px solid #708767;
  outline-offset: 2px;
}
.letter-list {
  display: grid;
  gap: .45rem;
  margin: .75rem 0 1rem;
}
.letter-list-entry {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto 18px;
  align-items: center;
  gap: .45rem;
  min-height: 54px;
  padding: .6rem .75rem;
  border: 1px solid #dfe5d7;
  border-radius: 11px;
  background: #f7f9f3;
  color: #344c3e;
  text-align: left;
}
.letter-list-entry:hover { border-color: #a9b9a0; background: #edf3e8; }
.letter-list-entry strong, .letter-list-entry > span > span { display: block; overflow-wrap: anywhere; }
.letter-list-entry > span > span, .letter-list-entry small { color: #54675a; font-size: .8125rem; }
.letter-list-entry small { white-space: nowrap; }
.letter-list-entry svg { grid-column: 3; width: 17px; height: 17px; }
.letter-paper { background: #f2f1e9; border-color: #e4e2d5; }
.letter-paper .letter-subject { margin-bottom: .45rem; color: #54685a; font-size: .8125rem; font-weight: 600; }
.reply-paper { background: #f0eef5; border-color: #e4ddeb; }
.reply-paper .reply-text { margin: .45rem 0 .6rem; white-space: pre-wrap; }
.letter-detail-actions { margin-top: .85rem; }
.letter-privacy { font-size: .8125rem; color: #54675a; }
.remove-reply-controls { margin-top: .65rem; }
.remove-reply-controls[hidden] { display: none; }
.letter-actions .text-button { min-height: 38px; color: #4c634f; }

.card-suggestions button:focus-visible, .reflection-panel summary:focus-visible {
  outline: 2px solid #58725b;
  outline-offset: 2px;
}
.reflection-panel summary { cursor: pointer; font-size: .9375rem; font-weight: 700; line-height: 1.45; }
.reflection-panel summary span { margin-left: .35rem; color: #576b5c; font-size: .8125rem; font-weight: 500; white-space: nowrap; }
.reflection-panel .reflection-columns { margin: .65rem 0; }
.reflection-panel .reflection-columns p {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .6rem .75rem;
  background: #fffefa;
  border: 1px solid #e0e6d9;
  border-radius: 9px;
}
.mbti-examples { margin: .8rem 0 1.15rem; }
.mbti-examples > h3 { font-size: 1rem; margin: 0 0 .35rem; }
.mbti-examples .reflection-panel { margin: .45rem 0; }
.example-prompt { color: #425a4b; font-size: .875rem; }

.pair-tool { background: #f4e9ee; }
.pair-illustration { position: relative; flex: none; width: clamp(48px,7vw,84px); height: 66px; }
.pair-illustration svg {
  position: absolute;
  width: 48%;
  height: auto;
  aspect-ratio: 1;
  inset: 14% auto auto 16%;
  padding: 7%;
  border-radius: 40%;
  background: #ead8e8;
  color: #786082;
  transform: rotate(-12deg);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45px;
}
.pair-illustration svg + svg { inset: 39% auto auto 45%; color: #4f6955; background: #dce9d4; transform: rotate(12deg); }
.pair-heading { text-align: center; margin: 0 0 .5rem; }
.pair-heading > span { display: block; margin-bottom: .4rem; color: #765b83; font-size: 2rem; }
.pair-question { margin: 1.2rem 0 .8rem; }
.pair-result { margin: .5rem 0; }
.pair-opener { background: #ede7f2; border-color: #dacde3; }

.journal-compare-entry { margin-bottom: .85rem; }
.journal-banner-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .85rem; }
.journal-banner-actions .text-button { color: #4c425e; }
.journal-footer { margin-top: .9rem; padding-top: .45rem; border-top: 1px solid #e6e8df; }
#journal-panel, .history-item > div { min-width: 0; }
.history-item strong { overflow-wrap: anywhere; }
.compare-chart { padding-bottom: .5rem; }
.compare-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; color: #43564a; font-weight: 600; }
.compare-axis { margin: .75rem 0; padding-top: .75rem; border-top: 1px solid #dbe3d3; }
.compare-axis h3 span { color: #647b68; }
.compare-axis p { color: #506458; font-size: .8125rem; margin-top: .2rem; }
.compare-row { display: grid; align-items: center; grid-template-columns: 5.2rem minmax(30px,1fr) 3.5rem; gap: .55rem; margin: .4rem 0; font-variant-numeric: tabular-nums; }
.compare-row > span:last-child { text-align: right; }
.compare-meter { height: 9px; border-radius: 10px; overflow: hidden; background: #dde4d6; }
.compare-meter > span { display: block; height: 100%; background: #54775d; }
.compare-row + .compare-row .compare-meter > span { background: #856593; }
.compare-notes .reflection-panel { margin: .2rem 0 .55rem; }
.compare-notes h3 { margin-bottom: .35rem; }
.inline-feedback { padding: .75rem 0; color: #4e5865; }

.mood-calendar { max-width: 540px; margin-inline: auto; }
.mood-header { display: grid; align-items: center; grid-template-columns: 42px 1fr 42px; text-align: center; }
.mood-header button {
  display: grid;
  place-items: center;
  width: 42px;
  min-height: 42px;
  border: 1px solid #d8e0d2;
  border-radius: 50%;
  background: #fffefa;
  color: #486653;
}
.mood-header button:disabled { opacity: .46; }
.mood-header button svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.mood-header button:first-child svg { transform: rotate(180deg); }
.mood-weekdays, .mood-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: .25rem; text-align: center; }
.mood-weekdays { margin: .65rem 0 .25rem; font-size: .8125rem; color: #58675a; }
.mood-day {
  display: grid;
  position: relative;
  place-items: center;
  gap: 0;
  min-height: 42px;
  min-width: 0;
  padding: .2rem 0;
  font-size: .875rem;
  color: #344339;
  background: #fffefa;
  border: 1px solid #dfe5db;
  border-radius: 8px;
}
.mood-day span:nth-child(2):empty { display: none; }
.mood-day[aria-pressed=true] { border: 2px solid #49664d; font-weight: 700; }
.mood-day[aria-current=date]:after { content: ''; position: absolute; top: 4px; right: 4px; width: 4px; height: 4px; background: #56775f; border-radius: 50%; }
.mood-day:disabled { background: #edf0e9; color: #69786c; border-color: transparent; }
.mood-day.bright, .mood-controls .bright { background: #f6ecc2; color: #624a20; }
.mood-day.calm, .mood-controls .calm { background: #dcebd8; color: #345943; }
.mood-day.mixed, .mood-controls .mixed { background: #eae0ef; color: #634777; }
.mood-day.anxious, .mood-controls .anxious { background: #f6e2d7; color: #714b37; }
.mood-day.tired, .mood-controls .tired { background: #e0e9f1; color: #43576d; }
.mood-selection { margin: .85rem 0 .6rem; }
.mood-selection h4 { margin-bottom: .45rem; }
.mood-controls { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.mood-controls button { display: flex; min-height: 40px; align-items: center; gap: .25rem; border: 1px solid transparent; padding: .3rem .55rem; border-radius: 22px; }
.mood-controls button[aria-pressed=true] { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.mood-summary { display: flex; flex-wrap: wrap; gap: .2rem .6rem; border-top: 1px solid #dbe3d3; padding-top: .65rem; font-size: .8125rem; }

.weekly-inspiration { background: #f2edf5; border-color: #e0d6e7; }
.weekly-inspiration h3 { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; margin-bottom: .35rem; }
.weekly-inspiration h3 span, .letter-period { color: #596857; font-size: .8125rem; font-weight: 500; }
#weekly-letter-title { margin: .15rem 0 .45rem; font-family: Georgia, 'Songti SC', serif; color: #465a47; font-size: clamp(1.2rem,3vw,1.6rem); }
.bottom-letter .message-card { min-height: 0; }
.bottom-letter .message-card p { max-width: 54ch; color: #4d6054; font-size: .9375rem; line-height: 1.65; }
.bottom-letter .message-top { align-items: center; }
.bottom-letter .message-card .letter-prompt, .letter-paper .letter-prompt {
  margin: .65rem 0 .35rem;
  padding-left: .65rem;
  border-left: 2px solid #a4b68f;
  color: #475f4c;
  font-weight: 600;
}
.message-bottom #save-quote { min-width: 44px; min-height: 44px; }

.card-suggestions { display: flex; flex-wrap: wrap; gap: .4rem; }
.card-suggestions button { min-height: 40px; padding: .3rem .55rem; text-align: left; white-space: normal; }
.reflection-fields .card-check { display: inline-flex; flex-direction: row; align-items: center; }
.card-check input { width: 18px; height: 18px; accent-color: #526f53; }
.card-art { max-width: 340px; margin: .9rem auto 1rem; overflow: hidden; border-radius: 12px; box-shadow: 0 6px 18px #38473523; }
.card-art canvas, .card-art img { display: block; width: 100%; height: auto; }
#modal #toast { position: sticky; left: auto; bottom: .75rem; width: fit-content; margin: -2.6rem auto 0; transform: translateY(.5rem); }
#modal #toast.visible { transform: translateY(0); }
.bazi-use-birthday { margin-top: .3rem; min-height: 38px; color: #476048; }

@media (max-width:700px) {
  .pair-illustration { width: 58px; height: 48px; }
  .journal-banner-actions { gap: .15rem .45rem; }
  .journal-banner-actions .text-button { padding: .35rem .25rem; margin: 0; }
}
@media (max-width:390px) {
  .reflection-panel { padding: .75rem; }
  .mood-grid, .mood-weekdays { gap: .15rem; }
  .compare-row { grid-template-columns: 4.15rem minmax(24px,1fr) 3rem; gap: .3rem; }
}
@media (max-width:350px) {
  .reflection-columns { grid-template-columns: 1fr; }
  .journal-tabs { display: flex; flex-wrap: wrap; }
}

.online-link:not([hidden]) { display: grid; gap: .6rem; }
.online-link .quiz-controls { margin: .25rem 0 0; }
.online-link .smallprint { margin: 0; }
.online-feedback:empty { display: none; }
.shared-card-text { white-space: pre-wrap; overflow-wrap: anywhere; }
