/* لُطف — one column, right to left, thumb-sized.

   Arabic is never letter-spaced or upper-cased: both break the joins between
   letters. Line heights run taller than Latin because the script does. */

:root {
  --ground: #FBF5EC;
  --sand: #F1E7DA;
  --line: #EADFD2;
  --line-strong: #D2C1AD;
  --ink: #231C18;
  --ink-2: #5A4E46;
  --muted: #6B5E55;
  --white: #FFFFFF;

  --c-accent: #C2462B;   /* compliment */
  --c-tint: #FCE9E1;
  --c-line: #F4CDBE;
  --a-accent: #3D4DB7;   /* advice */
  --a-tint: #E8EBFB;
  --a-line: #C9CFF3;
  --p-accent: #1F7A5A;   /* apology */
  --p-tint: #E3F3EC;
  --p-line: #BFE3D2;
  --r-accent: #8A5300;   /* request */
  --r-tint: #FBF0DC;
  --r-line: #EFD9AE;
  --coral: #E8704A;
  --ring: 0 0 0 4px rgba(232, 112, 74, 0.45);

  --ui: "IBM Plex Sans Arabic", "Segoe UI", "Geeza Pro", system-ui, sans-serif;
  --serif: "Noto Naskh Arabic", "Geeza Pro", serif;
  --ruqaa: "Aref Ruqaa", "Noto Naskh Arabic", serif;
}

* { box-sizing: border-box; }

/* A class that sets `display` outranks the UA's own [hidden] rule; without
   this, hiding a panel from script would do nothing visible. */
[hidden] { display: none !important; }

html, body { margin: 0; background: var(--ground); color: var(--ink); }
body {
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

.shell { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.view { flex: 1; display: flex; flex-direction: column; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.lead { margin: 0; font-size: 15px; line-height: 1.7; color: var(--muted); }
.hint { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.hint.pad { padding: 6px 4px 0; }
.label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 10px; }
.stack.wide { align-self: stretch; margin-top: 8px; }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.wordmark { font-family: var(--ruqaa); font-weight: 700; font-size: 30px; line-height: 1; }
.wordmark.small { font-size: 26px; }
.display-title { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 28px; line-height: 1.4; }
.display-title.mid { font-size: 26px; }

/* ---------- boot ---------- */
.boot { align-items: center; justify-content: center; }
.boot .wordmark { font-size: 48px; opacity: 0.8; }

/* ---------- buttons ---------- */
.btn {
  min-height: 56px; border-radius: 18px; border: 0; padding: 0 18px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 17px; font-weight: 700; text-decoration: none;
}
.btn.primary { background: var(--ink); color: var(--ground); }
.btn.accent { background: var(--c-accent); color: var(--white); }
.btn.accent.advice { background: var(--a-accent); }
.btn.accent.apology { background: var(--p-accent); }
.btn.accent.request { background: var(--r-accent); }
.btn.small-btn { min-height: 44px; font-size: 14px; padding: 0 14px; border-radius: 14px; }
.link-btn { min-height: 44px; border: 0; background: transparent; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.form-error.info { background: var(--sand); color: var(--ink); }
.btn.outline { min-height: 52px; background: transparent; border: 1.5px solid var(--line-strong); font-size: 16px; }
.btn:disabled { opacity: 0.5; }
.btn-pill { height: 26px; padding: 0 10px; border-radius: 13px; background: rgba(255, 255, 255, 0.2); font-size: 13px; display: inline-flex; align-items: center; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn.round { border-radius: 22px; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.pill-btn {
  position: relative; height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line);
  background: var(--white); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500;
}
.pill-btn .heart { color: var(--c-accent); }
.dot { position: absolute; top: -2px; left: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--coral); border: 2px solid var(--ground); }
.pill-soft { height: 40px; padding: 0 16px; border-radius: 20px; background: var(--sand); display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; align-self: center; }
.pill-soft.small { height: 32px; font-size: 14px; font-weight: 500; }
.dot-c { width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); }
.chip-soft { height: 26px; padding: 0 10px; border-radius: 13px; background: var(--sand); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; }
.tag-soft { height: 22px; padding: 0 8px; border-radius: 11px; background: var(--white); color: var(--muted); font-size: 11px; font-weight: 500; display: inline-flex; align-items: center; }

/* ---------- segmented controls ---------- */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 5px; background: var(--sand); border-radius: 17px; }
.seg > button {
  min-height: 46px; border: 0; border-radius: 13px; background: transparent; color: var(--ink-2);
  font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.seg.type > button[aria-pressed="true"][data-type="compliment"] { background: var(--c-accent); color: var(--white); }
.seg.type > button[aria-pressed="true"][data-type="advice"] { background: var(--a-accent); color: var(--white); }
.seg.type > button[aria-pressed="true"][data-type="apology"] { background: var(--p-accent); color: var(--white); }
.seg.type > button[aria-pressed="true"][data-type="request"] { background: var(--r-accent); color: var(--white); }
.seg.type.four > button { min-height: 44px; font-size: 15px; }
.seg.two { background: transparent; padding: 0; gap: 8px; }
.seg.two > button { min-height: 48px; border: 1.5px solid #E3D6C6; border-radius: 14px; background: transparent; color: var(--ink); font-weight: 500; }
.seg.two > button[aria-pressed="true"] { border-color: var(--ink); background: var(--white); font-weight: 700; }
.seg.small { display: inline-grid; padding: 3px; border-radius: 14px; }
.seg.small > button { min-height: 44px; min-width: 72px; border-radius: 11px; color: var(--ink); font-weight: 500; }
.seg.small > button[aria-pressed="true"] { background: var(--white); font-weight: 700; box-shadow: 0 1px 0 var(--line); }

/* ---------- enter ---------- */
.enter { padding: 22px 24px 24px; gap: 18px; }
.brand-row { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: var(--coral); display: inline-flex; align-items: center; justify-content: center; transform: rotate(8deg); }
.enter-hero { display: flex; align-items: center; gap: 16px; }
.enter-copy { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mini-deck { position: relative; width: 78px; height: 96px; flex-shrink: 0; }
.mini-back { position: absolute; right: 0; top: 6px; width: 60px; height: 84px; border-radius: 12px; background: var(--c-tint); border: 1px solid var(--c-line); transform: rotate(10deg); }
.mini-card { position: absolute; left: 0; top: 4px; width: 62px; height: 86px; border-radius: 12px; border: 4px solid var(--white); box-shadow: 0 14px 20px -12px rgba(60, 35, 20, 0.55); transform: rotate(-8deg); }
.card-back, .mini-card {
  background-color: var(--ink);
  background-image: radial-gradient(rgba(251, 245, 236, 0.16) 1.4px, transparent 1.6px);
  background-size: 11px 11px;
  display: flex; align-items: center; justify-content: center;
}
.q { width: 28px; height: 28px; border-radius: 50%; background: var(--ground); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1; }
.enter-form { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { font-size: 14px; font-weight: 700; color: var(--ink-2); padding: 0; }
.field.gender { flex-direction: row; align-items: center; gap: 12px; }
.field.gender > legend { float: right; margin-inline-end: 12px; line-height: 50px; }
.field input {
  height: 52px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: var(--white);
  padding: 0 14px; font-size: 17px; outline: none; width: 100%;
}
.field input:focus { border-color: var(--ink); }
.pass-wrap { position: relative; }
.pass-wrap input { padding-inline-start: 14px; padding-inline-end: 52px; }
.pass-wrap .icon-btn { position: absolute; left: 4px; top: 4px; }
.profile-step { display: flex; flex-direction: column; gap: 16px; }
.form-error { margin: 0; padding: 10px 14px; border-radius: 14px; background: #FDE3DC; color: #8E2B14; font-size: 14px; font-weight: 500; }
.enter-form .btn { margin-top: auto; }
.foot { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- app frame ---------- */
.app .main { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 16px; }
.topline { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 10px; }
.me { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar-btn { border: 0; padding: 0; background: transparent; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 22px; }
.avatar { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; background: var(--sand); color: var(--ink); }
.me-av { width: 36px; height: 36px; }
.avatar.anon { background: var(--ink); color: var(--ground); }
.avatar.av-example { background: #CDE7D8; color: #1F5B3B; }
.hello { font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hello b { color: var(--ink); }
.menu {
  position: absolute; top: 48px; right: 0; z-index: 10; min-width: 220px; padding: 8px;
  background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 36px -18px rgba(60, 35, 20, 0.45);
}
.menu-name { padding: 6px 10px; font-size: 13px; color: var(--muted); }
.menu-item { width: 100%; min-height: 44px; border: 0; border-radius: 10px; background: transparent; text-align: right; padding: 0 10px; font-size: 15px; }
.menu-item:hover { background: var(--sand); }

.tabs {
  position: sticky; bottom: 0; margin: 0 16px 16px; min-height: 64px; padding: 6px; border-radius: 22px;
  background: var(--ink); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
}
.tab {
  border: 0; border-radius: 16px; background: transparent; color: var(--ground);
  display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 16px; min-height: 52px;
}
.tab[aria-current="page"] { background: var(--ground); color: var(--ink); }
.badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--coral); color: var(--ink);
  font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.badge.locked { background: transparent; color: inherit; padding: 0; }

/* ---------- give ---------- */
.to-block { display: flex; flex-direction: column; gap: 6px; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; margin-left: -20px; padding-left: 20px; padding-bottom: 2px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.person-chip {
  flex-shrink: 0; min-height: 44px; padding: 0 5px 0 14px; border-radius: 22px; border: 1.5px solid #E3D6C6;
  background: transparent; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; white-space: nowrap;
}
.person-chip .avatar { width: 32px; height: 32px; font-size: 14px; }
.person-chip[aria-pressed="true"] { background: var(--white); font-weight: 700; border-color: var(--ink); }
.person-chip:disabled { opacity: 0.4; }
.advice-mode .person-chip[aria-pressed="true"] { border-color: var(--a-accent); }

.note-card { border-radius: 24px; padding: 14px 18px 12px; display: flex; flex-direction: column; gap: 6px; border: 1px solid; }
.note-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.compliment .note-label, .compliment-ink { color: var(--c-accent); }
.advice .note-label, .advice-ink { color: var(--a-accent); }
.note-card textarea, .note-text {
  min-height: 112px; border: 0; padding: 0; background: transparent; resize: none; outline: none;
  font-family: var(--serif); font-size: 20px; line-height: 1.75; color: var(--ink); width: 100%;
}
.note-text.empty { color: #9A8C80; }
.note-sig { align-self: flex-end; font-size: 14px; color: var(--muted); }
.starter {
  flex-shrink: 0; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1.5px dashed var(--line-strong);
  background: transparent; font-size: 14px; color: var(--ink-2); white-space: nowrap;
}
.starter.solo { align-self: flex-start; border-color: var(--c-accent); background: var(--white); color: var(--ink); font-size: 15px; }

.request-fields { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--r-tint); border: 1px solid var(--r-line); }
.request-fields input { height: 48px; border-radius: 14px; border: 1.5px solid var(--r-line); background: var(--white); padding: 0 12px; font-size: 16px; outline: none; }
.when-chip { flex-shrink: 0; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1.5px solid var(--r-line); background: transparent; font-size: 14px; }
.when-chip[aria-pressed="true"] { background: var(--white); border-color: var(--ink); font-weight: 700; }
.signed-note { background: var(--white); border: 1px dashed var(--line-strong); border-radius: 14px; padding: 10px 12px; }

/* ---------- sent ---------- */
.sent { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 12px; text-align: center; }
.sent-art { position: relative; width: 290px; height: 180px; }
.sent-back { position: absolute; right: 34px; top: 16px; width: 230px; height: 140px; border-radius: 20px; border: 1px solid; transform: rotate(-7deg); }
.sent-front {
  position: absolute; right: 14px; top: 20px; width: 250px; padding: 14px 16px; border-radius: 20px; border: 1px solid;
  transform: rotate(4deg); display: flex; flex-direction: column; gap: 4px; text-align: right;
  box-shadow: 0 14px 26px -16px rgba(60, 35, 20, 0.5); animation: drop-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sent-text { font-family: var(--serif); font-size: 16px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sent-check { position: absolute; left: 8px; top: 0; width: 52px; height: 52px; border-radius: 50%; color: var(--white); border: 4px solid var(--ground); display: flex; align-items: center; justify-content: center; background: var(--c-accent); }
.sent-check.advice { background: var(--a-accent); }
@keyframes drop-in { from { transform: translateY(-24px) rotate(-2deg); opacity: 0; } }

/* ---------- draw ---------- */
.hand-view { display: flex; flex-direction: column; align-items: stretch; gap: 8px; flex: 1; }
.hand-view .btn { margin-top: 4px; }
.hand { position: relative; width: 350px; max-width: 100%; height: 290px; margin: 6px auto 0; }
.fcard {
  position: absolute; top: 44px; width: 150px; height: 214px; padding: 7px; border: 0; border-radius: 20px;
  background: var(--white); box-shadow: 0 22px 30px -18px rgba(60, 35, 20, 0.6), 0 0 0 1px var(--line);
  transition: transform 480ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 380ms ease;
}
.fcard .card-back { width: 100%; height: 100%; border-radius: 14px; background-size: 13px 13px; }
.fcard .q { width: 58px; height: 58px; font-size: 32px; }
.fcard:nth-child(1) { right: 18px; transform: rotate(12deg); }
.fcard:nth-child(2) { right: 100px; top: 20px; transform: rotate(0deg); z-index: 2; }
.fcard:nth-child(3) { right: 182px; transform: rotate(-12deg); }
.fcard:not(:disabled):hover { box-shadow: 0 26px 34px -18px rgba(60, 35, 20, 0.7), 0 0 0 1px var(--line-strong); }
.hand.dim .fcard { opacity: 0.4; }
.hand.shuffling .fcard { transform: translateX(var(--to-center)) rotate(var(--stack-rot)); }
.fcard:nth-child(1) { --to-center: -82px; --stack-rot: -7deg; }
.fcard:nth-child(2) { --to-center: 0px; --stack-rot: 5deg; }
.fcard:nth-child(3) { --to-center: 82px; --stack-rot: -3deg; }
.fcard.picked { transform: translate(var(--to-center), -14px) rotate(0deg) scale(1.12); z-index: 5; }
.fcard.gone { transform: translateY(90px); opacity: 0; }
.hand.tour-active { border-radius: 24px; box-shadow: var(--ring); }
/* The fan is 350px wide; on narrower phones it shrinks as a whole rather than
   pushing the page sideways. `zoom` scales layout size too, unlike transform. */
@media (max-width: 389px) { .hand { zoom: 0.84; } }
@media (max-width: 339px) { .hand { zoom: 0.76; } }

.drew-row { display: flex; align-items: center; gap: 14px; }
.drew-icon { width: 56px; height: 56px; border-radius: 16px; border: 1px solid; display: inline-flex; align-items: center; justify-content: center; transform: rotate(8deg); }
.drew-word { font-family: var(--serif); font-weight: 700; font-size: 26px; line-height: 1.3; }
.reveal-card { border-radius: 28px; padding: 16px 22px 18px; display: flex; flex-direction: column; gap: 10px; border: 1px solid; box-shadow: 0 22px 34px -24px rgba(60, 35, 20, 0.55); }
.reveal-head { position: relative; display: flex; align-items: center; justify-content: space-between; }
.reveal-head .icon-btn { margin: -12px 0 -12px -14px; }
.reveal-head .menu { top: 36px; left: 0; right: auto; }
.reveal-text { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
.from-row { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.from-name { font-size: 15px; font-weight: 700; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-chip { min-height: 28px; padding: 2px 10px; border-radius: 14px; background: var(--white); font-size: 13px; display: inline-flex; align-items: center; }
.grid-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid-three .btn { min-height: 48px; font-size: 14px; padding: 0 8px; gap: 6px; }
.btn.details[aria-pressed="true"] { background: var(--sand); border-color: var(--ink); opacity: 1; }
.status-line { margin: 0; text-align: center; font-weight: 700; font-size: 14px; }
.flip-in { animation: flip-in 480ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes flip-in { from { transform: perspective(1000px) rotateY(90deg); } }
.btn.thank { border-color: var(--c-accent); color: var(--c-accent); background: var(--white); }
.btn.thank[aria-pressed="true"] { background: var(--c-accent); color: var(--white); opacity: 1; }
.btn.keep { background: var(--white); }
.btn.keep[aria-pressed="true"] { background: var(--sand); border-color: var(--ink); opacity: 1; }

/* ---------- echo & jar ---------- */
.sub-head { display: flex; align-items: center; gap: 12px; }
.push { margin-inline-start: auto; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { border-radius: 16px; background: var(--white); border: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; }
.stat.warm { background: var(--c-tint); border-color: var(--c-line); }
.stat-n { font-family: var(--serif); font-weight: 700; font-size: 24px; line-height: 1.3; }
.stat.warm .stat-n { color: var(--c-accent); }
.echo-item { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.echo-item.is-new { border: 1.5px solid var(--c-accent); }
.echo-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.new-badge { height: 22px; padding: 0 8px; border-radius: 11px; background: var(--coral); color: var(--ink); font-size: 11px; display: inline-flex; align-items: center; flex-shrink: 0; }
.echo-text { font-family: var(--serif); font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 30px; padding: 0 10px; border-radius: 15px; background: var(--sand); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.chip.strong { background: var(--c-accent); color: var(--white); font-weight: 700; }
.chip.waiting { background: transparent; border: 1px dashed var(--line-strong); color: var(--ink-2); }
.filter { flex-shrink: 0; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1.5px solid #E3D6C6; background: transparent; font-size: 14px; font-weight: 700; }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.jar-item { border-radius: 20px; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; border: 1px solid; }
.jar-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; }
.jar-head .when { color: var(--muted); font-weight: 500; }
.jar-text { font-family: var(--serif); font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }

.thread { display: flex; flex-direction: column; gap: 6px; margin-inline-start: 12px; }
.bubble { padding: 8px 12px; border-radius: 14px; background: var(--white); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; border: 1px solid var(--line); }
.bubble b { font-size: 12px; color: var(--muted); }
.bubble.writer { border-color: var(--line-strong); }
.answer-box { display: flex; flex-direction: column; gap: 8px; }
.answer-box textarea { min-height: 64px; border-radius: 14px; border: 1.5px solid var(--ink); background: var(--ground); padding: 8px 12px; font-family: var(--serif); font-size: 16px; line-height: 1.6; resize: vertical; }
.answer-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chip.resp { font-weight: 700; }
.jar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.jar-item.is-new { border-width: 1.5px; border-color: var(--coral); }

/* ---------- details sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; background: rgba(35, 28, 24, 0.4); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; background: var(--ground); border-radius: 28px 28px 0 0; padding: 12px 20px 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -20px 40px -20px rgba(35, 28, 24, 0.5); animation: sheet-up 260ms ease-out; }
.sheet .grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line-strong); align-self: center; }
.sheet textarea { min-height: 84px; border-radius: 16px; border: 1.5px solid var(--ink); background: var(--white); padding: 10px 14px; font-family: var(--serif); font-size: 18px; line-height: 1.7; resize: vertical; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- tour ---------- */
.tour-brand { display: flex; align-items: center; gap: 8px; }
.tour-progress { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.dots { display: flex; gap: 4px; }
.dots span { width: 6px; height: 6px; border-radius: 3px; background: #DCCDBB; }
.dots span.done { background: var(--ink); }
.dots span.now { width: 18px; background: var(--ink); }
.coach { background: var(--ink); color: var(--ground); border-radius: 18px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.65; }
.coach-num { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--coral); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.rule { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; border: 1.5px dashed var(--line-strong); background: var(--white); }
.rule-icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: var(--sand); display: inline-flex; align-items: center; justify-content: center; }
.rule .i-unlock { display: none; }
.rule.open { background: var(--c-tint); border-color: var(--c-accent); }
.rule.open .rule-icon { background: var(--c-accent); color: var(--white); }
.rule.open .i-lock { display: none; }
.rule.open .i-unlock { display: inline; }
.rule-title { font-size: 14px; font-weight: 700; }
.rule-body { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.sent-simple { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 24px; text-align: center; }
.check-circle { width: 64px; height: 64px; border-radius: 50%; background: var(--c-accent); color: var(--white); display: inline-flex; align-items: center; justify-content: center; }
.tour .locked { opacity: 0.35; }
.tour .active { box-shadow: var(--ring); }
.tour .tabs .tab:not(.active) { opacity: 0.55; }

/* ---------- the two kinds of note ----------
   Last in the file on purpose: the card rules above set `border: 1px solid`,
   whose shorthand resets the colour, so the tint has to come after them. */
.compliment { background: var(--c-tint); border-color: var(--c-line); }
.advice { background: var(--a-tint); border-color: var(--a-line); }
.apology { background: var(--p-tint); border-color: var(--p-line); }
.request { background: var(--r-tint); border-color: var(--r-line); }
.apology .note-label, .apology-ink { color: var(--p-accent); }
.request .note-label, .request-ink { color: var(--r-accent); }
.compliment-ink { color: var(--c-accent); }
.advice-ink { color: var(--a-accent); }
.drew-icon.compliment { color: var(--c-accent); }
.drew-icon.advice { color: var(--a-accent); }
.drew-icon.apology { color: var(--p-accent); }
.drew-icon.request { color: var(--r-accent); }
.apology .from-row { border-color: var(--p-line); }
.request .from-row { border-color: var(--r-line); }
.chip.resp.request { background: var(--r-tint); }
.chip.resp.apology { background: var(--p-tint); }
.btn.accent.compliment { background: var(--c-accent); }
.compliment .from-row { border-color: var(--c-line); }
.advice .from-row { border-color: var(--a-line); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
