@charset "UTF-8";
/* اتاق مشاعره — sits on the هافز tokens already declared in hz.css */

.hz-mosh {
	background: var(--hz-forest);
	color: var(--hz-paper);
	padding: clamp(1.6rem, 5vw, 3.4rem) var(--hz-pad);
}

.hz-mosh__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	max-width: var(--hz-max);
	margin-inline: auto;
	padding-bottom: clamp(1rem, 2.4vw, 1.6rem);
	border-bottom: 1px solid var(--hz-line-light);
}

.hz-mosh__title {
	font-family: var(--hz-display);
	font-size: clamp(1.8rem, 6vw, 3.2rem);
	line-height: 1.25;
	margin: .4rem 0 0;
	color: var(--hz-paper);
}

.hz-mosh__course {
	margin: .5rem 0 0;
	font-size: .9rem;
	color: rgba(246, 242, 234, .68);
}

.hz-mosh__course a {
	color: #e5c07a;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hz-mosh__badges {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.hz-pill--state {
	border-color: var(--hz-ochre);
	color: #e5c07a;
}

/* ------------------------------------------------- the connect panel */

.hz-mosh__connect {
	max-width: var(--hz-max);
	margin: clamp(1.2rem, 3vw, 2rem) auto 0;
	padding: clamp(1.1rem, 3vw, 1.8rem);
	border: 1px solid var(--hz-line-light);
	border-radius: 14px;
	background: rgba(246, 242, 234, .04);
	display: grid;
	gap: 1rem;
}

.hz-mosh__connecthead p {
	margin: .4rem 0 0;
	font-size: .92rem;
	line-height: 1.9;
	color: rgba(246, 242, 234, .7);
}

.hz-mosh__h2 {
	font-family: var(--hz-display);
	font-size: clamp(1.05rem, 3vw, 1.4rem);
	margin: 0;
	color: var(--hz-paper);
}

.hz-mosh__join {
	justify-self: start;
}

.hz-mosh__sessions {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: .6rem;
}

.hz-mosh__session {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem 1rem;
	padding: .7rem .9rem;
	border: 1px solid var(--hz-line-light);
	border-radius: 10px;
}

.hz-mosh__session.is-live {
	border-color: var(--hz-ochre);
	background: rgba(180, 134, 47, .12);
}

.hz-mosh__sname {
	font-weight: 600;
}

.hz-mosh__smeta {
	font-size: .8rem;
	color: rgba(246, 242, 234, .6);
}

.hz-mosh__session .hz-link {
	margin-inline-start: auto;
	color: var(--hz-paper);
}

/* --------------------------------------------------------- the game */

.hz-mosh__body {
	max-width: var(--hz-max);
	margin: clamp(1.2rem, 3vw, 2rem) auto 0;
	display: grid;
	gap: clamp(1.2rem, 3vw, 2.4rem);
}

@media (min-width: 900px) {
	.hz-mosh__body {
		grid-template-columns: minmax(0, 1fr) 300px;
		align-items: start;
	}
}

.hz-mosh__turn {
	display: flex;
	align-items: center;
	gap: .7rem;
	margin-bottom: 1rem;
}

.hz-mosh__turnlabel {
	font-size: .85rem;
	letter-spacing: .06em;
	color: rgba(246, 242, 234, .6);
}

.hz-mosh__letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.6rem;
	height: 2.6rem;
	padding: 0 .6rem;
	border-radius: 10px;
	background: var(--hz-ochre);
	color: #1c1405;
	font-family: var(--hz-display);
	font-size: 1.5rem;
	line-height: 1;
}

.hz-mosh__chain {
	list-style: none;
	margin: 0 0 1.2rem;
	padding: 0;
	display: grid;
	gap: .7rem;
	max-height: 58svh;
	overflow-y: auto;
	scrollbar-width: thin;
}

.hz-mosh__move {
	padding: .9rem 1.1rem;
	border: 1px solid var(--hz-line-light);
	border-radius: 12px;
	background: rgba(246, 242, 234, .03);
}

.hz-mosh__move.is-me {
	border-color: rgba(180, 134, 47, .55);
	background: rgba(180, 134, 47, .09);
}

.hz-mosh__move.is-host {
	border-style: dashed;
}

.hz-mosh__move.is-new {
	animation: hz-mosh-in .5s var(--hz-ease) both;
}

@keyframes hz-mosh-in {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: none; }
}

.hz-mosh__beyt {
	margin: 0;
	font-family: var(--hz-verse);
	font-size: clamp(1.05rem, 3.2vw, 1.45rem);
	line-height: 1.95;
	color: var(--hz-paper);
	white-space: pre-line;
}

.hz-mosh__by {
	margin: .5rem 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: .8rem;
	font-size: .78rem;
	color: rgba(246, 242, 234, .55);
}

.hz-mosh__who {
	color: rgba(246, 242, 234, .82);
}

/* ------------------------------------------------------------- form */

.hz-mosh__form {
	display: grid;
	gap: .7rem;
}

.hz-mosh__input,
.hz-mosh__poetin {
	width: 100%;
	padding: .85rem 1rem;
	border: 1px solid var(--hz-line-light);
	border-radius: 10px;
	background: rgba(246, 242, 234, .06);
	color: var(--hz-paper);
	font-family: var(--hz-verse);
	font-size: 1.05rem;
	line-height: 1.9;
	resize: vertical;
}

.hz-mosh__poetin {
	font-family: var(--hz-ui);
	font-size: .9rem;
	line-height: 1.6;
}

.hz-mosh__input::placeholder,
.hz-mosh__poetin::placeholder {
	color: rgba(246, 242, 234, .4);
}

.hz-mosh__input:focus-visible,
.hz-mosh__poetin:focus-visible {
	outline: 2px solid var(--hz-ochre);
	outline-offset: 2px;
}

.hz-mosh__formrow {
	display: flex;
	flex-wrap: wrap;
	gap: .7rem;
	align-items: center;
}

.hz-mosh__formrow .hz-mosh__poetin {
	flex: 1 1 12rem;
	width: auto;
}

.hz-mosh__msg {
	margin: 0;
	min-height: 1.3em;
	font-size: .85rem;
	color: #f0b9a0;
}

.hz-mosh__msg.is-ok {
	color: #9fd7bf;
}

.hz-mosh__closed {
	margin: 0;
	padding: 1rem;
	border: 1px dashed var(--hz-line-light);
	border-radius: 10px;
	color: rgba(246, 242, 234, .7);
}

/* ------------------------------------------------------------- side */

.hz-mosh__side {
	display: grid;
	gap: 1.6rem;
	align-content: start;
}

.hz-mosh__scores {
	list-style: none;
	margin: .7rem 0 0;
	padding: 0;
	display: grid;
	gap: .4rem;
	counter-reset: hzs;
}

.hz-mosh__scores li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .6rem;
	padding: .5rem .7rem;
	border-radius: 8px;
	background: rgba(246, 242, 234, .04);
	font-size: .88rem;
}

.hz-mosh__scores b {
	font-family: var(--hz-display);
	color: #e5c07a;
}

.hz-mosh__hostbtns {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
	margin-top: .7rem;
}

.hz-mosh__hb {
	display: inline-flex;
	align-items: center;
	min-height: 44px;          /* tap target */
	padding: .5rem .9rem;
	border: 1px solid var(--hz-line-light);
	border-radius: 8px;
	background: none;
	color: var(--hz-paper);
	font-family: var(--hz-ui);
	font-size: .8rem;
	cursor: pointer;
	transition: background-color .3s var(--hz-ease);
}

.hz-mosh__hb:hover {
	background: rgba(246, 242, 234, .1);
}

.hz-mosh__hb--warn {
	border-color: rgba(240, 140, 120, .5);
	color: #f0b9a0;
}

.hz-mosh__rules p {
	margin: .6rem 0 0;
	font-size: .84rem;
	line-height: 1.95;
	color: rgba(246, 242, 234, .62);
}

/* ----------------------------------------------------------- locked */

.hz-mosh--locked {
	display: grid;
	place-items: center;
	min-height: 46svh;
}

.hz-mosh__lockcard {
	max-width: 34rem;
	text-align: center;
	padding: clamp(1.6rem, 5vw, 3rem);
	border: 1px solid var(--hz-line-light);
	border-radius: 16px;
	background: rgba(246, 242, 234, .04);
}

.hz-mosh__lockicon {
	color: var(--hz-ochre);
	font-size: 1.4rem;
}

.hz-mosh__locktitle {
	font-family: var(--hz-display);
	font-size: clamp(1.4rem, 5vw, 2.2rem);
	margin: .6rem 0 0;
	color: var(--hz-paper);
}

.hz-mosh__lockmsg {
	margin: .8rem 0 1.4rem;
	line-height: 2;
	color: rgba(246, 242, 234, .72);
}

/* ------------------------------------------------------- room list */

.hz-mosh-list {
	background: var(--hz-paper);
	color: var(--hz-ink);
	padding: clamp(2rem, 6vw, 4.5rem) var(--hz-pad);
}

.hz-mosh-list__grid {
	list-style: none;
	margin: clamp(1.2rem, 3vw, 2rem) auto 0;
	padding: 0;
	max-width: var(--hz-max);
	display: grid;
	gap: clamp(.8rem, 2vw, 1.4rem);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

.hz-mosh-card a {
	display: grid;
	gap: .45rem;
	height: 100%;
	padding: 1.2rem 1.3rem;
	border: 1px solid var(--hz-line);
	border-radius: 14px;
	background: #fff;
	color: var(--hz-ink);
	transition: transform .35s var(--hz-ease), border-color .35s var(--hz-ease);
}

.hz-mosh-card a:hover {
	transform: translateY(-3px);
	border-color: var(--hz-green);
}

.hz-mosh-card__state {
	font-size: .72rem;
	letter-spacing: .1em;
	color: var(--hz-green);
}

.hz-mosh-card__title {
	font-family: var(--hz-display);
	font-size: clamp(1.15rem, 2.6vw, 1.5rem);
	line-height: 1.45;
}

.hz-mosh-card__course {
	font-size: .82rem;
	color: var(--hz-ash);
}

.hz-mosh-card__go {
	margin-top: .3rem;
	font-size: .8rem;
	color: var(--hz-green);
}

.hz-mosh-card.is-locked a {
	background: var(--hz-paper-2);
}

.hz-mosh-card.is-locked .hz-mosh-card__go {
	color: var(--hz-ash);
}

.hz-mosh__empty {
	max-width: var(--hz-max);
	margin: 1.4rem auto 0;
	color: var(--hz-ash);
}

/* ------------------------------------------- release from the page shell
   Plain pages render through the هافز shell (template 464), which centres
   their content in a ~750px prose column. The room and the room list are
   full-bleed sections and have to opt out of it. The shell already supplies
   the page gutter, so the section drops its own. */

.hz-prose:has(> .hz-mosh),
.hz-prose:has(> .hz-mosh-list) {
	max-width: none;
	text-align: start;
}

.hz-prose > .hz-mosh,
.hz-prose > .hz-mosh-list {
	/* the shell supplies the page gutter, so the section only needs enough
	   inset that its own type is not flush against the panel edge */
	padding-inline: clamp(1.1rem, 3vw, 2.6rem);
	text-align: start;
}

/* The shell's prose styles indent every list — `.hz-prose ol` (0,1,1) beats a
   bare `.hz-mosh__chain` (0,1,0), so the chain, the scoreboard, the session
   list and the room grid all picked up a 1.4em inset. Element+class ties the
   count and wins on order. */

.hz-prose ol.hz-mosh__chain,
.hz-prose ol.hz-mosh__scores,
.hz-prose ul.hz-mosh__sessions,
.hz-prose ul.hz-mosh-list__grid {
	padding-inline: 0;
	margin-inline: 0;
	list-style: none;
}

/* ---------------------------------------------------------------- video */

.hz-mosh__video {
	max-width: var(--hz-max);
	margin: clamp(1.2rem, 3vw, 2rem) auto 0;
	padding: clamp(1.1rem, 3vw, 1.8rem);
	border: 1px solid var(--hz-line-light);
	border-radius: 14px;
	background: rgba(246, 242, 234, .04);
}

.hz-mosh__videohead {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.hz-mosh__videohead p {
	margin: .4rem 0 0;
	max-width: 52ch;
	font-size: .92rem;
	line-height: 1.9;
	color: rgba(246, 242, 234, .7);
}

.hz-mosh__videobtns {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	align-items: center;
}

/* the Jitsi iframe is injected here and sized by us, not by Jitsi */
.hz-mosh__stage {
	margin-top: 1rem;
	border-radius: 12px;
	overflow: hidden;
	background: #0b1a14;
	aspect-ratio: 16 / 9;
	min-height: 320px;
}

.hz-mosh__stage iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

@media (max-width: 620px) {
	.hz-mosh__stage {
		aspect-ratio: 3 / 4;
		min-height: 380px;
	}
}

.hz-mosh__videomsg {
	margin: .7rem 0 0;
	min-height: 1.3em;
	font-size: .85rem;
	color: rgba(246, 242, 234, .7);
}

.hz-mosh__videomsg.is-bad {
	color: #f0b9a0;
}
