/* Polls in the calendar, image albums, reactions, sticky notes, favorites. */
/* Polls in the calendar */
.calendar-mark.is-poll { background: var(--cal-poll, #8b6fe0); }
.calendar-poll-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.calendar-poll-item {
  display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(139, 111, 224, .35);
  background: rgba(139, 111, 224, .08); color: inherit; font: inherit; cursor: pointer;
}
.calendar-poll-item:hover { background: rgba(139, 111, 224, .14); }
.calendar-poll-q { font-weight: 600; overflow-wrap: anywhere; }
.calendar-poll-meta { font-size: 12.5px; opacity: .72; }
.poll-card.is-scheduled { border-style: dashed; }

/* Image albums: mosaic of tiles that keep their orientation. */
.msg-album {
  position: relative; flex: 0 0 auto;
  width: 420px; max-width: 100%;
  border-radius: 12px; overflow: hidden;
  margin: 2px 0;
}
.msg.image-only .msg-album { margin: 0; }
.msg-album-tile { position: absolute; overflow: hidden; cursor: zoom-in; background: rgba(0, 0, 0, .06); }
.msg-album-img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
/* Time pill sits on the collage, bottom-right (the bubble is the positioning parent). */
.msg.image-only .msg-bubble > .msg-foot {
  position: absolute; right: 8px; bottom: 8px; margin: 0; z-index: 2;
}

/* Dialogue: the message under discussion is a compact preview (expandable). */
.dialogue-root-slot.is-collapsed .msg.is-dialogue-root .msg-bubble {
  max-height: 100px; overflow: hidden;
}
.dialogue-root-slot.is-collapsed.has-overflow .msg.is-dialogue-root .msg-bubble {
  -webkit-mask-image: linear-gradient(#000 62%, transparent);
  mask-image: linear-gradient(#000 62%, transparent);
}
.dialogue-root-slot.is-collapsed .msg-image { max-width: 72px; max-height: 48px; }
.dialogue-root-slot.is-collapsed .msg-album { width: 84px; }
.dialogue-root-slot.is-collapsed .msg-body { font-size: calc(14px * var(--text-scale, 1)); }
.dialogue-root-slot.is-collapsed .msg-body { display: flex; flex-direction: column; }
.dialogue-root-slot.is-collapsed .msg-caption { order: -1; margin: 0 0 3px; }
.dialogue-root-toggle {
  display: block; margin: 4px 0 0 2px; padding: 2px 4px; border: 0; background: none;
  color: var(--accent, #2f6fd6); font: inherit; font-size: calc(12.5px * var(--text-scale, 1));
  font-weight: 600; cursor: pointer;
}
.dialogue-root-toggle[hidden] { display: none; }

/* Reactions inside the bubble: roomy soft pills, clear gap from text and bubble edge. */
.msg-bubble > .msg-reactions {
  margin: 10px 0 4px; max-width: 100%; flex: none; gap: 6px 8px;
}
.msg-bubble .msg-reaction {
  border-color: transparent; box-shadow: none;
  background: color-mix(in srgb, var(--accent, #2f6fd6) 12%, #fff);
  padding: 6px 14px 6px 10px; gap: 7px; min-height: 34px; box-sizing: border-box;
}
.msg-bubble .msg-reaction:hover { background: color-mix(in srgb, var(--accent, #2f6fd6) 20%, #fff); border-color: transparent; }
.msg-bubble .msg-reaction.is-mine { background: color-mix(in srgb, var(--accent, #2f6fd6) 30%, #fff); border-color: transparent; }
.msg-bubble .msg-reaction-count { color: var(--accent, #2f6fd6); font-weight: 600; font-size: calc(15px * var(--text-scale, 1)); }
.msg-bubble .msg-reaction-emoji { font-size: calc(20px * var(--text-scale, 1)); line-height: 1; }
.msg-bubble .msg-reaction-emoji img.icq-smiley { width: 22px; height: 22px; }
/* Chips kept in the meta row (media / dialogue root): use the full width, push the time pill down if needed. */
.msg-meta { flex-wrap: wrap; }
.msg-meta .msg-reactions { max-width: 100%; }

/* Profile settings: every field (inputs, password rows, language select) has the same height. */
#profile-form input[type="text"],
#profile-form input[type="email"],
#profile-form input[type="password"],
#profile-form input:not([type]),
#profile-form select {
  height: 44px; min-height: 44px; box-sizing: border-box;
  padding-top: 0; padding-bottom: 0; line-height: 1.2;
}
#profile-form select {
  width: 100%; padding-left: 12px; padding-right: 12px;
  border: 1px solid #d0d4dc; border-radius: 4px; background-color: #fff;
  font: inherit; color: inherit;
}

/* ── Notes as sticky notes ── */
.notes-sticky-c0 { --st-bg: #fff3a8; --st-bd: #ecdc6f; }
.notes-sticky-c1 { --st-bg: #ffd9e2; --st-bd: #f3b3c3; }
.notes-sticky-c2 { --st-bg: #cfeedd; --st-bd: #a4d9bb; }
.notes-sticky-c3 { --st-bg: #d4e6ff; --st-bd: #a9c8f2; }
.notes-sticky-c4 { --st-bg: #e6dcff; --st-bd: #c7b6f0; }
.notes-sticky-c5 { --st-bg: #ffe2c2; --st-bd: #f1c291; }
.notes-item.notes-sticky {
  background: var(--st-bg); border: 1px solid var(--st-bd); border-radius: 6px 6px 14px 6px;
  box-shadow: 0 6px 14px rgba(40, 44, 60, .13), 0 1px 2px rgba(40, 44, 60, .1);
  min-height: 140px; max-height: 280px; overflow: hidden; padding: 14px 14px 12px; gap: 6px;
  transform: rotate(-.6deg); transition: transform .15s ease, box-shadow .15s ease;
}
.notes-grid > .notes-sticky:nth-child(even) { transform: rotate(.7deg); }
.notes-item.notes-sticky:hover {
  background: var(--st-bg); transform: translateY(-3px) rotate(0deg);
  box-shadow: 0 12px 22px rgba(40, 44, 60, .18);
}
.notes-sticky .notes-item-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notes-sticky .notes-item-preview { color: #4d5262; -webkit-line-clamp: 5; }
.notes-sticky .notes-item-meta { color: #7d7f6e; margin-top: auto; }
.notes-sticky-thumbs { display: flex; gap: 6px; align-items: center; }
.notes-sticky-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid rgba(0,0,0,.1); background: #fff; }
.notes-sticky-more { font-size: 12px; font-weight: 700; color: #5c6270; padding: 0 4px; }
.note-modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; }
.note-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 14, 22, .45); }
.note-modal-card {
  position: relative; width: min(560px, 100%); max-height: min(86vh, 720px); overflow: auto;
  background: var(--st-bg, #fff3a8); border: 1px solid var(--st-bd, #ecdc6f); border-radius: 8px 8px 18px 8px;
  padding: 18px; box-shadow: 0 24px 60px rgba(10, 14, 22, .35);
}
.note-modal-card .notes-editor-title, .note-modal-card .notes-editor-body { background: rgba(255,255,255,.62); }
.note-modal-card .notes-editor-rich { min-height: 180px; }
.note-modal-card .notes-inline-img-wrap { display: inline-block; margin: 4px 6px 4px 0; vertical-align: top; }
.note-modal-card .notes-inline-img { max-height: 84px; max-width: 120px; object-fit: cover; cursor: zoom-in; }
.note-modal-card .notes-inline-img-remove { width: 22px; height: 22px; top: 3px; right: 3px; font-size: 15px; }

/* ── avatar editor modal ── */
.avatar-crop-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.avatar-crop-backdrop { position: absolute; inset: 0; background: rgba(10, 14, 22, .55); }
.avatar-crop-card {
  position: relative; width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px;
  background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 24px 60px rgba(10, 14, 22, .35);
}
.avatar-crop-title { font-weight: 800; font-size: 17px; color: #1a1d26; }
.avatar-crop-frame { border-radius: 22%; width: 200px; height: 200px; }

/* ── Favorites feature ── */
.fav-list { display: flex; flex-direction: column; gap: 8px; }
.fav-item {
  position: relative; background: #fff; border: 1px solid #e8eaef; border-radius: 12px;
  padding: 12px 40px 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px;
}
.fav-item:hover { background: #fafbfc; border-color: #d5d9e2; }
.fav-item-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.fav-item-who { font-weight: 700; color: #1a1d26; }
.fav-item-where, .fav-item-time { font-size: 12px; color: #8b8e98; }
.fav-item-time { margin-left: auto; }
.fav-item-text { color: #4d5262; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.fav-item-star { position: absolute; top: 8px; right: 8px; appearance: none; border: 0; background: transparent; padding: 4px; border-radius: 8px; cursor: pointer; color: #b9bec9; display: grid; place-items: center; }
.fav-item-star.is-on { color: #f5b301; }

/* ── paper stickies with a pin, free-form board ── */
.notes-grid.notes-board { display: block; position: relative; width: 100%; min-height: 214px; padding: 0; }
.notes-item.notes-sticky {
  position: absolute; width: 200px; height: 200px; min-height: 0; max-height: none; box-sizing: border-box;
  padding: 34px 20px 14px 22px; gap: 5px; border: 0; border-radius: 2px;
  background: linear-gradient(135deg, #fff25e 0%, #fff7a0 45%, #fffbc2 100%);
  box-shadow: 7px 9px 9px rgba(20, 22, 30, .24), 1px 1px 0 rgba(0, 0, 0, .04);
  transform: rotate(var(--rot, 0deg)); transition: box-shadow .15s ease, transform .15s ease;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; overflow: hidden;
}
.notes-grid > .notes-sticky:nth-child(even) { transform: rotate(var(--rot, 0deg)); }
.notes-item.notes-sticky:hover { background: linear-gradient(135deg, #fff25e 0%, #fff7a0 45%, #fffbc2 100%); transform: rotate(var(--rot, 0deg)) translateY(-2px); box-shadow: 9px 13px 14px rgba(20, 22, 30, .28); }
.notes-item.notes-sticky.is-dragging { cursor: grabbing; transition: none; transform: rotate(0deg) scale(1.03); box-shadow: 12px 18px 22px rgba(20, 22, 30, .32); }
.notes-sticky::before {
  content: ""; position: absolute; top: 9px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ff9a86 0%, #e8402a 42%, #b3200f 100%);
  box-shadow: 4px 6px 5px rgba(0, 0, 0, .3), inset -2px -2px 3px rgba(90, 10, 0, .35);
}
.notes-sticky .notes-item-title { font-size: 16px; }
.notes-sticky .notes-item-preview { -webkit-line-clamp: 4; }
.notes-sticky-thumb { width: 38px; height: 38px; }
.note-modal-card { background: linear-gradient(135deg, #fff25e 0%, #fff7a0 45%, #fffbc2 100%); border: 0; border-radius: 3px; padding-top: 30px; }
.note-modal-card::before {
  content: ""; position: absolute; top: 8px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ff9a86 0%, #e8402a 42%, #b3200f 100%);
  box-shadow: 4px 6px 5px rgba(0, 0, 0, .3), inset -2px -2px 3px rgba(90, 10, 0, .35);
}

/* touch: only the top strip (pin) drags a sticker; the rest still scrolls the page */
.notes-sticky-grip { position: absolute; top: 0; left: 0; right: 0; height: 40px; touch-action: none; z-index: 2; }

.fav-tabs { margin-bottom: 12px; }

/* ══ Paper stickies v3: cream sheet, torn top edge, coloured tape ══ */
.notes-item.notes-sticky {
  --paper: #faf3e8; --tape: #f4a6a6; --tape-rot: -35deg;
  background: none !important; border: 0; padding: 0; overflow: visible; box-shadow: none !important;
  filter: drop-shadow(6px 8px 5px rgba(70, 48, 20, .28));
}
.notes-item.notes-sticky:hover { background: none !important; box-shadow: none !important; filter: drop-shadow(8px 11px 8px rgba(70, 48, 20, .3)); }
.notes-item.notes-sticky.is-dragging { filter: drop-shadow(12px 16px 14px rgba(70, 48, 20, .34)); }
.notes-item.notes-sticky.is-open { opacity: 0; }
.notes-sticky::before { content: none !important; }
.notes-paper, .note-sheet-paper {
  background: var(--paper);
  -webkit-mask: radial-gradient(circle 4.5px at 50% 0, transparent 96%, #000) top left / 13px 9px repeat-x, linear-gradient(#000, #000) bottom left / 100% calc(100% - 4px) no-repeat;
  mask: radial-gradient(circle 4.5px at 50% 0, transparent 96%, #000) top left / 13px 9px repeat-x, linear-gradient(#000, #000) bottom left / 100% calc(100% - 4px) no-repeat;
}
.notes-paper {
  position: absolute; inset: 0; box-sizing: border-box; padding: 30px 18px 12px 22px;
  display: flex; flex-direction: column; gap: 5px; color: #3b3226; overflow: hidden; text-align: left;
}
.notes-sticky .notes-item-title { color: #3b3226; }
.notes-sticky .notes-item-preview { color: #5b4f40; }
.notes-sticky .notes-item-meta { color: #9a8c78; }
.notes-tape, .note-sheet-tape {
  position: absolute; top: -2px; left: -22px; width: 84px; height: 26px; z-index: 5;
  transform: rotate(var(--tape-rot, -35deg));
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 40%), color-mix(in srgb, var(--tape, #f4a6a6) 86%, transparent);
  clip-path: polygon(0 0, 100% 0, 96% 12%, 100% 25%, 96% 37%, 100% 50%, 96% 62%, 100% 75%, 96% 87%, 100% 100%, 0 100%, 4% 87%, 0 75%, 4% 62%, 0 50%, 4% 37%, 0 25%, 4% 12%);
}
.note-sheet-tape { pointer-events: none; }
.notes-tape {
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}
.notes-item.notes-sticky.is-dragging .notes-tape { cursor: grabbing; }
.notes-sticky-grip { position: absolute; top: 0; left: 0; right: 0; height: 44px; touch-action: none; z-index: 4; }
/* The bin in a sticker's corner: shown on hover; folding away on delete */
.notes-sticky-del {
  position: absolute; top: 6px; right: 6px; z-index: 6; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .88); color: #9a6a5c; cursor: pointer;
  box-shadow: 0 2px 6px rgba(70, 48, 20, .18); opacity: 0; transform: scale(.8); pointer-events: none;
  transition: opacity .15s ease, transform .15s ease, color .15s ease;
}
.notes-sticky-del svg { width: 16px; height: 16px; }
@media (hover: hover) {
  .notes-item.notes-sticky:hover .notes-sticky-del, .notes-item.notes-sticky:focus-visible .notes-sticky-del { opacity: 1; transform: none; pointer-events: auto; }
}
.notes-sticky-del:hover { background: #fff; color: #d24b4e; }
.notes-item.notes-sticky.is-dragging .notes-sticky-del { opacity: 0; }
.notes-item.notes-sticky.is-gone { pointer-events: none; transition: transform .25s ease, opacity .25s ease; transform: rotate(var(--rot, 0deg)) scale(.6) translateY(24px); opacity: 0; }
.toast.toast-undo { display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 16px; border-radius: 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); animation: toast-undo-in .2s ease; }
.toast.toast-undo button { appearance: none; border: 0; background: transparent; color: #f0c46a; font: inherit; font-weight: 800; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.toast.toast-undo button:hover { background: rgba(255, 255, 255, .1); }
@keyframes toast-undo-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* the opened sheet */
.note-modal-backdrop { background: rgba(20, 16, 10, 0); transition: background .3s ease; }
.note-modal.is-shown .note-modal-backdrop { background: rgba(20, 16, 10, .45); }
/* Sheet + «Удалить»/«ОК» stacked under it (centered in the modal). */
.note-modal-stage {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center;
  gap: 14px; max-width: 100%; max-height: 100%;
}
.note-sheet {
  --paper: #faf3e8; --tape: #f4a6a6; --tape-rot: -35deg;
  position: relative; width: min(540px, 94vw); height: min(560px, calc(84vh - 70px)); will-change: transform;
  filter: drop-shadow(10px 14px 14px rgba(0, 0, 0, .35)); flex: none;
}
.note-sheet-tape { top: -6px; left: -30px; width: 108px; height: 34px; }
.note-sheet-paper {
  position: absolute; inset: 0; box-sizing: border-box; padding: 40px 28px 18px; display: flex; flex-direction: column; overflow: hidden;
}
/* Trash bin in the open sheet's corner (same look as sticker delete). */
.note-sheet-del {
  position: absolute; top: 10px; right: 10px; z-index: 6; width: 32px; height: 32px; border-radius: 50%;
  appearance: none; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #9a6a5c;
  box-shadow: 0 2px 8px rgba(70, 48, 20, .2);
  transition: background .15s ease, color .15s ease, transform .12s ease;
}
.note-sheet-del svg { width: 17px; height: 17px; display: block; }
.note-sheet-del:hover { background: #fff; color: #d24b4e; transform: scale(1.05); }
.note-sheet-del:active { transform: scale(.96); }
.note-sheet-del:disabled { opacity: .5; cursor: default; transform: none; }
.note-sheet-del:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.note-sheet .notes-editor { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; color: #3b3226; }
.note-sheet .notes-editor-title {
  background: transparent; border: 0; border-bottom: 1px dashed rgba(90, 70, 40, .35); border-radius: 0; padding: 4px 40px 8px 2px;
  font-size: 20px; color: #3b3226; box-shadow: none;
}
.note-sheet .notes-editor-body { background: transparent; border: 0; border-radius: 0; padding: 4px 2px; flex: 1 1 auto; min-height: 0; color: #3b3226; box-shadow: none; }
.note-sheet .notes-editor-title:focus, .note-sheet .notes-editor-body:focus { outline: none; box-shadow: none; border-color: rgba(90, 70, 40, .5); }
.note-sheet .notes-editor-rich { min-height: 0; overflow: auto; }
.note-sheet .notes-editor-rich.is-empty:before { color: #a89a85; }
.note-sheet .notes-inline-img-wrap { display: inline-block; margin: 4px 6px 4px 0; vertical-align: top; }
.note-sheet .notes-inline-img { max-height: 84px; max-width: 120px; object-fit: cover; cursor: zoom-in; }
.note-sheet .notes-inline-img-remove { width: 22px; height: 22px; top: 3px; right: 3px; font-size: 15px; }
.note-sheet .notes-editor-tools { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }

/* List split button with dropdown */
.notes-list-dropdown-wrap {
  position: relative;
  display: inline-flex;
}
.notes-list-btn-group {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(90, 70, 40, .2);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.notes-list-btn-group:hover, .notes-list-btn-group.is-open {
  background: #ffffff;
  border-color: rgba(90, 70, 40, .4);
  box-shadow: 0 1px 4px rgba(60, 45, 25, .1);
}
.notes-list-btn-group .notes-btn {
  border: none;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 6px 10px;
  font-size: 13px;
  color: #4a3e2f;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.notes-list-btn-group .notes-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.notes-list-btn-group .notes-list-main-btn {
  border-radius: 999px 0 0 999px;
  padding-right: 8px;
}
.notes-list-btn-group .notes-list-main-btn:hover:not(:disabled) {
  background: rgba(90, 70, 40, .06);
  color: #1a1510;
}
.notes-list-btn-group .notes-list-main-btn:active:not(:disabled) {
  transform: scale(.97);
}
.notes-list-btn-group .notes-list-main-btn svg {
  display: block;
  opacity: .85;
  flex: none;
}
.notes-list-btn-group .notes-list-arrow-btn {
  border-radius: 0 999px 999px 0;
  padding-left: 6px;
  padding-right: 10px;
  border-left: 1px solid rgba(90, 70, 40, .15);
}
.notes-list-btn-group .notes-list-arrow-btn:hover:not(:disabled) {
  background: rgba(90, 70, 40, .08);
  color: #1a1510;
}
.notes-list-btn-group .notes-list-arrow {
  width: 9px;
  height: 6px;
  display: block;
  transition: transform .2s ease;
}
.notes-list-btn-group.is-open .notes-list-arrow {
  transform: rotate(180deg);
}

/* Dropdown menu */
/* Dropdown menu (opens upward above toolbar) */
.notes-list-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  top: auto;
  z-index: 100;
  min-width: 140px;
  background: #ffffff;
  border: 1px solid rgba(90, 70, 40, .2);
  border-radius: 12px;
  box-shadow: 0 -4px 20px rgba(60, 45, 25, .18), 0 2px 6px rgba(0, 0, 0, .08);
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: notesMenuFadeIn .15s cubic-bezier(0, 0, .2, 1);
}
.notes-list-dropdown-menu[hidden] {
  display: none !important;
}
@keyframes notesMenuFadeIn {
  from { opacity: 0; transform: translateY(6px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.notes-list-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #3d3124;
  text-align: left;
  transition: background .12s ease, color .12s ease;
}
.notes-list-menu-item:hover, .notes-list-menu-item:focus-visible {
  background: rgba(90, 70, 40, .08);
  color: #1a1510;
}
.notes-list-menu-item.active {
  background: rgba(220, 160, 80, .18);
  color: #8a5015;
  font-weight: 600;
}
.notes-menu-glyph {
  width: 20px;
  font-weight: 700;
  font-size: 14px;
  color: #7a6348;
  display: inline-block;
  text-align: center;
}

/* Note editor list line, checkbox and animated strike */
.notes-editor-rich .note-line {
  position: relative;
  min-height: 1.55em;
  word-break: break-word;
  line-height: 1.5;
  padding-left: 1px;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.note-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 2px solid #b8a892;
  background: transparent;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  vertical-align: -3.5px;
  margin-right: 8px;
  position: relative;
  transition: all .2s cubic-bezier(.2, .8, .25, 1);
  box-sizing: border-box;
}
.note-check:hover {
  border-color: var(--note-check, #f4a6a6);
  transform: scale(1.08);
}
.note-check .note-check-svg {
  width: 12px;
  height: 12px;
  stroke: #ffffff;
  display: block;
  opacity: 0;
  transform: scale(0.4);
  filter: drop-shadow(0 0.5px 0.5px rgba(0, 0, 0, 0.25));
  transition: opacity .15s ease, transform .2s cubic-bezier(.175, .885, .32, 1.275);
}
.note-check.is-checked {
  background: var(--note-check, #f4a6a6);
  border-color: var(--note-check, #f4a6a6);
}
.note-check.is-checked .note-check-svg {
  opacity: 1;
  transform: scale(1);
}

/* Strikethrough inside note editor — ONLY across the text, never the whole line! */
.note-strike {
  display: inline;
  text-decoration: line-through 2px #d94343 !important;
  -webkit-text-decoration-line: line-through !important;
  -webkit-text-decoration-color: #d94343 !important;
  -webkit-text-decoration-thickness: 2px !important;
  text-decoration-thickness: 2px !important;
  color: #8c7e6b;
  opacity: .75;
  transition: opacity .2s ease, color .2s ease;
}

/* Checkbox and strikethrough on sticker preview on board */
.notes-item-preview .note-prev-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  margin-bottom: 2px;
}
.note-prev-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.4px solid #a89a85;
  vertical-align: -1px;
  margin-right: 5px;
  background: transparent;
  box-sizing: border-box;
  flex: none;
}
.note-prev-check.is-checked {
  background: var(--note-check, #f4a6a6);
  border-color: var(--note-check, #f4a6a6);
}
.note-prev-check.is-checked::after {
  content: "";
  display: block;
  width: 2.5px;
  height: 5px;
  border: solid #ffffff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) translate(-0.5px, -0.5px);
  filter: drop-shadow(0 0.5px 0.5px rgba(0, 0, 0, 0.25));
}
.note-prev-strike {
  text-decoration: line-through 2px #d94343 !important;
  -webkit-text-decoration-line: line-through !important;
  -webkit-text-decoration-color: #d94343 !important;
  -webkit-text-decoration-thickness: 2px !important;
  text-decoration-thickness: 2px !important;
  color: #8c7e6b;
  opacity: .8;
}
/* «ОК» — under the sheet, right-aligned with the paper edge. */
.note-sheet-actions {
  position: relative; z-index: 2; display: flex; flex-direction: row; gap: 10px; align-items: center; justify-content: flex-end;
  align-self: stretch; width: min(540px, 94vw); box-sizing: border-box;
  flex: none; pointer-events: none;
}
.note-sheet-bubble {
  pointer-events: auto; appearance: none; cursor: pointer;
  min-width: 108px; height: 46px; padding: 0 20px; border-radius: 999px;
  font: inherit; font-size: 16px; font-weight: 700; line-height: 1;
  color: #1a1d26;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22), 0 2px 8px rgba(0, 0, 0, .1), inset 0 1px 0 rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(16px) saturate(1.35); backdrop-filter: blur(16px) saturate(1.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.note-sheet-bubble:hover { transform: scale(1.04); box-shadow: 0 16px 32px rgba(0, 0, 0, .26), 0 3px 10px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .9); }
.note-sheet-bubble:active { transform: scale(.97); }
.note-sheet-bubble:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.note-sheet-bubble:disabled { opacity: .55; cursor: default; transform: none; }
.note-sheet-bubble.is-ok { color: #1a1d26; }
.note-sheet-colors { display: flex; flex-wrap: wrap; gap: 5px 12px; padding-top: 6px; border-top: 1px dashed rgba(90, 70, 40, .25); }
.note-sheet-colorgroup { display: flex; align-items: center; gap: 4px; }
.note-sheet-colorlabel { font-size: 10px; font-weight: 700; color: #8a7b66; margin-right: 1px; }
.note-swatch {
  appearance: none; width: 10px; height: 10px; border-radius: 50%; padding: 0; border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 0 0 1px rgba(60, 40, 10, .28); cursor: pointer; display: grid; place-items: center; font: inherit; font-size: 8px; line-height: 1; color: #5b4f40; background: #fff;
}
.note-swatch.is-on { box-shadow: 0 0 0 1.5px #3b3226; }
.note-sheet-random {
  appearance: none;
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(138, 123, 102, 0.45);
  background: rgba(255, 255, 255, 0.85);
  color: #6b5c49;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform .2s cubic-bezier(0.34, 1.56, 0.64, 1), background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
  box-shadow: 0 1px 3px rgba(60, 40, 10, 0.12);
  flex: none;
}
.note-sheet-random:hover {
  background: #ffffff;
  border-color: #5b4f40;
  color: #3b3226;
  transform: scale(1.15) rotate(45deg);
  box-shadow: 0 2px 8px rgba(60, 40, 10, 0.18);
}
.note-sheet-random:active {
  transform: scale(0.92) rotate(180deg);
}
.note-sheet-random svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 560px) { .note-sheet-paper { padding: 36px 18px 14px; } }

/* Notes: card wide enough for five stickers in a row (5 × 200px + 4 gaps) */
.feature-screen.is-notes .feature-card { width: min(var(--notes-w, 720px), 100%); }

/* favorite mark beside a message: peer → left of the bubble, own → right */
.msg-bubble.is-fav { position: relative; margin-left: 20px; }
.msg.mine .msg-bubble.is-fav { margin-left: 0; margin-right: 20px; }
.msg-fav-star { position: absolute; top: 50%; left: -19px; width: 16px; height: 16px; margin-top: -8px; color: #f5b301; pointer-events: none; display: grid; place-items: center; }
.msg-fav-star svg { width: 16px; height: 16px; display: block; }
.msg.mine .msg-fav-star { left: auto; right: -19px; }

.msg-submenu { z-index: 90; min-width: 180px; }
.msg-menu-item.has-submenu .msg-menu-trailing { font-size: 20px; line-height: 1; color: #8b8e98; }
/* A meeting on that day: the red mark (as its chip below). */
.calendar-mark.is-conf { background: #e5484d; }
/* «Создать на …»: chips under the chosen day, each with its colour dot. */
.calendar-make { display: grid; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(20, 32, 51, .14); }
.calendar-make-cap { font-size: calc(13.5px * var(--text-scale, 1)); font-weight: 800; color: #3b3f4a; }
.calendar-make-row { display: flex; flex-wrap: wrap; gap: 8px; }
.calendar-make-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid #e3e5eb; background: #fff; color: #3b3f4a;
  font: inherit; font-weight: 700; font-size: calc(14px * var(--text-scale, 1));
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.calendar-make-chip:hover { border-color: #9aa0ad; background: #fafbfc; }
.calendar-make-chip:active { transform: scale(.97); }
.calendar-make-chip i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.calendar-make-chip.is-note i { background: #e9963a; }
.calendar-make-chip.is-poll i { background: var(--cal-poll, #8b6fe0); }
.calendar-make-chip.is-task i { background: #5bb98a; }
.calendar-make-chip.is-meeting i { background: #e5484d; }
/* A note with «Напомнить» on its day: the orange mark (as its chip). */
.calendar-mark.is-note { background: #e9963a; }
.calendar-note-item .calendar-poll-q { font-weight: 650; }
/* Calendar: «Новая заметка» / «Новый опрос» windows. */
.calendar-make-dialog .calendar-form-label { display: block; margin: 10px 0 4px; font-size: calc(13px * var(--text-scale, 1)); font-weight: 650; color: #5b6070; }
.calendar-make-dialog .calendar-form-label:first-child { margin-top: 0; }
.calendar-make-dialog input[type=text], .calendar-make-dialog textarea { width: 100%; box-sizing: border-box; }
.calendar-poll-options { display: flex; flex-direction: column; gap: 6px; }
.calendar-poll-option { display: flex; align-items: center; gap: 6px; }
.calendar-poll-option input { flex: 1; min-width: 0; }
.calendar-make-dialog .task-add-goal { margin-top: 6px; }
.calendar-form-hint { margin: 6px 0 4px; font-size: calc(12px * var(--text-scale, 1)); color: #8b8e98; }
.calendar-make-dialog .btn.wide { margin-top: 12px; }

/* Notes: digital alarm icon + «Напомнить» in the sheet, the time on the sticker. */
.note-alarm-label { display: inline-flex; align-items: center; gap: 6px; }
.note-alarm-ico {
  display: block; flex: none; width: 16px; height: 16px;
  object-fit: contain;
  filter: drop-shadow(0 0 1px rgba(255, 120, 20, .45)) drop-shadow(0 1px 1px rgba(180, 70, 10, .28));
}
.notes-remind-btn .note-alarm-label { gap: 6px; }
.notes-remind-btn .note-alarm-ico { width: 18px; height: 18px; }
.notes-item-remind .note-alarm-ico { width: 14px; height: 14px; }
.calendar-note-item .note-alarm-label { gap: 5px; }
.calendar-note-item .note-alarm-ico { width: 13px; height: 13px; }
.notes-remind-btn.is-on { border-color: #e9963a; color: #9a5a12; background: #fff5e8; }
.note-remind {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 8px 0 2px; padding: 8px 10px; border-radius: 12px;
  background: rgba(233, 150, 58, .1); border: 1px dashed rgba(233, 150, 58, .45);
}
.note-remind.hidden { display: none; }
.note-remind-label { font-weight: 700; font-size: calc(13px * var(--text-scale, 1)); color: #9a5a12; }
.note-remind .note-remind-off { margin-left: auto; }
.notes-item-remind {
  align-self: flex-start; margin: 0 0 4px; padding: 2px 8px; border-radius: 999px;
  font-size: calc(11.5px * var(--text-scale, 1)); font-weight: 700;
  background: rgba(233, 150, 58, .18); color: #8a4f0c;
}
.notes-item-remind.is-past { opacity: .6; }
