/* ============================================================================
   THE STICKY (patterns/sticky.js). Each person's own card to type in, side by
   side with the writer's name, at the steps Mike chooses (Events 1925594 and
   1925847, 3 October 2026).

   Colours are Mike's bright, high-contrast set (decision 1895963): the card
   is the chosen sticky colour (--sticky-bg, set by the pattern from PICK's
   Sticky colour) with dark ink (--sticky-ink), never cream, never brown.
   Sizes come from --sticky-scale (PICK's Sticky size) and the card width the
   pattern works out for the room (--sticky-card-width). The writing on a card
   is also scaled by --sticky-writing (PICK's Sticky writing size), which
   leaves the card's width alone. The gap between stickies and the grid's
   margin come from --sticky-gap and --sticky-grid-side/-top, which the pattern
   works out from PICK's Sticky spacing. Fonts are the design
   system's own tokens.
   ============================================================================ */

.sticky-board {
	position: absolute;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
	pointer-events: auto;
	z-index: 2;
	--sticky-bg: #fff07a;
	--sticky-ink: #0c0c0d;
	--sticky-scale: 1;
	--sticky-writing: 1;
	--sticky-card-width: 210px;
}

/* The step's words, at the top of the room the chrome leaves. */
.sticky-prompt {
	flex: none;
	text-align: center;
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--fg, #ffffff);
	overflow-wrap: anywhere;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.sticky-note {
	flex: none;
	text-align: center;
	font-family: var(--font-sans);
	font-size: 15px;
	font-weight: 500;
	color: #ffffff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.sticky-note[hidden] {
	display: none;
}

/* The stickies: a tidy grid under the words. When there are more than the
   room holds the grid scrolls, and room is kept under it for Done. */
.sticky-grid {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: var(--sticky-grid-top, 6px) var(--sticky-grid-side, 4px) var(--sticky-grid-bottom, 84px);
	scrollbar-width: thin;
	/* The board a sticky's place and shape are fractions of (sticky.js placeCards). */
	position: relative;
}

.sticky-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.sticky-group-words {
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #ffffff;
	text-align: center;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.sticky-group-words[hidden] {
	display: none;
}

.sticky-cards {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	gap: var(--sticky-gap, 14px);
}

.sticky-card {
	box-sizing: border-box;
	width: var(--sticky-card-width);
	min-height: calc(150px * var(--sticky-scale));
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: calc(12px * var(--sticky-scale)) calc(13px * var(--sticky-scale));
	background: var(--sticky-bg);
	color: var(--sticky-ink);
	border-radius: 4px;
	border: 1px solid rgba(0, 0, 0, 0.25);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
	position: relative;
}

/* A sticky given its own place (PICK's Move stickies) stands where it was put,
   over the board, out of the grid. */
.sticky-card.is-placed {
	position: absolute;
	z-index: 1;
	margin: 0;
}
.sticky-card.is-dragging {
	z-index: 3;
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
	user-select: none;
}

/* The grip a sticky is moved by, and the corner it is reshaped by: shown only
   where Mike's choice lets this page, drawn in the card's own dark ink. */
.sticky-grip,
.sticky-corner {
	display: none;
	touch-action: none;
}
.sticky-card.is-movable {
	cursor: grab;
	touch-action: none;
}
.sticky-card.is-movable .sticky-input {
	cursor: text;
	touch-action: auto;
}
.sticky-card.is-dragging,
.sticky-card.is-dragging * {
	cursor: grabbing;
}
/* Permission changes which controls work, never the shared card's height. */
.sticky-card.has-move-space .sticky-grip {
	display: block;
	visibility: hidden;
	order: -2;
	flex: none;
	align-self: center;
	width: 36px;
	height: 10px;
	margin: -4px 0 -2px;
	border-top: 2px solid rgba(12, 12, 13, 0.45);
	border-bottom: 2px solid rgba(12, 12, 13, 0.45);
	box-sizing: border-box;
}
.sticky-card.is-movable .sticky-grip {
	visibility: visible;
}
.sticky-card.is-reshapable .sticky-corner {
	display: block;
	position: absolute;
	right: 0;
	bottom: 0;
	width: 22px;
	height: 22px;
	cursor: nwse-resize;
	background: linear-gradient(135deg, transparent 50%, rgba(12, 12, 13, 0.45) 50%, rgba(12, 12, 13, 0.45) 58%, transparent 58%, transparent 70%, rgba(12, 12, 13, 0.45) 70%, rgba(12, 12, 13, 0.45) 78%, transparent 78%);
}

/* The six colours a person can give their own sticky (PICK's Colour stickies,
   Member picks): no words, only the colours. */
.sticky-swatches {
	order: -1;
	display: flex;
	flex: none;
	min-height: 18px;
	gap: 6px;
	justify-content: flex-end;
}
.sticky-swatch {
	width: 18px;
	height: 18px;
	padding: 0;
	border-radius: 50%;
	border: 2px solid rgba(12, 12, 13, 0.55);
	cursor: pointer;
}
/* Your own sticky wears a white ring, so it is plain which one is yours. */
.sticky-card.is-mine {
	outline: 3px solid #ffffff;
	outline-offset: 2px;
}
.sticky-group.is-earlier .sticky-card {
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.sticky-text {
	flex: 1 1 auto;
	font-family: var(--font-sans);
	font-size: calc(17px * var(--sticky-scale) * var(--sticky-writing));
	font-weight: 500;
	line-height: 1.35;
	color: var(--sticky-ink);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.sticky-input {
	width: 100%;
	min-height: calc(96px * var(--sticky-scale) * var(--sticky-writing));
	box-sizing: border-box;
	resize: none;
	border: none;
	outline: none;
	background: transparent;
	padding: 0;
	margin: 0;
}
/* A shared shape supplies the minimum; writing can still grow the card.
   Only the writer's independent text minimum would make short cards differ. */
.sticky-card.is-shaped .sticky-input {
	min-height: 0;
}
.sticky-input:empty::before {
	content: attr(data-placeholder);
	pointer-events: none;
	color: rgba(12, 12, 13, 0.55);
}
.sticky-quiet {
	color: rgba(12, 12, 13, 0.75);
	font-style: italic;
}

/* Who wrote it: the writer's name, in the card's own dark ink. */
.sticky-by {
	flex: none;
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: var(--s-2);
	font-family: var(--font-mono);
	font-size: calc(12px * var(--sticky-scale));
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sticky-ink);
	border-top: 1px solid rgba(12, 12, 13, 0.3);
	padding-top: 6px;
}
.sticky-name {
	min-width: 0;
	overflow-wrap: anywhere;
}
.sticky-by[hidden],
.sticky-names-hidden .sticky-by {
	display: none;
}

/* "Sign in to write" and the site's two ways in, on the person's own sticky. */
.sticky-signin {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-family: var(--font-sans);
	color: var(--sticky-ink);
}
.sticky-signin [hidden] {
	display: none !important;
}
.sticky-signin button,
.sticky-name-ask button {
	appearance: none;
	cursor: pointer;
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #ffffff;
	background: #0c0c0d;
	border: 1px solid #0c0c0d;
	border-radius: 3px;
	padding: 10px 12px;
}
.sticky-signin button:focus-visible,
.sticky-name-ask button:focus-visible,
.sticky-signin input:focus-visible,
.sticky-name-ask input:focus-visible {
	outline: 3px solid #0c0c0d;
	outline-offset: 2px;
}
.sticky-signin-choices,
.sticky-signin-email {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.sticky-signin-or,
.sticky-signin-sent {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
}
.sticky-signin input,
.sticky-name-ask input {
	font-family: var(--font-sans);
	font-size: 15px;
	color: #0c0c0d;
	background: #ffffff;
	border: 1px solid #0c0c0d;
	border-radius: 3px;
	padding: 8px 9px;
	min-width: 0;
}
.sticky-signin-problem,
.sticky-name-problem {
	font-size: 13px;
	font-weight: 600;
	color: #0c0c0d;
	background: #ffffff;
	border-radius: 3px;
	padding: 4px 6px;
}
.sticky-name-problem[hidden] {
	display: none;
}

/* The name question, once, on a member's own sticky. */
.sticky-name-ask {
	display: flex;
	flex-direction: column;
	gap: 6px;
	border-top: 1px solid rgba(12, 12, 13, 0.3);
	padding-top: 8px;
}
.sticky-name-question {
	font-family: var(--font-sans);
	font-size: 14px;
	font-weight: 700;
	color: #0c0c0d;
}

/* "Not sent yet": the room has not got the words on your own sticky. */
.sticky-unsent {
	align-self: flex-start;
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #ffffff;
	background: #0c0c0d;
	border-radius: 3px;
	padding: 3px 6px;
}

/* "HOST": the room's mark on Mike's own sticky, set by his role, shown
   whether or not names are shown. */
.sticky-host {
	align-self: flex-start;
	font-family: var(--font-mono);
	font-size: calc(11px * var(--sticky-scale));
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--sticky-bg);
	background: var(--sticky-ink);
	border-radius: 3px;
	padding: 2px 6px;
}
.sticky-by .sticky-host {
	flex: none;
	white-space: nowrap;
}

/* Authored places retain their board on narrow windows. Earlier groups keep
   their ordinary wrapping layout below the current step's reserved surface. */
.sticky-planned .sticky-grid {
	overflow-x: auto;
}
.sticky-planned .sticky-group.is-current .sticky-cards {
	position: relative;
	flex: none;
	align-self: flex-start;
}
.sticky-place-outline {
	position: absolute;
	box-sizing: border-box;
	width: var(--sticky-card-width);
	height: calc(150px * var(--sticky-scale));
	border: 2px dashed var(--fg);
	border-radius: var(--r-sm);
	/* Cards receive presses even where an empty outline overlaps them. */
	z-index: 0;
	cursor: grab;
	touch-action: none;
}

/* One ceiling for every window; Grow does not opt into any of these rules. */
.sticky-card.is-capped {
	min-height: min(calc(150px * var(--sticky-scale)), 240px);
	max-height: 240px;
}
.sticky-card.is-capped .sticky-text {
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	touch-action: pan-y;
	scrollbar-width: thin;
}
.sticky-card::after {
	display: none;
}
.sticky-card.is-capped.has-more-below::after {
	content: "";
	display: block;
	position: absolute;
	pointer-events: none;
	left: calc(13px * var(--sticky-scale));
	right: calc(13px * var(--sticky-scale));
	bottom: var(--sticky-fade-bottom);
	height: var(--s-8);
	background: linear-gradient(to bottom, transparent, var(--sticky-bg));
}

.sticky-input { cursor: text; user-select: text; -webkit-user-select: text; }
.sticky-text strong { font-weight: 700; }
.sticky-text em { font-style: italic; }
.sticky-text s { text-decoration: line-through; }
