/* Somewhere Else — app styles */

/* -------------------------------------------------------------------------
   Reset and base
   ------------------------------------------------------------------------- */

*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	--color-bg:             #1e1b2e;
	--color-bg-subtle:      #272540;
	--color-border:         #3a3660;
	--color-text:           #f4f2fb;
	--color-text-muted:     #9c98b4;
	--color-accent:         #6c54b8;
	--color-quiet:          #312e50;
	--color-activity:       #6eb8a0;
	--color-danger:         #d64e3b;
	--color-input-bg:       #201d35;
	--color-input-border:   #3a3660;
	--color-placeholder:    #7a7692;
	--color-gradient-start: #5c42a8;
	--color-gradient-end:   #b74e91;
	--sidebar-width:        17rem;
	--radius:               10px;
	--spacing:              16px;
	--header-height:        52px;
	color-scheme:           dark;
}

html, body {
	height: 100%;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* Web mode: let body height be content-driven */
body:not(.se-app) {
	height: auto;
}

body.se-app {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: -webkit-fill-available;
	overflow: hidden;
}

/* -------------------------------------------------------------------------
   Layout scaffolding
   ------------------------------------------------------------------------- */

.se-screen {
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: -webkit-fill-available;
	overflow: hidden;
}

.se-header {
	flex-shrink: 0;
	height: var(--header-height);
	display: flex;
	align-items: center;
	padding: 0 var(--spacing);
	background: var(--color-bg);
	position: sticky;
	top: 0;
	z-index: 10;
}

.se-header__title {
	font-size: 17px;
	font-weight: 600;
	flex: 1;
}

.se-header__back {
	display: flex;
	align-items: center;
	gap: 4px;
	color: var(--color-accent);
	text-decoration: none;
	font-size: 15px;
	padding: 8px 0;
	margin-right: 12px;
	background: none;
	border: none;
	cursor: pointer;
}

.se-thread-wrap {
	flex: 1;
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.se-thread-wrap.is-overflowing::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 72%;
	background: linear-gradient(to bottom, rgba(30, 27, 46, 0.6) 0%, rgba(30, 27, 46, 0.6) 25%, rgba(30, 27, 46, 0) 100%);
	pointer-events: none;
	z-index: 5;
}

.se-body {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	position: relative;
}

.se-footer {
	flex-shrink: 0;
	padding: var(--spacing);
	border-top: 1px solid var(--color-border);
	background: var(--color-bg);
}

/* -------------------------------------------------------------------------
   Places mosaic
   ------------------------------------------------------------------------- */

.se-places-mosaic {
	columns: 2;
	column-gap: 8px;
	padding: 8px;
}

@media (min-width: 600px) {
	.se-places-mosaic { columns: 3; }
}

@media (min-width: 900px) {
	.se-places-mosaic { columns: 4; }
}

.se-place-tile {
	break-inside: avoid;
	display: block;
	position: relative;
	margin-bottom: 8px;
	text-decoration: none;
	color: inherit;
	background: var(--color-bg-subtle);
	overflow: hidden;
}

.se-place-tile:active {
	opacity: 0.85;
}

.se-place-tile__image {
	width: 100%;
	display: block;
	filter: saturate(0.4);
	transition: filter 0.5s;
}

.se-place-tile:has(.se-activity-dot--active) .se-place-tile__image {
	filter: saturate(1);
}

.se-place-tile__placeholder {
	width: 100%;
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	color: var(--color-quiet);
	background: var(--color-bg-subtle);
}

.se-place-tile__overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 24px 8px 8px;
	background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.52));
}

.se-place-tile__name {
	font-size: 14px;
	font-weight: 500;
	color: #ffffff;
	line-height: 1.3;
}

.se-activity-dot {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--color-activity);
	opacity: 0;
	transition: opacity 0.3s;
	box-shadow: 0 0 0 2px rgba(255,255,255,0.6);
}

.se-activity-dot--active {
	opacity: 1;
	animation: se-pulse 2s infinite;
}

@keyframes se-pulse {
	0%, 100% { opacity: 1; }
	50%       { opacity: 0.4; }
}

/* -------------------------------------------------------------------------
   Message thread
   ------------------------------------------------------------------------- */

.se-thread {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px var(--spacing);
}

.se-thread-cleared {
	text-align: center;
	font-size: 13px;
	color: var(--color-text-muted);
	padding: 16px 0 8px;
	opacity: 0.6;
}

.se-message {
	display: flex;
	flex-direction: column;
	max-width: 80%;
	padding: 10px 14px;
	border-radius: var(--radius);
	background: var(--color-bg-subtle);
	word-break: break-word;
}

.se-message--mine {
	align-self: flex-end;
	background: var(--color-accent);
	color: #ffffff;
}

.se-message__sender {
	font-size: 13px;
	font-weight: 600;
	color: var(--color-text-muted);
	margin-bottom: 4px;
}

.se-message--mine .se-message__sender {
	color: rgba(255,255,255,0.6);
}

.se-message__content {
	font-size: 15px;
	line-height: 1.4;
}

.se-message__image-wrap {
	position: relative;
	display: inline-block;
	margin-top: 6px;
	-webkit-touch-callout: none;
	user-select: none;
	-webkit-user-select: none;
}

.se-message__image {
	display: block;
	max-width: 100%;
	border-radius: 6px;
	cursor: default;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
}

.se-message__image-shield {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	object-fit: cover;
	border-radius: 6px;
	cursor: default;
	-webkit-touch-callout: none;
	user-select: none;
	-webkit-user-select: none;
}

.se-message__time {
	font-size: 13px;
	color: var(--color-text-muted);
	margin-top: 4px;
	align-self: flex-end;
}

.se-message--mine .se-message__time {
	color: rgba(255,255,255,0.5);
}

/* -------------------------------------------------------------------------
   Send form
   ------------------------------------------------------------------------- */

.se-send-form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

body .se-send-form__input {
	flex: 1;
	resize: none;
	border: 1px solid var(--color-input-border);
	border-radius: var(--radius);
	padding: 10px 14px;
	font-size: 15px;
	font-family: inherit;
	line-height: 1.4;
	max-height: 120px;
	overflow-y: auto;
	outline: none;
	background: var(--color-input-bg);
	color: var(--color-text);
	-webkit-text-fill-color: var(--color-text);
	transition: border-color 0.15s;
}

body .se-send-form__input::placeholder {
	color: var(--color-placeholder);
	-webkit-text-fill-color: var(--color-placeholder);
	opacity: 1;
}

body .se-send-form__input:focus {
	border-color: var(--color-accent);
}

body .se-send-form__input:-webkit-autofill,
body .se-send-form__input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--color-text);
	-webkit-box-shadow: 0 0 0 1000px var(--color-input-bg) inset;
	transition: background-color 5000s ease-in-out 0s;
}

.se-send-form__attach {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: none;
	background: none;
	color: var(--color-text-muted);
	cursor: pointer;
	font-size: 20px;
}

.se-send-form__send {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: var(--color-accent);
	color: #ffffff;
	cursor: pointer;
	font-size: 18px;
	flex-shrink: 0;
}

.se-send-form__send:disabled {
	opacity: 0.4;
}

/* -------------------------------------------------------------------------
   Forms and inputs
   ------------------------------------------------------------------------- */

.se-form {
	padding: var(--spacing);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.se-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.se-label {
	font-size: 13px;
	font-weight: 500;
	color: var(--color-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

body .se-input,
body .se-textarea,
body .se-select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--color-input-border);
	border-radius: var(--radius);
	font-size: 16px;
	font-family: inherit;
	background: var(--color-input-bg);
	color: var(--color-text);
	-webkit-text-fill-color: var(--color-text);
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.15s;
}

body .se-input::placeholder,
body .se-textarea::placeholder {
	color: var(--color-placeholder);
	-webkit-text-fill-color: var(--color-placeholder);
	opacity: 1;
}

body .se-input:focus,
body .se-textarea:focus,
body .se-select:focus {
	border-color: var(--color-accent);
}

/* Override browser autofill yellow/white background + black text */
body .se-input:-webkit-autofill,
body .se-input:-webkit-autofill:hover,
body .se-input:-webkit-autofill:focus,
body .se-textarea:-webkit-autofill,
body .se-textarea:-webkit-autofill:hover,
body .se-textarea:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--color-text);
	-webkit-box-shadow: 0 0 0 1000px var(--color-input-bg) inset;
	transition: background-color 5000s ease-in-out 0s;
}

.se-textarea {
	resize: vertical;
	min-height: 80px;
}

.se-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23858a82' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 38px;
}

/* File input: style the browser-native button */
body .se-input[type="file"] {
	cursor: pointer;
	padding: 10px 14px;
}

body .se-input[type="file"]::file-selector-button {
	background: var(--color-quiet);
	color: var(--color-text);
	border: 1px solid var(--color-input-border);
	border-radius: 6px;
	padding: 4px 12px;
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
	margin-right: 12px;
	transition: background 0.15s;
}

body .se-input[type="file"]::file-selector-button:hover {
	background: var(--color-accent);
	border-color: var(--color-accent);
	color: #fff;
}

/* Search input: tint the native ✕ cancel button */
body .se-input[type="search"]::-webkit-search-cancel-button {
	filter: invert(0.6);
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */

.se-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 14px 20px;
	border-radius: var(--radius);
	font-size: 16px;
	font-weight: 600;
	font-family: inherit;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: opacity 0.1s;
	width: 100%;
}

.se-btn:active {
	opacity: 0.8;
}

.se-btn--primary {
	background: var(--color-accent);
	color: #ffffff;
}

.se-btn--secondary {
	background: var(--color-bg-subtle);
	color: var(--color-text) !important;
	border: 1px solid var(--color-border);
}

.se-btn--danger {
	background: transparent;
	color: var(--color-danger);
	border: 1px solid var(--color-danger);
}

.se-btn--ghost {
	background: none;
	color: var(--color-text-muted);
}

.se-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* -------------------------------------------------------------------------
   Account and info panels
   ------------------------------------------------------------------------- */

.se-info-section {
	padding: var(--spacing);
	border-bottom: 1px solid var(--color-border);
}

.se-info-section__title {
	font-size: 13px;
	font-weight: 600;
	color: var(--color-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 10px;
}

.se-info-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
}

.se-info-row + .se-info-row {
	border-top: 1px solid var(--color-border);
}

.se-info-row__label {
	color: var(--color-text-muted);
	font-size: 14px;
}

.se-info-row__value {
	font-size: 14px;
	font-weight: 500;
}

.se-status--active  { color: var(--color-success, #2e7d32); }
.se-status--inactive { color: var(--color-text-muted); }


.se-danger-note {
	font-size: 14px;
	color: var(--color-text-muted);
	margin: 0 0 10px;
	line-height: 1.5;
}

.se-danger-note--strong {
	color: var(--color-danger, #c62828);
	font-weight: 600;
}

.se-danger-list {
	font-size: 14px;
	color: var(--color-text-muted);
	margin: 0 0 14px;
	padding-left: 18px;
	line-height: 1.6;
}

.se-field {
	margin-bottom: 12px;
}

.se-field__label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--color-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 5px;
}

.se-field__input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	font-size: 15px;
	background: var(--color-bg, #fff);
	color: var(--color-text);
	box-sizing: border-box;
}

.se-field__input:focus {
	outline: none;
	border-color: var(--color-primary, #1a1a1a);
}

.se-form-msg {
	font-size: 14px;
	margin-bottom: 10px;
	min-height: 18px;
}

.se-form-msg--ok    { color: var(--color-success, #2e7d32); }
.se-form-msg--error { color: var(--color-danger, #c62828); }

/* -------------------------------------------------------------------------
   Members list
   ------------------------------------------------------------------------- */

.se-member-list {
	list-style: none;
}

.se-member-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px var(--spacing);
	border-bottom: 1px solid var(--color-border);
}

.se-member-item__name {
	flex: 1;
	font-size: 15px;
}

.se-member-item__role {
	font-size: 13px;
	color: var(--color-text-muted);
}

.se-member-item__remove {
	background: none;
	border: none;
	color: var(--color-danger);
	font-size: 14px;
	cursor: pointer;
}

/* -------------------------------------------------------------------------
   Empty state
   ------------------------------------------------------------------------- */

.se-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px var(--spacing);
	text-align: center;
	gap: 12px;
}

.se-empty__icon {
	font-size: 48px;
	opacity: 0.3;
}

.se-empty__title {
	font-size: 18px;
	font-weight: 600;
	color: var(--color-text-muted);
}

.se-empty__text {
	font-size: 14px;
	color: var(--color-text-muted);
	max-width: 240px;
}

/* -------------------------------------------------------------------------
   Connection status — stays put until updates start working again
   ------------------------------------------------------------------------- */

.se-connection-status {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 300;
	padding: 10px var(--spacing);
	text-align: center;
	font-size: 13px;
	color: var(--color-text);
	background: var(--color-danger);
}

/* -------------------------------------------------------------------------
   Pending invitations — shown above the places list until answered
   ------------------------------------------------------------------------- */

.se-invites {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: var(--spacing) var(--spacing) 0;
}

.se-invite {
	background: var(--color-bg-subtle);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	transition: opacity 0.12s ease;
}

.se-invite.is-busy {
	opacity: 0.6;
}

.se-invite__text {
	font-size: 14px;
	color: var(--color-text);
	line-height: 1.45;
}

.se-invite__status {
	font-size: 13px;
	color: var(--color-text-muted);
}

.se-invite__status.is-error {
	color: var(--color-danger);
}

.se-invite__actions {
	display: flex;
	gap: 8px;
}

.se-invite__actions .se-btn {
	width: auto;
	flex: 1;
	padding: 10px 12px;
}

/* -------------------------------------------------------------------------
   No-connections hint popup
   ------------------------------------------------------------------------- */

.se-hint-popup {
	position: fixed;
	bottom: 76px;
	left: 12px;
	right: 12px;
	background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
	border-radius: 16px;
	padding: 20px 20px 20px 20px;
	z-index: 200;
	box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
}

.se-hint-popup__close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: rgba(255,255,255,0.15);
	border: none;
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 20px;
}

.se-hint-popup__eyebrow {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255,255,255,0.7);
	margin-bottom: 6px;
}

.se-hint-popup__heading {
	font-size: 18px;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
	margin-bottom: 8px;
}

.se-hint-popup__text {
	font-size: 14px;
	color: rgba(255,255,255,0.8);
	line-height: 1.55;
	margin-bottom: 16px;
}

.se-hint-popup__actions {
	display: flex;
	gap: 10px;
}

.se-hint-popup__btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 14px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
	border: none;
}

.se-hint-popup__btn--primary {
	background: #fff;
	color: var(--color-gradient-start);
}

.se-hint-popup__btn--secondary {
	background: rgba(255,255,255,0.18);
	color: #fff;
}

/* -------------------------------------------------------------------------
   Notices
   ------------------------------------------------------------------------- */

.se-notice {
	padding: 12px 16px;
	border-radius: var(--radius);
	font-size: 14px;
	margin: var(--spacing);
}

.se-notice--error {
	background: #1f1210;
	color: var(--color-danger);
	border: 1px solid #4a2020;
}

.se-notice--success {
	background: #0f1a1f;
	color: var(--color-activity);
	border: 1px solid #1a3d3a;
}

/* Waits to be dismissed instead of vanishing on a timer. */
.se-notice--sticky {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.se-notice__close {
	margin-left: auto;
	background: none;
	border: none;
	color: inherit;
	font-size: 18px;
	line-height: 1;
	padding: 0 2px;
	cursor: pointer;
}

/* -------------------------------------------------------------------------
   Working state for buttons mid-request
   ------------------------------------------------------------------------- */

.se-btn.is-busy,
button.is-busy {
	opacity: 0.65;
	cursor: progress;
}

/* -------------------------------------------------------------------------
   Loading state
   ------------------------------------------------------------------------- */

.se-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
}

.se-spinner {
	width: 24px;
	height: 24px;
	border: 2px solid var(--color-border);
	border-top-color: var(--color-accent);
	border-radius: 50%;
	animation: se-spin 0.8s linear infinite;
}

@keyframes se-spin {
	to { transform: rotate(360deg); }
}

/* -------------------------------------------------------------------------
   Refresh button + pull-to-refresh indicator (places screen)
   ------------------------------------------------------------------------- */

.se-refresh-btn {
	font-size: 20px;
	line-height: 1;
}

.se-refresh-btn--spinning {
	animation: se-spin 0.8s linear infinite;
}

.se-refresh-time {
	font-size: 13px;
	color: var(--color-text-muted);
	opacity: 0;
	align-self: center;
	padding-right: 2px;
	pointer-events: none;
}

.se-refresh-time--visible {
	animation: se-refresh-confirm 2.8s ease forwards;
}

@keyframes se-refresh-confirm {
	0%   { opacity: 0; }
	12%  { opacity: 1; }
	72%  { opacity: 1; }
	100% { opacity: 0; }
}

.se-ptr-indicator {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	font-size: 18px;
	opacity: 0;
	pointer-events: none;
	z-index: 5;
	transition: opacity 0.1s;
	padding-top: 6px;
}

.se-ptr-indicator--loading {
	animation: se-spin 0.8s linear infinite;
}

/* -------------------------------------------------------------------------
   Image preview (before send)
   ------------------------------------------------------------------------- */

.se-image-preview {
	position: relative;
	display: inline-block;
	margin: 8px 0;
}

.se-image-preview img {
	max-height: 120px;
	border-radius: 8px;
	display: block;
}

.se-image-preview__remove {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 22px;
	height: 22px;
	background: var(--color-accent);
	color: #fff;
	border: none;
	border-radius: 50%;
	font-size: 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* -------------------------------------------------------------------------
   Utility
   ------------------------------------------------------------------------- */

.se-hidden { display: none !important; }
.se-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* -------------------------------------------------------------------------
   Place image picker (create form)
   ------------------------------------------------------------------------- */

.se-search-hint {
	color: var(--color-text-muted);
	font-size: 14px;
	padding: 8px 0;
	grid-column: 1 / -1;
}

.se-search-hint--suggestions {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding-bottom: 4px;
}

.se-search-input {
	margin-bottom: 8px;
}

.se-image-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	min-height: 40px;
}

.se-image-grid__item {
	aspect-ratio: 1;
	border: 2px solid transparent;
	border-radius: var(--radius);
	overflow: hidden;
	padding: 0;
	background: var(--color-bg-subtle);
	cursor: pointer;
	transition: border-color 0.15s;
}

.se-image-grid__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.se-image-attribution {
	font-size: 14px;
	color: var(--color-text-muted);
	padding: 8px 0 2px;
	line-height: 1.4;
}

.se-image-grid__item--selected {
	border-color: var(--color-accent);
}

.se-image-grid__item:active {
	opacity: 0.8;
}

.se-load-more {
	grid-column: 1 / -1;
	padding: 10px;
	background: var(--color-bg-subtle);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	color: var(--color-text-muted);
	font-size: 14px;
	cursor: pointer;
	width: 100%;
}

.se-load-more:active {
	opacity: 0.7;
}

/* -------------------------------------------------------------------------
   Object grid — picker (create form) and dial pad (entry)
   ------------------------------------------------------------------------- */

.se-object-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.se-object-grid__item {
	aspect-ratio: 1;
	border: 2px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	padding: 4px;
	background: var(--color-bg-subtle);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.15s, background 0.15s;
}

.se-object-grid__item img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	image-rendering: crisp-edges;
}

.se-object-grid__item--selected {
	border-color: var(--color-accent);
	background: var(--color-bg);
}

.se-object-grid__item--disabled {
	opacity: 0.35;
	cursor: not-allowed;
	pointer-events: none;
}

.se-object-grid__item:active:not(.se-object-grid__item--disabled) {
	opacity: 0.75;
}

/* -------------------------------------------------------------------------
   Tag chips (places list + create form)
   ------------------------------------------------------------------------- */

.se-tag-selector {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.se-tag-chip {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 13px;
	background: var(--color-bg-subtle);
	border: 1px solid var(--color-border);
	color: var(--color-text-muted);
	white-space: nowrap;
}

.se-tag-chip--small {
	font-size: 13px;
	padding: 2px 8px;
}

.se-tag-chip--toggle {
	cursor: pointer;
	user-select: none;
	transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.se-tag-chip--toggle:hover {
	border-color: var(--color-accent);
}

.se-tag-chip--on {
	background: var(--color-accent);
	color: #ffffff;
	border-color: var(--color-accent);
}

.se-place-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 4px;
}

/* -------------------------------------------------------------------------
   Dial pad screen (place entry)
   ------------------------------------------------------------------------- */

.se-dial-screen {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	min-height: 100%;
}

.se-dial-card {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: calc(var(--radius) * 2);
	padding: 24px 20px;
	width: 100%;
	max-width: 308px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
	display: flex;
	flex-direction: column;
	gap: 16px;
	position: relative;
}

.se-dial-menu {
	position: absolute;
	top: 12px;
	right: 14px;
}

.se-dial-menu__trigger {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--color-text-muted);
	font-size: 20px;
	line-height: 1;
	padding: 4px 6px;
	border-radius: var(--radius);
}

.se-dial-menu__trigger:hover {
	background: var(--color-border);
	color: var(--color-text);
}

.se-dial-menu__dropdown {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
	min-width: 140px;
	z-index: 10;
}

.se-dial-menu__item {
	display: block;
	width: 100%;
	padding: 10px 14px;
	background: none;
	border: none;
	text-align: left;
	font-size: 14px;
	cursor: pointer;
	color: var(--color-text);
}

.se-dial-menu__item:hover {
	background: var(--color-border);
}

.se-dial-menu__item--danger {
	color: var(--color-danger);
}

.se-dial-header {
	text-align: center;
}

.se-dial-prompt {
	font-size: 16px;
	font-weight: 500;
	color: var(--color-text);
	margin-bottom: 8px;
}

.se-dial-hint {
	font-size: 14px;
	color: var(--color-text-muted);
	font-style: italic;
	margin: 4px 0 8px;
}

.se-dial-attempts {
	font-size: 14px;
	color: var(--color-text-muted);
}

.se-dial-error {
	text-align: center;
	font-size: 14px;
	color: var(--color-danger);
	padding: 8px 16px;
	border-radius: var(--radius);
	background: #1f1210;
	border: 1px solid #4a2020;
	width: 100%;
}

.se-dial-cooldown-msg {
	font-size: 17px;
	font-weight: 500;
	color: var(--color-text);
}

.se-object-grid--picker {
	grid-template-columns: repeat(auto-fill, 80px);
}

.se-object-grid--picker .se-object-grid__item {
	width: 80px;
	height: 80px;
	aspect-ratio: unset;
}

.se-object-grid--dial {
	gap: 6px;
}

.se-object-grid--dial .se-object-grid__item {
	padding: 2px;
}

/* -------------------------------------------------------------------------
   First-entry popup overlay
   ------------------------------------------------------------------------- */

.se-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	padding: var(--spacing);
}

.se-overlay__box {
	background: var(--color-bg);
	border-radius: calc(var(--radius) * 1.5);
	padding: 28px 24px;
	max-width: 320px;
	width: 100%;
	text-align: center;
	box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.se-overlay__title {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 12px;
}

.se-overlay__body {
	font-size: 14px;
	color: var(--color-text-muted);
	line-height: 1.5;
}

.se-overlay__object-wrap {
	margin: 20px auto 0;
	width: 120px;
	height: 120px;
	border-radius: var(--radius);
	overflow: hidden;
	border: 2px solid var(--color-border);
	background: var(--color-bg-subtle);
	display: flex;
	align-items: center;
	justify-content: center;
}

.se-overlay__object-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 12px;
}

/* -------------------------------------------------------------------------
   Report abuse icon + modal
   ------------------------------------------------------------------------- */

.se-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}

.se-report-icon {
	background: none;
	border: none;
	padding: 4px;
	cursor: pointer;
	font-size: 18px;
	color: var(--color-text-muted);
	line-height: 1;
	opacity: 0.6;
	transition: opacity 0.15s, color 0.15s;
}

.se-report-icon:hover {
	opacity: 1;
	color: var(--color-danger);
}

body .se-report-reason {
	width: 100%;
	background: var(--color-input-bg);
	border: 1px solid var(--color-input-border);
	border-radius: var(--radius);
	color: var(--color-text);
	font-family: inherit;
	font-size: 14px;
	padding: 10px 12px;
	resize: vertical;
	outline: none;
	transition: border-color 0.15s;
}

body .se-report-reason::placeholder {
	color: var(--color-placeholder);
}

body .se-report-reason:focus {
	border-color: var(--color-accent);
}

.se-report-actions {
	display: flex;
	gap: 8px;
	margin-top: 16px;
	justify-content: flex-end;
}

.se-report-status {
	margin-top: 10px;
	font-size: 14px;
	padding: 8px 12px;
	border-radius: var(--radius);
}

.se-report-status--ok {
	background: rgba(110, 184, 160, 0.15);
	color: var(--color-activity);
}

.se-report-status--err {
	background: rgba(214, 78, 59, 0.12);
	color: var(--color-danger);
}

/* -------------------------------------------------------------------------
   Type-ahead suggestions (invite form)
   ------------------------------------------------------------------------- */

.se-field--typeahead {
	position: relative;
}

.se-suggestions {
	position: absolute;
	top: calc(100% - 2px);
	left: 0;
	right: 0;
	z-index: 30;
	background: var(--color-bg-subtle);
	border: 1px solid var(--color-accent);
	border-top: none;
	border-radius: 0 0 var(--radius) var(--radius);
	overflow: hidden;
	box-shadow: 0 6px 20px rgba(0,0,0,0.35);
	max-height: 220px;
	overflow-y: auto;
}

.se-suggestion {
	padding: 10px 14px;
	cursor: pointer;
	border-bottom: 1px solid var(--color-border);
}

.se-suggestion:last-child {
	border-bottom: none;
}

.se-suggestion:active {
	background: var(--color-quiet);
}

.se-suggestion__email {
	font-size: 15px;
	color: var(--color-text);
}

.se-suggestion__name {
	font-size: 14px;
	color: var(--color-text-muted);
	margin-top: 2px;
}

/* -------------------------------------------------------------------------
   Nav icon with connections dot indicator
   ------------------------------------------------------------------------- */

.se-header__icon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-text-muted);
	text-decoration: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	margin-left: auto;
}

.se-header__icon[data-dot="true"]::after {
	content: '';
	position: absolute;
	top: 5px;
	right: 5px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--color-activity);
	animation: se-pulse 2s infinite;
}

/* -------------------------------------------------------------------------
   Bottom sheet
   ------------------------------------------------------------------------- */

.se-sheet-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 50;
}

.se-sheet-backdrop:not(.se-hidden) {
	animation: se-fade-in 0.22s ease both;
}

@keyframes se-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.se-sheet {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	background: var(--color-bg-subtle);
	border-radius: 16px 16px 0 0;
	padding: 20px var(--spacing) max(var(--spacing), env(safe-area-inset-bottom));
	z-index: 51;
	border-top: 1px solid var(--color-border);
}

.se-sheet:not(.se-hidden) {
	animation: se-sheet-up 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes se-sheet-up {
	from { transform: translateY(100%); }
	to   { transform: translateY(0); }
}

@media (min-width: 1025px) {
	.se-site .se-sheet {
		left: var(--sidebar-width);
	}
}

/* Invite sheet can be tall — allow it to scroll on small phones */
#se-invite-sheet {
	max-height: 90vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.se-sheet-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--color-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 12px;
}

.se-sheet-btn {
	display: block;
	width: 100%;
	padding: 15px 0;
	background: none;
	border: none;
	border-bottom: 1px solid var(--color-border);
	font-size: 16px;
	font-family: inherit;
	cursor: pointer;
	text-align: center;
	color: var(--color-text);
}

.se-sheet-btn:last-child {
	border-bottom: none;
}

.se-sheet-btn--danger {
	color: var(--color-danger);
}

.se-sheet-btn--cancel {
	color: var(--color-text-muted);
}

/* -------------------------------------------------------------------------
   Quick Connect screen
   ------------------------------------------------------------------------- */

.se-qc-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: var(--spacing);
	text-align: center;
}

.se-qc-hint {
	font-size: 14px;
	color: var(--color-text-muted);
	margin: 0 0 24px;
	max-width: 260px;
}

.se-qc-card {
	background: #fff;
	border-radius: 16px;
	padding: 20px;
	box-shadow: 0 2px 16px rgba(0,0,0,0.10);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 32px;
}

.se-qc-qr-wrap {
	width: 280px;
	height: 280px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.se-qc-spinner {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

#se-qc-qr canvas,
#se-qc-qr img {
	display: block;
	width: 280px !important;
	height: 280px !important;
}

.se-qc-error {
	font-size: 14px;
	color: var(--color-text-muted);
}

.se-qc-regen-btn {
	background: none;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	padding: 10px 20px;
	font-size: 14px;
	color: var(--color-text-muted);
	cursor: pointer;
	margin-bottom: 10px;
}

.se-qc-regen-btn:active {
	opacity: 0.6;
}

.se-qc-regen-hint {
	font-size: 13px;
	color: var(--color-text-muted);
	opacity: 0.7;
	margin: 0;
}

/* Quick Connect entry card on connections screen */

.se-qc-entry {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px var(--spacing);
	margin: var(--spacing) var(--spacing) 4px;
	background: var(--color-bg-subtle);
	border-radius: 12px;
	text-decoration: none;
	color: var(--color-text);
	border: 1px solid var(--color-border);
}

.se-qc-entry:active {
	opacity: 0.7;
}

.se-qc-entry-icon {
	flex-shrink: 0;
	color: var(--color-accent);
}

.se-qc-entry-text {
	flex: 1;
	min-width: 0;
}

.se-qc-entry-title {
	font-size: 15px;
	font-weight: 500;
}

.se-qc-entry-sub {
	font-size: 13px;
	color: var(--color-text-muted);
	margin-top: 2px;
}

.se-qc-entry-arrow {
	font-size: 20px;
	color: var(--color-text-muted);
	line-height: 1;
}

/* -------------------------------------------------------------------------
   Connections screen
   ------------------------------------------------------------------------- */

.se-conn-section {
	padding: var(--spacing) var(--spacing) 4px;
}

.se-conn-section-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--color-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.07em;
	margin-bottom: 10px;
}

.se-conn-new-strip {
	padding: var(--spacing) var(--spacing) 4px;
	background: var(--color-bg-subtle);
	border-bottom: 1px solid var(--color-border);
}

.se-conn-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--color-border);
	cursor: pointer;
}

.se-conn-item:last-child {
	border-bottom: none;
}

.se-conn-item:active {
	opacity: 0.7;
}

.se-conn-item--new {
	opacity: 1;
}

.se-conn-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--color-quiet);
	color: var(--color-text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: 600;
	flex-shrink: 0;
}

.se-conn-item--new .se-conn-avatar {
	background: var(--color-accent);
	color: #fff;
}

.se-conn-info {
	flex: 1;
	min-width: 0;
}

.se-conn-name {
	font-size: 15px;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.se-conn-date {
	font-size: 13px;
	color: var(--color-text-muted);
	margin-top: 2px;
}

.se-conn-empty-links {
	font-size: 14px;
	color: var(--color-text-muted);
	padding: 4px 0 12px;
}

/* Invite link items */

.se-link-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--color-border);
}

.se-link-item:last-child {
	border-bottom: none;
}

.se-link-info {
	flex: 1;
	min-width: 0;
}

.se-link-label {
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.se-link-meta {
	font-size: 13px;
	color: var(--color-text-muted);
	margin-top: 2px;
}

.se-link-revoke {
	background: none;
	border: none;
	color: var(--color-danger);
	font-size: 14px;
	cursor: pointer;
	flex-shrink: 0;
	padding: 4px 0 4px 8px;
}

/* Invite sheet extras */

.se-conn-radio-group {
	display: flex;
	gap: 16px;
}

.se-conn-radio {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	color: var(--color-text);
	cursor: pointer;
}

.se-conn-radio input[type="radio"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--color-input-border);
	border-radius: 50%;
	background: var(--color-input-bg);
	flex-shrink: 0;
	position: relative;
	cursor: pointer;
	transition: border-color 0.15s;
}

.se-conn-radio input[type="radio"]:checked {
	border-color: var(--color-accent);
}

.se-conn-radio input[type="radio"]:checked::after {
	content: '';
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: var(--color-accent);
}

.se-conn-link-result {
	margin-top: 16px;
	padding: 12px;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
}

.se-conn-link-url {
	font-size: 14px;
	color: var(--color-text-muted);
	word-break: break-all;
	line-height: 1.5;
}

/* -------------------------------------------------------------------------
   Invite-from-connections list
   ------------------------------------------------------------------------- */

.se-invite-row--added .se-member-item__name {
	color: var(--color-text-muted);
}

.se-invite-added-label {
	font-size: 14px;
	color: var(--color-text-muted);
}

.se-invite-btn {
	background: none;
	border: 1px solid var(--color-accent);
	color: var(--color-accent);
	border-radius: 6px;
	padding: 5px 14px;
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
}

.se-invite-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.se-invite-hint {
	font-size: 14px;
	color: var(--color-text-muted);
	padding: 16px var(--spacing);
}

/* -------------------------------------------------------------------------
   Web-mode layout — fixed left sidebar (desktop) + hamburger drawer (mobile)
   (these rules only affect body:not(.se-app) contexts)
   ------------------------------------------------------------------------- */

/* ---- Page wrapper ---- */

.se-site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.se-site:has(.se-screen) {
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	min-height: 0;
}

/* ---- Sidebar shell (fixed left on desktop, full-screen drawer on mobile) ---- */

.se-sidebar {
	position: fixed;
	top: 0;
	left: 0;
	height: 100vh;
	width: var(--sidebar-width);
	z-index: 200;
}

/* ---- Sidebar inner panel ---- */

.se-sidebar-panel {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 100%;
	background: var(--color-bg-subtle);
	border-right: 1px solid var(--color-border);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 2.5rem 2.5rem;
}

/* ---- Logo system ---- */

@keyframes se-ping {
	0%   { transform: scale(.5); opacity: .5; }
	70%  { opacity: 0; }
	100% { transform: scale(2.7); opacity: 0; }
}

@keyframes se-breathe {
	0%, 100% { transform: scale(1); }
	50%       { transform: scale(1.13); }
}

.se-logo-wm {
	font-family: 'Hanken Grotesk', 'Outfit', system-ui, sans-serif;
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 0.96;
	text-transform: lowercase;
	color: #ffffff;
}

.se-logo-pulse {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.se-logo-pulse .wave {
	position: absolute;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1.5px solid var(--color-accent);
	opacity: 0;
	animation: se-ping 2.6s cubic-bezier(.22,.7,.3,1) infinite;
}

.se-logo-pulse .wave:nth-child(2) {
	animation-delay: 1.3s;
}

.se-logo-pulse .core {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--color-accent);
	position: relative;
	z-index: 2;
	animation: se-breathe 2.6s ease-in-out infinite;
}

/* Direction A — full wordmark (desktop sidebar) */
.se-logo-full {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.se-logo-full .se-logo-wm {
	font-size: 1.2rem;
	display: block;
}

.se-logo-full .else-row {
	display: flex;
	align-items: flex-end;
	gap: 9px;
}

.se-logo-full .else-row .se-logo-pulse {
	margin-bottom: 2px;
}

/* Direction D — short mark (mobile top bar) */
.se-logo-short {
	display: flex;
	align-items: flex-end;
	gap: 7px;
}

.se-logo-short .se-logo-wm {
	font-size: 1.3rem;
	font-weight: 700;
	letter-spacing: -0.05em;
	line-height: 1;
	display: inline;
}

.se-logo-short .se-logo-pulse {
	margin-bottom: 2px;
}

/* ---- Brand / logo in sidebar ---- */

.se-sidebar-brand,
.se-sidebar-brand:visited,
.se-sidebar-brand:hover {
	display: block;
	text-decoration: none;
	margin-bottom: 2.5rem;
}

/* ---- Sidebar nav links ---- */

.se-sidebar-nav {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.se-sidebar-nav ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.se-sidebar-nav a {
	display: block;
	padding: 1em 0;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--color-text-muted);
	text-decoration: none;
	position: relative;
	outline: none;
	transition: color 0.2s ease;
}

.se-sidebar-nav a::before,
.se-sidebar-nav a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	height: 2px;
	border-radius: 1px;
}

.se-sidebar-nav a::before {
	width: 100%;
	background: rgba(255, 255, 255, 0.06);
}

.se-sidebar-nav a::after {
	width: 0;
	background: linear-gradient(to right, var(--color-gradient-start), var(--color-gradient-end));
	transition: width 0.2s ease;
}

.se-sidebar-nav li.fine-print a {
	font-size: 0.8rem;
}

.se-sidebar-nav a:hover {
	color: var(--color-text);
}

.se-sidebar-nav a:hover::after,
.se-sidebar-nav li.current-menu-item > a::after,
.se-sidebar-nav a.se-active::after {
	width: 100%;
}

.se-sidebar-nav li.current-menu-item > a,
.se-sidebar-nav a.se-active {
	color: #ffffff;
}

/* ---- Mobile top bar (hidden on desktop) ---- */

.se-mobile-bar {
	display: none;
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--header-height);
	background: var(--color-bg);
	border-bottom: 1px solid var(--color-border);
	flex-shrink: 0;
	padding: 0 var(--spacing);
	align-items: center;
	justify-content: space-between;
}

.se-mobile-logo,
a.se-mobile-logo,
a.se-mobile-logo:visited,
a.se-mobile-logo:hover {
	display: flex;
	align-items: center;
	text-decoration: none;
}
/* ---- Hamburger button ---- */

.se-hamburger {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 24px;
	height: 16px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	color: var(--color-text);
}

.se-hamburger span {
	display: block;
	width: 100%;
	height: 1.5px;
	background: currentColor;
	border-radius: 2px;
	transform-origin: center;
	transition: transform 0.22s ease, opacity 0.22s ease;
}

.se-hamburger[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7.25px) rotate(45deg);
}

.se-hamburger[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}

.se-hamburger[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7.25px) rotate(-45deg);
}

/* ---- Nav close button (mobile only) ---- */

.se-nav-close {
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: flex-end;
	background: none;
	border: none;
	color: var(--color-text-muted);
	cursor: pointer;
	padding: 16px 16px 8px;
}

/* ---- Backdrop (mobile only) ---- */

.se-nav-backdrop {
	position: absolute;
	inset: 0;
	background: transparent;
	transition: background 0.28s ease;
	display: none;
}

/* ---- Site content area ---- */

.se-site-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	margin-left: var(--sidebar-width);
}

.se-site-content .se-screen {
	height: 100vh;
	height: 100dvh;
}

.se-site:has(.se-screen) .se-site-footer {
	display: none;
}

/* ---- Site footer ---- */

.se-site-footer {
	flex-shrink: 0;
	padding: var(--spacing);
	border-top: 1px solid var(--color-border);
}

.se-site-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.se-site-footer__brand {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--color-text-muted);
}

.se-site-footer__links {
	display: flex;
}

.se-site-footer__nav {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 16px;
}

.se-site-footer__links a {
	font-size: 13px;
	color: var(--color-text-muted);
	text-decoration: none;
}

.se-site-footer__links a:hover {
	color: var(--color-text);
}

/* ---- Desktop: sidebar always visible ---- */

@media (min-width: 1025px) {
	.se-sidebar {
		pointer-events: auto;
	}

	.se-nav-close {
		display: none;
	}
}

/* ---- Mobile / tablet: hamburger + slide-in drawer ---- */

@media (max-width: 1024px) {
	.se-mobile-bar {
		display: flex;
	}

	.se-site-content {
		margin-left: 0;
	}

	.se-site-content .se-screen {
		height: calc(100vh - var(--header-height));
		height: calc(100dvh - var(--header-height));
	}

	.se-sidebar {
		inset: 0;
		width: 100%;
		pointer-events: none;
	}

	.se-sidebar.is-open {
		pointer-events: auto;
	}

	.se-sidebar-panel {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: auto;
		width: min(280px, 82vw);
		border-right: none;
		border-left: 1px solid var(--color-border);
		transform: translateX(100%);
		transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
		padding: 0;
	}

	.se-sidebar.is-open .se-sidebar-panel {
		transform: translateX(0);
	}

	.se-nav-backdrop {
		display: block;
	}

	.se-sidebar.is-open .se-nav-backdrop {
		background: rgba(0, 0, 0, 0.62);
	}

	.se-sidebar-brand {
		display: none;
	}

	.se-sidebar-nav ul {
		flex: 1;
	}

	.se-sidebar-nav a {
		font-size: 17px;
		font-weight: 500;
		letter-spacing: 0;
		text-transform: none;
		padding: 18px 24px;
		color: var(--color-text);
	}

	.se-sidebar-nav a:active {
		opacity: 0.7;
	}

	.se-sidebar-nav a::before,
	.se-sidebar-nav a::after {
		display: none;
	}

	.se-sidebar-nav li {
		border-bottom: 1px solid var(--color-border);
	}

	.se-sidebar-nav li:last-child {
		border-bottom: none;
	}
}

/* -------------------------------------------------------------------------
   Login / auth forms (somewhere-login plugin)
   ------------------------------------------------------------------------- */

.se-login-wrap {
	max-width: 400px;
	margin: 0 auto;
	padding: 40px var(--spacing) 60px;
}

.se-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
}

.se-form-label {
	font-size: 13px;
	font-weight: 500;
	color: var(--color-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

body .se-form-input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--color-input-border);
	border-radius: var(--radius);
	font-size: 16px;
	font-family: inherit;
	background: var(--color-input-bg);
	color: var(--color-text);
	-webkit-text-fill-color: var(--color-text);
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.15s;
}

body .se-form-input::placeholder {
	color: var(--color-placeholder);
	-webkit-text-fill-color: var(--color-placeholder);
	opacity: 1;
}

body .se-form-input:focus {
	border-color: var(--color-accent);
}

body .se-form-input:-webkit-autofill,
body .se-form-input:-webkit-autofill:hover,
body .se-form-input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--color-text);
	-webkit-box-shadow: 0 0 0 1000px var(--color-input-bg) inset;
	transition: background-color 5000s ease-in-out 0s;
}

/* Larger, centered style for the 6-digit verify code field */
.se-verify-form .se-form-input {
	font-size: 22px;
	letter-spacing: 0.25em;
	text-align: center;
	padding: 14px;
}

.se-form-hint {
	font-size: 13px;
	color: var(--color-text-muted);
	margin: 0;
}

/* Checkboxes */
.se-form-checkbox-label {
	/*display: flex;
	align-items: flex-start;
	gap: 10px;*/
	font-size: 14px;
	color: var(--color-text);
	cursor: pointer;
	line-height: 1.5;
}

.se-form-checkbox-label a {
	color: var(--color-accent);
	text-decoration: none;
}

body .se-form-checkbox {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	min-width: 18px;
	border: 1.5px solid var(--color-input-border);
	border-radius: 4px;
	background: var(--color-input-bg);
	margin-top: 2px;
	cursor: pointer;
	position: relative;
	transition: border-color 0.15s, background 0.15s;
}

body .se-form-checkbox:checked {
	background: var(--color-accent);
	border-color: var(--color-accent);
}

body .se-form-checkbox:checked::after {
	content: '';
	position: absolute;
	left: 4px;
	top: 1px;
	width: 6px;
	height: 10px;
	border: 2px solid #fff;
	border-top: none;
	border-left: none;
	transform: rotate(45deg);
}

/* Flash messages */
.se-login-messages {
	padding: 12px 16px;
	border-radius: var(--radius);
	font-size: 14px;
	margin-bottom: 20px;
	line-height: 1.5;
}

.se-login-messages p {
	margin: 0;
}

.se-login-messages p + p {
	margin-top: 4px;
}

.se-login-messages--error {
	background: #1f1210;
	color: var(--color-danger);
	border: 1px solid #4a2020;
}

.se-login-messages--info {
	background: #0f1a1f;
	color: var(--color-activity);
	border: 1px solid #1a3d3a;
}

/* Button variants used by login forms */
.se-btn--outline {
	background: transparent;
	color: var(--color-accent);
	border: 1px solid var(--color-accent);
}

.se-btn--outline:hover {
	background: rgba(90, 101, 192, 0.08);
}

.se-btn--sm {
	padding: 9px 18px;
	font-size: 14px;
	width: auto;
}

/* Intro text */
.se-verify-form__intro,
.se-password-lost-form__intro {
	font-size: 14px;
	color: var(--color-text-muted);
	margin-bottom: 20px;
	line-height: 1.5;
}

.se-verify-form__intro strong {
	color: var(--color-text);
	font-weight: 500;
}

/* Footer links and action rows */
.se-login-form__links,
.se-login-form__actions,
.se-register-form__actions,
.se-register-form__verify-link,
.se-verify-form__actions,
.se-verify-form__resend,
.se-password-lost-form__actions,
.se-password-reset-form__actions {
	text-align: center;
	margin-top: 16px;
	font-size: 14px;
	color: var(--color-text-muted);
}

.se-login-form__links a,
.se-login-form__actions a,
.se-register-form__actions a,
.se-register-form__verify-link a,
.se-verify-form__actions a,
.se-password-lost-form__actions a,
.se-password-reset-form__actions a {
	color: var(--color-accent);
	text-decoration: none;
}

/* ---- Default page template ---- */

.site-main {
	padding: 2.5rem 2rem 4rem;
}

/* ---- Legal pages (Privacy Policy, Terms, Community Standards) ---- */

.se-legal-page {
	padding: 3rem 2rem 5rem;
}

/* App mode: legal pages render directly under body.se-app (no .se-screen
   wrapper), so they need their own scroll area inside the locked viewport. */
body.se-app .se-legal-page {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.se-legal-box {
	max-width: 760px;
	margin: 0 auto;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 18px;
	padding: 3rem 3.5rem;
}

.se-legal-box h1 {
	font-size: 1.9rem;
	font-weight: 700;
	margin-bottom: 0.3rem;
	color: var(--color-text);
}

.se-legal-box .meta,
.se-legal-box .lead {
	color: var(--color-text-muted);
	margin-bottom: 2.5rem;
}

.se-legal-box .lead {
	font-size: 1.05rem;
	line-height: 1.6;
	color: #c0bdd4;
}

.se-legal-box h2 {
	font-size: 0.95rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-text-muted);
	margin-top: 2.25rem;
	margin-bottom: 0.65rem;
	padding-bottom: 0.45rem;
	border-bottom: 1px solid var(--color-border);
}

.se-legal-box p {
	margin-bottom: 1rem;
	line-height: 1.75;
	color: var(--color-text);
}

.se-legal-box ul {
	margin: 0.25rem 0 1rem 1.4rem;
}

.se-legal-box li {
	margin-bottom: 0.4rem;
	line-height: 1.7;
	color: var(--color-text);
}

.se-legal-box a {
	color: var(--color-text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.se-legal-box .site-name {
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-text-muted);
	margin-bottom: 2rem;
}

.se-legal-box .callout {
	background: rgba(230, 168, 23, 0.1);
	border-left: 3px solid #e6a817;
	padding: 1rem 1.25rem;
	margin: 1.25rem 0;
	border-radius: 0 6px 6px 0;
}

.se-legal-box .zero {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	padding: 1.25rem 1.5rem;
	margin: 1.5rem 0;
}

.se-legal-box .zero strong {
	display: block;
	margin-bottom: 0.4rem;
	color: var(--color-text);
}

.se-legal-box .rule {
	margin-bottom: 1.5rem;
}

.se-legal-box .rule strong {
	display: block;
	margin-bottom: 0.2rem;
	color: var(--color-text);
}

.se-legal-box .box {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--color-border);
	border-radius: 10px;
	padding: 1.25rem 1.5rem;
	margin-top: 2.5rem;
	font-size: 0.95rem;
}

.se-legal-box blockquote {
	margin: 2.5rem 0;
	padding: 1.5rem 2rem;
	border-left: 3px solid var(--color-gradient-start);
	background: var(--color-bg-subtle);
	border-radius: 0 var(--radius) var(--radius) 0;
}

.se-legal-box .caps {
	font-size: 0.9rem;
	line-height: 1.65;
	color: var(--color-text-muted);
}

@media (max-width: 640px) {
	.se-legal-page {
		padding: 1.5rem 1rem 4rem;
	}

	.se-legal-box {
		padding: 1.75rem 1.5rem;
		border-radius: 14px;
	}
}

/* -------------------------------------------------------------------------
   Place-limit steer (shown on create screen when at capacity)
   ------------------------------------------------------------------------- */

.se-limit-steer {
	padding: var(--spacing);
	background: var(--color-bg-subtle);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	margin: var(--spacing);
}

.se-steer-lead {
	font-size: 17px;
	font-weight: 600;
	margin-bottom: 8px;
}

.se-steer-body {
	color: var(--color-text-muted);
	line-height: 1.5;
}

.se-steer-body a {
	color: var(--color-text);
	text-decoration: underline;
}

/* Supporter note on the web account page (never shown in the native app). */
.se-supporter-note {
	color: var(--color-text-muted);
	line-height: 1.5;
	margin-bottom: 12px;
}
