/* Public preview of Picta Esencial */
.sticker-section {
  padding-block: clamp(2.5rem, 5vw, 4.75rem);
  border-bottom: 1px solid var(--line);
  background: var(--studio);
}

.sticker-demo-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: clamp(1.3rem, 2.5vw, 2rem);
}

.sticker-demo-heading .section-label { margin-bottom: .5rem; }
.sticker-demo-heading .section-title { font-size: clamp(2.25rem, 5vw, 4rem); }
.sticker-demo-intro { margin-top: .65rem; max-width: 38rem; color: var(--muted); }

:is(.sticker-demo, .sticker-demo-drag) { --demo-art-size: 2.9rem; }

.sticker-demo {
  padding: clamp(.75rem, 1.85vw, 1.25rem);
  border: 1px solid var(--picta-blue);
  border-radius: 1.45rem;
  background: var(--paper);
  box-shadow: 0 .45rem 1.35rem #073b480d;
}

.sticker-demo-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .85rem;
  padding: 0 .1rem .85rem;
}

.sticker-demo-toolbar-label { color: var(--brand-ink); font-size: .85rem; font-weight: 850; }
.sticker-demo .sticker-modes { margin: 0; }
.sticker-demo .sticker-modes button { min-height: 42px; font-size: .82rem; }
.sticker-demo .sticker-modes button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); }

.sticker-demo .sticker-layout {
  grid-template-columns: minmax(17rem, 1fr) minmax(0, 1.95fr);
  gap: .8rem;
}

.sticker-demo .sticker-layout-sensory { grid-template-columns: minmax(0, 1fr); }
.sticker-demo :is(.sticker-bank, .sticker-board) {
  padding: clamp(.75rem, 1.4vw, 1.15rem);
  border-color: var(--line);
  border-radius: 1rem;
  background: var(--white);
  box-shadow: none;
}

.sticker-demo .sticker-bank .sticker-panel-heading { margin-bottom: .55rem; }
.sticker-demo #sticker-count { color: var(--muted); font-size: .78rem; }
.sticker-demo .sticker-instructions { width: 100%; }
.sticker-demo-search { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; margin-bottom: .55rem; }
.sticker-demo-search .form-control { flex: 1; min-width: min(100%, 9rem); min-height: 42px; font-size: .9rem; }
.sticker-demo-search .btn { min-height: 38px; padding: .3rem; font-size: .74rem; }
.sticker-demo .sticker-filters button { min-height: 36px; border-color: var(--line); }
.sticker-demo .sticker-filters button[aria-pressed="true"] { border-color: var(--brand); }

.sticker-demo .sticker-bank-grid {
  grid-template-columns: repeat(auto-fill, minmax(4.55rem, 1fr));
  grid-auto-rows: 5.8rem;
  gap: .38rem;
  max-height: 26rem;
  padding: .45rem;
  border-color: var(--line);
  border-radius: .8rem;
  background: var(--soft);
}

.sticker-demo .sticker-bank-space { border: 0; }
.sticker-demo .sticker-bank .sticker-card,
.sticker-demo .sticker-sensory-card {
  border-color: var(--line);
  background: var(--white);
}

.sticker-demo .sticker-card[aria-pressed="true"] { background: var(--brand-soft); }
.sticker-demo .sticker-card { --sticker-tilt: 0deg; }
:is(.sticker-demo, .sticker-demo-drag) .sticker-paper { gap: .32rem; font-size: .75rem; line-height: 1.15; }
:is(.sticker-demo, .sticker-demo-drag) .sticker-paper img {
  width: var(--demo-art-size);
  height: var(--demo-art-size);
  max-width: 100%;
  filter: none;
}
:is(.sticker-demo, .sticker-demo-drag) .sticker-caption { padding: 0 .2rem; background: none; box-shadow: none; letter-spacing: 0; }
.sticker-demo .sticker-board-tools .btn { min-height: 42px; }
.sticker-demo .sticker-board-tools p { flex: 1 1 12rem; padding-block: .25rem; }

@media (max-width: 1023px) {
  .sticker-demo .sticker-layout { grid-template-columns: minmax(0, 1fr); }
  .sticker-demo .sticker-bank-grid { max-height: 13rem; }
}

@media (max-width: 600px) {
  :is(.sticker-demo, .sticker-demo-drag) { --demo-art-size: 2.6rem; }
  .sticker-demo { padding: .54rem; border-radius: 1.1rem; }
  .sticker-demo-toolbar { padding: .22rem .15rem .7rem; }
  .sticker-demo-toolbar-label { flex-basis: 100%; }
  .sticker-demo .sticker-modes button { padding-inline: .58rem; }
  .sticker-demo .sticker-bank-grid { grid-template-columns: repeat(auto-fill, minmax(3.9rem, 1fr)); grid-auto-rows: 5.55rem; }
}

.sticker-modes { margin-bottom: 1rem; }
.sticker-modes button { min-height: 44px; padding-inline: .95rem; background: var(--white); font-size: .9rem; }

.sticker-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(0, 1.9fr);
  align-items: start;
  gap: 1rem;
}

.sticker-bank, .sticker-board {
  padding: clamp(.85rem, 1.65vw, 1.45rem);
  border-color: #e5dac5;
  background: #fffdf7;
  box-shadow: 0 3px 0 #e9e4d8, 0 10px 20px #073b4810;
}
.sticker-panel-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .75rem; }
.sticker-panel-heading h3 { font-size: 1.28rem; letter-spacing: -.026em; }
.sticker-panel-heading p { color: var(--muted); font-size: .84rem; }
.sticker-bank .sticker-panel-heading { justify-content: space-between; margin-bottom: .85rem; }

.sticker-filters {
  gap: .35rem;
  margin-block-end: .7rem;
}

.sticker-filters button {
  min-height: 39px;
  padding-inline: .65rem;
  border-color: #e7dbc4;
  background: var(--white);
  font-size: .78rem;
}

.sticker-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr));
  grid-auto-rows: 6rem;
  gap: .45rem;
  max-height: clamp(16rem, 41vh, 28rem);
  margin: 0;
  padding: .5rem;
  border: 1px solid #e7dbc4;
  border-radius: 15px;
  background: #fbf3e3 radial-gradient(circle, #86704136 .75px, transparent 1px) 0 0 / 10px 10px;
  list-style: none;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scroll-padding-block: .55rem;
}

.sticker-bank-empty {
  padding: 1rem;
  border: 1px dashed #bcad8e;
  border-radius: 15px;
  color: var(--muted);
  background: #fbf3e3;
  font-size: .85rem;
}

.sticker-bank-space { min-width: 0; border: 1px solid transparent; border-radius: 12px; }
.sticker-card {
  --sticker-tilt: -.9deg;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: .22rem .12rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  cursor: grab;
  user-select: none;
  -webkit-touch-callout: none;
}

.sticker-bank-space:nth-child(even) .sticker-card, .sticker-slot:nth-child(even) { --sticker-tilt: 1.4deg; }

.sticker-paper {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .16rem;
  width: 100%;
  min-width: 0;
  color: var(--ink);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.17;
  text-align: center;
  pointer-events: none;
  transform: rotate(var(--sticker-tilt, 0deg));
  transition: transform 180ms var(--ease), opacity 150ms var(--ease);
}

.sticker-paper img {
  width: 81%;
  height: 2.85rem;
  object-fit: contain;
  filter: drop-shadow(1.4px 0 white) drop-shadow(-1.4px 0 white)
    drop-shadow(0 1.4px white) drop-shadow(0 -1.4px white) drop-shadow(0 1.5px 1px #4a381d50);
}

.sticker-caption {
  max-width: 100%;
  padding: .13rem .29rem;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 1px 1px #4a381d35;
  letter-spacing: -.024em;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.sticker-paper-wide { font-size: .71rem; }
.sticker-paper-wide img { height: 2.48rem; }
.sticker-paper-wide .sticker-caption { padding-inline: .19rem; }

.sticker-card:active { cursor: grabbing; }
@media (hover: hover) {
  .sticker-card:hover { border-color: #9c967f; background: #fffdf777; }
  .sticker-card:hover .sticker-paper { transform: translateY(-2px) rotate(var(--sticker-tilt)); }
}
.sticker-card[aria-pressed="true"] { outline: 2px solid var(--brand-ink); outline-offset: 1px; background: var(--brand-soft); }
.sticker-card:focus-visible { outline-offset: 3px; }
.sticker-card.is-peeling .sticker-paper { opacity: .2; }

.sticker-in-hand {
  position: fixed;
  z-index: 12;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.sticker-in-hand .sticker-paper {
  filter: drop-shadow(0 7px 3px #473b2d45);
  transform: scale(1.14) rotate(-7deg);
  animation: sticker-peel 170ms var(--ease) both;
}

@keyframes sticker-peel {
  from { transform: perspective(180px) rotateY(-22deg) scale(.98); }
  to { transform: scale(1.14) rotate(-7deg); }
}

.sticker-is-dragging, .sticker-is-dragging .sticker-card { cursor: grabbing; }

.sticker-bank-tools { display: none; }
.has-sticker-selection .sticker-bank-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .6rem;
  margin-top: .65rem;
}
.sticker-bank-tools p { width: 100%; color: var(--brand-ink); font-size: .85rem; font-weight: 680; line-height: 1.3; }
.sticker-bank-tools .btn { flex: none; min-height: 44px; padding-inline: .8rem; }
.sticker-bank-tools .sticker-cancel { padding-inline: .3rem; }

.sticker-board-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .4rem;
  min-height: 3.2rem;
  color: var(--brand-ink);
  font-size: .83rem;
  font-weight: 650;
}

.sticker-board-tools .btn { min-height: 44px; padding: .38rem .6rem; flex: 0 0 auto; font-size: .79rem; }
.sticker-rows { display: grid; gap: .68rem; }
.sticker-layout.sticker-layout-sensory { grid-template-columns: minmax(0, 1fr); }
.sticker-rows-sensory { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); }
.sticker-sensory-card { min-height: 8rem; border-color: var(--control-line); }
.sticker-sensory-card[aria-pressed="true"] { outline: 2px solid var(--brand-ink); background: var(--brand-soft); }
.sticker-sensory-card[aria-pressed="true"] .sticker-caption { text-decoration: underline; }
.sticker-board-tools { flex-wrap: wrap; }
.sticker-clear-dialog {
  width: min(28rem, calc(100% - 2rem));
  border: 1px solid var(--control-line);
  border-radius: 1rem;
  padding: 1.3rem;
  background: var(--paper);
}
.sticker-clear-dialog::backdrop { background: #102b38aa; }

.sticker-row {
  --sticker-gap: clamp(.3rem, .66vw, .65rem);
  --sticker-label-ink: var(--ink);
  display: grid;
  gap: var(--sticker-gap);
  padding: .58rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #f2efe8;
  background: color-mix(in srgb, var(--sticker-label) 13%, #fff9ef);
}

.sticker-tone-yellow { --sticker-label: #f5bc42; }
.sticker-tone-mint { --sticker-label: #7acebb; }
.sticker-tone-indigo { --sticker-label: #454fa6; --sticker-label-ink: var(--white); }
.sticker-tone-pink { --sticker-label: #f39fbd; }
.sticker-tone-lilac { --sticker-label: #b7b9e1; }

.sticker-rows-day .sticker-row { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(3.4rem, auto); }
.sticker-rows-day .sticker-row-label { grid-column: 1 / -1; justify-self: start; min-width: 6.5rem; }
.sticker-rows-day .sticker-slots { grid-column: 1 / 6; grid-template-columns: repeat(5, minmax(0, 1fr)); }
:is(.sticker-rows-phrases, .sticker-rows-say) .sticker-row { grid-template-columns: minmax(5rem, 1fr) minmax(0, 2fr); }
.sticker-fixed-phrase { width: 100%; min-height: 5rem; }
.sticker-slots { display: grid; grid-auto-rows: minmax(5.25rem, auto); gap: var(--sticker-gap); }

.sticker-row-label {
  display: grid;
  place-items: center;
  min-height: 2rem;
  margin: 0;
  padding: .3rem .36rem;
  border-radius: 8px;
  color: var(--sticker-label-ink);
  background: var(--sticker-label);
  font-size: .84rem;
  font-weight: 750;
  line-height: 1.18;
  text-align: center;
}

.sticker-slot { position: relative; min-width: 0; min-height: 4.6rem; }
.sticker-slot.sticker-card { border-color: #d8cbbc; background: #fffdf78f; }
.sticker-slot .sticker-placement-stamp {
  position: absolute;
  z-index: 1;
  inset: -.45rem -.36rem auto auto;
  width: clamp(1.5rem, 3vw, 2.28rem);
  aspect-ratio: 1;
  pointer-events: none;
}
.sticker-slot:not(.sticker-card) {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px dashed #7f9196;
  border-radius: 10px;
  color: #63787e;
  background: #fffdf7;
}

.sticker-slot:not(.sticker-card):hover,
.has-sticker-selection .sticker-slot:not(.sticker-card) { border-color: var(--brand-ink); color: var(--brand-ink); background: var(--brand-soft); }
.sticker-slot.is-drop-target, .sticker-bank.is-drop-target {
  outline: 2px solid var(--brand-ink);
  outline-offset: 1px;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 3px #05bfdd35;
}

.sticker-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .12rem;
  min-height: 44px;
  padding: .28rem;
  border: 1px solid #88bea9;
  border-radius: 10px;
  color: #245842;
  background: var(--mint);
  font-size: .78rem;
  font-weight: 750;
}

.sticker-done:not(:disabled):hover { border-color: #245842; }
.sticker-done[aria-pressed="true"] { color: var(--white); background: #245842; }
.sticker-row.is-done { border-color: #88bea9; background: #e9f5ef; }

#sticker-workspace button { scroll-margin-block: var(--site-nav-offset) 1rem; }
#sticker-bank button { scroll-margin-block: .35rem; }

@media (max-width: 1023px) {
  .sticker-layout { grid-template-columns: minmax(0, 1fr); }
  .sticker-bank-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem .6rem;
    margin-top: .65rem;
  }
  .sticker-bank-grid {
    max-height: 13.1rem;
    padding: .45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sticker-paper { transition: none; }
  .sticker-card:hover .sticker-paper { transform: rotate(var(--sticker-tilt)); }
  .sticker-in-hand .sticker-paper { transform: none; animation: none; }
}

@media (max-width: 600px) {
  .sticker-filters button { min-height: 42px; }
  .sticker-bank-grid { grid-template-columns: repeat(auto-fill, minmax(3.9rem, 1fr)); }
  .sticker-rows-phrases { grid-template-columns: minmax(0, 1fr); }
  .sticker-rows-day .sticker-row { grid-template-columns: minmax(0, 1fr) auto; }
  .sticker-rows-day .sticker-row-label { grid-column: 1; align-self: center; }
  .sticker-rows-day .sticker-slots { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sticker-done { grid-column: 2; grid-row: 1; flex-direction: row; gap: .25rem; padding-inline: .55rem; }
  .sticker-done .icon { width: 15px; height: 15px; }
  .sticker-board-tools { min-height: 2.8rem; }
}

[data-private-board] .sticker-board {
  min-width: 0;
  background: var(--white);
  border-color: var(--control-line);
  box-shadow: 0 3px 0 #daedef, 0 .7rem 1.3rem #073b480f;
}
[data-private-board] .sticker-bank { min-width: 0; scroll-margin-top: var(--site-nav-offset); }
[data-private-board] .sticker-bank-grid { max-height: clamp(16rem, 48vh, 28rem); }
[data-private-board] :is(.sticker-rows-phrases,.sticker-rows-say) .sticker-row {
  grid-template-columns: minmax(5rem, 1fr) minmax(4.5rem, .65fr);
  align-items: stretch;
  background: #cdeaf5;
}
[data-private-board] :is(.sticker-rows-phrases,.sticker-rows-say) .sticker-row-label { background: transparent; }
[data-private-board] :is(.sticker-rows-phrases,.sticker-rows-say) .sticker-fixed-phrase { cursor: pointer; }
[data-private-board] :is(.sticker-rows-phrases,.sticker-rows-say) .sticker-slots { width: min(100%, 7.25rem); justify-self: center; }
[data-private-board] .sticker-rows-sensory { grid-template-columns: repeat(3, minmax(0, 1fr)); }
[data-private-board] .sticker-sensory-card { padding: .7rem .35rem; min-height: 6.15rem; cursor: pointer; background: var(--white); }
[data-private-board] .sticker-sensory-card[aria-pressed="true"] { background: var(--brand-soft); }
.diary-sheets-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.diary-sheets .sticker-row {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
}
.diary-sheets .sticker-row-label { min-height: 1.85rem; color: var(--brand-dark); }
.diary-sheets .sticker-slots { grid-template-columns: repeat(var(--diary-columns), minmax(0, 1fr)); }
.diary-sheets .sticker-slot { min-height: 4rem; }
.diary-sheets .sticker-slot:not(.sticker-card) { background: var(--white); }
.sticker-layout-sensory .diary-bank-link { display: none; }

@media (max-width: 620px) {
  .diary-sheets-split { grid-template-columns: minmax(0, 1fr); }
  .diary-sheets .sticker-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  [data-private-board] .sticker-sensory-card { min-height: 5.25rem; }
}
@media (max-width: 380px) {
  [data-private-board] .sticker-rows-sensory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* Interactive boards use the same clean frame and tiles as the product preview. */
.live-board-window {
  container-type: inline-size;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--essentials-card-line);
  border-radius: clamp(.7rem, 1.6vw, 1.15rem);
  background: var(--essentials-paper);
  box-shadow: 0 .18rem 0 #e9edeb, 0 .5rem 1rem #2539411b;
}
.live-board-sheet {
  display: grid;
  gap: clamp(.45rem, 1.3cqi, .8rem);
  padding: clamp(.5rem, 2.7cqi, 1.1rem);
}
.live-board-sheet .sticker-rows { gap: clamp(.32rem, 1.1cqi, .65rem); }
.live-board-sheet .sticker-row { --sticker-gap: clamp(.24rem, 1cqi, .55rem); }
.live-board-sheet .sticker-slot.sticker-card,
.live-board-sheet .sticker-sensory-card {
  border: 1px solid var(--essentials-card-line);
  border-radius: .6rem;
  background: var(--white);
  box-shadow: var(--essentials-card-shadow);
}
.live-board-sheet .sticker-slot .sticker-paper,
.live-board-sheet .sticker-sensory-card .sticker-paper { --sticker-tilt: 0deg; }
.live-board-sheet .sticker-caption { padding-inline: .14rem; background: transparent; box-shadow: none; }
.live-board-sheet .sticker-slot:not(.sticker-card) {
  border-color: var(--essentials-slot-line);
  border-radius: .6rem;
  background: var(--essentials-slot-fill);
}
.live-board-sheet .sticker-slot:not(.sticker-card):hover,
.has-sticker-selection .live-board-sheet .sticker-slot:not(.sticker-card),
.live-board-sheet .sticker-slot.is-drop-target,
.live-board-sheet .sticker-sensory-card[aria-pressed="true"] {
  border-color: var(--brand-ink);
  background: var(--brand-soft);
}
.live-board-sheet .sticker-rows-day .sticker-row {
  grid-template-columns: minmax(3.4rem, 1.16fr) minmax(0, 5.9fr);
  padding: 0;
  background: transparent;
}
.live-board-sheet .sticker-rows-day .sticker-row-label {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: var(--essentials-morning);
}
.live-board-sheet .sticker-rows-day .sticker-tone-sky .sticker-row-label { background: var(--essentials-afternoon); }
.live-board-sheet .sticker-rows-day .sticker-tone-lilac .sticker-row-label { background: var(--essentials-night); }
.live-board-sheet .sticker-rows-day .sticker-row-label img {
  width: clamp(1.25rem, 4.4cqi, 2rem);
  height: auto;
  object-fit: contain;
}
.live-board-sheet .sticker-rows-day .sticker-slots {
  grid-area: 1 / 2;
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(3.4rem, .9fr);
}
.live-board-sheet .sticker-rows-day .sticker-done {
  grid-area: auto;
  min-height: 44px;
  gap: .3rem;
  padding: .25rem;
  font-size: clamp(.76rem, 1.2cqi, 1.12rem);
  transition: background-color 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}
.live-board-sheet .sticker-done .icon { width: clamp(1rem, 1.45cqi, 1.45rem); height: auto; aspect-ratio: 1; }
.live-board-sheet :is(.sticker-rows-phrases, .sticker-rows-say) .sticker-row {
  background: var(--essentials-afternoon);
}
.live-board-sheet :is(.sticker-rows-phrases, .sticker-rows-say) .sticker-row-label { background: transparent; }
.live-board-sheet .diary-sheets .sticker-row { background: transparent; }
.live-board-sheet .diary-sheets .sticker-row-label { background: var(--brand-soft); }
.live-board-window + .sticker-board-tools { margin-top: .48rem; }

@container (max-width: 465px) {
  .live-board-sheet .sticker-rows-day .sticker-row { grid-template-columns: minmax(0, 1fr); }
  .live-board-sheet .sticker-rows-day .sticker-row-label {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: .35rem;
    padding-inline: .45rem;
  }
  .live-board-sheet .sticker-rows-day .sticker-slots {
    grid-area: 2 / 1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .live-board-sheet .diary-sheets .sticker-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.diary-view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.diary-view-actions .btn { min-height: 46px; }
.diary-view-actions [aria-pressed="true"] {
  border-color: var(--brand-ink);
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.diary-search { min-width: 0; }
.diary-search { margin-bottom: .6rem; }
.diary-search > summary {
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  padding: .48rem .65rem;
  border-radius: .65rem;
  color: var(--brand-dark);
  font-size: .9rem;
  font-weight: 850;
  cursor: pointer;
}
.diary-search > summary:hover { background: var(--brand-soft); }
.diary-instruction {
  min-height: 1.35rem;
  color: var(--brand-dark);
  font-size: clamp(.88rem, 2vw, 1.05rem);
  font-weight: 800;
}
.essentials-board-toolbar .diary-bank-link {
  min-height: 44px;
  padding: .35rem .78rem;
  font-size: .88rem;
}
[data-private-board] .sticker-board-tools { justify-content: flex-start; }
[data-private-board] .sticker-filters button { min-height: 44px; }
[data-private-board] .sticker-slot:focus-visible,
[data-private-board] .sticker-card:focus-visible { outline-offset: -3px; }

[data-private-board] .essentials-board-toolbar { background: var(--essentials-title); }
[data-private-board] #sticker-board-title {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(1.3rem, 4cqi, 1.95rem);
  font-weight: 900;
}
[data-private-board] .diary-instruction { margin: 0; }
[data-private-board] .sticker-slot { min-height: clamp(4.4rem, 9vw, 6.1rem); cursor: pointer; }
[data-private-board] .sticker-done { min-height: 44px; }
[data-private-board] .sticker-board-tools { align-items: center; min-height: 0; }
[data-private-board] #diary-save-status { margin: 0; color: var(--muted); font-size: .83rem; }
[data-private-board] .sticker-board-tools button { min-height: 44px; }
[data-private-board] .sticker-board-tools:not(:has(> :not([hidden]))) { display: none; }

.diary-picker[open] {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  width: min(68rem, calc(100% - 1.4rem));
  max-width: calc(100% - 1.2rem);
  height: min(48rem, calc(100dvh - 1.4rem));
  max-height: calc(100dvh - 1.4rem);
  padding: clamp(.7rem, 2.5vw, 1.35rem);
  margin: auto;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--ink);
}
html:not(:has(.dash-board-expanded)):has(.diary-picker[open]) { overflow: hidden; }
.diary-picker::backdrop { background: rgb(12 53 64 / 52%); }
.diary-picker .sticker-panel-heading { align-items: center; gap: .6rem; margin: 0; }
.diary-picker .sticker-panel-heading h3 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.85rem); }
.diary-picker .diary-search { margin: 0; }
.diary-picker .sticker-filters {
  display: flex;
  flex: none;
  flex-wrap: nowrap;
  margin: 0;
  padding: .16rem .16rem .35rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.diary-picker .sticker-filters button { display: inline-flex; flex: none; align-items: center; gap: .28rem; white-space: nowrap; }
.diary-picker .sticker-filters img { width: 1.35rem; height: 1.35rem; object-fit: contain; }
.diary-picker .sticker-bank-grid {
  flex: 1;
  align-content: start;
  min-height: 5.5rem;
  max-height: none;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, clamp(5.4rem, 13vw, 7.4rem)), 1fr));
  grid-auto-rows: clamp(6.15rem, 15vw, 8rem);
  border-color: var(--control-line);
  background: var(--studio);
}
.diary-picker .sticker-card { border-color: var(--control-line); background: var(--white); cursor: pointer; }
.diary-picker .sticker-card:active { background: var(--brand-soft); }
.diary-picker .sticker-card .sticker-paper { transform: none; font-size: clamp(.84rem, 2vw, 1rem); }
.diary-picker .sticker-paper img { height: clamp(2.55rem, 7vw, 4rem); }
.diary-picker .sticker-caption { box-shadow: none; background: transparent; }
.diary-picker [data-diary-remove] { align-self: start; }
@media (max-width: 600px) {
  .diary-picker[open] { height: calc(100dvh - 1.4rem); }
}

[data-private-board] .sticker-layout {
  grid-template-columns: clamp(11.5rem, 21vw, 20rem) minmax(0, 1fr);
  gap: clamp(.4rem, 1.3vw, 1rem);
  align-items: start;
}
[data-private-board] .sticker-board { padding: clamp(.35rem, 1.1vw, .9rem); }
[data-private-board] .essentials-board-toolbar { gap: .5rem; }
[data-private-board] .live-board-sheet { touch-action: pan-y pinch-zoom; }
.diary-view-actions { justify-content: flex-end; align-items: center; flex-wrap: nowrap; }
.diary-fullscreen {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--white);
}
.diary-fullscreen .icon { width: 21px; height: 21px; }
.diary-fullscreen[aria-pressed="false"] .diary-collapse-icon,
.diary-fullscreen[aria-pressed="true"] .diary-expand-icon { display: none; }
.diary-navigation {
  --rail-offset: var(--site-nav-offset, 1rem);
  position: sticky;
  inset-block-start: var(--rail-offset);
  display: flex;
  flex-direction: column;
  gap: .45rem;
  min-width: 0;
  min-height: 0;
  max-height: max(11rem, calc(100dvh - var(--rail-offset) - .75rem));
  padding: clamp(.35rem, .7vw, .7rem);
  border: 1px solid var(--control-line);
  border-radius: 1rem;
  color: var(--brand-dark);
  background: var(--studio);
}
.diary-page-counter { display: flex; justify-content: space-between; gap: .25rem; margin: 0; padding: .3rem; font-size: clamp(.8rem, 1.2vw, 1rem); }
.diary-step.icon-button {
  display: grid;
  place-items: center;
  width: 100%;
  flex-shrink: 0;
  height: clamp(2.95rem, 6dvh, 4.2rem);
  border-radius: .55rem;
  border: 1px solid var(--control-line);
  background: var(--white);
}
.diary-step .icon { width: 1.35rem; height: 1.35rem; }
.diary-step:disabled { opacity: .42; }
.diary-step:not(:disabled):hover { background: var(--brand-soft); }
.diary-step[data-diary-step="-1"] .icon { rotate: -90deg; }
.diary-step[data-diary-step="1"] .icon { rotate: 90deg; }
.diary-pages {
  display: grid;
  align-content: start;
  gap: .4rem;
  margin: 0;
  padding: 2px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scroll-snap-type: y proximity;
  list-style: none;
}
.diary-pages li { scroll-snap-align: start; }
.diary-pages button {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  width: 100%;
  min-height: clamp(3.65rem, 8dvh, 5.5rem);
  padding: .35rem .5rem;
  border: 1px solid var(--control-line);
  border-radius: .55rem;
  color: var(--brand-dark);
  background: var(--white);
  font-size: clamp(.88rem, 1.22vw, 1.15rem);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: start;
  touch-action: manipulation;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.diary-pages button:is(:hover, [aria-pressed="true"]) { border-color: var(--brand-ink); background: var(--brand-soft); }
.diary-pages button[aria-pressed="true"] { box-shadow: inset 3px 0 var(--brand-ink); }
.diary-page-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(2.85rem, 5.6dvh, 4rem);
  aspect-ratio: 1;
  border: 1px solid var(--control-line);
  border-radius: .52rem;
  background: var(--paper);
}
.diary-page-thumb img { width: 78%; height: 78%; object-fit: contain; }
.diary-page-index {
  position: absolute;
  inset: auto -.2rem -.16rem auto;
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid var(--control-line);
  border-radius: 50%;
  background: var(--studio);
  font-size: .75rem;
}
.diary-pages [aria-pressed="true"] .diary-page-index { color: var(--white); background: var(--brand-dark); }
.diary-pages [aria-pressed="true"] .diary-page-thumb { border-color: var(--brand-ink); }
@media (min-width: 681px) {
  [data-private-board] :is(.sticker-slot, .sticker-sensory-card) {
    min-height: clamp(5.8rem, 8.5vw, 10rem);
  }
  [data-private-board] :is(.sticker-slot, .sticker-sensory-card) .sticker-paper {
    font-size: clamp(.78rem, 1.1vw, 1.05rem);
  }
  [data-private-board] :is(.sticker-slot, .sticker-sensory-card) .sticker-paper img {
    height: clamp(2.85rem, 4.4vw, 4.75rem);
  }
}
@media (max-width: 680px) {
  [data-private-board] .sticker-layout { grid-template-columns: clamp(4.1rem, 18vw, 6rem) minmax(0, 1fr); }
  .diary-navigation { padding: .22rem; gap: .35rem; }
  .diary-page-counter { justify-content: center; padding: .24rem 0; }
  .diary-page-counter strong { display: none; }
  .diary-pages { padding: 1px; scrollbar-width: none; }
  .diary-pages button { grid-template-columns: 1fr; justify-items: center; gap: 0; padding: .3rem .18rem; }
  .diary-page-thumb { width: min(100%, 3.15rem); }
  .diary-pages button > span + span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  [data-private-board] .essentials-board-toolbar { flex-wrap: wrap; }
}

/* The expanded grid fills the viewport. Only the pages and the sheet scroll when their contents need more room. */
.dash-board-expanded [data-private-board],
.dash-board-expanded [data-private-board] .sticker-layout { height: 100%; }
.dash-board-expanded [data-private-board] .sticker-layout {
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(.35rem, .85vw, .8rem);
  align-items: stretch;
}
.dash-board-expanded .diary-navigation {
  position: static;
  max-height: none;
}
.dash-board-expanded [data-private-board] .sticker-board {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  padding: clamp(.22rem, .65vw, .6rem);
}
.dash-board-expanded .live-board-window {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}
.dash-board-expanded [data-private-board] .essentials-board-toolbar {
  column-gap: .5rem;
  row-gap: .25rem;
  padding: clamp(.35rem, 1vw, .75rem) clamp(.5rem, 1.6vw, 1.2rem);
}
.dash-board-expanded .live-board-sheet {
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  gap: .35rem;
  padding: clamp(.35rem, 1.2vw, .9rem);
}
.dash-board-expanded #sticker-rows {
  --tile-min-height: 4.25rem;
  min-height: 0;
  grid-auto-rows: minmax(min-content, 1fr);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-padding-block: .35rem;
  padding: .2rem;
}
.dash-board-expanded .diary-sheets .sticker-row { grid-template-rows: auto minmax(min-content, 1fr); }
.dash-board-expanded .sticker-slots { grid-auto-rows: minmax(var(--tile-min-height), 1fr); }
.dash-board-expanded [data-private-board] :is(.sticker-sensory-card, .sticker-fixed-phrase) { min-height: var(--tile-min-height); }
.dash-board-expanded [data-private-board] .sticker-slot { min-height: 0; }
.dash-board-expanded .sticker-rows-day .sticker-row-label {
  align-content: center;
  gap: .35rem;
  font-size: clamp(.75rem, 2.2cqi, 1.35rem);
}
.dash-board-expanded .sticker-rows-day .sticker-row-label img { width: clamp(1.3rem, min(4.4cqi, 7dvh), 3.8rem); }
.dash-board-expanded :is(.sticker-slot, .sticker-sensory-card, .sticker-fixed-phrase) { container-type: size; }
.dash-board-expanded :is(.sticker-slot, .sticker-sensory-card, .sticker-fixed-phrase) .sticker-paper {
  font-size: clamp(.66rem, min(10cqi, 13cqb), 1.35rem);
}
.dash-board-expanded :is(.sticker-slot, .sticker-sensory-card, .sticker-fixed-phrase) .sticker-paper img {
  height: clamp(1.45rem, min(54cqb, 66cqi), 9rem);
}
.dash-board-expanded [data-private-board] :is(.sticker-rows-phrases, .sticker-rows-say) .sticker-slots { width: 100%; }
.dash-board-expanded [data-private-board] .sticker-board-tools { margin-block-start: .25rem; }

@container (max-width: 465px) {
  .dash-board-expanded .sticker-rows-day .sticker-row { grid-template-rows: auto minmax(min-content, 1fr); }
  .dash-board-expanded .sticker-rows-day .sticker-row-label { align-self: center; }
}
@media (max-height: 540px) and (orientation: landscape) {
  .dash-board-expanded #sticker-rows { --tile-min-height: 3.35rem; }
  .dash-board-expanded .sticker-rows-day .sticker-row-label {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-block: .15rem;
  }
  .dash-board-expanded .sticker-rows-day .sticker-row-label img { width: clamp(1.2rem, 3cqi, 1.5rem); }
  .dash-board-expanded :is(.sticker-rows-phrases, .sticker-rows-say) .sticker-row { padding-block: .25rem; }
}
@media (min-width: 681px) and (max-height: 540px) and (orientation: landscape) {
  .dash-board-expanded [data-private-board] .sticker-layout { grid-template-columns: clamp(9rem, 19vw, 15rem) minmax(0, 1fr); }
}
@media (max-width: 680px) and (max-height: 540px) and (orientation: landscape) {
  .dash-board-expanded [data-private-board] .sticker-layout { grid-template-columns: clamp(4.1rem, 13vw, 5rem) minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .diary-pages button,
  .live-board-sheet .sticker-rows-day .sticker-done { transition: none; }
}
