/* Simos Camp — Gossip Box: pinned cork board, colour-coded notes, compose sheet, fold & drop.
 * (owner: gossip — ARCHITECTURE.md §5.11; class prefix gb-; builds on css/base.css tokens & primitives)
 * Notes are always light paper with dark ink (they read the same in dark mode); panel chrome uses the theme tokens.
 */
.gb-sheet {
  --gb-ink: #4a3b33; --gb-ink-soft: rgba(74, 59, 51, .6);
  --gb-berry: #9b7bf2; --gb-berry-d: #6f51cf;
  --gb-hearts: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='30'%3E%3Cpath d='M9 13.5s-5-3.1-5-6.6A2.7 2.7 0 0 1 9 5.6a2.7 2.7 0 0 1 5 1.3c0 3.5-5 6.6-5 6.6z' fill='%23ff5c8a' fill-opacity='.14'/%3E%3Cpath d='M25 27s-3.4-2.1-3.4-4.5a1.8 1.8 0 0 1 3.4-.9 1.8 1.8 0 0 1 3.4.9c0 2.4-3.4 4.5-3.4 4.5z' fill='%23ff5c8a' fill-opacity='.11'/%3E%3C/svg%3E");
  --gb-sparkles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath d='M8 4l1 3 3 1-3 1-1 3-1-3-3-1 3-1z' fill='%237650d8' fill-opacity='.12'/%3E%3Ccircle cx='22' cy='21' r='1.4' fill='%237650d8' fill-opacity='.13'/%3E%3C/svg%3E");
}

/* note paper colours per tag (also used by tag cards, the compose paper and the flying note) */
.gb-t-compliment { --gb-bg: #ffe3ee; --gb-edge: #ffc2d6; --gb-pin: #ff4f86; --gb-acc: #e0457a; --gb-pattern: var(--gb-hearts); }
.gb-t-gossip { --gb-bg: #ece3ff; --gb-edge: #d8c9ff; --gb-pin: #8c62f0; --gb-acc: #7650d8; --gb-pattern: var(--gb-sparkles); }
.gb-t-thought, .gb-t-thought.gb-blue { --gb-bg: #ddeffd; --gb-edge: #b9dcf6; --gb-pin: #2c9bd6; --gb-acc: #2a7fb8;
  --gb-pattern: repeating-linear-gradient(180deg, transparent 0 21px, rgba(44, 155, 214, .16) 21px 22px); }
.gb-t-thought.gb-sand { --gb-bg: #fbf0d4; --gb-edge: #efdcaa; --gb-pin: #f2a33a; --gb-acc: #b27a2a;
  --gb-pattern: linear-gradient(90deg, rgba(178, 122, 42, .07) 1px, transparent 1px) 0 0 / 14px 14px, linear-gradient(180deg, rgba(178, 122, 42, .07) 1px, transparent 1px) 0 0 / 14px 14px; }

/* ======================================================================== small art: heart, sneaky eye, pin */
.gb-heart { position: relative; display: inline-block; width: 1em; height: .9em; vertical-align: middle; }
.gb-heart::before, .gb-heart::after {
  content: ''; position: absolute; top: 0; width: .5em; height: .8em; border-radius: .5em .5em 0 0; background: var(--heart, #ff5c8a);
}
.gb-heart::before { left: .5em; transform: rotate(-45deg); transform-origin: 0 100%; }
.gb-heart::after { left: 0; transform: rotate(45deg); transform-origin: 100% 100%; }

.gb-eye {
  position: relative; display: inline-block; width: 1.5em; height: .96em; border-radius: 50%; background: #fff; vertical-align: middle;
  border: .09em solid #5b3fb0; overflow: hidden; box-shadow: 0 .06em 0 rgba(0, 0, 0, .12);
}
.gb-eye::before {  /* half-closed lid → sneaky */
  content: ''; position: absolute; left: -.1em; right: -.1em; top: -.1em; height: .52em; z-index: 2;
  background: linear-gradient(180deg, #c8b3ff, #a88bf5); border-bottom: .08em solid #5b3fb0;
  animation: gb-lid 5s ease-in-out infinite;
}
.gb-pupil {
  position: absolute; top: .26em; left: .48em; width: .5em; height: .5em; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff 0 .07em, #3a2a6a .09em);
  animation: gb-peek 3.4s ease-in-out infinite;
}
@keyframes gb-peek { 0%, 18% { transform: translateX(-.32em); } 42%, 68% { transform: translateX(.3em); } 88%, 100% { transform: translateX(-.32em); } }
@keyframes gb-lid { 0%, 90%, 100% { transform: translateY(0); } 94% { transform: translateY(.3em); } }

.gb-pin {
  position: absolute; top: -8px; left: var(--pinx, 50%); width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; z-index: 3;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .95) 0 2.4px, rgba(255, 255, 255, 0) 3.6px), var(--gb-pin, #ff5c8a);
  box-shadow: inset -2px -3px 0 rgba(0, 0, 0, .2), 0 3px 3px rgba(40, 20, 10, .35);
}
.gb-pin::after {  /* the needle's little shadow on the paper */
  content: ''; position: absolute; left: 9px; top: 15px; width: 4px; height: 7px; border-radius: 2px;
  background: rgba(60, 35, 15, .28); transform: skewX(-30deg); filter: blur(.6px);
}

/* ======================================================================== panel: tabs */
.gb-root { position: relative; }
.gb-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 999px; background: var(--sand); border: 2px solid var(--sand-dark);
  position: sticky; top: -14px; z-index: 6; box-shadow: 0 4px 10px rgba(30, 50, 64, .1);
}
.gb-tab {
  flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border: 0; border-radius: 999px;
  background: transparent; cursor: pointer; font: 600 15.5px/1 var(--font); color: var(--ink-soft);
  transition: background .2s, color .2s, transform .12s var(--ease-spring), box-shadow .2s;
}
.gb-tab:active { transform: scale(.96); }
.gb-tab.on {
  background: linear-gradient(180deg, #b79cff, var(--gb-berry)); color: #fff; text-shadow: 0 1px 0 rgba(80, 50, 160, .55);
  box-shadow: 0 3px 0 var(--gb-berry-d);
}
.gb-tab-ico { font-size: 17px; }
.gb-tab-n {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: rgba(255, 255, 255, .8); color: var(--gb-berry-d); font-size: 12.5px; text-shadow: none;
}
.gb-tab:not(.on) .gb-tab-n { background: var(--sand-dark); color: var(--ink); }
.gb-tabin { animation: gb-fade .3s var(--ease-soft) backwards; }
@keyframes gb-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ======================================================================== board */
.gb-filters {
  display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px; scrollbar-width: none; touch-action: pan-x pan-y;
}
.gb-filters::-webkit-scrollbar { display: none; }
.gb-chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 3px 5px 3px 11px; border-radius: 999px;
  border: 2px solid var(--sand-dark); background: var(--paper); color: var(--ink); font: 600 13.5px/1 var(--font); cursor: pointer;
  transition: background .2s, border-color .2s, transform .12s var(--ease-spring);
}
.gb-chip:active { transform: scale(.95); }
.gb-chip:disabled { opacity: .45; cursor: default; }
.gb-chip-ico { font-size: 14px; }
.gb-chip-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--sand); font-size: 12px; }
.gb-chip.on { color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.gb-chip.on .gb-chip-n { background: rgba(255, 255, 255, .85); color: var(--gb-ink); text-shadow: none; }
.gb-chip.gb-c-all.on { background: linear-gradient(180deg, var(--wood-light), var(--wood)); border-color: var(--wood-dark); }
.gb-chip.gb-c-compliment.on { background: linear-gradient(180deg, #ff9dbf, #ff6f9d); border-color: #e0457a; }
.gb-chip.gb-c-gossip.on { background: linear-gradient(180deg, #b79cff, var(--gb-berry)); border-color: var(--gb-berry-d); }
.gb-chip.gb-c-thought.on { background: linear-gradient(180deg, #7cc7f0, #3ea6de); border-color: #2a7fb8; }

.gb-frame {
  padding: 9px; border-radius: 18px;
  background: var(--wood-grain), linear-gradient(180deg, #d09a63, #a56f43);
  box-shadow: 0 4px 0 #6f4a2c, 0 10px 18px rgba(60, 35, 15, .22), inset 0 2px 0 rgba(255, 255, 255, .28), inset 0 -2px 0 rgba(0, 0, 0, .15);
}
.gb-cork {
  position: relative; border-radius: 10px; padding: 10px 10px 18px; min-height: 250px;
  background:
    radial-gradient(circle at 30% 40%, rgba(110, 66, 30, .24) 0 1.3px, rgba(110, 66, 30, 0) 2px) 0 0 / 13px 11px,
    radial-gradient(circle at 70% 70%, rgba(255, 236, 200, .3) 0 1.1px, rgba(255, 236, 200, 0) 1.8px) 3px 5px / 17px 15px,
    radial-gradient(circle at 50% 20%, rgba(90, 50, 20, .15) 0 2px, rgba(90, 50, 20, 0) 2.9px) 7px 2px / 29px 23px,
    radial-gradient(120% 90% at 50% 0%, #e2b37b, #d09c60 58%, #bd894f);
  box-shadow: inset 0 3px 8px rgba(60, 35, 15, .45), inset 0 -2px 6px rgba(60, 35, 15, .25);
}
.gb-board-head { display: flex; align-items: center; gap: 10px; margin: 0 2px 16px; }
.gb-board-head .gb-box { flex: none; margin: -2px 0 -4px; filter: drop-shadow(0 3px 2px rgba(60, 35, 15, .35)); }
.gb-sign {
  flex: 1 1 auto; min-width: 0; padding: 6px 12px 7px; border-radius: 6px; background: #fffaf0; color: var(--gb-ink);
  transform: rotate(-1.2deg); box-shadow: 0 2px 0 rgba(0, 0, 0, .08), 0 5px 9px rgba(60, 35, 15, .28); position: relative;
}
.gb-sign::before, .gb-sign::after {  /* two little tapes */
  content: ''; position: absolute; top: -6px; width: 30px; height: 13px; background: rgba(255, 245, 205, .8);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
}
.gb-sign::before { left: 10px; transform: rotate(-8deg); }
.gb-sign::after { right: 10px; transform: rotate(7deg); }
.gb-sign-t { display: block; font-weight: 700; font-size: 16.5px; line-height: 1.15; }
.gb-sign-s { display: block; font-size: 11.5px; color: #8a7466; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-count {
  flex: none; width: 52px; height: 52px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 38% 30%, #fff, #fcf5e3 65%, #f0dcb2); color: var(--gb-ink); border: 3px solid var(--wood-dark);
  box-shadow: 0 3px 0 var(--wood-deep); transform: rotate(4deg); line-height: 1;
}
.gb-count b { font-size: 19px; }
.gb-count span { font-size: 10px; font-weight: 600; color: #8a7466; }

.gb-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 18px 12px; align-items: start; }
.gb-note {
  position: relative; display: block; margin: var(--nudge, 0px) 0 0; padding: 14px 11px 7px 12px; min-height: 104px;
  border-radius: 3px 3px 14px 3px / 3px 3px 9px 3px; color: var(--gb-ink);
  background: var(--gb-pattern, none), var(--gb-bg, #fffaf0);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 3px 7px 10px rgba(60, 35, 15, .32), inset 0 -10px 12px -12px rgba(60, 35, 15, .35);
  transform: rotate(var(--rot, 0deg)); transform-origin: 50% 0;
}
.gb-note-text {
  margin: 2px 0 0; font: 500 15px/1.3 var(--font); overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap;
  -webkit-user-select: text; user-select: text;
}
.gb-stamp {
  float: right; width: 30px; height: 30px; margin: -4px -4px 2px 6px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .72); box-shadow: 0 1px 0 rgba(0, 0, 0, .08), inset 0 0 0 2px var(--gb-edge, rgba(0, 0, 0, .05)); font-size: 16px; line-height: 1;
}
.gb-stamp-heart { font-size: 15px; }
.gb-stamp-heart .gb-heart { animation: gb-beat 2.4s ease-in-out infinite; }
@keyframes gb-beat { 0%, 60%, 100% { transform: scale(1); } 70% { transform: scale(1.18); } 80% { transform: scale(.96); } 88% { transform: scale(1.1); } }
.gb-stamp-eye { font-size: 13px; }
.gb-note-foot {
  clear: both; display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px;
  font-size: 11.5px; font-weight: 500; color: var(--gb-ink-soft);
}
.gb-when { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-act {
  flex: none; width: 34px; height: 34px; margin: -5px -6px -3px 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .5); font-size: 15px; line-height: 1; cursor: pointer; opacity: .78;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .07); transition: opacity .15s, transform .12s var(--ease-spring), background .15s;
}
.gb-act:hover { opacity: 1; background: #fff; }
.gb-act:active { transform: scale(.88); }
.gb-new {
  position: absolute; top: -7px; left: -7px; z-index: 4; padding: 2px 7px 3px; border-radius: 6px; background: var(--yellow); color: #7a4b00;
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; transform: rotate(-12deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .12);
}
.gb-more { display: flex; margin: 16px auto 2px; }
.gb-more-n { font-size: 12px; opacity: .7; }

/* notes flutter out of the box: start at the box (--fx, --fy), tumble through the air, land on their spot */
.gb-note.gb-flutter { animation: gb-flutter 1s cubic-bezier(.25, .75, .35, 1) var(--d, 0s) backwards; z-index: 2; }
.gb-note.gb-flutter .gb-pin { animation: gb-pin-in .38s var(--ease-spring) calc(var(--d, 0s) + .8s) backwards; }
@keyframes gb-flutter {
  0% { opacity: 0; transform: translate(var(--fx, 0px), var(--fy, -60px)) rotate(var(--spin, 120deg)) scale(.18); }
  12% { opacity: 1; }
  38% { transform: translate(calc(var(--fx, 0px) * .55 + 16px), calc(var(--fy, -60px) * .55 - 26px)) rotate(calc(var(--rot, 0deg) - 22deg)) scale(.62); }
  64% { transform: translate(calc(var(--fx, 0px) * .16 - 10px), calc(var(--fy, -60px) * .12 - 10px)) rotate(calc(var(--rot, 0deg) + 11deg)) scale(1.05); }
  84% { transform: translate(0, 3px) rotate(calc(var(--rot, 0deg) - 3deg)) scale(1.02); }
  100% { opacity: 1; transform: rotate(var(--rot, 0deg)); }
}
@keyframes gb-pin-in { 0% { transform: translateY(-14px) scale(1.6); opacity: 0; } 70% { transform: translateY(1px) scale(.9); opacity: 1; } 100% { transform: none; } }
/* a reported / taken-down note loses its pin and drifts off the board */
.gb-note.gb-gone { animation: gb-gone .5s ease-in forwards; pointer-events: none; z-index: 3; }
.gb-note.gb-gone .gb-pin { animation: gb-pin-off .3s ease-out forwards; }
@keyframes gb-gone {
  0% { transform: rotate(var(--rot, 0deg)); }
  25% { transform: translateY(-6px) rotate(calc(var(--rot, 0deg) - 9deg)); }
  100% { transform: translate(34px, 150px) rotate(calc(var(--rot, 0deg) + 48deg)) scale(.8); opacity: 0; }
}
@keyframes gb-pin-off { to { transform: translate(-10px, -26px) scale(.6); opacity: 0; } }

.gb-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 8px 8px; text-align: center; }
.gb-empty-note {
  position: relative; width: 190px; padding: 26px 14px 22px; border-radius: 3px 3px 14px 3px; background: #fffaf0; color: var(--gb-ink);
  font-weight: 600; font-size: 16px; transform: rotate(-3deg); box-shadow: 3px 7px 10px rgba(60, 35, 15, .32);
}
.gb-empty-t { color: #fff; font-weight: 600; font-size: 15px; text-shadow: 0 2px 0 rgba(90, 50, 20, .55); }
/* the very first note: a blank paper note pinned among dashed "free spots", and a small card inviting the player */
.gb-empty-stage { position: relative; width: min(300px, 100%); height: 176px; display: grid; place-items: center; }
.gb-ghost {
  position: absolute; width: 84px; height: 66px; border: 2.5px dashed rgba(255, 250, 240, .75); border-radius: 3px 3px 12px 3px;
  background: rgba(255, 250, 240, .1); animation: gb-ghost 3.2s ease-in-out infinite;
}
.gb-ghost-1 { left: 0; top: 10px; transform: rotate(-7deg); }
.gb-ghost-2 { right: 0; top: 2px; transform: rotate(6deg); animation-delay: -1.1s; }
.gb-ghost-3 { right: 12px; bottom: 0; width: 72px; height: 56px; transform: rotate(-4deg); animation-delay: -2.2s; }
@keyframes gb-ghost { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.gb-empty-first .gb-empty-note {
  z-index: 1; width: 176px; padding: 20px 12px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: repeating-linear-gradient(180deg, transparent 0 21px, rgba(44, 155, 214, .1) 21px 22px), #fffaf0;
  animation: gb-empty-sway 4.2s ease-in-out infinite; transform-origin: 50% 0;
}
@keyframes gb-empty-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(-1deg) translateY(1px); } }
.gb-empty-first .gb-pin { --pinx: 50%; }
.gb-empty-ico { font-size: 25px; line-height: 1.1; }
.gb-empty-h { font-size: 16px; line-height: 1.2; color: var(--gb-ink); }
.gb-empty-lines { display: block; width: 100%; margin-top: 2px; }
.gb-empty-lines i { display: block; height: 3px; margin: 8px 10px 0; border-radius: 2px; background: rgba(74, 59, 51, .12); }
.gb-empty-lines i:nth-child(2) { margin-right: 26px; }
.gb-empty-lines i:nth-child(3) { width: 45%; }
.gb-empty-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 380px; padding: 12px 14px 14px; border-radius: 16px;
  background: rgba(255, 250, 240, .94); color: var(--gb-ink); box-shadow: 0 3px 0 rgba(111, 74, 44, .35), 0 8px 14px rgba(60, 35, 15, .22);
}
.gb-empty-s { margin: 0; font-size: 14px; line-height: 1.35; }
.gb-empty-btn { min-height: 46px; min-width: min(230px, 100%); font-size: 16.5px; }
.gb-empty-card .gb-login { background: #f4e6c4; color: var(--gb-ink); }
@media (prefers-reduced-motion: reduce) {
  .gb-ghost, .gb-empty-first .gb-empty-note { animation: none; }
}

.gb-safety { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; margin: 14px 0 2px; }
.gb-safety span {
  padding: 4px 10px; border-radius: 999px; background: var(--sand); border: 2px solid var(--sand-dark); color: var(--ink-soft);
  font-size: 12px; font-weight: 600;
}

/* ======================================================================== the gossip box (DOM art, em-scaled) */
.gb-box { position: relative; display: inline-block; width: 10em; height: 12.6em; font-size: 7px; flex: none; transform-origin: 50% 100%; }
.gb-box-s { font-size: 4.6px; }
.gb-box-l { font-size: 11px; }
.gb-box-top {
  position: absolute; left: .3em; right: .3em; top: 0; height: 2.8em; z-index: 2; border-radius: 1.1em 1.1em .5em .5em;
  background: linear-gradient(180deg, #f3cb97, #dba46a); border: .35em solid #8a5a34; box-shadow: inset 0 .25em 0 rgba(255, 255, 255, .35);
  transform-origin: 12% 100%; transition: transform .35s var(--ease-spring);
}
.gb-box-slot {
  position: absolute; left: 50%; top: 50%; width: 5.2em; height: .8em; margin: -.45em 0 0 -2.6em; border-radius: .5em;
  background: #3b2415; box-shadow: inset 0 .22em 0 rgba(0, 0, 0, .55), 0 .12em 0 rgba(255, 255, 255, .35);
}
.gb-box-body {
  position: absolute; left: 0; right: 0; top: 2.2em; height: 6.3em; z-index: 1; border-radius: .6em .6em 1.1em 1.1em;
  background: var(--wood-grain), linear-gradient(180deg, #dfa86c, #bb7d47); border: .35em solid #8a5a34;
  box-shadow: inset 0 -.5em 0 rgba(0, 0, 0, .1), inset 0 .3em 0 rgba(255, 255, 255, .2);
  display: flex; align-items: center; justify-content: space-evenly; padding-top: .3em;
}
.gb-box-body .gb-heart { font-size: 2.3em; }
.gb-box-body .gb-eye { font-size: 1.85em; }
.gb-box-stand { position: absolute; left: 0; right: 0; top: 8.3em; bottom: 0; }
.gb-box-post {
  position: absolute; left: 50%; top: 0; bottom: .9em; width: 1.7em; margin-left: -.85em;
  background: linear-gradient(90deg, #9b6a40, #d19b63 50%, #9b6a40); border: .3em solid #7a5132; border-top: 0;
}
.gb-box-foot { position: absolute; left: 2.2em; right: 2.2em; bottom: 0; height: 1.3em; border-radius: .7em; background: linear-gradient(180deg, #b27a49, #8a5a34); border: .3em solid #6f4a2c; }
.gb-box.gb-open .gb-box-top { transform: rotate(-26deg) translate(-.3em, -.9em); }
.gb-box.gb-bounce { animation: gb-bounce .55s var(--ease-spring); }
@keyframes gb-bounce {
  0% { transform: none; } 22% { transform: scale(1.12, .84); } 50% { transform: scale(.93, 1.1) translateY(-7%); }
  76% { transform: scale(1.04, .97); } 100% { transform: none; }
}

/* ======================================================================== write tab */
.gb-write { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 2px 2px 6px; }
.gb-write-art {
  position: relative; width: 100%; height: 178px; display: flex; align-items: flex-end; justify-content: center; border-radius: 22px; overflow: hidden;
  background: radial-gradient(90% 70% at 50% 100%, rgba(255, 215, 94, .35), rgba(255, 215, 94, 0) 70%),
    linear-gradient(180deg, #bfeee8, #e8f7ef 55%, #f6e7c6 56%, #ecd6a8);
  border: 3px solid var(--sand-dark); padding-bottom: 12px;
}
.gb-write-art .gb-box { animation: gb-box-loop 3.4s ease-in-out infinite; filter: drop-shadow(0 4px 2px rgba(60, 35, 15, .3)); }
.gb-drop-note {
  position: absolute; left: 50%; top: 0; width: 34px; height: 23px; margin-left: -17px; border-radius: 3px; z-index: 3;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, .1) 50%, rgba(0, 0, 0, 0) 53%), #ffe3ee;
  box-shadow: 0 3px 5px rgba(60, 35, 15, .25); animation: gb-drop-loop 3.4s ease-in infinite;
}
@keyframes gb-drop-loop {
  0% { transform: translate(-40px, -30px) rotate(-30deg); opacity: 0; }
  12% { opacity: 1; }
  40% { transform: translate(-12px, 4px) rotate(14deg); }
  58% { transform: translate(0, 26px) rotate(0); opacity: 1; }
  66% { transform: translate(0, 34px) scale(.8, .15); opacity: 0; }
  100% { transform: translate(0, 34px) scale(.8, .15); opacity: 0; }
}
@keyframes gb-box-loop { 0%, 60%, 100% { transform: none; } 66% { transform: scale(1.08, .9); } 74% { transform: scale(.95, 1.07) translateY(-5px); } 84% { transform: scale(1.02, .98); } }
.gb-spark { position: absolute; font-style: normal; font-size: 18px; animation: gb-float 3.4s ease-in-out infinite; }
.gb-spark.s1 { left: calc(50% + 62px); top: 38px; }
.gb-spark.s2 { left: calc(50% - 84px); top: 70px; animation-delay: -1.6s; }
@keyframes gb-float { 0%, 100% { transform: translateY(0) scale(1); opacity: .9; } 50% { transform: translateY(-9px) scale(1.12); opacity: 1; } }
.gb-write-t { font-weight: 700; font-size: 21px; margin-top: 2px; }
.gb-write-s { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.35; max-width: 440px; }
.gb-tagcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-top: 4px; }
.gb-tagcard {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 9px; border-radius: 14px;
  background: var(--gb-pattern, none), var(--gb-bg); color: var(--gb-ink); border: 2px solid var(--gb-edge);
  box-shadow: 0 3px 0 var(--gb-edge);
}
.gb-tagcard:nth-child(1) { transform: rotate(-1.5deg); }
.gb-tagcard:nth-child(3) { transform: rotate(1.5deg); }
.gb-tagcard-ico { font-size: 24px; line-height: 1.1; }
.gb-tagcard b { font-size: 14.5px; }
.gb-tagcard small { font-size: 11.5px; color: var(--gb-ink-soft); line-height: 1.2; }
.gb-tagcard-pts {
  position: absolute; top: -9px; right: -5px; padding: 2px 7px; border-radius: 999px; background: var(--green); color: #fff;
  border: 2px solid #fff; font-size: 11.5px; font-weight: 700; box-shadow: 0 2px 0 rgba(0, 0, 0, .12);
}
.gb-rules { list-style: none; margin: 4px 0 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.gb-rules li {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.3;
  background: var(--paper); border: 2px solid var(--sand-dark);
}
.gb-rules li > span { flex: none; }
.gb-pointsline { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.gb-write-btn { min-width: 220px; min-height: 52px; font-size: 18px; margin-top: 2px; }
.gb-login { padding: 10px 14px; border-radius: 14px; background: var(--sand); color: var(--ink-soft); font-size: 14px; }

/* ======================================================================== compose sheet */
.gb-compose { position: relative; padding-bottom: 2px; }
.gb-anon {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.3;
  background: var(--ui-turq-soft, #dcf6f3); border: 2px dashed rgba(29, 143, 163, .5); color: var(--ink);
}
.gb-anon-ico { font-size: 22px; line-height: 1; }
.gb-tagpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 16px; }
.gb-tagbtn {
  position: relative; min-height: 58px; padding: 6px 4px; border-radius: 16px; border: 3px solid var(--gb-edge); cursor: pointer;
  background: var(--gb-bg); color: var(--gb-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font: 600 14px/1.1 var(--font); box-shadow: 0 3px 0 var(--gb-edge); opacity: .78;
  transition: transform .15s var(--ease-spring), box-shadow .15s, border-color .15s, opacity .15s;
}
.gb-tagbtn:active { transform: scale(.95); }
.gb-tagbtn.on { opacity: 1; border-color: var(--gb-acc); box-shadow: 0 4px 0 var(--gb-acc); transform: translateY(-2px); }
.gb-tagbtn.on .gb-tagbtn-ico { animation: gb-hop .45s var(--ease-spring); }
.gb-tagbtn-ico { font-size: 21px; line-height: 1; }
.gb-tagbtn-p {
  position: absolute; top: -9px; right: -6px; padding: 1px 6px 2px; border-radius: 999px; background: var(--green); color: #fff;
  border: 2px solid #fff; font-size: 11px; font-weight: 700; box-shadow: 0 2px 0 rgba(0, 0, 0, .12);
}
@keyframes gb-hop { 0% { transform: none; } 40% { transform: translateY(-5px) scale(1.2); } 100% { transform: none; } }

.gb-paper { position: relative; margin: 0 4px; perspective: 900px; transform: rotate(-.7deg); transition: opacity .2s, transform .25s; }
.gb-paper-inner {
  position: relative; padding: 16px 14px 8px; border-radius: 4px 4px 16px 4px / 4px 4px 10px 4px;
  background: var(--gb-pattern, none), var(--gb-bg, #fffaf0); color: var(--gb-ink);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .06), 0 9px 16px rgba(60, 35, 15, .22), inset 0 -12px 14px -14px rgba(60, 35, 15, .4);
  transition: background-color .3s;
}
.gb-paper .gb-pin { --pinx: 50%; }
.gb-paper-stamp { position: absolute; float: none; top: 10px; right: 10px; margin: 0; }
.gb-input {
  display: block; width: 100%; min-height: 104px; resize: none; border: 0; outline: none; background: transparent; color: var(--gb-ink);
  font: 500 18px/1.35 var(--font); padding: 0 40px 0 0; margin: 0; -webkit-user-select: text; user-select: text;
}
.gb-input::placeholder { color: rgba(74, 59, 51, .4); }
.gb-paper-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.gb-sig { font-size: 12.5px; color: var(--gb-ink-soft); font-style: italic; }
.gb-ring { position: relative; width: 30px; height: 30px; flex: none; }
.gb-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.gb-ring-bg { fill: none; stroke: rgba(74, 59, 51, .14); stroke-width: 3.5; }
.gb-ring-fg { fill: none; stroke: var(--turq); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 94.25; transition: stroke-dashoffset .2s, stroke .2s; }
.gb-ring.gb-near .gb-ring-fg { stroke: var(--orange); }
.gb-ring.gb-over .gb-ring-fg { stroke: var(--red); }
.gb-ring-n { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: var(--gb-ink); }
.gb-ring.gb-over .gb-ring-n { color: var(--red-dark); }
.gb-paper.gb-wiggle { animation: gb-wiggle .4s var(--ease-spring); }
@keyframes gb-wiggle { 0% { transform: rotate(-.7deg); } 35% { transform: rotate(1.4deg) scale(1.01); } 70% { transform: rotate(-1.4deg); } 100% { transform: rotate(-.7deg); } }
.gb-paper.gb-shake { animation: gb-shake .45s ease; }
@keyframes gb-shake { 0%, 100% { transform: rotate(-.7deg); } 20% { transform: translateX(-6px) rotate(-2deg); } 45% { transform: translateX(6px) rotate(1deg); } 70% { transform: translateX(-3px); } 85% { transform: translateX(2px); } }

/* fold: the top half folds down over the bottom half, then the note flies into the box */
.gb-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 50%; z-index: 4; visibility: hidden; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(0, 0, 0, .08)), var(--gb-bg, #fffaf0);
  transform-origin: 50% 100%;
}
.gb-paper.gb-folding .gb-flap { visibility: visible; animation: gb-flap .5s cubic-bezier(.55, 0, .45, 1) forwards; }
.gb-paper.gb-folding .gb-paper-inner { animation: gb-halfhide .5s linear forwards; }
.gb-paper.gb-folding .gb-pin { animation: gb-pin-off .25s ease-out forwards; }
@keyframes gb-flap { 0% { transform: rotateX(0deg); } 100% { transform: rotateX(-180deg); filter: brightness(.93); } }
@keyframes gb-halfhide { 0%, 45% { clip-path: inset(0 0 0 0); } 55%, 100% { clip-path: inset(50% 0 0 0); } }
.gb-paper.gb-folded { opacity: 0; transform: scale(.5) translateY(40px); transition: opacity .12s, transform .2s; }
.gb-flyer { position: absolute; width: 0; height: 0; z-index: 30; pointer-events: none; animation: gb-fly-x .62s linear forwards; }
.gb-flyer-y { animation: gb-fly-y .62s linear forwards; }
.gb-flyer-note {
  position: absolute; left: -32px; top: -21px; width: 64px; height: 42px; border-radius: 4px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, .1) 50%, rgba(0, 0, 0, 0) 53%), var(--gb-pattern, none), var(--gb-bg, #fffaf0);
  box-shadow: 0 5px 8px rgba(60, 35, 15, .3); animation: gb-fly-note .62s ease-in forwards;
}
.gb-flyer-note .gb-stamp { float: none; margin: 0; width: 24px; height: 24px; font-size: 13px; }
@keyframes gb-fly-x { to { transform: translateX(var(--tx, 0px)); } }
@keyframes gb-fly-y {
  0% { transform: translateY(0); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  32% { transform: translateY(-46px); animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  100% { transform: translateY(var(--ty, 0px)); }
}
@keyframes gb-fly-note {
  0% { transform: scale(1.35) rotate(0); } 30% { transform: scale(1) rotate(-14deg); }
  82% { transform: scale(.52) rotate(6deg); opacity: 1; } 100% { transform: scale(.4, .08) translateY(6px); opacity: 0; }
}

.gb-fb {
  display: flex; align-items: center; gap: 8px; min-height: 42px; margin: 14px 2px 0; padding: 7px 12px; border-radius: 14px;
  font-size: 14px; font-weight: 500; line-height: 1.25; border: 2px solid transparent; color: var(--ink);
  transition: background-color .2s, border-color .2s;
}
.gb-fb-ico { flex: none; font-size: 18px; line-height: 1; }
.gb-fb-idle { background: var(--sand); color: var(--ink-soft); }
.gb-fb-ok { background: var(--ui-green-soft, #e3f7e9); border-color: var(--green); }
.gb-fb-bad { background: var(--ui-yellow-soft, #fff1c9); border-color: var(--orange); animation: gb-nudge .35s ease; }
@keyframes gb-nudge { 0%, 100% { transform: none; } 30% { transform: translateX(-3px); } 65% { transform: translateX(3px); } }
.gb-paper.gb-bad .gb-paper-inner { box-shadow: 0 0 0 3px rgba(255, 159, 67, .55), 0 9px 16px rgba(60, 35, 15, .22); }

.gb-ideas { margin-top: 12px; }
.gb-ideas-t { margin: 0 2px 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.gb-starters { display: flex; flex-wrap: wrap; gap: 6px; }
.gb-starter {
  min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 2px dashed var(--sand-deep); background: var(--paper); color: var(--ink);
  font: 500 13.5px/1 var(--font); cursor: pointer; transition: transform .12s var(--ease-spring), background .15s;
}
.gb-starter:active { transform: scale(.94); }
.gb-starter:hover { background: var(--sand); }
.gb-emojis { display: flex; gap: 5px; margin-top: 10px; }
.gb-emo {
  flex: 1 1 0; min-width: 0; height: 40px; border-radius: 12px; border: 2px solid var(--sand-dark); background: var(--paper); cursor: pointer;
  font-size: 19px; line-height: 1; padding: 0; transition: transform .12s var(--ease-spring);
}
.gb-emo:active { transform: scale(.86); }
/* sticky footer: "Drop it in" stays reachable on phones (flush with the sheet's bottom edge, over its body padding) */
.gb-cfoot {
  position: sticky; bottom: calc(-18px - var(--safe-bottom, 0px)); z-index: 5;
  margin: 12px -14px 0; padding: 12px 14px calc(12px + var(--safe-bottom, 0px));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--panel-bg) 14px);
}
.gb-cfoot::before {
  content: ''; position: absolute; left: 14px; right: 14px; top: 4px; height: 2px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--sand-dark) 0 8px, transparent 8px 14px); opacity: .8;
}
.gb-actions { display: flex; align-items: flex-end; gap: 10px; margin-top: 4px; }
.gb-cancel { flex: none; }
.gb-actbox { flex: 1 1 auto; display: flex; justify-content: center; align-items: flex-end; min-width: 50px; }
.gb-actbox .gb-box { filter: drop-shadow(0 3px 2px rgba(60, 35, 15, .3)); }
.gb-drop { flex: none; min-width: 150px; }
.gb-cpoints { margin-top: 10px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.gb-compose.gb-busy .gb-tagpick, .gb-compose.gb-busy .gb-ideas, .gb-compose.gb-busy .gb-emojis,
.gb-compose.gb-busy .gb-fb, .gb-compose.gb-busy .gb-anon, .gb-compose.gb-busy .gb-cpoints { opacity: .4; pointer-events: none; transition: opacity .3s; }
.gb-compose.gb-busy .gb-cancel, .gb-compose.gb-busy .gb-drop { pointer-events: none; }

@media (max-width: 699px) {
  /* chips scroll sideways on phones — fade the right edge so the hidden ones are hinted */
  .gb-filters { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); padding-right: 30px; }
  .gb-chip { padding-left: 9px; font-size: 13px; gap: 4px; }
}
@media (min-width: 700px) {
  .gb-tabs { top: -16px; }
  .gb-cfoot { bottom: -20px; margin: 12px -18px 0; padding: 12px 18px 14px; }
  .gb-cfoot::before { left: 18px; right: 18px; }
  .gb-notes { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .gb-note-text { font-size: 15.5px; }
}
@media (max-width: 380px) {
  .gb-notes { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 16px 10px; }
  .gb-note-text { font-size: 14px; }
  .gb-drop { min-width: 0; }
  .gb-tagbtn { font-size: 13px; }
}
