/**/
/* THIS FILE AUTOGENERATED FROM CSS in saito/css-includes/ / */ 
/**/
.saito-alert {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

#saito-alert-shim {
  z-index: 2000;
  background-color: color-mix(in srgb, var(--saito-background) 86%, transparent);
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
}

#saito-alert-box {
  width: 75vw;
  max-width: 70rem;
  transition: all 500ms ease-in-out;
  margin: auto;
  position: relative;
  top: -100%;
  padding: 1.5rem;
  color: var(--saito-popover-foreground);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  /* slightly softer than elevation-2; keep unique alert drop */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

.saito-alert-message {
  font-family: 'visuelt-light', 'Microsoft Yahei', 'Hiragino Sans GB';
  font-size: 2rem;
  text-align: center;
  align-self: center;
  display: block;
  margin: 1rem 0;
  overflow-wrap: break-word;
  line-height: 3rem;
  width: -webkit-fill-available;
}

@media (max-width: 600px) {
  #saito-alert-box {
    width: 95vw;
  }
}
.saito-container {
  width: 100vw;
  height: calc(100% - var(--saito-header-height));
  display: grid;
  grid-template-columns: 25rem 62rem 30rem;
  padding: 0 max(1rem, calc((100vw - var(--saito-width)) / 2));
  column-gap: 2rem;
  z-index: 0;
  margin: 0;
  position: absolute;
  top: var(--saito-header-height);
  overflow-y: auto;
  overflow-x: hidden;
}

.saito-main {
  width: 100%;
  position: relative;
}

.saito-sidebar.left {
  position: sticky;
  height: calc(100dvh - var(--saito-header-height));
  top: 0;
  padding: 1.5rem 1rem 1rem 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: height 0.3s;
}

.saito-sidebar.right {
  padding: 1.5rem 1rem;
  position: relative;
  top: 0;
  min-width: 30rem;
  height: max-content;
  margin-left: 1rem;
}

.saito-sidebar h5 {
  margin: 0;
}

/* Sidebar header + .saito-sidebar-element → saito-sidebar.css */

/* This should be handled module by module...
@media screen and (max-width: 900px) {
  .saito-container {
    padding: 0;
    grid-template-columns: 1fr;
  }

  .saito-main {
    min-width: 0;
    width: 100%;
    max-width: 100vw;
    margin-left: 0rem !important;
    margin-right: 0rem;
  }
}

*/
:root {
  /* CTA component configuration */
  --saito-cta-logo: var(--saito-white);
  --saito-cta-action-background: linear-gradient(90deg, #dd4708, #b93205);
  --saito-cta-action-shadow: 0 0 32px -10px rgba(196, 59, 8, 0.42);
}

/*
 * .saito-cta — canonical CTA splash surface.
 * Owns shared card chrome + desktop splash layout.
 * Modules keep logo masks, artwork, and one-off layout only.
 */
.saito-cta {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  width: min(95vw, 860px);
  max-width: 100%;
  padding: 3.2rem;
  border-radius: calc(var(--saito-radius) + 0.15rem);
  background: var(--saito-card);
  box-shadow: var(--saito-elevation-0);
  border: 1px solid var(--saito-border);
}

.saito-cta :is(.saito-button-primary, .saito-button-secondary) {
  width: 100%;
  height: 4.5rem;
  min-height: 4.5rem;
  margin: 0;
}

.saito-cta .saito-button-row {
  display: flex;
  flex-flow: row nowrap;
  width: 100%;
  gap: 2rem;
}

.saito-cta .saito-button-row > :is(.saito-button-primary, .saito-button-secondary) {
  flex: 1 1 0;
  min-width: 0;
}

body:has(.saito-cta) .pace {
  display: none;
}

.saito-cta-logo {
  color: var(--saito-cta-logo, var(--saito-white, #fff));
}

.saito-cta-logo::after {
  background: currentColor;
}

@media (max-width: 720px) {
  .saito-cta {
    position: fixed;
    inset: 0;
    z-index: 10000;
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    padding: 2.4rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow-y: auto;
    transform: none;
    align-content: safe center;
    justify-content: safe center;
  }

  .saito-cta .saito-button-row {
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    gap: 2rem;
  }

  .saito-cta .saito-button-row > :is(.saito-button-primary, .saito-button-secondary) {
    flex: 0 0 4.5rem;
    width: 100%;
  }
}
/* ----------------------------------------------------------------
 Buttons — bare <button> is reset-only; appearance is opt-in via
 .saito-button-primary / .saito-button-secondary
-----------------------------------------------------------------*/

:root {
  --saito-button-primary-background: var(--saito-primary);
  --saito-button-primary-background-hover: var(--saito-chart-4);
  --saito-button-primary-foreground: var(--saito-primary-foreground);
  --saito-button-secondary-background: var(--saito-secondary);
  --saito-button-secondary-background-hover: var(--saito-accent);
  --saito-button-secondary-foreground: var(--saito-secondary-foreground);
  --saito-button-disabled-background: color-mix(in srgb, var(--saito-secondary) 70%, transparent);
  --saito-button-disabled-foreground: color-mix(in srgb, var(--saito-muted-foreground) 64%, transparent);
}

/* Browser / reset only — no component chrome */
button {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  min-width: 0;
  min-height: 0;
  cursor: pointer;
  text-transform: none;
}

button:disabled,
button.disabled {
  cursor: not-allowed;
}

/* Component chrome — primary & secondary */
.saito-button-primary,
.saito-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    filter 0.16s ease;
  letter-spacing: 0;
  font-family: var(--saito-font);
  font-size: 1.6rem;
  font-weight: 500;
  border-radius: var(--saito-radius);
  cursor: pointer;
  border: 1px solid var(--saito-border);
  padding: 0.75rem 1.2rem;
  margin: var(--saito-space-xs);
  white-space: nowrap;
  width: fit-content;
  min-width: 20rem;
  min-height: 3.6rem;
  max-width: 100%;
}

.saito-button-primary {
  background: var(--saito-button-primary-background);
  color: var(--saito-button-primary-foreground);
}

.saito-button-secondary {
  color: var(--saito-button-secondary-foreground);
  background: var(--saito-button-secondary-background);
  border-color: var(--saito-border);
}

.saito-button-primary:focus-visible,
.saito-button-secondary:focus-visible {
  box-shadow: none;
}

.saito-button-primary.disabled,
.saito-button-primary[disabled] {
  background: var(--saito-button-disabled-background);
  color: var(--saito-button-disabled-foreground);
  filter: none;
  cursor: not-allowed;
}

.saito-button-secondary.disabled,
.saito-button-secondary[disabled] {
  background: var(--saito-button-disabled-background);
  color: var(--saito-button-disabled-foreground);
  filter: none;
  cursor: not-allowed;
}

.saito-button-primary:hover {
  background: var(--saito-button-primary-background-hover);
  color: var(--saito-primary-foreground);
  filter: brightness(1.06);
}

.saito-button-secondary:hover {
  background: var(--saito-button-secondary-background-hover);
  color: var(--saito-foreground);
  filter: brightness(1.25);
}

.saito-button-primary.disabled:hover,
.saito-button-primary[disabled]:hover,
.saito-button-secondary.disabled:hover,
.saito-button-secondary[disabled]:hover {
  background: var(--saito-button-disabled-background);
}

.saito-button-primary.small,
.saito-button-secondary.small {
  padding: 0.45rem 0.75rem;
  font-size: 1.25rem;
  min-width: 3.6rem;
  min-height: 2.8rem;
}

/* Normal height, content-width — tighter horizontal padding only */
.saito-button-primary.compact,
.saito-button-secondary.compact {
  min-width: 0;
  padding-left: 1rem;
  padding-right: 1rem;
}

.saito-button-primary.compact i,
.saito-button-secondary.compact i {
  margin: 0 0.45rem 0 0;
}

.saito-button-secondary.small {
  color: unset;
}

.saito-button-secondary.small:hover {
  background: var(--saito-secondary);
  color: unset;
}

.saito-button-primary.fat,
.saito-button-secondary.fat {
  height: 4.5rem;
  font-size: 2rem;
  min-height: 3rem;
  padding: 0rem 2rem;
}

.saito-button-primary i,
.saito-button-secondary i {
  margin: 0 0.5rem;
}

.saito-button-mouse-over {
  transform-origin: center;
  transition:
    transform 0.16s ease,
    filter 0.16s ease,
    box-shadow 0.16s ease;
  will-change: transform;
}

.saito-button-mouse-over:hover {
  animation: saito-button-mouse-over-pulse 0.9s ease-in-out infinite;
  transform: scale(1.06);
}

@keyframes saito-button-mouse-over-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 color-mix(in srgb, var(--saito-primary) 0%, transparent));
  }

  50% {
    filter: drop-shadow(0 0 0.45rem color-mix(in srgb, var(--saito-primary) 30%, transparent));
  }
}

/*******************************
 Arrange multiple buttons
 *******************************/
.saito-button-row {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  gap: 2rem;
  margin-top: 1rem;
}

.saito-button-row .saito-anchor {
  margin-right: auto;
}

.saito-button-row .saito-button-secondary,
.saito-button-row .saito-button-primary {
  margin: 0;
}

.saito-button-row.auto-size .saito-button-secondary,
.saito-button-row.auto-size .saito-button-primary {
  min-width: unset;
  flex-grow: 1;
  width: 35%;
  height: 100%;
  white-space: break-spaces;
}

/*******************************
 Text buttons
 *******************************/
.saito-anchor {
  cursor: pointer;
  transition: color 0.1s;
}

.saito-anchor span,
span.saito-anchor {
  border-bottom: 1px dotted;
  line-height: 2.5rem;
}

.saito-anchor.clicked {
  color: var(--saito-chart-4);
}

.saito-anchor:hover {
  color: var(--saito-primary);
}

.saito-menu-select-subtle > div,
.saito-menu-select-subtle > li {
  cursor: pointer;
  transition: all 0.2s;
}

.saito-menu-select-subtle > div:not(.disabled-option):hover,
.saito-menu-select-subtle > li:not(.disabled-option):hover {
  background-color: var(--saito-secondary);
  color: var(--saito-foreground);
}

.saito-menu-select-heavy > div,
.saito-menu-select-heavy > li {
  cursor: pointer;
  transition: all 0.2s;
}

.saito-menu-select-heavy > div:not(.disabled-option):hover,
.saito-menu-select-heavy > li:not(.disabled-option):hover {
  background-color: var(--saito-primary);
  color: var(--saito-primary-foreground);
}

.saito-menu-select-heavy > .disabled-option,
.saito-menu-select-subtle > .disabled-option {
  color: var(--saito-gray-600);
  cursor: default;
}

@media (max-width: 600px) {
  .saito-button-secondary {
    min-width: 10rem;
  }

  .saito-button-primary {
    min-width: 12rem;
  }

  .saito-button-row {
    flex-wrap: wrap;
    gap: var(--saito-space-md);
  }

  .saito-button-row .saito-button-secondary,
  .saito-button-row .saito-button-primary {
    min-width: unset;
    flex-grow: 1;
    width: 35%;
  }

  .saito-button-row.mobile-column,
  .saito-button-row.auto-size {
    flex-direction: column;
  }

  .saito-overlay-form > .saito-button-primary[type='button'],
  .saito-overlay-form > .saito-button-secondary[type='button'],
  .saito-button-row > .saito-button-primary[type='button'],
  .saito-button-row > .saito-button-secondary[type='button'] {
    width: 100%;
  }

  .saito-button-row.force-row {
    flex-direction: row;
  }
}


/* Icon-only control — bordered square always visible; hover brightens, never invents the box */
.saito-icon-button {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  min-width: 2.4rem;
  min-height: 2.4rem;
  padding: 0;
  margin: 0;
  background: var(--saito-secondary);
  border: 1px solid var(--saito-border);
  border-radius: var(--saito-radius);
  cursor: pointer;
  color: var(--saito-muted-foreground);
  opacity: 1;
  transition:
    border-color 0.16s ease,
    color 0.16s ease,
    background-color 0.16s ease,
    transform 0.16s ease;
}

.saito-icon-button:hover {
  border-color: var(--saito-border);
  color: var(--saito-foreground);
  background: var(--saito-secondary);
}

.saito-icon-button:active {
  color: var(--saito-foreground);
  transform: scale(0.94);
}

.saito-icon-button:focus-visible {
  box-shadow: none;
  outline: none;
}

.saito-icon-button i {
  margin: 0;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: inherit;
}

/* Compact square icon action — dark translucent fill, white border */
.saito-button-square {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  min-width: 3.6rem;
  min-height: 3.6rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--saito-border);
  border-radius: var(--saito-radius);
  background: #0009;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.9;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    opacity 0.16s ease;
}

.saito-button-square:hover {
  background: #000c;
  border-color: var(--saito-border);
  color: #fff;
  opacity: 1;
}

.saito-button-square:active {
  background: #000000b3;
  opacity: 1;
}

.saito-button-square:focus-visible {
  outline: none;
  box-shadow: none;
}

.saito-button-square i {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  font-size: inherit;
  line-height: 1;
  color: inherit;
}
.league-overlay {
	background: var(--saito-background);
	width: 90vw;
	padding: 2rem 1rem;
	display: flex;
	flex-direction: column;
	grid-gap: 2rem;
	max-height: 95vh;
	max-width: 95rem;
}

.league-overlay > div {
	margin: 0 1rem;
}

.league-overlay-controls {
	display: flex;
	flex-direction: row;
	justify-content: end;
}

.league-overlay-controls i {
	font-size: 2rem;
	border-radius: 0.5rem;
	height: 5rem;
	width: 5rem;
	border: 1px solid;
	line-height: 5rem;
	text-align: center;
	border-color: inherit;
}

.league-overlay-header {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	row-gap: 1.5rem;
	flex-wrap: wrap;
	height: 8rem;
}

.league-overlay-header-title-box {
	flex: 1;
	min-width: fit-content;
}

.league-page-tab {
	width: 9rem;
	height: 9rem;
	cursor: pointer;
	transition: all 0.2s;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem;
	justify-content: space-evenly;
}

.league-page-tab i.notification {
	position: absolute;
	top: 19%;
	left: 43%;
	font-size: 16px;
	color: var(--saito-red);
	width: unset;
	padding: unset;
	margin: unset;
}

.league-overlay .hidden {
	display: none;
}

.empty-game-list {
	font-style: italic;
	padding: 2rem;
	text-align: center;
	opacity: 0.8;
}

.league-page-tab:hover,
.league-page-tab.active-tab {
	border-color: var(--saito-primary);
	color: var(--saito-primary);
}

.league-overlay-header-title-box-title {
	font-size: 4rem;
}

.league-overlay-header-title-box-desc {
	font-size: 2rem;
	text-transform: capitalize;
}

.league-overlay-body {
	display: grid;
	grid-template-columns: minmax(40rem, 3fr) minmax(33rem, 2fr);
	gap: 2rem;
	height: min(45rem, calc(100vh - 160px));
}

.league-error {
	padding: 0rem 1.5rem;
	line-height: 2rem;
}

.league-overlay-content-box {
	border-radius: 0.5rem;
	overflow-y: auto;
	border: 1px solid var(--saito-border);
	flex: 1;
}

.league-overlay-body-content {
	display: flex;
	flex-direction: column;
	overflow: auto;
}

.league-overlay-body.admin-mode .league-overlay-body-content {
	grid-column: span 2;
}

.league-overlay-body.admin-mode .league-overlay-controls {
	display: none;
}

.league-overlay-header-image {
	/* Fallback image, should be inserted by JS*/
	background-image: url(/saito/img/dreamscape.png);
	background-size: cover;
	width: 11rem;
	min-width: 11rem;
	height: 7rem;
	margin-right: 1rem;
}

.league-overlay-description {
	position: relative;
	line-height: 2.3rem;
	padding: 1.5rem;
}

.league-overlay-description i,
#admin_contact i {
	position: absolute;
	top: 0;
	right: 0;
}

.league-overlay-description img {
	max-width: 100%;
	margin: 1rem auto;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	border-radius: var(--saito-radius);
}

#admin_details {
	flex: unset;
	min-height: 7.5rem;
}

span.attention {
	text-decoration: underline dashed 1px;
	cursor: pointer;
}

#admin_contact {
	min-width: 10rem;
	height: fit-content;
	min-height: 2rem;
	position: relative;
}

.league-overlay-league-body-games {
	display: flex;
	flex-direction: column;
	row-gap: 1rem;
	flex-grow: 1;
}

.league_recent_game,
.game-manager .saito-table-header,
.game-manager .saito-table-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-gap: 1rem;
	text-align: center;
}

.league_recent_player {
	max-width: 27rem;
	overflow: hidden;
	display: inline-block;
	white-space: nowrap;
	text-overflow: ellipsis;
	vertical-align: bottom;
}

.league_recent_players_list {
	display: flex;
	flex-direction: row;
	column-gap: 1rem;
	margin: auto;
}

.league_recent_players_list_item {
	display: flex;
	flex-direction: row;
}

.league-overlay-games-list .saito-table {
	overflow-y: scroll;
}

.league_recent_player {
	position: relative;
	overflow: visible;
	width: 3.5rem;
	height: 3.5rem;
}

.league_recent_player.winner::before {
	content: '♕';
	display: inline-block;
	font-style: normal;
	font-variant: normal;
	text-rendering: auto;
	position: absolute;
	top: -1.1rem;
	right: -1rem;
	font-size: 30px;
	font-weight: 900;
	color: var(--saito-red);
	text-shadow: 0 0 3px var(--saito-white);
}

.league_recent_game div {
	align-self: center;
}

.league-overlay-leaderboard {
	position: relative;
	min-width: min(40rem, 100%);
	padding: 0px; /* keeps scrolled content from showing above sticky header */
}

.alert_email,
.alert_identifier {
	position: relative;
	box-shadow: 0px 0px 10px var(--color-contrast) !important;
	cursor: pointer;
}

.alert_email .league-leaderboard,
.alert_identifier .league-leaderboard {
	filter: blur(2px);
	pointer-events: none;
}

.alert_email i,
.alert_identifier i {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: var(--saito-secondary);
	font-size: 6.4rem;
}

.admin-widget .saito-table-header,
.admin-widget .saito-table-row {
	grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
	justify-items: center;
	align-items: center;
}

.admin-widget .saito-table-row > div {
	width: 100%;
	text-align: center;
}

.editable_field {
	border: 1px solid var(--saito-border);
	cursor: text;
}

.contactAdminWarning {
	font-size: 2rem;
	/*min-height: 30rem;*/
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	flex: 4;
}

.contactAdminWarning > * {
	margin: 1rem;
}

.contactAdminWarning > div:first-child {
	font-size: 5rem;
	justify-content: center;
}

.contactAdminWarning i {
	font-size: 5rem;
	color: var(--saito-secondary);
}

.league-page-tab.mobile-only {
	display: none;
}

.explanation {
	padding: 1rem;
	font-style: italic;
}

.league-settings .saitox-table {
	grid-template-columns: 1fr repeat(3, max-content);
}

.league-settings .saitox-table > div {
	justify-content: center;
}

.league-settings .clickable-element:hover {
	color: var(--saito-muted-foreground);
	background: var(--saito-accent);
}

@media screen and (max-width: 900px) {
	.league-overlay-header {
		height: unset;
	}
	.oversize-load {
		font-size: clamp(3rem, 5vw, 4rem);
	}
	.league-overlay-body {
		display: flex;
		flex-direction: column;
		row-gap: 2rem;
		overflow-y: auto;
		margin: 0 !important;
		padding: 1px 1rem;
		height: calc(90vh - 12rem);
	}
	.league-overlay-body > div {
		/*  overflow-y: unset;*/
	}
	.league-overlay-body .league-overlay-controls {
		justify-content: center;
	}

	.league-overlay-content-box {
		max-height: 40vh;
	}
}

@media screen and (max-width: 600px) {
	.oversize-load {
		font-size: clamp(3rem, 10vw, 4rem);
	}
	.league-page-tab.mobile-only {
		display: flex;
	}
	.mobile-hide {
		display: none;
	}
	.mobile-hide.hidden {
		display: unset;
	}
	.league-overlay > div {
		margin: 0;
	}
	.league-overlay {
		width: 100vw;
		max-height: 95svh;
	}
	.contactAdminWarning {
		min-height: 0;
	}
	.league-overlay-body {
		height: calc(90vh - 20rem);
		flex-direction: column-reverse;
		row-gap: 0;
	}
	.league-overlay-controls {
		justify-content: center;
		max-width: 100%;
	}
	.league-overlay-leaderboard {
		min-height: calc(100% - 8rem);
	}

	.league-overlay-header {
		flex-direction: column;
		position: relative;
	}

	.league-overlay-content-box {
		max-height: unset;
	}

	.league-overlay-body-content {
		flex: 1;
	}
	/*.league-overlay-body-content .saito-button-row {
		margin: unset;
	}*/

	.league-overlay-header-image {
		margin: 0;
		width: 100%;
		background-position: center center;
		height: 10rem;
	}
	.league-overlay-header-title-box {
		position: absolute;
		left: 1rem;
		top: 1.4rem;
		text-shadow:
			1px 1px 2px var(--saito-background),
			-1px -1px 2px var(--saito-background),
			1px -1px 2px var(--saito-background),
			-1px 1px 2px var(--saito-background);
		/* testing, haven t seen any of this */
	}
}

.ranking-overlay {
	max-width: 95vw;
	width: 450px;
	padding: 3rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	font-size: 1.8rem;
	border: 1px solid var(--saito-border);
}
:root {
  /* ============================================================
     Saito design tokens — canonical public API (--saito-*)
     ============================================================ */


  /* ------------------------------------------------------------
     Palette primitives
     ------------------------------------------------------------ */
  --saito-white: #fff;
  --saito-black: #000;
  --saito-gray-200: #c9c9c9;
  --saito-gray-600: #5d5d5d;
  --saito-gray-850: #1a1a1a;
  --saito-gray-900: #0c0c0c;
  --saito-red: #f71f3d;
  --saito-red-dark: #e8001e;
  --saito-green: #3df71f;
  --saito-yellow-light: #e9ce93;


  /* ------------------------------------------------------------
     Core semantic tokens
     ------------------------------------------------------------ */
  --saito-background: #090a09;
  --saito-foreground: #f3f0ea;

  --saito-card: #171817;
  --saito-popover: #191a19;
  --saito-popover-foreground: #f3f0ea;

  --saito-primary: #f54900;
  --saito-primary-foreground: #fff8f2;

  --saito-secondary: #202120;
  --saito-secondary-foreground: #f3f0ea;

  --saito-muted: #20201f;
  --saito-muted-foreground: #9e9990;

  --saito-accent: #282824;
  --saito-accent-foreground: #f3f0ea;

  --saito-destructive: #e0524d;

  --saito-border: #45423e;
  --saito-ring: #8f8174;

  --saito-radius: 0.45rem;

  --saito-chart-1: #ffad66;
  --saito-chart-2: #ff6500;
  --saito-chart-4: #b93205;


  /* ------------------------------------------------------------
     Derived semantic tokens
     ------------------------------------------------------------ */
  --saito-highlight: color-mix(in srgb, var(--saito-foreground) 8%, transparent);

  --saito-focus-ring: 0 0 0 2px color-mix(in srgb, var(--saito-ring) 50%, transparent);

  --saito-overlay-backdrop: color-mix(in srgb, var(--saito-background) 72%, transparent);
  --saito-overlay-backdrop-stacked: color-mix(in srgb, var(--saito-background) 58%, transparent);

  --saito-elevation-0: none;
  --saito-elevation-1: 0 1px 2px color-mix(in srgb, var(--saito-black) 28%, transparent);
  --saito-elevation-2: 0 8px 18px color-mix(in srgb, var(--saito-black) 28%, transparent);
  --saito-elevation-3: 0 14px 34px color-mix(in srgb, var(--saito-black) 38%, transparent);

  --saito-status-success: #10b981;

  --saito-notification-background: var(--saito-chart-2);
  --saito-notification-foreground: var(--saito-primary-foreground);
  --saito-notification-online-background: var(--saito-status-success);
  --saito-notification-busy-background: var(--saito-muted-foreground);


  /* ------------------------------------------------------------
     Decorative tokens
     ------------------------------------------------------------ */
  --saito-card-wash: linear-gradient(135deg, #191a19, #151615);
  --saito-popover-wash:
    linear-gradient(
      145deg,
      #1d1e1d 0%,
      color-mix(in srgb, var(--saito-popover) 96%, var(--saito-primary) 1%) 52%,
      var(--saito-card) 100%
    );
  --saito-canvas-wash:
    radial-gradient(
      70vw 50vw at 50% 8%,
      color-mix(in srgb, var(--saito-primary) 14%, transparent),
      transparent 62%
    ),
    radial-gradient(
      45vw 35vw at 47% 46%,
      color-mix(in srgb, var(--saito-chart-1) 8%, transparent),
      transparent 68%
    ),
    var(--saito-background);

  --dreamscape:
    linear-gradient(125deg, #e8001e 30%, #0001 55%, #ff8235 80%),
    linear-gradient(40deg, #f7009b 15%, #f71f3d 25%, #f71f3d 65%, #e98eaf 75%, #0000),
    linear-gradient(180deg, #e9ce93, #f71f3d);


  /* ------------------------------------------------------------
     Layout, type, radius scale, spacing
     ------------------------------------------------------------ */
  --saito-width: 1200px;
  --saito-header-height: 7rem;

  --saito-font: 'visuelt-light', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --saito-font-medium: 'visuelt-regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --saito-font-heavy: 'visuelt-medium', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --saito-font-monospace: 'SF Mono', 'Fira Code', ui-monospace, monospace;

  --font-size-large: 2rem;
  --font-size-medium: 1.5rem;
  --font-size-tiny: 1.3rem;

  --saito-radius-sm: 0.35rem;
  --saito-radius-lg: 0.7rem;
  --saito-radius-full: 999px;

  --saito-space-xs: 0.5rem;
  --saito-space-sm: 0.75rem;
  --saito-space-md: 1rem;
  --saito-space-lg: 1.6rem;
  --saito-space-xl: 2rem;
  --saito-space-xxl: 3rem;

  --border-padding-normal: 1rem;
  --border-padding-wide: 2rem;
}
/* Shared notification-dot positioning (design system) */

.saito-user:hover .saito-notification-dot {
  background-color: var(--saito-background);
  color: var(--saito-foreground);
}

.hamburger-container .saito-notification-dot {
  bottom: unset;
  top: -20%;
  left: unset;
  right: -10%;
}

/* Chat notification badges — left in shared bundle; chat ownership out of scope for this pass */
.saito-chat-notifications {
  position: absolute;
  width: 20%;
  height: 100%;
  display: flex;
  right: 0.5rem;
  top: 0;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
}

.saito-chat-notifications .saito-notification-dot {
  position: relative;
  bottom: unset;
  left: unset;
  height: 3rem;
  min-width: 3rem;
}
/* Saito floating menu — owned by saito-floating-menu component */
:root {
  --saito-floating-action-background: var(--saito-chart-2);
  --saito-floating-action-foreground: var(--saito-primary-foreground);
  --saito-floating-action-shadow: var(--saito-elevation-2);
  --saito-floating-menu-background: var(--saito-popover);
  --saito-floating-menu-border: var(--saito-border);
}

.saito-floating-plus-btn {
  margin: auto;
  width: 4.6rem;
  height: 4.6rem;
  transition: transform 200ms ease-out;
  background-color: var(--saito-floating-action-background);
  border-radius: 50%;
  position: relative;
  z-index: 2;
  cursor: pointer;
  display: none;
  justify-content: center;
  align-items: center;
  filter: drop-shadow(var(--saito-floating-action-shadow));
}

.activated .saito-floating-plus-btn {
  transform: rotate(45deg);
}

.saito-floating-plus-btn i {
  font-size: 2.5rem;
  color: var(--saito-floating-action-foreground);
  width: 2.5rem;
  height: 2.5rem;
  text-align: center;
}

.saito-floating-menu-item {
  position: relative;
  width: 4.1rem;
  height: 4.1rem;
  border-radius: 50%;
  background-color: var(--saito-floating-menu-background);
  transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid var(--saito-floating-menu-border);
  color: var(--saito-foreground);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.saito-floating-menu-item i {
  font-size: 2rem;
}

.saito-floating-menu-mask {
  width: 100%;
  height: 100%;
  background: var(--saito-floating-menu-background);
  position: absolute;
  opacity: 0;
  transition: all 0.3s linear;
}

.activated .saito-floating-menu-mask {
  width: 100vw;
  height: 100vh;
  opacity: 0.8;
  bottom: -2.5rem;
  right: -2.5rem;
}

.saito-floating-menu {
  display: inline-block;
  height: max-content;
  display: block;
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  z-index: 3;
}

.saito-floating-item-container {
  display: flex;
  pointer-events: none;
  transition: all 500ms linear;
  position: absolute;
  height: fit-content;
  width: fit-content;
  bottom: 0;
  right: 0;
  opacity: 0;
  gap: 2rem;
  align-items: center;
  z-index: 2;
}

.saito-floating-item-container.main {
  flex-direction: column;
  /*height: 0;*/
  bottom: 6.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.saito-floating-item-container.alt {
  flex-direction: row;
  /*width: 0;*/
  right: 6.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.activated .saito-floating-item-container {
  opacity: 1;
  pointer-events: auto;
}

@media screen and (max-width: 620px) {
  .saito-floating-plus-btn {
    display: flex;
  }
}
/* ----------------------------------------------------------------
Saito Table
-----------------------------------------------------------------*/
:root {
  --saitox-column-ct: 5;
}

.saito-table-body {
  font-size: 1.5rem;
  display: grid;
  grid-template-columns: auto;
  grid-gap: var(--saito-space-sm);
  width: 100%;
  position: relative;
  border-radius: 0.1rem;
  max-height: 100%;
  height: fit-content;
  position: relative;
  overflow-y: auto;
  min-height: 2rem;
}

.saito-table-row {
  display: grid;
  grid-template-columns: 1fr min-content;
  grid-gap: var(--saito-space-xs);
  padding: 0.6rem var(--saito-space-md) var(--saito-space-xs);
  background: transparent;
  border-radius: var(--saito-radius-sm);
  border-color: var(--saito-border);
}

.saito-table-row:hover {
  background: color-mix(in srgb, var(--saito-muted) 78%, transparent);
}

.saito-table-rank {
  font-family: courier, monospace;
  font-size: 1.5rem;
  display: flex;
  gap: var(--saito-space-xs);
  align-items: baseline;
  justify-content: space-around;
}

.saito-table-header {
  display: grid;
  grid-gap: var(--saito-space-xs);
  padding: 0.6rem var(--saito-space-md) var(--saito-space-xs);
  width: 100%;
  text-align: center;
  text-transform: none;
  font-size: inherit;
  letter-spacing: 0;
  color: var(--saito-muted-foreground);
  background: transparent;
  border-radius: var(--saito-radius-sm);
}

.saitox-table {
  display: grid;
  grid-template-rows: repeat(auto-fill, minmax(3rem, 1fr));
  grid-template-columns: repeat(var(--saitox-column-ct), minmax(max-content, 1fr));

  font-size: 1.5rem;
  width: 100%;
  position: relative;
  border-radius: var(--saito-radius);
  max-height: 100%;
  height: fit-content;
  position: relative;
  overflow-y: auto;
  min-height: 2rem;
  align-items: center;
}

.saitox-table > div {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Right Justify */
  padding: 0 0.5rem;
  border-bottom: 1px solid var(--saito-border);
  min-height: 3rem;
}

.saitox-header-item {
  text-align: center;
  text-transform: none;
  font-size: inherit;
  letter-spacing: 0;
  color: var(--saito-muted-foreground);
  background: transparent;
  font-family: var(--saito-font-medium);
}

.saitox-table-break {
  grid-column: span var(--saitox-column-ct);
  width: 100%;
  justify-content: flex-start !important;
  font-style: italic;
}

.saito-menu ul {
  padding: 0;
  list-style-type: none;
}

.saito-menu li {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  list-style: none;
  cursor: pointer;
  transition: all 0.2s;
  align-items: center;
  font-size: 1.92rem;
  position: relative;
  border-radius: var(--saito-radius);
}

.saito-menu li:active {
  /* newly added state, for use in Sangre3000 -only so far */
  background: var(--saito-accent);
}

.saito-menu li:hover p {
  background-color: var(--saito-accent);
  color: var(--saito-accent-foreground);
}

.saito-menu li > i {
  font-size: 2.6rem;
  width: 2rem;
  padding-left: 1.2rem;
  margin-bottom: 0.4rem;
}

.saito-menu .saito-menu-item-label {
  font-size: 1.92rem;
  margin-right: 1rem;
}

/* saito header menu */

.saito-header-menu-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 1rem 1.5rem;
}

.saito-header-menu-section .saito-menu ul {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: 1.5rem;
  row-gap: 2rem;
  margin: 0;
}

.saito-header-menu-section .empty-menu-section {
  display: none;
}

.empty-menu-section + hr {
  display: none;
}

.saito-header-menu-section hr {
  margin: 0;
  border-style: dashed;
}

.saito-header-menu-section .saito-header-appspace-option {
  display: flex;
  text-align: center;
}
.saito-header-menu-section .saito-header-appspace-option > i {
  padding: 0;
  width: unset !important;
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
}

.saito-header-menu-section .saito-module-menu-icon-wrap {
  position: relative;
  display: block;
  width: 3.2rem;
  height: 3.2rem;
  margin-bottom: 0.75rem;
  pointer-events: none;
}

.saito-header-menu-section .saito-module-menu-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.16s ease;
}

.saito-header-menu-section .saito-module-menu-icon-solid {
  opacity: 0;
}

.saito-header-menu-section .saito-header-appspace-option:hover .saito-module-menu-icon-outline {
  opacity: 0;
}

.saito-header-menu-section .saito-header-appspace-option:hover .saito-module-menu-icon-solid {
  opacity: 1;
}

.saito-header-menu-section .saito-header-appspace-option > i.navigation-symbol {
  font-size: 1.4rem;
  margin-left: 5px;
}

.saito-header-menu-section .saito-menu-item-label {
  margin: 0;
  text-overflow: ellipsis;
  max-width: 10rem;
  overflow: hidden;
  white-space: pre-wrap;
  padding: 0.5rem;
  font-size: 1.33rem;
}

/*
.saito-menu li > i + .saito-menu-item-label {
  margin-left: 3.8rem;
}
*/
.saito-menu i::before {
  -webkit-text-stroke-color: var(--saito-muted-foreground);
  -webkit-text-stroke-width: 1px;
  color: transparent;
}

.saito-menu li:hover i::before {
  -webkit-text-stroke-color: var(--saito-foreground);
  color: var(--saito-foreground);
}

.utilities-menu li:hover i::before {
  -webkit-text-stroke-color: var(--saito-primary-foreground);
  color: transparent;
}

@media screen and (max-width: 620px) {
  .saito-header-menu-section .saito-menu ul {
    column-gap: 1rem;
    padding: 0 0.5rem;
  }

  .saito-header-menu-section .saito-header-appspace-option {
    padding: 0.5rem;
  }

  .saito-header-menu-section .saito-header-appspace-option > i {
    font-size: 2.25rem;
    margin-bottom: 0.25rem;
  }

  .saito-header-menu-section .saito-module-menu-icon-wrap {
    width: 2.8rem;
    height: 2.8rem;
    margin-bottom: 0.25rem;
  }
}

/*
  Desktop chrome compensation for the 12px root.
  Same gate as saito-header.css: mobile/game keep 10px root + base rem.
*/
@media screen and (min-width: 769px) {
  html:not(.game) .saito-header-menu-section {
    gap: calc(1.5rem * 10 / 12);
    padding: 0 calc(1rem * 10 / 12) calc(1.5rem * 10 / 12);
  }

  html:not(.game) .saito-header-menu-section .saito-menu li {
    padding: calc(1rem * 10 / 12);
  }

  html:not(.game) .saito-header-menu-section .saito-menu ul {
    column-gap: calc(1.5rem * 10 / 12);
    row-gap: calc(2rem * 10 / 12);
  }

  html:not(.game) .saito-header-menu-section hr {
    margin: 0;
  }

  html:not(.game) .saito-header-menu-section .saito-header-appspace-option > i {
    font-size: calc(2.75rem * 10 / 12);
    margin-bottom: calc(0.75rem * 10 / 12);
  }

  html:not(.game) .saito-header-menu-section .saito-module-menu-icon-wrap {
    width: calc(3.2rem * 10 / 12);
    height: calc(3.2rem * 10 / 12);
    margin-bottom: calc(0.75rem * 10 / 12);
  }

  html:not(.game) .saito-header-menu-section .saito-header-appspace-option > i.navigation-symbol {
    font-size: calc(1.4rem * 10 / 12);
  }

  html:not(.game) .saito-header-menu-section .saito-menu-item-label {
    max-width: calc(10rem * 10 / 12);
    padding: calc(0.5rem * 10 / 12);
    font-size: calc(1.33rem * 10 / 12);
  }
}
/*  alert  */
.saito-notification-dot {
  min-width: 2rem;
  min-height: 2rem;
  padding: 1px 3px;
  border-radius: 0.5rem;
  background-color: var(--saito-notification-background);
  color: var(--saito-notification-foreground);
  position: absolute;
  left: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  line-height: 1.8rem;
  z-index: 2;
}
.saito-header-appspace-option .saito-notification-dot {
  left: 60%;
  bottom: unset;
  top: 5%;
}
.online-status-indicator:after {
  position: absolute;
  display: none;
  content: "";
  border-radius: 100%;
  width: 1.5rem;
  height: 1.5rem;
  background-color: var(--saito-notification-online-background);
}
.online .online-status-indicator:after {
  display: block;
  top: 3.9rem;
  left: 3.75rem;
  border: 2px solid var(--saito-background);
}
.online-status-indicator i {
  display: none;
  position: absolute;
}
.busy .online-status-indicator:after {
  background-color: var(--saito-notification-busy-background);
}
/* Shared schedule wizard + calendar event-link — layout shell only.
   Inputs/selects/textareas inherit saito-form-elements. */

.saito-schedule-wizard {
  display: flex;
  flex-direction: column;
  gap: var(--saito-space-md);
  width: min(550px, 98vw);
  padding: var(--saito-space-xl) var(--saito-space-xxl);
  box-sizing: border-box;
  color: var(--saito-foreground);
}

.saito-schedule-wizard h2 {
  margin: 0;
  font-size: 2rem;
}

.saito-calendar-event-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--saito-space-md);
  padding: var(--saito-space-xl) var(--saito-space-lg);
  box-sizing: border-box;
}

.saito-calendar-event-link-body {
  width: min(550px, 98vw);
  padding: var(--saito-space-xxl);
  box-sizing: border-box;
  border-radius: var(--saito-radius);
  border: 1px solid var(--saito-border);
}

.saito-calendar-event-link-body h2 {
  margin: 0 0 var(--saito-space-lg);
}

.call-details {
  margin-bottom: var(--saito-space-lg);
}

.call-details p {
  margin: var(--saito-space-sm) 0;
}

@media screen and (max-width: 600px) {
  .saito-schedule-wizard,
  .saito-calendar-event-link-body {
    width: 100%;
    padding: var(--saito-space-lg);
  }
}
.gif-icon svg {
  max-width: 2.8rem;
  max-height: 2.8rem;
  fill: var(--saito-primary);
}

.gif-icon:hover svg {
  fill: var(--saito-white);
}

.resize-icon {
  position: absolute;
  left: -0.3rem;
  top: -0.4rem;
  width: 0.8rem;
  height: 1.3rem;
  cursor: nw-resize;
  transform: rotate(45deg);
  border-right: 1px solid var(--saito-border);
  z-index: 20;
}

.resize-icon::after {
  content: '';
  cursor: nw-resize;
  border-right: 1px solid var(--saito-border);
  z-index: 21;
  position: absolute;
  top: -0.7rem;
  width: 0.1rem;
  height: 2.5rem;
  padding: 0.6rem;
}

.resize-icon::before {
  content: '';
  cursor: nw-resize;
  z-index: 21;
  position: absolute;
  top: -0.8rem;
  left: 0.6rem;
  height: 3rem;
  padding: 0.75rem;
}

.resize-icon.horizontal {
  right: 0rem;
  top: 50%;
  left: auto;
  transform: translate(50%, -50%) rotate(0deg);
  background-color: var(--saito-border);
  width: 1.2rem;
  height: 5rem;
  z-index: 2;
  cursor: ew-resize;
  border-radius: 0.25rem;
}

.resize-icon.horizontal:before {
  content: '';
  position: absolute;
  right: 7px;
  left: 15%;
  top: 45%;
  transform: rotate(90deg);
  font-size: 1.5rem;
  color: white;
  z-index: 21;
  height: 0rem;
  padding: 0.3rem;
  border-right: 2px solid var(--saito-white);
  cursor: ew-resize;
}

.resize-icon.horizontal:after {
  content: '';
  position: absolute;
  right: 0px;
  top: 35%;
  left: 22%;
  transform: rotate(90deg);
  font-size: 1.5rem;
  z-index: 21;
  height: 0rem;
  padding: 0.3rem;
  border-right: 2px solid var(--saito-white);
  cursor: ew-resize;
}

@media screen and (max-width: 660px) {
  .gif-icon svg {
    height: 2.6rem;
    width: 2.6rem;
  }
}
/* ----------------------------------------------------------------
 * Scrollbars, text selection, and native form controls for the dark theme.
 * Chrome needs explicit option colors and color-scheme metadata.
 *----------------------------------------------------------------*/

html {
  scrollbar-width: thin;
  scrollbar-color: var(--saito-border) var(--saito-background);
  color-scheme: dark;
}

html select option {
  background-color: var(--saito-background);
  color: var(--saito-foreground);
}

html ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html ::-webkit-scrollbar-track {
  background: var(--saito-background);
}

html ::-webkit-scrollbar-thumb {
  background: var(--saito-border);
  border-radius: 4px;
}

html ::-webkit-scrollbar-thumb:hover {
  background: var(--saito-primary);
}

html ::selection {
  background: var(--saito-primary);
  color: var(--saito-primary-foreground);
}
/*
 * Shared sidebar presentation components.
 *
 * Official roots:
 *   .saito-sidebar-header  — section title row for embedded panels
 *   .saito-sidebar-element — bordered body surface
 *
 * Header contract:
 *   .title            — always present (text)
 *   .actions          — optional; zero or more controls / decorative icons
 *
 * Legacy class names remain as aliases so unmigrated markup keeps working.
 */

/* ----------------------------------------------------------------
   Header
----------------------------------------------------------------- */

.saito-sidebar-header,
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--saito-space-sm);
  width: 100%;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  font-size: 2rem;
  font-family: var(--saito-font);
  color: var(--saito-foreground);
  text-transform: uppercase;
}

.saito-sidebar-header > *,
.sidebar-header > * {
  width: fit-content;
  cursor: pointer;
}

/* Title — left-aligned text */
.saito-sidebar-header .title,
.saito-sidebar-header .sidebar-title,
.sidebar-header .title,
.sidebar-header .sidebar-title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
}

/* Actions — right-aligned controls (Chat ellipsis, Leaderboard icon, …) */
.saito-sidebar-header .actions,
.sidebar-header .actions {
  display: flex;
  align-items: center;
  gap: var(--saito-space-xs);
  flex-shrink: 0;
  cursor: default;
}

/*
 * Full-bleed mobile hosts (e.g. RedSquare Chat) have no rail padding.
 * Match #saito-header mobile inset (1rem @ ≤620px) so title ↔ logo,
 * actions ↔ hamburger share one horizontal grid.
 */
@media (max-width: 600px) {
  .saito-sidebar-header,
  .sidebar-header {
    padding-inline: 1rem;
  }
}

/* ----------------------------------------------------------------
   Body surface
----------------------------------------------------------------- */

.saito-sidebar-element {
  padding: var(--border-padding-normal);
  border: 1px solid var(--saito-border);
  border-radius: var(--saito-radius);
  background: var(--saito-card-wash);
}
/* ----------------------------------------------------------------
 Saito Base: CSS default settings, layouts
-----------------------------------------------------------------*/

/* @custom-media --breakpoint-xl (max-width: 1920px);
@custom-media --breakpoint-lg (max-width: 1280px);
@custom-media --breakpoint-md (max-width: 768px);
@custom-media --breakpoint-md (max-width: 590px);
@custom-media --breakpoint-sm (max-width: 375px); */

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

:root {
  font-size: 12px;
}

body {
  line-height: 1.2;
  color: var(--saito-foreground);
  font-family: var(--saito-font);
  margin: 0;
  font-size: 1.6rem;
  font-weight: 400;
  position: fixed; /* why relative? */
  height: 100dvh;
  width: 100vw;
  max-height: -webkit-fill-available;
  max-width: -webkit-fill-available;
  overflow: hidden;
  background: var(--saito-canvas-wash);
  background-attachment: fixed;
  background-size: cover;
  transition: height 0.3s;
}

/* ----------------------------------------------------------------
 Link
-----------------------------------------------------------------*/

a {
  text-decoration: none;
  cursor: pointer;
  color: var(--saito-primary);
}

a:hover {
  color: var(--saito-primary);
  opacity: 0.8;
}

.saito-text-link, a.saito-text-link {
  font-weight: inherit;
  cursor: pointer;
  color: var(--saito-muted-foreground);
  text-decoration: underline dashed;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.15em;
  opacity: 1;
}

.saito-text-link:hover, a.saito-text-link:hover {
  color: var(--saito-foreground);
  opacity: 1;
}

/* ----------------------------------------------------------------
  Headings
-----------------------------------------------------------------*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: normal;
  margin-bottom: 1rem;
  font-family: var(--saito-font);
  line-height: 1.2em; /* make sure relative to the different sizes! */
  cursor: default; /* We don't want the text cursor on headers */
}

h1 {
  font-size: 5rem;
}

h2 {
  font-size: 4.5rem;
}

h3 {
  font-size: 4rem;
}

h4 {
  font-size: 3.5rem;
}

h5 {
  font-size: 2.5rem;
}

h6 {
  font-size: 2rem;
}

iframe {
  border: none;
}

/* ----------------------------------------------------------------
 Paragraph
-----------------------------------------------------------------*/

p.large {
  font-size: var(--font-size-large);
  font-weight: bold;
}

p,
p.middle {
  font-size: var(--font-size-medium);
  text-indent: 0;
}

p::-webkit-scrollbar {
  display: none;
}

p.small {
  font-size: var(--font-size-tiny);
}

li p {
  text-indent: 0;
  display: inline;
}

blockquote {
  border-color: var(--saito-primary);
  border-width: 0 0 0 2px;
  border-style: solid;
  padding: 0 0 0 0.5rem;
}

/* ----------------------------------------------------------------
QR Code
-----------------------------------------------------------------*/

@media screen and (max-width: 600px) {
}

/* ----------------------------------------------------------------
Password Font
-----------------------------------------------------------------*/

.saito-password {
  font-family: 'p-word';
}

/* ----------------------------------------------------------------
Divider
-----------------------------------------------------------------*/

hr {
  color: var(--saito-muted-foreground);
  border-color: var(--saito-border);
  margin: 2.5rem;
}


/*-----------------------------------------------------------------
Scrollbars
-----------------------------------------------------------------*/

::-webkit-scrollbar {
  width: 0.6rem;
}

::-webkit-scrollbar-track {
  background: transparent;
  /*
  background: linear-gradient(
    90deg,
    transparent 0 45%,
    var(--saito-border) 45% 55%,
    transparent 55% 100%
  );
  */
}

::-webkit-scrollbar-thumb {
  background-color: var(--saito-primary);
  border-radius: 1rem;
}

/* utils */

.left-align {
  text-align: left;
  justify-content: flex-start !important;
}

.center-align {
  text-align: center;
  justify-content: center;
  align-items: center !important;
}

.right-align {
  text-align: right;
  justify-content: flex-end;
}

.clickable-element {
  cursor: pointer;
}

.saito-deemphasize {
  opacity: 0.66;
}

.saito-address {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: inline-block /*!important*/;
  min-width: 0px;
  width: auto;
  /* Why did that need to be less than 100%?? */
  max-width: 100%;
  cursor: pointer;
}

.tip:hover .tiptext {
  visibility: visible;
}

.tiptext {
  visibility: hidden;
  position: absolute;
  box-sizing: content-box !important;
  z-index: 10;
  width: 90%;
  min-width: 300px;
  max-width: 750px;
  padding: 1em;
  border-left: 2px solid var(--saito-primary);
  font-style: italic;
  font-size: smaller;
  border-radius: 0 0.5rem 0.5rem 0;
  line-height: 2rem;
}

.hidden,
.hideme {
  display: none;
}

#site-message-wrapper {
  border: 2px solid var(--saito-primary);
  min-width: 500px;
  max-width: 100vw;
  padding: 3rem;
  font-size: var(--font-size-large);
  background: var(--saito-primary);
  color: var(--saito-primary-foreground);
  position: fixed;
  bottom: min(5rem, 10vh);
  left: min(5rem, 5vw);
  z-index: 200;
  border-radius: var(--saito-radius);
  user-select: none;
  cursor: default;
  transition: all 0.5s;
}

#site-message-wrapper.fade-out {
  filter: opacity(0);
}

#site-message-wrapper.message-clickable {
  cursor: pointer;
}

/* ----------------------------------------------------------------
 Scrollbars 
----------------------------------------------------------------- */

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.hide-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
  overflow-y: auto;
  overflow-x: auto;
}

/* ----------------------------------------------------------------
Font family
-----------------------------------------------------------------*/
.monospace {
  font-family: monospace;
}

/* ----------------------------------------------------------------
Media Queries
-----------------------------------------------------------------*/

@media screen and (max-width: 768px) {

  :root {
    font-size: 10px;
  }    
  body {
    font-size: 1.45rem;
  }
  h1 {
    font-size: 4rem;
  }
  h2 {
    font-size: 3.5rem;
  }
  h3 {
    font-size: 3rem;
  }
  h4 {
    font-size: 2.5rem;
  }
  h5 {
    font-size: 2rem;
  }
  h6 {
    font-size: 1.5rem;
  }
  p.large {
    font-size: 1.8rem;
  }
  p,
  p.middle {
    font-size: 1.4rem;
  }
  p.small {
    font-size: 1.1rem;
  }
  #site-message-wrapper {
    width: 100vw;
    min-width: unset;
    padding: 2rem;
    bottom: 0;
    left: 0;
  }
}

@media screen and (max-width: 375px) {
  body {
    font-size: 1.4rem;
  }
}

/* Focus chrome for opted-in form components only */
:where(
  input.saito-input,
  textarea.saito-textarea,
  select.saito-form-select,
  .saito-form-control
):is(:focus, :focus-visible) {
  outline: none !important;
  border-color: var(--saito-border) !important;
  box-shadow: none !important;
}

:where(button, .saito-button-primary, .saito-button-secondary):is(:focus, :focus-visible) {
  outline: none !important;
}

:where([contenteditable='true'], .saito-input .text-input):is(:focus, :focus-visible, :focus-within) {
  outline: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

:where(.saito-input-contact):is(:focus, :focus-visible) {
  background-color: transparent !important;
}
/* NFT overlay / card UI — owned by lib/saito/ui/saito-nft */
:root {
  --saito-status-code-foreground: #10b981;
  --saito-status-code-background: var(--saito-background);
  --saito-control-ring-shadow: 0 0 0 2px var(--saito-background);
  --saito-nft-footer-height: 5.6rem;
}

/* ============================================
   NFT OVERLAY CONTAINER
   ============================================ */
.saito-nft-overlay-container {
  width: min(90vw, 900px);
  height: 750px;
  max-height: 90vh;
  display: grid;
  grid-template-rows: min-content 1fr;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

/* ============================================
   HEADER
   ============================================ */
.saito-nft-overlay.header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--saito-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.saito-nft-header-left {
  display: grid;
  grid-template-columns: min-content minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  /* Leave room for the Saito overlay close control */
  padding-right: 4.8rem;
}

.saito-nft-header-left .saito-identicon-box {
  height: 4.5rem;
  width: 4.5rem;
}

.saito-nft-header-title {
  margin: 0;
  font-weight: bolder;
  font-size: 2rem;
  margin-bottom: 2px;
}

.saito-nft-header-sub {
  font-size: 1.7rem;
  color: var(--saito-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   PANELS WRAPPER
   ============================================ */
.saito-nft-overlay.panels {
  flex: 1;
  position: relative;
  min-height: 200px;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.saito-nft-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 100%;
  transition: transform 0.35s ease;
  background: var(--saito-background);
}

.saito-nft-panel-view {
  transform: translateX(0);
}

/* Hidden panels (right side) */
.saito-nft-panel-send,
.saito-nft-panel-info {
  transform: translateX(100%);
}

/* Slide animations */
.saito-nft-overlay.panels.saito-nft-mode-send .saito-nft-panel-view,
.saito-nft-overlay.panels.saito-nft-mode-info .saito-nft-panel-view {
  transform: translateX(-100%);
}

.saito-nft-overlay.panels.saito-nft-mode-send .saito-nft-panel-send,
.saito-nft-overlay.panels.saito-nft-mode-info .saito-nft-panel-info {
  transform: translateX(0);
}

/* Panel layout */
.saito-nft-panel-view,
.saito-nft-panel-send {
  display: grid;
  grid-template-rows: 1fr min-content;
  max-height: 100%;
}

.saito-nft-panel-info {
  display: grid;
  grid-template-rows: 1fr min-content;
  max-height: 100%;
}

.saito-nft-panel-body {
  display: grid;
  grid-template-rows: max-content min-content 1fr;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

/* Panel body padding */
.saito-nft-panel-send .saito-nft-panel-body {
  padding: 2rem;
  gap: 2rem;
}

.saito-nft-panel-info .saito-nft-panel-body {
  padding: 1.8rem 2rem 1.6rem;
  overflow-y: auto;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  position: relative;
  transition: opacity 0.3s ease-in-out;
}

/* Fade out panel body content when overlay is active */
.saito-nft-panel-info.split-overlay-panel-active
  .saito-nft-panel-body
  > *:not(.saito-nft-split-overlay) {
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.saito-nft-panel-view .saito-nft-panel-body {
  display: grid;
  grid-template-rows: 1fr min-content;
  max-height: 100%;
}

/* ============================================
   NFT INFO — object inspector
   ============================================ */
.nft-info-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.nft-info-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--saito-border) 85%, transparent);
}

.nft-info-row:first-child {
  padding-top: 0.2rem;
}

.nft-info-row:last-child {
  border-bottom: none;
  padding-bottom: 0.2rem;
}

.nft-info-label {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: var(--saito-muted-foreground);
}

.nft-info-value {
  margin: 0;
  max-width: min(100%, 52ch);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--saito-green);
}

.nft-info-value-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.nft-info-value-prose {
  max-width: 100%;
  font-family: inherit;
  font-weight: 400;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
  color: color-mix(in srgb, var(--saito-green) 82%, var(--saito-foreground));
}

/* ============================================
   CREATE NFT OVERLAY
   Canonical Saito shell; module owns workflow layout only.
   ============================================ */
.saito-nft-create {
  display: flex;
  flex-direction: column;
  gap: var(--saito-space-lg);
  padding: var(--saito-space-xl);
  width: min(60rem, 95vw);
  min-width: min(60rem, 95vw);
  box-sizing: border-box;
}

.saito-nft-create > .saito-overlay-form-header {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  justify-content: flex-start;
  padding-right: 1.6rem;
}

.saito-nft-create .body {
  position: relative;
  display: grid;
  grid-template-areas: 'panel';
  width: 100%;
  overflow: hidden;
}

.saito-nft-create .primary,
.saito-nft-create .secondary {
  grid-area: panel;
  display: flex;
  flex-direction: column;
  gap: var(--saito-space-lg);
  width: 100%;
  min-width: 0;
  transition: transform 0.35s ease;
}

.saito-nft-create .primary {
  transform: translateX(0);
}

.saito-nft-create .secondary {
  transform: translateX(100%);
  pointer-events: none;
}

.saito-nft-create.provide-metadata .primary {
  transform: translateX(-100%);
  pointer-events: none;
}

.saito-nft-create.provide-metadata .secondary {
  transform: translateX(0);
  pointer-events: auto;
}

.saito-nft-create .field-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--saito-space-md);
  align-items: end;
  width: 100%;
}

.saito-nft-create .field {
  display: flex;
  flex-direction: column;
  gap: var(--saito-space-xs);
  min-width: 0;
}

.saito-nft-create .label {
  display: block;
  margin: 0;
  color: var(--saito-muted-foreground);
}

.saito-nft-create .primary .upload {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: min(24rem, 40vh);
}

.saito-nft-create #nft-image-upload {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--saito-space-md);
  text-align: center;
  width: 100%;
  height: min(24rem, 40vh);
  min-height: min(24rem, 40vh);
  padding: var(--saito-space-xl);
  box-sizing: border-box;
  border: 1px solid var(--saito-border);
  border-radius: var(--saito-radius);
  background-color: var(--saito-secondary);
  cursor: pointer;
}

.saito-nft-create #nft-image-upload i {
  font-size: 3.2rem;
  line-height: 1;
  color: var(--saito-muted-foreground);
}

.saito-nft-create #nft-image-upload .upload-hint {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.4;
  color: var(--saito-muted-foreground);
}

.saito-nft-create #create-nft-textarea {
  width: 100%;
  height: min(24rem, 40vh);
  min-height: min(24rem, 40vh);
  resize: none;
  display: none;
}

/* Same footprint as #nft-image-upload so image selection does not resize the dialog */
.saito-nft-create .preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: min(24rem, 40vh);
  max-width: 100%;
  max-height: min(24rem, 40vh);
  position: relative;
  overflow: hidden;
}

.saito-nft-create .preview img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.saito-nft-create .preview i {
  position: absolute;
  font-size: 2rem;
  cursor: pointer;
  top: -1rem;
  right: -1rem;
}

.saito-nft-create .file {
  position: relative;
  display: grid;
  align-items: center;
  padding: var(--saito-space-md);
  grid-template-columns: min-content 1fr;
  grid-template-rows: 1fr 1fr;
  row-gap: var(--saito-space-xs);
  column-gap: var(--saito-space-md);
  justify-items: flex-end;
  overflow: hidden;
  border: 1px solid var(--saito-border);
  border-radius: var(--saito-radius);
  background-color: var(--saito-secondary);
}

.saito-nft-create .file i {
  font-size: 3.2rem;
  grid-row: 1 / span 2;
  z-index: 1;
  cursor: pointer;
  color: var(--saito-muted-foreground);
}

.saito-nft-create .file-name,
.saito-nft-create .file-size {
  z-index: 1;
}

.saito-nft-create .primary .footer,
.saito-nft-create .secondary .footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: var(--saito-space-md);
  width: 100%;
  margin: 0;
  padding: 0;
}

.saito-nft-create .primary .footer .get-saito-tokens {
  margin-right: auto;
}

.saito-nft-create .secondary .footer {
  justify-content: space-between;
}

.saito-nft-create .create-nft-fields {
  display: flex;
  flex-direction: column;
  gap: var(--saito-space-md);
  width: 100%;
  flex: 1 1 auto;
}

.saito-nft-create .secondary input.ticker,
.saito-nft-create .secondary .label.ticker {
  display: none;
}

.saito-nft-create .secondary input.ticker {
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .saito-nft-create .field-row {
    grid-template-columns: 1fr;
  }

  .saito-nft-create .secondary .footer {
    flex-wrap: wrap;
  }

  .saito-nft-create .secondary .footer > .saito-button-primary {
    flex: 1 1 auto;
  }
}

.saito-nft-panel-body-view {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.saito-nft-description-box-overlay {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  min-width: 400px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--saito-background);
  border: 2px solid var(--saito-border);
  border-radius: var(--saito-radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--saito-elevation-1);
}

.saito-nft-description-text-overlay {
  font-size: 1.6rem;
  color: var(--saito-foreground);
  line-height: 1.5;
  word-break: break-word;
  text-align: center;
}

.saito-nft-image {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.saito-nft-image img {
  width: auto;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Capability tiles — float over the artwork as object properties */
.saito-nft-capability-chrome {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: calc(100% - 2.4rem);
  max-width: 100%;
  pointer-events: none;
}

.saito-nft-capabilities {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1rem;
  max-width: 100%;
  padding: 0;
  margin: 0;
  pointer-events: none;
}

.saito-nft-capability {
  pointer-events: auto;
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 10.4rem;
  min-height: 9.6rem;
  margin: 0;
  padding: 1.35rem 0.85rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--saito-foreground) 18%, transparent);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--saito-background) 72%, transparent);
  color: var(--saito-muted-foreground);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    color 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease,
    transform 0.16s ease;
}

@media (max-width: 720px) {
  .saito-nft-capability {
    width: 8.4rem;
    min-height: 8.2rem;
    padding: 1.1rem 0.6rem 0.95rem;
    gap: 0.55rem;
  }

  .saito-nft-capability i {
    font-size: 2rem;
  }

  .saito-nft-capability-label {
    font-size: 1.1rem;
  }

  .saito-nft-capabilities {
    gap: 0.7rem;
  }
}

.saito-nft-capability i {
  font-size: 2.35rem;
  line-height: 1;
  color: inherit;
}

.saito-nft-capability-label {
  display: block;
  max-width: 100%;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  color: inherit;
  white-space: normal;
  overflow-wrap: anywhere;
}

.saito-nft-capability:hover,
.saito-nft-capability:focus-visible,
.saito-nft-capability.is-active {
  color: var(--saito-primary);
  border-color: color-mix(in srgb, var(--saito-primary) 50%, transparent);
  background: color-mix(in srgb, var(--saito-background) 82%, transparent);
  outline: none;
}

.saito-nft-capability:active {
  transform: scale(0.97);
}

.saito-nft-capability-desc {
  box-sizing: border-box;
  width: 100%;
  max-width: 52rem;
  min-height: 1.6em;
  padding: 0 0.5rem;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 1.35rem;
  line-height: 1.35;
  color: color-mix(in srgb, var(--saito-foreground) 88%, transparent);
  text-shadow: 0 1px 8px color-mix(in srgb, var(--saito-background) 80%, transparent);
  pointer-events: none;
}

.saito-nft-capability-desc.is-empty {
  visibility: hidden;
}

.saito-nft-footer-spacer {
  flex: 1;
}

.saito-nft-description {
  font-size: 14px;
  color: var(--saito-foreground);
  line-height: 1.4;
  max-width: 100%;
  max-height: 30vh;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.saito-nft-description.editable {
  transition: all 0.2s ease;
  border-radius: var(--saito-radius-sm);
  margin: 0;
}

.saito-nft-description.editable:hover {
  background: var(--saito-secondary);
  transform: translateY(-1px);
}

.saito-nft-text {
  height: 100%;
  width: 100%;
  padding: 1rem;
  font-family: monospace;
  font-size: 1.2rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 10;
  overflow: hidden;
  overflow-y: auto;
  white-space: pre-wrap;
  color: var(--saito-status-code-foreground);
  background: var(--saito-status-code-background);
  font-size: 1.75rem;
}

/* ============================================
   PANEL FOOTER
   ============================================ */
.saito-nft-panel-footer {
  box-sizing: border-box;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  height: var(--saito-nft-footer-height);
  min-height: var(--saito-nft-footer-height);
  max-height: var(--saito-nft-footer-height);
  padding: 0 1.8rem;
  border-top: 1px solid var(--saito-border);
  transition: opacity 0.3s ease-in-out;
  margin-top: auto;
}

/* View panel — fixed metadata strip */
.saito-nft-panel-footer-view {
  justify-content: stretch;
  padding: 0 1.6rem;
}

.saito-nft-footer-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 1.2rem;
  width: 100%;
  min-width: 0;
}

.saito-nft-footer-meta .meta-col {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.saito-nft-footer-meta .meta-label {
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--saito-muted-foreground);
}

.saito-nft-footer-meta .meta-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--saito-foreground);
}

/* Hide DELETE button when split overlay is active */
.saito-nft-panel-info.split-overlay-panel-active .saito-nft-panel-footer {
  opacity: 0;
  pointer-events: none;
}

.saito-nft-footer-btn {
  flex: 1;
  padding: 12px 24px;
  border-radius: var(--saito-radius);
  font-weight: 600;
  max-width: 20rem;
  transition: all 0.2s ease;
}

.saito-nft-footer-btn.disabled-btn {
  filter: opacity(60%) brightness(0.8);
}

.saito-nft-footer-btn.nft-info-delete-nft {
  color: var(--saito-white);
  background-color: var(--saito-red);
  border: 2px solid var(--saito-red);
}

.saito-nft-footer-btn.nft-info-delete-nft:hover {
  background-color: var(--saito-red-dark);
  border-color: var(--saito-red-dark);
}

/* Form layout only — inputs inherit saito-form-elements */
.saito-nft-input-label {
  margin: var(--saito-space-md) 0 var(--saito-space-sm, 0.5rem);
}

.saito-nft-panel-send input.saito-input {
  margin-bottom: var(--saito-space-sm, 1rem);
}

.nft-send-amount-row {
  display: flex;
  align-items: center;
  gap: var(--saito-space-sm, 0.8rem);
  margin-bottom: var(--saito-space-sm, 1rem);
}

.nft-send-amount-row input.saito-input {
  margin-bottom: 0;
}

.nft-send-max-btn {
  flex: 0 0 auto;
}

.saito-nft-mode-title {
  margin-bottom: var(--saito-space-lg);
  font-size: 2rem;
}

/* ============================================
   SPLIT SLIDER
   ============================================ */
.nft-sliders-container {
  width: 100%;
  margin-top: 2rem;
  min-height: 0;
}

/* Split overlay that covers the panel body */
.saito-nft-split-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: var(--saito-background);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  overflow-y: auto;
}

.saito-nft-split-overlay.split-overlay-active {
  opacity: 1;
  pointer-events: auto;
}

.saito-nft-split-overlay.split-overlay-active,
.saito-nft-split-overlay.split-overlay-active * {
  pointer-events: auto !important;
}

.split-instructions {
  font-size: 2.2rem;
  line-height: 1.6;
  color: var(--saito-foreground);
  margin-bottom: 2rem;
  padding: 0.3rem;
  border-radius: var(--saito-radius);
  max-width: 600px;
  width: 100%;
  font-weight: 500;
}

.split-slider-wrapper {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fancy-slider-bar {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
  align-items: center;
  background: var(--saito-background);
  border: 1px solid var(--saito-border);
  padding: 0;
  height: 50px;
}

.split-number-box {
  min-width: 80px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--saito-background);
  border: 2px solid var(--saito-primary);
  border-radius: 8px;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--saito-foreground);
  box-shadow: var(--saito-elevation-1);
  user-select: none;
}

.split-half {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: default;
  background: var(--saito-secondary);
  transition: background 0.2s ease;
}

/* Left half: border-radius only on right (inward) side */
.split-half-left {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

/* Right half: border-radius only on left (inward) side */
.split-half-right {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.split-bar {
  width: 16px;
  height: 100%;
  min-height: 50px;
  background: var(--saito-primary);
  cursor: ew-resize;
  position: relative;
  z-index: 10;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: var(--saito-control-ring-shadow);
}

.split-bar::before,
.split-bar::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 3px;
  height: 20px;
  background: var(--saito-primary-foreground);
  border-radius: 2px;
  transform: translateX(-50%);
}

.split-bar::before {
  top: 25%;
}

.split-bar::after {
  bottom: 25%;
}

.split-bar:hover {
  background: var(--saito-chart-4);
  box-shadow:
    var(--saito-control-ring-shadow),
    var(--saito-elevation-2);
}

.split-bar:active {
  background: var(--saito-chart-4);
}

/* Split buttons container */
.split-buttons-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  max-width: 600px;
  margin-top: 2rem;
  gap: 1rem;
}

.split-buttons-right {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-left: auto;
}

/* Split button styling */
.split-button {
  width: 100px;
  padding: 10px 20px;
  border-radius: var(--saito-radius-sm);
  border: none;
  background: var(--saito-primary);
  color: var(--saito-primary-foreground);
  font-weight: 600;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--saito-elevation-1);
}

/* Return button styling (left-aligned, secondary style) */
.split-return-button {
  background: var(--saito-secondary);
  color: var(--saito-foreground);
  border: 1px solid var(--saito-border);
}

.split-return-button:hover {
  background: var(--saito-accent);
  border-color: var(--saito-primary);
}

.split-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--saito-button-disabled-background);
}

.split-button:not(:disabled):hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: var(--saito-elevation-2);
}

.split-button:not(:disabled):active {
  transform: translateY(0);
  box-shadow: var(--saito-elevation-1);
}

.atomize-button {
  background: var(--saito-primary-foreground);
  color: var(--saito-primary);
}

.atomize-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--saito-button-disabled-background);
  color: var(--saito-button-disabled-foreground);
}

/* ============================================
   UTXO / SLIPS — inspector cards
   ============================================ */

.nft-slips-container {
  margin-top: 0.4rem;
}

.nft-slips-title {
  margin: 0 0 1.1rem;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--saito-muted-foreground);
}

.nft-slips-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.nft-slip-box {
  box-sizing: border-box;
  display: flex;
  flex: 1 1 22rem;
  flex-direction: column;
  gap: 0.95rem;
  max-width: 28rem;
  min-width: 0;
  padding: 1.35rem 1.4rem;
  border: 1px solid color-mix(in srgb, var(--saito-border) 90%, transparent);
  border-radius: var(--saito-radius);
  background: color-mix(in srgb, var(--saito-background) 55%, var(--saito-card, transparent));
}

.nft-slip-box-index {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--saito-muted-foreground);
}

.nft-slip-box-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 0;
}

.nft-slip-box-label {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--saito-muted-foreground);
}

.nft-slip-box-value {
  max-width: 100%;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--saito-green);
}

.nft-slip-box-value-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.3rem;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.nft-slip-box-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: flex-start;
  margin-top: 0.15rem;
  padding-top: 0.95rem;
  border-top: 1px solid color-mix(in srgb, var(--saito-border) 85%, transparent);
}

.utxo-deposit-btn,
.utxo-split-btn,
.utxo-delete-btn {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--saito-muted-foreground);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  cursor: pointer;
  transition: color 0.16s ease;
}

.utxo-deposit-btn:hover,
.utxo-split-btn:hover,
.utxo-delete-btn:hover {
  color: var(--saito-primary);
  background: transparent;
  transform: none;
}

.saito-nft-split-utxo {
  display: flex;
  flex-direction: column;
}

/* ============================================
  UTXO TABLE for TRANSFER  
  ============================================ */
.saito-nft-panel-send .nft-slip-box {
  cursor: pointer;
  user-select: none;
}

.saito-nft-panel-send .nft-slip-box.selected-shard {
  border: 3px solid var(--saito-secondary);
}

.saito-nft-panel-send .nft-advanced-options {
  border-top: 1px solid rgba(170, 170, 170, 0.2);
  margin-top: 0.2rem;
  padding-top: 0.4rem;
}

.saito-nft-panel-send .nft-advanced-toggle {
  width: auto;
  min-width: 0;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 0.2rem 0;
  background: none;
  border: none;
  box-shadow: none;
  filter: none;
  transform: none;
  text-transform: none;
  letter-spacing: normal;
  font-size: 1.2rem;
  font-weight: 400;
  text-decoration: underline dashed;
  text-underline-offset: 0.25em;
  border-radius: 0;
  color: var(--saito-foreground);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  justify-content: flex-start;
  opacity: 0.8;
  cursor: pointer;
  text-align: left;
}

.saito-nft-panel-send .nft-advanced-toggle:hover {
  background: none;
  box-shadow: none;
  filter: none;
  transform: none;
  opacity: 1;
  color: var(--saito-primary);
}

html[data-theme='noir'] .saito-nft-panel-send .nft-advanced-toggle,
html[data-theme='noir'] .saito-nft-panel-send .nft-advanced-toggle:hover,
html[data-theme='noir'] .saito-nft-panel-send .nft-advanced-toggle:active {
  background: none;
  border: none;
  box-shadow: none;
  filter: none;
  transform: none;
}

.saito-nft-panel-send .nft-advanced-caret {
  transition: transform 0.2s ease;
  font-size: 1.2rem;
  width: 1.2rem;
  text-align: center;
}

.saito-nft-panel-send .nft-advanced-options:not(.collapsed) .nft-advanced-caret {
  transform: rotate(90deg);
}

.saito-nft-panel-send .nft-advanced-content {
  padding: 0.8rem 0 0;
}

.saito-nft-panel-send .nft-advanced-options.collapsed .nft-advanced-content {
  display: none;
}

.saito-nft-panel-send .nft-advanced-content .nft-slips-container {
  margin-bottom: 0;
}

/* ============================================
   CREATE NFT
   ============================================ */
.create-nft-btn-row {
  display: flex;
  align-items: center;
}

.create-nft-help-link {
  max-width: 11rem;
  border-bottom: 2px dotted;
  cursor: pointer;
  white-space: nowrap;
  width: max-content;
}

/* Deposit field — locked default still looks like a normal Saito input */
.create-nft-deposit-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.create-nft-deposit-wrap .create-nft-deposit-lock {
  position: absolute;
  right: var(--saito-space-md);
  color: var(--saito-muted-foreground);
  font-size: 1.4rem;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.create-nft-deposit-wrap.is-locked .create-nft-deposit-lock {
  opacity: 0.85;
}

.create-nft-deposit-wrap.is-locked #create-nft-deposit {
  cursor: pointer;
  padding-right: 3.2rem;
}

/* Deposit help overlay — typography / rhythm for this dialog only */
.create-nft-help-overlay {
  width: min(48rem, 95vw);
  gap: var(--saito-space-md);
}

.create-nft-help-overlay .saito-overlay-form-text {
  color: var(--saito-muted-foreground);
  line-height: 1.45;
}

.create-nft-help-overlay .saito-overlay-form-text p {
  margin: 0;
}

.create-nft-deposit-container {
  display: flex;
  align-items: center;
  gap: var(--saito-space-md);
  cursor: pointer;
  margin: 0;
  color: var(--saito-muted-foreground);
}

.create-nft-deposit-container .saito-checkbox {
  margin: 0;
  flex: 0 0 auto;
}

/* Create NFT — My NFTs list header only (.saito-nft-list).
   Appearance: .saito-button-square. Layout: [+] MY NFTs */
.saito-nft-list > .saito-overlay-form-header {
  justify-content: flex-start;
  gap: 1.2rem;
  padding-right: 1.6rem;
}


/*
    add nft utxo overlay
*/
.create-nft-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  min-width: 60rem;
  justify-content: space-between;
}
.saito-nft-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  width: 85vw;
  height: 85vh;
}
/* Let the NFT list fill the taller browser overlay */
.saito-nft-list .nft-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.saito-nft-list .send-nft-list {
  max-height: none;
  flex: 1;
  overflow-y: auto;
}
.saito-nft-list .nft-list-instructions {
  flex-shrink: 0;
}
.saito-nft-list .instructions {
  opacity: 0.8;
  line-height: 1.5;
}
.nft-list {
  min-height: 24rem;
  user-select: none;
}
.textarea-container {
  display: flex;
  flex-direction: column;
}
.textarea-container textarea {
  width: 100%;
  height: 100px;
  padding: 0.5rem;
  border: 1px solid var(--saito-border);
  border-radius: var(--saito-radius);
  resize: none;
}
.send-nft-list {
  max-height: min(76rem, 85vh);
  overflow-y: scroll;
  display: flex;
  flex-direction: row;
  gap: 2rem;
  flex-wrap: wrap;
  width: max-content;
  max-width: 94rem; /* fits 4 nfts wide */
  /* 4: 94rem, 3: 70rem */
}
.create-nft-textarea {
  height: 30rem;
}
.nft-receiver {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
#page2 {
  flex-direction: column;
  gap: 3rem;
}
.nft-creator > .saito-file-transfer {
  border-radius: var(--saito-radius);
  position: relative;
  border: 1px dashed var(--saito-border);
  display: grid;
  align-items: center;
  padding: 2rem;
  grid-template-columns: min-content 1fr;
  grid-template-rows: 1fr 1fr;
  row-gap: 1rem;
  column-gap: 2rem;
  justify-items: flex-end;
  overflow: hidden;
  background-color: var(--saito-secondary);
  color: var(--saito-secondary-foreground);
}
.fancy-slider-bar {
  position: relative;
  width: 100%;
  background-color: var(--saito-background);
  display: flex;
  align-items: center;
  z-index: 10;
  padding: 0;
  height: 4.5rem;
  border: 1px solid var(--saito-border);
}
.split-half {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 1.6rem;
}
input.split-half {
  padding: 0;
  height: 100%;
  border-radius: unset;
  text-align: center;
}
/* 

nft cards

*/
.saito-nft-card {
  position: relative;
  width: 22rem;
  height: 24rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--saito-border);
  border-radius: var(--saito-radius);
  overflow: hidden;
  padding: 1rem;
  background-color: var(--saito-background);
  flex: 0 0 22rem;
}
.saito-nft-card:hover {
  cursor: pointer;
  border: 1px solid var(--saito-primary);
}
.saito-nft-card.nft-selected {
  border: 1px solid var(--saito-primary);
}
.saito-nft-card-title {
  position: absolute;
  width: 20rem;
  color: var(--saito-foreground);
  background-color: color-mix(in srgb, var(--saito-black) 70%, transparent);
  z-index: 9;
  top: 18px;
  line-height: 4rem;
  padding: 0 1rem;
  overflow: hidden;
}
.saito-nft-card-img {
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-image: url('/saito/img/dreamscape.png');
  border-radius: var(--saito-radius);
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: unset;
  border-bottom-right-radius: unset;
}
.saito-nft-card-img img,
.saito-nft-card-img i {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
}
.saito-nft-card-info-amount,
.saito-nft-card-info-deposit {
  font-family: monospace;
  font-size: 1.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nft-identicon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  align-self: center;
}
.saito-nft-card-details {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0 0 0;
  font-size: 1.4rem;
  gap: 1rem;
  position: relative;
}
.saito-nft-card-deposit {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}
.saito-nft-card-amount {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.saito-nft-card-text {
  font-family: monospace;
  font-size: 1.2rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 10;
  overflow: hidden;
  white-space: pre;
  color: var(--saito-status-code-foreground);
  padding: 5px;
  background: var(--saito-status-code-background);
  height: 100%;
}
@keyframes spin {
to {
    -webkit-transform: rotate(360deg);
  }
}
@-webkit-keyframes spin {
to {
    -webkit-transform: rotate(360deg);
  }
}
@media screen and (max-width: 1000px) {
.send-nft-list {
    max-width: 70rem;
    /*max-width: 100%;*/
  }
}
@media screen and (max-width: 768px) {
.create-nft-container,
  .saito-nft-create {
    width: 95vw;
    min-width: auto;
  }
.saito-nft-list {
    width: 95vw;
    height: 85vh;
  }
.send-nft-list {
    width: unset;
    justify-content: center;
  }
}
/* Namespace: .saito-transaction-monitor */

.saito-transaction-monitor {
	width: min(92vw, 36rem);
	max-width: 100%;
	max-height: min(90dvh, 40rem);
	overflow: auto;
	padding: var(--saito-space-xxl) var(--saito-space-xl);
	box-sizing: border-box;
	-webkit-overflow-scrolling: touch;
}

.saito-transaction-monitor .stack {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--saito-space-md);
	text-align: center;
	min-width: 0;
}

.saito-transaction-monitor .title {
	margin: 0;
	font-size: 2rem;
	font-family: var(--saito-font-medium);
	letter-spacing: -0.01em;
}

.saito-transaction-monitor .lead,
.saito-transaction-monitor .subtitle {
	margin: 0;
	max-width: 28rem;
	font-size: var(--font-size-medium);
	line-height: 1.5;
	color: var(--saito-muted-foreground);
	overflow-wrap: anywhere;
}

.saito-transaction-monitor .subtitle {
	min-height: 3em;
}

.saito-transaction-monitor .saito-spinner {
	width: 4rem;
	min-width: 4rem;
	margin-bottom: var(--saito-space-sm);
}

.saito-transaction-monitor .timer {
	width: 100%;
	max-width: 18rem;
	margin-top: var(--saito-space-lg);
	padding-top: var(--saito-space-lg);
	border-top: 1px solid var(--saito-border);
}

.saito-transaction-monitor .timer-label,
.saito-transaction-monitor .timer-unit {
	display: block;
	font-size: var(--font-size-tiny);
	letter-spacing: 0.04em;
	text-transform: lowercase;
	color: var(--saito-muted-foreground);
}

.saito-transaction-monitor .countdown {
	display: inline-block;
	margin: var(--saito-space-sm) 0;
	font-size: 2.5rem;
	font-family: var(--saito-font-heavy);
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.saito-transaction-monitor .success {
	margin-bottom: var(--saito-space-xs);
	color: var(--saito-status-success);
	font-size: 5rem;
	line-height: 1;
}

.saito-transaction-monitor .stack > .saito-button-primary {
	margin-top: var(--saito-space-lg);
	min-width: 10rem;
	min-height: 2.75rem;
}

@media (max-width: 600px) {
	.saito-transaction-monitor {
		width: min(100vw, 36rem);
		max-height: min(88dvh, 40rem);
		padding: var(--saito-space-xl) var(--saito-space-lg);
	}

	.saito-transaction-monitor .title {
		font-size: var(--font-size-large);
	}

	.saito-transaction-monitor .countdown {
		font-size: 2rem;
	}

	.saito-transaction-monitor .stack > .saito-button-primary {
		width: 100%;
		min-width: 0;
	}
}
.saito-photo-uploader .uploader-uploaded-photo {
    height: auto;
    object-fit: cover;
    width: 100%;
}

.saito-photo-uploader {
    background-color: var(--saito-background);
    height: 33rem;
    width: 70rem;
    /* position: absolute; */
    /* top: 50%;
	left: 50%; */
    padding: 5rem;
    /* transform: translate(-50%, -50%); */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--saito-border);
    font-size: 2rem;
    border-radius: 0.5rem;
    color: var(--saito-foreground);
}

@media (max-width: 768px) {
    .saito-photo-uploader {
        width: 90vw;
        padding: 5vw;
    }
}

@media (max-width: 480px) {
    .saito-photo-uploader {
        width: 95vw;
        font-size: calc(14px + 1vw);
    }
}

.saito-photo-uploader .uploader-content {
    display: none;
    height: 100%;
    width: 100%;
    padding: 5rem;
    position: absolute;
}

.saito-photo-uploader .uploader-actions {
    width: calc(100% - 10rem);
    position: absolute;
    bottom: 0;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    z-index: 10;
}

.saito-photo-uploader .remove-photo {
    margin-right: 1rem;
}

@media (max-width: 768px) {
    .saito-photo-uploader .uploader-actions {
        flex-direction: column;
        justify-content: center;
    }
    .saito-photo-uploader .remove-photo {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}/* SaitoOverlay — shell only: backdrop, position, size, panel, close, lifecycle.
   Forms/inputs/buttons/type inherit the Saito design system. */

.saito-overlay-backdrop {
  position: fixed !important;
  display: none;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--saito-overlay-backdrop);
  z-index: 100;
}

.saito-overlay-backdrop ~ .saito-overlay-backdrop {
  background-color: var(--saito-overlay-backdrop-stacked);
}

.saito-overlay {
  position: fixed;
  display: inline-block;
  z-index: 1000;
  height: min-content;
  width: min-content;
  max-height: 100svh;
  max-width: 100vw;
}

.saito-overlay-size {
  width: min(600px, 95vw);
  min-height: min(400px, 80vh);
  max-height: 80vh;
  padding: var(--saito-space-xl);
}

.saito-overlay-size.wide {
  width: min(900px, 100vw);
  padding: var(--saito-space-xxl);
}

.saito-overlay-size.tall {
  min-height: min(600px, 100vh);
  max-height: 100vh;
}

.saito-overlay-size.narrow {
  width: min(400px, 90vw);
}

/* Shared elevated panel chrome — class owns presentation anywhere it appears.
   Overlay forms / file-transfer / hamburger share the same surface. */
.saito-overlay-panel,
.saito-overlay > form,
.saito-file-transfer-overlay,
.saito-header-hamburger-contents,
.stun-invite {
  background-color: var(--saito-popover);
  background-image: var(--saito-popover-wash);
  box-shadow: var(--saito-elevation-3);
  border-radius: var(--saito-radius-lg);
  border: 1px solid var(--saito-border);
}

/* Compact floating menus / pickers (smaller radius + mid elevation) */
.saito-overlay-panel.compact {
  box-shadow: var(--saito-elevation-2);
  border-radius: var(--saito-radius);
}

/* Keep dialog surface on mobile when overlay host goes full-bleed */
.saito-overlay-panel.retain-surface {
  background-color: var(--saito-popover);
  background-image: var(--saito-popover-wash);
  box-shadow: var(--saito-elevation-3);
}

.center-overlay {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0 auto;
}

.saito-overlay-closebox {
  position: absolute;
  width: 4.2rem;
  height: 3.4rem;
  border-radius: 0.8rem;
  z-index: 100;
  top: -1rem;
  right: -1rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--saito-foreground) 12%, transparent), transparent),
    color-mix(in srgb, var(--saito-card) 84%, var(--saito-primary));
  border: 1px solid color-mix(in srgb, var(--saito-primary) 42%, var(--saito-border));
  box-shadow:
    0 1.2rem 3rem color-mix(in srgb, var(--saito-black) 28%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--saito-white) 16%, transparent);
  backdrop-filter: blur(10px);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
  display: none;
  cursor: pointer;
}

.maximized-overlay .saito-overlay-closebox {
  top: 1rem;
  right: 1rem;
}

.saito-overlay-closebox-btn {
  pointer-events: none;
  display: block;
  height: 100%;
  width: 100%;
  color: transparent;
  background-color: transparent;
  font-size: 0;
  border-radius: inherit;
  position: absolute;
  inset: 0;
  transform: none;
}

.saito-overlay-closebox::before,
.saito-overlay-closebox::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.45rem;
  height: 2px;
  border-radius: 999px;
  background: var(--saito-primary-foreground);
  transform-origin: center;
}

.saito-overlay-closebox::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.saito-overlay-closebox::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.saito-overlay-closebox:hover {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--saito-white) 18%, transparent), transparent),
    var(--saito-primary);
  border-color: var(--saito-primary);
  box-shadow:
    0 1.4rem 3.6rem color-mix(in srgb, var(--saito-black) 34%, transparent),
    0 0 0 1px color-mix(in srgb, var(--saito-primary) 24%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--saito-white) 24%, transparent);
  transform: translateY(-1px);
  transform-origin: center;
}

/* Dialog content stack — layout only; controls inherit Saito.
   Gap matches Send body rhythm (--saito-space-lg / 1.6rem). */
.saito-overlay-form,
.saito-recovery,
.saito-backup {
  width: min(60rem, 95vw);
  padding: var(--saito-space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--saito-space-lg);
}

/* Button-row margin is for free-standing footers; flex gap owns spacing here */
.saito-overlay-form > .saito-button-row,
.saito-recovery > .saito-button-row,
.saito-backup > .saito-button-row {
  margin-top: 0;
}

/* Shared dialog title bar — deliberate identity used across overlays */
.saito-overlay-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--saito-space-lg);
  width: 100%;
  height: 6rem;
  padding-left: var(--saito-space-lg);
  border-radius: var(--saito-radius);
  background: linear-gradient(
    90deg,
    var(--saito-primary) 0%,
    var(--saito-primary) 20%,
    transparent 100%
  );
  color: var(--saito-primary-foreground);
}

@media (max-width: 768px) {
  .saito-overlay-form-header {
    background: linear-gradient(
      90deg,
      var(--saito-primary) 0%,
      var(--saito-primary) 40%,
      transparent 100%
    );
  }
}

.saito-overlay-form-header-title {
  margin: 0;
  font-size: 2rem;
  font-family: var(--saito-font-medium);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saito-overlay-form-header-title.loading {
  line-height: 6rem;
}

/* Supporting copy — secondary to title / input / CTA */
.saito-overlay-form-text {
  color: var(--saito-muted-foreground);
}

.saito-overlay-form-text p {
  margin: 0;
}

.saito-overlay-form-text p + p {
  margin-top: var(--saito-space-md);
}

/* Backup subform — layout only */
.saito-overlay-subform {
  display: grid;
  grid-template-columns: min-content 1fr;
  gap: var(--saito-space-md);
}

.saito-overlay-subform.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.saito-overlay-subform-inputs {
  display: flex;
  flex-direction: column;
  gap: var(--saito-space-md);
}

.saito-overlay-auto-backup .saito-overlay-subform {
  grid-template-columns: 3fr 1fr;
}

@media screen and (max-width: 600px) {
  .maximized-overlay .saito-overlay-closebox {
    top: 0.5rem;
    right: 0.5rem;
  }

  .saito-overlay-subform > .saito-overlay-form-subtext {
    display: none;
  }

  .saito-overlay-subform-inputs {
    grid-column: span 2;
  }

  .bottom-mobile-overlay.center-overlay {
    top: unset;
    bottom: 0;
  }

  .saito-overlay-size.wide {
    padding: var(--saito-space-xl) var(--saito-space-md);
  }
}

@media screen and (max-width: 768px) {
  .saito-overlay {
    inset: 0;
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 6rem 1rem 0;
    border-radius: 0;
    transform: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--saito-canvas-wash);
  }

  .saito-overlay > .saito-overlay-panel:not(.retain-surface),
  .saito-overlay > form:not(.retain-surface) {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: calc(100% - 5rem);
    background: transparent;
    background-image: none;
  }

  .saito-overlay .saito-overlay-closebox {
    position: fixed;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
  }
}
.saito-progress-bar-container{
	background: var(--saito-primary);
	width: 75%;
	margin: 0 12.5%;
	height: 3rem;
	padding: 0 1rem;
	display: flex;
	align-items: center;
	background-size: 400% auto;
	position: absolute;
    /*z-index: 999;  z-index governed by redsquare-progress-banner */
    border-radius: var(--saito-radius);
    border: 1px solid var(--saito-background);
	top: 0.75rem;
}

.saito-progress-bar-container.active{
	animation: shimmer 3s infinite alternate ease-in-out;
}

.saito-progress-bar {
	color: var(--saito-background);
	text-shadow: 1px 1px 1px var(--saito-black);
	text-wrap: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

@keyframes shimmer {
	from {
		background-position: 0 0;
	}
	to {
		background-position: 99% 99%;
	}
}

/*
 saito link preview
*/

.saito-link-preview {
  white-space: normal;
}

.saito-link-preview-img {
  width: 100%;
  max-height: 2rem;
  border-top-left-radius: var(--saito-radius);
  border-top-right-radius: var(--saito-radius);
  border: 1px solid var(--saito-border);
  border-bottom: none;
  overflow: hidden;
  display: flex;
}

.saito-link-preview-img.has-picture {
  max-height: 25rem;
}

.saito-link-preview-img img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
}

.saito-link-preview-info {
  padding: 2rem;
  border: 1px solid var(--saito-border);
  border-radius: var(--saito-radius);
  border-top: none;
  border-top-right-radius: unset;
  border-top-left-radius: unset;
  overflow-wrap: anywhere;
  color: var(--saito-foreground);
  font-size: 1.5rem;
  background-color: var(--saito-card);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.saito-link-preview-title {
  font-size: 1.8rem;
}

.saito-link-preview-display-url {
  color: var(--saito-muted-foreground);
  font-style: italic;
  font-size: 1.3rem;
}

.saito-link-preview a {
  white-space: normal;
}
#saito-header {
  position: fixed;
  display: flex;
  width: 100vw;
  backdrop-filter: none;
  margin: 0;
  align-items: center;
  justify-content: space-between;
  padding: 1rem max(2rem, calc((100vw - var(--saito-width)) / 2 + 0.5rem));
  top: 0;
  left: 0;
  z-index: 15;
  height: var(--saito-header-height);
  transition:
    top 0.33s linear,
    height 0.33s linear,
    padding 0.33s linear;
  color: var(--saito-foreground);
  background: transparent;
  border-bottom: 1px solid var(--saito-border);
  box-shadow: none;
}

#saito-header.wide-screen {
  padding: 1.3rem 3rem;
}

#saito-header.game {
  padding: 0;
  padding-right: 2rem;
  /* redefining base variable in game-layout doesn't work if people push themes on games */
  background: transparent;
  backdrop-filter: none;
  z-index: 90;
}

#saito-header.game .saito-header-logo-wrapper,
#saito-header.game .header-msg {
  display: none;
}

#saito-header.game .hamburger-container {
  padding: 0.5rem;
  background: var(--saito-secondary);
  border-radius: var(--saito-radius);
  margin-top: 1rem;
}

.saito-header-logo {
  width: 15rem;
  cursor: pointer;
  height: 100%;
  fill: var(--saito-foreground);
  filter: brightness(0) invert(1);
}

.saito-header-logo-wrapper {
  position: relative;
  height: 100%;
  cursor: pointer;
}

.saito-back-button {
  position: absolute;
  font-size: 40px;
  padding: 0.75rem;
  cursor: pointer;
  transition: transform 0.2s;
  top: 0;
  left: 0;
  color: var(--saito-foreground);
  background: transparent;
  background-size: 100vw;
  background-position-x: min(-2rem, calc(- (100vw - var(--saito-width)) / 2 + 0.5rem));
}

.saito-header-logo-back .saito-header-logo path:first-of-type {
  opacity: 0;
}

.saito-header-logo-wrapper:hover .saito-back-button {
  transform: scale(1.1);
}


.saito-header-logo .cls-1 {
  fill: var(--saito-foreground);
}

#saito-header-menu-toggle {
  margin-right: auto;
  cursor: pointer;
  position: relative;
  width: 4rem;
  display: flex;
  justify-content: center;
}

#saito-header-menu-toggle i {
  transition: all 0.2s;
  font-size: 3rem;
  transform: scaleX(1.2);
}

#saito-header-menu-toggle:hover i {
  opacity: 0.9;
  transform: scale(1.2);
}

#saito-header-menu-toggle:active {
  transform: scale(0.9);
}


.saito-header-profile .saito-identicon-box .saito-identicon {
  width: 4.9rem;
  height: 4.9rem;
}

.saito-header-hamburger-contents {
  display: block;
  position: absolute;
  right: -40rem;
  top: var(--saito-header-height);
  /* chrome from shared panel rule in saito-overlay.css */
  transition:
    right 0.33s,
    width 0.33s;
  z-index: 21;
  width: 40rem;
  height: calc(100svh - var(--saito-header-height) + 3px);
  overflow: hidden auto;
  color: var(--saito-foreground);
}

.saito-header-hamburger-contents.show-menu {
  right: 0;
}

.saito-header-hamburger-contents.show-wallet .wallet-info {
  height: 0;
  margin: 0;
}

.saito-header-hamburger-contents.show-wallet .saito-header-menu-section {
  display: none;
}

.saito-header-backdrop {
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: var(--saito-header-height);
  left: 0;
  width: 100vw;
  height: calc(100vh - var(--saito-header-height));
  overflow: hidden;
  z-index: 19;
  background: color-mix(in srgb, var(--saito-black) 70%, transparent);
  transition: opacity 0.33s;
}

.saito-header-backdrop.menu-visible {
  opacity: 1;
  pointer-events: auto;
}

.saito-header-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: inherit;
  transition: all 2s;
}

#qrcode,
.saito-crypto-deposit .qrcode,
.payment-box .qrcode {
  max-width: 100%;
  height: 18rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}

#qrcode img,
#qrcode svg,
.saito-crypto-deposit .qrcode img,
.saito-crypto-deposit .qrcode svg,
.payment-box .qrcode img,
.payment-box .qrcode svg {
  height: 18rem;
  width: 18rem;
  border: 1rem solid var(--saito-white);
  /*
  We need a thick border and no padding for the qrcode to be scannable
  Do not add a padding
  */
  border-radius: var(--saito-radius);
  background: var(--saito-background);
  visibility: inherit;
}

.crypto-api-fetch-spinner {
  color: var(--saito-yellow-light);
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  width: 4rem;
  height: 4rem;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--saito-gray-900);
  font-size: 3.2rem;
}

#saito-header .balance-amount,
.saito-crypto-deposit .balance-amount,
.saito-crypto-transfer .balance-amount {
  display: flex;
  align-items: baseline;
}

.saito-crypto-deposit .balance-amount,
.saito-crypto-transfer .balance-amount {
  cursor: pointer;
}

.saito-crypto-deposit .balance-amount:hover,
.saito-crypto-transfer .balance-amount:hover {
  color: var(--saito-foreground);
}

#saito-header .balance-amount.pending,
.saito-crypto-deposit .balance-amount.pending,
.saito-crypto-transfer .balance-amount.pending {
  color: var(--saito-muted-foreground);
  animation: fade-animation 1.5s infinite ease-in-out;
}

#saito-header .balance-amount.flash,
.saito-crypto-deposit .balance-amount.flash,
.saito-crypto-transfer .balance-amount.flash {
  animation: fade-animation 1.5s infinite ease-in-out;
}

#saito-header .balance-amount-segments,
.saito-crypto-deposit .balance-amount-segments,
.saito-crypto-transfer .balance-amount-segments {
  display: flex;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}

#saito-header .balance-amount-whole,
#saito-header .balance-amount-separator,
#saito-header .balance-amount-decimal,
.saito-crypto-deposit .balance-amount-whole,
.saito-crypto-deposit .balance-amount-separator,
.saito-crypto-deposit .balance-amount-decimal,
.saito-crypto-transfer .balance-amount-whole,
.saito-crypto-transfer .balance-amount-separator,
.saito-crypto-transfer .balance-amount-decimal {
  width: min-content;
}

#saito-header .balance-amount-whole,
#saito-header .balance-amount-separator,
.saito-crypto-deposit .balance-amount-whole,
.saito-crypto-deposit .balance-amount-separator,
.saito-crypto-transfer .balance-amount-whole,
.saito-crypto-transfer .balance-amount-separator {
  font-size: 3.5rem;
}

#saito-header .balance-amount-decimal,
.saito-crypto-deposit .balance-amount-decimal,
.saito-crypto-transfer .balance-amount-decimal {
  font-size: 2rem;
}

/* Sub-unit balances (< 1): uniform size so 0.xxxx reads as one fractional value */
.balance-amount-segments--subunit .balance-amount-whole,
.balance-amount-segments--subunit .balance-amount-separator,
.balance-amount-segments--subunit .balance-amount-decimal {
  font-size: 3.5rem;
}

#saito-header .wallet-btn-container {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
  padding: 0.5rem 0;
  width: fit-content;
}

#saito-header .wallet-btn {
  display: flex;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 7rem;
  padding: 0;
  color: var(--saito-muted-foreground);
}

#saito-header #wallet-btn-get-saito {
  display: none;
}

#saito-header .wallet-btn-container.show-get-saito #wallet-btn-get-saito {
  display: flex;
}

#saito-header .wallet-btn > .saito-icon-button {
  width: 6rem;
  height: 6rem;
}

#saito-header .wallet-btn > .saito-icon-button i {
  font-size: 2rem;
}

#saito-header .wallet-send-icon::before {
  display: inline-block;
  transform: rotate(45deg);
}

#saito-header .wallet-btn:hover {
  color: var(--saito-foreground);
}

#saito-header .wallet-btn:hover > .saito-icon-button {
  transform: scale(1.1);
}

#saito-header .wallet-controls-separator {
  width: 95%;
  margin: 0 auto;
}

#saito-header .wallet-identicon {
  width: 3.2rem;
  height: 3.2rem;
  align-self: center;
  margin-right: 0.5rem;
}

#saito-header .pubkey-container,
.saito-crypto-deposit .pubkey-container,
.payment-box .pubkey-container {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  width: 75%;
  max-width: 38rem;
  min-width: 0;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 1rem;
  font-size: 1.6rem;
}

#saito-header .wallet-address-row {
  display: flex;
  width: 95%;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

#saito-header .pubkey-mobile-wrapper {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

#saito-header .wallet-mobile-action {
  display: flex;
  width: 4rem;
  height: 4rem;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--saito-border);
  border-radius: 50%;
  background: var(--saito-secondary);
  color: var(--saito-foreground);
}

#saito-header .wallet-mobile-action i {
  font-size: 1.8rem;
}

#saito-header .pubkey-container:hover i,
.saito-crypto-deposit .pubkey-container:hover i,
.payment-box .pubkey-container:hover i {
  transform: scale(1.1);
}

#saito-header .wallet-mobile-action:hover {
  border-color: var(--saito-primary);
  background: var(--saito-primary);
  color: var(--saito-primary-foreground);
}

#saito-header .saito-header-hamburger-contents.show-qr #toggle-qr {
  border-color: var(--saito-primary);
  background: var(--saito-primary);
  color: var(--saito-primary-foreground);
}

.wallet-info {
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  justify-content: space-around;
  width: 100%;
  background: inherit;
  height: min(50vh, 27.3rem);
  overflow: hidden;
  color: var(--saito-foreground);
  margin: 1.5rem 0;
  transition: all 0.8s;
}

#saito-header .wallet-balance {
  display: flex;
  height: 4.2rem;
  align-items: baseline;
  gap: 1rem;
}

#saito-header .wallet-balance select {
  width: auto;
  height: auto;
  padding: 0.4rem 2.6rem 0.4rem 0.6rem;
  border: 0;
  background-color: transparent;
  background-position: right 0.6rem center;
  color: inherit;
  font-size: 2.2rem;
  line-height: 1.2;
}

#saito-header .wallet-balance select option {
  padding: 0.6rem 1rem;
}

.profile-public-key {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#saito-header .pubkey-container .profile-public-key {
  flex: 1 1 auto;
  text-align: center;
}

#saito-header .pubkey-container > i {
  display: block;
  flex: 0 0 auto;
}

.profile-public-key-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-wallet {
  overflow: hidden;
  height: 0;
  transition: all 2s;
}

.saito-header-hamburger-contents.show-wallet .header-wallet {
  height: fit-content;
}

#saito-header .hamburger-container {
  /*display: grid;
  grid-template-columns: 1fr min-content;*/
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

#header-msg {
  cursor: pointer;
  font-size: 2rem;
  padding: 0 0 0 2rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

#header-msg.flash {
  width: fit-content;
  max-width: fit-content;
  animation: fade-animation 1.5s infinite ease-in-out;
}

@keyframes fade-animation {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
  100% {
    opacity: 1;
  }
}


/* Header wallet crypto row */
.saito-header-crypto {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  grid-template-rows: 2fr 1fr;
  row-gap: 0.5rem;
  column-gap: 1rem;
  height: 6rem;
  padding: 0.5rem 1rem;
}

.saito-header-crypto.inactive {
  filter: grayscale(100%) opacity(75%);
}

.saito-header-crypto.selected {
  background: var(--saito-highlight);
}

.crypto-logo-container {
  position: relative;
  max-width: 5rem;
  max-height: 5rem;
  overflow: hidden;
  border-radius: 50%;
  display: flex;
  height: 5rem;
  align-items: center;
}

.saito-header-crypto .crypto-logo-container {
  grid-column-start: 1;
  grid-column-end: span 1;
  grid-row: span 2;
}

.crypto-logo-container .crypto-logo {
  height: 4rem;
  width: 4rem;
  border: 3px solid var(--saito-button-secondary-foreground);
  border-radius: 50%;
}

.crypto-logo-container .chain-logo {
  position: absolute;
  width: auto;
  height: 36%;
  bottom: 8%;
  right: 8%;
}

.header-crypto-balance {
  font: var(--saito-font-medium);
  color: var(--saito-foreground);
  font-size: 19px;
  align-self: flex-end;
}

.header-crypto-value {
  color: var(--saito-muted-foreground);
}

.saito-header-crypto .header-crypto-history {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
}

/*   Crypto Menu */
.saito-header-wallet-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
@media screen and (max-width: 620px) {
  .saito-header-hamburger-contents {
    width: 100vw;
    right: -100vw;
    border-radius: unset;
    border-left: unset;
  }

  #saito-header {
    padding: 1.3rem 1rem;
  }
  .saito-header-logo {
    width: 12rem;
  }
  .saito-back-button {
    font-size: 30px;
  }

  .wallet-info {
    margin-top: 0.5rem;
    height: 8.5rem;
    gap: 0;
  }

  #qrcode {
    height: 0;
    visibility: hidden;
    overflow: hidden;
  }

  .show-qr .wallet-info {
    margin-top: 1.5rem;
    height: 28.5rem;
    gap: 1rem;
  }

  .show-qr #qrcode,
  .show-qr .qrcode {
    height: auto;
    visibility: visible;
  }

  #saito-header .pubkey-mobile-wrapper {
    display: flex;
  }

  #saito-header .pubkey-container {
    width: auto;
    flex: 1;
  }
}

@media screen and (max-width: 420px) {
  #header-msg {
    font-size: 1.5rem;
  }
}

/*
  Desktop chrome compensation for the 12px root.
  Header rem geometry was authored at 10px root. Mobile (≤768px) and
  html.game already force 10px, so leave base rem values alone for those.
  Scale only desktop non-game chrome back to the previous pixel footprint.
*/
@media screen and (min-width: 769px) {
  html:not(.game) {
    --saito-header-height: calc(7rem * 10 / 12);
  }

  html:not(.game) #saito-header {
    padding: calc(1rem * 10 / 12)
      max(calc(2rem * 10 / 12), calc((100vw - var(--saito-width)) / 2 + 0.5rem * 10 / 12));
  }

  html:not(.game) #saito-header.wide-screen {
    padding: calc(1.3rem * 10 / 12) calc(3rem * 10 / 12);
  }

  html:not(.game) .saito-header-logo {
    width: calc(15rem * 10 / 12);
  }

  html:not(.game) .saito-back-button {
    padding: calc(0.75rem * 10 / 12);
    background-position-x: min(calc(-2rem * 10 / 12), calc(-1 * (100vw - var(--saito-width)) / 2 + 0.5rem * 10 / 12));
  }

  html:not(.game) #saito-header-menu-toggle {
    width: calc(4rem * 10 / 12);
  }

  html:not(.game) #saito-header-menu-toggle i {
    font-size: calc(3rem * 10 / 12);
  }

  html:not(.game) .saito-header-profile .saito-identicon-box .saito-identicon {
    width: calc(4.9rem * 10 / 12);
    height: calc(4.9rem * 10 / 12);
  }

  html:not(.game) .saito-header-hamburger-contents {
    right: calc(-40rem * 10 / 12);
    width: calc(40rem * 10 / 12);
  }

  /* Must match html:not(.game) specificity so show-menu can still win on `right` */
  html:not(.game) .saito-header-hamburger-contents.show-menu {
    right: 0;
  }

  /* #qrcode is header-only; leave .saito-crypto-deposit / .payment-box QR at 12px scale */
  html:not(.game) #qrcode {
    height: calc(18rem * 10 / 12);
  }

  html:not(.game) #qrcode img,
  html:not(.game) #qrcode svg {
    height: calc(18rem * 10 / 12);
    width: calc(18rem * 10 / 12);
    border-width: calc(1rem * 10 / 12);
  }

  html:not(.game) .crypto-api-fetch-spinner {
    right: calc(0.5rem * 10 / 12);
    bottom: calc(0.5rem * 10 / 12);
    width: calc(4rem * 10 / 12);
    height: calc(4rem * 10 / 12);
    font-size: calc(3.2rem * 10 / 12);
  }

  /* Balance display is menu chrome; scope to header so deposit/transfer overlays keep 12px type */
  html:not(.game) #saito-header .balance-amount-whole,
  html:not(.game) #saito-header .balance-amount-separator {
    font-size: calc(3.5rem * 10 / 12);
  }

  html:not(.game) #saito-header .balance-amount-decimal {
    font-size: calc(2rem * 10 / 12);
  }

  html:not(.game) #saito-header .balance-amount-segments--subunit .balance-amount-whole,
  html:not(.game) #saito-header .balance-amount-segments--subunit .balance-amount-separator,
  html:not(.game) #saito-header .balance-amount-segments--subunit .balance-amount-decimal {
    font-size: calc(3.5rem * 10 / 12);
  }

  html:not(.game) #saito-header .wallet-btn-container {
    gap: calc(0.5rem * 10 / 12);
    margin: calc(1rem * 10 / 12) 0 calc(1.5rem * 10 / 12);
    padding: calc(0.5rem * 10 / 12) 0;
  }

  html:not(.game) #saito-header .wallet-btn {
    gap: calc(1rem * 10 / 12);
    width: calc(7rem * 10 / 12);
    font-size: calc(1.6rem * 10 / 12);
  }

  html:not(.game) #saito-header .wallet-btn > .saito-icon-button {
    width: calc(6rem * 10 / 12);
    height: calc(6rem * 10 / 12);
  }

  html:not(.game) #saito-header .wallet-btn > .saito-icon-button i {
    font-size: calc(2rem * 10 / 12);
  }

  html:not(.game) #saito-header .wallet-identicon {
    width: calc(3.2rem * 10 / 12);
    height: calc(3.2rem * 10 / 12);
    margin-right: calc(0.5rem * 10 / 12);
  }

  html:not(.game) #saito-header .pubkey-container {
    max-width: calc(38rem * 10 / 12);
    min-height: calc(3.2rem * 10 / 12);
    gap: calc(1rem * 10 / 12);
    font-size: calc(1.6rem * 10 / 12);
  }

  html:not(.game) .wallet-info {
    gap: calc(1rem * 10 / 12);
    margin: calc(1.5rem * 10 / 12) 0;
  }

  html:not(.game) #saito-header .wallet-balance {
    gap: calc(1rem * 10 / 12);
    height: calc(4.2rem * 10 / 12);
  }

  html:not(.game) #saito-header .wallet-balance select {
    font-size: calc(2.2rem * 10 / 12);
    padding: calc(0.4rem * 10 / 12) calc(2.6rem * 10 / 12) calc(0.4rem * 10 / 12)
      calc(0.6rem * 10 / 12);
    background-position: right calc(0.6rem * 10 / 12) center;
  }

  html:not(.game) #saito-header .wallet-balance select option {
    padding: calc(0.6rem * 10 / 12) calc(1rem * 10 / 12);
  }

  html:not(.game) #saito-header .hamburger-container {
    gap: calc(1rem * 10 / 12);
  }

  html:not(.game) #header-msg {
    font-size: calc(2rem * 10 / 12);
    padding-left: calc(2rem * 10 / 12);
  }

  html:not(.game) .saito-header-crypto {
    grid-template-columns: calc(5rem * 10 / 12) 1fr auto;
    row-gap: calc(0.5rem * 10 / 12);
    column-gap: calc(1rem * 10 / 12);
    height: calc(6rem * 10 / 12);
    padding: calc(0.5rem * 10 / 12) calc(1rem * 10 / 12);
  }

  /* .crypto-logo-container is shared with withdraw/details overlays — header only */
  html:not(.game) .saito-header-crypto .crypto-logo-container {
    max-width: calc(5rem * 10 / 12);
    max-height: calc(5rem * 10 / 12);
    height: calc(5rem * 10 / 12);
  }

  html:not(.game) .saito-header-crypto .crypto-logo-container .crypto-logo {
    height: calc(4rem * 10 / 12);
    width: calc(4rem * 10 / 12);
  }

  html:not(.game) .saito-header-wallet-menu {
    gap: calc(0.5rem * 10 / 12);
  }
}
.saito-image-overlay .saito-img-arrow-box {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.saito-image-overlay .saito-img-arrow-box.left {
  left: -10rem;
}

.saito-image-overlay .saito-img-arrow-box.right {
  right: -10rem;
}

.saito-image-overlay .saito-img-icon {
  font-size: 3rem;
  color: var(--saito-white);
  background: var(--saito-gray-600);
  padding: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
}

.saito-image-overlay .saito-overlay-img-cont > img {
  transition: all 0.2s ease-in-out;
}

.saito-image-overlay .saito-overlay-img-cont img {
  max-height: 90vh;
  max-width: 90vw;
  display: none;
}
.saito-profile {
  min-width: 0;
  width: 100%;
  padding: 0;
  max-width: 1000px;
  margin: auto;
}

.saito-profile-menu {
  margin-left: 0.2rem;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
}

.saito-profile-menu .saito-profile-tab {
  cursor: pointer;
  padding: 1rem;
  text-transform: capitalize;
}

.saito-profile-tab:hover {
  color: var(--saito-primary);
  background-color: var(--background-color-button-sidebar);
  border-radius: var(--saito-radius);
}

.saito-profile-menu .active {
  text-decoration: underline dashed;
  text-underline-offset: 0.5rem;
  /*border-bottom: 1px dashed var(--saito-foreground);*/
}

.saito-profile-banner {
  width: 100%;
  height: 0;
  padding-top: min(33.33%, 180px);
  background-image: url(/saito/img/profile-banner.jpg);
  background-size: cover;
  background-position: center;
  position: relative;
}

.saito-profile-header-row .saito-identicon-box {
  border: 2px solid var(--border-color-identicon-square-profile);
  width: 10rem;
  height: 10rem;
  background-size: cover;
  border-radius: 5%;
  margin-top: -4.5rem;
  z-index: 1;
  margin-left: 1rem;
  position: relative;
  cursor: unset;
  font-size: 4rem;
}

.saito-profile-header-row .saito-identicon-box .saito-overlaid-icon {
  top: 50%;
}

.saito-banner-edit {
  margin-left: 0;
  right: 0.5rem;
  bottom: 0.5rem;
  position: absolute;
  text-shadow: 1px 1px 4px var(--saito-black);
  cursor: pointer;
}

.saito-profile-description {
  position: relative;
  margin-left: 1rem;
  padding: 0.5rem;
  margin-right: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.saito-profile-description.empty {
  display: none;
}

.saito-profile-description.can-edit.empty {
  display: block;
}

.saito-profile-description.can-edit {
  display: grid;
  grid-template-columns: 1fr min-content;
  cursor: pointer;
}

.saito-description-edit {
  display: none;
  cursor: pointer;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: flex-end;
  font-size: 1.5rem;
}

.saito-profile-description.can-edit .saito-description-edit {
  display: flex;
}

.saito-profile-header-row {
  display: grid;
  grid-template-columns: min-content 1fr;
  align-items: center;
  height: 5rem;
  gap: 1rem;
  margin-bottom: 1rem;
  margin-right: 0.5rem;
}

.saito-profile-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-evenly;
  height: 100%;
  min-width: 0;
  max-width: 100%;
}

.saito-profile-username {
  font-size: 2.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  white-space: nowrap;
}

.saito-profile-key {
  font-size: 1.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.saito-profile .saito-modal-menu-option {
  font-size: 2rem;
  height: unset;
  width: 100%;
  padding: 1rem;
  margin: 0;
}

.saito-profile .saito-modal-menu-option-label {
  font-size: 1.8rem;
}

.saito-profile .saito-modal-menu-option > i {
  justify-self: center;
  margin: 0;
}

.saito-profile-note {
  margin-top: 0.5rem;
}

.saito-banner-edit {
  color: var(--saito-gray-850);
}

@media screen and (max-width: 600px) {
  .saito-profile-header-row {
    margin-bottom: unset;
  }

  .saito-profile-header-row .saito-identicon-box {
    border-width: 1px;
    width: 7rem;
    height: 7rem;
    margin-top: -2.5rem;
    margin-left: 0.5rem;
  }
  .saito-profile-menu {
    justify-content: space-between;
  }
  .saito-profile-menu .saito-profile-tab {
    margin-right: unset;
    flex-grow: 1;
    text-align: center;
  }

  .saito-profile-description {
    margin: unset;
  }
}
.saito-camera {
  position: relative;
  width: fit-content;
  display: block;
  background-color: var(--saito-black);
}

.saito-camera #video {
  border: 1px solid black;
  box-shadow: 2px 2px 3px black;
  width: 320px;
  height: 240px;
}

.saito-camera #photo-preview {
  border: 1px solid black;
  box-shadow: 2px 2px 3px black;
  width: 320px;
  height: 240px;
}

.saito-camera #canvas {
  display: none;
}

.saito-camera .camera-controls {
  position: absolute;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  bottom: 0;
  font-size: 40px;
  color: rgba(255, 255, 255, 1);
}

.saito-camera .saito-camera i {
  border-radius: 100%;
  box-shadow: 0px 0px 1px 2px rgba(0, 0, 0, 0.2);
  background-color: var(--saito-primary);
  margin: 1rem;
  cursor: pointer;
}

.saito-camera .first-phase {
  visibility: hidden;
}

.saito-camera.video .first-phase {
  visibility: visible;
}

.saito-camera .second-phase {
  visibility: visible;
}

.saito-camera.video .second-phase {
  visibility: hidden;
}

.saito-camera #flip {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 32px;
  color: var(--saito-primary);
  background-color: rgba(255, 255, 255, 1);
  width: fit-content;
  padding: 0.5rem;
}
.saito-photo-cropper {
	height: min(100vh, 70rem);
	width: min(100vw, 80rem);
	text-align: center;
	background-color: var(--saito-background);
	border: 1px solid var(--saito-border);
	padding: 2rem;
	font-size: 2rem;
	border-radius: 0.5rem;
	align-items: center;
	color: var(--saito-foreground);
	display: grid;
	grid-template-rows: 1fr min-content;
	gap: 1rem;
}

.saito-photo-cropper .photo-cropper {
	width: 100%;
	height: 100%;
	display: block;
}

.saito-photo-cropper .photo-cropper img {
	display: block;
	max-width: 100%;
}

.cropper-container {
	width: 100% !important;
	height: 100% !important;
}

/* Media Queries for different screen sizes */

@media (max-width: 768px) {
	.saito-photo-cropper {
		padding: 1rem;
	}

	.saito-photo-cropper .photo-cropper {
		/*height: 60vh;*/
		/* Increase height on smaller screens */
		/*width: 95vw;*/
		/* Increase width on smaller screens */
		font-size: calc(12px + 2vw);
		/* Slightly larger font on smaller screens */
		padding: 1rem;
	}
}

@media (max-width: 480px) {
	.saito-photo-cropper .photo-cropper {
		/*height: 70vh;*/
		/* Further increase height on very small screens */
		/*width: 98vw;*/
		/* Almost full width on very small screens */
		font-size: calc(14px + 2vw);
		/* Even larger font on very small screens */
		padding: 0.5rem;
	}
}

/*!
 * Cropper.js v1.6.1
 * https://fengyuanchen.github.io/cropperjs
 *
 * Copyright 2015-present Chen Fengyuan
 * Released under the MIT license
 *
 * Date: 2023-09-17T03:44:17.565Z
 */

.cropper-container {
	direction: ltr;
	font-size: 0;
	line-height: 0;
	position: relative;
	-ms-touch-action: none;
	touch-action: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.cropper-container img {
	backface-visibility: hidden;
	display: block;
	height: 100%;
	image-orientation: 0deg;
	max-height: none !important;
	max-width: none !important;
	min-height: 0 !important;
	min-width: 0 !important;
	width: 100%;
}

.cropper-wrap-box,
.cropper-canvas,
.cropper-drag-box,
.cropper-crop-box,
.cropper-modal {
	bottom: 0;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
}

.cropper-wrap-box,
.cropper-canvas {
	overflow: hidden;
}

.cropper-drag-box {
	background-color: #fff;
	opacity: 0;
}

.cropper-modal {
	background-color: #000;
	opacity: 0.5;
}

.cropper-view-box {
	display: block;
	height: 100%;
	outline: 1px solid #39f;
	outline-color: rgba(51, 153, 255, 0.75);
	overflow: hidden;
	width: 100%;
}

.cropper-dashed {
	border: 0 dashed #eee;
	display: block;
	opacity: 0.5;
	position: absolute;
}

.cropper-dashed.dashed-h {
	border-bottom-width: 1px;
	border-top-width: 1px;
	height: calc(100% / 3);
	left: 0;
	top: calc(100% / 3);
	width: 100%;
}

.cropper-dashed.dashed-v {
	border-left-width: 1px;
	border-right-width: 1px;
	height: 100%;
	left: calc(100% / 3);
	top: 0;
	width: calc(100% / 3);
}

.cropper-center {
	display: block;
	height: 0;
	left: 50%;
	opacity: 0.75;
	position: absolute;
	top: 50%;
	width: 0;
}

.cropper-center::before,
.cropper-center::after {
	background-color: #eee;
	content: ' ';
	display: block;
	position: absolute;
}

.cropper-center::before {
	height: 1px;
	left: -3px;
	top: 0;
	width: 7px;
}

.cropper-center::after {
	height: 7px;
	left: 0;
	top: -3px;
	width: 1px;
}

.cropper-face,
.cropper-line,
.cropper-point {
	display: block;
	height: 100%;
	opacity: 0.1;
	position: absolute;
	width: 100%;
}

.cropper-face {
	background-color: #fff;
	left: 0;
	top: 0;
}

.cropper-line {
	background-color: #39f;
}

.cropper-line.line-e {
	cursor: ew-resize;
	right: -3px;
	top: 0;
	width: 5px;
}

.cropper-line.line-n {
	cursor: ns-resize;
	height: 5px;
	left: 0;
	top: -3px;
}

.cropper-line.line-w {
	cursor: ew-resize;
	left: -3px;
	top: 0;
	width: 5px;
}

.cropper-line.line-s {
	bottom: -3px;
	cursor: ns-resize;
	height: 5px;
	left: 0;
}

.cropper-point {
	background-color: #39f;
	height: 5px;
	opacity: 0.75;
	width: 5px;
}

.cropper-point.point-e {
	cursor: ew-resize;
	margin-top: -3px;
	right: -3px;
	top: 50%;
}

.cropper-point.point-n {
	cursor: ns-resize;
	left: 50%;
	margin-left: -3px;
	top: -3px;
}

.cropper-point.point-w {
	cursor: ew-resize;
	left: -3px;
	margin-top: -3px;
	top: 50%;
}

.cropper-point.point-s {
	bottom: -3px;
	cursor: s-resize;
	left: 50%;
	margin-left: -3px;
}

.cropper-point.point-ne {
	cursor: nesw-resize;
	right: -3px;
	top: -3px;
}

.cropper-point.point-nw {
	cursor: nwse-resize;
	left: -3px;
	top: -3px;
}

.cropper-point.point-sw {
	bottom: -3px;
	cursor: nesw-resize;
	left: -3px;
}

.cropper-point.point-se {
	bottom: -3px;
	cursor: nwse-resize;
	height: 20px;
	opacity: 1;
	right: -3px;
	width: 20px;
}

@media (min-width: 768px) {
	.cropper-point.point-se {
		height: 15px;
		width: 15px;
	}
}

@media (min-width: 992px) {
	.cropper-point.point-se {
		height: 10px;
		width: 10px;
	}
}

@media (min-width: 1200px) {
	.cropper-point.point-se {
		height: 5px;
		opacity: 0.75;
		width: 5px;
	}
}

.cropper-point.point-se::before {
	background-color: #39f;
	bottom: -50%;
	content: ' ';
	display: block;
	height: 200%;
	opacity: 0;
	position: absolute;
	right: -50%;
	width: 200%;
}

.cropper-invisible {
	opacity: 0;
}

.cropper-bg {
	background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');
}

.cropper-hide {
	display: block;
	height: 0;
	position: absolute;
	width: 0;
}

.cropper-hidden {
	display: none !important;
}

.cropper-move {
	cursor: move;
}

.cropper-crop {
	cursor: crosshair;
}

.cropper-disabled .cropper-drag-box,
.cropper-disabled .cropper-face,
.cropper-disabled .cropper-line,
.cropper-disabled .cropper-point {
	cursor: not-allowed;
}
/* Pulsing saito loader */

.saito-loader {
  /* border struggles with overlay 8?
/*  border: 1px solid aqua; */
  position: relative;
  width: 100%;
}

.saito-loader::after {
  background-color: var(--saito-primary);
  background-image: url(/saito/img/saito-loader.svg);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  animation-duration: 2s;
  animation-name: loader-pulse;
  animation-iteration-count: infinite;
  position: relative;

  width: 70px;
  height: 70px;
  left: 50%;
  transform: translate(-50%, -50%);
  content: '';
  display: block;
  transform-origin: 50%, 50%;
}

@keyframes loader-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    border-radius: 50%;
    background-size: 0px;
  }

  40% {
    transform: translate(-50%, -50%) scale(1);
    background-size: 50px;
    border-radius: 5%;
  }

  60% {
    transform: translate(-50%, -50%) scale(1);
    background-size: 50px;
    border-radius: 5%;
  }

  100% {
    transform: translate(-50%, -50%) scale(0.2);
    border-radius: 50%;
    background-size: 0px;
  }
}

.saito-loader-container {
  transition:
    opacity 0.5s,
    margin 0.5s;
}

.saito-loader-container.blocker {
  height: 100vh;
  width: 100vw;
  position: fixed;
  z-index: 150;
  display: flex;
  justify-content: center;
  align-items: center;
  background: none;
}

.saito-loader-container.non-blocker {
  z-index: 20;
  margin-top: 7rem;
}

.saito-loader-container.disappear {
  opacity: 0;
  margin-top: 0;
}

/* Spinning loader */

.game-loader-spinner {
  margin: auto;
  border: 16px solid var(--saito-primary);
  border-top: 16px solid var(--saito-white);

  border-radius: 50%;
  animation: spin 1.5s linear infinite;
  width: 5em;
  height: 5em;
  margin-top: 3rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(720deg);
  }
}

.saito-spinner {
  display: inline-block;
  width: 50%;
  min-width: 4rem;
  aspect-ratio: 1;
  background-color: var(--saito-primary);
  mask: url(/saito/img/spinner.svg) center/contain no-repeat;
  -webkit-mask: url(/saito/img/spinner.svg) center/contain no-repeat;
  mask-size: contain;
  -webkit-mask-size: contain;
}

/* Fill parent - parent must have position: relative and dimensions */
.saito-spinner.saito-spinner-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}/* Shared videobox component */
.saito-videobox {
	display: flex;
	width: 100%;
	max-height: 100%;
	justify-content: center;
	align-items: center;
	color: var(--saito-white);
	position: relative;
	flex: 1;
}

.saito-videobox video {
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	max-height: calc(100svh - 150px);
	z-index: 2;
	border-radius: inherit;
	border: none;
}

.saito-videobox.portrait video {
	height: 100%;
}

.saito-videobox canvas#oscilloscope {
	position: absolute;
	width: min(60vw, 40dvh);
	height: min(60vw, 40dvh);
	border-radius: 50%;
	border: 2px solid var(--saito-border);
	background-image: url(/saito/img/saito-background-icon.svg);
	background-color: var(--stun-noir-canvas-bg);
	background-size: 66%;
	background-repeat: no-repeat;
	background-position: center;
}

.saito-videobox #connection-message {
	color: var(--saito-white);
	width: 50%;
	line-height: 1.5;
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
}

.saito-videobox #connection-message p {
	color: var(--saito-white);
	font-size: 2.8rem;
}
div.saito-input {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: fit-content;
	overflow: visible;
}
/* Composer field: chrome from .saito-form-control; sizing is intrinsic here */
div.saito-input .text-input {
  width: 100%;
  cursor: text;
  overflow-y: auto;
  word-break: break-word;
  min-height: 4.5rem;
  max-height: 12.5rem;
  height: fit-content;
  font-size: 1.6rem;
  line-height: 2rem;
  padding: 1rem;
}
.saito-input-selection-box {
	position: absolute;
	height: min(46rem, 50vh);
	width: 36rem;
	max-width: 100%;
	z-index: 150;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-direction: column;
	/* thicker than default overlay-panel border for chat resize visibility */
	border-width: 2px;

	/*
	We can't control for if user resizes chat-popup, better to have visibile borders
	border-top: none;
	border-left: none;
	*/
}
.saito-mention {
	cursor: pointer;
	color: var(--saito-primary);
	font-style: italic;
	user-select: none;
	margin-right: 8px !important;
	width: fit-content;
}
.saito-mention:hover {
	color: var(--saito-foreground);
}* + .saito-mention {
	margin-left: 8px;
}
.saito-mention.saito-address {
	overflow: visible;
}
.selection-box-window {
	position: relative;
	width: 100%;
	height: 100%;
}
.photo-window {
	font-size: 3rem;
	text-align: center;
	padding: 4rem;
	cursor: pointer;
	opacity: 0.5;
}
.selection-box-pane {
	display: none;
	position: absolute;
	margin: auto;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
}
.selection-box-pane.active-tab {
	display: flex;
}
.selection-box-tabs {
	display: flex;
	align-items: center;
	justify-content: space-evenly;
	width: 100%;
	height: 5rem;
	background-color: var(--saito-popover);
	background-image: var(--saito-popover-wash);
	border-top: 1px var(--saito-border);
}
.selection-box-tabs i {
	font-size: 2.5rem;
}
.saito-box-tab {
	font-size: 1.2rem;
	color: var(--saito-primary);
	border-radius: 8px;
	transition: background 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4rem;
	height: 4rem;
}
/* override definitions from giphy.css */.selection-box-window .saito-gif-container {
	padding: 0.5rem;
}
emoji-picker {
	display: none;
	--emoji-size: 2.5rem;
	--emoji-padding: 0.5rem;
	z-index: 2;
}
.saito-emoji {
	position: absolute;
	right: 0;
	bottom: 0;
	padding: 0.8rem 0.5rem;
	color: var(--saito-primary);
	cursor: pointer;
	transition: all 0.2s;
	font-size: 2rem;
}
.selection-box-window emoji-picker {
	width: 100%;
	height: 100%;
	display: flex;
}
.saito-input-large .selection-box-tabs {
	width: 14rem;
	border-top: none;
	background: transparent;
	align-items: flex-end;
	justify-content: space-between;
}
.saito-input-contact-list {
	width: calc(100% - 2px);
	position: absolute;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	padding: 0.5rem;
	font-size: 2rem;
	overflow: auto;
	flex: 1;

	/* for popping up over input field */
	max-height: 200px;
	bottom: 0;
}
.saito-input-contact {
	cursor: pointer;
	display: flex;
	gap: 0.5rem;
	width: 100%;
	align-items: center;
	height: 4rem;
	padding: 0.75rem;
}
.saito-input-contact:hover,
.saito-input-contact:focus {
	background-color: var(--saito-primary);
}
.saito-input-quote {
	display: grid;
	grid-template-columns: 5rem auto 3rem;
	align-items: center;
	font-size: 1.5rem;
}
.saito-input-quote i {
	justify-self: center;
	font-size: 2rem;
}
.saito-input-quote blockquote {
	background-color: var(--saito-secondary);
	cursor: default;
}
.saito-input-quote .cancel-quote {
	cursor: pointer;
	font-size: 2.5rem;
	width: 40px;
	height: 40px;
	border-radius: 40px;
	display: flex;
	justify-content: center;
	align-items: center;
}
.chat-footer .saito-input-quote i:hover {
	transform: unset;
}
.saito-input-quote .cancel-quote:hover {
	background-color: var(--saito-primary);
	color: var(--saito-primary-foreground);
}
/* saito mentions list */.saito-mentions-list {
	position: absolute;
	z-index: 104;
	color: var(--saito-foreground);
	max-height: 30rem;
	overflow-y: scroll;
	font-size: 1.6rem;
	padding: 0.5rem 0 0.5rem 0.2rem;
	max-width: 100%;
	width: 36rem;
}
.saito-mentions-list.hidden {
	border: none;
}
.saito-mentions-list.empty {
	border: none;
	background: none;
}
.saito-mentions-list .saito-mentions-item {
	padding: 0.55rem;
	width: calc(100% - 4rem);
	overflow: hidden;
	text-overflow: ellipsis;
}
.saito-mentions-list .saito-identicon {
	width: 3rem;
	height: 3rem;
}
.saito-mentions-item.selected {
	background-color: var(--saito-primary);
	color: var(--saito-primary-foreground);
}
.saito-mentions-item:hover {
	cursor: pointer;
}
.saito-mentions-contact {
	cursor: pointer;
	display: flex;
	width: 100%;
	align-items: center;
	height: 4rem;
	padding: 0.75rem 0.5rem;
	gap: 0.5rem;
}
.saito-mentions-contact:hover .saito-mentions-item {
	background-color: var(--saito-background);
	color: var(--saito-foreground);
}
@media only screen and (max-width: 768px) {
.saito-input-large .selection-box-tabs {
		align-items: center;
		height: 6rem;
		width: 14rem;
		margin-left: unset;
	}
.saito-box-tab {
		font-size: 3rem;
	}
}/***
 * 
 * We have some name space confusion ....
 * TODO: FIX !!!!
 * 
 * this css looks like it is for game invites in Arcade and the sidebar in RedSquare
 * 
 * maybe should change to saito-game...
 * 
 */

.saito-module {
  display: flex;
  flex-wrap: wrap;
  row-gap: var(--saito-space-md);
  flex-direction: row;
  justify-content: space-between;
  position: relative;
  width: 100%;
  cursor: pointer;
  padding: var(--saito-space-md);
  align-items: center;
  background-size: cover;
  background-position: center;
  background-color: var(--saito-card);
  background-blend-mode: soft-light;
  border-radius: var(--saito-radius);
  border: 1px solid var(--saito-border);
  box-shadow: var(--saito-elevation-0);
  overflow: hidden;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

.saito-module:hover {
  background-color: color-mix(in srgb, var(--saito-card) 86%, var(--saito-accent));
  border-color: var(--saito-border);
  box-shadow: var(--saito-elevation-0);
  transform: none;
}

.saito-module-titlebar {
  padding: var(--saito-space-xs);
  max-width: 18rem;
  min-width: 12rem;
  width: 18rem;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  overflow-wrap: break-word;
  opacity: 0.8;
  background: var(--saito-secondary);
  border-radius: var(--saito-radius);
}

.saito-module-titlebar-title {
  margin: 0.25rem;
  color: var(--saito-secondary-foreground);
  font-size: 2rem;
}

.saito-module-titlebar-details {
  font-size: 1.4rem;
  text-transform: uppercase;
  color: var(--saito-secondary-foreground);
}

.saito-game-details {
  display: flex;
  flex-direction: row;
  column-gap: 1rem;
  align-items: center;
  flex-grow: 1;
  justify-content: flex-end;
}

.saito-module-identicon {
  border: none;
}

/*
    Small tweaks for when the saito-module is crammed into a sidebar
*/
.saito-sidebar .saito-module {
  padding: var(--saito-space-xs);
}

.saito-sidebar .saito-module-titlebar {
  width: unset;
}

.saito-sidebar .saito-module-titlebar-details {
  font-size: 1.2rem;
}

/***
 * 
 * Here is fresh code for actual saito-module stuff, a new (19 Jan 2024) UI component
 * for handling generic module stuff. It should display basic metadata about the module
 * and have selectable options that we would save in the app.options[module] section.
 * The basic idea is to have a way to change module settings from outside of the module!
 * 
 * Maybe also useful when we resurrect the appstore
 * 
 */

.saito-module-overlay {
  display: flex;
  flex-direction: column;
  row-gap: var(--saito-space-md);
  width: min(90vw, 80rem);
  max-height: 70vh;
  overflow: auto;
  padding: var(--saito-space-xl);
  user-select: none;
}

/* Lightweight shell used when modules inject settings into an overlay.
 * Density aligns with RedSquare `.settings` (title --font-size-large, ~52rem width). */
.module-settings-overlay {
  display: flex;
  flex-direction: column;
  width: min(52rem, 92vw);
  min-width: 0;
  min-height: 0;
  max-width: 95vw;
  max-height: min(88vh, 72rem);
  padding: var(--saito-space-lg);
  border-radius: var(--saito-radius);
  border: 1px solid var(--saito-border);
  gap: var(--saito-space-md);
}

.module-settings-overlay > h2 {
  margin: 0;
  font-size: var(--font-size-large);
  font-family: var(--saito-font-medium);
  font-weight: normal;
  line-height: 1.2;
}

.module-settings-overlay .saito-module-settings {
  overflow-y: auto;
  padding: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.module-settings-overlay .saito-module-settings::-webkit-scrollbar {
  display: none;
}

@media screen and (max-width: 600px) {
  .module-settings-overlay {
    width: 100%;
    max-height: 100vh;
    padding: var(--saito-space-md);
  }
}

.saito-module-header {
  background: var(--saito-background);
  background-size: cover;
  background-position: center;
  padding: var(--saito-space-xs);
}

.saito-module-header .saito-module-titlebar {
  max-width: 100%;
  width: 100%;
  padding: var(--saito-space-xs) var(--saito-space-md);
}

.saito-module-overlay .saito-module-titlebar {
  background: var(--saito-background);
  color: var(--saito-foreground);
}

.saito-module-details,
fieldset.saito-grid {
  padding: 1.25rem var(--saito-space-md);
  border-radius: var(--saito-radius);
  border: 1px solid var(--saito-border);
}

.saito-module-details {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: var(--saito-space-md);
  margin: var(--saito-space-md);
}

.saito-module-overlay > h4 {
  margin-left: 1rem;
}

.saito-module-settings {
  padding: var(--saito-space-md);
}

fieldset.saito-grid {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: var(--saito-space-md);
  align-items: center;
  margin: var(--saito-space-md) 0;
  position: relative;
}

fieldset.saito-grid > fieldset.saito-grid {
  grid-column-start: 1;
  grid-column-end: span 2;
}

fieldset.saito-grid .note {
  margin-left: 5px;
}

.saito-module-settings .note {
  font-style: italic;
}

.saito-grid input,
.saito-grid label {
  cursor: pointer;
}

/* Same leading column for icons and checkboxes — drop form-control side margins. */
fieldset.saito-grid > i,
fieldset.saito-grid > .saito-checkbox,
fieldset.saito-grid > input.saito-checkbox[type='checkbox'],
fieldset.saito-grid > .saito-radio,
fieldset.saito-grid > input.saito-radio[type='radio'] {
  margin: 0;
  justify-self: start;
}

.saito-grid-extra-button {
  position: absolute;
  right: 1rem;
  bottom: 0.25rem;
  min-height: min(70%, 40px);
  max-width: 50%;
}

.saito-grid i {
  margin: 0;
  font-size: var(--font-size-medium);
  cursor: pointer;
  color: var(--saito-muted-foreground);
}

.settings-link,
.settings-link label {
  cursor: pointer;
}

.settings-link:hover label {
  text-decoration: underline;
  color: var(--font-color-hover-module-menu);
}

.saito-module-settings .flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: var(--saito-space-md);
}
/*
 * Shared file-drop overlay — layout for Vault Upload / Install Module dropzones.
 * Appearance from Saito tokens. Modules do not re-skin this surface.
 */

.saito-file-drop-overlay {
  width: min(42rem, 95vw);
  gap: var(--saito-space-md);
}

.saito-file-drop-body {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.saito-file-drop-zone-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: min(32rem, 50vh);
}

.saito-file-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--saito-space-md);
  width: 100%;
  max-width: 100%;
  height: min(32rem, 50vh);
  min-height: min(32rem, 50vh);
  padding: var(--saito-space-xl);
  box-sizing: border-box;
  border: 1px solid var(--saito-border);
  border-radius: var(--saito-radius);
  background-color: var(--saito-secondary);
  color: var(--saito-muted-foreground);
  text-align: center;
  font-size: 1.6rem;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease;
}

.saito-file-dropzone:hover {
  border-color: var(--saito-primary);
}

.saito-file-dropzone i {
  display: block;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--saito-muted-foreground);
}

.saito-file-dropzone-text {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.4;
  color: var(--saito-muted-foreground);
}

@media (max-width: 768px) {
  .saito-file-drop-overlay .saito-file-drop-body,
  .saito-file-drop-overlay .saito-file-drop-zone-wrap {
    width: 100%;
    min-width: 0;
  }
}
/* ----------------------------------------------------------------
Saito Identicon
-----------------------------------------------------------------*/

.saito-identicon {
  width: 3.5rem;
  height: 3.5rem;
  border: 1px solid var(--saito-background);
  border-radius: var(--saito-radius);
  background: var(--saito-background);
}

.saito-identicon-box {
  width: 3.5rem;
  height: 3.5rem;
  border: 1px solid var(--saito-background);
  border-radius: var(--saito-radius);
  cursor: pointer; /* app.browser tries to turn all .saito-identicon into clickable target */
}

.saito-identicon-box .saito-identicon {
  /* It should grow to fit the box! */
  width: 100%;
  height: 100%;
  border-radius: inherit;
  border: none;
}

/* ----------------------------------------------------------------
Saito Username  --- Partially duplicated in saito-base
-----------------------------------------------------------------*/

.saito-user > .saito-address-long {
  grid-column-end: 4;
  display: flex;
  flex-direction: row;
  align-items: center;
  column-gap: 1rem;
}

/* ----------------------------------------------------------------
Saito User
-----------------------------------------------------------------*/

.saito-user {
  display: grid;
  column-gap: 1rem;
  grid-template-columns: min-content 1fr min-content;
  grid-template-rows: min-content 1fr;
  justify-items: start;
  width: 100%;
  position: relative;
  white-space: nowrap; /* don't auto wrap time stamps or stuff */
  row-gap: 0;
}

/*  saito-identicon-box  */

.saito-user > .saito-identicon-box {
  grid-column-start: 1;
  grid-column-end: span 1;
  grid-row: span 2;
  position: relative;
}

.saito-user > .saito-identicon-box .saito-identicon {
  opacity: 0.85; /* make identicons less harsh */
}

.saito-user > .saito-identicon-box .saito-identicon[data-id]:hover {
  opacity: 1;
}

.saito-user > .saito-address {
  color: var(--saito-foreground);
  grid-column-start: 2;
  grid-column-end: span 1;
  grid-row-start: 1;
  grid-row-end: span 1;
  font-size: 1.5rem;
  whitespace: nowrap;
}

.saito-user[data-disable='true'] > .saito-address,
.saito-user[data-disable='true'] > .saito-identicon-box {
  cursor: unset; /* allow inheritance from parent for otherwise clickable event */
}

.saito-user > .saito-userline {
  grid-column-start: 2;
  grid-column-end: span 1;
  grid-row-start: 2;
  grid-row-end: span 1;
  font-size: 1.4rem;
  /* Added for all the publickeys in saito-userlines that overflow */
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saito-user .saito-datetime {
  cursor: pointer;
  grid-column-start: 3;
  grid-column-end: span 1;
  grid-row: span 2;
  font-size: 1.4rem;
  align-items: top;
}

.saito-user-fourth-elem-large {
  grid-row: span 2;
}

.saito-overlay .saito-user {
  max-width: 90vw;
}

.saito-anon {
  margin-right: 3px;
  font-style: italic;
}

/****************************
 * Account Login
 * *************************/
/* Chat / bubble tokens — owned by saito-chat (not shared design-system API) */
:root {
  --saito-chat-background: var(--saito-background);
  --saito-chat-background-image: var(--saito-card-wash);
  --saito-chat-shell-background: var(--saito-card-wash);
  --saito-bubble-background: var(--saito-card-wash);
  --saito-bubble-shadow: var(--saito-elevation-0);
  --saito-chat-active-background: var(--saito-accent);
  --saito-chat-header-shadow: var(--saito-elevation-0);
  --saito-chat-notification-gradient: linear-gradient(90deg, transparent, var(--saito-chart-2), transparent);
}

.chat-manager {
  min-height: 25%;
  /*flex: 1;*/
  position: relative;
  display: grid;
  /* Content-sized header — avoid empty band under CHATS before the list */
  grid-template-rows: auto 1fr;
  user-select: none;
  background-color: var(--saito-chat-background);
  background-image: var(--saito-chat-background-image);
}

.chat-manager .saito-userline {
  text-overflow: ellipsis;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  min-width: 0;
  height: auto;
  line-height: 1.55;
  color: var(--saito-muted-foreground);
  font-style: normal;
  transition: color 0.2s;
}

.chat-manager .saito-userline .img-prev {
  max-width: 100%;
  cursor: pointer;
}

.chat-popup-img-overlay-box {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid var(--saito-border);
  border-radius: var(--saito-radius);
  background-image: var(--saito-chat-background-image);
  background-color: var(--saito-chat-background);
}

.chat-popup-img-enhanced {
  max-height: 80vh;
  max-width: 95vw;
  border: 1px solid var(--saito-border);
  border-radius: var(--saito-radius);
}

.chat-manager .saito-user {
  grid-template-columns: min-content minmax(0, 1fr) min-content;
  grid-template-rows: 2rem 1.8rem;
  align-items: center;
  column-gap: 1rem;
  padding: 0.75rem 0.8rem;
  border-radius: var(--saito-radius);
  overflow: hidden;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.chat-manager .saito-address {
  min-width: 0;
  max-width: 100%;
  align-self: end;
}

.chat-manager .chat-group-name {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hover from shared .saito-menu-select-heavy; keep secondary line in the active row. */
.chat-manager .saito-user:hover .saito-userline {
  color: inherit;
}

.chat-manager-list {
  gap: 0.2rem;
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  max-height: 100%; /*calc(100% - 5rem);*/
  position: relative;
  margin-top: 0;
  padding: 0;
}

.chat-manager-list .saito-address {
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.8rem;
}

.chat-manager-list .saito-userline {
  font-size: 1.32rem;
  line-height: 1.55;
}


.new-notification {
  background: var(--saito-chat-notification-gradient);
  background-size: 300%;
  animation: notificationAnimation 1.8s ease;
}

.new-notification .saito-chat-notifications {
  visibility: hidden;
}

@keyframes notificationAnimation {
  0% {
    background-position: 100%;
  }
  100% {
    background-position: 0%;
  }
}

.chat-popup .saito-notification-dot {
  min-width: 3.5rem;
  min-height: 3.5rem;
  bottom: 6rem;
  left: unset;
  right: 2rem;
  cursor: pointer;
}

.chat-popup.minimized .saito-notification-dot {
  min-height: unset;
  height: 100%;
  left: 0;
  bottom: 0;
  border-radius: 0;
  z-index: inherit;
}

.chat-popup .saito-notification-dot i,
.chat-popup .saito-notification-dot:hover .new-message-count {
  display: none;
}

.chat-popup .saito-notification-dot:hover i {
  display: block;
}

.chat-popup.minimized .saito-notification-dot:hover i {
  display: none;
}

.chat-popup.minimized .saito-notification-dot .new-message-count {
  display: block;
}

.chat-popup .saito-link-preview {
  max-width: 40rem;
}

.chat-popup .saito-link-preview-info {
  padding: 1rem;
}

.chat-popup .saito-treated-link[data-link='local_link'] .saito-link-preview-img.has-picture {
  max-height: 10rem;
}

/* Chat teaser indicating said chat is open in a popup */
.saito-chat-active {
  background-color: var(--saito-chat-active-background);
  color: var(--saito-muted-foreground);
}

.chat-body blockquote {
  cursor: help;
}

/* Embedded chat container */

.chat-static {
  height: 100%;
  width: 100%;
  position: relative;
}

.chat-static .chat-minimizer-icon,
.chat-static .chat-maximizer-icon,
.chat-static .chat-container-close,
.chat-static .fa-comment-dots {
  display: none;
}

.chat-container {
  position: fixed;
  bottom: 0px;
  border: 1px solid var(--saito-border);
  background: var(--saito-chat-shell-background);
  color: var(--saito-foreground);
  max-height: 100vh;
  min-width: 30rem;
  min-height: 20rem;
  height: 50rem;
  width: 36rem;
  border-radius: var(--saito-radius);
  z-index: 20;
  /* making z-index greater than overlay so that users
     can chat or send each other their crypto address without
     closing the withdraw overlay
  */
  /* So weird, at 15 it blocks the z-index 20 slide in menu*/
  /* reason: the slidein is child of saito header, so whatever z-index is assigned to saito header,
  the child (slidein menu) inherits it */
  box-shadow: var(--saito-elevation-2);
}

.chat-container,
.chat-container .chat-body,
.chat-container .chat-footer {
  transition: all 0.15s ease-in-out;
}

.chat-popup {
  display: grid;
  grid-template-rows: min-content 1fr min-content;
  grid-template-columns: 100%;
  align-items: center;
}

.chat-container.active {
  z-index: 21;
}

.chat-container.dragging {
  z-index: 22;
}

.chat-container.minimized {
  height: 3rem;
  min-height: unset;
  grid-template-rows: 30px auto;
}

.chat-container.minimized .chat-body,
.chat-container.minimized .chat-footer {
  height: 0;
  min-height: unset;
  overflow: hidden;
  padding: 0;
  opacity: 0;
  /*
  This works but is a little abrupt
  display: none;
  */
}

.chat-container.minimized .chat-header {
  min-height: unset;
}

.chat-body img {
  /* If a small image, we don't want to zoom in
  but the width: 100% should keep it from being to big
   */
  max-width: fit-content;
  width: 100%;
}

.chat-header {
  z-index: inherit;
  min-height: 6rem;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  width: 100%;
  background-color: var(--saito-background);
}

.chat-header > .chat-header-nav {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  border-bottom: 1px solid var(--saito-border); /* border splitting the header on chat popup*/
  cursor: grab;
  font-size: 1.7rem;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  padding-left: 1rem;
  overflow: hidden; /* for extreme border radius */
}

.chat-header > .chat-header-nav > i {
  margin: 0;
  color: var(--saito-foreground); /* popup-button colour */
  font-size: 1.4rem;
  display: inline-block;
  position: relative;
  transition: all 0.2s;
  cursor: pointer;
  padding: 0.5rem;
  height: 100%;
  width: 2.4rem;
  text-align: center;
}

.chat-header > .chat-header-nav > i:hover {
  background-color: var(--saito-primary);
  color: var(--saito-primary-foreground);
}

.fix-me {
  cursor: pointer;
}

.chat-container.minimized .chat-header-nav {
  align-items: center;
  height: 3rem;
}

.chat-container.minimized .chat-header-nav > i {
  padding: 0.8rem 0.5rem;
}

.chat-header-info {
  height: 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) min-content;
  align-items: center;
  box-shadow: var(--saito-chat-header-shadow);
}

.chat-container.minimized .chat-header-info {
  display: none;
}

.chat-actions {
  display: flex;
  flex-direction: row-reverse;
}

.chat-action-icons {
  display: flex;
  flex-direction: row;
  height: 100%;
  align-items: center;
  font-size: 2rem;
  color: var(--saito-foreground); /* ellipsis */
}

.chat-action-item,
.chat-action-menu,
.chat-mobile-back {
  cursor: pointer;
  height: 4rem;
  width: 3.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s;
}

.chat-action-menu {
  width: 3rem;
}

.chat-action-item:hover,
.chat-action-menu:hover {
  background-color: var(--saito-primary);
  color: var(--saito-primary-foreground);
}

.chat-action-item:hover i,
.chat-action-menu:hover i {
}

/*.chat-header > i:last-child:hover {
  transform: rotate(90deg) scale(1.1);
}*/

.chat-header .chat-group {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: default;
  font-size: 1.7rem;
}

.chat-header .chat-group.saito-address {
  cursor: pointer;
}

.chat-header-nav .chat-details,
.chat-header-info .chat-details {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-left: 1rem;
  align-items: center;
}

.chat-header-nav .chat-details {
  display: none;
}

.chat-header-nav .chat-details .chat-group {
  max-width: 82%;
}

.chat-popup.minimized .chat-header .chat-header-nav .chat-details {
  display: flex;
}

.chat-mobile-back {
  display: none;
  font-size: 24px;
}

.chat-body {
  padding: 1rem;
  display: block;
  height: 100%;
  overflow: clip auto;
  background-image: var(--saito-chat-background-image);
  background-color: var(--saito-chat-background);
}

.chat-body > .saito-user {
  padding-bottom: 1.5rem;
  cursor: default;
  grid-template-rows: min-content 1fr;
  min-height: 5.5rem;
  gap: 0 2rem;
}

.chat-body .saito-user .saito-userline {
  /* others messages*/
  font-size: 1.6rem;
  padding: 0.75rem;
  padding-right: 3rem;
  border-radius: var(--saito-radius);
  background: var(--saito-bubble-background);
  box-shadow: var(--saito-bubble-shadow);
  margin-right: 1rem;
  height: fit-content;
  overflow: visible;
}

.chat-body .saito-user > .saito-address {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  font-family: var(--saito-font);
  color: var(--saito-muted-foreground);
}

.chat-body .saito-user-self.saito-user {
  display: flex;
  justify-content: flex-end;
}

/* self's messages -- inverse of other people's messages */
.chat-body .saito-user-self.saito-user .saito-userline {
  box-shadow: var(--saito-bubble-shadow);
}

/* hide my own name */

.chat-body .saito-user-self.saito-user > .saito-address,
.chat-body .saito-user-self.saito-user > .saito-identicon-box {
  display: none;
}

.saito-mention.saito-address.treated {
  display: inline-block !important;
  margin: 0 8px 0 0;
}

/* Hide user names in 2-person chats */

.saito-dm-chat .chat-body .saito-user .saito-address {
  visibility: hidden;
  height: 0;
}

.chat-body .saito-identicon-box {
  align-self: end;
}

.saito-time-stamp {
  font-size: 1.4rem;
  text-align: center;
  color: var(--saito-muted-foreground);
  font-style: italic;
  margin: 3px 0;
}

.saito-chat-notice {
  color: var(--saito-muted-foreground);
  font-style: italic;
}

.saito-chat-line-controls {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  grid-row: span 2;
}

.chat-message-line {
  position: relative;
  padding: 0.25rem;
  word-wrap: anywhere;
  white-space: normal;
}

.chat-message-line p {
  overflow: hidden;
  height: min-content;
}

.chat-message-line li {
  margin-left: 2rem;
}

.saito-userline-reply {
  display: none;
}

.chat-body .saito-userline {
  width: unset !important;
  min-width: 10rem;
  max-width: 600px;
}

.chat-message-line .saito-userline-reply {
  display: flex;
  position: absolute;
  flex-direction: row;
  align-items: center;
  right: -5rem;
  bottom: 1; /* bumped it down a notch, and closer to the element */
  z-index: 9;
  background-color: var(--saito-popover);
  background-image: var(--saito-popover-wash);
  border-radius: var(--saito-radius);
  border: 1px solid var(--saito-border);
  font-size: 1.1rem; /* made this way smaller, but this way access immediately below the line works better */
  opacity: 0; /* Initial opacity set to 0 for invisibility */
  transition: opacity 0.3s ease-in-out; /* Transition effect on opacity */
}

.chat-message-line .saito-userline-reply > div {
  padding: 4px;
  cursor: pointer;
  min-height: 22px;
  min-width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-message-line .saito-userline-reply > div.saito-chat-line-timestamp {
  cursor: revert;
}

.chat-message-line:hover .saito-userline-reply {
  opacity: 1; /* Opacity set to 1 on hover to make the element visible */
}

.chat-likes {
  right: -4rem;
  bottom: 0;
  display: flex;
  width: 40px;
  font-size: 1.3rem;
  font-weight: bold;
  align-items: center;
  gap: 0.25rem;
}

.chat-likes .chat-like-number {
  margin-left: 0.2rem;
}
.saito-user-self .chat-message-line:hover .saito-userline-reply {
  right: -2.5rem;
}

.saito-user-self .chat-message-line .saito-userline-reply .chat-message-action {
  display: none;
}

.saito-user .saito-userline-reply i:hover {
  transform: scale(1.2);
  color: var(--saito-primary);
  cursor: pointer;
}

.chat-footer {
  min-height: 4.5rem;
  height: fit-content;
  font-size: 2rem;
  /*position: absolute;
  bottom: 0;*/
  width: 100%;
  padding: 0;
  display: flex;
  flex-flow: row;
  align-items: center;
  z-index: 2;
  border-top: 1px solid var(--saito-border);
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  background: var(--saito-chat-shell-background);
  position: relative;
}

.chat-container blockquote {
  color: inherit;
  line-height: 2.5rem;
  margin: 0.5rem 0;
}

.chat-footer .saito-emoji {
  top: 50%;
  bottom: auto;
  width: 4.3rem;
  height: 4.3rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
}

.chat-footer .saito-input .text-input:not(.post-tweet-textarea) {
  border-color: transparent;
  box-shadow: none;
}

/*
.chat-footer .saito-input .text-input:not(.post-tweet-textarea):focus,
.chat-footer .saito-input .text-input:not(.post-tweet-textarea):focus-within {
  border-color: var(--saito-border);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--saito-border) 34%, transparent);
}*/

/* This is the submit paper airplane icon */

.chat-footer > i {
  color: var(--saito-primary);
  cursor: pointer;
  z-index: 2;
  transition: all 0.2s;
  font-size: 2rem;
  align-content: center;
  text-align: center;
}

.chat-footer > .chat-input-submit.saito-button-mouse-over {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.3rem;
  height: 4.3rem;
  padding: 0;
  line-height: 1;
}

.chat-footer > .chat-input-submit:hover {
  animation: saito-button-mouse-over-pulse 0.9s ease-in-out infinite;
  transform: scale(1.06);
}

.chat-footer .saito-emoji:hover {
  transform: translateY(-50%);
}

.chat-footer .selection-box-tabs i:hover,
.chat-footer .saito-box-tab:hover {
  transform: none;
}

.dockedLeft {
  border-left: 3px solid var(--saito-primary) !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.dockedRight {
  border-right: 3px solid var(--saito-primary) !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.dockedTop {
  border-top: 3px solid var(--saito-primary) !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

.dockedBottom {
  border-bottom: 3px solid var(--saito-primary) !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.remove_user {
  padding: 0.5rem;
}

.remove_user:hover {
  color: var(--saito-muted-foreground);
}

.chat-main-container {
  background-color: var(--saito-chat-background);
  background-image: var(--saito-chat-background-image);
}

.chat-main-container .chat-body {
  background-color: transparent;
  background-image: none;
}

.chat-main-container .saito-sidebar.left {
  background: var(--saito-chat-shell-background);
}

.saito-chat-button {
  cursor: pointer;
  width: fit-content;
  margin: auto;
  padding: 4px;
  color: var(--saito-border);
  font-style: italic;
  font-size: 1.4rem;
}

.saito-chat-button:hover {
  font-style: normal;
  color: var(--saito-foreground); /* testing */
}

/* Chat manager header controls — only rendered when needed by template */

.close-chat-manager {
  position: relative;
  height: 100%;
}

.close-chat-manager i {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0.6rem 1.1rem;
  color: var(--saito-foreground);
  background: var(--saito-background);
  font-size: 24px;
}

.chat-manager-options {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--saito-radius);
  color: var(--saito-muted-foreground);
  transition:
    background-color 0.2s,
    color 0.2s;
}

.chat-manager-options:hover {
  background-color: color-mix(in srgb, var(--saito-card) 86%, var(--saito-accent));
  color: var(--saito-foreground);
}

.chat-manager-overlay .chat-manager-header {
  font-size: 20px;
  padding-right: 1rem;
}

.chat-manager-overlay {
  background-color: var(--saito-popover);
  position: absolute;
  left: 0;
  top: var(--saito-header-height);
  z-index: 90;
  width: 300px;
  border: 1px solid var(--saito-border);
  box-shadow: var(--saito-elevation-3);
  border-radius: var(--saito-radius);
  height: fit-content;
  overflow: hidden;
}

.floating-cm-overlay .chat-manager-header {
  cursor: grab;
}

.alternate-close-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 30px;
}

.chat-manager-overlay .chat-manager-list.saito-sidebar-element {
  padding: 0;
  border: 0;
  background: transparent;
}

.chat-manager-overlay.floating-cm-overlay .chat-manager {
  max-height: 400px;
}

.chat-manager-overlay.floating-cm-overlay .chat-manager-list {
  min-height: unset;
  max-height: unset;
}

.chat-popup.maximized .chat-maximizer-icon,
.chat-popup.minimized .chat-minimizer-icon {
  background-color: var(--saito-primary);
  color: var(--saito-primary-foreground);
}

@media screen and (max-width: 720px) {
  .chat-manager-overlay .chat-manager-title {
    display: none;
  }

  .chat-header i.chat-sizing-icon {
    display: none;
  }

  .chat-header > .chat-header-nav > i.chat-container-close {
    width: 4rem;
    text-align: center;
    font-size: 2.4rem;
  }

  .chat-container,
  .chat-container .chat-body,
  .chat-container .chat-footer {
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
  }
}

@media screen and (max-width: 600px) {
  .chat-manager-overlay {
    top: 0;
    height: 100dvh;
    width: 100vw;
    max-height: -webkit-fill-available;
    max-width: -webkit-fill-available;
    border-radius: unset;
    transition: height 0.3s;
  }

  .chat-manager-overlay .chat-manager {
    margin-left: auto;
    margin-right: auto;
    min-height: 25rem;
    height: 100%;
    grid-template-rows: var(--saito-header-height) 1fr;
  }

  .chat-manager-list {
    background-color: var(--saito-background);
  }

  .chat-manager-overlay .close-chat-manager i {
    width: 45px;
    height: 70px;
    font-size: 3rem;
    padding: 2rem 0.8rem;
  }

  .chat-container {
    margin: 0;
    min-width: unset;
    width: 100vw;
    height: 100dvh;
    transition: height 0.3s;
    max-height: -webkit-fill-available;
    max-width: -webkit-fill-available;
    border-radius: 0;
    background: var(--saito-background);
    z-index: 91;
    /* For the keyboard */
    right: 0 !important;
    bottom: 0 !important;
    top: 0 !important;
    left: 0 !important;
  }

  .chat-container .chat-header,
  .chat-container .chat-footer,
  .chat-container .chat-body {
    background-color: var(--saito-background);
  }

  .chat-header > .chat-header-nav {
    display: none;
  }

  .chat-header-info {
    grid-template-columns: min-content minmax(0, 1fr) min-content;
  }

  .chat-mobile-back {
    display: flex;
    margin: 1rem;
  }

  /* emoji-picker breaks this */
  .chat-manager-overlay + .chat-container {
    height: 100dvh;
    transition: height 0.3s;
    z-index: 91;
  }

  .chat-header-info {
    height: 6rem;
  }
}
/*
  SaitoModal — layout shell for pickers / menus.
  Typography and control appearance inherit the Saito design system.
*/

.saito-modal,
.saito-contacts,
.saito-share-link,
.saito-user-menu {
  min-width: 70rem;
  height: min-content;
  max-width: 80vw;
  max-height: 95vh;
  padding: var(--border-padding-wide);
  display: grid;
  grid-template-rows: min-content 1fr min-content;
}

.saito-modal-title {
  margin: 0;
  padding-bottom: var(--saito-space-sm, 0.5rem);
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 2.5rem;
  color: var(--saito-foreground);
}

.saito-modal-content {
  overflow: auto;
}

.saito-share-link {
  background-color: var(--saito-background);
}

.saito-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--saito-space-md);
  margin-top: var(--saito-space-sm, 0.5rem);
  padding: var(--saito-space-sm, 0.5rem);
  border-radius: var(--saito-radius);
}

/* Click events target the contact container, not nested user chrome */
.saito-contact .saito-user {
  pointer-events: none;
}

.secure-contact-notice {
  position: absolute;
  left: 3rem;
  top: 0;
  z-index: 2;
  color: var(--saito-muted-foreground);
  text-shadow: 2px 2px 2px var(--saito-black);
}

.saito-modal-title + .saito-modal-content {
  border-top: 3px solid var(--saito-border);
}

.saito-modal-content .saito-user {
  height: 5rem;
  align-items: center;
}

.saito-modal-content .saito-user .saito-identicon-box {
  width: 4.5rem;
  height: 4.5rem;
}

.saito-user-menu .saito-modal-title .saito-user {
  width: calc(100% - 2.5rem);
  height: 6rem;
  padding: 0 1.25rem;
  align-items: center;
  white-space: nowrap;
  cursor: default;
}

.saito-user-menu .saito-modal-title .saito-identicon-box {
  width: 5.5rem;
  height: 5.5rem;
}

.saito-user-menu .saito-identicon-box {
  cursor: default;
}

/* Menu options — layout + touch density; type from design tokens */
.saito-modal-menu-option {
  display: grid;
  grid-template-columns: 4rem 1fr;
  align-items: center;
  gap: var(--saito-space-md);
  height: 6rem;
  margin-top: 0.25rem;
  padding: 1.5rem 3rem;
  border-radius: var(--saito-radius);
  font-size: 2rem;
  cursor: pointer;
  position: relative;
}

.saito-modal-tagline {
  margin: var(--saito-space-sm, 0.5rem) 0 var(--saito-space-md);
  font-style: italic;
}

.saito-modal-point {
  display: grid;
  grid-template-columns: 4rem 1fr;
  align-items: center;
  gap: var(--saito-space-lg);
  padding: var(--saito-space-sm, 0.5rem);
  font-size: 2rem;
}

.saito-modal-point i {
  justify-self: center;
  font-size: 2.5rem;
}

.saito-modal-menu-option > i {
  justify-self: center;
}

.saito-modal-menu-option > div,
.saito-modal-menu-option-label {
  display: flex;
  align-items: center;
  min-width: 0;
}

.saito-modal-title .saito-user .saito-address {
  font-size: 3.5rem;
}

.saito-overlaid-icon {
  position: absolute;
  left: 34%;
  top: 34%;
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(90%, 5rem);
  height: min(90%, 5rem);
  border-radius: 50%;
  border: 1px solid var(--saito-foreground);
  background: var(--saito-secondary);
  color: var(--saito-secondary-foreground);
}

@media only screen and (max-width: 1000px) {
  .saito-modal {
    width: 90vw;
    min-width: unset;
    max-width: unset;
    padding: var(--saito-space-md);
    grid-template-columns: 100%;
  }

  .saito-modal > * {
    max-width: 100%;
  }
}

@media only screen and (max-width: 768px) {
  .saito-modal-menu-option {
    margin: 0 1rem;
  }
}

@media only screen and (max-width: 525px) {
  .saito-user-menu .saito-modal-title .saito-user {
    margin: 0;
  }

  .saito-modal-menu-option {
    margin: 0;
    padding: 1.5rem 1rem;
  }
}

.qr-share-overlay {
  width: max-content;
  padding: var(--saito-space-lg);
  border: var(--saito-border);
}

.qr-share-header {
  display: flex;
  justify-content: center;
  font-size: 2.5rem;
}

#qr-share-link {
  margin: var(--saito-space-lg);
}

#qr-share-link img,
#qr-share-link svg {
  height: auto;
  max-width: 24rem;
  width: 24vh;
  padding: var(--border-padding-normal);
  border: 2px solid var(--saito-primary);
  border-radius: var(--saito-radius);
  background: var(--saito-background);
}
/* ----------------------------------------------------------------
font imports
-----------------------------------------------------------------*/
@font-face {
  font-family: 'p-word';
  src: url('/saito/fonts/password.ttf') format('truetype');
}
@font-face {
  font-family: 'digital-7';
  src: url('/saito/fonts/digital-7.mono.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'digital-7';
  src: url('/saito/fonts/digital-7.mono.italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'visuelt-black';
  src: url('/saito/fonts/visuelt-black.eot');
  src:
    url('/saito/fonts/visuelt-black.eot?#iefix') format('embedded-opentype'),
    url('/saito/fonts/visuelt-black.woff2') format('woff2'),
    url('/saito/fonts/visuelt-black.woff') format('woff'),
    url('/saito/fonts/visuelt-black.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  ascent-override: 102%;
  descent-override: 30%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'visuelt-light';
  src: url('/saito/fonts/visuelt-light.eot');
  src:
    url('/saito/fonts/visuelt-light.eot?#iefix') format('embedded-opentype'),
    url('/saito/fonts/visuelt-light.woff2') format('woff2'),
    url('/saito/fonts/visuelt-light.woff') format('woff'),
    url('/saito/fonts/visuelt-light.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  ascent-override: 102%;
  descent-override: 30%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'visuelt-medium';
  src: url('/saito/fonts/visuelt-medium.eot');
  src:
    url('/saito/fonts/visuelt-medium.eot?#iefix') format('embedded-opentype'),
    url('/saito/fonts/visuelt-medium.woff2') format('woff2'),
    url('/saito/fonts/visuelt-medium.woff') format('woff'),
    url('/saito/fonts/visuelt-medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  ascent-override: 102%;
  descent-override: 30%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'visuelt-regular';
  src: url('/saito/fonts/visuelt-regular.eot');
  src:
    url('/saito/fonts/visuelt-regular.eot?#iefix') format('embedded-opentype'),
    url('/saito/fonts/visuelt-regular.woff2') format('woff2'),
    url('/saito/fonts/visuelt-regular.woff') format('woff'),
    url('/saito/fonts/visuelt-regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  ascent-override: 102%;
  descent-override: 30%;
  line-gap-override: 0%;
}
/* Boot-loader chrome for prerendered CTA splash pages.
   Component surface lives in saito-cta.css. */

body.saito-cta-loader-active::before,
body.saito-cta-loader-complete::before {
  opacity: 0 !important;
  z-index: -2 !important;
  pointer-events: none !important;
}

@supports not selector(body:has(.saito-cta)) {
  body.saito-cta-loader-active .pace {
    display: none;
  }
}
/* ----------------------------------------------------------------
 Form elements — bare input/textarea/select are reset-only;
 appearance is opt-in via Saito component classes.
-----------------------------------------------------------------*//* Browser / reset only — no component chrome */input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  min-width: 0;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
}
/* Hide number spinners (browser chrome, not component look) */input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type='number'] {
  -moz-appearance: textfield;
}
/* File inputs stay invisible when used as hidden pickers */input[type='file'] {
  cursor: pointer;
}
input[type='hidden'] {
  display: none;
}
/* ----------------------------------------------------------------
 Text fields — input.saito-input / textarea.saito-textarea / select.saito-form-select
 (div.saito-input is the composer shell in saito-input.css)
-----------------------------------------------------------------*/
input.saito-input,
textarea.saito-textarea,
select.saito-form-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--saito-secondary);
  color: var(--saito-foreground);
  border: 1px solid var(--saito-border);
  font-size: 1.6rem;
  padding: 1rem;
  border-radius: var(--saito-radius);
  width: 100%;
  max-width: 100%;
  cursor: text;
}

.saito-form-control {
  background-color: var(--saito-secondary);
  color: var(--saito-foreground);
  border: 1px solid var(--saito-border);
  border-radius: var(--saito-radius);
}

.saito-form-dropdown {
  position: fixed;
  inset: auto;
  margin: 0;
  scrollbar-width: none;
  background-color: var(--saito-popover);
  color: var(--saito-popover-foreground);
  border: 1px solid var(--saito-border);
  border-radius: var(--saito-radius);
}

.saito-form-dropdown::-webkit-scrollbar {
  display: none;
}

.saito-form-dropdown-option:hover,
.saito-form-dropdown-option[aria-selected='true'] {
  background-color: var(--saito-secondary);
}

input.saito-input:-webkit-autofill,
input.saito-input:-webkit-autofill:hover,
input.saito-input:-webkit-autofill:focus,
input.saito-input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--saito-foreground) !important;
  caret-color: var(--saito-primary) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--saito-secondary) inset !important;
  box-shadow: 0 0 0 1000px var(--saito-secondary) inset !important;
}

select.saito-form-select {
  cursor: pointer;
  color: var(--saito-foreground);
  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 fill='%23a6a09b' d='M1.4 0.6L6 5.2 10.6 0.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2rem 0.8rem;
  padding-right: 3.2rem;
}
textarea.saito-textarea {
  resize: none;
}
input.saito-input::placeholder,
textarea.saito-textarea::placeholder {
  opacity: 1;
  color: var(--saito-muted-foreground);
}
input.saito-input[type='text'],
input.saito-input[type='email'],
input.saito-input[type='number'],
input.saito-input[type='password'],
input.saito-input[type='date'],
input.saito-input[type='datetime-local'],
input.saito-input[type='search'] {
  width: 100%;
}

/* ----------------------------------------------------------------
 Checkbox
-----------------------------------------------------------------*/input.saito-checkbox[type='checkbox'],
.saito-checkbox {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--saito-border);
  width: 2rem;
  height: 2rem;
  margin: 3px 0.5rem;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  display: inline-block;
}
input.saito-checkbox[type='checkbox']::after,
.saito-checkbox::after {
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  content: '\f00c';
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  font-size: 1.6rem;
  opacity: 0;
}
input.saito-checkbox[type='checkbox']:checked,
.saito-checkbox:checked {
  background-color: var(--saito-primary);
}
input.saito-checkbox[type='checkbox']:checked::after,
.saito-checkbox:checked::after {
  color: var(--saito-primary-foreground);
  opacity: 1;
}
input.saito-checkbox[type='checkbox']:focus-visible,
.saito-checkbox:focus-visible {
  outline: none;
  border-color: var(--saito-border);
  box-shadow: none;
}
/* ----------------------------------------------------------------
 Radio
-----------------------------------------------------------------*/input.saito-radio[type='radio'],
.saito-radio {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--saito-border);
  width: 2rem;
  height: 2rem;
  margin: 0 0.5rem;
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}
input.saito-radio[type='radio']::after,
.saito-radio::after {
  font-weight: 900;
  content: '';
  width: 1.5rem;
  height: 1.5rem;
  background-color: var(--saito-primary);
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  font-size: 1rem;
  opacity: 0;
  border-radius: 3px;
}
input.saito-radio[type='radio']:checked::after,
.saito-radio:checked::after {
  color: var(--saito-primary-foreground);
  opacity: 1;
}
input.saito-radio[type='radio']:focus-visible,
.saito-radio:focus-visible {
  outline: none;
  border-color: var(--saito-border);
  box-shadow: none;
}
/* ----------------------------------------------------------------
 Range
-----------------------------------------------------------------*/input.saito-range[type='range'],
.saito-range {
  -webkit-appearance: none;
  appearance: none;
  margin: 1.8rem 0;
  width: 100%;
}
input.saito-range[type='range']::-webkit-slider-runnable-track,
.saito-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 0.6rem;
  cursor: pointer;
  box-shadow: var(--saito-elevation-2);
  background: var(--saito-primary);
  border-radius: 0.5rem;
  border: var(--saito-border);
}
input.saito-range[type='range']::-webkit-slider-thumb,
.saito-range::-webkit-slider-thumb {
  box-shadow: var(--saito-elevation-2);
  border: 1px solid var(--color-contrast);
  height: 3rem;
  width: 2rem;
  border-radius: 0.5rem;
  background: var(--saito-foreground);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -1.2rem;
}
input.saito-range[type='range']::-moz-range-track,
.saito-range::-moz-range-track {
  width: 100%;
  height: 0.6rem;
  cursor: pointer;
  box-shadow: var(--saito-elevation-2);
  background: var(--saito-primary);
  border-radius: 0.5rem;
  border: var(--saito-border);
}
input.saito-range[type='range']::-moz-range-thumb,
.saito-range::-moz-range-thumb {
  box-shadow: var(--saito-elevation-2);
  border: 1px solid var(--color-contrast);
  height: 3rem;
  width: 2rem;
  border-radius: 0.5rem;
  background: var(--saito-foreground);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  margin-top: -1.2rem;
}
input.saito-range[type='range']:focus::-webkit-slider-runnable-track,
.saito-range:focus::-webkit-slider-runnable-track {
  background: var(--saito-primary);
}
input.saito-range[type='range']::-ms-track,
.saito-range::-ms-track {
  width: 100%;
  height: 8.4px;
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  border-width: 1.6rem 0;
  color: transparent;
}
input.saito-range[type='range']::-ms-fill-lower,
.saito-range::-ms-fill-lower {
  background: var(--saito-primary);
  border: var(--saito-border);
  border-radius: 0.5rem;
  box-shadow: var(--saito-elevation-2);
}
input.saito-range[type='range']::-ms-fill-upper,
.saito-range::-ms-fill-upper {
  border: var(--saito-border);
  border-radius: 0.5rem;
  box-shadow: var(--saito-elevation-2);
}
input.saito-range[type='range']::-ms-thumb,
.saito-range::-ms-thumb {
  box-shadow: var(--saito-elevation-2);
  border: 1px solid var(--color-contrast);
  height: 3.6rem;
  width: 1.6rem;
  border-radius: 0.5rem;
  background: var(--saito-foreground);
  cursor: pointer;
}
input.saito-range[type='range']:focus::-ms-fill-lower,
.saito-range:focus::-ms-fill-lower {
  background: var(--saito-primary);
}
input.saito-range[type='range']:focus::-ms-fill-upper,
.saito-range:focus::-ms-fill-upper {
  background: var(--saito-primary);
}
/***************************************************
 * Toggle switch
 ***************************************************/
body::before {
  transition:
    opacity 1.2s linear,
    z-index 1.2s ease-in-out;
}
body.xclose::before {
  opacity: 0 !important;
  z-index: -2 !important;
}
