/* Durak Social — shell tokens & chrome (scoped to .durak-social) */

/*
 * Boolean HTML [hidden] contract: author display:flex/grid/block must not resurrect
 * closed panels/menus/badges. Preserve hidden="until-found" if used.
 */
.durak-social [hidden]:not([hidden='until-found']) {
	display: none !important;
}

.durak-social {
	/* Surfaces */
	--ds-cream: #faf7f2;
	--ds-cream-2: #f3ebe1;
	--ds-surface: #fffcf8;
	--ds-surface-2: #f7f0e8;
	--ds-elevated: #ffffff;
	/* Text */
	--ds-ink: #2a2118;
	--ds-muted: #6f6256;
	--ds-subtle: #97897b;
	--ds-text: var(--ds-ink);
	/* Borders */
	--ds-border: #e8dfd4;
	--ds-border-strong: #d9cdc0;
	/* Accent */
	--ds-orange: #f27a1a;
	--ds-orange-deep: #e06b0f;
	--ds-orange-hover: #d9620c;
	--ds-orange-soft: #fff1e4;
	--ds-orange-tint: rgba(242, 122, 26, 0.1);
	/* Semantic */
	--ds-sea: #3d7ea6;
	--ds-sunset: #e8915a;
	--ds-gold: #d4a017;
	--ds-success: #2f7d4a;
	--ds-warning: #c47a12;
	--ds-error: #b42318;
	--ds-info: #3d7ea6;
	--ds-online: #22a85a;
	/* Depth */
	--ds-shadow: 0 8px 24px rgba(64, 40, 18, 0.07);
	--ds-shadow-sm: 0 2px 8px rgba(64, 40, 18, 0.05);
	--ds-shadow-lg: 0 16px 40px rgba(64, 40, 18, 0.1);
	/* Radius */
	--ds-radius-xs: 8px;
	--ds-radius-sm: 12px;
	--ds-radius: 16px;
	--ds-radius-lg: 20px;
	--ds-radius-xl: 24px;
	--ds-radius-pill: 999px;
	/* Spacing rhythm */
	--ds-space-1: 0.25rem;
	--ds-space-2: 0.5rem;
	--ds-space-3: 0.75rem;
	--ds-space-4: 1rem;
	--ds-space-5: 1.25rem;
	--ds-space-6: 1.5rem;
	--ds-space-8: 2rem;
	/* Layout */
	--ds-header-h: 68px;
	--ds-bottom-h: 68px;
	--ds-aside-w: 268px;
	--ds-presence-w: 300px;
	--ds-main-max: 760px;
	/* Type */
	--ds-font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
	--ds-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--ds-type-screen: clamp(1.45rem, 2.4vw, 2.05rem);
	--ds-type-section: 0.78rem;
	--ds-type-card: 1.02rem;
	--ds-type-name: 1.05rem;
	--ds-type-handle: 0.82rem;
	--ds-type-body: 0.95rem;
	--ds-type-meta: 0.78rem;
	--ds-type-label: 0.72rem;
	--ds-lh-body: 1.5;
	--ds-lh-ar: 1.7;
	/* Avatar scale */
	--ds-avatar-compact: 2rem;
	--ds-avatar-chat: 2.15rem;
	--ds-avatar-row: 2.5rem;
	--ds-avatar-profile: 5.25rem;
	/* Control density */
	--ds-tap: 44px;

	box-sizing: border-box;
	min-height: 100vh;
	min-height: 100dvh;
	width: 100%;
	margin: 0;
	padding: 0 0 var(--ds-bottom-h);
	color: var(--ds-ink);
	font-family: var(--ds-font);
	background:
		radial-gradient(980px 460px at 0% -8%, rgba(242, 122, 26, 0.09), transparent 55%),
		radial-gradient(720px 380px at 100% 0%, rgba(232, 145, 90, 0.07), transparent 52%),
		var(--ds-cream);
	-webkit-font-smoothing: antialiased;
}

.durak-social *,
.durak-social *::before,
.durak-social *::after {
	box-sizing: border-box;
}

body.is-durak-social .site-header,
body.is-durak-social .site-footer,
body.is-durak-social .trust-strip,
body.is-durak-social .mobile-action-bar,
body.is-durak-social .mobile-nav,
body.is-durak-social .skip-link:not(.durak-social__skip) {
	display: none !important;
}

body.is-durak-social .site-main {
	padding: 0;
	margin: 0;
	max-width: none;
}

body.is-durak-social .social-page--app {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.durak-social__skip {
	position: absolute;
	inset-inline-start: -999px;
	top: 0;
	background: var(--ds-orange);
	color: #fff;
	padding: 0.5rem 0.75rem;
	z-index: 100;
	border-radius: var(--ds-radius-sm);
}

.durak-social__skip:focus {
	inset-inline-start: 0.75rem;
	top: 0.75rem;
}

.ds-preview-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.85rem;
	padding: 0.55rem 1rem;
	background: #fff4ed;
	border-bottom: 1px solid rgba(242, 122, 26, 0.28);
	color: var(--ds-orange-deep);
	font-size: 0.82rem;
	font-weight: 600;
}

.ds-preview-banner__dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: var(--ds-radius-pill);
	background: var(--ds-orange);
	box-shadow: 0 0 0 4px rgba(242, 122, 26, 0.15);
}

.ds-preview-banner__note {
	font-weight: 500;
	color: var(--ds-muted);
}

.ds-fixture-tag {
	display: inline-flex;
	align-items: center;
	padding: 0.1rem 0.4rem;
	border-radius: var(--ds-radius-pill);
	border: 1px solid rgba(242, 122, 26, 0.28);
	background: rgba(255, 244, 237, 0.9);
	color: var(--ds-orange-deep);
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: middle;
}

.ds-header {
	position: sticky;
	top: 0;
	z-index: 40;
	display: grid;
	grid-template-columns: minmax(200px, 1fr) minmax(0, 2.2fr) auto;
	gap: 1rem;
	align-items: center;
	min-height: var(--ds-header-h);
	padding: 0.7rem 1.25rem;
	background: color-mix(in srgb, var(--ds-cream) 82%, transparent);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid color-mix(in srgb, var(--ds-border) 80%, transparent);
}

.ds-header__brand,
.ds-header__actions {
	display: flex;
	align-items: center;
	gap: 0.55rem;
}

.ds-brand {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	min-width: 0;
}

.ds-brand__mark {
	display: inline-flex;
	flex: 0 0 auto;
	filter: drop-shadow(0 4px 10px rgba(242, 122, 26, 0.28));
}

.ds-brand__title {
	margin: 0;
	font-family: var(--ds-display);
	font-size: 1.4rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.1;
	color: var(--ds-ink);
}

.ds-brand__subtitle {
	margin: 0.1rem 0 0;
	color: var(--ds-muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.ds-topnav__list {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.2rem;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	justify-content: center;
}

.ds-topnav__list::-webkit-scrollbar {
	display: none;
}

.ds-topnav__btn {
	appearance: none;
	border: 1px solid transparent;
	background: transparent;
	color: var(--ds-muted);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	padding: 0.5rem 0.9rem;
	border-radius: var(--ds-radius-pill);
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.ds-topnav__btn:hover {
	color: var(--ds-ink);
	background: rgba(242, 122, 26, 0.06);
}

.ds-topnav__btn.is-current,
.ds-topnav__btn[aria-current="page"] {
	color: var(--ds-orange-deep);
	background: var(--ds-elevated);
	border-color: rgba(242, 122, 26, 0.28);
	box-shadow: var(--ds-shadow-sm);
}

.ds-topnav__btn:focus-visible,
.ds-icon-btn:focus-visible,
.ds-btn:focus-visible,
.ds-room:focus-visible,
.ds-bottomnav__item:focus-visible,
.ds-composer__input:focus-visible {
	outline: 2px solid var(--ds-orange);
	outline-offset: 2px;
}

.ds-icon-btn,
.ds-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.ds-icon-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	min-width: 44px;
	min-height: 44px;
	border-radius: var(--ds-radius-pill);
	color: var(--ds-muted);
	transition: background 0.15s ease, color 0.15s ease;
}

.ds-icon-btn:hover:not(:disabled) {
	background: var(--ds-orange-tint);
	color: var(--ds-orange-deep);
}

.ds-icon-btn:disabled,
.ds-btn:disabled,
.ds-text-btn:disabled,
.ds-poll__btn:disabled,
.ds-quiz__option:disabled,
.ds-bottomnav__fab:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.ds-icon-btn--sm {
	width: 2rem;
	height: 2rem;
	min-width: 40px;
	min-height: 40px;
}

.ds-notif-badge {
	position: absolute;
	top: 0.45rem;
	inset-inline-end: 0.5rem;
	width: 0.45rem;
	height: 0.45rem;
	border-radius: var(--ds-radius-pill);
	background: var(--ds-orange);
	border: 2px solid var(--ds-cream);
}

.ds-header__avatar {
	border: 0;
	background: transparent;
	padding: 0;
	cursor: pointer;
	border-radius: var(--ds-radius-pill);
}

.ds-header__avatar .ds-avatar {
	box-shadow: 0 0 0 2px var(--ds-elevated), 0 0 0 3px rgba(242, 122, 26, 0.35);
}

.ds-shell {
	display: grid;
	grid-template-columns: var(--ds-aside-w) minmax(0, 1fr) var(--ds-presence-w);
	gap: 0;
	min-height: calc(100vh - var(--ds-header-h));
	min-height: calc(100dvh - var(--ds-header-h));
	max-width: 1520px;
	margin: 0 auto;
	padding: 0.75rem 0.85rem 1rem;
}

.ds-aside {
	border: 0;
	background: transparent;
	padding: 0.35rem 0.55rem 1rem;
}

.ds-aside--rooms > .ds-panel,
.ds-aside--presence > .ds-panel,
.ds-aside--presence > .ds-mini-profile,
.ds-aside--presence > .ds-welcome-card {
	background: color-mix(in srgb, var(--ds-surface) 92%, transparent);
	border: 1px solid color-mix(in srgb, var(--ds-border) 85%, transparent);
	border-radius: var(--ds-radius-lg);
	box-shadow: var(--ds-shadow-sm);
	padding: 0.95rem 0.85rem;
}

.ds-aside--presence {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.ds-aside--presence > .ds-panel,
.ds-aside--presence > .ds-mini-profile,
.ds-aside--presence > .ds-welcome-card {
	margin: 0;
}

.ds-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	padding: 0.35rem 1rem 1.25rem;
}

.ds-main > .ds-surface {
	max-width: var(--ds-main-max);
	width: 100%;
	margin-inline: auto;
}

.ds-surface[hidden] {
	display: none !important;
}

.ds-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.ds-panel__title {
	margin: 0 0 0.75rem;
	font-size: 0.72rem;
	font-weight: 750;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ds-subtle);
}

.ds-panel__head .ds-panel__title {
	margin: 0;
}

.ds-only-mobile {
	display: none;
}

.ds-bottomnav {
	display: none;
}

.ds-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(32, 22, 14, 0.4);
	z-index: 50;
}

.ds-backdrop[hidden] {
	display: none !important;
}

/* Dark theme */
[data-theme="dark"] .durak-social {
	--ds-cream: #171410;
	--ds-cream-2: #1f1a16;
	--ds-surface: #221d18;
	--ds-surface-2: #2a241e;
	--ds-elevated: #2c2620;
	--ds-ink: #f6efe7;
	--ds-muted: #b5a89b;
	--ds-subtle: #8f8376;
	--ds-text: var(--ds-ink);
	--ds-border: #3a322b;
	--ds-border-strong: #4a4038;
	--ds-orange: #ff7a1a;
	--ds-orange-deep: #ff8a33;
	--ds-orange-hover: #ff923f;
	--ds-orange-soft: rgba(255, 122, 26, 0.14);
	--ds-orange-tint: rgba(255, 122, 26, 0.12);
	--ds-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
	--ds-shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.28);
	--ds-shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"] .ds-header {
	background: rgba(23, 20, 16, 0.88);
}

[data-theme="dark"] .ds-preview-banner {
	background: rgba(255, 122, 26, 0.12);
	border-color: rgba(255, 122, 26, 0.28);
}

[data-theme="dark"] .ds-fixture-tag {
	background: rgba(255, 122, 26, 0.12);
}

[data-theme="dark"] .ds-topnav__btn.is-current,
[data-theme="dark"] .ds-topnav__btn[aria-current="page"] {
	background: var(--ds-elevated);
}

@media (prefers-reduced-motion: reduce) {
	.durak-social *,
	.durak-social *::before,
	.durak-social *::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}
